1
1

Compare commits

...

9212 Commits

Author SHA1 Message Date
753dd8f09a First commit to this branch
This branch is supposed to serve as a template and tutorial to
newcomers of the Blender codebase.
2019-03-03 16:46:26 +11:00
ae977d13f8 Improve slightly the stability of wireframes in old GPUs from AMD.
Tested on `AMD Radeon HD 7570M`.
The reason for crash reduction is still unknown.
2019-03-02 21:01:13 -03:00
52f318b914 Refactor duplicate code for collections.
* Fix incorrect handling of children collections being linked more than
once in the hierarchy (previous code would make a new copy for each
link, instead of just re-linking the first copy for each extra link).

* Simplify some aspects of it (we do not need a GHash for new objects,
we can use ID->newid pointer instead, and some iterations can be done
directly on existing linked lists of old collection, instead of making
temp local copies of them).

* Move all copy logic into a single private recursive function (it was a
bit odd/disturbing to see calling function being indirectly called again
by the recursive helper one - not wrong, but that kind of code path can
quickly become problematic in recursive patterns).

* Added some comments about expected behavior of
`BKE_collection_duplicate()` depending on its booleans options.
2019-03-02 22:00:34 +01:00
dcbc09e429 Cleanup: comma warning 2019-03-03 02:29:43 +11:00
f67e81e295 Cleanup: SDNA/DNA naming
Use 'size' instead of 'len' to represent the size of data in bytes,
'len' is used for the result of 'strlen' or the length of an array
in some parts of 'makesdna.c' & 'dna_genfile.c'.

Also clarify comments and some variable names, no functional changes.
2019-03-03 01:29:08 +11:00
dc858a048b GPencil: Set alpha to 1 for all materials in SOLID mode
To be consistent, the alpha must be set to 1 when solid mode is enabled.
2019-03-02 14:28:44 +01:00
de78ffca84 GPencil: Initialize Fill alpha to 1.0 by default for new materials 2019-03-02 14:15:56 +01:00
ba7656ad25 GPencil: Set Viewport color to black by default
As the 2D viewport color is white, if the object default color is white, when wireframe is enabled the object is invisible.

Now, the grease pencil object default viewport color is black.
2019-03-02 14:13:04 +01:00
cd9c1c10e8 GPencil: Fix Display Textures in Solid mode
There was a bug when selected Solid mode with Material or Texture mode. The textures were not visible.

Now, the mode is passed to shaders to decide if use the solid color or the result texture color. The mode is passed using an array with shading type and mode.
2019-03-02 13:59:18 +01:00
10d41e48b8 Fix BLI_mempool incorrect slop-space calculation
Also ensure elements fit evenly into the chunk size
causing allocations to be slightly smaller in some cases.

In own tests reduces overall memory use by about ~4.5%
for high poly meshes in edit-mode.
2019-03-02 20:31:31 +11:00
cf75aea218 Cleanup: code style & comments 2019-03-02 18:36:42 +11:00
e5b6020ffc Cleanup: remove unused define
There is no reason to keep the option for separate allocations,
it makes code harder to follow.
2019-03-02 18:36:42 +11:00
e72bbd3805 Revert accidental change in submodules from last commit
This reverts part of commit d5c2be7031.
2019-03-02 03:05:58 +01:00
d5c2be7031 CMake: Use static libstdc++ for static builds
This enables static linking of libstdc++ by default when building using
`WITH_STATIC_LIBS`. This makes builds more portable for anyone making
static builds (in particular for older systems).

Reviewed By: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D4393
2019-03-02 02:53:09 +01:00
490a385c81 Cleanup: comments, assert align is a power of two 2019-03-02 11:57:39 +11:00
b5d87f8028 BLI_memarena: use ASAN memory poison
Detects invalid memory use when WITH_COMPILER_ASAN is enabled.
2019-03-02 11:50:44 +11:00
4d9bf4fc6c Cleanup: use dummy valgrind macros instead of ifdef's 2019-03-02 11:49:03 +11:00
5d9b50054c Cleanup: unused variable 2019-03-02 11:49:03 +11:00
84820e7f58 Revert "Fix T62098: Outliner: Delete hierarchy crash"
This reverts commit d1baed5e3d.

Next time please let original author of the buggy code to take care of
fixing the issue!
2019-03-01 23:04:47 +01:00
ccecc409e4 Fix T62098: Outliner: Delete hierarchy crash.
Stupid mistake in own logic would prevent first deleted ID to be
properly unlinked from rest of .blend file before its deletion...
2019-03-01 23:04:04 +01:00
e0458a3ead Fix drawing order messed up by rB005626b8c6b4
When annotations enabled, image borders were drawn around whole area instead around preview image.

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4430
2019-03-01 12:23:15 -08:00
Dalai Felinto
d1baed5e3d Fix T62098: Outliner: Delete hierarchy crash
Revert "Outliner: Enable new faster 'Delete Hierarchy' code by default."
This reverts commit 491a98ca44.

It fails in the most basic of tests (see report). No point in leaving
this commit around until it passes the easy to test cases.
2019-03-01 17:21:00 -03:00
Dalai Felinto
42faf52d8b Fixup for fix for OSX build using a build folder name with spaces
Bug introduced on: 1f22e3f311.
This was making regular Mac builds to fail, where they were not failing before.

Tested by William Reynish.
2019-03-01 17:07:08 -03:00
83c6130e87 GPencil: Change display modes
-Wireframe use Background color for X-Ray off
- Added support to Solid mode.
- Solid mode shows fill or not depending X-Ray.
- Solid can use Single, Material, etc.
- Wireframe and Solid mode don't show FXs.
2019-03-01 20:52:04 +01:00
Dalai Felinto
589d089472 Fix T62025: Outliner and viewport missing update after deleting object
Bug introduced on 012483b6e4.

Since we notify similar things when changing active and selected
objects, I believe we didn't notice this was missing a ND_OB_SELECT
notification before the small refactor to use the messenging system
exposed that bug.
2019-03-01 16:28:20 -03:00
943e4ec8f1 Fix unreported: Glitches on the wireframe of curves. 2019-03-01 16:20:40 -03:00
Dalai Felinto
568fa11a04 Fix warning for uiButPushedStateFunc
I changed the number of arguments for uiButPushedStateFunc
and forgot to update parts of the code (rB92182495da881).
2019-03-01 15:59:12 -03:00
6194aa5ce9 Fix T62047 New wireframes missing fresnel effect
Add back some (subtle) fresnel effect on object wireframe.

Dupli/set object still remains flat and need more work.
2019-03-01 19:46:08 +01:00
66228d4362 Fix T62090 : Eevee shader compilation: undefined variable "att1_is_srgb"
The geom shader check was not needed and this uncovered an error in the
GPU_BARYCENTRIC_TEXCO optimization recently commited.
2019-03-01 19:46:08 +01:00
Dalai Felinto
92182495da Fix T62016: Outliner visibility icons drag behaviour broken
We are mixing bool and fancy 3-in-1 func-set buttons in the outliner.
So they would return different pushed state in
ui_drag_toggle_but_pushed_state().

We now have a callback function that allows the button to set its own
pushed_button_state callback function.

Note: This is a bit of overkill since we are planning to change the
3-in-1 outliner buttons. That said, it may be nice to have, since in the
future we can mix those buttons for other things.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4434
2019-03-01 15:39:04 -03:00
a577499c75 Merge branch 'blender2.7' 2019-03-01 19:29:26 +01:00
4c3be0bf52 Fix T62073: Cycles random hangs rendering with Save Buffers on. 2019-03-01 19:26:57 +01:00
d16386e50b Fix T62087: Crash when rendering in Cycles
The issue was discovered only after recent changes, but roots back
to much older changes.

What was happening is scene's ID recalc flags where never cleared,
which caused ensure_view_layer() to always run copy-on-write on the
scene. This resulted in certain runtime data being cleared, without
proper flag stored in the dependency graph.

This was caused by ID recalc clear function checking whether any ID
was tagged for recalc in that graph or not. This was happening due
to all areas using DEG_id_type_tag() which can only set flags on the
graph from viewport scenes, and could not inform render dependency
graph.

Now ID tyoe tagging is happening on per-graph level, which avoids
possibility of flags running out of sync.

In a bit longer term we also need to get rid of two functions which
are clearing flags: DEG_id_type_tag() and deg_graph_clear_tags().
2019-03-01 19:03:51 +01:00
faec3655d8 Fix T62075: Edges generated by solidify modifier does not appear
This was a missing flag.
2019-03-01 17:17:44 +01:00
fa5950d878 Fix crash with wireframe on highpoly curves on some AMD gpus.
Differential Revision: https://developer.blender.org/D4433
2019-03-01 12:40:20 -03:00
5eee1b4d1b Use original base to see whether it can be ignored from evaluation
Object of evaluated base is not yet copied, so we can not know whether
it has animation on visibility or not.

This issue was reported in T56635#630383.
2019-03-01 16:35:11 +01:00
ed36944adc Cleanup: typo and update comment 2019-03-01 16:06:38 +01:00
Dalai Felinto
7d4e1ac727 Outliner: Collections Duplicate - remove original duplicate operator
Now that we have better options (duplicate collection and duplicate linked) there is no
longer need for the original dupli operator.

In fact, as it was it was of little use if you ever had nested collections.
2019-03-01 11:44:19 -03:00
Dalai Felinto
e7ea99af1b Outliner: Collection - Duplicate Hierarchy, and Duplicate Linked Hierarchy
As per the suggestion on T57064, this introduces two new options to duplicate collections.
We then have:
* Duplicate > Collection (New collection with linked content).
* Duplicate > Hierachy (Duplicate entire hierarchy and make all contents single user).
* Duplicate > Linked Hierarchy (Duplicate entire hierarchy keeping content linked with original).

Development TODO: `single_object_users` can/should use the new functions.

Reviewers: brecht, mont29

Subscribers: pablovazquez, billreynish, JulienKaspar

Differential Revision: https://developer.blender.org/D4394
2019-03-01 11:44:19 -03:00
Dalai Felinto
619c65a4b3 Cleanup: Update comment 2019-03-01 11:44:19 -03:00
Dalai Felinto
dbab52e4c0 Cleanup: Set BKE_key_from_object/_p to take const Object * 2019-03-01 11:44:19 -03:00
3e07eac87b Cleanup: use variable instead of define 2019-03-02 01:30:59 +11:00
33b03f7f68 Cleanup: move theme reset into it's own operator file 2019-03-02 00:53:39 +11:00
3804636ee5 Fix: Better fix for KeyingSet "Export to File" and unescaped characters
Use Python's native raw formatting instead, which should take care of any issues
we may face.
2019-03-02 02:30:31 +13:00
dbeef6751d Cleanup: Adding braces around all cases here to make it easier for the next step 2019-03-02 02:30:31 +13:00
2bad126999 Fix T62057: Particle settings keyframes not showing in Graph Editor channels
In short, the settings to expand/collapse the Particles Animation Dopesheet expander
were no longer getting exposed, so the F-Curves attached to the particle settings
were not showing up in the channels list as that section was collapsed and couldn't
be opened from the UI.

Early on during the development of 2.8, we originally wanted to completely remove
the Particle System. Eventually that decision got walked back, and so particles
were reinstated. Well... most of the relevant code was! One of the areas that was
the most messed up during this process was the animation editor support for these
channels. It seems that there was almost a two-step removal process here -
the first pass tried to keep the channel definitions while removing all references
to particle stuff, while the second pass tried to remove the definitions completely
and/or re-added them in the wrong places, etc. To say the removal/reverting history is
here is "colourful" is an understatement...
2019-03-02 02:30:31 +13:00
bbe98b18fb Cleanup: use preferences prefix for Python operators 2019-03-02 00:23:42 +11:00
53e4a18cdf Collections: mark visibility properties as not animatable.
Better to communicate the current state clearly until this is supported,
for now only object visibility can be animated.
2019-03-01 14:11:44 +01:00
d0e245647c Cleanup: use unsigned types in 3D view editor 2019-03-01 23:43:34 +11:00
053c3bd48a Tool System: add a mode option to 3D view circle select
Support only basic operations: new/add/subtract.
2019-03-01 23:21:24 +11:00
3c10de2c9b 3D View: avoid redundant circle select updates
This refreshes on cursor motion so it's worth avoiding redundant
updates, especially for multi-object edit-modes where many objects
aren't even near the object being selected.

This commit also moves to passing eSelectOp to circle select functions
in preparation for adding a select mode tool option.
2019-03-01 23:09:22 +11:00
3982d3c171 WM: add gesture variable to detect first execution
Needed for circle select to replace the current selection.
2019-03-01 23:00:11 +11:00
9f77c20286 Fix T62053: Composite rendering more images than needed
Reviewers: brecht

Maniphest Tasks: T62053

Differential Revision: https://developer.blender.org/D4432
2019-03-01 12:51:04 +01:00
cbbdb5249f 3D View: move particle circle select out of object mode loop
This doesn't support multi-object editing, no reason to check others.
2019-03-01 22:27:44 +11:00
e795dd4a20 Revert "UI: File menu tweaks."
This reverts commit b104b3cdcf and 04baefcc2f. Changes to core UI like
this should go through review, and doing them during Beta development is
not generally the right moment unless they fix an important problem.
2019-03-01 11:14:38 +01:00
31509461f1 UI: Make Auto Smooth panel open by default 2019-03-01 10:45:59 +01:00
2a731adae7 Fix T62015: Duplicating object, rotating, pivot point not used
Was caused by another fix in the area, and root to the wrong though that
transformation is only initialized from a fully evaluated dependency graph.

The latter one is not a case when changing transformation mode.

Solved by copying transform to an evaluated object.
2019-03-01 10:25:14 +01:00
0451043045 Fix flag on wrong object being modified
The intention was to disable constraints prior evaluation of
the object.

Spotted by Campbell, thanks!
2019-03-01 10:03:07 +01:00
Stefan Werner
1915b5338b build_environment: Fixed make deps on macOS
Two changes:
Removed the explicit version for the macOS SDK, recent
versions of Xcode have a symlink to the newest SDK.
Fixed the build script for OpenMP by removing extra ' marks that
install_name_tool took literally and replaced INSTALL_PATH with
INSTALL_DIR.
2019-03-01 10:01:55 +01:00
90526e1606 WM: improve support for binding actions to modifier keys
Previously a modifier key-map type only worked when the same key was
enabled as a modifier as well.

This allows for users to assign an action to double-tap-shift for eg.
2019-03-01 16:59:28 +11:00
5e32bd47e8 Cleanup: Use braces in event matching logic
Also no need to map the event type for inactive keys.
2019-03-01 16:38:39 +11:00
98bb22a207 Fix object mode lasso de-selection
Lasso actions that only de-selected were handled as if nothing changed.
2019-03-01 14:08:05 +11:00
1bb71a82cb Cleanup: de-duplicate RNA array default args 2019-03-01 13:21:08 +11:00
3bcad47357 Fix T62068: rotation incorrectly re-uses axis
Regression in recent transform changes.
2019-03-01 13:06:20 +11:00
69665bc7f0 RNA: move cursor into own struct
Without this it's impractical to subscribe to any change to the cursor.

Fixes T61969 by having gizmos update on any change to the cursor.
2019-03-01 12:41:40 +11:00
795effcbc8 Fix T61825: animated images not working immediately when enabling auto refresh. 2019-03-01 02:12:40 +01:00
e5194835de Fix T61929: crash on undo in some files with local view. 2019-03-01 01:39:43 +01:00
805f8f8230 Comments: add comments for new transform struct members. 2019-03-01 10:56:46 +11:00
c18289da93 Cleanup: minor improvements to transform comments. 2019-03-01 10:56:46 +11:00
5564601d45 Cleanup: Use const for static number.
Also use double indent instead of mixed tab/spaces.
2019-03-01 10:56:46 +11:00
83fc6103e5 Cleanup: pep8 2019-03-01 10:56:46 +11:00
1f22e3f311 Fix macOS OpenMP build error when using a build folder name with spaces.
Patch by Campbell.
2019-03-01 00:26:42 +01:00
41d1582f1d Cleanup and refactor sequencer proxy properties panel
Split SEQUENCER_PT_proxy to:

SEQUENCER_PT_proxy_settings
 - global settings and operators
SEQUENCER_PT_strip_proxy
 - proxy settings per strip

Author: Guillaume M (mathers)

Reviewed by: ISS, campbellbarton

Differential Revision: https://developer.blender.org/D4262
2019-02-28 15:10:19 -08:00
680c7209ec Hair Particle: Fix issue on OSX due to hardware accelerated subdivision
Workaround to tranform feedback not working on mac.
On some system it crashes (see T58489) and on some other it outputs
garbage (see T60171).

So instead of using transform feedback we render to a texture,
readback the result to system memory and reupload as VBO data.
It is really not ideal performance wise, but it is the simplest
and the most local workaround that still uses the power of the GPU.

This should fix T59426, T60171 and T58489.
2019-02-28 22:56:45 +01:00
fbd8c7dc4e UI: hierarchical nesting
Use correct hierarchical nesting in camera and mesh obdata properties
2019-02-28 22:54:06 +01:00
d505592ffd UI: un-expand enum
Enums don't work well when expanded vertically like this
2019-02-28 21:58:36 +01:00
962af13b18 UI: Properties hierarchical nesting
Make hierarchy more clear and consistent in Render, Object and Particles
2019-02-28 21:53:14 +01:00
993f43dc9e Cleanup/refactor clnor code: add high-level helpers to set custom normals.
Now it will be simpler for code jsut wanting to preserve custom normals
around to set them, without having to add same boiler plate code all the
time around actual code.
2019-02-28 20:47:50 +01:00
090b8c14d2 Fix (unreported) assert in modifier evaluation of weighted normals.
Currently modifier stack assumes there are no poly normals data passed
around, so in case a modifier generates such data, it has to clean it up
after usage.

Whole handling of normals is a bit annoying and week currently, we can
probably enhance that once fully per-mesh item type cddata masks are in?
2019-02-28 20:47:50 +01:00
7d0fcaa69a 'Fix' T61942: Triangulate modifier breaks custom normals.
Not a bug, but supporting preservation of custom normals in that
specific modifier makes sense, in game pipeline contexts.

Could also ease work of IO add-ons that want to export
triangulated geometry...
2019-02-28 20:47:50 +01:00
f95f1a47b4 CustomData: add function to clear layers' flags.
We only had one to set those flags, up til now...
2019-02-28 20:47:50 +01:00
3b3b86f62a UI: Particles
Nicer alignment in Vertex Groups panel
2019-02-28 20:46:05 +01:00
Pablo Vazquez
b104b3cdcf UI: File menu tweaks.
* Group Export with Save, Save As, Save Copy.
* Group Import with Link, Append.

Suggested by @fsiddi
2019-02-28 20:32:39 +01:00
Pablo Vazquez
05bb793b39 UI: Minor tweak on Object Type Visibility popover.
Mirror order of items as in 'Add' object menu.
2019-02-28 20:09:53 +01:00
050cf891f2 GPencil: Cleanup style 2019-02-28 19:54:07 +01:00
Pablo Vazquez
04baefcc2f UI: File menu tweaks.
* Move Revert, Recover Last Session, Recover Auto Save to its own sub-menu.
  Had three entries of the same category, and solves user reports on "Revert" being dangerously accessible under Open.
* Move up Link, Append, Import, Export as they are used more often than e.g. Save Startup File.
2019-02-28 19:45:21 +01:00
775936f0b2 Merge branch 'blender2.7' 2019-02-28 19:17:54 +01:00
da1323d1c9 Fix T60366: texture paint slots not updating when editing material.
Now always refresh when the material changes. Depsgraph tag moved out
of the refresh function since that gets called on depsgraph update,
which should not trigger a second depsgraph update.
2019-02-28 19:17:16 +01:00
e395c82d1f Fix Cycles animation denoising not working for files on a network drive.
Can't do cross-device renaming, so put temporary file in same folder as
output file.
2019-02-28 19:16:08 +01:00
Pablo Vazquez
acd4623471 UI: 3D View 'Add' Menu tweaks
* Remove single item Armature sub-menu. Add Armature straight away, unless the menu is expanded (like with Rigify enabled)
* Group Light and Light Probe between separators
* Move the lesser used Speaker item below Camera
2019-02-28 18:54:00 +01:00
95b150ba87 Depsgraph: Fix wrong disabled bases deletion
Original optimization idea was wrong: it is possible that some other
ID would reference an object which is also used by a base.

Rolled back to a bit more fragile solution.

In the future would be nice to make it somewhat less duplicated with
the builder itself.

Fixes assert failure (and possibly crashes) when adding grease pencil
object and switching to a draw mode.
2019-02-28 18:48:28 +01:00
f864cbd705 Cleanup: Snake style in depsgraph
While it's kind of common to use camel case in C++ this is not
currently agreed style for C++ in Blender.

Got confused by working on other areas with 3rd party libraries.
2019-02-28 18:41:37 +01:00
d3294fd93f UI: Contextual menus
-Rename 'Specials' menus to 'Context' menus for Grease Pencil
-Make Grease Pencil contextual menus follow the design of the regular contextual menus more
-Add more useful operators to the contextual menus in the paint modes
2019-02-28 18:14:48 +01:00
2215541967 Fix T62012: Non-animated property, stuck in previously keyframed values
Was missing ID recalc tag.
2019-02-28 18:09:10 +01:00
2cd478cf19 GPencil: Rename variable name and add alpha to outline
The outline now has some alpha to be more consistent with other Blender areas.
2019-02-28 17:13:05 +01:00
0f37d7162b GPencil: Disable Outline if Overlay is disabled
The main overlay switch and outline option must be checked.
2019-02-28 17:13:05 +01:00
175cb0a0af GPencil: Remove comment line added by error to header text
This line was added accidentally in the header text.
2019-02-28 17:13:05 +01:00
acb3858399 GPencil: Increase outline to 2 pixels
The selection outline of 1 pixel was too thin.
2019-02-28 17:13:05 +01:00
d8f9797c28 GPencil: Hide selecction outline when play animation 2019-02-28 17:13:05 +01:00
5411efdeed GPencil: Draw Outline to Active and Selected objects
Now an outline is drawn when the grease pencil is selected.
2019-02-28 17:13:05 +01:00
9ddc2064a4 GPencil: Remove dummy marker for Grease Pencil objects
After adding selecction using strokes, the dummy is not required because it was added as a provisional solution while we implement stroke selection.
2019-02-28 17:13:05 +01:00
461b1bdfbf GPencil: Add selection support for objects using strokes
Now it's possible to select a grease pencil object without using the dummy.
2019-02-28 17:13:05 +01:00
Pablo Vazquez
8ca45e929a Wonky Menu Down Arrow
Almost every pulldown menu and popover has a little dropdown arrow shape.

Unfortunately it is a bit wonky.  The top of the right side of it is wider than the top of the left side. And both sides are narrower at the bottom than the top. It might be hard to see, but this image should help:

{F6728281}

The patch fixes the symmetry of the shape while keeping the weight as similar as possible. In the following image you can see the outline of the current version in red and this new version in green.

{F6728298}

With patch applied the arrow looks perfect:

{F6728302}

Reviewers: brecht, billreynish

Reviewed By: billreynish

Subscribers: pablovazquez

Tags: #bf_blender, #bf_blender_2.8, #user_interface

Differential Revision: https://developer.blender.org/D4424
2019-02-28 17:05:13 +01:00
ac8c4aad30 Revert "Objects: Remove Textured from object display type"
This reverts commit 6a4a984ff7.
2019-02-28 16:51:24 +01:00
846d265a06 Split base flags on own and collection-defined
This allows to update base flags to a proper state then object's restriction
flags are changed, without requiring to re-evaluate an entire tree of flags.

Some old unused flags are were removed by this change, and also disabling
menu items might not work the same as before. This is something we can bring
back if it's really needed (the way how flags are handled did change since
that interface code was done anyway, so code was looking weird anyway).

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4420
2019-02-28 16:35:12 +01:00
7895c6b83d Remove unused base flag
Was only set and read from a single location.
Removing to keep things more manageable.
2019-02-28 16:35:12 +01:00
8d6732d1f7 Depsgraph: Keep objects which has animated visibility
This allows dependency graph to evaluate drivers of those objects
and put them to a correct state. It will increase memory usage
since now we can no longer save it by skipping copy-on-write for
such objects. It will also currently make things slower, because
we do not have granular enough visibility update of components in
the dependency graph. Can do it later when the rest of the changes
are finished.

This commit does not update restriction flags on the base, since
that is somewhat tricky to do currently: need to somehow see whether
object is disabled due to flags on collection or due to own flags.

Differential Revision: https://developer.blender.org/D4419
2019-02-28 16:28:24 +01:00
9eaa577b9b Depsgraph: Route visibility flags update to proper component 2019-02-28 16:28:24 +01:00
ed90de08e3 Depsgraph: Change the logic about keeping bases in the graph
The idea is to keep bases which are known for sure to be in the
dependency graph. Previously, this code was duplicating logic
around checking restriction flags, which becomes more hard to
maintain once we are moving towards to more comprehensive checks
about whether base is a part of evaluated scene or not.
2019-02-28 16:28:24 +01:00
6a4a984ff7 Objects: Remove Textured from object display type
As discussed with @billreynish this makes little sense now that we don't
have a dedicated textured mode. We don't have a superior texture or shaded
mode anymore and we also cannot mix different engines together (workbench
with eevee/lookdev).

The only feature it removes is the possibility to hide textures for certain
object in solid mode.
2019-02-28 16:15:50 +01:00
cd897c57f8 Fix T62040: Irradiance Volume broken
Was broken by 6a03199b50.

Reintroducing the padding along with a few comment to not reproduce the
same errors.
2019-02-28 16:15:50 +01:00
921c37bfa3 Fix T62050: remove non-persistent timers in load-pre callback
This actually makes more sense than removing them in the
load-post callback. During load, the file might register
timers that would be removed immediately.
2019-02-28 16:07:56 +01:00
5938fd4ccc Fix T61994: crash when box selecting instances
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4427
2019-02-28 15:53:01 +01:00
d7d180bd3d Fix T62021: Wireframe input node doesn't work properly
This fixes the general case. It is still not supported for hairs.

Added a hack in the geometry node to avoid unnecessary geometry shader
usage.
2019-02-28 14:11:12 +01:00
d68484a60f Fix T58405: viewport drawing issues with display device set to None.
Disabling color management this way is not very useful, but as long as the
option is there it should work correct.
2019-02-28 13:41:48 +01:00
bbe5a95d05 Fix T58875: object paste and append Active Collection property not working. 2019-02-28 13:02:55 +01:00
5397f1e45d Preferences: Remove warning concerning selection in edit mode with MSAA
We don't use MSAA anymore for the selection buffers so this warning is no
longer relevant.
2019-02-28 12:10:04 +01:00
4b916612e1 Fix T61878: Selection does not allways work in wireframe mode
This draw surfaces if the xray option is disabled even in wireframe mode.
2019-02-28 12:10:04 +01:00
9d34a9d7e5 DRW: add back edge highlighting for active face drawing
Removed in aa7b013bd5 for performance reasons, however highlights
can't always be seen against specular shading, see: T55456#510873

Instead of having a highlighted inner-edge, use the active edge color.
2019-02-28 18:03:31 +11:00
dd9cedddae 3D View: only calculate view center when needed
When orbit around selection was enabled the selection center was being
calculated even when it wasn't needed.
2019-02-28 15:40:28 +11:00
60a1ccbe2c DRW: use active color for face dot
Matches active vert/edge modes.
2019-02-28 14:57:03 +11:00
e735894070 UI: rename Quit Prompt to Save Prompt
Eventually this should be used to prompt when loading a new file too.
2019-02-28 13:21:25 +11:00
d7baf8e7e7 UI: change behavior for quit prompt
Remove confirmation popup menu, just exit.

Note that this option is mainly for developers or people reviewing
blend files, see D4406 for discussion on reason for keeping this feature
while simplifying how it works.
2019-02-28 13:09:56 +11:00
3d4d7b97c2 Cleanup: style 2019-02-28 12:30:56 +11:00
c51516c3fb Update for rename: constraint_orientation -> orient_type 2019-02-28 12:30:56 +11:00
d4366d57b0 icons_geom: update from svn rev 62198
In the future we'll try to avoid such big updates,
adjusting to material colors could have caused so many files to change.
2019-02-28 12:16:16 +11:00
7188250523 Fix missing NULL check in recent transform changes
Caused bevel to crash.
2019-02-28 12:14:55 +11:00
8aa5eadc54 Cleanup: warning 2019-02-28 12:14:55 +11:00
b1c3d91aed Makefile: icons target now uses make variables
Add examples in help text.
2019-02-28 10:37:49 +11:00
c6681c65dd Makefile: use BLENDER_BIN variable if passed in
When the default build path isn't used,
it's still handy to be able to run utility commands.
2019-02-28 10:35:38 +11:00
c702e57b3c Makefile: move help text to string literal
Editing text in @echo commands wasn't convenient.
2019-02-28 10:12:24 +11:00
005626b8c6 Refactors preview drawing code with few functional modifications:
Fix T61241

 - Changing preview size does not affect drawn image size, only resolution.
 -- Consistent behavior, when changing full-size / proxy / scene render size
 -- Scopes are rendered in *same size* as source image
 -- Over all, user does not have to readjust preview zoom.

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4315
2019-02-27 13:48:27 -08:00
Pablo Vazquez
b9a37dd97a UI Particles: Minor tweaks to labels
* Capitalize 'Orientation Axis' and 'Multiply Mass with Size'
* Rename 'Scaling' to 'Radius Scale'
2019-02-27 19:50:34 +01:00
Pablo Vazquez
7dd802e66d UI: Rename 'Object' to 'Object Velocity' in particle settings 2019-02-27 19:50:34 +01:00
Pablo Vazquez
5e039c29c8 UI: Rename Display -> Viewport Display panel 2019-02-27 19:50:34 +01:00
3ad2d6caef Cleanup: better names and comments for library ID linking code.
Differential Revision: https://developer.blender.org/D4415
2019-02-27 19:37:42 +01:00
8c4b5ac4c1 Fix T62007: Dial 3d being drawn out of rotating tool.
It was being drawn when any Gizmo was highlighted.
There are several ways to solve this (creating a new parameter to the operator, checking the gizmos in the invoke or creating a global context).
Also, for a micro-optimization, all of those conditions in the `drawDial3d` could be done once in the invoke.
But since all of these changes involve changing the customdata (`TransInfo`), which is already a bit confusing with so many members, I thought it best to make minimal changes.
2019-02-27 13:37:12 -03:00
2b892c6c21 Fix T61988, Bevel miter on small scale.
Take two at fix, hopefully without unintended commits
to submodules this time.
2019-02-27 11:52:30 -05:00
495216d2b8 Armature: Make selection only work on outlines in wireframe mode
This was not working in edit mode and broken in posemode + bounding box
display type.

This makes possible to select bones inside other bones.
2019-02-27 17:46:17 +01:00
28ccc0fa2f Armature: Remove the Transparent Bone overlay option
The option is replaced by the Wireframe mode display which (in edit & pose
mode) does exactly what transparent bones did.
2019-02-27 17:46:17 +01:00
fe5d26807b Armature: Force Transparent bone in wireframe display type/mode
This makes the bones transparent when the object or the viewport display
type is Wireframe. This is in order to make things consistent.

In object mode all bones are fully transparent to not create more visual
noise if the scene is complex.

Another small addition is that the Bounding Box draw mode now works as
expected on armatures.
2019-02-27 17:46:17 +01:00
4243c29463 Revert "Fix T61988: Bevel mitering on small objects."
This reverts commit 048088e1d2.
Accidentally changed submodules. Will resubmit with only
intended changes later.
2019-02-27 11:42:48 -05:00
f57fce3534 Revert "Add library-hint to datablock search menus."
This reverts commit 4669c3692c.
2019-02-27 16:44:49 +01:00
9d6a1b990f Revert "Fix broken 'search pointer' UI since this morning."
This reverts commit 456e3f00e0.
2019-02-27 16:44:49 +01:00
03da3b6593 Transform: fix redo rotate adjusting orientation
Regression in recent update.
Also de-duplicate orientation matrix initialization.
2019-02-28 02:37:17 +11:00
4cd7dc6860 GPencil: Fix memory leak issue
After a previous commit to use unique identifiers for Ghash key, I had missed to free the memory of the name key.

Thanks to Jacques Lucke for detecting the leak.
2019-02-27 15:59:55 +01:00
665d987e7b Keymap: use tap/drag for mode switching w/ pref enabled 2019-02-28 01:04:32 +11:00
117bc1477e Cleanup: remove redundant property assignment
Also cleanup comments
2019-02-28 01:04:32 +11:00
87066782e7 Depsgraph: Make it easier to control which bases being pulled into the graph
Just de-duplicates some logic. Should be no functional changes.
2019-02-27 14:50:42 +01:00
05dc3d43ca Move base flags evaluation to its own function
No need to have iterator loop in the view layer evaluation,
this only makes it more difficult to have base flags covered
by the dependency graph.

Other good thing is that we don't need to worry about whether
base has been removed from the evaluated view layer or not.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4414
2019-02-27 14:45:38 +01:00
8a432c1a40 Transform: shear redo support for other orientations
Shear gizmo now uses a single orientation and sets
different ortho axis instead of constructing a different matrix for
each handle - allowing the redo panel to select orientations.
2019-02-28 00:23:43 +11:00
048088e1d2 Fix T61988: Bevel mitering on small objects.
When edges had small length (less than about .005) the angle
classification didn't work. Needed some normalization of vectors.
2019-02-27 07:51:57 -05:00
Vaishnav S
afc5f82d8d Fix typos related to units 2019-02-27 13:23:27 +01:00
d1f7ae29a2 Cleanup: use "_pad" prefix for pad vars 2019-02-27 22:20:29 +11:00
e097e0c833 Cleanup: header guard names
Missed in file rename.
2019-02-27 19:59:19 +11:00
dd228aa1f6 Fix T61945: Scaling with invalid snap distances
ApplySnapResize did not take into account invalid distances. Added check for this.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D4417
2019-02-27 09:30:37 +01:00
4732f90a4f GP: Use unique names for instance objects
When instance objects linked, the name could not be unique.
2019-02-27 08:50:29 +01:00
6155faf5bd GP: Check if Instance loop is needed
This reduces the loop time if the scene is not using instances.
2019-02-27 08:41:13 +01:00
7618851f74 GP: Optimize Instances drawing loop 2019-02-27 08:32:55 +01:00
80ef7fbeb1 Transform: refactor orientation naming and usasge
Transform orientation was previously related to constraints,
recent changes meant it was used even when not constraining to an axis.

Now transform orientation is separate from axis constraints.
2019-02-27 17:30:51 +11:00
3f23b5ffd5 Correct error in recent transform refactor 2019-02-27 16:39:03 +11:00
b21007757f DRW: disable wide edges when face-dots are used
Users who prefer to use face dot's don't get an advantage from drawing
thicker wire.

Requested by @ward
2019-02-27 16:06:37 +11:00
cdda910fc3 Cleanup: remove runtime structs from DNA 2019-02-27 15:39:12 +11:00
79171b15e4 makesdna: enforce use of '_pad' naming convention 2019-02-27 15:27:07 +11:00
6a03199b50 Cleanup: use '_pad' convention for padding in all DNA structs
Avoids mixing these in with regular variables in code-completion.

Use char for pad members except for 'void *', to make size clearer.

Removed/shrink a few redundant padding vars which were >= 8 bytes.
2019-02-27 15:09:48 +11:00
ea69d98580 Cleanup: remove runtime structs from DNA 2019-02-27 14:00:59 +11:00
f595d558f0 Cleanup: remove unused Material.pr_light
Also no need for 14 bytes of padding.
2019-02-27 13:08:06 +11:00
168d3fd528 Cleanup: file rename lamp -> light 2019-02-27 12:36:32 +11:00
1079742db9 Cleanup: rename lamp -> light 2019-02-27 12:26:49 +11:00
918941483f Cleanup: Main struct member names
Rename latt to lattice and don't use plural names.
2019-02-27 11:14:41 +11:00
3051e2f4ae DNA: rename Lamp -> Light
- BKE_lamp -> BKE_light
- Main.lamp -> light
2019-02-27 11:03:16 +11:00
Dalai Felinto
ce104ca896 Fix: Grease Pencil data panels not working with pinning
Note: Things were working fine if you were to pin the Grease Pencil
object, but not if you were pinning the GP data.

In too many poll functions context.object was being requested when
a simple context.gpencil_data would suffit.

Panels that are still not showing in pinning:
* DATA_PT_gpencil_display.

The panel needs to be split in sub-panels, leaving all object-dependent
properties in its own panel so we can poll it away, while showing the
rest.

* * *

This commit doesn't handle greasepencil material. In this case I
recommend we do as properties_material.py and have a generous poll(),
followed by different drawing logics whether or not we have an object.
2019-02-26 19:51:13 -03:00
Dalai Felinto
1beada2c62 Grease Pencil: Strokes Cut icon
The icon was there, but it was not in the Export collection, nor
was it correctly named.
2019-02-26 17:31:52 -03:00
Dalai Felinto
3d59599afe Grease Pencil: Silence warning 2019-02-26 17:31:52 -03:00
b4db7d80f1 Cleanup: use 'poly' for polygons-related data, not 'face'.
In Blender face is for tesselated faces, that kind of miss-naming is a
pretty good way to shoot yourself in the foot at some point or another
(see T61979)...
2019-02-26 21:00:18 +01:00
cae56ad6a2 Fix T61979: Solidify not working in Blender 2.8.
Broken logic in rB181356edba04, thanks most likely to stupid naming
(face in Blender is for tessellated faces, use poly for BMesh polygons).

Cleanup to follow in next commit...
2019-02-26 21:00:18 +01:00
788778d985 GP: Cleanup ToDo comment 2019-02-26 20:32:02 +01:00
930d0070b6 Fix T61956: Errors when instancing grease pencil objects
The problem was not only for instances, but for particles too, and produced segment fault.

For some reason due any internal modification of how duplicated objects are generated, the duplicated object are not available when the draw manager try to use runtime data.

Now, before drawing the particle or the instance, the pointers of the duplicated objects are reassigned to the original "real object" to get full access to runtime data.
2019-02-26 20:28:58 +01:00
92766fb965 UI: Move Pivot next to Orientation in header
-The pivot point and orientation of any transform are strongly related
-It matches the comma-key and period-key on the keyboard who are neighbours
-We get slightly nicer grouping this way, with the two axis-related options on the left and the two toggles on the right

Reviewers: pablovazquez, campbellbarton
Differential Revision: https://developer.blender.org/D4413
2019-02-26 20:24:40 +01:00
4d9697a5a9 Merge branch 'blender2.7' 2019-02-26 20:07:36 +01:00
6b6d1e424c Cleanup: prevent future issues with ID.tag overflow, clarify somes names. 2019-02-26 20:05:28 +01:00
564d252d60 Cleanup: remove unnecessary assert. 2019-02-26 20:01:20 +01:00
2977eb5a0e UI: Icons
New icons from Andrzej Ambroż / jendrzych:
-New trash icon for deleting ID's and other data (currently unused)
-New icon for the Grease Pencil select between strokes mode
-New icon for Proportional Editing Root Falloff curve

Also adjustments for Jump to Next / Prev. Keyframe, Camera ObData, Point Light ObData, Light Probe Object and ObData, Collection & Save icons.
2019-02-26 19:29:01 +01:00
d541430785 UI: Show marker lines in remaining animation spaces
This also includes fixed/slighly refactored drawing code for marker lines.
The old code used the wrong height.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4411
2019-02-26 17:24:36 +01:00
2b3553eff2 GP: Redesign wireframe mode
Now it's possible use the different Wire modes (Single, Object & Random)

Also support for x-ray mode.

For random colors, the name of the object and the name of the layer is used.

Also some parameters cleanup.
2019-02-26 17:09:29 +01:00
65de468396 GP: Draw: Stroke Trim
New edit mode operator and post-processing brush option.

Trim works on a single GP stroke. It removes trailing points before and after the first intersection (or loop) nearest to the start of the stroke.
2019-02-26 16:04:27 +00:00
ff304d3665 Cycles: Fix build error
introduced by rBdabe5cd31add8aa55b9ad4bce1b591ed4e98f1a1
2019-02-26 08:32:41 -07:00
cb8614e398 Fix (unreported): Snap to grid not considering Focal Length. 2019-02-26 11:38:46 -03:00
07c0174717 Cycles: Fix build error
introduced by rBdabe5cd31add8aa55b9ad4bce1b591ed4e98f1a1
2019-02-26 08:33:47 -07:00
b64856f308 Fix T61637: Edge extrude always uses normal orientation 2019-02-27 02:05:18 +11:00
34c7dbdd7d BLI_math: quat_to_axis_angle was zeroing the axis
When there was no rotation the axis was zerod,
while not exactly a bug, it means changing the angle does nothing
and all axis-angle values are initialized with Y=1,
use this convention when resetting the axis too.
2019-02-27 00:11:23 +11:00
15edae617f Merge branch 'blender2.7' 2019-02-26 14:07:57 +01:00
dabe5cd31a T61971: Compilation Displacement/Background Kernel
Displacement and Background kernels are selectively used, but always compiled. This patch will not compile these kernels when they are not needed.

Displacement kernel is only used for true displacement.
Background kernel is only used when there is a (Cycles)Light of type `LIGHT_BACKGROUND`.

Reviewed By: brecht, #cycles

Tags: #cycles

Maniphest Tasks: T61971

Differential Revision: https://developer.blender.org/D4412
2019-02-26 14:06:25 +01:00
f76c15efb7 Bevel mod: cleanup flags and extra data.
Removed a clnors field unneeded after a recent refactor.
Finished deprecation of flags that haven't been used since pre-bmesh.
2019-02-26 07:35:54 -05:00
95b7d2be2c Units: GP Canvas Offset
Use PROP_TRANSLATION for this to make it correctly display units in the UI.
2019-02-26 13:03:38 +01:00
e6099c7e46 T61576: Do Not (Re-)Compile OpenCL kernels
The goal of this patch is to have limit the number of times
kernels needs to be compiled and are reused as kernels with
different compile directives can lead to identical same
binaries.

The implementation does this by stripping the compile directives.
and reshuffling kernels so the output is more likely to be the
same.

We focussed on the kernels where it was easy to detect and maintain
(bundle, bake, displace, do_volume and background). More optimizations
could be done but they are probably less obvious.

Merged the data_init and state_buffer_size kernels to split_bundle.

This patch will also remove empty kernels for do_volume and bake
when their features are not enabled.

When using the benchmark files there are less background, bake and
do_volume kernels compiled.

Fix: T61576, T61501, T61466

Reviewed By: brecht, #cycles

Differential Revision: https://developer.blender.org/D4390
2019-02-26 12:45:26 +01:00
96f894ae34 Cleanup: Spelling in comment 2019-02-26 12:17:45 +01:00
9dd25a6b2a Depsgraph: Make parameters exit dependent on ID properties 2019-02-26 12:17:45 +01:00
e5be16175e Missed last commit 2019-02-26 21:21:17 +11:00
6ebad22091 Transform: fix rotate redo behavior
- Add XYZ option.
- Orientation now works as expected.

Now a redo for rotation works logically,
setting the axis to Z & the orientation to view.

Resolves T57205
2019-02-26 21:17:17 +11:00
0a87bf6784 Transform: don't set the user constraint when it's not set
The orientation for the redo panel would be set even when not used,
add an 'unset' orientation which defaults to global.
2019-02-26 21:15:45 +11:00
13dd8b69f0 GP: Rename "Dualtone" to "Duotone" 2019-02-26 10:15:13 +01:00
c182bb3adb Fix indentation issue introduced in rB54ffc4e19dc4 2019-02-26 09:33:21 +01:00
06961515e4 Fix T61965: Crash edit-mesh drawing w/ hidden faces 2019-02-26 16:04:23 +11:00
58a394073f BMesh: utility functions for visible element access
Needed for drawing code which skips hidden elements.
2019-02-26 16:03:21 +11:00
2986923f8c UI: disable split layout for cursor transform
There isn't much horizontal space in the side-bar,
also object transform which is very similar doesn't use a split layout.
2019-02-26 14:31:54 +11:00
186bd4d87b Cleanup: indentation, trailing space 2019-02-26 14:31:48 +11:00
1de11c38d4 Cleanup: assign rotation_mode to a variable
Don't access multiple times per draw.
2019-02-26 14:16:37 +11:00
54ffc4e19d Grease Pencil naming: Use clear names for depth ordering
- Add a new panel to differentiate between viewport display and stroke options
- Use clearer naming for depth ordering and stroke thickness properties

Reviewers: antoniov
Differential Revision: https://developer.blender.org/D4405
2019-02-25 21:59:35 +01:00
7efc26709c I18n: enable Abkhaz in Blender. 2019-02-25 20:40:31 +01:00
98c90df56c Merge branch 'blender2.7' 2019-02-25 19:55:49 +01:00
7e40a231a7 Fix T61946: Cycles border render missing samples and crypto metadata. 2019-02-25 19:54:48 +01:00
753e73009f Fix T61801: Wireframes on curves not working 2019-02-25 19:37:16 +01:00
a7acd4690c GP: Rename Colorize "Bi-Tone" to "Dualtone" 2019-02-25 17:46:15 +01:00
5d8a8a6842 GP: Add support for Wireframe mode
When enable Wireframe mode in the shading type, all strokes are displayed as simple 1 pixel lines.

The color of the line is equal to the stroke color or the fill color if the fill is enabled and the stroke is disabled or has invisible alpha value.

In wireframe mode, all FX are disabled because sometimes the effects can make the lines invisible.

The modifiers are not disabled.

Still pending to decide if we must add support for Random colors, but not sure if this is useful in 2D.
2019-02-25 17:46:15 +01:00
cfc2fa33bf Fix transform scale header printing
Clearing constrained axes caused the scale not to print correctly.
2019-02-26 03:20:40 +11:00
f131714056 Fix (unreported) broken code in RNA's datatransfer source layer enum function.
Same issue as in own previous commit actually.
2019-02-25 16:53:11 +01:00
76a9d1984f Fix (unreported) broken code in RNA's datatransfer source layer enum function.
Using a CDLayer data type instead of expected mask... tsst... ;)
2019-02-25 16:41:50 +01:00
c1f9127b64 RNA: disable animating the 3D cursor
Decorators took up space in the UI and this doesn't seem very useful.
2019-02-26 01:49:14 +11:00
86c0ee8020 3D View: support for editing cursor rotation
Add buttons for editing the cursor rotation as well as rotation modes,
similar to object and pose bones.
2019-02-26 01:37:49 +11:00
213ac7b1ac Cleanup: use const args for BLI_math_rotation 2019-02-25 23:18:55 +11:00
54a5059fe9 Cleanup: finish modifiers' hearder re-order from rBe31f0fad9744c813.
For some reason forgot to handle half of modifier files...
2019-02-25 11:57:14 +01:00
Vaishnav S
5ca5e67cc6 Units: Typo "Square/Cubic Thous" -> "Square/Cubic Thou" 2019-02-25 11:43:41 +01:00
e31f0fad97 Cleanup: order of modifiers' headers includes.
BLI should always comes first, before DNA, BKE etc. And
`BLI_utildefines.h` should come before any other BLI (since it's some
sort of system include really, among other things...).

Thisi should help to reduce the noise in patches when adding stuff
like uint64_t members to DNA structs... ;)
2019-02-25 11:39:14 +01:00
1419399f03 Fix T61919: Rename "Smooth Vertex" -> "Smooth Vertices" 2019-02-25 11:12:17 +01:00
b80ff7e2f1 Merge branch 'blender2.7' 2019-02-25 10:29:05 +01:00
9ad379fe55 Fix T61891: Cycles light use nodes button greyed out. 2019-02-25 10:24:40 +01:00
012483b6e4 Fix T60880: Assert deleting grease pencil object from outliner 2019-02-25 16:52:20 +11:00
9a311c58aa writefile: disable buffering when writing ZLIB
While Buffering output is useful for file writing and memfile
compression it's redundant when the output is already buffered.
It doesn't make a significant difference for ZLIB
however it makes a moderate improvement for LZ4, see T56162.
2019-02-25 13:27:23 +11:00
893fa59831 readfile: re-enable read on demand for WIN32
Revert workaround for T61855. It's likely this was caused by slow seek
for compressed files since the same behavior happens on Linux T61880.
2019-02-25 09:02:19 +11:00
5d7ce96b5d GP: Don't set cache as dirty with Onion 2019-02-24 17:00:12 +01:00
ccfda7dc2c GP: Disable Onion calculation when Overlay is OFF
Now, it's not required to disable the Onion in Overlay panel.
2019-02-24 16:03:03 +01:00
20dfa8aa28 readfile: minor changes to support other compression formats
Allow different readers to re-use the file descriptor.
2019-02-24 23:42:05 +11:00
6bab905c9d readfile: Disable delayed data reading for compressed blend files
Seeking gzip files is very slow, disable it.

Resolves T61880
2019-02-24 12:47:48 +11:00
8ed82e82e6 readfile: use regular file access when not a gzip
Allows for different behavior w/ compressed files,
will also make it simpler to support other compression types,
see: T56162
2019-02-24 12:41:37 +11:00
519982fd3e Cleanup: de-duplicate readfile file opening 2019-02-24 10:48:36 +11:00
2f8d8b5e5e GPUBuffer: Fix fast navigate in on smoooth multires grid 2019-02-23 22:36:04 +01:00
f680ab9c4e Fix strips text offset when zooming VSE timeline
Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw

This caused text in strips to "jump around"

There was a comment in UI_view2d_zoom_cache_reset:
While scaling we can accumulate fonts at many sizes (~20 or so).
Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244].
2019-02-23 11:37:24 -08:00
82b3b1a3c6 Revert "Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw"
Accidentaly committed unwanted changes.

This reverts commit 6bcdcc96c2.
2019-02-23 11:33:48 -08:00
5cc0bfa73a fix T61122 : Collada Importer: Added support for transparency for Materials.
This fix sets the Base color in the principled BSDF Shader and in
 the Material->r,g,b,a values. So the transparency and color are the
 same when switching the "use nodes" option for the material
2019-02-23 19:35:31 +01:00
5d822f4508 fix T61122 : Added support for Materials with Nodes disabled.
- The Collada exporter did not take care of
  material transparency when nodes are turned off.

- recent change to use ma->alpha_threshold seems to have
  been wrong. transparency is now taken from ma->a when
  nodes are turned off.
2019-02-23 18:17:46 +01:00
0207d20cd4 fix T59951: View all sequences does not take into account region overlap
fix centering preview

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4388
2019-02-23 06:16:52 -08:00
6bcdcc96c2 Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw
This caused text in strips to "jump around"

There was a comment in UI_view2d_zoom_cache_reset:
While scaling we can accumulate fonts at many sizes (~20 or so).
Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244].

Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4389
2019-02-23 06:14:44 -08:00
6eb59c5778 Cleanup: GCC redundant declarations
Previous waning suppression was only tested with clang.
2019-02-23 22:18:34 +11:00
8214a1ae34 GP: Define new Draw Mode
Add a new Draw Mode to display panel in order to define the z-.depth order of the strokes using the real 3D position and not the 2D layer position.

This change makes possible to use VR with grease pencil drawings because the depth of the strokes change with camera position. Also, provide an alternative solution to tasks: T57859, T60325, 

The parameter only works with 3D space depth ordering. The Back and Front depths are incompatible with 3D Space mode.

Options are:
- Back
- Front
- 3D Space->2D Layers (default)
-3D Space->3D Location (new mode)
2019-02-23 11:46:24 +01:00
702a2ba0ef Cleanup: quiet undeclared variable warnings 2019-02-23 19:20:20 +11:00
af5cfa7544 Cleanup: quiet undeclared variable warning 2019-02-23 19:20:20 +11:00
9d309b7978 Cleanup: quiet undeclared variable warning
Also move view_ubo into G_draw.
2019-02-23 19:20:20 +11:00
7a5854f4ce Cleanup: quiet undeclared variable warning
Move bpy_context_module declaration to bpy_rna.h.
2019-02-23 19:20:20 +11:00
6ab634ccc4 Cleanup: use specific names for global variables
hash & hashsizes are generic names, be more specific & define the
generic names locally.

Quiet undeclared variable warnings.
2019-02-23 19:20:20 +11:00
9d78b7edb9 Cleanup: use function instead of extern variable
Quiet undeclared variable warning.
2019-02-23 19:20:19 +11:00
1d2fc413c8 make.bat: Preliminary Visual Studio 2019 support.
VS2019 is binary compatible with the existing vc14 libraries and no
new libraries libs are required in svn.

VS2019 support requires cmake 3.14.

VS2019 is still in pre-release state, you are required to explicitly
select the pre-release version by using:

make full 2019pre
2019-02-22 20:54:27 -07:00
633b77b0ee Make.bat: Fix sub-module detection 2019-02-22 20:53:29 -07:00
7ad367d023 make.bat: Preliminary Visual Studio 2019 support.
VS2019 is binary compatible with the existing vc14 libraries and no
new libraries libs are required in svn.

VS2019 support requires cmake 3.14.

VS2019 is still in pre-release state, you are required to explicitly
select the pre-release version by using:

make full 2019pre
2019-02-22 20:49:22 -07:00
10f3b49026 Make.bat: Fix sub-module detection 2019-02-22 20:02:45 -07:00
085e9e3bed Cleanup: move variable declarations to headers
Quiet undeclared variable warning.
2019-02-23 12:59:13 +11:00
779860d34e readfile: disable delayed data reading for WIN32
Seeking the file causes slow down on Windows.

Resolves T61855
2019-02-23 09:26:37 +11:00
Dalai Felinto
655faca105 Fix: Workbench assert on non-image texture node
This was not report, but it would happen if you open the sample file
from T61858 and changed to solid view with texture.
2019-02-22 18:01:30 -03:00
Dalai Felinto
e9f738754d Cleanup: Remove redudant function call
BKE_main_id_clear_newpoints is already called from copy_object_set_idnew().
2019-02-22 16:41:23 -03:00
0ca623362d Fix T61837: Assert in Eevee multiresolution modfier in sculpt mode
Note that this commit remove the support (that was not really working)
for shadows in sculpt mode.
2019-02-22 17:14:27 +01:00
3b132778de Multires: Support smooth shading when sculpting
On CCG side it is done similar to displacement, where we have
a dedicated functor which evaluates displacement. Might be seemed
as an overkill, but allows to decouple SubdivCCG from mesh entirely,
and maybe even free up coarse mesh in order to save some memory.

Some weak-looking aspect is the call to update normals from the
draw manager. Ideally, the manager will only draw what is already
evaluated. But it's a bit tricky to find a best place for this since
we avoid dependency graph updates during sculpt as much as possible.
The new code mimics the old code, this is how it was in 2.7.

Fix shading part of T58307.
2019-02-22 17:02:51 +01:00
Dalai Felinto
b6c61945ae Fix T55921: Toggling visibility for collections doesn't work in Pose
It is always dangerous to add more shortcuts those days. But this way it
is consistent with 2.79 to a point.

When in edit mode (mesh, greasepencil, ...) 1-3 to change submode still
has priority.

When in posemode or greasepencil draw mode however, 1-9 can still be
used to temporarily get some collections out of the way.
2019-02-22 12:33:24 -03:00
7372058649 Wireframe: Add object and random coloring option in wireframe mode
The option is separated from the solid mode color option.

Random color uses the same method as solid mode.

Selection state is indicated by a brighter color that is outside the
brightness range of the unselected state colors. The active state is
indicated by the outlines that is, now, still drawn in wireframe mode.

Coloring of the selection / active outline is not optimal because it
can look ugly in some cases of color combination. But the outline color
is using index range coloring so it's not trivial to change the color of
the outline per object. For now we use the same outline color used in solid
mode for consistency and also still add an emphasis on the selected objects.

The Single color option uses the theme color. Maybe it would be nice to
change the name of it in a latter commit to avoid confusion.
2019-02-22 16:06:23 +01:00
Dalai Felinto
e278b38b92 Fix T61788: Hidden objects reappear after rendering
The change in outliner and viewport visibility (897e047374) was made
assuming the bases of the render and viewport depsgraph were
independent. Thus we were deliberately setting base visibility when
rendering:

```
/* When rendering, visibility is controlled by the enable/disable option. */
if (mode == DAG_EVAL_RENDER) {
    base->flag |= BASE_VISIBLE;
}
```

However, we were syncing data back to the original depsgraph, leading to
hidden viewport objects to re-appear.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4391
2019-02-22 11:53:59 -03:00
ce79d86c08 Merge branch 'blender2.7' 2019-02-22 15:53:44 +01:00
3b86c99260 Fix previous commit
Somehow quote got missing the last moment.
2019-02-22 15:53:22 +01:00
86dd9bf53d Merge branch 'blender2.7' 2019-02-22 15:50:36 +01:00
427f3978e1 Always show version when running in background mode
The goal is to make it easy to know which exact blender version
and built was used for a job on a farm. This includes but not
exclusively render farms. But same is handy for simulation tasks
as well.
2019-02-22 15:47:54 +01:00
Dalai Felinto
bef82f72d2 Fix T61600: Physics properties inactive when appending objects
This problem existed in 2.79 as well. The rigid body setting is related
to the scene the object was created.

We now clear all the rigid body properties of the appended objects to
prevent them from lingering in this state where they have settings yet
cannot be used in the simulation.

Reviewers: mont29, brecht

Differential Revision: https://developer.blender.org/D4380
2019-02-22 11:20:27 -03:00
2278763681 Multires: Don't force smooth shading
There is still work needed to be done from multires side to fully
support smooth shading. So can't just always have smooth shading.

Roll back to a proper code in GPU side, the rest will be handled
from CCG side.
2019-02-22 14:45:32 +01:00
947d78b00b Multires: Fix ownership problem causing crashes
Fixes crash when leaving multires mode.

Fixes T61836: Saving while in multires makes blender crash
2019-02-22 13:35:07 +01:00
68aea23c27 Revert "makesrna: Fix build error on windows."
This reverts commit 8b235dd2e3.
2019-02-22 19:45:25 +11:00
b6f8afc13a C logging: make pthread use optional
There is no need for threading for makesrna/makesdna,
disable it to avoid hassles linking build time utilities.
2019-02-22 19:45:22 +11:00
4da53fc3e3 Cleanup: function wrapping, spelling 2019-02-22 18:37:19 +11:00
6bca694bef Comments: add doxy sections to readfile.c
Some minor changes to arrange code into useful sections too.
2019-02-22 18:23:52 +11:00
7bfb6c242b readfile: support blend files over 2gb
Should work for 4gb+ files too however I wasn't able to test that.
2019-02-22 16:56:22 +11:00
358e07f447 readfile: reduce memory usage at load time
Delay loading all DATA sections of the blend file until they're needed.

Loading all data-blocks caused high peak memory usage especially with
libraries - since a lot of data may exist which isn't used directly.

In one test (spring project: 10_010_A.anim.blend),
peaked at ~12.5gig, dropping back to ~2.5gig once loaded.
With this change peaks memory usage reaches ~2.7gig while loading.

Besides this there are some minor gains from not having to read data
from the file-system and we can skip an alloc + memcpy reading data
written with the same version of Blender.
2019-02-22 14:55:18 +11:00
f3e9dff03d Cleanup: rename seek to file_offset
Prepare for seek callback to be added.
2019-02-22 14:05:03 +11:00
1381a4a948 Sculpt Overlay: Fix mask drawn as flat shaded when smooth shading enabled
Removes the flat shader variant since the attrib is specified for each vert
loop in flat shaded mode. It was something leftover from the previous
implementation.
2019-02-22 04:03:59 +01:00
e35b7e7326 GPUBuffers: Fix/cleanup multires implementation
The multires sculpt drawing was a not working in smooth mode.
Also hidding was not supported by the wireframe overlay and flat shaded
faces.

Codewise it is cleaner and index buffers are only updated if the
smoothing changes.
2019-02-22 04:03:59 +01:00
bfbf3b9558 Cleanup: make BHeadN private in readfile.c
Also add macro for accessing BHeadN from BHead.
2019-02-22 13:47:04 +11:00
9541ce2c26 Missed last commit
Harmless but not renamed as intended.
2019-02-22 10:40:51 +11:00
536c3b6578 Cleanup: rename readfile API functions
- blo_bhead_first (was blo_firstbhead)
- blo_bhead_next (was blo_nextbhead)
- blo_bhead_prev (was blo_prevbhead)
- blo_bhead_id_name (was bhead_id_name)
- blo_filedata_free (was blo_freefiledata)
- blo_filedata_from_file (was blo_openblenderfile)
- blo_filedata_from_memory (was blo_openblendermemory)
- blo_filedata_from_memfile (was blo_openblendermemory)
2019-02-22 10:31:17 +11:00
98306c31bd Missed last commit 2019-02-22 09:34:00 +11:00
b2906c2a4a Cleanup: comments, use bool for 'eof' variable
Also remove unused members headerdone, inbuffer & filedes,
use typed enum for file data flags.
2019-02-22 09:29:59 +11:00
d00f54e574 Transform: redo resize now constrains axis values
Before 1bfbfa2810 this wasn't essential because the constraints
prevented the axes from being applied.

Now redo ignores constraints - the input values must be constrained.
2019-02-22 08:52:33 +11:00
4d4ae491c8 makesrna: Remove usage of dynamically linked pthreads4w
With pthreads now being static, there is no more reason to copy the dll.
2019-02-21 14:21:31 -07:00
8ed6985017 Windows: Use static pthreads library. 2019-02-21 14:19:15 -07:00
5d5070dd12 Windows: Use static pthreads library. 2019-02-21 14:16:26 -07:00
Mikhail Rachinskiy
4dd575e5ab UI: enum property menus now expand down, consistent with other menus.
Differential Revision: https://developer.blender.org/D4359
2019-02-21 18:20:05 +01:00
d6b5ee99fe Merge branch 'blender2.7' 2019-02-21 18:04:02 +01:00
Harley Acheson
1de1cedf4c UI: better widget drawing with thick line width.
When the line width was larger than the UI scale, there was not enough
space for thicker widget outlines to draw properly. Now widgets are made
a little larger to accommodate the thicker outlines.

Differential Revision: https://developer.blender.org/D4368
2019-02-21 18:03:34 +01:00
Harley Acheson
86bbadaaee UI: improve corner splitting feedback by showing custom cursors.
* Two cursors for horizontal and vertical split.
* Four cursors for each join direction.
* One cursor to indicate when splitting is not possible.

Differential Revision: https://developer.blender.org/D4264
2019-02-21 18:03:34 +01:00
Harley Acheson
a1e531ebbd UI: increase corner splitting hit area to include screen edges.
Differential Revision: https://developer.blender.org/D4242
2019-02-21 18:03:34 +01:00
1999651da5 makesrna: Fix windows build.
makesrna requires the pthread dll to be available before it can run.
2019-02-21 10:02:54 -07:00
fc55861efa Fix T60646: From instancer texture coordinate doesn't work in viewport
Made it so that generated coordinate is always calculated.

Ideally, it will only be done depending on a current  shading,
but code is quite deep, and doing smarter thing here will end
up in way bigger refactor.

First, make things working, and then make them fast if they
pop up in a profiles.
2019-02-21 17:25:34 +01:00
f1304c973f Fix T61810: Cycles OpenCL denoising broken after recent changes. 2019-02-21 16:47:04 +01:00
6e53fdc18f Cycles OpenCL: Motion Blur Compile Directives
When using preview rendering through a camera or final rendering
the `scene.render.use_motion_blur` was not respected when building
the compile directives.

This patch will when building the compile directives check if
motion blur is enabled at all. This should lead to more efficient
kernels when no motion blur is needed.

Tags: #cycles

Differential Revision: https://developer.blender.org/D4387
2019-02-21 16:33:29 +01:00
9e1f3421bb Fix for Fix (c) T61787: Duplicating a collection instance does not duplicate the dupli_group.
Wrong logic in bitflags handling in own previous commit...
2019-02-21 16:14:34 +01:00
63fd2c99e8 Fix (unreported) Broken DataTransfer modifier when source object is in Edit mode.
Just use common API func to get evaluated mesh of other object in
modifiers, instead of doing our own cooking. ;)
2019-02-21 15:48:29 +01:00
0625a10efb Fix T61787: Duplicating a collection instance does not duplicate the dupli_group.
Transfomr init code called just after duplication (presumably before
regular depsgraph update is executed) would erase new objects'
transflags.

This is more like a hack than a real fix, but since that transform piece
of code is already a hack... Other solution would have been to force DEG
to run after object duplication, think it's better to go with that
solution for now.

Not to mention to fact that dupli flags are put into transflag... ;)
2019-02-21 15:40:17 +01:00
3b88e30181 Cleanup: typos in comments. 2019-02-21 15:40:17 +01:00
fab573bac0 Fix T59338: Blender crashes immediately after loading attached file in ~80% of my attempts.
Issue was a concurrent modification of an evaluated mesh by two
other meshes using it as source for custom normals data transfer.

Note that this fixes the crash (modifiers are strictly forbidden to modify
any data besides their own!), but now will have to add a new CD type to
be able to specifically request 'computed' clnors data layer, and not
only 'encoded' one, for source mesh...
2019-02-21 15:40:17 +01:00
8986c92b65 Merge branch 'blender2.7' 2019-02-21 15:33:07 +01:00
1d38a83139 Fix T61802: EXR preview JPEGs don't have the correct color
Missing color management, probably from the very beginnings of
the OCIO integration.
2019-02-21 15:29:02 +01:00
d518438479 Subdiv: Enable topology cache for animation
This commit makes it so both Subdivision Surface and Multiresolution
modifiers are caching OpenSubdiv topology. This cuts down evaluation
time quite a bit, especially for meshes which don't have many extra
ordinary verticies.

Only working for animation. Other modifications like edit mode needs
more work to make topology cache preserved by copy-on-write.
2019-02-21 15:25:02 +01:00
a51d08f473 Fix: Missing closing brackets in include 2019-02-21 14:36:51 +01:00
John Quillan
fdee84fd56 Fix T61733: wrong alpha for sequencer screen, multiply, .. blend modes.
It was copying the alpha from the foreground instead of background image,
which is not usually what is needed and inconsistent with the compositor.

Differential Revision: https://developer.blender.org/D4371
2019-02-21 13:29:13 +01:00
4f0b61f15b Fix T61791: Motion path step is not taken into account 2019-02-21 13:28:53 +01:00
d542c6a5f3 Fix T61786: local view not exiting correctly after recent changes. 2019-02-21 12:08:01 +01:00
1bfbfa2810 Transform: remove constraints from the redo panel
Constraint options had confusing behavior:

- When non were pressed, the orientation was ignored.
- When any were pressed, the orientation was used,
  but only unconstrained axed could be adjusted.

Now constraining is only used for modal execution
so there is no need to show these in the interface.

When an orientation is selected, the XYZ values always transform
using that space.

Note, transform system should be refactored to support different
orientations w/o having to use constraints.

Addresses T57204
2019-02-21 21:59:15 +11:00
510810c72d Cleanup: Line wrapping 2019-02-21 11:08:33 +01:00
7412f30930 Clip: Check memory allocation during prefetch
Aimed to make prefetching more stable for cases when
it causes Blender to run out of memory.
2019-02-21 10:52:03 +01:00
6e9dca2214 Codestyle: Indentation 2019-02-21 08:52:04 +01:00
fab6c5040d Fix: OpenCL Displacement and light sampling
The bake kernels are also used during mesh displacement and light
importance sampling. We disabled the implementation of these kernels
when baking was not enabled.
2019-02-21 08:11:02 +01:00
f4d9e49f28 Fix redo regression w/ transform constraints
Adjusting a constrained transform would always use global space.
2019-02-21 17:52:13 +11:00
941c03e2bf Fix transform reading all ob-data as a mesh 2019-02-21 17:27:57 +11:00
9b20127355 Tool: Use scale keymap for scale cage tool
Needed so clicking anywhere performs uniform scale.
2019-02-21 16:42:59 +11:00
3feeafac28 Theme: update blender-light theme clipping border
Color was too dark compared to the background color.
2019-02-21 16:10:51 +11:00
8b235dd2e3 makesrna: Fix build error on windows.
rB94f83a4ebd929e7c4f405b1c78d9db842dfe1689 introduced a dependency on pthreads
but did not add it to the linker inputs.
2019-02-20 21:56:11 -07:00
e644da1f8e Keymap: add context menus for paint modes
These are place-holders with only a few items in each, as with the rest
of the context menus they need to be populated & organized.

Weight Paint 'weight' shortcut has been changed from W to Ctrl-F,
to co-exist w/ the context menu shortcut.
2019-02-21 15:43:39 +11:00
a0881a4e94 Fix assert w/ multi-dimensional array printing
Own oversight adding assert, result from MEM_allocN_len may be padded.
2019-02-21 14:49:27 +11:00
c0659c83a9 Keymap: Ctrl-Home/End to set start/end frame
New shortcuts for the dope-sheet.
2019-02-21 14:38:22 +11:00
3d5585fac4 Fix T61563: Info space prints matrices as flat tuple
Add support for printing multi-dimensional arrays.
2019-02-21 12:42:29 +11:00
94f83a4ebd Fix T61765: thread-unsafe logging used 2019-02-21 11:33:50 +11:00
9e4d561a8b Merge branch 'blender2.7' 2019-02-20 23:20:43 +01:00
ccd291aafb Cycles: Fix uninitialized number of hits
Was happening when looking for all intersections for transparent shadow rays
in the case the ray is degenerate.

Still quesitonable whether we should consider this a transparent or opaque
configuraiton. Ideally, we should prevent such rays from happening, but that
is another vector of debugging.
2019-02-20 23:20:07 +01:00
1303bd57f5 Units: Use units for smoke
-Use factor for flame_vorticity, slice_depth, density & volume_density
-Use distance for surface_distance
-Use factor for mix factor in Data Transfer modifier
-Use prop_translation for pivot constraint offset
2019-02-20 21:50:27 +01:00
1af810b4ff Units: Use correct units for transform operators
-Use distance for Shrink/Fatten Distance
-Use factor for Smooth Factor
-Use Factor for Randomize Uniform and Normal values
-Use Distance for Randomize distance amount
-Randomize Transform Scale was wrongly using distance
2019-02-20 21:10:32 +01:00
e2cefc7dad fix T61122 : Collada exporter exported alpha value (always 0) from deprecated material attribute 2019-02-20 20:47:08 +01:00
4ec6b16b4e cycles/opencl: Fix compile error.
added missing quote, introduced in rB15edda3a8e07003bef695cca939744bbea80ad18
2019-02-20 11:44:06 -07:00
9a9336cb45 Merge branch 'blender2.7' 2019-02-20 19:07:25 +01:00
5df82b60d1 Local view: add operator property to disable framing selected objects.
Default behavior is unchanged still, but can be changed in the keymap.
From testing I think this needs better visual feedback to indicate that
you are in local view, if the view does not move it's not as clear.
2019-02-20 19:06:18 +01:00
c4f961a54c Local view: don't restore selection when exiting local view.
Losing the selection can be inconvenient, and it's easy to select all local
objects before exiting local view if needed.
2019-02-20 19:06:18 +01:00
Pablo Vazquez
12a6059f8a UI: Use checkbox for shape keys 'mute'.
Muting functions as enable/disable toggle, it's not viewport-only.
2019-02-20 18:56:26 +01:00
3f65cad5ae Units: Use pixels for denoising radius property, and set Cycles motion blur duration to factor.
Also fix own mistake of using of spaces instead of tabs in RNA.
2019-02-20 18:02:26 +01:00
848f589fdf Tests: only run OpenGL draw tests on lib/tests/opengl, support symlinks.
To keep running these tests relatively fast and practical to run often,
running it on all .blend files is a bit much. So now we only run it on
files from this directory.

Additionally this adds supports for following symlinks, so that you can
easily symlinks to other directories if you want to tests extra files
which may have linked libraries.
2019-02-20 17:13:33 +01:00
fda79dbd79 Cleanup: fix compiler warning. 2019-02-20 16:39:12 +01:00
27c72e22aa Cleanup: fix some versioning code running when not needed. 2019-02-20 16:22:23 +01:00
ee7c9790a2 Fix crash when rendering and drawing curves at the same time
Need to stop modifying original DNA data, this is not safe
for threading and easily avoidable.
2019-02-20 16:09:52 +01:00
7ed5e9f2f7 UI: Make Shutter Speed properties consistent in Eevee & Cycles.
-Use PROP_FACTOR for both (It is a factor of the total frame length)
-Set soft max to 1 and hard max to 2 for both.
2019-02-20 16:04:56 +01:00
32314e2d4e UI: Change name of Sequencer option from 'Draw Waveform' to 'Display Waveform' to fit the naming conventions described in T56648. 2019-02-20 15:28:10 +01:00
8a4cdda373 Merge branch 'blender2.7' 2019-02-20 15:22:23 +01:00
949ab753bb Cycles OpenCL: Remove OpenCL MegaKernel
Using OpenCL MegaKernel has been slow and therefore not usefull.
This patch will remove the mega kernel from the OpenCL codebase
and the OpenCLDeviceBase class.

T61736: removal of mega kernel
T61703: baking does not work with mega kernel

Tags: #cycles

Differential Revision: https://developer.blender.org/D4383
2019-02-20 15:17:22 +01:00
9315cc443b Cycles: Fix wrong vertex color and UV for hair
Was introduced by rB03013c23179 and caused by missing
occasions of when hair strands are zero length.
2019-02-20 14:47:46 +01:00
ffd66ce7d5 Subdiv: Fix function naming
Not sure where displacement came from into there, maybe
file was based on displacement evaluator.
2019-02-20 14:38:24 +01:00
a1bd25af72 Node headers should not respect theme alpha values
As pointed out in https://developer.blender.org/rB558d7dd90e56ca1b4dbf1b7b8b7b555791821148,
the theme color alpha should not be taken into account when rendering node headers.

Reviewed By: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D4338
2019-02-20 14:37:30 +01:00
b285f92d80 Fix File > Save not showing red highlight when saving over existing files.
Don't disable the save over popup through the keymap, just remove it entirely
from the code so that the file browser interprets the property correctly.
2019-02-20 14:04:12 +01:00
cfbcd7f0da Fix missing dependency upgrade when changing image to/from sequence.
Since animation is now handled by the dependency graph.
2019-02-20 13:53:32 +01:00
c985c60bdc Depsgraph: Fix relation when lamp has driver on custom property
Was once again caused by an ambiguity of the entry/exit operations.

Only did for objects since those are the only one who needs this.
The rest types of IDs needs to be checked and only added extra
operations if needed (adding operations and relations causes some
overhead for evaluation, so need to be careful).
2019-02-20 11:48:42 +01:00
e6bdc950d2 Fix T61689: Crash when having image and regular animation
Was caused by ambiguity in entry/exit operation for animation channel.
Made those explicit now,
2019-02-20 11:32:22 +01:00
c57f1f3d27 Depsgraph: Simplify creation of animation nodes 2019-02-20 11:18:38 +01:00
db5db0bfc2 Cleanup: Indentation and wrapping 2019-02-20 11:15:19 +01:00
f62371e6ea Measure Tool: delete now removes protractor when it's active 2019-02-20 17:16:22 +11:00
4d085c9bae Measure Tool: use x/del key to remove the active ruler
Dragging outside the view was only meant to be a temporary workaround.
2019-02-20 16:44:54 +11:00
7ee9fe4991 Cleanup: rename keymap handler callbacks for clarity
Now there are two callbacks, the name 'keymap_callback' is too vague.
2019-02-20 15:43:35 +11:00
effe750ec1 WM: support dynamic keymap handlers
Add getter callback support for 'WM_HANDLER_TYPE_KEYMAP' type handlers
this is needed for key-maps which change based on the active tool.

Replaces 'sneaky_handler' hack which temporarily inserted a handler.
2019-02-20 14:37:15 +11:00
855b3e68ef RNA: use factor when appropriate
- Many factor properties were set to PROP_NONE,
  even properties that had 'Factor' in the name!

- Some time properties were not set to PROP_TIME,
  especially in Particles.

- Changed motion_blur_shutter to use a soft max value of 1 instead of 2.
  Anything > 1 here is not physically correct
  and makes no real logical sense.

- Changed display name of Dynamic Paint dissolve_speed to Dissolve Time,
  since it's a time property, not speed.
2019-02-20 10:18:24 +11:00
079099e8db Cleanup: rename generic handler -> handler_base
Avoids having type specific handler names.
2019-02-20 10:05:40 +11:00
4d83507f39 Cleanup: simplify handler type conditional
Each handler type now has it's own block (fileselect was an exception).
2019-02-20 09:57:38 +11:00
63d77d6d27 Cleanup: rename wmEventHandler_* base -> head
Makes it more clear it's the header/start of the struct.
2019-02-20 09:43:29 +11:00
e53676a5c7 Cleanup: use iterator macros for event handlers 2019-02-20 09:38:33 +11:00
c1c01f062e BLI_listbase: add an iterator macro that supports removal
Avoids manually defining 'for' loops that store the next item in the
linked list.
2019-02-20 09:38:33 +11:00
Dalai Felinto
0e7409d466 EEVEE Shader comments: Explain why material gets darkened when using mix shader
We are still ditching the specular intensity of SSR (ssr_data.xyz).
But at least now there is some comment about it.

See T61704 for user reports on that matter.

Comments with the blessing of Clément Foucault.
2019-02-19 18:51:14 -03:00
a10dc319ca Comment: clarify reason for using scale as size 2019-02-20 08:27:15 +11:00
39afc2775f Cleanup: style 2019-02-20 08:27:01 +11:00
Dalai Felinto
6c0cbfcd53 Fix T61696: Filepath buttons not accepting empty values
The reported case was with the render output filename,
however the same was happening for file open.

Bug introduced on c20c203b82.
I can't find in the original commit any reasoning for the change
that introduced this bug.
2019-02-19 17:24:10 -03:00
e2a90b8045 Merge branch 'blender2.7' 2019-02-19 19:00:46 +01:00
2be29999bd Fix T61701: Orthographic Viewpoints Hidden Grid
If all axis and grid options were turned off, the grid in the main ortho views would not be rendered.
Now we force rendering of the grid regardless of the settings when in one of the main ortho views.

Reviewed By: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D4378
2019-02-19 18:53:15 +01:00
81aa2a93e9 Fix T61274: duplicate current workspace makes the workspace menu disappear.
Differential Revision: https://developer.blender.org/D4321
2019-02-19 18:43:32 +01:00
df8bd07313 fix: Collada replace <polylist> export by <triangle> export for triangulated meshes.
This is a regression from Blender 2.79 where the usage
of <triangles> was already implemented, but unintentionally
removed in Blender 2.80

Also renamed variables for better reading.
2019-02-19 17:49:54 +01:00
667033e89e T61463: Separate Baking kernels
Cycles OpenCL: Split baking kernels in own program

Fix T61463. Before this patch baking was part of the base kernels. There
are 3 baking kernels that and all 3 uses shader evaluation. Only for one
of these kernels the functionality was wrapped in the __NO_BAKING__
compile directive.

When you start baking this leads to long compile times. By separating
in individual programs will reduce the compile times.

Also wrapped all baking kernels with __NO_BAKING__ to reduce the
compilation times.

Impact on compilation time

    job   |   scene_name    | previous |  new  | percentage
  --------+-----------------+----------+-------+------------
   T61463 | empty           |    10.63 |  7.27 |         32%
   T61463 | bmw             |    17.91 | 14.24 |         20%
   T61463 | fishycat        |    19.57 | 15.08 |         23%
   T61463 | barbershop      |    54.10 | 48.18 |         11%
   T61463 | classroom       |    17.55 | 14.42 |         18%
   T61463 | koro            |    18.92 | 17.15 |          9%
   T61463 | pavillion       |    17.43 | 14.23 |         18%
   T61463 | splash279       |    16.48 | 15.33 |          7%
   T61463 | volume_emission |    36.22 | 34.19 |          6%

Impact on render time

    job   |   scene_name    | previous |   new   | percentage
  --------+-----------------+----------+---------+------------
   T61463 | empty           |    21.06 |   20.54 |          2%
   T61463 | bmw             |   198.44 |  189.59 |          4%
   T61463 | fishycat        |   394.20 |  388.50 |          1%
   T61463 | barbershop      |  1188.16 | 1185.49 |          0%
   T61463 | classroom       |   341.08 |  339.27 |          1%
   T61463 | koro            |   472.43 |  360.70 |         24%
   T61463 | pavillion       |   905.77 |  902.14 |          0%
   T61463 | splash279       |    55.26 |   54.92 |          1%
   T61463 | volume_emission |    62.59 |   39.09 |         38%

I don't have a grounded explanation why koro and volume_emission is this much
faster; I have done several tests though...

Maniphest Tasks: T61463

Differential Revision: https://developer.blender.org/D4376
2019-02-19 16:34:55 +01:00
15edda3a8e T61463: Separate Baking kernels
Cycles OpenCL: Split baking kernels in own program

Fix T61463. Before this patch baking was part of the base kernels. There
are 3 baking kernels that and all 3 uses shader evaluation. Only for one
of these kernels the functionality was wrapped in the __NO_BAKING__
compile directive.

When you start baking this leads to long compile times. By separating
in individual programs will reduce the compile times.

Also wrapped all baking kernels with __NO_BAKING__ to reduce the
compilation times.

Impact on compilation time

    job   |   scene_name    | previous |  new  | percentage
  --------+-----------------+----------+-------+------------
   T61463 | empty           |    10.63 |  7.27 |         32%
   T61463 | bmw             |    17.91 | 14.24 |         20%
   T61463 | fishycat        |    19.57 | 15.08 |         23%
   T61463 | barbershop      |    54.10 | 48.18 |         11%
   T61463 | classroom       |    17.55 | 14.42 |         18%
   T61463 | koro            |    18.92 | 17.15 |          9%
   T61463 | pavillion       |    17.43 | 14.23 |         18%
   T61463 | splash279       |    16.48 | 15.33 |          7%
   T61463 | volume_emission |    36.22 | 34.19 |          6%

Impact on render time

    job   |   scene_name    | previous |   new   | percentage
  --------+-----------------+----------+---------+------------
   T61463 | empty           |    21.06 |   20.54 |          2%
   T61463 | bmw             |   198.44 |  189.59 |          4%
   T61463 | fishycat        |   394.20 |  388.50 |          1%
   T61463 | barbershop      |  1188.16 | 1185.49 |          0%
   T61463 | classroom       |   341.08 |  339.27 |          1%
   T61463 | koro            |   472.43 |  360.70 |         24%
   T61463 | pavillion       |   905.77 |  902.14 |          0%
   T61463 | splash279       |    55.26 |   54.92 |          1%
   T61463 | volume_emission |    62.59 |   39.09 |         38%

I don't have a grounded explanation why koro and volume_emission is this much
faster; I have done several tests though...

Maniphest Tasks: T61463

Differential Revision: https://developer.blender.org/D4376
2019-02-19 16:33:50 +01:00
e6f5632eb1 T61513: Refactored Cycles Attribute Retrieval
There is a generic function to retrieve float and float3 attributes
`primitive_attribute_float` and primitive_attribute_float3`. Inside
these functions an prioritised if-else construction checked where
the attribute is stored and then retrieved from that location.

Actually the calling function most of the time already knows where
the data is stored. So we could simplify this by splitting these
functions and remove the check logic.

This patch splits the `primitive_attribute_float?` functions into
`primitive_surface_attribute_float?` and `primitive_volume_attribute_float?`.
What leads to less branching and more optimum kernels.

The original function is still being used by OSL and `svm_node_attr`.

This will reduce the compilation time and render time for kernels.
Especially in production scenes there is a lot of benefit.

Impact in compilation times

    job  |   scene_name    | previous |  new  | percentage
  -------+-----------------+----------+-------+------------
  t61513 | empty           |    10.63 | 10.66 |          0%
  t61513 | bmw             |    17.91 | 17.65 |          1%
  t61513 | fishycat        |    19.57 | 17.68 |         10%
  t61513 | barbershop      |    54.10 | 24.41 |         55%
  t61513 | classroom       |    17.55 | 16.29 |          7%
  t61513 | koro            |    18.92 | 18.05 |          5%
  t61513 | pavillion       |    17.43 | 16.52 |          5%
  t61513 | splash279       |    16.48 | 14.91 |         10%
  t61513 | volume_emission |    36.22 | 21.60 |         40%

Impact in render times

    job  |   scene_name    | previous |  new   | percentage
  -------+-----------------+----------+--------+------------
  61513 | empty           |    21.06 |  20.35 |          3%
  61513 | bmw             |   198.44 | 190.05 |          4%
  61513 | fishycat        |   394.20 | 401.25 |         -2%
  61513 | barbershop      |  1188.16 | 912.39 |         23%
  61513 | classroom       |   341.08 | 340.38 |          0%
  61513 | koro            |   472.43 | 471.80 |          0%
  61513 | pavillion       |   905.77 | 899.80 |          1%
  61513 | splash279       |    55.26 |  54.86 |          1%
  61513 | volume_emission |    62.59 |  61.70 |          1%

There is also a possitive impact when using CPU and CUDA, but they are small.

I didn't split the hair logic from the surface logic due to:

* Hair and surface use same attribute types. It was not clear if it could be
  splitted when looking at the code only.
* Hair and surface are quick to compile and to read. So the benefit is quite
  small.

Differential Revision: https://developer.blender.org/D4375
2019-02-19 16:28:25 +01:00
d6d306441f T61513: Refactored Cycles Attribute Retrieval
There is a generic function to retrieve float and float3 attributes
`primitive_attribute_float` and primitive_attribute_float3`. Inside
these functions an prioritised if-else construction checked where
the attribute is stored and then retrieved from that location.

Actually the calling function most of the time already knows where
the data is stored. So we could simplify this by splitting these
functions and remove the check logic.

This patch splits the `primitive_attribute_float?` functions into
`primitive_surface_attribute_float?` and `primitive_volume_attribute_float?`.
What leads to less branching and more optimum kernels.

The original function is still being used by OSL and `svm_node_attr`.

This will reduce the compilation time and render time for kernels.
Especially in production scenes there is a lot of benefit.

Impact in compilation times

    job  |   scene_name    | previous |  new  | percentage
  -------+-----------------+----------+-------+------------
  t61513 | empty           |    10.63 | 10.66 |          0%
  t61513 | bmw             |    17.91 | 17.65 |          1%
  t61513 | fishycat        |    19.57 | 17.68 |         10%
  t61513 | barbershop      |    54.10 | 24.41 |         55%
  t61513 | classroom       |    17.55 | 16.29 |          7%
  t61513 | koro            |    18.92 | 18.05 |          5%
  t61513 | pavillion       |    17.43 | 16.52 |          5%
  t61513 | splash279       |    16.48 | 14.91 |         10%
  t61513 | volume_emission |    36.22 | 21.60 |         40%

Impact in render times

    job  |   scene_name    | previous |  new   | percentage
  -------+-----------------+----------+--------+------------
  61513 | empty           |    21.06 |  20.35 |          3%
  61513 | bmw             |   198.44 | 190.05 |          4%
  61513 | fishycat        |   394.20 | 401.25 |         -2%
  61513 | barbershop      |  1188.16 | 912.39 |         23%
  61513 | classroom       |   341.08 | 340.38 |          0%
  61513 | koro            |   472.43 | 471.80 |          0%
  61513 | pavillion       |   905.77 | 899.80 |          1%
  61513 | splash279       |    55.26 |  54.86 |          1%
  61513 | volume_emission |    62.59 |  61.70 |          1%

There is also a possitive impact when using CPU and CUDA, but they are small.

I didn't split the hair logic from the surface logic due to:

* Hair and surface use same attribute types. It was not clear if it could be
  splitted when looking at the code only.
* Hair and surface are quick to compile and to read. So the benefit is quite
  small.

Differential Revision: https://developer.blender.org/D4375
2019-02-19 16:25:48 +01:00
c598ad9ac6 FCurves: Remember active fcurve when selecting other bone
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4312
2019-02-19 15:59:09 +01:00
13f28798de Fix T57583: Assert when moving object parented to curve vertex
Can not reliably evaluate object's transform from the original one.

Still not ideal, see the comment in the code.
2019-02-19 15:56:00 +01:00
7c53bca1dd Fix T61702: obmat used incorrectly when calculating constant detail size
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4372
2019-02-19 15:52:49 +01:00
655eb8eabd Fix T61690: Hidden curve vertices are drawn in edit-mode
When hiding the curve handles/points previously, the control points would still be drawn (loose verts).
Now we hide everything related to the handle if it is hidden.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D4373
2019-02-19 15:45:40 +01:00
38f0d5f75a Fix T61714, T61712: crash reloading images after recent changes.
Now that we are looping over all image users that were previously ignored,
it shows some scene pointers are invalid. Always clear them on load, and
don't keep scene permanently in the image user except for the image editor.
Otherwise the pointer can go out of date.
2019-02-19 15:40:04 +01:00
Vaishnav S
22eeae8104 Units: Fix some property subtypes
This commit only contains some of the changes in the diff.
Some require more discussion/work.

Differential Revision: https://developer.blender.org/D4337
2019-02-19 15:23:46 +01:00
cba447966e Fix T61683: Linking the instance of a collection crashes Blender.
Do not instance linked object immediately in scene, this was never a
good idea and is doomed to fail nowadays, with complex relations between
objects, collections and scenes.

Instead, this commit refactors a bit linking code to add loose objects
to current scene *after* everything has been imported, and ID pointers
have been properly remapped to new ones - i.e. once new linked data is
supposed to be fully valid, just like we were already doing with
collections.

As a bonus, it means we do not have to pass around scene, view3d etc. to
`BLO_library_link_named_part_ex()` and co.
2019-02-19 13:49:54 +01:00
8138eb0dfe Fix Cycles OpenCL multithreaded compilation not working on Windows. 2019-02-19 13:48:56 +01:00
4df8896062 Playanim: Fix heap use after free on exit
Was caused by the wrong de-initialization order, here is
an ASAN log just in case P916.
2019-02-19 13:08:22 +01:00
bab2d2ba43 Fix T61594: Frame playback is blank
Viewport and scissor were never initialized prior to
window move/resize.
2019-02-19 13:01:36 +01:00
a8bbe140fd Cleanup: remove needless comment ;) 2019-02-19 10:23:23 +01:00
84a5abdb31 Merge branch 'blender2.7' 2019-02-19 08:05:15 +01:00
ecd66f69e7 Revert "Cycles: Change OpenCL split kernel to use single program by default"
This reverts commit c6bf5d4724.

Related to D2264: When multi process opencl kernel compilation is in place single-program compiles slower then multi-program. c6bf5d4724 was created as single-program compiled faster, but this is not the case anymore. So let's revert this change. Production scenes like victor and barbershop even render quicker.

Change in Cycles OpenCL compilation times

>    job    |   scene_name    | compilation_time | render_time
>  Baseline | empty           |            22.73 |       20.63
>  T61514   | empty           |            10.63 |       21.06
>  Baseline | bmw             |            56.44 |      191.00
>  T61514   | bmw             |            17.91 |      198.44
>  Baseline | fishycat        |            59.50 |      393.48
>  T61514   | fishycat        |            19.57 |      394.20
>  Baseline | barbershop      |           212.28 |     1623.53
>  T61514   | barbershop      |            54.10 |     1188.16
>  Baseline | victor          |            67.51 |     1459.80
>  T61514   | victor          |            22.06 |     1381.58
>  Baseline | classroom       |            51.46 |      341.23
>  T61514   | classroom       |            17.55 |      341.08
>  Baseline | koro            |            62.48 |      475.96
>  T61514   | koro            |            18.92 |      472.43
>  Baseline | pavillion       |            54.37 |      903.48
>  T61514   | pavillion       |            17.43 |      905.77
>  Baseline | splash279       |            47.43 |       52.92
>  T61514   | splash279       |            16.48 |       55.26
>  Baseline | volume_emission |           145.22 |       62.38
>  T61514   | volume_emission |            36.22 |       62.59

Reviewers: #cycles, brecht, sergey

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D4349
2019-02-19 07:48:51 +01:00
eb4acd5064 Cleanup: return specific handler types 2019-02-19 16:57:36 +11:00
e617e6395b Cleanup: remove unused default handler type 2019-02-19 16:18:58 +11:00
bb6692be8a WM: move keymap handler to it's own type
Illuminate dead code, using wmEventHandler_KeymapFn from gizmo handler
type where it was never set.
2019-02-19 16:18:23 +11:00
d718338828 WM: move dropbox handler to it's own type 2019-02-19 16:17:21 +11:00
f88ea20285 WM: move operator handler to it's own type 2019-02-19 16:17:21 +11:00
eae2942474 WM: move UI handler to it's own type 2019-02-19 16:17:21 +11:00
55ac296358 WM: move gizmo handler to it's own type 2019-02-19 16:17:21 +11:00
0767b63f1b WM: move wmEventHandler.type to a boolean
Currently it's effectively a boolean for file-select handlers.

Prepare for refactoring event handlers into their own types (keymap,
operator, gizmo, ui & dropbox) to help make logic easier to follow.
2019-02-19 16:14:51 +11:00
790cb7799d Cleanup: rename parent_origin_eval to parent_display_origin
The term 'eval' is often used by depsgraph result,
where this is just used for drawing.
2019-02-19 11:38:25 +11:00
ec57d76db8 Fix edit-curve display for hidden handles
When the first handle was hidden, all others would show as hidden too.
2019-02-19 10:04:15 +11:00
53e95a982c Cleanup: remove unused Object.smoothresh 2019-02-19 09:50:00 +11:00
53b484d081 DNA: rename select_color -> select_id
The term color is misleading, it's an integer id that happens to be
written to a color in some cases, then converted back to an integer.
2019-02-19 09:45:48 +11:00
fc10e89918 DNA: rename Object.col -> color
Was confusing, unrelated to:
colbits, col_mask, col_group, actcol & totcol.
2019-02-19 08:48:15 +11:00
ecdd1864d1 Fix (unreported) broken-by-design code in depsgraph's deg_backup_object_runtime()
Committing this since it does fix broken logic (previously in that
condition obdata would always be set to NULL, since
`BKE_object_runtime_reset()` is called before).

However, this has presumably been broken that way since 05/2018, so
maybe that whole condition is not needed anymore? Or NULL pointer was
working as well here?

@sergey eyes are required here I guess ;)
2019-02-18 18:21:44 +01:00
16a290bb6f Fix Object bbox memleak in depsgraph code.
Caused by rBae2b677dcb5a70f5, Object.runtime has lot of weird specific
handlings in depsgraph...

For now modified `deg_backup_object_runtime()` and
`deg_restore_object_runtime()` to mimic previous behavior regarding
Object bbox (i.e. pass it around, instead of wiping it clean).

Reported in T61660.
2019-02-18 18:15:00 +01:00
49c7b34547 Cleanup some Object's bbox code.
Now that bbox is in runtime, no need to explicitely clear it when we
call BKE_object_runtime_reset() two lines below.
2019-02-18 17:55:44 +01:00
aed631fa47 Fix (unreported) wrong handling of some parameters combination in bpy.data.user_map()
Would add undesired keys...
2019-02-18 17:16:33 +01:00
1414c4496c ID Management Py API: Fix (unreported) crash in some cases.
Would crash when passing some kind of invalid parameters, e.g.:

   >>>D.user_map(key_types={'brush'})
2019-02-18 17:16:33 +01:00
b8ec2c9559 ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
b36f78abf4 ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
4977321c5a ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
ff7165957f ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
0951778eba ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
00d2e9096f ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
4c2330bd53 BKE_main: FOREACH macros: fix shadowing 'i' variable. 2019-02-18 17:16:33 +01:00
614a0a47e5 BKE_main: make FOREACH new macros working when deleting some IDs. 2019-02-18 17:16:33 +01:00
28901820a4 Wireframe: Fix selection broken since recent wireframe refactor 2019-02-18 17:03:10 +01:00
f2a21472c4 Fix T61473: Crash particle system is updating
Original and localized particle settings were sharing some
of the runtime pointers.
2019-02-18 17:00:50 +01:00
0e3a2acbfa Fix T57457: animated image sequences not working in Eevee.
The dependency graph now handles updating image users to point to the current
frame, and tags images to be refreshed on the GPU. The image editor user is
still updated outside of the dependency graph.

We still do not support multiple image users using a different current frame
in the same image, same as 2.7. This may require adding a GPU image texture
cache to keep memory usage under control. Things like rendering an animation
while the viewport stays fixed at the current frame works though.
2019-02-18 16:52:01 +01:00
286c34b4ab Fix image filepath changes not refreshing all image users. 2019-02-18 16:38:17 +01:00
a6443b5d1e Fix BKE_image_walk_all_users not including all image users. 2019-02-18 16:38:17 +01:00
8f7ae20f79 Cleanup: rename tpageflag to gpuflag, make it purely runtime data. 2019-02-18 16:38:17 +01:00
c94b3b19a2 Fix T61373: Crash when selecting the edit mode
Some GPUs complain about `error C7011: implicit cast from "int" to "uint"` even if the cast is explicit.
2019-02-18 11:35:17 -03:00
abb147e609 Fix T61636: Drivers don't update on viewport using curves 2019-02-18 16:35:56 +01:00
582ae0c122 Fix crash toggling edit mode of curve with animation
The issue was caused by original f-curves being re-allocated
without informing dependency graph about this.

Was reported in T61636#622757
2019-02-18 16:29:04 +01:00
d02ad52b2d Depsgraph: Make node an owner of its name
The initial idea of using char pointer was to save some
memory since the dependency graph was kind of the one
with the main database.

Nowadays dependency graph should be separatable from the
main database and being self-sustainable.

Other issue which was caused by this pointer is the
re-tagging of operations during relations update: it is
possible to have node which as tagged for update but had
the owner of the name removed (i.e. driver or bone was
removed).
2019-02-18 16:24:51 +01:00
c3ceefb671 Cleanup: Remove unused field 2019-02-18 16:08:05 +01:00
11b8d8a838 DRW: Fix Crash when enabling object wireframe option 2019-02-18 16:02:27 +01:00
d62f8a3176 Overlay: Remove extra contour drawing in wireframe mode
This removes the overhead of rendering the object one more time.
2019-02-18 16:02:27 +01:00
5d58b7f073 Fix T61660: Wrong user counter on curves with shared material.
Patch by @sergey.

Note that this is really a bad thing actually, ideally we should never
get that situation (IDs in Main referencing temp IDs outside of it).
That can lead to many possible similar cases...

Fixing that is not trivial though, so for now we'll have to live with
it, until we have migrated *all* of our temp datablocks generation
outside of Main's.
2019-02-18 15:27:29 +01:00
2c12c9b61e ID management: forbid refcount of used IDs when user ID is outside of Main.
This is related to T61660, but actually does not fix that specific issue
(which is even worse - outside-of-Main ID using inside-of-Main IDs... yuck).
2019-02-18 15:27:29 +01:00
a0d0d37ecd Fix T61666: missing NULL_UNIT that stops iteration over units 2019-02-18 14:25:34 +01:00
03013c2317 Cycles: Keep all hair strands
Previously, hair strands of zero length of too few control
points would have been ignored. This is fine for a render
without motion blur. But once motion blur is enabled it is
becoming more tricky to match topology.

Even more, it was causing access (and possibly writes) past
the array boundaries in case when time step 0 ignored some
strands and steps around it did not.

If this is becoming problematic for BVH to do reliable
intersections this is to be solved on the BVH builder side.
The export from Blender to Cycles shouldn't really make
decisions there.
2019-02-18 15:25:10 +01:00
7b6da0ace7 Jpeg: Fix write past array boundary
Was happening when image buffer had cryptomatte pass, which can easily
exceed 530 bytes used by the buffer.

Now default buffer is bumped to 1K, and also allowed to be heap-allocated
when really need bigger buffer.

Possible optimization is to allocate buffer once, but in practice those
re-allocations will not happen often, so keeping code simpler is not an
issue. Just something for a rainy day.
2019-02-18 15:25:10 +01:00
4c3d486f69 Fix broken Cycles test build after recent commit.
Broken by rB4ce9785e0158, please do full complete build before
committing!
2019-02-18 15:00:17 +01:00
49c100e56c API doc: info_gotcha: extend description of issues related to memory changes.
* Added a TL;DR first paragraph summarizing that one shall not keep any
reference to Blender data when modifying its container.

* Added some info about fact that adding items to some data containers
(like Collection) can also invalidate existing items (due to array
re-allocation).

* Added a Do/Don't example which shows a crash after adding some items
to a collection.

Related to T61297.
2019-02-18 14:36:16 +01:00
9299073d57 Cleanup: API doc 'info_gotcha': typos. 2019-02-18 14:36:16 +01:00
e96445059f Add Abkhaz language to Blender (disabled for until we get some translated content). 2019-02-18 14:36:16 +01:00
68d8627104 Edit Mesh: Cleanup 2019-02-18 14:17:57 +01:00
9ab99ff26b Sculpt Draw: Add support for wireframe geometry
This introduce the wireframe batches. Creating the indices buffer does
not seems to slow down the sculpt in my testing (but it is kind of hard to
test reliably)

This includes a bit of cleanup in gpu_buffers.c.
2019-02-18 14:17:57 +01:00
2cccffd20b Wireframe: Add workaround for osx wide wires 2019-02-18 14:17:57 +01:00
0c4334d0bb Cleanup: Remove old wireframe batch cache code 2019-02-18 14:17:57 +01:00
7a8a2211d1 Wireframe: Fix Artifacts with MSAA
We blit the depth buffer into the MSAA depth buffer so that wires are
properly occluded. This also makes the "In front" option work with MSAA.
2019-02-18 14:17:57 +01:00
9c49c2ef0c GPU: Change multisample resolve shader to output min depth
This will effectively make the AA passes thicker in some cases but it is
required for better AA on wireframes. The trick is to occlude the wire
passes so that they do not output fragment that could be behind actual
geometry.
2019-02-18 14:17:57 +01:00
600da00a94 Wireframe: Add depth offset to prevent zfighting of wireframe overlay 2019-02-18 14:17:57 +01:00
e49d955541 Wireframe: Refactor to use GL_LINES instead of triangles with alpha blend
This gets rid of the progressive fading of the edges as it does not work
with depth perception (sorting problem with alpha blending).
2019-02-18 14:17:57 +01:00
253ff57617 Clamp value in sheen calculation to fix fireflies.
Fixes T59784.

Reviewers: fclem

Reviewed By: fclem

Subscribers: brecht

Maniphest Tasks: T59784

Differential Revision: https://developer.blender.org/D4269
2019-02-18 14:05:16 +01:00
6e72601b90 Fix T61649: Transform resize from UV editor asserts
Change logic for error checking so it's easier to follow.
2019-02-18 22:03:26 +11:00
3b3eba6374 Markers: Make marker lines in sequencer and graph editor optional
- Makes it possible to show a vertical line for every marker in the graph editor.
- Makes the marker line visiblity optional in the sequencer and graph editor.

Request from @hjalti.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4348
2019-02-18 10:42:06 +01:00
1c3a098cc8 Cleanup: remove unnecessary "_pad*" members 2019-02-18 17:06:11 +11:00
39e0b338d6 Cleanup: use "_pad" prefix for struct members 2019-02-18 16:47:55 +11:00
0b50438451 Cleanup: move 'orig' into Object_Runtime struct 2019-02-18 16:36:02 +11:00
e741472306 Cleanup: remove 'orig' from ObTfmBack
This is runtime data and is re-evaluated before use.
2019-02-18 16:31:02 +11:00
cc10d86535 DNA: rename Object.size -> scale
Resolves a common cause of confusion.
2019-02-18 15:43:55 +11:00
4719e7ec7a UI: motion paths panel layout tweak
- User better alignment for the paths_range_update button.
- Use Flow layout for the Display sub-panel items.
2019-02-18 15:15:43 +11:00
dcb44ddea2 UI: armature properties layout tweaks
- Rename 'Draw Mode' to 'Display As', consistent with other properties.
- Use flow layout.
2019-02-18 15:13:32 +11:00
5bd9878597 RNA: use distance units 2019-02-18 15:04:23 +11:00
61a9f41cf5 UI: bake panel layout improvements
All the controls were just really thrown in there without any proper
organization.
This gives it more structure.

- Correct use of sub-panels to communicate hierarchy and sections.
- Use flow layout for toggles.
- Use consistent names for "Bake Type".
2019-02-18 14:50:42 +11:00
50687b3183 UI: improve light probe properties layout
Smaller adjustments to the Light Probe properties layout.

- Correctly use alignment for multi-property values.
- Correctly use sub-panels.
- Correctly use PROP_FACTOR for visibility_bleed_bias and
  visibility_blur.
2019-02-18 14:12:22 +11:00
6be8c64e9a Fix T61187: Fluid Particle settings UI elements
Some properties were accidentally hidden for particle fluids.

- Made sure we show the Forces and Integration
  sub-panels for particle fluids.
- Slightly re-ordered the sub-panels here, so that the same sub-panels
  are at the top for Newtonian and Fluid particles.
- Separated the Fluid Interaction sub-panel so we can give it a unique
  name.
- Removed lingering unnecessary 'Keys' label in the Keyed physics.
2019-02-18 13:59:46 +11:00
bf9407fc71 Cleanup: spelling 2019-02-18 12:47:17 +11:00
7d792976e1 doxygen: update doxygen & add balembic group 2019-02-18 11:23:40 +11:00
022f339271 DNA: rename Collection.dupli_ofs -> instance_collection 2019-02-18 10:41:04 +11:00
cf966f3b38 DNA: support renaming structs that use the old renaming hack 2019-02-18 10:37:57 +11:00
c377cb2db5 RNA: use clog for logging error messages
Some RNA errors are quite similar, use clog for consistent logging that
always includes the file, function and line number - making errors
quicker to troubleshoot.
2019-02-18 10:24:49 +11:00
4859151154 Cleanup: style 2019-02-18 08:50:02 +11:00
4bbd1b9610 Correct own mistake in near/far cleanup
Error in 2f737c4f47
2019-02-18 08:50:02 +11:00
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
3316853323 Cleanup: conform headers to have license first
Also remove doxy comments for licenses and add missing GPL header.
2019-02-18 08:22:11 +11:00
a3b3b9d74b DNA: comment on how to avoid DNA rename errors 2019-02-18 08:22:11 +11:00
5657d68a03 Units: allow short unit names be case sensitive when needed.
To distinguish mW and MW without having to deviate from the standard
SI unit abbreviation. For all other units there are no changes.
2019-02-17 16:46:40 +01:00
ce5d079a49 Units: add support for light power units in Watt. Use for Eevee lights.
This affects point, spot and area lights. Sun light strength remains without
a unit. This change does not affect .blend file compatibility in any way, as
with the rest of the unit system it's purely a display and editing feature.

Not used for Cycles yet, that will be done after unifying the settings with
Eevee.
2019-02-17 16:23:00 +01:00
6c24de95c0 Cleanup: remove leftover hemi light code. 2019-02-17 15:58:12 +01:00
c5f13ecbc0 Merge branch 'blender2.7' 2019-02-17 15:57:34 +01:00
8a97b85555 Fix T54504: Cycles wrong backwards compatibility with linked libraries.
The code assumed all datablocks were read from .blend files saved with the
same version. This restructures the Cycles versioning code to take into
account libraries.
2019-02-17 15:41:42 +01:00
319b9d6501 DNA: rename dup_* struct members to instance_* 2019-02-17 19:00:54 +11:00
19a703b0db Cleanup: remove unused bStats struct 2019-02-17 18:09:38 +11:00
e0e6229176 Cleanup: rename Mesh.edit_btmesh -> edit_mesh
When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.
2019-02-17 18:05:18 +11:00
203b964ff4 Cleanup: move flag definition into screen header
This has been moved to screen, move declaration as well.
2019-02-17 12:57:04 +11:00
ae2b677dcb Cleanup: move object bounding-box into runtime struct 2019-02-17 12:52:53 +11:00
d8293fd6be Blenlib/Windows: Fix Build error with clang.
__cpuid comes from intrin.h which was implicitly included somewhere
for msvc builds, but not for clang.
2019-02-16 11:42:55 -07:00
b428929319 Windows: Fix building with llvm/clang 7.0.1
For llvm 6 the visual studio integration was 'not great' and we had
our own, which broke when llvm 7.0.1 came out. llvm now has properly
supported integration available on the VS market place hence we can
retire our custom support.
2019-02-16 11:36:19 -07:00
0d86259fc8 Fix T61591 Bevel tool not executing on mouseup.
When modal map was introduced, left out handling of what
happens when bevel is made active tool in toolbar and user
starts bevel by clicking and dragging.
2019-02-16 09:45:55 -05:00
03ede79c4f Fix T61593: Python can't access HUD region-type 2019-02-16 21:25:29 +11:00
2d1c14f036 Cleanup: rename SPACE_IPO -> SPACE_GRAPH 2019-02-16 16:42:11 +11:00
9d09eda0a3 DNA: rename theme space types
Follow enum naming convention, use "space_" prefix instead of "t".
2019-02-16 16:30:13 +11:00
ae375b4cdc DNA: ensure new names exist when renaming
Fail to build on errors in new names - without this renamed values
would be written to DNA breaking backwards & forwards compatibility.

Note that errors in old names aren't detected.
2019-02-16 13:10:32 +11:00
2f737c4f47 DNA: rename near/far -> clip_start/clip_end
Rename for Camera, View3D (also CameraParams & Render not DNA)
2019-02-16 12:26:07 +11:00
ec471a9b1c DNA: rename SpaceButs -> SpaceProperties 2019-02-16 10:44:15 +11:00
419911b1d1 DNA: rename SpaceIpo -> SpaceGraph 2019-02-16 10:23:40 +11:00
374cbdc63b DNA: rename SpaceOops -> SpaceOutliner 2019-02-16 09:48:29 +11:00
51c034686a DNA: rename camera YF_dofdist -> dof_distance 2019-02-16 09:43:33 +11:00
a2f345468c DNA: support DNA type & name aliases
This allows us to rename struct & struct members in the source code
without changing the file format.

This is useful because the code becomes increasingly confusing when
names such as oops, ipo & dupli aren't used anywhere except DNA headers.

dna_rename_defs.h is used to define renaming operations.

The renaming it's self will be done separately.
2019-02-16 09:32:29 +11:00
bc657ef16e DNA: warn about old versioning being incomplete
Also sync variable names w/ D4342
2019-02-16 08:51:00 +11:00
Dalai Felinto
eff3728db9 Fix T61512: Crash switching workspace with fullscreen area
In this case we simply create a new screen area that copies the currently
fullscreened area.

Note: At the moment there is no indicative in the non-main window that we are in
fullscreen. That happens because this information is part of the bar and we have
no topbar in this window.
2019-02-15 19:13:20 -02:00
Dalai Felinto
2b7752fb00 Fix T61210: Crash/inconsistency when clicking on obdata in outliner
The problem
===========
For armature, if the active object was in pose mode and the newly
selected armature data (not the pose, but the edit armature) we would
get a crash.

For mesh objects, the issue would happen with the active object in object mode.
Then the new selected object would switch to edit mode, however the overall
mode would still be object mode, leading to unsynced mode across the objects.

The solution
============
Using shift to extend selection makes current selected (compatible)
objects to go to edit mode as well. Otherwise only the newly selected
object will switch to edit mode.

This also works if you are in edit mode for a curve, and click in a mesh icon.

This also changes the rules for multi-object editing (or rather, how we
put objects in and out of it). Now shirt is also taking into
consideration there. So if you simply click in another mesh object's
data, it will have only the newly selected object in edit mode.

To reproduce the old behaviour you need to use shift to include the
newly selected object in the multi-edit party.

Reviewers: campbellbarton

Subscribers: brecht

Differential Revision: https://developer.blender.org/D4344
2019-02-15 15:52:46 -02:00
db3bfd0633 Fix T61575: missing Cycles viewport updates when changing settings.
This reverts "Depsgraph: Don't tag original IDs", commit:
5f814cb3b4.
2019-02-15 18:43:33 +01:00
2f60b505c6 GP: Cleanup old ToDo 2019-02-15 18:12:32 +01:00
7e3a395d86 Fix T61572: Crash when copy/pasting nodes
was caused by rBc6e3a20ab60b, copied node was actually added to the
nodetree, resulting in an endless loop.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4360
2019-02-15 18:03:25 +01:00
6e40e3489f Add global control over disabling high-resolution smoke draw
Can be found in the viewport's simplify panel, allows to easily
disable high-res display for all the smokes in the scene.
2019-02-15 17:55:24 +01:00
14c00cda39 Cleanup: More obvious name for the flag
Not sure what BIG is, it is HIGH RESOLUTION.
2019-02-15 17:29:01 +01:00
f15d810b1f Cleanup: Naming, BKE prefix
Done for smoke functions.

Smoke modifier functions seems an oddballs here,
but probably also to be renamed.
2019-02-15 17:29:01 +01:00
Dalai Felinto
f5ac1f444b Fix T61567: Object loose its rigid body data when moving to collection
At some I unified the "move to collection" with the remove from all collections
functionality. That meant that even when we were still to keep the object in one
of the collections we would clear its rigid body data.

Now why to even remove the rigidbody data when removing an object from all
collections? That mimics the 2.79 behaviour when we were to unlink an
object from a scene. I suspect it has to do with the rigid body data
being tied to the scene rigid body. Which is a strange design anyways
(add to the list?) since an object can be in more than one scene.
2019-02-15 13:04:18 -02:00
512bbf3748 Cleanup: Line wrapping 2019-02-15 16:00:54 +01:00
bcc619532f Depsgraph: Speedup constraint source lookup
Is mainly used by drivers variables. The slow part was about
iterating over all pose channels to find the one which has a
given constraint.

Now we build a look up table, so this operation is way cheaper,

Brings down relations update time from 0.7sec to 0.4 with Spring
production file.
2019-02-15 15:43:11 +01:00
0ecd587991 Depsgraph: Move RNA lookup to an own query class
Currently should have no functional changes, but allows to
implement runction optimizations more localized and easily.
2019-02-15 15:42:58 +01:00
373b8e311d Depsgraph: Correct logging of build time 2019-02-15 15:42:58 +01:00
7ee6635105 Cleanup: Indentation 2019-02-15 15:42:28 +01:00
faa255c0a4 Bevel: remove workspace text message when exiting bevel.
The message with shortcuts was hanging around after bevel
exited.
2019-02-15 09:15:32 -05:00
dd97b09fa8 Bevel: fix twist on bevel of cylinder with >= 200 sides.
This triggered an "almost parallel" case in setting the
offset meet points, which is OK but code needed improvement
put the meet point in a more accurate place.
This ia fix for part of the report T61214.
2019-02-15 08:32:07 -05:00
a5cbe81bed Depsgraph: Show build time on --debug-depsgraph-time
Previously was only shown on --debug-depsgraph-build which
had other unwanted noise.
2019-02-15 12:29:06 +01:00
00fc604478 Fix T61570: Monkey primitive fill color wrong
This was introduced by error in a previous commit.
2019-02-15 12:00:43 +01:00
872ff507a2 Fix Spring characters being in the rest pose on file open
This partially reverts bf2c5217 and makes it so animation is evaluated
for datablocks which were never evaluated within the dependency graph.

Not ideal, but safest way currently.

Animation for already evaluated datablocks will only be evaluated on
manual edits, so the initial bugfix is still valid.
2019-02-15 10:55:12 +01:00
e98ef47ed3 Cleanup: Argument wrapping 2019-02-15 10:52:53 +01:00
5f814cb3b4 Depsgraph: Don't tag original IDs
This is unreliable for cases when multiple dependency graphs
are to be updated.

The only reason why it was attempted to be made is to deal
with cases when ID appears in the dependency graph for the
first time. But even then it should be smart enough bring
itself to an up-to-date state without any extra tricks.
2019-02-15 09:25:26 +01:00
42c53e054f Cleanup: Attempt to clarify some ID_RECALC flags 2019-02-15 09:25:26 +01:00
9800837b98 Cycles: Support multithreaded compilation of kernels
This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Patch by lukasstockner97, jbakker, brecht

    job    |   scene_name    | compilation_time
----------+-----------------+------------------
    Baseline | empty           |            22.73
    D2264    | empty           |            13.94
    Baseline | bmw             |            56.44
    D2264    | bmw             |            41.32
    Baseline | fishycat        |            59.50
    D2264    | fishycat        |            45.19
    Baseline | barbershop      |           212.28
    D2264    | barbershop      |           169.81
    Baseline | victor          |            67.51
    D2264    | victor          |            53.60
    Baseline | classroom       |            51.46
    D2264    | classroom       |            39.02
    Baseline | koro            |            62.48
    D2264    | koro            |            49.03
    Baseline | pavillion       |            54.37
    D2264    | pavillion       |            38.82
    Baseline | splash279       |            47.43
    D2264    | splash279       |            37.94
    Baseline | volume_emission |           145.22
    D2264    | volume_emission |           121.10

This patch reduced compilation time as the split kernels and base
kernels are compiled in parallel. In cycles debug mode (256) you can set
unmark the opencl single program file, what reduces the compilation time
even further (bmw 17 seconds, barbershop 53 seconds).

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

Subscribers: Loner, jbakker, candreacchio, 3dLuver, LazyDodo, bliblubli

Differential Revision: https://developer.blender.org/D2264
2019-02-15 08:56:20 +01:00
4ce9785e01 Cycles: Support multithreaded compilation of kernels
This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

Subscribers: Loner, jbakker, candreacchio, 3dLuver, LazyDodo, bliblubli

Differential Revision: https://developer.blender.org/D2264
2019-02-15 08:49:25 +01:00
d17a027034 Fix DNA struct member versioning logic
Possible error changing names which are shared between structs.
While the problem doesn't occur at the moment, avoid future problems.
2019-02-15 18:17:58 +11:00
925b202641 Cleanup: sync minor changes from D4342
Use naming conventions from the patch so they match when it's applied.
2019-02-15 17:22:33 +11:00
d132c44652 UI: impossible to activate RMB menu on menu items
Right clicking on a menu item now closes it's sub-menus and opens
the button's context menu.

This is needed for adding them to the quick favourites menu.

Resolves T58729, T61015.
2019-02-15 16:13:28 +11:00
90f6fd0a36 Fix T60905: Crash using smooth tool
Tools were relying on gizmos drawing to initialize their gizmos,
now tool gizmos are initialized immediately.
2019-02-15 13:32:31 +11:00
796abc90a8 Fix T58090: Selected curve vertex should stand out
D4002 by @slumber w/ edits.

Use text colors, blending to background if they don't contrast.
2019-02-15 11:58:36 +11:00
986d480566 makesdna: correct function docs
Also use doxy sections & remove parens from return values.
2019-02-15 10:41:10 +11:00
de9026de6e ctodata: make stripping the last byte optional 2019-02-15 10:18:10 +11:00
5c432cd11b Fix T61427: Bevel crash with patch miter.
The adjustment phase had broken assumptions after adding miters,
and sent a null problem to eigen. Fixed code to check assumptions.
2019-02-14 17:21:50 -05:00
0f135f80f2 Fix outliner box select not working when using search filter. 2019-02-14 20:08:48 +01:00
7a41c1634b Merge branch 'blender2.7' 2019-02-14 20:00:37 +01:00
de0e456a6c Cleanup: fix compiler warnings. 2019-02-14 19:39:39 +01:00
9886ae6331 Fix T61470: incorrect saturation clamping in recent bugfix.
We should clamp the result after multiplication.
2019-02-14 19:28:44 +01:00
349357a7bd UI: reword error message when Python script fails.
Differential Revision: https://developer.blender.org/D4353
2019-02-14 18:17:00 +01:00
fb6f1aa12f Fix Cycles Embree crash on macOS, due to too small thread stack size. 2019-02-14 17:21:55 +01:00
93d11edd7e Fix Cycles build error with OpenImageIO 2.x. 2019-02-14 17:20:43 +01:00
1f1eea675f GP: Cleanup some lowercase texts 2019-02-14 16:52:15 +01:00
6995d51c75 GP: Don't activate Fill for new materials
As the fill color alpha is set to zero, it's better keep fill option disabled.
2019-02-14 16:52:14 +01:00
76747d0a11 GP: Avoid eraser in empty frames and add warning.
Also capture event to avoid Move transform.

Note: Now it's using a report message. Maybe this can be removed, but without the message, the event is captured by move transform.
2019-02-14 16:52:14 +01:00
a2510434bb GP: Do not draw in Locked or Invisible layers
It's weird to draw in a layer where the stroke cannot be seen or is not saved.
2019-02-14 16:52:14 +01:00
fa7149893a Cleanup: replace Main ID's foreach functions by macros.
Am really no a big fan of using macros for that kind of things, but
meh... C solution to do that with functions (using callbacks) is
even worse. :(
2019-02-14 16:26:32 +01:00
Dalai Felinto
caf89c3de1 Fix Object > Animation > Bake Action 2019-02-14 13:54:15 +00:00
4f92037158 Fix T61536: can't snap vertex to another vertex in edit mode using curves
Previously, the curve self snapping would only snap to points that were
earlier in the curve structure. This was because of a simple coding
snafu of using break when meaning to use continue.
2019-02-14 14:54:05 +01:00
87bba05d25 Fix T61520: Incorrect assignment of layers to compositor nodes in 2.8 when reading 2.79 .blend
Reviewers: brecht

Maniphest Tasks: T61520

Differential Revision: https://developer.blender.org/D4352
2019-02-14 13:55:35 +01:00
8d421f3d9b Fix T56665: Assert when selecting object
Selecting object w/ a different mode missed refreshing the screen
areas current tool.
2019-02-14 23:34:32 +11:00
816c135270 UI: add symmetrize to armature menu
Was lost on menu reorganization,
minor tweaks to make it match the context menu.
2019-02-14 18:32:04 +11:00
c6cbcf83d0 Fix T61472: Hide Unselected fails w/ no selection
Also skip mesh recalculation when no hide/reveal is performed.
2019-02-14 18:01:30 +11:00
6074f62d1a Fix T61353: Crash converting a curve to a mesh
This was caused by curves pointing to each other
creating a cyclic dependency.

While the dependency graph detects this, generating a mesh for render
recursively generates data which cashes in this case.

Add in a check to detect cyclic links.

Note, this bug exists in 2.7x too - but only crashes on render
since 2.7x didn't use 'for_render' when converting data.
2019-02-14 17:21:55 +11:00
caa8e7ff28 DRW: de-duplicate vertex & weight paint engines
These were almost exact duplicates, use one engine for drawing both
kinds of vertex color.
2019-02-14 15:22:58 +11:00
9478ac701b DRW: use light wire for weight paint mode
Black wire can be hard to see against dark blue,
especially when shading is enabled.

Use light grey, matches 2.7x.
2019-02-14 15:22:58 +11:00
7280d9d1e4 DRW: Increase weight paint wire depth bias
By default wire would z-fight against the surface.
Increase the bias, also don't adjust the 'w' component
since it causes bias that depends on the view direction.
2019-02-14 15:22:58 +11:00
c12b29e884 Cleanup: vertex painting variable use
Assign to local variables when setting up passes,
avoids mix-up between similarly named struct members.
2019-02-14 13:08:49 +11:00
37b7a5c8b8 Fix vertex/weight paint showing edge selection
When vertex/face selection are disabled - show all wire
ignoring selection & hidden state.
2019-02-14 12:40:21 +11:00
a8134647c9 Fix T61360: Weight paint tools ignore face select
Face selection was added in weight paint mode since 2.7x,
however tools hadn't been updated.
2019-02-14 11:47:23 +11:00
6c2a0049e4 Fix T61497: Old keymap causes error on startup
When a keymap has an error loading, don't make it active
since it will be partially loaded and not usable.
2019-02-14 11:11:53 +11:00
a9da750aee DNA: add in-place stripping utility
Minor change from D4342
2019-02-14 09:59:46 +11:00
b42333fba6 Keymap: preference for alternate tap action for some pie menus
This allows secondary keys on tap.
Currently Z-key to toggle wireframe and tilde for navigation.

This is currently experimental, if users like this the preference
can be kept and used where appropriate.
2019-02-14 09:44:13 +11:00
bdeb9f047a Keymap: Alt-N to flip normals
Add shortcut since this has been removed from the context menu,
now it's in the mesh normals menu which isn't so convenient to access.

Shift-N is already used to recalculate normals,
this fits the convention of Alt removing/reversing.
2019-02-14 08:49:26 +11:00
672d7d2d9c Cleanup: indentation 2019-02-14 08:49:26 +11:00
11ec57e211 fix build on xcode with openmp 2019-02-13 22:34:40 +02:00
8365de52bc Fix T61477: freestyle not updating in animation render (again).
Must use the right function to get animation updates now.
2019-02-13 20:04:44 +01:00
dbd9b7590a Merge branch 'blender2.7' 2019-02-13 19:02:43 +01:00
b54b14582b Fix T61505, T61280, bugs in button drag toggle after recent changes. 2019-02-13 19:00:11 +01:00
a75ac18638 Fix T59062: Keyframed node properties stay linked after shading network duplication.
There is no reason not to duplicate Actions too here, especially when
Materials' Actions are pretty much impossible to edit from current UI
(afaik, DopeSheet editor does not has any way to change them?).
2019-02-13 17:20:49 +01:00
ec559912fb Fix T61470: inconsistent HSV node results with saturation > 1.0.
Values outside the 0..1 range produce negative colors, so now clamp to that
range everywhere. Also fixes improper handling of hue > 2.0 in some places.
2019-02-13 17:06:30 +01:00
46c871b4ae GP: Cleanup Paint Poll method
The poll was checking things related to all annotations, but now the check must be only for grease pencil objects and 3D view.
2019-02-13 16:48:41 +01:00
cf92d83c0a Fix T61446: (second part) Some items in editor and mode selectors are not translatable.
That one is utterly ugly fix really, but unfortunately a proper one
would require some changes to our RNA (or more precisely, pyrna) code,
so that when we subscript a dynamically generated RNA collection, the
item is somehow duplicated (and probably 'assigned' to its py object?),
before the temp RNA array memory is freed...
2019-02-13 16:32:58 +01:00
10efc54729 Fix NodeTree types UI messages not being properly tagged for translation.
Probably fix first part of T61446.
2019-02-13 16:19:09 +01:00
a4e81e2dfb Fix T61515: Crash when unloading a scene with pynodes and idprop of type id.
Usual legacy/history crap in NodeTree code... Datablocks's specific
freeing code should never, ever do refcounting management, this is
handled by higher-level code from BKE_library area.
2019-02-13 16:10:46 +01:00
79f5b825a9 Fix T61502: Cycles wrong other object texture coordinates in OSL.
The row/column major matrix conversion was done twice.
2019-02-13 15:03:08 +01:00
c6e3a20ab6 Fix T61506: Wrong user counting with ID properties in pynodes.
Nuke away old nodeCopyNode(), much better to use new BKE_node_copy_ex(),
which behaves as expected for the various optional flags that can be passed.

This also removes the need to handle ID refcounting in calling code
(ugly!) and allows us to remove an even uglier name from our codebase! :D

Note that this fixes three related issues actually, that bug was also
affecting copy/paste of nodes, and 'Separate with copy' operator (the
latter being actually fully wrong, since it was not refcounting
anything, not even node->id pointer...).
2019-02-13 15:02:24 +01:00
74a3d9b410 Merge branch 'blender2.7' 2019-02-13 14:34:26 +01:00
1bbe770030 Fix missing Cycles cryptomatte metadata in renders. 2019-02-13 14:34:17 +01:00
eb7f2457e5 Cleanup: do not cleanup runtime data twice during ID copying...
More or less same code was being executed twice during ID copying.

Makes no sense to add yet another switch-by-ID-type to handle
specificaly runtime data during ID copying, we already have
BKE_xxx_copy_data() functions for that.
2019-02-13 14:31:56 +01:00
3866161da8 Fix T61457, T61489, T61482: build errors and memory warning in Cycles.
For OIIO 2.x we must use unique_ptr. This also required updating the
guarded allocator for std::move to work. Since C++11 construct/destroy
have a default implementation that also works this case, so we just
leave it out.
2019-02-13 14:00:36 +01:00
5e3838faa2 Fix T61499: Missing Camera settings in props except Depth of Field
rB55c281415b67 removed 'BLENDER_RENDER' as a COMPAT_ENGINE but the
cycles addon checks for this in its get_panels() function.

Adding this back for now.

Reviewers: brecht, billreynish

Maniphest Tasks: T61499

Differential Revision: https://developer.blender.org/D4346
2019-02-13 12:32:40 +01:00
57f0b175d7 Fix T61487: quick favorites crash outside of open preferences window 2019-02-13 11:05:14 +01:00
539cbf639f Fix crash removing drivers
Was a use-after-free during relations update.

Now we do similar dependency graph tags, but without any
extra animation update logic, which was accessing various
pointers.

Was found when looking into a file from T56635.
2019-02-13 10:42:32 +01:00
f54c3e3500 GP: Remove debug print 2019-02-13 10:00:02 +01:00
b271cbfcb0 Cleanup: unused DNA struct members
- Timeline theme.
- 3D view runtime variables.
- Exclude EditLatt from SDNA.
2019-02-13 19:14:36 +11:00
2424bb3d5e Fix T61411: Camera clip overlay enabled by expanding UI 2019-02-13 16:39:03 +11:00
ba6cf3cdb6 Cleanup: rename variable name for DNA utils
Rename 'elem_dna' to 'elem_full' to signify it has array/pointer chars.
2019-02-13 11:09:07 +11:00
4d890f3778 Cleanup: unused variable 2019-02-13 11:08:38 +11:00
9a8a5676da Cleanup: style, duplicate includes 2019-02-13 11:00:07 +11:00
61e2e609a1 I18N Messages: fix confusion with Light meanings.
Using ID_LIGHT or ID_ID for "Lamp" meaning, "Light" without context
being for 'not heavy'.

That rename of data-block was not really nice on that side of things :/

Related to T43295.
2019-02-12 22:15:27 +01:00
62f8c55a75 Cleanup: rename BLT_I18NCONTEXT_ID_LAMP -> BLT_I18NCONTEXT_ID_LIGHT. 2019-02-12 21:53:10 +01:00
025df50f61 Fix T51771: UI Messages: Reserve 'Normal' to its geometric meaning.
Using 'Regular' instead for the common meaning, this avoids having to
add some i18n context disambiguation...
2019-02-12 21:34:21 +01:00
9d63b0d539 Fix T61469: wrong object statistics when using instances.
The new code already loops over all instances, don't need to be counted again.
2019-02-12 19:18:32 +01:00
c8e446e1ca Fix T61453: crash rendering after selecting particle settings datablock. 2019-02-12 19:00:48 +01:00
70c5699734 GP: Move to new layer did not work with autolock
When the autolock layer option was enabled, the move to new layer operator was not working as expected.
2019-02-12 18:15:00 +01:00
a1d440de4a Edit Mode: Fix element selection on some old AMD GPUs
Tested on an `AMD Radeon HD 7570M`.
It seems that a VBO containing only `unsigned bytes` or `unsigned shorts` can't be read correctly in a shader.
Strange that if the index buffer repeats the drawing of the vertices (as was done before rBa04dd15193e6) the problem disappears.
The disadvantage of this solution is that the memory size for a selection VBO increases by about 4 times.
But the loss in optimization is negligible.


Thanks to @fclem for pointing out the possible source of the problem and reviewing the fix.
2019-02-12 14:12:57 -02:00
Dalai Felinto
09b40aa039 Fix "typo" in show_object_viewport* RNA_def_property_update 2019-02-12 14:27:30 -02:00
f16763a01d Fix T60999: Duplifaced objects are not drawn in edit mode
Seems to be rather trivial change to use proper cage mesh nowadays.
2019-02-12 17:05:32 +01:00
5aacad16e0 Fix T61462: Missing update when toggling GP layer visibility in the Outliner 2019-02-12 17:01:38 +01:00
027c356e23 Use direct access to evaluated mesh from instancing
It is supposed to be already evaluated. If for some reason it's not
doing such direct evaluation will not be reliable anyway (indirect
dependencies for example).

This fixes an assert part of T61431.
2019-02-12 16:42:34 +01:00
8614f28234 Depsgraph: Special relation for instances and metaballs
Ensures that object which is set for instance-vert or instance-face
is evaluated prior to metaball. This is because metaball will request
list of instances during evaluation.

This should fix issue reported T61431 in release build. The assert is
still there and is to be addressed separately.
2019-02-12 16:42:34 +01:00
7c03d6c4e6 Cleanup: Make parent relations a bit cleaner
Mainly getting rid of old and somewhat misleading and unclear
comments.
2019-02-12 16:42:34 +01:00
03d25184d9 Fix T61458: GP Ctrl + F doesn't do anything
This keymap was used in the old grease pencil and now must be removed.

The keymaps for brush are:

F: Change Radius
Shift + F: Change strength

Ctrl+F -> Removed.
2019-02-12 16:38:02 +01:00
43139bf8b4 Fix T61428: Node editor's 'Interface' panel shows in all tabs
Reviewers: brecht

Maniphest Tasks: T61428

Differential Revision: https://developer.blender.org/D4343
2019-02-12 15:57:05 +01:00
3797fdcfc1 Modifiers: Make Difference default operation for boolean modifier.
Make Difference a default value for boolean modifier operation property.

Currently operation property of the boolean modifier is set to Intersect, which is the least frequently used boolean operation of the three available. It is also goes out of sync with Intersect (Boolean) tool, where Difference is a default operation.

Reviewers: mont29, brecht, sergey

Reviewed By: mont29, brecht, sergey

Subscribers: mont29, brecht, campbellbarton, sergey, billreynish

Tags: #modifiers

Differential Revision: https://developer.blender.org/D4340
2019-02-12 14:14:21 +01:00
87c4f30954 Fix T61455: Import any add-on broken
recent split userpref.py out of wm.py (rB9ec944bbab7a) forgot to move
'module_filesystem_remove' there as well...
2019-02-12 13:33:33 +01:00
20f78dc12f Fix T61430: invoke_popup() does not respect ui scale
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4341
2019-02-12 13:30:24 +01:00
024f5ba2bd Depsgraph: Run rigid body after modifiers are ready
This makes it so modifiers are using object transform prior
to the rigid body simulation, and then result of modifier
stack is fed to the solver.

Solves dependency cycle which was happening when object's
modifier was dependent on the modifier transform.

While now it is not possible to change simulation, things
are somewhat more clear and reliable in other ways.
For example previously, solver was using derives mesh from
a previous step in time, which causes unfixable simulation
issues (with intersections and such)

Fixex T57589: 2.79 Rigid Body Sim. Does Not Behave The Same In 2.8
Fixex T61256: Compositing scenes causes crash, but rendering separately does not
Fixes T61262: Armature and rigid body crash
Fixes T61346: Rigid body with modifiers incorrect work
2019-02-12 12:32:03 +01:00
17416b80f6 Weight modifiers: Remove weird looking dependency
Modifiers are part of geometry component, no way they can
be dependent on the geometry component of the same object.
2019-02-12 12:07:59 +01:00
07ff9e92bb Depsgraph: Add utility function for transform dependency
This is what modifiers are to use to indicate that they depend
on a transformation of the object itself.

Currently should be no functional changes, but in the future
this will allow to easily change transform operation depending
on whether there is a simulation associated with the object.
2019-02-12 12:07:59 +01:00
d3870471ed Fix fur on Spring characters
There is an issue of hair being completely messed up when
switching to a simulation view layer for Autumn.

Restoring back the code which was re-setting particles on
file load. This will re-set unbacked particles on file load
but this appears to be happening in 2.7 as well.

Can not reproduce bugs which were fixed in this area recently,
so maybe it's finally tackled (fingers crossed!).
2019-02-12 10:57:32 +01:00
65ffc414fe Cleanup: move utility functions into dna_utils
Rename old/new to src/dst since renaming happens in both directions
when versioning.
2019-02-12 17:56:35 +11:00
d968db82b7 makesdna: add shared utility module
Currently only a single function was duplicated which isn't so bad,
this change is to allow DNA versioning code to be shared between
dna_genfile.c and makesdna.c.
2019-02-12 17:09:57 +11:00
f96bfde4a5 makesdna: use memarena for string allocations
Include it since versioning code will need to perform
small string allocations too, which doesn't fit will into
the currently used fixed size buffers.
2019-02-12 16:52:54 +11:00
b539aee0c9 BLI_memarena: remove use of BLI_linklist
Preprare for using memarena w/ makesdna, BLI_linklist depends on
BLI_mempool. Since linked list use in here is simple, do it inline.
2019-02-12 16:28:10 +11:00
036ec5cae4 Cleanup: use printf define in makesdna 2019-02-12 10:10:04 +11:00
3ec4c2f842 DNA: support versioning structs & struct members
This is only to be used rarely because it's not forwards compatible.

Replace version patching of old 2.80 DNA with a more generic API.
2019-02-12 09:38:46 +11:00
2a6d03493c WM: default to opening maximized
Blender is typically used maximized or fullscreen,
load maximized instead of attempting to fill the screen bounds.

To load un-maximized use '--window-border' argument.

See D4332
2019-02-12 09:14:10 +11:00
7cca0f9998 Fix T61391: MeshDeform Modifier does not work on a solidified planar mesh.
`BKE_modifier_get_evaluated_mesh_from_evaluated_object()` used by
modifiers needing access to other objects' geometry probably skipped out
of the radar when cage and final evaluated meshes were added to
BMEditMesh? In any case, we do not need to duplicate (and then free!) a
temp mesh from editdata anymore, and we can even add instead a parameter
to get cage instead of final. Also makes modifiers code a bit simpler.
2019-02-11 20:24:07 +01:00
d8888b2f48 Merge branch 'blender2.7' 2019-02-11 18:39:31 +01:00
2a9c8da709 Cycles: add animation denoising test, fix operator to work with single frames. 2019-02-11 18:37:02 +01:00
9efbc8d76f Cycles: backport samples metadata format changes to 2.7.
The render layer name is now always included. Best to keep these consistent,
so that animation denoising and sample merging works the same for both and
tests can be the same. Ref D4311.
2019-02-11 18:18:32 +01:00
558d7dd90e Fix T61376 Group Node Node Editor theme property is missing alpha channel
It is now possible to adjust the group node background alpha.
The defaults are the same as before, but you can now adjust the alpha
level via the theme preferences (and the alpha value is no longer hard
coded).
2019-02-11 16:56:20 +01:00
b8dc7e9cb8 GP: Avoid crash when bruhs setting are invalid
This change avoids crashes for wrong settings, but we need find why the settings were wrong.

Related to T61413
2019-02-11 15:58:04 +01:00
452df3f392 Cleanup: comments 2019-02-12 01:51:03 +11:00
Pablo Vazquez
36aa8499e8 UI: Use icon in Dopesheet 'Toggle Graph Editor' menu item. 2019-02-11 15:46:09 +01:00
Pablo Vazquez
17ce9f61c3 UI: More descriptive labels for Metaball panel.
Also remove redundant "Resolution" label.
2019-02-11 15:46:09 +01:00
b8d4f06b10 Merge branch 'blender2.7' 2019-02-11 15:25:46 +01:00
3117446967 Fix T61362: Hair particles does not appear when rendering
Fix T61406: Particles don't render

Consider initial dependency graph evaluation as a file load.

Is still resetting too much, but that we can solve later.
2019-02-11 15:24:11 +01:00
51d161a89e Depsgraph: Use proper tag source for special case
Special case of handling update tag of 0 was using wrong update
source, causing unwanted point cache resets on file load.
2019-02-11 15:24:11 +01:00
9359200956 Fix build error on macOS after recent changes. 2019-02-11 15:03:28 +01:00
23c14a0bba Fix: Eevee SSS not rendering as expected
Remove forcing separate albedo when rendering. It was creating confusion.
2019-02-11 14:50:25 +01:00
d07cde8de8 Fix T61374 : vertex not visible/selectable if it is at objects origin
It was caused by Null normal if the vertex is at origin. Just add a small
bias to avoid this case.
2019-02-11 14:38:14 +01:00
1a8cd3a8a7 Cleanup: avoid string copy for comparing int id's
More direct and readable.
2019-02-11 23:53:33 +11:00
e379a9ba91 Cycles: add animation denoising Python operator.
This adds a cycles.denoise_animation operator, which denoises an animation
sequence or individual file. Renders must be saved as multilayer EXR files
with denoising data passes.

By default file path and frame range come from the current scene, and EXR
files are denoised in-place. Alternatively, a different input and/or output
file path can be provided.

Denoising settings come from the current view layer. Renders can be denoised
again with different settings, as the original noisy image is preserved along
with other passes and metadata.

There is no user interface yet for this feature, that comes later.

Code by Lukas with modifications by Brecht. This feature was originally
developed for Tangent Animation, thanks for the support!

Differential Revision: https://developer.blender.org/D3889
2019-02-11 13:39:08 +01:00
3f8e263709 Merge branch 'blender2.7' 2019-02-11 13:37:45 +01:00
c10f5d15c2 Cycles: add animation denoising Python operator.
This adds a cycles.denoise_animation operator, which denoises an animation
sequence or individual file. Renders must be saved as multilayer EXR files
with denoising data passes.

By default file path and frame range come from the current scene, and EXR
files are denoised in-place. Alternatively, a different input and/or output
file path can be provided.

Denoising settings come from the current view layer. Renders can be denoised
again with different settings, as the original noisy image is preserved along
with other passes and metadata.

There is no user interface yet for this feature, that comes later.

Code by Lukas with modifications by Brecht. This feature was originally
developed for Tangent Animation, thanks for the support!
2019-02-11 13:32:54 +01:00
9ec944bbab Cleanup: split user preferences out of wm.py
These operations are for handling preference related tasks so move into
into a preferences file.

Operators still need to be renamed.
2019-02-11 23:24:09 +11:00
382fe85e29 Cycles: refactor Blender device settings handling into own file. 2019-02-11 12:53:24 +01:00
55c281415b UI: show camera DOF UI for workbench engine 2019-02-11 22:50:40 +11:00
b10b77d4f0 Fix T61185: Missing modifiers update on changes to texture
Also update relations when modifier texture changes.

Basically same as rB6e00415a85a9, rBca2680aaeb1 but this time for
VertexWeight modifiers

Reviewers: sergey

Maniphest Tasks: T61185

Differential Revision: https://developer.blender.org/D4305
2019-02-11 10:38:30 +01:00
1724ff29e0 readfile: skip negative sized thumbnails
We may want to use 'TEST' BCode in the future for including data
besides thumbnails. This allows negative values to be used w/o
attempting to load a thumbnail.
2019-02-11 19:09:27 +11:00
3ce5e5a857 Cleanup: unused speaker flag 2019-02-11 17:55:52 +11:00
42368a2321 Cleanup: RNA boolean names (use prefix conventions) 2019-02-11 17:49:35 +11:00
826d9ac827 Cleanup: move runtime vars into Camera_Runtime 2019-02-11 16:58:52 +11:00
e215216958 Cleanup: use "_Runtime" suffix for DNA
Was done everywhere except bPoseChannel.
2019-02-11 16:50:23 +11:00
43156d8304 Preferences: remove tweak/drag threshold distinction
Currently the preferences have both tweak and drag threshold,
this is confusing because most actions users would consider
dragging use the 'tweak' setting.

Now one drag threshold is used for both, with a maximum limit of half
the button unit-size in case of dragging UI elements.
2019-02-11 15:48:46 +11:00
1daaa74b08 WM: command line args to start blender maximized
Part of D4323 by @DragMZ
2019-02-11 14:46:25 +11:00
f5249b4e30 Cleanup: use 'struct Main' in header
Causes errors including in some cases.
2019-02-11 14:10:13 +11:00
69b2f52681 DNA: remove Object.display struct
We have a display flag already, use it instead.

Object.display is kept in RNA, exposed via a nested struct,
we can move other display options there.
2019-02-11 10:55:22 +11:00
ffd0fee97c Cleanup: comment indentation & spelling 2019-02-11 10:51:25 +11:00
9ca6fc41ae Bevel: Make modal keymap instead of hardcoded.
Also added keys for toggling harden normals,
and cycling through miter types.
Still to do: add some shortcuts for affecting the
spread value for arc miters.
2019-02-10 16:08:25 -05:00
09f4505712 UI: Color Picker, make HSV default.
Most artists agree that RGB by default is not as flexible as HSV.
It's just the first time it opens anyway, since it will remember whatever
was set last like it always does.
2019-02-10 21:30:08 +01:00
5d2b23766b Link/Append: Instantiate collection rather than objects.
When one is indirectly linking collections, better add collection to the
scene, than instantiating its objects into master collection of the
scene. That is much cleaner.

Noted/related to T61141.
2019-02-10 17:15:15 +01:00
439437fa3a Fix T61141: Append Particle Settings doesn't append the collection properly.
ParticleSettings' duplicollection is now a proper refcounting user of
its collection, which will avoid losing it on save/reload.
2019-02-10 17:15:15 +01:00
96a7e06792 Cleanup: unused struct member
Also replace intptr_t -> int (no good reason to cast to intptr here).
2019-02-10 22:50:04 +11:00
0629359762 I18N: Add Kazakh language.
Disabled for until we get actual first tranlation in SVN repo. ;)

Related to T61102.
2019-02-10 11:04:53 +01:00
0b6dbbc306 Cleanup: move clipping shader lib & define into struct
Also compare clipping with the draw context instead of
accessing the RegionView3D, currently they're matching
but this might not always be the case.
2019-02-10 11:16:31 +11:00
16d7967c2b Cleanup: use shorter name for shader config
The struct name is descriptive,
this isn't going to be confused with other variables.
2019-02-10 11:02:06 +11:00
Dalai Felinto
66c23ea2b4 Cleanup: Use ID_IS_LINKED instead of id.lib 2019-02-09 18:41:52 -02:00
Dalai Felinto
69f50e6ea9 Fix: objects in outliner cannot be disabled
But introduced on 191b8951f7.
Reported on tracker as a comment on 3f537f30e6.
2019-02-09 14:26:27 -02:00
af0eb938b8 Fix T61276: Make Single User unlinks original object.
In that case, we have to consider number of scenes using an object, not
number of collections.
2019-02-09 13:24:31 +01:00
bf4f01779d BKE_object: add util to count number of scenes using an object.
Issue is, ob->id.us is not relevant anymore here, since several
collection might be referencing it inside of a same scene, that is still
only one usage from user perspective...

Note that for now we are just counting scenes instantiating an object,
time will say wether we need more refined/complete check (as a reminder,
most [all?] other Object usages are *not* refcounting ones).
2019-02-09 13:24:31 +01:00
1bf8551f00 GP: Missing in previous commit 2019-02-09 11:08:17 +01:00
b85d5dd9b1 GP: Init stroke buffer always
Related to T61334

This initialization avoid any crash when user saves the file while he is drawing a stroke session.
2019-02-09 10:59:25 +01:00
ade4017293 GNUmakefile: fix deps directory
`uname -p` is unknown on some distros, use posix standard `uname -m`.
2019-02-09 17:00:57 +11:00
7262ac6202 Fix T61332: Python3 syntax errors 2019-02-09 13:10:34 +11:00
Dalai Felinto
191b8951f7 Outliner visibility: Prevent changing linked objects and collections
We still change their base/layer collection visibility, just not what would change the
original ID datablock.
2019-02-08 20:09:37 -02:00
Dalai Felinto
e04d6794d0 Outliner Visibility: Alt+H operator to unhide all objects and collections 2019-02-08 19:59:02 -02:00
Dalai Felinto
744223afbf Outliner Visibility: H operator to hide collection or objects 2019-02-08 19:44:37 -02:00
Dalai Felinto
3f537f30e6 Outliner visibility: Ctrl to isolate object
Ideally it would be nice to make all the base parent collections visible as well.
However we do not know this from the outliner.
2019-02-08 19:15:41 -02:00
0e3d1eee15 Fix (unreported) crash when undoing after ID deletion.
Yes, we do can undo an ID deletion now.

However, this requires extra care in UI 'remapping' to new IDs step
(when undoing, we do not fully reload the UI from saved .blend).
Otherwise, new UI (i.e. one from saved .blend file) might reference
IDs that where freed in old bmain (the one before the undo), we cannot
use those to get ID name then, that would be a nasty use-after-free!

To prevent this, we generate a GSet of all valid ID pointers at that
time (i.e. those found in both old and new Main's), and ensure any ID
we try to remap by its name is in that GSet. Otherwise, there is no
possible remapping, just return NULL.
2019-02-08 18:54:52 +01:00
6ba8e71fa2 BKE_main: add a util to generate/extend a GSet with all ID pointers of a Main database. 2019-02-08 18:53:09 +01:00
4b4a231250 Cleanup: API doc is to be in implementation, not header file. 2019-02-08 18:53:09 +01:00
389515f441 Outliner: Purge: correct tooltip, add more info for user.
While ideally we could have a complete detailed list of deleted IDs,
that would require more work UI wise, think for now we can live with
just a rough summary.

Related to T61209.
2019-02-08 18:53:09 +01:00
a8f28329ad BKE_idcode: Add utils to convert from 'lbarray' index to ID type.
This can be useful to be able to match some random array data with
ListBase array of IDs generated by `set_listbasepointers()`.
2019-02-08 18:53:09 +01:00
Dalai Felinto
02581a7ef8 Fix T61287: Object restrict viewport ignored in instanced collection
make_duplis_collection() depends on the collection object cache,
which was not freed upon object viewport disable change.

The best way to reproduce the bug was to instance the default
collection, disable the cube, save and re-open the file.
Now even if you set the original cube to be enabled, you wouldn't see
the instanced one until you forced collection cache to be freed (e.g.,
changing a collection disable state.
2019-02-08 13:57:12 -02:00
Pablo Vazquez
5228a10f6d UI: Marker position slightly offset.
Tested on various interface sizes and thick lines.

Reported by Blender Studio animators.
2019-02-08 16:18:46 +01:00
e925c20f2f Fix T59339: Particle render without baking issues
Fix T61289: Emitting particles from instances not working properly

The first issue has been re-introduced by a code which was dealing
with missing hair after opening the file. That was re-setting all
particle systems all the time because modifier flags were not copied
back to original. This made every modifier run to be seem as an
initial file open.

Now we copy flags back to an original modifier. But also we are
trying to not do any resets unless needed in that case. This way
we can preserve in-memory caches.

Other part of the change is related on re-setting particle system
if number of mesh elements changed. But we only do it if the
modifier has been already evaluated once.
2019-02-08 15:31:08 +01:00
2f0dbdea4f Bevel, fix crash when adjust offsets with inner arc miter.
Previous assumptions about boundary verts always being attached
to edges are now false.
2019-02-08 09:24:43 -05:00
29922b6ff5 Bevel: fix regression re even adjustment of offsets.
Mistakenly had left a debugging assignment that disabled
the offset pass. This commit re-enables it.
2019-02-08 09:02:29 -05:00
6e2da0883f Fix T61309: mesh_utils.triangle_random_points fails with a TypeError
Caused by an error in rBe65784a0519e.
And since we are going over loop triangles anyways, we can remove the
part quecking for quads [remainder of tessface era] entirely.

Reviewers: campbellbarton

Maniphest Tasks: T61309

Differential Revision: https://developer.blender.org/D4324
2019-02-08 13:58:42 +01:00
813800f143 DRW: support clipping for stick & wire bones 2019-02-08 23:21:22 +11:00
Pablo Vazquez
d723249dcc Typo 2019-02-08 12:55:54 +01:00
Pablo Vazquez
7b03e45202 UI: Icons for some Outliner context menu operations
Mainly 'X' icon for Delete, which was already on modifiers and constraints,
but not for objects. Select icon for object selection and refresh for library reload.
2019-02-08 12:52:23 +01:00
Pablo Vazquez
5d7241a9ee UI: Move View operations to submenu in Outliner context menu
Show One Level, Hide One Level, Show Active, Show Hierarchy were taking
four items on the context menu when they are not accessed that often
from the context menu (they all have shortcuts).

The "View" name is used to match other editors View menus.
2019-02-08 12:52:23 +01:00
Pablo Vazquez
2a514f9764 UI: Icons for basic operations in Outliner context menu
Mainly the first of their category or when they need to be highlighted:
* Delete
* Enable Viewport/Render (match icons to make a visual connection)
* ViewLayers (it's used pretty often so it makes it easier to find)

Also group Show/Show All, Hide/Hide All together.
2019-02-08 12:52:23 +01:00
bf2c5217b3 Fix T61231: File open and undo looses unkeyed changes
Only flush copy-on-write to animation when user makes changes.
2019-02-08 12:17:00 +01:00
e418777109 DRW: edit-mesh edge clipping broke in recent update 2019-02-08 22:06:14 +11:00
2855feb2ae Fix T61196: Mesh select ignores clipping (part 2)
Need to use local clipping planes in this case
2019-02-08 21:52:01 +11:00
0e3475b00d Fix T61255: Mesh Data Transfer: Do not abort when destination has not all source data layers.
Originally, when transferring all source data layers to destination
meshes, code would abort in case destination did not have all needed
layers, and creating them was not allowed.

Now, it will instead transfer data to layers that exists, merely
skipping source ones for which it cannot find a matching destination.
2019-02-08 10:16:00 +01:00
351b24ac14 Fix T58625: Knife project fails w/ curves 2019-02-08 19:18:35 +11:00
0822af4c48 WM: init simulated event from win->eventstate
Ghost event handling code works this way.
2019-02-08 19:01:30 +11:00
46ac288a93 Cleanup: rename V3D_MANIP_* -> V3D_ORIENT_*
Wasn't obvious it's related to orientation,
also term manipulator is no longer in use.
2019-02-08 15:22:15 +11:00
d86894b9e4 Fix T61291: Transform gizmo doesn't update w/ 3D cursor 2019-02-08 15:12:04 +11:00
a9853a7e6c Fix missing NULL check in recent version patch 2019-02-08 12:10:56 +11:00
3d16a268ee Undo System: basic support in background mode
Some developers were using undo for their scripts, this allows for undo
pushes in background mode, however - as with 2.7x, undo isn't
initialized at startup in background mode.

See replies to T60934
2019-02-08 10:15:11 +11:00
e1edb51699 Correct error in last commit 2019-02-08 09:41:28 +11:00
261d42cd84 Cleanup: clear deprecated flags 2019-02-08 09:31:59 +11:00
7fdda18ca1 Remove "Keep Session" preference
As far as we know this wasn't widely used, and relied no storing data
in the temp dir which may be cleared on reboot.

More generally, alternative behavior for a core area like file IO
is not something to keep if it has unresolved issues.

See D4310 for details.
2019-02-08 08:42:50 +11:00
0abf754748 Cleanup: sort struct blocks, description 2019-02-08 07:29:21 +11:00
0021273b31 Fix crash drawing loose vertex from recent changes 2019-02-08 07:27:00 +11:00
dd6dcf8247 Cleanup: Use new BKE_main_foreach_id() in a few more places... 2019-02-07 21:52:54 +01:00
17300991c3 Fix wrong Cycles render status text when only writing denoising passes.
In that case we do prefiltering for the denoising passes, but don't actually
denoise the image.
2019-02-07 20:59:48 +01:00
949bc7aa2a Outliner: modernize Purge operator.
That guy was still from the era where only way to remove an ID was to
save & reload the .blend file. Use modern code instead, should also be
much, much more efficient in big production files.

And that’s another nice occasion to add/test new batch ID deletion code, too. ;)

Related to T61276 Make Single User unlinks original object.
2019-02-07 20:46:53 +01:00
599561de84 BKE_main: add utils to loop over whole IDs of a given Main database.
We are currently having the same boiler plate code in tens of places
accross our code, we can as well have a utils to do that.
2019-02-07 20:46:41 +01:00
d2afa51ddc Edit Mode: Draw Vertices after edges
This avoid edges covering a part of vertices.

This comes at a (very minor) perf cost as vertices can cover some edges
pixels and early discard them with the depth test. But this only happens
in artificialy dense mesh and is not a real problem for common cases.
2019-02-07 20:40:54 +01:00
a04dd15193 Edit Mesh: Only draw vertices once
Only add each vertices to point ibo once. That requires tagging each mvert
in the case of modifier preview.
2019-02-07 20:36:29 +01:00
ea30767997 Edit Mode: Reduce number of edges drawn
This make sure only one line is drawn per edge.

It makes the function mesh_create_edit_loops_points_lines() non-thread safe
but this is fine as of now because nothing is multithreaded at this point.
Also this is the only function use this flag so it might be OK.

The side effect is that we don't need to use depth test in edit mode
overlay so the masking artifact will not appear.
2019-02-07 19:11:01 +01:00
7584ef85bf Edit Mode: Fix edge partially displayed as selected with modifier preview
Force set the flag vertice selected in this case.
2019-02-07 19:06:54 +01:00
aa7b013bd5 Edit Mode: Make active face hint part of the face color
This remove the hint on the face edges. This is because the hint was
displayed on both sides and was requiring to draw every edges twice.
2019-02-07 17:47:55 +01:00
a710af2b25 Edit Mesh: Rework new implementation and use geometry shader to draw lines
This make it (theoriticaly) compatible with all supported hardware with
consistent results.

Also we now draw the lines with analytic anti-aliasing instead of relying
on MSAA (which offers less benefits in our case).

The remaining aliasing comes from edges cut in half by the mesh which is
not rendered with MSAA. Hopefully this is not too much distracting and only
happen if the face is almost parallel to the view.
2019-02-07 17:30:10 +01:00
9b774dfa3b Edit Mode: Fix geometry shader workaround not respecting aspect ratio 2019-02-07 17:30:10 +01:00
dec4f6d7ed Bevel: better attachment points for unbeveled edges, arc miter. 2019-02-07 10:42:28 -05:00
4c42e949e9 GP: Reduce render noise pixel in blend borders 2019-02-07 16:31:03 +01:00
8cc5b68eb1 GP: Cleanup blend pixel function
Clear the function that blend pixels and change parameter.
2019-02-07 16:31:03 +01:00
f3c7f44f91 Merge branch 'blender2.7' 2019-02-07 15:49:41 +01:00
6fdc688cd0 Windows: refactor GHOST wintab handling.
This is backporting a change from 2.8, which may help solve crashes when
activating a window. Previously bringTabletContextToFront() would call
tablet API functions with NULL tablet, which may crash on some drivers.

Ref T60811.
2019-02-07 15:30:59 +01:00
58a1259469 Fix object.users_collection not including scene collections. 2019-02-07 13:01:01 +01:00
9c68ac0448 Show all useful metadata fields in editors
Is available when doing "View -> Show Metadata". Will draw all the
fields which are not part of the stamp at the bottom of the image.

Couple of hand-picked fields are ignored, since those are not very
useful to be seen.

Aimed to ease review of rendered shots.

Reviewers: brecht

Reviewed By: brecht

Subscribers: fsiddi

Differential Revision: https://developer.blender.org/D4316
2019-02-07 11:55:07 +01:00
0885484aa6 Fix T59587: Hair dynamics works different when opened in 2.8
Is a missing do-verisoning code in e3d31b8dfb.

Unfortunately, at this point it is rather tricky to tell old and new
hair dynamics modifiers apart. Probably easier to accept possible
breackage of the files which were created in 2.7 and saved during
2.8 which had incomplete do-version code.
2019-02-07 11:48:42 +01:00
937731dff1 Fix T61272: Undo fails to track multi-edit mode enter/exit
Objects leaving edit-mode weren't restored by edit-mode undo steps.
2019-02-07 20:28:33 +11:00
075a122190 Fix sculpt undo steps not enabling dyntopo
Logic to disable dyntopo when entering sculpt mode was applied on undo.
2019-02-07 20:28:33 +11:00
83d78eb32c Close metadata panels by default
They might be rather long, and not that commonly accessed.
2019-02-07 09:38:49 +01:00
9b86c90193 Fix for images without metadata crashing 2019-02-07 09:34:01 +01:00
d6c0f3796a Fix T61049: Undo dynamic topology sculpt asserts 2019-02-07 13:29:59 +11:00
a5869c367e Cleanup: remove unnecessary undo function 2019-02-07 10:09:56 +11:00
9df4602035 PyAPI: message subscribe option arg now optional 2019-02-07 09:36:52 +11:00
f11b5549ea Cleanup: doxy header 2019-02-07 09:36:52 +11:00
478be344fa Fix T61246: studiolights (un)install problems
- studiolights were not installed to their proper subfolder (thus not
recognized on blender restart)
- they were actually loaded with a wrong path which could lead to
deletion of the original source file when uninstalled again
2019-02-06 23:13:50 +01:00
7325035e60 DRW: support clipping for octahedral & box bones 2019-02-07 08:03:56 +11:00
6152f5cd67 Fix refresh on resetting header alignment 2019-02-07 07:49:11 +11:00
Dalai Felinto
5ed27372ab Remove no-longer needed function 2019-02-06 18:48:50 -02:00
Dalai Felinto
db231e87fc Fixup for outliner visibility not changing disable state
Show Inside (shift + click) was still forcing objects to be visible.
2019-02-06 18:48:50 -02:00
ac9daf3a27 Fix (unreported) crash when iterating on depsgraph instances from RNA.
This is a follow-up to rBb44e6f2b3d32, for some reason that issue was
not detected back then: in some cases, DEG_iterator_objects_next() will
free the temp list of dupli objects once it does not need it anymore,
henceforth freeing the dupli_object_current memory of the DEGObjectIterData
that we are storing in the RNA_Depsgraph_Instances_Iterator struct.

And yes, the uglyness of that hack is getting even better now...

Found while trying to export dupliobjects with FBX...
2019-02-06 21:13:52 +01:00
Dalai Felinto
766741b0aa Outliner visibility: Respect original viewport enable/disable state
Note: We still change it to the collection we are directly isolating/making
visible and its parents (in the case of isolating). But no longer its children.

Feedback and discussion on D4011. The motivation is that if we don't keep those
locked the disable state becomes useless.
2019-02-06 17:06:16 +00:00
Dalai Felinto
e3a3782d7f Outliner visibility unification: Prevent master collection visibility to change
Also satinizing the checks for master collection. The outliner tree
iterators already take care of not including the master collection
there.
2019-02-06 16:13:40 +00:00
fb15dfbddf Depsgraph: Fix dependency cycle when rigid body is involved
Was introduced by point cache reset on manual edits. Needed to
split evaluation and introduce an explicit init key, which allows
to hook up relations which are "monitoring" manual edits to the
channel.

Noticed while looking into T61190.
2019-02-06 17:08:24 +01:00
49e07dfdfb Fix T61190: Crash in particles distribution
Was visible with certain configuration only, is a numeric
instability caused by degenerate ray direction.

Not sure the distribution is correct, just fixing crash
which was caused by usage of watertight intersection.
2019-02-06 16:38:03 +01:00
8c87af7440 Improvements and fixes to Cycles metadata
This is a request by the studio here to make it possible to see how
many samples were used to render a specific shot or a frame. It is a
bit more tricky than simply stamping number of samples from a scene
since rendering is happening in multiple ranges of samples.

This change makes it so Cycles saves configured number of samples for
the specific view layer, and also stores start sample and number of
samples when rendering only a subrange of all samples.

The format used is "cycles.<view_layer_name>.><field>", which allows
to have information about all layers in a multi-layer EXR file.

Ideally we can store simplified "cycles.<field>" if we know that there
is only one render layer in the file, but detecting this is somewhat
tricky since Cycles operates on an evaluated scene which always have
single view layer.

The metadata is shown in the Metadata panels for clip, image and
sequencer spaces.

Example screenshot which shows the metadata:

{F6527727}

Reviewers: brecht

Reviewed By: brecht

Subscribers: fsiddi

Differential Revision: https://developer.blender.org/D4311
2019-02-06 16:11:51 +01:00
e21ae0bb26 Merge branch 'blender2.7' 2019-02-06 15:22:53 +01:00
fccf506ed7 Cycles: animation denoising support in the kernel.
This is the internal implementation, not available from the API or
interface yet. The algorithm takes into account past and future frames,
both to get more coherent animation and reduce noise.

Ref D3889.
2019-02-06 15:18:42 +01:00
c183ac73dc Cycles: tweak outlier detection, preparing for animation denoising.
Ref D3889.
2019-02-06 15:18:38 +01:00
405cacd4cd Cycles: prefilter feature passes separate from denoising.
Prefiltering of feature passes will happen during rendering, which can
then be used for denoising immediately or written as a render pass for
later (animation) denoising.

The number of denoising data passes written is reduced because of this,
leaving out the feature variance passes. The passes are now Normal,
Albedo, Depth, Shadowing, Variance and Intensity.

Ref D3889.
2019-02-06 15:18:29 +01:00
e8292466bc DRW: Support edit-metaball clipping 2019-02-07 00:07:30 +11:00
3e6ebdd2a6 DRW: Support edit-curve clipping 2019-02-06 23:25:31 +11:00
fea5e1dc3a Fix T57342: Crash on render with workbench render engine via command line 2019-02-06 12:16:24 +01:00
4547815847 Cleanup: Remove deprecated ghosting code
Most of this code is deprecated for many years already and does not
work at all in Blender 2.8.

Reviewers: brecht, aligorith

Differential Revision: https://developer.blender.org/D4271
2019-02-06 12:05:34 +01:00
6202bc82b8 Fix T60935: More numerically stable distance to ray computation
The old function was numerically very unstable for 2 reasons:
computing the square and then subtracting the results.

In the example in T60935 all precision was lost and it returned the distance 0
for all points.

I also removed the `depth` parameter since it wasn't used and computing
it would have made the code more complicated.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4308
2019-02-06 11:49:12 +01:00
f7613cf41c UI: tweak header position button
Be less prominent.
2019-02-06 21:39:57 +11:00
afd4bf8694 Fix T61136: Header alignment preference has no effect
Users expect this to apply to existing files,
adjust this to apply on load, defaults to off.
2019-02-06 21:20:15 +11:00
18e67813cd Clip editor: Fix drawing metadata for RGBA images
Need to disable blending prior to drawing metadata. Otherwise
text will be drawn on a transparent background.
2019-02-06 10:48:09 +01:00
f3cc63634a Cleanup: Spelling in comment 2019-02-06 10:12:46 +01:00
a6ef823ac4 Fix T61124: Lag on physics simulation
Need to synchronize simulated frame back to original object.

Solves the lag during transformation, but amount of floppyness is
lower for some reason. Final animated object behaves the same as
in older Blender though.
2019-02-06 10:12:46 +01:00
b294600ddc Fix T61051: crash with multi-object mixed mode snapping
rBec3357e03ab1 introduced multi-object snapping.
Seems like this was done without mixed-mode selections in mind.

So code assumed that all selected objects are actually armatures [which
can fail].
In 2.7 this was not a problem, because code only took active object into
account, 2.8 was iterating over all selected_editable_objects.

Now just iterate over objects in posemode instead

Reviewers: brecht, dfelinto

Maniphest Tasks: T61051

Differential Revision: https://developer.blender.org/D4287
2019-02-06 09:46:20 +01:00
2d5e2de88b Cleanup: remove unused toolbox delay preferences 2019-02-06 18:18:54 +11:00
ed53c8ea76 Cleanup: use '_pad' prefix for padding vars 2019-02-06 18:15:58 +11:00
48a36ff9e9 Cleanup: manually apply changes missed last commit
Automatic edits failed for indented comment blocks,
removed indentation & adjusted.
2019-02-06 15:52:04 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
1085c2cc44 Doxygen: don't warn on undocumented params
We don't attempt to have docs for all args, so don't warn about this.
2019-02-06 15:02:07 +11:00
f339b2fd41 Doxygen: update doxyfile 2019-02-06 15:01:04 +11:00
15ad01492e Cleanup: remove deprecated/unused preferences DNA 2019-02-06 14:34:50 +11:00
7f6a4bc416 Cleanup: use doxy headers for preference comments 2019-02-06 14:23:08 +11:00
cd2bf1fc91 Fix T61191: First undo step missing in text editor 2019-02-06 12:59:38 +11:00
e535ff44ff Undo System: remove accumulate/store modes
This complicated handling of undo steps in a generic way
especially switching between undo systems that stored data to ones
that accumulated changes.

Now each undo system must treat it's steps as check-point,
internally it can apply/rewind changes.

This commit also fixes projection paint where the object mode wasn't
following the undo steps.
2019-02-06 11:52:04 +11:00
8996e26116 Fix T61196: Mesh select ignores clipping
Select clipping now works when x-ray is disabled.
2019-02-06 10:34:09 +11:00
dbd7f36da8 GPU: refactor clipped drawing from DRW into GPU
Needed to fix T61196, supporting clipped back-buffer in the 3D view
which is done outside the draw module.

It was also inconvenient having DRW_shader_* versions of GPU_shader_*
API calls.

- Clipping distances are now supported as a shader configuration
  for builtin shaders.
- Add shader config argument when accessing builtin shaders.
- Move GPU_shader_create_from_arrays() from DRW to GPU.
2019-02-06 09:15:16 +11:00
a245d53351 Cleanup: style 2019-02-06 09:14:36 +11:00
Dalai Felinto
897e047374 Outliner visibility unification: Implement 3 levels of viewport visibility
Now collection and objects can be either:
* Disabled for all the view layers.
* Hidden for a view layer but not necessarily for all others.
* Visible for a view layer but not necessarily for all others.

Regarding icons: Whatever we decide to use for the "Hidden for all view
layers" needs to be a toggle-like icon. Because when viewing "Scenes"
instead of "View Layer" in the outliner we should be able to edit the
collection "Hidden for all the view layers" as an on/off option.

The operators are accessible via a Visibility context menu or shortcuts:
* Ctrl + Click: Isolate collection (use shift to extend).
* Alt + Click: Disable collection.
* Shift + Click: Hide/Show collection and its children (objects and collections)

Things yet to be tackled:
* Object outliner context menu can also get a Visibility sub-menu.
* Get better icons for viewport enable/disable.

Note:
* When using emulate 3 button mouse alt+click is used for 2d panning.
  In this case users have to use the operator from the menu.

See T57857 for discussion.

Patch: https://developer.blender.org/D4011
Reviewers: brecht and sergey

Thanks to the reviewers and William Reynish and Julien Kasper in
particular for the feedback.
2019-02-05 19:32:58 -02:00
Dalai Felinto
e3f7f0c3eb Outliner: eyes for collection affect collection visibility
As oppose to affect the collection objects' visibility.
2019-02-05 18:42:02 -02:00
Dalai Felinto
dc7f312326 Outliner: Gray out collections only when they are invisible
Re-factor of 4521d3e707.
2019-02-05 18:42:02 -02:00
7b22c3269b Fix/workaround issues in pose and edit mode
[re-committing]

Edit mode was unable to select, pose mode was unable to move bones.
2019-02-05 18:42:02 -02:00
Dalai Felinto
3d984aa150 Per view-layer collection visibility
[re-committing]

We still control this in the viewport collections visibility menu. But
now we are actually changing the visibility of the collections, not of
the objects.

If a collection is indirectly invisible (because one of its parents are
invisible) we gray it out.

Also if you click directly in the collection names, it "isolates" the
collection by hiding all collections, and showing the direct parents and
all the children of the selected collection.

Development Note:

Right now I'm excluding the hidden collections from the depsgraph.
Thus the need for tagging relations to update.

If this proves to be too slow, we can change.
2019-02-05 18:42:02 -02:00
Dalai Felinto
d1ef6be4a7 Fix T61204: Can't select Camera in stereoscopy mode
This was deliberately disabled since I didn't get the drawing working
originally. It is fully working now.

Note: camera lens widget still needs to be fixed since it still draws it
wrongly.
2019-02-05 18:40:23 -02:00
2778ecb58c UI: make drag lock work also when buttons have > 2 states or use callbacks.
This will help with upcoming outliner visibility icons with 3 states.

It is done by using the icon to identify the state. If that is not unique
there is no visible difference to users anyway.
2019-02-05 20:21:03 +01:00
4c6e7be44b Fix new EEVEE bloom / motion blur defaults not being applied to startup.blend. 2019-02-05 17:19:10 +01:00
07765499ab Fix strict compiler warning, breaking MSVC 2019-02-05 17:02:01 +01:00
08ab09cf04 Clip editor: Fixes for prefetch
Seems metadata was never read while prefetching, at least was
never requested to be read.

Also fixed prefetch for multilayer EXR.
2019-02-05 16:52:36 +01:00
3467e40e01 BKE_mesh_new_from_object(): do not generate temp obj/cu in Main.
When generating a mesh from a curve object, do not generate temp objects
and curves in main, but rather as 'localized' copies.

This is cleaner, and might add a marginal speed-up in some cases (like
rendering thousands of curve objects), since we save some processing.
Note that this is the function behind py API's `Object.to_mesh()` too.
2019-02-05 16:42:16 +01:00
cfc0790a45 Movieclip: Improve support of multilayer EXR files
Use first combined pass if possible. Is not ideal but better than
showing completely empty image.

Also, covers quite a lot of usecases when movie clip editor is
used to review animation render of single-layer renders but with
multiple passes.
2019-02-05 16:26:16 +01:00
7a2a08e0cd Edit Mode: Increase depth Bias for vertices 2019-02-05 16:12:50 +01:00
a13fb30917 Edit Mode: Fix loose edges edit mode normal display broken 2019-02-05 15:02:15 +01:00
5df56668d3 Edit Mode: Fix Xray edit mode broken due to recent refactor 2019-02-05 15:02:15 +01:00
773f3428cf Edit Mesh: Add workaround for system that does not support wide lines
This adds a new geometry shader (specific to edit mesh for now) that
reproduces the effect of glLineWidth > 1.0, since this is not supported on
all platform.

This fix could be generalized to other shaders later.
2019-02-05 15:02:15 +01:00
a131514d0f Edit Mesh: Fix some problem with new implementation
- Add manual depth offset to vertices and edges.
- Revert to plain edge decoration.
- Fix active edge coloring.
- Remove active face display if not in face selection mode.
- Add wide line support.
2019-02-05 15:02:15 +01:00
112cf6eadf Edit Mesh: Remove old unused code and files
Cleanup after recent refactor.
2019-02-05 15:02:15 +01:00
86193d25db Edit Mesh: Refactor Edit cage drawing to use old style drawing
This is work in progress. Look is not final.

This align data VBO data structure used for edti cage drawing to the one
use for normal drawing.

We no longer use barycentric coords to draw the lines an just rasterize
line primitives for edge drawing. This is a bit slower than using the
previous fast method but faster than the "correct" (edge artifact free)
method. This also make the code way simpler.

This also makes it possible to reuse possible and normal vbos used for
shading if the edit cage matches the

This also touches the UV batch code to share as much render data as
possible. The code also prepare for edit cage "modified" drawing cage (with
modifier applied) but is not enabled since selection and operators does not
work with modified cage yet.
2019-02-05 15:02:15 +01:00
f3f2602c88 UVEdit: Add function variants based on ToolSettings
This is better than passing a scene pointer when we don't have one.
2019-02-05 15:02:15 +01:00
e1b5fe156d Support showing metadata for multilayer EXR files
Quite straightforward: first, convert metadata from file to
stamp data which is stored in the render result, and then
for every requested layer/pass use that as a metadata.
2019-02-05 14:25:36 +01:00
56f5fd84fc UI: Add collection move & link to menu 2019-02-05 22:36:46 +11:00
1b4230d4b5 Cleanup: Add precision to comment. 2019-02-05 10:53:17 +01:00
41a15b7d6d Fix (unreported) linestyle/greasepencil actions not being duplicated by full scene copy.
Noted those as missing in XXX comments some time ago, running again on
that code I still see no reason for this missing feature, so now when
doing a full scene copy, including duplication of Freestyl's linestyles
and scene's greasepencil data, their potential Actions will also be
properly duplicated (like it was already the case for world, and scene
itself).
2019-02-05 10:53:17 +01:00
cfe8f76616 Cleanup: typo in comment. 2019-02-05 10:53:16 +01:00
8b716655e2 Cleanup: replace BKE_id_copy_ex by BKE_id_copy where possible.
That way it is obvious when we are using default ID copy behaviour, and
when we are using advanced/specialized ones.
2019-02-05 10:53:16 +01:00
846105d254 Cleanup: use LIB_ID_COPY_LOCALIZE in BKE_libblock_copy_for_localize().
This is a slightly more risky commit, as it is very difficult to fathom
all that may happen when localazing IDs. Would not expect any issue
though.

Note that a big TODO remain to refactor fully that ID localization
process (for 'shading IDs'), it's still doing pretty much same thing as
regular out-of-main copies, but the infamous ntree topic makes it
delicate to handle...
2019-02-05 10:53:16 +01:00
9469ebe1cc Cleanup: sanitize BKE_libblock_copy_for_localize() copy flags.
Asking to not copy animdata, but copy actions, is pure nonsense (and
make LIB_ID_COPY_ACTIONS flag totally useless/no-op).
2019-02-05 10:53:16 +01:00
5123ee74f8 Cleanup: Remove old deprecated BKE_libblock_copy_nolib() from BKE_library.
Was not used anymore, time to get rid of it.
2019-02-05 10:53:16 +01:00
b6771ccaf6 BKE_library: id_copy: More general usage of LIB_ID_COPY_LOCALIZE.
Turns out most of our 'local working copy' cases can use same set of
flags.

Note that this commit adds LIB_ID_COPY_CACHES to all our local meshes
copying, however this is no-op since that flag is unused during mesh
copying... We may want to add another set of flags without that one at
some point, but for now it would not be useful imho.
2019-02-05 10:53:16 +01:00
72724211df BKE_library: add 'no preview' flag to LIB_ID_COPY_LOCALIZE.
No local work copy is expected to need preview data, at least it should
not. Part of copy flags cleanup, done in separate commit in case
something goes wrong here...
2019-02-05 10:53:11 +01:00
b26c9dfcb2 Cleanup: initial regrouping of ID create/copy flags.
Those two first sets of flags should represent some common use cases.
The goal here is to reduce verbosity of calls to BKE_id_copy_ex, and
help make it more obvious the 'common behaviours' of ID copying across
codebase.
2019-02-05 09:49:50 +01:00
8ebb8add85 Cleanup: comments before items in enums. 2019-02-05 09:49:50 +01:00
6a686b0bfb Cleanup: BKE_library: rename id_copy to BKE_id_copy.
Time to follow conventions for that one as well.
2019-02-05 09:49:50 +01:00
7636e9785d Cleanup: BKE_library: remove 'test' param of id_copy.
This was used in *one* place only... much better to have a dedicated
helper for that kind of things. ;)
2019-02-05 09:49:50 +01:00
999f3985c0 Fix T61107: wmGizmo.test_select can't return -1
This is used to skip selection.
2019-02-05 18:39:57 +11:00
49618b0e18 Fix: Ensure that KeyingSet.bl_description field is properly escaped when using the Export to File operator
Previously, if double-quotes appeared in the KeyingSet.bl_description field,
these would cause a syntax error in the resulting .py script export of the
KeyingSet. Since single quotes are even more likely to appear
(e.g. as apostrophes), we now use triple quotes here.

Unreported bug, noticed earlier when investigating T61010.
2019-02-05 16:21:35 +13:00
af2d2d4dff Fix T58221: Spin tool w/ merge first/last crashes
Spinning geometry that included non boundary/wire edges
crashed when merge first/last enabled.
2019-02-05 13:30:07 +11:00
445433a691 Fix empty object front/back display in perspective views 2019-02-05 10:43:16 +11:00
2c84c23a07 Fix T61163: Single sided images show when viewed from side 2019-02-05 10:29:19 +11:00
40f2afcf1d Cleanup: remove contributors for Python files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:17:00 +11:00
ab5e69e660 Cleanup: remove contributors for CMake files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:10:32 +11:00
38984b10ff T61148: Particle properties can not be edited after keyframing
Was happening with certain settings for hair. Need to make a copy
of particle settings before modifying them via animation system.
2019-02-04 14:09:22 +01:00
ff2dd59d4a PyAPI: use _PyObject_LookupAttr
Unlike PyObject_GetAttr, this avoids setting the attribute error
only to clear it - under some conditions.
2019-02-04 23:35:23 +11:00
6b2a91efff Cleanup: use sys.platform instead of platform module
This was indirectly importing other modules we don't use at startup.
`sys.platform` is sufficient.
2019-02-04 23:07:06 +11:00
7e358b6181 Python: bump minimum version to 3.7
All platforms use 3.7 now, supporting both increases chance some scripts
will fail on older versions.
2019-02-04 22:00:30 +11:00
87aa456ea5 Fix T61172: Crash in texture paint undo/redo
Mixing texture paint undo w/ memfile undo was crashing.

The gputextures and render result are written to the FileData.imamap
but weren't read back.
2019-02-04 19:53:09 +11:00
55c29e36dc Undo System: add function to print undo steps
Useful for debugging.
2019-02-04 15:01:55 +11:00
b5c841498c Fix adding a paint texture slot not refreshing
Adding a new slot wasn't refreshing when the
object had no material.
2019-02-04 14:47:02 +11:00
e6a917cd4e UI: Use 'None' label instead of 'No' for Physics Type
Matches other enums in particle settings and pretty much all over Blender.
2019-02-04 01:45:53 +01:00
3be845ce20 Cleanup: Typos in comments (to to) 2019-02-04 01:23:48 +01:00
a6f045de3f UI: clarify ruler tooltip text
See T61151
2019-02-04 10:32:34 +11:00
838a34324a GP: Fix compiler error 2019-02-03 19:56:57 +01:00
2672552cf7 T61140 Shortcut Eraser and Eraser are not the same
Set default eraser with the last eraser used, and remove the toggle button from UI panel.
2019-02-03 13:27:47 +01:00
2a237377ce Fix typos 2019-02-04 00:41:14 +13:00
65340ad73f Fix T60753: Graph Editor showing cache curves regardless of filters
This commit adds a datablock filtering option for cache files channels,
so that a shot with lots of these in addition to standard animation
(e.g. the Spring production files) don't become bogged down by these.

Furthermore, these channels also respect the "Only Selected" toggle too now.
2019-02-04 00:41:14 +13:00
744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
141c6073ca WM: Event simulation support for Python
This feature is intended only for testing,
to automate simulating user input.

- Enabled by '--enable-event-simulate'.
- Disables handling all real input events.
- Access by calling `Window.event_simulate(..)`
- Disabling `bpy.app.use_event_simulate`
  to allow handling real events (can only disable).

Currently only mouse & keyboard events work well,
NDOF, IME... etc could be added as needed.

See D4286 for example usage.
2019-02-02 15:23:55 +11:00
99b8eef6a5 BKE_global: clear deprecated flags on load (all of them) 2019-02-02 14:45:42 +11:00
d46c910b1a Cleanup: match logic for merging G.f & G.fileflags on load 2019-02-02 14:01:48 +11:00
afcbf7cf13 Cleanup: use G_FLAG_*/G_FILE_* for G.f/fileflags
Was confusing eg: G_AUTOPACK belonged to G.fileflags, G_PICKSEL to G.f.
2019-02-02 13:49:13 +11:00
a53011d520 Cleanup: use enum for BKE globals 2019-02-02 13:29:52 +11:00
4ef09cf937 Cleanup: remove author/date info from doxy headers 2019-02-02 11:58:24 +11:00
a3bf8da875 Merge branch 'blender2.7' 2019-02-02 09:37:50 +11:00
9a63fa21eb Color management: change view transform for color pickers and display modes.
* Use simple default view transform for color pickers, as Filmic does not work
  well for all types of colors. We better handle this with an option and tagging
  of colors as emissive or albedo like.
* For solid/workbench we also no longer use Filmic, as there is not enough contrast
  and it's not really needed since this is not physically based lighting.
* For lookdev always take into account the view transform and look. Other view
  settings like exposure are only taken into account if scene lighting is used,
  since these are often dependent on scene light intensity.

Fixes T61022, T57649, T59363.
2019-02-01 20:56:42 +01:00
81fc55f563 Fix T61010: Keying Set - Description edit box disabled, for internal use only.
Wrong property flag for that one, KeyingSet is a regular RNA class, not
a registrable 'interface' one, unlike KeyingSetInfo...
2019-02-01 20:35:33 +01:00
81159e99b8 Fix T61078: Cycles crash with adaptive smoke sim playback.
3D image dimensions should be updated on the Cycles side before loading
the smoke data.
2019-02-01 19:08:49 +01:00
f92b8c2613 Fix T58206: Eevee light energy soft maximum is too low. 2019-02-01 18:04:00 +01:00
530d9f454c Cleanup: Remove manually missing original author
Name was part of the header GPL text.
2019-02-01 17:20:05 +01:00
b8e409ba98 GP: Cleanup retiming to do in same loop 2019-02-01 17:14:28 +01:00
fdc12395c3 Fix T61071: GP Cutter / Boxes bug
Now when remove points from a cyclic stroke, the last island is joined with first island in order to fill the gap of the cyclic.

This change affects not only to cutter, but to any delete process in cyclic strokes.
2019-02-01 16:50:49 +01:00
d70350403f Cleanup: manually remove header text not handled by automation 2019-02-02 02:41:25 +11:00
8c68ed6df1 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 02:40:00 +11:00
3b57a0d854 Cleanup: remove original author
Missed when removing contributors.
2019-02-02 02:32:20 +11:00
d9d72cc9cb Fix T61043: Blender crashes on VSE zoom / scroll timeline sometimes 2019-02-01 15:58:27 +01:00
6cbb4c576a Cleanup: manually remove header text not handled by automation 2019-02-02 01:49:31 +11:00
6bdbbcd683 Workaround for missing hair after opening the file
Restore reset on file open, at least for now.
2019-02-01 15:40:19 +01:00
227ed1aa35 Fix T60451: Soft body cache not being cleared when it should
Manual edits to object or its dependencies should reset the
point cache. Added special relations for this now.
2019-02-01 15:40:19 +01:00
97fa7974da Cleanup: Shuffle arguments in most used order
Quite often we need to create nodes which defines various
evaluation stages.
2019-02-01 15:40:19 +01:00
a1aa908a31 Depsgraph: Remove placeholder operation 2019-02-01 15:40:19 +01:00
039792caf3 Depsgraph: Use scene operation code
Hopefully, this is the last one.
2019-02-01 15:40:19 +01:00
b78f29b049 Depsgraph: Use operation code for file cache update
All done in separate commits, so it's easier to bisect just in case.
2019-02-01 15:40:19 +01:00
0d2dfd2e2d Depsgraph: Use operation code for armature evaluation 2019-02-01 15:40:19 +01:00
4a30674102 Depsgraph: Use operation code for dupli-group 2019-02-01 15:40:19 +01:00
c1cf4c29da Depsgraph: Use operation code for geometry evaluation done 2019-02-01 15:40:19 +01:00
a86001c56a Depsgraph: Use operation code for geometry evaluation
Affects object data datablocks. Similar to previous commit.

Should not have any functional changes, just some sanitization
to make code more clear.
2019-02-01 15:40:19 +01:00
700e3cc2a8 Depsgraph: Use operation code for geometry evaluation init
Makes it more explicit and avoids strings comparisons during build.
2019-02-01 15:40:19 +01:00
6a54f3bb49 Depsgraph: More clear name for geometry evaluation
For ears it was already how we evaluate modifiers. There is no
need to go more granular than is actually needed. And no need
to use some obscure prefix for operation.
2019-02-01 15:40:19 +01:00
654ae4145f Cleanup: Space for foreach macro 2019-02-01 15:40:19 +01:00
be05abc86a Depsgraph: Add some sanity checks to ensure valid relations 2019-02-01 15:40:19 +01:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
e4b02334e7 Update submodule hashes, take 2 2019-02-01 15:15:37 +01:00
6398af5048 Ensure submodules point to blender2.7 hashes 2019-02-01 14:51:15 +01:00
7b05b2564d Fix T61088: Cycles particle viewport render stuck in loop.
Object to be instanced should not be modified.
2019-02-01 13:56:13 +01:00
7f0e773dcd 'make links': rename group -> collection in enum in UI
also rename dupli -> instance

Fixes T61086

Reviewers: billreynish

Maniphest Tasks: T61086

Differential Revision: https://developer.blender.org/D4294
2019-02-01 10:58:12 +01:00
1b7c361fbb WM: disable undo operators in background mode & at startup
Show an error instead of crashing, see: T60934
2019-02-01 14:11:26 +11:00
552b2287db Logging: Use CLOG for blenkernel
Part of D4277 by @sobakasu
2019-02-01 12:46:39 +11:00
8a51af7d1c Cleanup: correct doxy headers 2019-02-01 08:41:35 +11:00
7b08c62841 Fix build errors on Visual Studio after recent changes.
SYNCHRONIZE is a Windows macro.
2019-01-31 19:59:13 +01:00
8c2a978b03 UI: rename Free Bake to Delete Bake.
"Free" is more of a programming term related to memory allocation, not a term
we need to use in the interface. Ref T61054.
2019-01-31 19:49:47 +01:00
27d799698d Fix T61065: missing shader update when adding texture slot. 2019-01-31 19:33:38 +01:00
92fa42f2ce Fix T60973: crash baking objects disabled for rendering. 2019-01-31 18:12:26 +01:00
78daa53e89 Fix T61072: missing viewport update when setting render border in image editor. 2019-01-31 18:01:47 +01:00
a37e889aeb Fix T61013: changing top/status bar editor type can be changed with shortcut. 2019-01-31 18:01:47 +01:00
5c5de14ad7 Cleanup: avoid some unnecessary inverse matrix math. 2019-01-31 18:01:47 +01:00
6075b0a454 Fix wrong sculpt constant detail description. 2019-01-31 18:01:47 +01:00
208a0808b3 Fix T60836: Stretch to flickers when vertex group is used
Missing relation to object transform. Needed to convert vertex
position from local target object space to a local space of the
bone.
2019-01-31 17:57:01 +01:00
9d10fc13e7 Fix T61046: Object with cloth jumps around
Was happening due to missing relation from geometry to
transform component. Did not happen in old dependency
graph because that one could never evaluate geometry
prior to transform.
2019-01-31 17:38:01 +01:00
e7dfe15702 Fix T61061: Scopes in image editor are not updating
Scopes were moved to properties area, so need to adjust
the optimization part of tagging.

Ideally, tagging will always happen (and happen for free)
and then drawing code will update scopes when they are
actually displayed. But this is outside of the scope of
this fix since requires some design changes.
2019-01-31 17:15:24 +01:00
d2f3378249 Fix T59339: Particle render without baking issues
The issue was caused by dependency graph resetting particles
when evaluating copy-on-write version of object. Solved by
only doing reset from dependency graph on user edits.

Other issue was caused by modifier itself trying to compare
topology and reset particles when number of vertices or faces
changed. This isn't reliable, since topology might change even
with same number of elements. But also, since copy-on-written
object initially always have those fields zero-ed the reset
was happening on every F12.

The latter issue is solved by moving reset from modifier stack
to places where we exit edit/paint modes which might be changing
topology.

There is still weird issue of particles generated at some
weird location after tapping tab twice, but this is not a new
issue in 2.8 branch and is to be looked separately.
2019-01-31 16:53:19 +01:00
0d2b977c3b Particles: Fixes for synchronization to original
Was missing synchronization of current frame to the original one,
which is one of the issues why point cache does not properly reset
on edits.

Also clear recalc flag on original particle system.

Ideally we need to get rid of recalc on a particle system, since
that is not really covered by tagging system of dependency graph.
2019-01-31 14:57:58 +01:00
72863eb036 Remove direct shape key drivers evaluaiton in object update
This is now hanbdled by the nodes in dependency graph.
2019-01-31 14:31:41 +01:00
c1da8e3b28 Depsgraph: Comb code to a better state all over
Some summary of changes:

- Don't use DEG prefix for types and enumerator values:
  the code is already inside DEG namespace.

- Put code where it locally belongs to: avoid having one
  single header file with all sort of definitions in it.

- Take advantage of modern C++11 enabled by default.
2019-01-31 14:31:41 +01:00
7ccef23c4d Add C++ guards to some blenlib headers 2019-01-31 14:22:46 +01:00
9a7ea778b3 Fix T61030: Drivers for shape keys not evaluated in correct order
Was happening when value of one shape key was driving property of
another shape key of same datablock.

Solved by making shape key blocks properties more granular.
2019-01-31 13:00:11 +01:00
13de53ecc5 Depsgraph: Specify whether RNA path to be resolved as entry or exit
Makes it more explicit whether RNA property is used as a source
dependency for something else, or whether some other dependency
is being hooked up to evaluate that property.
2019-01-31 13:00:11 +01:00
39de1dc342 Cleanup: Spelling in comment 2019-01-31 13:00:11 +01:00
3ea54688b1 Depsgraph: Use more correct update source for an internal tags
Dependency graph will poke some IDs for recalc after finishing building.
Those shouldn't be considered as a user edit.
2019-01-31 13:00:11 +01:00
83ec5fbf8d Depsgraph: Use more clear name for enumerator
Matches enumerator items and type name.
2019-01-31 13:00:11 +01:00
77eaa4790d Fix T61032: Switching to sculpt tab causes undo to set object mode
Workspace switching changed modes w/o the 3D view,
causing sculpt undo's poll function to fail.

Applied the same logic for texture paint too.
2019-01-31 22:58:52 +11:00
b5e93b02c9 Fix T60996: Dyntopo flood fill fails due to missing ob->imat
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4285
2019-01-31 12:42:51 +01:00
f4c0dacde7 Fix: allow curve of driver to be evaluated individually
This is necessary when adding a new keyframe to a fcurve
that also has a driver.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4278
2019-01-31 12:19:33 +01:00
83f8f44791 Fix T59495, T59992, T59904, T59178, T60598: broken keyframed value editing.
This removes a bunch of animation/driver evaluations and recalc flags that
should be redundant in the new depsgraph, and were incorrectly affecting
the evaluated scene in a permanent way.

Still two cases that could be removed if the depsgraph is improved, in
BKE_object_handle_data_update and BKE_cachefile_update_frame.

For physics subframe interpolation there are also still calls to
BKE_object_where_is_calc that should ideally be removed as well, though
they are not known to cause keyframing bugs.

Differential Revision: https://developer.blender.org/D4274
2019-01-31 12:04:57 +01:00
7400aa7e59 Depsgraph: remove features incompatible with new system.
Some features are incompatible with multithreading and reliable evaluation
of dependencies. We are now removing them as part of a bigger cleanup to
fix bugs in keyframing and invalid animation evaluations.

* Dupliframes have been removed. This was a hack added before there were
  more powerful features like the array modifier.
* Slow parent has been removed, never worked in 2.8. It was always
  unreliable for use in production due to depending on whatever frame was
  previously evaluated, which was not always the previous frame.
* Particle instanced objects used to have their transform evaluated at
  the particle time. Now it always gets the current time transform.
* Boids can no longer do predictive avoidance of force field objects,
  but still for other particles.

Differential Revision: https://developer.blender.org/D4274
2019-01-31 12:03:05 +01:00
3e072da45b Fix T60432: Blender crashes when dragging objects from other scene from outliner. 2019-01-31 11:03:28 +01:00
8f4b7d706b Sculpt: disable undo flag for sculpt mask lasso
While this is harmless, it did cause T55399 in the past.

Sculpt adds it's own undo steps, so don't request the operator type
to do it too.

This is consistent with other sculpt operators.
2019-01-31 18:51:14 +11:00
77254df480 Fix T59293: Can't assign shortcut to undo history 2019-01-31 17:27:46 +11:00
e8cea26bd7 Cleanup: use doxy comments, clarify some text 2019-01-31 16:35:33 +11:00
6df68efcbb Fix edit-mesh undo using the current selection
Any meshes selected would be added to the mode when reading undo.
2019-01-31 16:06:28 +11:00
293f4d88da Cleanup: style, unused variable 2019-01-31 15:54:37 +11:00
9407456e3f Cleanup: remove EM_IGNORE_LAYER
Call ED_object_editmode_enter_ex instead.
2019-01-31 15:36:24 +11:00
c454db2746 Fix T61047: Undo editmesh separate crashes
Favour G_MAIN in functions that might free it.
2019-01-31 15:07:47 +11:00
5afc247ea1 Fix image paint undo memory leak 2019-01-31 12:35:40 +11:00
8c89790674 Fix T60660: Texture paint undo removes image 2019-01-31 12:07:13 +11:00
51bba03b31 Undo System: add Main argument to encode/decode
Needed since we don't always have the context,
and avoids adding G_MAIN into undo callbacks.
2019-01-31 12:07:13 +11:00
d16e4d077d Fix T61028: Crash when entering wireframe view 2019-01-31 01:35:09 +01:00
da1da3053d Cleanup: add trailing commas
Improve clang-format output.
2019-01-31 08:30:45 +11:00
b21bd431e3 Fix T60378: All armatures reset positions on linked collection when ctrl+z used on anything.
Issue actually exists since ages, probably 2.7x update system forced all
armature proxies to be fully refreshed after an undo?

In any case, proxy_from should only be reset for 'local' proxies (i.e.
directly linked datablocks), not for linked proxies...
2019-01-30 20:34:26 +01:00
f4b1f1f0be Merge branch 'blender2.7' 2019-01-30 18:36:54 +01:00
ab682b1558 Cleanup: use better names for depsgraph driver relations.
Both the driven properties and driver targets were called targets, now make
a distinction.
2019-01-30 18:36:34 +01:00
6164983f9d GP: Remove DEG_get_original_id() from draw manager
Only keep this function when drawing to avoid COW overhead that reduce performance.

After some changes I did some time ago, the use of original ID was not required and this only added depsgraph overhead and problems.

This change solves the problems with updates in render mode.

Related to T57484 and the changes requested by Sergey.
2019-01-30 16:29:38 +01:00
1ceaca7f64 Fix T61017: node_shader_utils did not handle diffuse_color correctly 2019-01-30 14:37:09 +01:00
e08156d799 Fix default material using zero alpha 2019-01-30 23:54:07 +11:00
93dc2d373f Fix (unreported) memleak when copying object and its material with GP settings.
Like... seriously?
2019-01-30 12:00:58 +01:00
534573f6b9 Fix T60957: ASSERT when reloading double-linked file.
Kind of funny to see that this has been missing presumably since the
first version of library linking in Blender, and only gets noticed now.
Then again, that was not really a critical issue, iirc write code
ensures all libraries directly used get properly written, even if flags
are incorrect.
2019-01-30 11:46:49 +01:00
e074204d2f Cleanup: use proper bitflag operators. 2019-01-30 11:38:13 +01:00
25f0284090 Cleanup: Unused function argument 2019-01-30 11:02:36 +01:00
7744203b7f Cycles: improved rounding of sample chunks for resumable renders
When using `--cycles-resumable-num-chunks N` to render a subset of the
samples, having N close to the total number of samples causes rounding
issues.

For example, a file configured for 250 samples and 150 chunks should
have 1.6666 sample per chunk. The old code rounded this to 2 samples per
chunk, which would result in too many samples being rendered. When
rendering a single chunk this doesn't matter much, but when larger chunk
ranges are rendered with `--cycles-resumable-start-chunk` and
`--cycles-resumable-end-chunk` the rounding errors start to add up.

By multiplying with the number of chunks to render first, and only round
to integers after that, this issue is solved. In the above example,
rendering 3 chunks will correctly render 5 samples rather than 6.

When the requested number of chunks is larger than the number of samples
there will be duplicate samples (that is, sample N appearing both in
chunk M and M+1). In this case a warning is printed to stderr.

This is needed for T50977 Progressive render: use non-uniform sample
chunks.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D4282
2019-01-30 10:51:06 +01:00
fbfe360cb1 Fix T60974: Dyntopo crash on undo after object deleted
Add the ability for undo steps to request memfile undo step added after
them, useful for mode switching, where we need the data to exist for
undo to enter the mode.
2019-01-30 20:44:15 +11:00
a1ae04d15a Versioning: add renaming utility function
Avoids accidents creating duplicate names.

Also ensure screens are sorted on rename.
2019-01-30 09:41:28 +11:00
7894d6c6f1 Cleanup: line length 2019-01-30 09:06:44 +11:00
7d91ef0488 Partial fix for T60982: Editable anim settings in linked action.
This is only partially working, because some bAnimListElem items do not
have any ID pointer set (for wome mysterious reason...), notably the
'group' ones.

Will re-assign to @aligorith for that, this code is rather complicated
and hard to follow (with all those macros ;) ).
2019-01-29 21:49:46 +01:00
93b63537e2 Cleanup: typo in comment. 2019-01-29 21:49:46 +01:00
1a61c209a0 Workbench: Make Material transparency part of the rgba color picker
It is only used for solid mode for now but could be used by eevee in the
future.
2019-01-29 20:34:37 +01:00
43150b02a0 Workbench: Opti: Only request OIT buffers if needed 2019-01-29 20:34:11 +01:00
2cc69a5e20 Workbench: Support transparency from object color alpha
Support the alpha channel use of the object color in solid mode.

The Transparency effect is still using the Xray algorithm and not
true Alpha blending.
2019-01-29 20:34:11 +01:00
Pablo Vazquez
ea3f5af962 UI: Add Dynamic Topology toggle entry to Sculpt menu
Helps to find the shortcut (Ctrl+D) which wasn't exposed anywhere else than in search.
2019-01-29 18:58:34 +01:00
Joel Godin
9552d4b321 Fix: Add units to text offset_x and offset_y properties
Differential Revision: https://developer.blender.org/D4281
2019-01-29 18:31:39 +01:00
2ff6b2925a Fix T60067: some modifiers don't use shape keys correctly 2019-01-29 17:57:21 +01:00
001414fb2f Cycles: delay CUDA and OpenCL initialization to avoid driver crashes.
We've had many reported crashes on Windows where we suspect there is a
corrupted OpenCL driver. The purpose here is to keep Blender generally
usable in such cases.

Now it always shows None / CUDA / OpenCL in the preferences, and only when
selecting one will it reveal if there are any GPUs available. This should
avoid crashes when opening the preferences or on startup.

Differential Revision: https://developer.blender.org/D4265
2019-01-29 17:00:02 +01:00
33dcf9fa71 Add missing Shader FX remapping to library query 2019-01-29 15:41:24 +01:00
8134f3f0a6 Workbench: Add "Shadow" factor to Xray
This just maintain more parity accross the 2 visuals. Note that this is not
"real shadowing" just the facing factor shadowing.
2019-01-29 15:07:53 +01:00
bc99f4903c Workbench: Add transparency support for materials
This adds the posibility of having certain materials transparent in solid
mode. The option is (for now) per material only and thus only shows in
material color mode.

This uses the same rendering technique as Xray mode.

Note that objects are not considered transparent for selection with this.
2019-01-29 15:07:53 +01:00
d88492d4ad Object Mode: Fix reading past buffer end when drawing camera 2019-01-29 15:05:51 +01:00
314ea1b1c7 Workbench: Depth Of Field: Improve noise and Large radius
- Add noise to remove undersampling artifact
- Create 2 mipmaps to the scene color buffer in order to have bigger blurs
- Replace blur2 with a 3x3 median filter that doesn't dilate the highlights
- Use temporal accumulation to remove noise

For some reason all of this exacerbate some bleeding issues happening on
far foreground elements from near foreground elements. The actual problem
was already happening before but was not really noticeable. It needs some
more work to be fixed.
2019-01-29 15:05:51 +01:00
475a07cd0c Fix duplicate brushes from recent startup files
Default versioning caused duplicates when the startup was re-saved.

See c305759762
2019-01-29 23:53:37 +11:00
3b6e4cf7ce Fix T60226: Inset not working well on very small faces
The inset operator uses 0.01 as default for the inset.
When the face is very small than this default is very confusing (see T60226).

The simplest fix seems to be to just use 0 as default.
This is similar to the extrude operator which uses 0 as default as well.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4273
2019-01-29 13:39:55 +01:00
79f76c8544 Bevel - better corner shapes for inner arc miters.
The subdivision method for getting corner shapes has a fullness
parameter which had been set by eye before. This change uses fullness
as found by offline search process to best match the superellipsoid
octant in the cube corner case (except cube corner case is still handled
by other code). This somewhat improves the look of cube corners with
inner arc miters, however.
2019-01-29 07:21:59 -05:00
e37b9b5d0d Revert "3D Text: avoid checking null character's text on path"
This reverts commit 8a379e3460.

Caused T58284
2019-01-29 22:54:35 +11:00
964a3f1097 Revert "3D Text: avoid checking null character's text on path"
This reverts commit 8a379e3460.

Caused T58284
2019-01-29 22:50:55 +11:00
8683a4ba40 Fix T59924: Blender 2.8 particle system error
Was missing relation from particle keyed targets to the
particle system, which caused some race conditions.
2019-01-29 10:34:37 +01:00
851d58b34f DRW: support clipping for all lamp types 2019-01-29 20:27:28 +11:00
68ae1f4958 Fix CLOG_STR_AT_SEVERITY macro
Part of D4277 by @sobakasu
2019-01-29 17:28:44 +11:00
c305759762 Fix duplicate brushes being added to startup
All builtin templates have this brush.
2019-01-29 16:27:00 +11:00
78719abc01 Fix T60809: Crash undoing object rename in edit-mode
Currently names are used for edit-mode undo-steps,
any changes to Main ID names cause lookup failure (crashing).

This commit ensures any undo steps that use ID lookups have the same
mem-file undo state loaded that was used to encode the steps.

Renaming also has an undo push added (last commit).
2019-01-29 15:29:22 +11:00
59a0a143dd Library: tag memfile undo for writing after rename
Needed for T60809 fix.
2019-01-29 14:28:55 +11:00
957b4547ae Cleanup: Remove unused MTex.texflag 2019-01-29 09:11:05 +11:00
097b1cd08a Cleanup: remove immediate mode TODO
We've managed without these functions and can add them if needed,
this TODO isn't helping.
2019-01-29 08:42:46 +11:00
68cab3aff6 Cleanup: replace attrib w/ attr
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
2019-01-29 08:32:25 +11:00
a9c2971658 Merge branch 'blender2.7'
Conflicts:
	source/creator/CMakeLists.txt
2019-01-28 22:27:45 +01:00
e63869ca80 Fix T60896: Missing update for Auto Texture Space. 2019-01-28 22:25:26 +01:00
491a98ca44 Outliner: Enable new faster 'Delete Hierarchy' code by default.
Some more tests showed no issue, so now feeling reasonably confident.

Old, 'safer' one remains available through setting debug value to 666,
for a few more weeks.
2019-01-28 21:57:56 +01:00
5537117366 Fix several missing cases of copy func for modifiers.
Any time a modifier data has non-ID pointer, it should have own copy
function (and also take care of proper init/reset in its init callback).
2019-01-28 21:49:23 +01:00
147e22ef70 Fix T60840: Serious memleak in solidify modifier.
Another one painful to pin down, due to misleading info in report, and
more than anything else, waaayyyyy too complex example file!
2019-01-28 21:49:23 +01:00
cad1016c20 Fix T60944: Add Tablet eraser support to annotations usin pen 2019-01-28 17:46:11 +01:00
55e171be33 Fix T60566: Warnings in rigid body and certain conrfiguration
Was visible when constraint object is not directly visible via
view layers, need to indirectly pull it into the graph.
2019-01-28 16:39:55 +01:00
a8c0a57fc3 Fix T60599: Multires crash after doing dyntopo sculpt 2019-01-28 16:14:30 +01:00
56cc219070 Fix T59963: Can't manipulate hair keys with G, R, S or mirror transforms
Need to pass proper evaluated mesh to calculate hair matrix.
2019-01-28 15:45:34 +01:00
9bc43223c1 DRW: support clipping for object & lamp centers 2019-01-29 00:27:43 +11:00
20acf3ded2 makesrna: write files w/ spaces instead of tabs
We're preparing to move to spaces, having literal tabs in strings
complicates conversion a little, move makesrna to spaces now.
2019-01-28 23:08:59 +11:00
f992c92872 Fix blenderplayer build after OpenMP changes. 2019-01-28 13:05:40 +01:00
704b336899 Make scene statistics to respect locked interface
Interface is being locked when some destructive operations
are called from non-main thread.

This was causing crash with particles in T60065.
2019-01-28 12:49:45 +01:00
cb69a039e7 Merge branch 'blender2.7' 2019-01-28 22:27:00 +11:00
2e3433c1f7 Fix T60127: Particles texture mapping coordinates objects
Part of the issue was a missing relation. Other part wes
aboud object's inverse matrix never being updated.
2019-01-28 12:19:25 +01:00
66d03f61b8 Cleanup: unused struct declarations 2019-01-28 22:15:46 +11:00
f8ce24f796 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 22:12:49 +11:00
409a21b32e Merge branch 'blender2.7' 2019-01-28 12:05:51 +01:00
66e6cd5315 Cleanup: unused struct declarations 2019-01-28 22:06:53 +11:00
d918217d35 OSL: remove fresnel template that was not public domain.
Convention is to only have public domain code templates. Also fixes wrong
license header in Cycles.
2019-01-28 12:04:54 +01:00
801901a652 Fix T57069: macOS window contents scaling bug.
The cause of this is unclear, but delaying querying the native pixel size
appears to help in the one case I could reproduce.
2019-01-28 12:01:29 +01:00
c0f88ed8a8 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
Scott Spadea
d473d5be5f Fix: use correct units for some bone properties
Differential Revision: https://developer.blender.org/D4267
2019-01-28 11:01:46 +01:00
e6ba760ce8 Fix: allow removal of addons that are symlinked
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4256
2019-01-28 10:52:54 +01:00
Scott Spadea
534891997a Fix: use pixel as unit for some properties
Differential Revision: https://developer.blender.org/D4266
2019-01-28 10:50:32 +01:00
690478027b Merge branch 'blender2.7' 2019-01-27 20:17:11 +01:00
d377cd5db1 Fix Cycles standalone build as part of Blender. 2019-01-27 20:05:25 +01:00
d97df138d1 Fix T60908: crash in workbench render after DoF changes. 2019-01-27 13:55:18 +01:00
Łukasz Kwoska
f17afe69a3 Fix: Use correct units in Shrinkwrap modifier
Differential Revision: https://developer.blender.org/D4261
2019-01-27 12:23:34 +01:00
25772c9e1d Fix T59921: RuntimeError:bpy.ops.object.gpencil_modifier_apply()
Thanks to Brecht for his help
2019-01-26 16:19:22 +01:00
94d88df3a8 Merge branch 'blender2.7' 2019-01-26 15:54:13 +01:00
b7a9e980a1 macOS: add support for OpenMP, making smoke/fluid/cloth simulations faster.
This bring macOS on par with Windows and Linux. It uses the OpenMP library
added to our precompiled libraries.

Custom flags are set because FindOpenMP from CMake below 3.12 does not support
AppleClang, and more recent versions do not work with our custom directory
location either.

Differential Revision: https://developer.blender.org/D4257
2019-01-26 15:48:56 +01:00
Robert Guetzkow
115e1d441b Cycles: add missing units for properties.
Differential Revision: https://developer.blender.org/D4258
2019-01-26 15:38:50 +01:00
0b28a9a446 Fix build error after recent cleanup. 2019-01-26 15:38:49 +01:00
8d4c4775a0 Cleanup: fix compiler warnings. 2019-01-26 14:49:11 +01:00
Valentin
2a41ea7cc5 Fix: Use correct units for cloth properties
Differential Revision: https://developer.blender.org/D4260
2019-01-26 13:37:29 +01:00
9e3ac14341 Fix incorrect sizeof use in rna array formatting 2019-01-26 23:18:12 +11:00
04a5dbbd09 Correct build error removing includes 2019-01-26 23:08:11 +11:00
f20dbc293f Cleanup: blank lines over doxy headers 2019-01-26 21:43:24 +11:00
1e4aab36c2 Cleanup: remove redundant BKE/BLI/BIF headers 2019-01-26 21:20:25 +11:00
19b5f5493c Cleanup: draw manager headers 2019-01-26 20:08:52 +11:00
b8467273b8 Cleanup: redundant defines
Comment or remove unused defines.
2019-01-26 19:15:30 +11:00
b70877bba7 Cleanup: remove blender-internal update flag 2019-01-26 18:46:40 +11:00
edd34c924b Cleanup: wrapper for built-in shader access 2019-01-26 16:39:05 +11:00
77b66a9666 DRW: support clipping for empty object 2019-01-26 15:49:14 +11:00
9b40da94a3 Keymap: move grease pencil Alt-C to 2.7x map
This has been removed from the default map, so don't use elsewhere.
2019-01-26 12:56:56 +11:00
1b6da95ccb Cleanup: avoid static vars to store legacy shaders 2019-01-26 10:33:14 +11:00
1393335227 GPU: refactor defines into GPUShaderStages
Code comment notes there are "just a few",
now there are enough it's useful to include in GPUShaderStages.
2019-01-26 10:33:14 +11:00
0e95abf74b Cleanup: order GPUShaderStages (vert, geom, frag)
Use names for declarations to support adding defines, coming next.
2019-01-26 10:33:14 +11:00
c1814d593d Workbench: Depth Of Field: Add toggle option in shading popover
Pretty straight forward. Just an option to turn the DoF per viewport.
Default is off as in 2.79.
2019-01-25 21:56:10 +01:00
3223644d14 Workbench: Depth Of Field: Cleanups 2019-01-25 21:56:10 +01:00
ca739ac1d5 GP: Apply scale to particles
The particles were using the scale of the original object and the thickness of the stroke was not correct. Now, the scale is applied by particle.
2019-01-25 20:40:56 +01:00
16c3425fe6 GP: Set cyclic to OFF when use cutter
When cut a stroke, the cyclic must be set to off because keep it gets very weird results.
2019-01-25 20:01:29 +01:00
8bd55cf3d5 Ammend to rBea5326df86cb.
As suggested by @sergey, better use RECALC flag dedicated to pointcache.
2019-01-25 19:54:25 +01:00
Dalai Felinto
699b49e8e9 Fix T58142: Crash when use Cycles to render stereoscopy
This is a quick workaround to prevent the crashes with multi-view.
The ultimate solution can be plenty, and would turn around refactoring
Cycles to handle multi-view internally, so that depsgraph could be freed
before render with no problems.

Reviewers: brecht, sergey

For the complete discussion check: https://developer.blender.org/D4239
2019-01-25 16:04:26 -02:00
Dalai Felinto
fa1d5586a1 Fix Freestyle (ASAN detected) crash
This was very simple to reproduce, just turn on Freestyle and press render.

Now to the truth of things. Most (if not all) of
~BlenderStrokeRenderer() can be removed. I believe this was done back
when freestyle was using G.main, and since we gave freestyle its own
main we can just leave the cleanup for later.

I will leave this for freestyle maintainers to think over though.

Note: There is a chance this was the issue reported on T57890. I will
wait for the reporter to confirm this as fixed though.
2019-01-25 14:58:35 -02:00
da6bda6483 Fix T60783: (Certain) shapekeys stopped working in 2.8.
This commit adds another optional check (when `--debug-io` is set) on
write .blend process, to check and ensure all shape keys have their
'from' pointer properly set to their respective user ID.
This is intended to be used as debuging tool mostly (to try to detect
when/why some of those pointers can become NULL).

For now, it also systematically perform same checks/fixes when loading a
.blend file, to fix all broken ones laying around. Later we might move
that usage to a do_version instead, but for now think it's safer to
always perfom it (and it's rather cheap process anyway).
2019-01-25 17:46:09 +01:00
a42441d145 ShapeKey: add utils to say whether given ID type supports shapekeys.
Those kind of checks are handy to have for generic processing...
2019-01-25 17:46:09 +01:00
2a7b74c237 Cleanup: BLO: move validate code into own header.
Does not make sense to keep that with BLO_writefile.h, this can also be
used by read code, and some other parts of Blender (like ed_undo.c
currently)...
2019-01-25 17:46:09 +01:00
693721cc7e Fix T55462: Ungroup in Node editor crash Blender
If ID doesn't want to do user counting it shouldn't be in main.
2019-01-25 16:49:40 +01:00
Dalai Felinto
d96f1fcd39 Fix T60775: Stereo drawing in image editor broken (shows only right eye) 2019-01-25 13:00:20 -02:00
Pablo Vazquez
5e6487e1f2 UI: Particles
Dupli Collection -> Instance Collection
2019-01-25 15:30:33 +01:00
Pablo Vazquez
9c78302a35 UI: Particles. Open render type panels by default
Render-type panels are only shown when the relevant type is active anyway.
Saves a click especially when using object or collection as render, since
you _have_ to set an object or collection to use it.
2019-01-25 15:30:33 +01:00
Pablo Vazquez
31abd2d877 UI: Particle. Remove unnecessary label for grid distribution
None of the other distribution modes have labels, and it's pretty clear
anyway since the fields below have the Grid word in them.
2019-01-25 15:30:33 +01:00
Pablo Vazquez
abd33f9823 UI: Particles
Remove duplicate "Use Modifier Stack"
2019-01-25 15:30:33 +01:00
2f7279a413 Fix T60204: Crash when opening a File
Missing code from 3d083f37. Need to ensure that ID properties
are properly allocated and restored on read.
2019-01-25 15:20:30 +01:00
71e3002824 Workbench: Depth Of Field: Optimisation
- Compute samples positions on CPU.
- Use 3x3 Box blur instead of 2x2.
- Implement bokeh parameters.

With this commit, dof performance is almost negligeable.
The quality is a bit lower than before but can be improve. Also now big
Circle of confusion are supported (up to 200px).
Cost is ~1.25ms on AMD Vega with a 2560p viewport than full HD and
pretty shallow depth of field.

Coc downsampling and dilation is not used anymore for now (commented).
2019-01-25 15:04:18 +01:00
3f6e14e667 Workbench: Depth Of Field: Initial Commit
The algorithm used is borrowed from :
http://tuxedolabs.blogspot.com/2018/05/bokeh-depth-of-field-in-single-pass.html

This makes it possible to have a decent blur for foreground over defocused
background in one pass only.

The algorithm is using a gather approach that is much faster
than the scatter approach used in Eevee. This makes it possible to have
custom bokeh shapes (not implemented yet) which would be impossible with
a separable gaussian technique.

The blur is done in 2 steps. The first one define the shape of the bokeh
and the second that fill the undersampling.

A downsample max-CoC tile texture speed up the gathering process.
2019-01-25 15:02:49 +01:00
aae2bf7735 T60745: GPU texture alloc failed when opening Preference Windows
Was generating INVALID_FRAMEBUFFER here instead of failled texture alloc.

Add safety asserts in gpu_texture.c and clamp minimum size to 1 inside
GPU_offscreen_create.
2019-01-25 15:02:30 +01:00
3fb72a5432 GP: Use Fill color when drawing strokes for no stroke materials
Artists requested to show the stroke while drawing a new stroke using a material with fill color only, because it's very difficult to see the stroke.

Now the stroke shows always but using the fill color, not the stroke color because maybe is not set.
2019-01-25 14:34:56 +01:00
e198c5a175 Fix crash happening with hair step
The issue was caused by the hair step checking whether
particle system needs to have path cache. This was done
in a way which was traversing an entire scene and was
checking every object for particle instance modifier.

Ideally, path cache should be an own operation in the
dependency graph. Or at least, this flag should be set
by dependency graph builder, similar to curve's path.

Since the code was broken already (it was only checking
first particle instance modifier), it is easier to
remove the buggy code, solve the crash and move on for
now.

If this causes an issue, simply set particle system to
be rendered as path.

Fixes crash with playback of Spring scenes.
2019-01-25 14:02:31 +01:00
da13a3bdee Fix texture paint accessing freed memory
Part of T60660
2019-01-25 23:53:53 +11:00
a761233261 Correct last commit, wire xray is supported 2019-01-25 23:36:31 +11:00
30762a0b39 DRW: disable clipping background drawing w/ xray mode
This interfered with drawing the mesh.
2019-01-25 23:30:27 +11:00
8e8fb1520c Depsgraph: use specific tag to update shading 2019-01-25 23:11:58 +11:00
ea5326df86 Fix T59958: Blender 2.80 - Removing second Particle System cache causes crash.
Usual DEG tag missing.

Also do not tag/send notifiers when we do not change anything!
2019-01-25 12:32:19 +01:00
bfa8fcc542 Fix T60839: Deleting bevel object for curve will not update
Was missing conversion of ID_RECALC_GEOEMTRY to curve's operation.
2019-01-25 11:22:22 +01:00
d87e7af1ec T60748 Second try to fix start extreme in Noise modifier
The first point was moving inverted because first vector was inverted. Now, the vector is changed for the first point to get the same direction.
2019-01-25 10:44:46 +01:00
05ebdc2b71 Fix texture paint showing pink texture on load 2019-01-25 17:25:49 +11:00
6cc5c28d15 Fix UI extension removal
App-templates & keymap names had their extensions removed twice.

Confusing for filenames containing dots.
2019-01-25 13:49:59 +11:00
3d8cbb534f Fix T60777: Grid fill fails when run via Repeat Last 2019-01-25 11:40:22 +11:00
e63c360bcd WM: don't set repeat flag w/ interactive repeat
This allows operators to distinguish between redo and executing
repeat last operator, needed for T60777 fix.
2019-01-25 11:29:41 +11:00
b5a2dc16fc Revert "WM: Repeat Last no longer reuses skip-save properties"
This reverts commit 1d908bffdd.

Enough uses of repeat last expect skip-save properties to be set,
transform being the most obvious example T60777#605681.

I wanted to avoid operators having account for two kinds of 'skip-save'
but this may be unavoidable.
2019-01-25 11:11:07 +11:00
d4433b1bb3 Missed last commit 2019-01-25 11:04:00 +11:00
5632e1b525 Cleanup: replace VSE /w Sequencer
This abbreviation isn't used anywhere else in Blender's UI.
2019-01-25 09:44:32 +11:00
e1efaa6f74 make.bat: remove stray quote in msvc2017 detection.
Shouldn't cause issues, but better safe than sorry.
2019-01-24 15:21:31 -07:00
8acbf8f113 Merge branch 'blender2.7' 2019-01-25 08:54:20 +11:00
4b8b7c821d Cleanup: sort cmake file lists 2019-01-25 08:49:51 +11:00
2218bf02dd Cleanup: sort cmake file lists 2019-01-25 08:30:33 +11:00
e72fa714a8 Cleanup: remove duplicated shaders that only added clipping checks
Originally I wanted to avoid adding draw manager specific ifdef's all
over generic shaders however this isn't needed in so many places.

Also there are shaders that are only used by the draw manager so
duplicating them only to have the original unused doesn't make sense.
2019-01-25 08:01:07 +11:00
6d8394d38b DRW: support clipping for camera objects 2019-01-25 07:13:02 +11:00
a4fe338dd8 Cleanup: add missing braces to draw manager 2019-01-25 07:12:13 +11:00
b1f3a86d99 Cleanup: use macro to set flags 2019-01-25 06:34:02 +11:00
6d58339973 Fix smoke clipping being ignored by Cycles and not being editable after baking.
The value worked in 2.7, but not with copy-on-write in 2.8.
2019-01-24 19:47:01 +01:00
7b48e04b6e Fix T59650: adding texture paint slot image shows wrong color. 2019-01-24 19:08:25 +01:00
63bacfed4b Merge branch 'blender2.7' 2019-01-24 19:02:10 +01:00
6260b3c15e Fix T60597, T60806: Cycles crash rendering principled BSDF + volume interior.
The integrator maximum number of closures was not set properly for the CPU/mega
kernels to match the actual available memory. Before relatively recent code
refactoring we did not use this value in those kernels so it worked fine.
2019-01-24 18:05:42 +01:00
7a353a7037 Fix T60350: Removed objects that are still in the outliner will crash Blender.
We need to force UI to fully redraw, BKE_id_delete & co won't do that
for us.
2019-01-24 17:45:09 +01:00
b33615a080 Cleanup: remove unused "guide_origin" property 2019-01-24 17:40:30 +01:00
6b5416909e Fix T60816: Specify subtype for some properties of mesh operators
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4248
2019-01-24 17:40:30 +01:00
6100dc6a20 bring back possibility to override camera per view
this can now be found in the sidebar View panel

- uses existing 'lock_camera_and_layers' but renames the property to
'use_local_camera'
- uses RNA_def_property_boolean_negative_sdna to flip the value
- remove the local view code in
rna_SpaceView3D_lock_camera_and_layers_set
- update Python code
- update Addons code will be separate commit

Fixes T60756

Reviewers: billreynish, brecht

Maniphest Tasks: T60756

Differential Revision: https://developer.blender.org/D4247
2019-01-24 17:25:22 +01:00
15bae8ac00 Fix T60095: freestyle not rendering animated camera correctly.
Replace legacy view matrix access with same one used by Eevee.
2019-01-24 16:46:11 +01:00
820d1b249d Fix freestyle renders not including some types of animation.
Freestyle Python scripts need to get the evaluated view layer and scene,
not the original one.
2019-01-24 16:46:11 +01:00
28b1bbeb92 Fix T60625: freestyle colletion include / exclude not working. 2019-01-24 16:46:11 +01:00
391e35d5a0 Fix T60669: freestyle rendering holdout / indirect only collections.
To match Cycles we can hide freestyle lines for these.
2019-01-24 16:46:11 +01:00
c26fe3433e Fix T59175: Compress file isn't working when Load UI is disabled.
Do not see why flags from loaded file should be skipped when we do not
load UI, this is not related to UI...

Think we can keep flags from file in both cases, should this raise some
other issue we'll just have to fine tune masked flags in each case
separately.
2019-01-24 16:15:20 +01:00
95db2e8749 Fix GPU linking Error.
"The geometry shader uses varying _I;gl_PerVertex;gl_ClipDistance, but previous shader does not write to it."
2019-01-24 12:42:20 -02:00
35f0a59df6 Merge branch 'blender2.7' 2019-01-24 16:16:05 +01:00
7446c76187 Fix T59175: Compress file isn't working when Load UI is disabled.
Do not see why flags from loaded file should be skipped when we do not
load UI, this is not related to UI...

Think we can keep flags from file in both cases, should this raise some
other issue we'll just have to fine tune masked flags in each case
separately.
2019-01-24 16:13:37 +01:00
8be7ed1408 Merge branch 'blender2.7' 2019-01-24 15:44:06 +01:00
3a527357a5 Cycles: change default displacement method to bump mapping again.
Even though it makes sense logically to have displacement actually displace
the mesh, this is causing a lot of confusion for existing users that are used
to the previous behavior. Further, since Eevee does not support displacement
yet and the discrepancy between the viewport and final render is problematic.
2019-01-24 15:34:47 +01:00
5fc4214ada Fix T60133: texture paint external editing not working
Operator relys on 3DView and was failing from Topbar and Properties
Editor. Now tries to find the biggest 3DView and uses that.

Reviewers: brecht

Maniphest Tasks: T60133

Differential Revision: https://developer.blender.org/D4215
2019-01-24 15:34:44 +01:00
9eee2aa20c Animation player: tweaks for zooming in and out
Use zoom steps lower than 1. This allows to zoom out a high-res
image. For example, before it was not possible to maker 4K image
to fit on FullHD monitor.

Also, don't force zoom to be above 1. Not sure why that was done,
but this disallows zooming out.

It is still not possible to zoom in higher than the window size
allows. In order to support this the player needs to be refactored
in a way that allows to decouple zoom from window size.

Fixes T59177: Animplayer extreme zooms in when playing rendered animation
2019-01-24 15:13:23 +01:00
d011ae1e03 Fix T59972: UV live unwrap does not pack islands.
Packing was not being called after multi-object editing changes. Includes code
refactoring to make function parameters more clear.
2019-01-24 15:01:55 +01:00
bd64206e1a Fix T59933: timeline keyframe display not updating when selecting objects. 2019-01-24 15:01:54 +01:00
a4a60358b5 Fix T58502: scopes don't work in the image editor
There were two problems:
1. The scopes were only updated when the "Scopes" category is active,
   but this category has been removed in Blender 2.8.
2. The scopes moved from the TOOLS to the UI region.
   However the update-code still searched for the "Scopes" category
   in the TOOLS region.

Both problems are fixed with this commit:
1. Scopes have there own category again.
2. The update code is in the correct draw function now.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4245
2019-01-24 14:41:44 +01:00
bc32240105 Fix T60810: crash editing mesh with subdivision modifier
typo in rBdc7e49298940

Reviewers: fclem

Maniphest Tasks: T60810

Differential Revision: https://developer.blender.org/D4244
2019-01-24 14:36:01 +01:00
6ff4babfd4 Fix T60795: Crash when joining objects with shape keys.
Stupid mistake really, cannot use NO_MAIN here, temp shapekey is in
Main. Using/fully supporting out-of-main temp IDs is still a bit WIP...
2019-01-24 14:33:12 +01:00
f15a5440a1 Multires reshape: correct grids level allocation
Similar to masking grids, need to also check existing grid level.

This is because edit mode might leave allocated grid with 0 levels.
2019-01-24 14:25:06 +01:00
f172cea484 Fix T59423: Mesh deform modifier bind bug causing spiky deformations.
Same as rBac316a6526c7.
(I should have commited in 2.7 first and then merged in 2.8).
2019-01-24 10:32:28 -02:00
ac316a6526 Fix T59423: Mesh deform modifier bind bug causing spiky deformations.
The intersection was being tested between ray and tri, the correct one is segment and tri.
2019-01-24 10:20:59 -02:00
7faf0c8c2f Fix T59145: don't clamp color value in Hue Saturation Value node in eevee 2019-01-24 13:58:59 +01:00
7b35ef23a0 Fix T60807: Can't select when active pose object is hidden
Object mode locking wasn't accounting for the 3D view context
which doesn't have an active object once its hidden.
2019-01-24 23:25:18 +11:00
4162b83590 Cleanup: use braces for single line if statements 2019-01-24 23:25:18 +11:00
e79cdb5541 Cleanup: Replace BASACT use w/ a variable 2019-01-24 23:25:18 +11:00
f0247b5a5c Cleanup: remove make wrapper
Intended for silent build output,
ninja build system can do this now.
2019-01-24 23:25:18 +11:00
3f1f2b3035 Cleanup: removed unused 3D view header template. 2019-01-24 13:19:23 +01:00
1b12c2d423 Fix T58216: backdrop drawing in sequencer broken. 2019-01-24 12:39:39 +01:00
fa818170e3 Subdiv: Fix wrong orig_index for vertices of a loose edge 2019-01-24 12:13:36 +01:00
c4be1f861b Fix T60408: Loose edge distort vertex on a surface
Treat those vertices as infinitely sharp. This matches the way
how OpenSubdiv's topology is being created.
2019-01-24 12:13:36 +01:00
b3ba97ccce Fix T60805: Grease Pencil Rim Effect Problem
The problem was related to cache data that was removed from memory before the FX  finished. This could affect to any FX.

Now all the information is saved in the FX itself in runtime struct to keep memory safe when cache memory is released.
2019-01-24 11:33:35 +01:00
d2afdf3c20 GP: Use matrix location instead of loc 2019-01-24 11:33:35 +01:00
a3261aad13 Fix T54581: Clip editor doesn't synchronize frame on layout change 2019-01-24 10:36:42 +01:00
be32168eb4 DRW: support clipping for object outlines (unselected) 2019-01-24 19:13:38 +11:00
aa1b77dccb DRW: support clipping for object outlines 2019-01-24 18:28:21 +11:00
0b37399cbe Fix T60790, T60636, T60631: MMB emulation issues after recent changes.
The statusbar keymap display should not affect actual event handling.
2019-01-24 07:41:36 +01:00
cd8a342d7c Cleanup: fix compiler warnings. 2019-01-24 07:41:36 +01:00
11428e0b7f DRW: use clipping for depth buffer
Object selection now supports clipping.
2019-01-24 17:12:06 +11:00
4d29312c66 Cleanup: trailing space guardedalloc & memutil 2019-01-24 16:22:44 +11:00
d8a082f914 Correct doxy file 2019-01-24 16:19:45 +11:00
04d18b117c DRW: API for own versions of builtin GPU shaders
DRW_shader_get_builtin_shader can replace GPU_shader_get_builtin_shader
when we need to support clipping.

Use this for loose point & wire drawing in object mode,
clips edges in lattice edit mode.
2019-01-24 16:14:00 +11:00
1d908bffdd WM: Repeat Last no longer reuses skip-save properties
PROP_SKIP_SAVE is often used as a way to detect the difference between
adjusting options from the redo panel and initial execution.

Repeat last operator was executing with skip-save properties set,
preventing operators from initializing them based on the context.

Fixes 60777.
2019-01-24 12:12:23 +11:00
7f77961f1c Fix theme color use for clipping region
Color needed to be converted to linear in the engine,
not the theme.
2019-01-24 10:36:46 +11:00
41a7dd383c Cleanup: style 2019-01-24 09:27:14 +11:00
32c2e941e6 Fix T60417: Hair not instantly updating when editing curve guide
Reviewers: sergey, brecht

Maniphest Tasks: T60417

Differential Revision: https://developer.blender.org/D4193
2019-01-23 20:47:43 +01:00
Pablo Dobarro
657806691b Fix T58438: wrong display of brush angle rotation preview.
Differential Revision: https://developer.blender.org/D4017
2019-01-23 20:25:45 +01:00
Jean Da Costa
b592e34559 Sculpt: add Topology Rake, to align edges along brush while painting.
This helps to generate cleaner topology and define sharp features for dynamic
topology. Best used on relatively low-poly meshes, it is not needed as much
for high detail areas and has a performance impact.

Differential Revision: https://developer.blender.org/D4189
2019-01-23 20:25:14 +01:00
Anton Stötzer
4e9817a4fb Fix wrong f-curve modifier mute checkbox icon / tooltip.
Differential Revision: https://developer.blender.org/D3930
2019-01-23 18:31:15 +01:00
9770d071ff Fix T54834: VSE can't import OGG Theora video 2019-01-23 17:16:17 +01:00
7a9e4e41a9 Cleanup: More clear function name
Otherwise it was read as it does select sequences rather
than counts them.
2019-01-23 17:16:17 +01:00
8377263e0d Sequencer: Fix python error on Add menu on default workspace
It is possible that context does have selected_sequences but
it will be set to None. In this case getattr() will return
None, breaking the intended logic.
2019-01-23 17:16:17 +01:00
Pablo Vazquez
1f907b30d4 UI: Particles UIList
Swap show_render and show_viewport to match outliner (first viewport then render)

Also make list item into an aligned row so it uses less space and looks closer to the outliner.

Before/After: http://pasteall.org/pic/show.php?id=5c9fff53dc6a0e2465f5b86aa751a942
2019-01-23 17:15:58 +01:00
5e3ce0b662 GP: Remove unneeded armature code
This line looks a mistake and it's not needed.
2019-01-23 16:52:25 +01:00
22bc6142c3 Fix T59152: dynamic topology constant detail should be in world space.
It seems more predictable, and makes more sense for future multi-object modes.
2019-01-23 16:48:02 +01:00
409443500b UI: fix horizontal scrollbar overlapping last row of files
Depending on area size, the scrollbar covered the bottom of the text,
with the extra it will only cover the padding at worst.

Differential Revision: https://developer.blender.org/D4207
2019-01-23 15:33:01 +01:00
Harley Acheson
93d226952b UI: make editor corner splitting / joining more reliable.
* Add threshold for minimum amount of mouse movement for dragging to
  get activated.
* Limit angles at which dragging is considered an action, do nothing if
  mouse does not clearly move up/down/left/right.
* Increase action zone size vertically.

Differential Revision: https://developer.blender.org/D4227
2019-01-23 15:23:06 +01:00
ac5278b682 Fix T60791: Don't show automatic weights option when not supported
There are probably many more cases in which the menu looks a little different.
However, I don't know them all and it's too easy to break something accidentally here.
Maybe a user could try the different combinations of object types and check if there are entries that should not be there.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4240
2019-01-23 15:21:28 +01:00
db78a8ee2e Fix T59939: Masks not Animating in Render
For now this is not part of copy-on-write, and needs extra animation
evaluation.

Reviewers: sergey, brecht

Maniphest Tasks: T59939

Differential Revision: https://developer.blender.org/D4140
2019-01-23 15:12:53 +01:00
ddc278da24 Cleanup: comments above struct members, shader group assignments
Avoid using pointer to pointer when building shader groups.
2019-01-23 23:59:40 +11:00
48eed058b1 3D View: draw clipping region
Only for workbench solid/wire modes.
2019-01-23 23:37:25 +11:00
44e9fe024b Fix T56877: Enabling mask Motion Blur overrides the Feather Falloff
Compositor makes a copy of mask before sampling the mask on different
time steps. The copy of layers did not copy falloff Settings.
2019-01-23 13:04:32 +01:00
e6ad4ec3fc Fix T58994: Subdivision modifier generates artifacts with crease=1
The issue was caused by the lack of averaging of normals for
vertices which are on the ptex face boundaries.
2019-01-23 12:17:30 +01:00
2392f311e9 Merge branch 'blender2.7' 2019-01-23 12:09:08 +01:00
d753726ce7 Add font selection to VSE text strips
Allows users to select a font for text strips in the video sequence editor.

Related: 3610f1fc43 Sequencer: refactor clipboard copy to no longer increase user count.

Reviewed by: Brecht

Differential Revision: https://developer.blender.org/D3621
2019-01-23 12:07:05 +01:00
40cb41647e Sequencer: refactor clipboard copy to no longer increase user count.
The clipboard is not a real user and should not be counted. Only on paste
should the user count increase.

This is part of D3621, and was implemented by Richard Antalik and me.
2019-01-23 12:06:58 +01:00
ac442da4a1 Refactor: use guard clauses instead of nested conditionals 2019-01-23 10:51:22 +01:00
6555e177e9 3D View: add back clipping draw code (disabled)
Disabled for now because of draw-order issues.

Also move clipping test out of view3d_draw_legacy.c
2019-01-23 20:50:43 +11:00
9ff73e61b1 Fix T60778: Grease pencil Hook modifieronly affects strokes with more than 2 points
Also fixed Lattice and Noise modifier.
2019-01-23 10:37:08 +01:00
baa5fe1bfc Cleanup: Spelling in comment 2019-01-23 10:27:55 +01:00
2e5663c2c6 Fix T60781: DOF Distance (pick) crashes
From own recent changes c8e75c2b00
2019-01-23 16:43:18 +11:00
3eebf9ef06 RNA: expose Gizmo.use_operator_tool_properties 2019-01-23 16:30:19 +11:00
4f2bc2f0e5 Cleanup: use doxy comments for gizmo structs
Also move comments before members (better for clang-format).
2019-01-23 16:24:37 +11:00
6dfe6b4f19 Fix T58199: Spin tool top bar settings don't apply 2019-01-23 16:15:01 +11:00
be24da0a98 Gizmo: add support for gizmos to initialize from the active tool 2019-01-23 16:14:52 +11:00
7ce38978ae WM: add tool property getter function
Matches 'ensure' functions but doesn't add data.
2019-01-23 15:36:10 +11:00
2e4f1b592f Cleanup: use eGPU prefix for GPU enum types 2019-01-23 14:16:03 +11:00
14d947dcad DRW: generalize selecting between regular/clipped shaders
Each engine was doing this on its own.
Move to DRWContextState, use an enum.
2019-01-23 13:34:55 +11:00
c403508e41 DRW: changes to object mode engine needed to support clipping
Split out shader struct, no function changes.
2019-01-23 12:37:12 +11:00
dc3b5024be Cleanup: add BEGIN/END to GPL headers 2019-01-23 11:32:43 +11:00
dc84a03a95 License: add missing GPL headers
Information taken from related files committed at the time.
2019-01-23 11:32:43 +11:00
Dalai Felinto
178299278b EEVEE UI: Render/Viewport Samples - follow Cycles
Cycles shows first the render, and then the viewport settings.
One could argue that EEVEE's main setting is the viewport one.

But that is silly. If we need an extra setting for the lookdev mode so be it.
But EEVEE should be treated as an engine just as Cycles.

Also, removed the " Samples" bit from their labels since they are under
the Sampling panel.
2019-01-22 19:48:24 -02:00
4c24782ccf DRW: only show hidden geometry when selection is used
Matches 2.7x behavior.
2019-01-23 08:46:26 +11:00
69529177be Revert "Fix T60126: Gradient affects hidden vertices when weight painting"
This reverts commit 06a6b5dba4.

The error is that geometry was hidden in the first place,
this should only apply when selecting verts/faces.
2019-01-23 08:45:43 +11:00
3891ad8e03 Fix T58492: smoke flow jitters around flow source when using adaptive domain.
This is more like a band-aid than a real fix actually, real fix would be
to understand why rendering smoke requires auto texspace to be ON
(afaict, this was not the case in 2.7x)...

But I've already spent way too much time on this issue, at least now we
get better situation than before (i.e. smoke with adaptive domain works
well even when orig domain mesh has autospace flag disabled).
2019-01-22 21:52:15 +01:00
7886db9ba9 Mesh eval: Do not condition clearing of auto texspace to dirty bbox.
Not sure why that was that way (can't remember any good reason at least,
so assuming this is a dummy mistake from own rB33cbcd73448f), this
should be done in any case.
2019-01-22 21:52:15 +01:00
Harley Acheson
043a005269 UI: disable scene and view layer delete buttons when not available.
Differential Revision: https://developer.blender.org/D4210
2019-01-22 20:35:32 +01:00
Sebastian Parborg
ccc48bf27e Fix T60602: outliner pose bone selection does not update in viewport.
Differential Revision: https://developer.blender.org/D4223
2019-01-22 20:24:42 +01:00
a34297a6d6 GP: Fix UV error for second point
The UV was not calculated for second point (1), only first and > 1
2019-01-22 20:14:12 +01:00
1ddf93a706 Defaults: don't use Filmic view transform in Video Editing template.
It's too slow for now, could be considered if it's optimized more.
2019-01-22 20:00:13 +01:00
fa5ce915df Fix T60722: decimate modifier not working in some cases. 2019-01-22 19:54:35 +01:00
25889423d3 GP: Recalc UV data for primitive strokes
The data was not caculated when complete a primitive and it was only updated when use Edit mode.
2019-01-22 17:54:41 +01:00
Joep Peters
63729bc11f UI: use same light icon for all light types in properties editor tabs.
Differential Revision: https://developer.blender.org/D4237
2019-01-22 17:05:36 +01:00
Joep Peters
1651879d34 UV Editor: support snapping to center of pixels, in addition to corners.
Differential Revision: https://developer.blender.org/D4150
2019-01-22 17:05:18 +01:00
babba31c49 Fix light probe panels not being visible for Cycles. 2019-01-22 17:00:38 +01:00
6f167ccc79 Fix T60748: Move GP stroke extremes with noise modifier 2019-01-22 16:48:45 +01:00
a8902ab49a Fix T58640: Round corner in edge crease of subdivided surfaces
Fix T60502: Creasing behavior on 2.8 seams wrong

Was a mistake in a boundary vertices sharpness calculation.
2019-01-22 15:35:30 +01:00
06a6b5dba4 Fix T60126: Gradient affects hidden vertices when weight painting
Also includes some minor refactoring: use guard clauses instead of nested conditionals.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4238
2019-01-22 15:31:10 +01:00
8d4bad39c1 Fix T60742, T55974: crash using mesh/curve surface force fields.
Missing dependency graph relations caused race conditions.
2019-01-22 15:24:06 +01:00
Andrew Williams
102631486b Fix potential invalid memory access in surface force field BVH tree.
Free the BVH tree immediately along with the mesh, otherwise we might access
invalid mesh data.

Differential Revision: https://developer.blender.org/D4201
2019-01-22 15:24:06 +01:00
414ebc68c2 Fix T60686: Renaming an animated bone breaks its animation
After rename is done we need to make sure all copies of
corresponding datablocks are updated in all dependency
graphs: otherwise bone will have a new name, but animation
will still be using an old one.
2019-01-22 14:50:58 +01:00
0ec77aaea5 Cleanup: space after template bracket 2019-01-22 13:51:21 +01:00
fc673a285f Git: add TAGS & tags to .gitignore
Index files used by emacs, vim and others, for autocompletion and
searching; generated by etags, universal-ctags and others.

Differential Revision: https://developer.blender.org/D4208
2019-01-22 12:50:13 +01:00
185c2487a6 Fix T60737: Crash workbench rendering
Addition of clipping from 7467049055
didn't account for non viewport display.
2019-01-22 22:27:23 +11:00
585e4848e1 3D View: Support vert & weight paint mask clipping 2019-01-22 22:22:20 +11:00
9c61107ba5 Cleanup: Silence pedantic compiler warning
Was happening in release builds.
2019-01-22 12:05:48 +01:00
362331f0ff Cleanup: Remove unused variable 2019-01-22 12:02:35 +01:00
b2a15de887 Fix T60575: Multiresolution Crashes when appliing more subdivisions
The issue was caused by intermediate DerivedMesh being created with
scene's Simplify settings taken into account. This is what happens
when one area makes implicit decisions based on whether passed Scene
pointer is not NULL.

Made it so ignoring simplification serttings is an explicit flag,
which makes it easier to follow what's going on.
2019-01-22 11:57:23 +01:00
d6d101feca Fix T59395: Subdivision modifier with quality 1 crashes blender
This is actually a workaround for the crash in OpenSubdiv.
Topology refiner will have a crash when special conditions
are met:

- Refiner is configured to use infinitely sharp patches.
- Refinement happens for the level 1 (which we call Quality 1 on
  Blender side).
- Mesh has non-quad faces.

The workaround is to force refinement to happen to level 2 (or
quality 2 on Blender side) when those conditions are met.

Later on with the next OpenSubdiv update we can remove this
workaround, since there was work done on OpenSubdiv side to
deal better with such configurations.

The modifier will now be somewhat slower, but this will be
compensated with upcoming topology cache enabled by default.

The workaround is done when initializing settings, so the
comparison of topology refiner settings is happening without
any extra workarounds there.
2019-01-22 11:57:20 +01:00
fef20d987c Merge branch 'blender2.7' 2019-01-22 11:57:03 +01:00
78d4e0fbf2 Fix full compilation after recent passes changes
Was caused by c9eef249.
2019-01-22 11:56:03 +01:00
0bbca0e221 3D View: Support edit-mesh clipping (only verts)
We'll need to replace built-in shaders to add support for clipping.
2019-01-22 17:23:24 +11:00
ee3c177dd3 Fix T60112: Smooth crashes w/ multiple views 2019-01-22 16:52:17 +11:00
a93cbb70cd Fix T60643: BMesh operator enum args fail when unset from Python
Error introduced with bmesh operator enum support: 1e6a5eb087
2019-01-22 14:28:17 +11:00
88218946da Cleanup: minor changes to reduce code duplication
D4236 by @sobakasu w/ edits.
2019-01-22 13:51:21 +11:00
b4aec52007 Cleanup: de-duplicate font loading code
Part of D4236 by @sobakasu
2019-01-22 13:11:31 +11:00
7f40d553f9 Cleanp: use single global for draw manager
Add 'G_draw' for all draw manager globals,
avoids adding extern to each file.

Connection between `ts` and `globals_ubo` wasn't obvious,
now called `G_draw.block` & `G_draw.block_ubo`.
2019-01-22 12:09:27 +11:00
c7768bcf4b Cleanup: use const args 2019-01-22 12:09:12 +11:00
46d56872d0 Fix error in last commit 2019-01-22 11:24:59 +11:00
14adca06e4 Cleanup: use DRW_shader_create_from_arrays
Avoids messy conditional defines and inline lib allocation.
2019-01-22 11:09:17 +11:00
7c0f925c59 DRW: Add DRW_shader_create_from_arrays utility
While verbose, this is a more flexible way to construct shaders.

Libs & defines can be optionally included for each shader type
which was previously done with inline string creation.
2019-01-22 10:38:28 +11:00
8beab3e339 Cleanup: remove redundant '_sh' suffix, add '_shgrp' 2019-01-22 08:31:07 +11:00
3d9bee2db1 Cleanup: rename shader containers
These only contain shaders, so name Shaders instead of ShaderData.
2019-01-22 08:26:43 +11:00
a712fbda6a GP: Cleanup previous commit 2019-01-21 18:30:15 +01:00
48149459e4 Fix T60714: Avoid creation of nested objects
In grease pencil is not logic add an object inside other object in edit mode. The object must be created only in Object mode.
2019-01-21 18:29:02 +01:00
0af8ad51c0 GP: Fix memory leaks when use cutter with weights
There were some issues when copy the weights and  other memory leaks.

Also some code cleanup.
2019-01-21 17:39:00 +01:00
2b0fb0d7bf Fix keymap preferences UI layout issues for modifier keys. 2019-01-21 17:26:35 +01:00
a6e6ad0756 Fix T60683, T60662: Cycles render crash in edit mode for certain meshes. 2019-01-21 16:10:00 +01:00
14b5668c60 DRW: Fix corner indices order in clipping plane setup
Fix T60667: Eevee: reflection plane bug in rendered view.
2019-01-21 15:21:17 +01:00
9bc47ed0f6 Fix clipping shaders with some AMD/Intel drivers
Caused:
    error: unsized array index must be constant

Use hard coded number of clipping planes, copying the 4th to 5 & 6
when only 4 are used.
2019-01-21 23:55:53 +11:00
0c829e8240 Fix T60709: Apply Object Transform does nothing by default 2019-01-21 13:43:16 +01:00
ba4de7f1a5 GPUShader: Add GPU_VERTEX/FRAGMENT/GEOMETRY_SHADER defines
This makes it possible to have some code specific to each shader inside a
shader library.
2019-01-21 12:54:41 +01:00
f8d040cb70 T60701: GP using cutter tool on stroke with vertex group crashes blender 2019-01-21 11:03:09 +01:00
97c7c0abf5 Cleanup: add clarifying comments for recent NUMA fixes. 2019-01-21 10:54:19 +01:00
42ba294235 Fix T55461: [Vertex Group] "Delete all unlocked groups" not working. 2019-01-21 10:36:38 +01:00
78d2abd9c1 DRW: Support wire overlay clipping 2019-01-21 19:08:42 +11:00
7bc9a563e6 Correct freeing builtin shader from recent commit 2019-01-21 19:07:57 +11:00
7117dfaf67 Fix T60704: Transparency threshold only half visible 2019-01-21 08:59:42 +01:00
a06b2b25ad DRW: pass clipping to geom shader via 'gl_in'
Removes need to pass the worldspace location.
2019-01-21 17:50:31 +11:00
1ab071bd5c Cleanup: remove '_sh' suffix
Shaders are now stored in their own struct, no need for special names.

Also free as an array.
2019-01-21 17:03:52 +11:00
07673a3460 DRW: Support edit-mesh clipping 2019-01-21 16:15:30 +11:00
dd3f518626 Cleanup: rename GPU function to set buffer length 2019-01-21 11:28:41 +11:00
ff10ba8c26 Cleanup: rename terms count/num to len 2019-01-21 11:24:19 +11:00
dbe960fdee Cleanup: replace 'ct' w/ 'len' 2019-01-21 11:22:27 +11:00
923b366549 DRW: set 4 clipping planes for box-clip 2019-01-21 11:12:26 +11:00
c53ebfa9e9 3D View: add back clipping border operator 2019-01-21 11:05:15 +11:00
7467049055 3D View: add back initial clipping support
Use clipping for workbench solid mode drawing.

Other modes & shading support still needs to be added.
2019-01-21 10:43:01 +11:00
0d8d26696f Cleanup: trailing space 2019-01-21 10:41:39 +11:00
49208a3419 Cleanup: shadow warning, style 2019-01-21 10:05:58 +11:00
eff4b68a6f Fix T60678: GP, smoothing a stroke's weights multiple times will lead to unweightable points 2019-01-20 20:38:00 +01:00
6e443b3210 Fix T60677: GP vertex groups get messed up, when deleting a group 2019-01-20 20:31:11 +01:00
6e57534eaa Fix T60671: GP weight paint crash when smoothing weights 2019-01-20 19:37:13 +01:00
69240a66e0 GP: Fix mirror modifier with parent object
Still problems when local rotation.

Some cleanup done.
2019-01-20 19:20:09 +01:00
482c4d099a Cleanup: remove all BLI_utiledefines' ugly vectorial macros.
Not only were those often making doublons with already existing
BLI_math's stuff, but they were also used to hide implicit type
conversions...

As usual this adds some more exotic inlined vector functions (one of
the rare cases where I really miss C++ and its templates... ;) ).
2019-01-20 16:27:06 +01:00
b0dee09a6d Fix bevel modifier spread value bug.
Was using same field as value, by mistake.
2019-01-19 15:58:01 -05:00
8a61ea7296 Cleanup: add trailing commas
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
c59370bf64 Merge branch 'blender2.7' 2019-01-18 21:00:24 +01:00
08871b56bc Fix T60627: Cycles render hanging on Windows with threadripper CPU. 2019-01-18 20:59:45 +01:00
c5eb10b110 Fix T60585: Cycles not using all cores on threadripper, after recent changes. 2019-01-18 20:58:56 +01:00
be8202d90b Fix T60585: Cycles not using all cores on threadripper, after recent changes. 2019-01-18 19:18:23 +01:00
b640fd829e Add miter pattern options.
Will document the new options in release notes, then in manual.
Still a bit of work to do on the bulging shape that appears
on cube corners if using arc inner miters, but will do that later.
Also need to do something smarter in clamp overlap.
2019-01-18 12:54:10 -05:00
c9938ebb00 Fix T60615: Cycles baking not working with some modifiers.
Refactors Cycles mesh export a bit to avoid unnecessary copies and to be in
sync with the Blender baker.
2019-01-18 18:39:43 +01:00
985dcbf6db GP: Guides: Fix bug with Mkey and Circular guides
Reported by @pepeland.

Adding missing events on the first point was breaking the guide behaviour.
Also, updated Ckey so it always defaults to Circular mode when guides are off.
2019-01-18 15:50:16 +00:00
b5bc2158a0 View 3D Grid: Improve precision and reduce code complexity
Instead of doing manual ray-plane intersection we use normalized positions
of the grid mesh and apply scaling after interpolation so that we keep
good precision even at really far distances.

Precision is now two order of magnitude better and does not produce the
same kind of artifact at lower clip start values.

This commit also cleanup the implementation.

Fixes T58918 Grid not appearing correctly at low clip start in 2.8
2019-01-18 16:30:05 +01:00
bb4c760fdd Preferences: assortment of minor layout tweaks. 2019-01-18 16:11:54 +01:00
Stefan Werner
5e121c8eab Cycles: Fixed uninitialized memory
Cryptomatte on CPU with accurate mode was hitting uninitialized variables.
This is now explicitly initializing them to NULL.
2019-01-18 15:17:21 +01:00
547cb5e264 Fix/workaround: Undo erase all dyntopo changes
Memfile undo isn't compatible with sculpt or edit-mode.

This didn't work in 2.7x, so best disable memfile undo for now in
situations where it's going to loose data or crash.
2019-01-19 00:53:39 +11:00
985712e5ee Fix loading a file saved w/ dyntopo
Ensure ED_editors_init doesn't create any undo steps
before the initial memfile undo is written.
2019-01-19 00:25:55 +11:00
c8067a5559 Fix undo push entering sculpt mode 2019-01-18 23:15:00 +11:00
1e3203986c Cleanup: remove unnecessary CUDA architecture sm_72, it's for Tegra chips. 2019-01-18 12:38:19 +01:00
d3ec4259af Subdiv CCG: Cleanup, comments 2019-01-18 12:29:53 +01:00
fb053ae2e5 Multires: Correct averaging
Before that only normal component was averaged, which is not
really correct.

Unfortunately, the new code is somewhat slower due to more
involved math to deal properly with non-quad faces, but the
plan is to move averaging from runtime to edit time, This
means, that mdisps will always be continuous around the edges
and no averaging on every frame change of animated character
will be needed.
2019-01-18 12:29:53 +01:00
cb5302f962 Math: Make it possible to use vector for both input and output
Avoids nasty code all over where such math is required, and
compilers can easily deal with such situation.

Don't prefer questionable micro-optimization which comes with
a cost of nasty actual logic code.
2019-01-18 12:29:53 +01:00
91697b0fa0 Multires: Ensure continuity when reshaping from object 2019-01-18 12:29:53 +01:00
45cf6f1cfc Subdiv: Fix wrong corner passed to a callback 2019-01-18 12:29:53 +01:00
02f86482b4 Multires: Simplify reshaping code
The idea is to run reshaping for every boundary vertex
of a grid rather than trying to copy boundary grid
elements.

While this is somewhat slower, this avoids all this
tangent flipping magic, which tempts to be rather tricky
and fragile.
2019-01-18 12:29:53 +01:00
076019c5f2 Multires: Correct function name, to match behavior 2019-01-18 12:29:53 +01:00
3fb6946b76 Multires: Fix spike issues when sculpting on triangles
The boundary copy code was not dealing correct with flipping
tangent vectors, hence causing discontinuity in the final
positions.

Now we only copy boundaries for quads, where we know how to
deal with tangent vectors and where we know that this is
needed.

More clear solution could be to change the code in a way that
handles handles displacement grids of quads in the same way
as it's done for non-quad faces.
2019-01-18 12:29:53 +01:00
9db73be975 Multires: Cleanup, move utility function to a more public place 2019-01-18 12:29:53 +01:00
a676b2b4b4 Multires: Cleanup, more clear naming 2019-01-18 12:29:53 +01:00
fc6aac3916 GP: Create materials when separate active layer
The materials were not created when used the active layer option of the separate operator.
2019-01-18 10:53:14 +01:00
d5b4d71ee7 DRW: Increase frustum culling precision
Use normal_quad_v3 instead of normal_tri_v3 and compute the mean of all
corner distance during frustum plane extraction.

Fix T58243 Flickering of viewport when rotating and zooming
2019-01-18 10:23:05 +01:00
a7b8538f4c DRW: Fix assert when using draw debug API 2019-01-18 09:58:04 +01:00
72b9ab5a22 Fix T60608: Popup dialogs Y-axis reset after drag
Caused by fc32bd729c
2019-01-18 16:56:56 +11:00
61036ca179 3D View: Disable clipping on load
Having clipping limit selection and tools is confusing when not visible.

Disable on load until it's supported
(doing this via ifdef's isn't practical).

Fixes T59580
2019-01-18 13:32:48 +11:00
0ad8f65677 Cycles: Cast to correct base type when checking requested features 2019-01-18 02:59:22 +01:00
b9412923a3 Cleanup: use enum for color picker types 2019-01-18 12:34:11 +11:00
3c2126c6f1 Fix eye-dropper causing undo push w/o any changes
Happened when accessing the eyedropper from a popup.
2019-01-18 12:08:45 +11:00
a3f312dcd1 Fix undo pushes w/ color picker
While changing RGBA or color wheel didn't add undo steps,
HSV and Hex values did.

Disable undo for these button types since an undo push happens when
exiting the picker.
2019-01-18 12:08:45 +11:00
031a9d6424 Merge branch 'blender2.7' 2019-01-18 01:47:32 +01:00
c9eef24903 Fix T56799: Custom render passes missing when using Save Buffers
The problem here was that when a render result is allocated, the standard render passes are added according to the
pass bitfield. Then, when the render engine sets the result, it adds the additional passes which are then merged
into the main render result.

However, when using Save Buffers, the EXR is created before the actual render starts, so it's missing all those
additional passes.

To fix that, we need to query the render engine for a list of additional passes so they can be added before the EXR
is created. Luckily, there already is a function to do that for the node editor.

The same needs to be done when the EXR is loaded back.

Due to how that is implemented though (Render API calls into engine, engine calls back for each pass), if we have
multiple places that call this function there needs to be a way to tell which one the call came from in the pass
registration callback. Therefore, the original caller now provides a callback that is called for each pass.
2019-01-18 00:58:28 +01:00
af316e8bc8 Render API: Fix detection of duplicate render passes 2019-01-18 00:58:28 +01:00
2757469824 UI: only reset eyedropper on cancel when set 2019-01-18 09:31:39 +11:00
7a0cc955cc Fix color picker cancel setting the color to black 2019-01-18 09:29:47 +11:00
8efedf2523 Cleanup: style 2019-01-18 08:59:41 +11:00
d3e856cdfc Audaspace: porting changes from upstream.
- Silence some warnings.
- Fix: Python API memory leak.
- Fix for T54490: VSE breaks when I insert or remove headphones
2019-01-17 21:17:30 +01:00
16fac2149b Physically based defaults for Eevee Bloom and Shutter
Some of Eevee's Bloom defaults are not very good for physically based rendering. This patches addresses this issue.

This picture shows one of the problems with current default. Bloom looks very foggy:
{F6280495}
Even worse, light emitters much dimmer than the Sun can make everything equally hazy if Clamp is set to 1.0 and intensity to 0.8 (current default). Artists often forget to adjust Clamp value and do not know what value to use for realistic intensity. Also, currently both Clamp and Intensity do not have good UI ranges. This is why often Eevee renders end up very hazy and bloom often does not look right.

Bloom effect plays important role to help to distinguish between bright and relatively dim light sources. With current defaults this is broken because Clamp set to 1.0. Also, it cannot be disabled if set to 0 like expected. This patch fixes this and sets it to 0 by default. If users need to clamp, they can do so easily with UI range up to 1000. This range is good enough for most cases and provides enough precision to control lower values, and the highest value helps to limit bloom from the Sun if necessary and will leave untouched most other light emitters. If needed, much higher values for Clamp can be entered manually up to 100000. 10000 is still affects the Sun, but up to 100000 highest limit allows to clamp anything that is much brighter than the Sun if user needs to limit bloom in such cases (for example, bright explosion in the sky or anything else very bright).

I propose new default for bloom Intensity - 0.05 and UI range to suggests realistic values. Bloom Intensity > 0.1 is not realistic for clean lens but the user can enter manually much larger values if needed.

For comparison, here is a my own photo with and without bloom caused by the Sun (on second photo the Sun was occluded with an object).
{F6280500}
{F6280492}
In real life bloom is much more subtle and does not look hazy. If Clamp is disabled, then out of 0.1, 0.05 and 0.025 values I have tried, 0.05 looks most similar to the photo. Here is test render with and without bloom with the Sun in similar position like on the photo:
{F6280496}
{F6280494}
Using color probe 27x27 I compared lightness below the horizon under the Sun. In rendered by Eevee images lightness difference was 17. In case of the photos lightness difference in similar place was 11. I then compared leftmost spot (also below the horizon) and lightness difference was approximately 2 between two photos and 1 between rendered images. In other words, with these settings bloom effect is not too strong and is not too weak. Visually it may seem like decreasing bloom intensity may increase photorealism, but then bloom effect would be too localized even for the Sun.

Besides this single test, I tested in many other scenes as well, with and without the Sun, with different HDRIs, and as far as I can tell 0.05 intensity turned out to be good default - it produces bloom strong enough to be noticeable and not too hazy.

In Cycles shutter default value is 0.50, so for consistency set to 0.5 by default in Eevee too. Besides, 0.5 is typical standard for real cameras, and values higher than 0.5 usually are needed only if very strong motion blur is desired.

Here is summary of all changes:

Bloom Intensity: 0.8 > 0.05
Bloom Intensity UI range: 0-10 > 0-0.1
Bloom Clamp: 1.0 > 0.0 (disabled by default)
Bloom Clamp manual range: 0-1000 > 0-100000
Bloom Clamp UI range: 0-10 > 0-1000
Shutter: 1.0 > 0.5

This patch is related to the discussion in this thread, there are more examples of what bloom will look like with 0.05 intensity by me and others:
https://devtalk.blender.org/t/eevee-needs-to-have-physically-based-defaults/4700

Reviewers: fclem

Reviewed By: fclem

Subscribers: pablovazquez, billreynish, rboxman

Tags: #eevee

Differential Revision: https://developer.blender.org/D4212
2019-01-17 20:03:13 +01:00
6dccc7cdab GPUInterface: Add builtin check in uniform location request.
This is a compile time option to remove the unecessary uniform queries.
2019-01-17 19:48:00 +01:00
844cda8f22 DRW: Make missing uniform debuging print only once 2019-01-17 19:48:00 +01:00
e3b3b32076 DRW: Use name buffer to request uniform location before drawing.
This is in order to avoid GL call during the "cache creation" phase and
support multithreading.
2019-01-17 19:48:00 +01:00
dc7e492989 Fix T60545: Buffer overflow in selection batch creation
Use loose_edges and loose_verts buffer instead of detecting them manually.
2019-01-17 19:48:00 +01:00
4c95899098 GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure
This is in order to make the API more multithread friendly inside the
draw manager.

GPU_shader_get_uniform will only serve to query the shader interface and
not do any GL call, making it threadsafe.

For now it only print a warning if the uniform was not queried before.
2019-01-17 19:44:01 +01:00
938b08b336 GP: Make Close fill strokes visible 2019-01-17 19:33:39 +01:00
260b786d07 Fix T60558: Cycles viewport render mismatch when the camera is a light. 2019-01-17 16:36:05 +01:00
1a3abc7f79 Preferences: fit a little better when opened in place of properties editor. 2019-01-17 15:04:38 +01:00
be079e742d Fix wrong placement of allow negative frames preference. 2019-01-17 12:41:54 +01:00
d86991ef37 Fix T60580: depsgraph object instance 'matrix_world' always returns identity matrix.
While form a strict consistency point of view it could make sense to
return identity matrix for non-instance items, it can be very handy to
get that info (common to both instances and regular objects) directly in
all cases.
2019-01-17 12:34:08 +01:00
32dc085289 Add experimental batch-delete of hierarchy to Outliner.
This uses the same command as regular hierarchy delete, and is only
activated when debug value is set to 666 for now.

Here on file from T60419, it gives about 20% speed-up (from 5.5s to 4.4s).
2019-01-17 12:34:08 +01:00
33dcde4865 RNA Depsgraĥ: add a warning about not using object_instances as a sequence.
Due to how this is generated, each item is freed when steping iteration
to the next one, which means that subscriptions etc. will make blender
crash.
2019-01-17 12:34:08 +01:00
06ee560da7 Fix misleading autokeyframing preference, it's only for new scenes. 2019-01-17 12:00:18 +01:00
ad707115d5 Preferences: add new Viewport, Animation, Navigation, Save & Load sections.
This further changes the preferences organization, to avoid grouping unrelated
settings together. With more sections we can also expand more panels by default,
making it possible to quickly go through sections and see the settings of each.

Panels with less used settings are still collapsed by default, to keep all panel
headers visible without scrolling.

Differential Revision: https://developer.blender.org/D4216
2019-01-17 11:44:33 +01:00
4f9bcd6166 Preferences: tweaks to lights section layout. 2019-01-17 11:28:56 +01:00
f351c7bf23 Preferences: tweak themes/addons/keyamps buttons at the top.
Make layouts more consistent between them, give more room for search field.
Addon online resources links were removed as the links are dead.
2019-01-17 11:28:56 +01:00
944d6f11cb Revert "Preferences: enable interface translation by default, not just tooltips."
This reverts commit c1762b1a08, as this was
intentional since interface translations are often incomplete or use unusual
terms.
2019-01-17 11:28:56 +01:00
18905b4359 Fix preferences layout not shrinking properly on high DPI display. 2019-01-17 11:28:56 +01:00
e44a7d36f4 Fix UI not fully updating while resizing window on Windows and macOS.
This is still not fully correct, since the event loop is blocked by GHOST
and no timer events are happening for animation while the mouse is still.
But for the most part it looks ok.
2019-01-17 11:28:56 +01:00
c8e75c2b00 Fix T60554: Missing undo push changing color
Operators don't have a good way to skip undo,
for now check the button undo flag & return cancelled.
2019-01-17 16:39:38 +11:00
4a3aac478c Cleanup: logic for eyedropper free on failure
Although currently unused, if exec was called and failed it would leak.
2019-01-17 15:43:34 +11:00
3648b3f916 Cleanup: remove duplicate color picker operator
Use internal boolean option to disable accumulation for crypto-matte.
2019-01-17 15:27:24 +11:00
b6854770c7 T60560: Render border gizmo doesn't update display 2019-01-17 14:48:46 +11:00
a8e7275627 BMesh: keep selection history when removing doubles
Auto-merge would loose the active vertex.
2019-01-17 14:17:02 +11:00
6fac10dd0d BMesh: Remove doubles now merges face-flags 2019-01-17 14:17:02 +11:00
4120e535da Cleanup: variable names 2019-01-17 14:17:02 +11:00
9d8445d6a9 Cleanup: de-duplicate loose vert/edge checks 2019-01-17 13:20:44 +11:00
76fdd33df2 Fix T60578: Crash selecting after hiding vertices 2019-01-17 13:05:45 +11:00
2f372654b6 BMesh: keep selection history when removing doubles
Auto-merge would loose the active vertex.
2019-01-17 12:36:17 +11:00
371006ddea BMesh: Remove doubles now merges face-flags 2019-01-17 12:32:12 +11:00
c5ae1cde5c Cleanup: variable names 2019-01-17 12:29:09 +11:00
00dd294a6e Cleanup: unused code 2019-01-17 11:17:45 +11:00
e57ee5934a Fix T60261: Crash pasting a material without a nodetree 2019-01-17 08:59:02 +11:00
dfb63653f4 PyAPI: minor change to bpy.app.debug_value exception handling
Use error from int conversion function.
2019-01-17 08:46:36 +11:00
9bfc9d799e PyAPI: Avoid redundant prefix for PyC_Err_Format_Prefix
Only show the exception value type when it's not a string.
2019-01-17 08:43:57 +11:00
debb68024e PyAPI: add PyC_Err_SetString_Prefix for internal use 2019-01-17 08:38:59 +11:00
8ba86020cc GP: Display Stroke for Fill Alt mode always
When use the Alt mode to draw close strokes, if the color had the stroke diabled, the stroke was not visiblle while drawing.

Now, it's visible while drawing, but it's hidden again when the stoke is finished. To display close strokes, enable stroke mode in material or enter in edit mode.
2019-01-16 20:04:48 +01:00
8102200006 Cleanup/sanitize usages of G.debug_value.
There was no documentation at all, some very bad practices (like using
G.debug_value > 0 as some sort of global debug print switch), and even
an overlapping use of '1' value...

Also, python setter did not check for valid range (since this is a
short, not an int).
2019-01-16 19:43:53 +01:00
feaf846f93 Cleanup: get rid of -666 debug value.
That one was used to allow specifying in system console a new path for
missing libraries, when loading a .blend file.

We now have a much more easy and user-friendly way of repairing missing
linked datablocks/libraries, so this is not needed anymore.
2019-01-16 19:43:53 +01:00
2eec83867b Cleanup: remove dead code in softbody forces evaluation.
This code has been disabled (hidden behind a specific debug value) for
over 10 years now! More than time to get rid of it...
2019-01-16 19:43:53 +01:00
fb9243787b Fix too narrow buttons in addon preferences. 2019-01-16 19:32:10 +01:00
c1762b1a08 Preferences: enable interface translation by default, not just tooltips.
Translation as a whole is still disabled by default as before.
2019-01-16 19:25:17 +01:00
d31ca35c61 Fix outdated user preference descriptions. 2019-01-16 19:25:17 +01:00
69dcdf5e12 Fix broken weight painting colorband in default preferences. 2019-01-16 19:25:17 +01:00
1192fd58a5 GP: Use multiframe falloff in Shear transform 2019-01-16 19:22:20 +01:00
798e67bc9e GP: Use multiframe falloff for Bend transformation 2019-01-16 19:22:13 +01:00
c2dee803e3 Outilner: pass userdata void pointer to outliner_do_object_operation_ex().
Even though it is not used currently, an _ex() func should not ignore
that, it is kind of mandatory for many advanced/complex behaviors.
2019-01-16 17:35:51 +01:00
ece72e15d5 Preferences: remove OpenGL select method preference.
Deprecated GL_SELECT no longer works in OpenGL core profile, so there is no
reason to have this.
2019-01-16 16:16:42 +01:00
49562da98d Preferences: remove unnecessary 16 bit textures preference.
This is a leftover from a time when these were not supported on all GPUs.
2019-01-16 16:16:42 +01:00
a8a89db9c8 Preferences: always do GPU accelerated mipmapping, remove preference.
This setting was added long ago to be cautious in case some GPUs did not
support this propertly, no reason to have it anymore.
2019-01-16 16:16:42 +01:00
0a378b8ebc Fix BKE_id_copy_ex() being able to 'return' garbage in copied ID.
Reported/noted in D4178, it would return immediatly in case of NULL
source ID, without ensuring that return 'copied' ID was properly
initialized.
2019-01-16 16:15:52 +01:00
792c453b2a Merge branch 'blender2.7' 2019-01-16 14:58:53 +01:00
0260d7b726 Cycles: Report whether camera was detected inside volume or not 2019-01-16 14:58:07 +01:00
7d7f5ce19f Multires: Cleanup, comments 2019-01-16 12:20:32 +01:00
514e53bb80 Expose batch IDs deletion in python API.
Follow-up to previous commit.
2019-01-16 12:02:37 +01:00
ce6d20b54e Add experimental batch IDs deletion.
Main idea is to remove IDs to be deleted from Main, to avoid looping on
them to remove other deleted IDs usage (this is the most expensive
process in ID deletion, by far).

Speed improvements when deleting a large amount of IDs from a Main
containing a lot of them is quite significant, some examples for Objects:
* Removing 1k from 10k: 32% quicker (2.5s to 1.7s).
* Removing 10k from 20k: 60% quicker (59s to 23s).
* Removing 20k from 20k: 99.5% quicker (82s to 0.4s)!

Note however that this process is more risky/touchy, since we by-pass
some safety checks from regular ID removal here.
So will only give access to that code from python API for now (in
separate commit), so that it gets really tested. Also still need to
think about how to hook it up in UI (probably mostly for Outliner),
since we often do higher-level operations there...
2019-01-16 12:02:37 +01:00
fcbbfb7789 Fix crash creating new file after modifications
Seems to be caused by cae3750 which changed free() function used
by bmain free to the one which does dependency graph tag. We do
no want to do any tags here.
2019-01-16 11:39:30 +01:00
bcef99d3a7 Cleanup: Spelling in comment 2019-01-16 11:36:54 +01:00
1579dc8c3b Multires: Prepare for cached topology
Note that the actual caching is still disabled, since
more tests is needed with more production-looking files.
2019-01-16 11:00:43 +01:00
6ae72d2d41 OpenSubdiv: Remove topology orientation code
It is no longer used and has some issues in corner cases
which are not handled in a way which OpenSubdiv expects.
2019-01-16 11:00:43 +01:00
7eda267df1 Subdiv: Reset evaluator creation statistics
Makes it more clear to see what was exactly happening at
the last invocation of subsurf modifier.
2019-01-16 11:00:43 +01:00
4fe6a2d950 OpenSubdiv: Implement UV topology comparison 2019-01-16 11:00:43 +01:00
b0c6c65e7b Subdiv: Initial implementation of topology cache
This commit makes it so OpenSubdiv's topology refiner is kept
in memory and reused for until topology changes. There are the
following modifications which causes topology refiner to become
invalid:

- Change in a mesh topology (for example, vertices, edges, and
  faces connectivity).
- Change in UV islands (adding new islands, merging them and
  so on),
- Change in UV smoothing options.
- Change in creases.
- Change in Catmull-Clark / Simple subdivisions.

The following limitations are known:

- CPU evaluator is not yet cached.
- UV islands topology is not checked.

The UV limitation is currently a stopper for making this cache
enabled by default.
2019-01-16 11:00:43 +01:00
e064777cac OpenSubdiv: Correct topology cpmparator
This fixes following errors:

- The code didn't work correctly for edges reconstructed by
  the OpenSubdiv's topology refiner (due to indexing
  difference).

- Sharpness of non-manifold and boundary edges was not
  working correctly.
2019-01-16 11:00:42 +01:00
5a794c9685 OpenSubdiv: Use own utility header
Replaces direct access to std.
2019-01-16 11:00:42 +01:00
f36f60543f OpenSubdiv: Cleanup, indentation 2019-01-16 11:00:42 +01:00
4347879c43 Subdiv: Cleanup, pass mesh by const pointer 2019-01-16 11:00:42 +01:00
6c196248be Subdiv: Cleanup, comments 2019-01-16 11:00:42 +01:00
3d4e92eb96 Alembic: C++11 doesn't need the space between '> >'
C++11 doesn't need the space between '> >' in a nested templated
declaration, so instead of `std::vector<std::pair<a, b> >` we can now
write `std::vector<std::pair<a, b> >`.
2019-01-16 10:59:22 +01:00
3ce9bcee70 Alembic export: write curve/NURBS as mesh
It's now possible to export curves and NURBS as mesh data to Alembic.
This allows artists to do any crazy thing on curves and export the
visual result to Alembic for interoperability with other software (or
caching for later use, etc.). It's an often-requested feature.

This works around T60503 and the fixes export part of T51311.

Note that exporting zero-width curves is currently not supported, as
exporting a faceless mesh (e.g. just edges and vertices) is not
supported by the mesh writer at all.

To test, create a curve with thickness (for example extruded), export to
Alembic and check the 'Curves to Mesh' checkbox in the export options.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4213
2019-01-16 10:44:39 +01:00
2bb6028d1a Alembic export: separated "writing Alembic mesh" from "writing mesh object"
I moved most of the `AbcMeshWriter` code to a new class
`AbcGenericMeshWriter`. The latter is an abstract class and does not
make any assumptions about the type of Blender object being written.
This makes it possible to write metaballs, curves, nurbs surfaces, etc.
as mesh to Alembic files.

The `AbcMeshWriter` class now is the concrete implementation of
`AbcGenericMeshWriter` for writing mesh objects.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4213
2019-01-16 10:43:45 +01:00
45042f6a03 Fix uninitialized cursor w/ setting object origin 2019-01-16 19:57:58 +11:00
735653cda8 Fix T52354: Origin to Geometry uses Bounds w/ Median Center is set 2019-01-16 18:32:09 +11:00
c383d74228 Logging: add '--log-show-timestamp' option.
Part of D4214 by @sobakasu w/ edits.
2019-01-16 16:33:05 +11:00
28790fb3a7 BMesh: prevent weld-verts bmop creating selected+hidden verts/edges
Related to error exposed by T59640
Would have fixed crash too, but we want to ignore hidden verts.
2019-01-16 15:32:24 +11:00
7c4803367f BMesh: prevent weld-verts bmop creating selected+hidden verts/edges
Related to error exposed by T59640
Would have fixed crash too, but we want to ignore hidden verts.
2019-01-16 15:31:54 +11:00
c8e5eb58e5 Fix T59640: Transform w/ auto-merge & hidden verts crashes 2019-01-16 15:05:48 +11:00
beaa66bb13 Fix T59640: Transform w/ auto-merge & hidden verts crashes 2019-01-16 15:03:17 +11:00
6299d84e10 Fix uninitialized variable use w/ kdopbvh ray projection
Snapping verts for eg would use these values uninitialized.
2019-01-16 15:02:58 +11:00
5861e1fa28 Object: avoid calling operators in ED_editors_init
Don't call operator when entering sculpt modes.
2019-01-16 11:49:19 +11:00
976917e8cf Cleanup: de-duplicate rotation mode enum 2019-01-16 11:17:13 +11:00
f027cbeeb9 Cleanup: use max frame define 2019-01-16 11:09:51 +11:00
d844271aef GP: Use weight in noise modifier for all types
The weight was used only for position.
2019-01-15 20:24:07 +01:00
b1fa2a8fbb Fix T59826: grease pencil crash with empty material slot. 2019-01-15 18:54:11 +01:00
eb61e6840e Merge branch 'blender2.7' 2019-01-15 18:42:37 +01:00
cac3e16cfb Sequencer: Restore change menu
It was still used by C-key menu, and is very handy to have
when working on a complex edit files.

Was initially removed by e9d06f0866.
2019-01-15 18:34:21 +01:00
a0df26f004 Fix T60383: mesh merge type callback returned NULL 2019-01-15 18:27:21 +01:00
e4c78436c6 Fix T60246: crash with Cycles baking while in edit mode. 2019-01-15 16:53:42 +01:00
2f2272f71a Alembic: removed declaration of non-existing functions
Removed AbcMeshWriter::getMeshInfo() and AbcMeshWriter::getMaterialIndices().
2019-01-15 16:21:04 +01:00
f16b9dc750 Marked TODOs with the actual string TODO
There are some things that need to be done in Alembic for Blender 2.8 to
make all the 'visible/renderable/selected only' options work.
2019-01-15 16:21:04 +01:00
9fed39c7b0 Alembic export: fixed memory leak
If the triangulated mesh was in itself a new mesh that should be freed this
should happen before the function returns (as it only returns a single mesh,
and thus the caller can only free one).
2019-01-15 16:21:04 +01:00
2124f3107c Merge branch 'blender2.7' 2019-01-16 00:28:46 +11:00
5f22de8439 Merge branch 'blender2.7' 2019-01-16 00:27:10 +11:00
665acf22bd Cleanup: commas at the end of enums
Without this clang-format may wrap them onto a single line.
2019-01-16 00:26:24 +11:00
d4c851b976 Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
2019-01-16 00:26:16 +11:00
ee789ccd46 Cleanup: comment line length (blenlib)
Prevents clang-format wrapping text before comments.
2019-01-16 00:14:42 +11:00
0b17547b23 Cleanup: comment line length (creator)
Prevents clang-format wrapping text before comments.
2019-01-16 00:14:34 +11:00
8e46e5189d Cleanup: comment line length (DNA)
Prevents clang-format wrapping text before comments.
2019-01-16 00:14:25 +11:00
88a80fcec8 Cleanup: commas at the end of enums
Without this clang-format may wrap them onto a single line.
2019-01-16 00:03:03 +11:00
2d98dce7ee Cleanup: rename BASE_FROMDUPLI -> BASE_FROM_DUPLI
Matches `BASE_FROM_SET`.
2019-01-15 23:30:31 +11:00
b8e8c0e325 Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
4226ee0b71 Cleanup: comment line length (blenlib)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
30c3852ffd Cleanup: comment line length (creator)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
328a0f975b Cleanup: comment line length (DNA)
Prevents clang-format wrapping text before comments.
2019-01-15 23:15:35 +11:00
39acbebe46 Fix T60498: Auto IK doesn't work immediately. 2019-01-15 12:07:22 +01:00
48f38f850b Fix T60497: wrong statusbar keymap display with MMB emulation. 2019-01-15 11:42:08 +01:00
bb70594c1b Fix T60497: edgering select not available with LMB select and MMB emulation.
This is now handled with Ctrl + double click LMB, similar to loop select.
2019-01-15 11:42:08 +01:00
0b9a65151d Fix T60410: Crash adjusting torus w/ enter edit-mode preference 2019-01-15 21:36:50 +11:00
e375685e06 Cleanup: pass main instead of context w/ ED_editors_exit/flush_edits
Useful for calling from lower level code.
2019-01-15 21:36:50 +11:00
01029c68d2 Cleanup: rename BKE_libblock_delete to BKE_id_delete. 2019-01-15 11:09:16 +01:00
f55a178db0 Cleanup: rename BKE_libblock_free_us to BKE_id_free_us. 2019-01-15 11:09:16 +01:00
f52d315c35 Cleanup: removed disabled 'slow but safer' piece of code in make_local process.
Has been disabled for nearly two years now, think we can safely assume
new, quicker code is working properly now. :)
2019-01-15 11:09:16 +01:00
c710ca8933 Cleanup: Remove deprecated BKE_libblock_free(_ex) functions, document BKE_id_free(_ex) ones. 2019-01-15 11:09:16 +01:00
cae3750ff9 Cleanup: replace usages of deprecated BKE_libblock_free_ex by BKE_id_free_ex. 2019-01-15 11:09:16 +01:00
6af97b84df Cleanup: replace usages of deprecated BKE_libblock_free by BKE_id_free. 2019-01-15 11:09:16 +01:00
2f39ca3843 Cleanup BKE_id_free_ex().
Add 'missing' bpy code from BKE_libblock_free_ex(), now both functions
do exactly the same thing, only the later is less flexible (fewer
'exotic' behaviors supported, like handling IDs outside of bmain etc.).

Next step: nuke usages of BKE_libblock_free functions, makes no sense to
have twice the same code around!
2019-01-15 11:09:16 +01:00
93867cfafc Correct last commit 2019-01-15 18:56:53 +11:00
b3791d59f6 Fix T60507: Constrained transform shows all axes
Regression in 579c01da60

Move values_modal_offset use out of applyMouseInput
to resolve order of initialization issue.
2019-01-15 18:40:31 +11:00
165caafb99 Revert fix for T48901: Use of XIWarpPointer
Xorg's XIWarpPointer doesn't support multi-head display while
XWarpPointer does.

Revert since this is a known TODO in Xorg and setting a custom
xinput matrix seems not to be used often.

Resolves T50383
2019-01-15 16:49:44 +11:00
9461af299c Revert fix for T48901: Use of XIWarpPointer
Xorg's XIWarpPointer doesn't support multi-head display while
XWarpPointer does.

Revert since this is a known TODO in Xorg and setting a custom
xinput matrix seems not to be used often.

Resolves T50383
2019-01-15 16:44:08 +11:00
dde4375d5c Fix T60504: Armature wire draw type hidden when unselected 2019-01-15 14:02:13 +11:00
745311ed4c Fix T60506: Menu toggle clicks pass through to area 2019-01-15 11:42:07 +11:00
b5a860c9cc CMake: Improve handling of missing TBB & OpenVDB 2019-01-15 11:14:36 +11:00
07541052a0 Fix T60512: Weight paint brushes show weight when unused 2019-01-15 11:06:36 +11:00
62ac0996e7 Cleanup: use BrushCapabilities prefix for RNA types 2019-01-15 10:54:35 +11:00
8c3bd1eda1 Cleanup: style 2019-01-15 10:36:52 +11:00
ee0c2e9b87 Edit Mesh: Improve selected double vertices visibility
The issue is that the edge fix geometry goes on top of the actual drawn
points.

This commit reduce the edge fix size to the strict minimum but does not
get rid of it.

Related to T60139
2019-01-14 23:43:17 +01:00
21fedfbca0 Fix T59482: Creating 2 Particle systems breaks the app 2019-01-14 23:43:17 +01:00
Harley Acheson
84c06e996a UI: indent subpanel headers more.
Differential Revision: https://developer.blender.org/D4206
2019-01-14 20:48:15 +01:00
Christopher Peerman
4693207918 Windows: add support for Windows Ink.
Before this Blender always needed the Wintab driver. This adds support for the
native pressure API in Windows 8+, making it possible to get pressure sensitivity
on e.g. Microsoft Surface hardware without any extra drivers.

By default Blender will automatically use Wintab if available, and if not use
Windows Ink instead. There is also a new user preference to explicitly specify
which API to use if automatic detection fails.

Fixes T57869: no pressure sensitivity with Surface pen or laptop.

Code by Christopher Peerman with some tweaks by Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D4165
2019-01-14 20:48:11 +01:00
eaf282b375 Cleanup: refactor GHOST wintab handling. 2019-01-14 20:48:07 +01:00
6f9e3e9d33 Fix T60476 Loose vertices only partially drawn
Was caused by a missing vbo attachement.

Also fix said Vbo refreshing when selecting.
2019-01-14 18:33:07 +01:00
209afa28c6 Object Mode: Outlines: Add support for thicker outline
Base outline is 2px wide (because of how we detect them).
And since inflating this outline will only produce outlines that are 2*x
thick we map the UI scalling and the outline width setting to the closest
match.

Do note that thicker outlines have a performance cost since they need more
texture fetches and passes.

This fixes T60252 3D View Outline Width not working
2019-01-14 18:33:07 +01:00
065bdc0333 GPUMaterial: Cleanup 2019-01-14 18:33:07 +01:00
dd5602a1e5 Fix T60332: Lattice objects do not display properly in Edit mode
This was caused by wires not having alpha by default, making them disapear
with MSAA.
2019-01-14 18:33:07 +01:00
630a7e73bc Fix incorrect individual origins icon in clip editor.
Differential Revision: https://developer.blender.org/D4020
2019-01-14 17:36:22 +01:00
de1d3e5f5f NLA: implement a new blending mode that intelligently combines actions.
The existing Add and Multiply blending modes have limited usability,
because the appropriate operation for meaningfully combining values
depends on the channel. This adds a new mode that chooses the operation
automatically based on property settings:

- Axis+Angle channels are summed, effectively averaging the
  axis, but adding up the angle. Default is forced to 0.

- Quaternion channels use quaternion multiplication:

  result = prev * value ^ influence

- Scale-like multiplicative channels use multiplication:

  result = prev * (value / default) ^ influence

- Other channels use addition:

  result = prev + (value - default) * influence

Inclusion of default in the computation ensures that combining
keyframed default values of properties keeps the default state,
even if the default isn't 0 or 1.

Strips with this mode can be keyframed normally in Tweak mode,
except that for quaternion rotation keyframing always inserts
all 4 channels, and the channel value sliders on the left side
of Graph/Action editors won't insert keys without Auto Key.
Quaternion keys are also automatically normalized.

Differential Revision: https://developer.blender.org/D4190
2019-01-14 19:14:28 +03:00
9c1a961dc4 Keyframing: refactor insertion code to allow property-global NLA tweaks.
Supporting a strip blending type that treats quaternions as a unit
also means being able to adjust all sub-channels as a unit when
inserting keyframes. This requires refactoring keyframe insertion
code to retrieve array property values for all channels at once,
before iterating over the indices being inserted.
2019-01-14 19:14:28 +03:00
1665278c14 Fix the active sequencer strip not standing out from selected ones.
Set outline contrast back to 2.7 values.
2019-01-14 16:08:26 +01:00
b17591731d Build environment: fixes for Linux debug libraries build. 2019-01-14 15:57:53 +01:00
Alex Fuller
c08c6c8336 Cleanup: add begin/end iterators to Cycles NodeEnum.
Differential Revision: https://developer.blender.org/D4173
2019-01-14 15:57:53 +01:00
Alex Fuller
867ffacabf Fix Cycles node definition typos and incorrect enum value.
Differential Revision: https://developer.blender.org/D4174
2019-01-14 15:57:53 +01:00
Harley Acheson
1af9599aca UI: fix misaligned eyedropper icon in button.
Differential Revision: https://developer.blender.org/D4183
2019-01-14 15:28:04 +01:00
Harley Acheson
06f7b6827d UI: fix panel header contents alignment.
The contents is now properly centered at all zoom levels.

Differential Revision: https://developer.blender.org/D4176
2019-01-14 15:28:01 +01:00
Harley Acheson
ed843774a8 UI: fix horizontal scrollbar overlapping last item.
Differential Revision: https://developer.blender.org/D4202
2019-01-14 15:20:31 +01:00
b5b6555768 cleanup last commit 2019-01-14 14:13:39 +01:00
ec3e2b0ce5 Fix T60304, T60301: setting error message in bevel modifier results in double free 2019-01-14 14:10:33 +01:00
67c5412708 Fix T60441: entering hex color in picker gives wrong result. 2019-01-14 13:09:06 +01:00
7707bf203c Merge branch 'blender2.7' 2019-01-14 12:43:34 +01:00
Christopher Peerman
19fba61d46 Fix T55589: drawing strokes with Microsoft surface pen misses first part.
This disables touch gesture recognition in Blender, avoiding any initial delay
when drawing with grease pencil, texture paint, etc.

Differential Revision: https://developer.blender.org/D4203
2019-01-14 12:25:42 +01:00
728f43d585 Merge branch 'blender2.7' 2019-01-14 12:13:10 +01:00
10fa3b790f Fix T60450: Cycles broken GPU denoising after recent changes. 2019-01-14 11:42:38 +01:00
a6b2ec0bc2 Fix toolbar accelerator w/ user defined keyconfig 2019-01-14 18:59:26 +11:00
2e3e94c796 3D View: don't override animation template view color
D4198 by @charlie w/ edits.
2019-01-14 18:12:13 +11:00
417cd20257 Cleanup: unused function 2019-01-14 18:04:10 +11:00
b3dbe17658 Add font selection to VSE text strips
Allows users to select a font for text strips in the video sequence editor.

Related: 3610f1fc43 Sequencer: refactor clipboard copy to no longer increase user count.

Reviewed by: Brecht

Differential Revision: https://developer.blender.org/D3621
2019-01-13 21:57:09 -08:00
c450461e68 Fix crash on scene unlink
Reviewed by: Brecht

Differential Revision: https://developer.blender.org/D4200
2019-01-13 21:57:08 -08:00
e1c4dc7a64 Fix drawing metadata
ImBuf was freed prior to drawing metadata.

Reviewed by: Brecht

Differential Revision: https://developer.blender.org/D4170
2019-01-13 21:57:08 -08:00
fad5232f8a Fix FPS meter not showing properly with no input
Reviewed by: Brecht

Differential revision: https://developer.blender.org/D4136
2019-01-13 21:57:07 -08:00
f91b21f85b Cleanup: move comments above definitions
For clang-format not to wrap definitions.
2019-01-14 16:30:43 +11:00
a1d73d03eb Cleanup: move comments above definitions
For clang-format not to wrap definitions.
2019-01-14 16:20:55 +11:00
63ee378fa9 Cleanup: move comments above definitions, use enum
For clang-format not to wrap definitions.
2019-01-14 15:58:40 +11:00
af4ab8c6a1 Fix T60248: Crash duplicating collections 2019-01-14 15:36:12 +11:00
65b82e09d9 Fix T57852: Mesh X Mirror option not working
D3869 by @lichtwerk w/ own edits
2019-01-14 15:14:39 +11:00
9c7adcfd8b Fix T60388: Warning entering text edit mode 2019-01-14 14:16:08 +11:00
a980b2f455 Fix message bus ID remapping 2019-01-14 14:08:40 +11:00
723e469686 Fix T60267: Assert manipulating a collection 2019-01-14 13:59:56 +11:00
8a2d48d928 Cleanup: move comments above definitions
For clang-format not to wrap definitions.
2019-01-14 12:43:19 +11:00
9390b2e645 Cleanup: compiler warnings 2019-01-14 11:42:28 +11:00
2826c2be54 NLA: ignore time range when evaluating a raw action.
When editing an action without a strip, or tweaking a strip without
time mapping enabled or supported, the extents of the virtual strip
can't be controlled and are purely derived from keys in the action.

Thus, cutting off evaluation of the action at these arbitrary points
gets in the way of observing the natural extrapolation of the F-Curves
and thus appears to be a mis-feature.

With this change non-mapped actions are evaluated with infinite
range, exactly like they are handled without NLA, unless extend
mode is set to Nothing.
2019-01-12 14:10:33 +03:00
5e356cc5c8 GP: Cleanup missing brackets 2019-01-12 08:36:00 +01:00
Dalai Felinto
ce3475f747 Viewport: Stereoscopy drawing is back
The viewport stereoscopy support helpers are finally ported to 2.80.

We now can scale the camera and the "stereo cameras" will scale
in the viewport as well (unlike 2.7x).

At the moment I disabled the drawing of the camera frame when
stereo is selected and you are looking through the camera.

It is to be fixed later, but for now it draws the border wrong.
In 2.79 this was not a problem because the camera frame was drawn
afterwards as a hack.

Viewport > Stereoscopy:
* Cameras
* Convergence plane
* Convergence plane alpha
* Stereoscopy volume
* Stereoscopy volume alpha
2019-01-11 21:51:15 -02:00
Dalai Felinto
ba89b69ebd BKE_camera_multiview_model_matrix: Add _scaled version
For drawing it is useful to have the non-normalized version of the matrix.
So we can scale up the cameras drawing accordingly.
2019-01-11 21:51:15 -02:00
Dalai Felinto
9f6e09bd8c Drawing API: shgroup_instance and shgroup_instance_alpha clarification
shgroup_instance_alpha was getting a color[4] but would only use the
alpha defined upon creation of the shading group.

This was very limiting since it wouldn't allow for different instances
to have different alpha values.

Patch made with Clément Foucault (he made the code of it, while I fixed
all the parts of the code that were relying on shgroup_instance_alpha.
2019-01-11 21:51:15 -02:00
Dalai Felinto
0bd20aa7df Fix T60328: Stereoscopy Convergence Plane broken
The original issue is that we were changing the camera shiftx
temporarily for the stereoscopic calculation. However we are using the
evaluated object when calculating the projection matrix.

Note: Camera framing drawing for stereo still seems to be broken.
But the viewport itself is now correct.
2019-01-11 21:51:15 -02:00
47be4e9a33 Fix T60401: Shape key's from pointer being set to evaluated CoW ID.
Not sure exactly why this happened for 'apply as shape' and not in other
cases (did not took time to fully trace what happens there). But in any
case, `BKE_key_evaluate_object_ex()` can be called from a fair amount of
places, including during depsgraph evaluation, so setting back key's
owner here is plain wrong in CoW era.
2019-01-11 23:16:27 +01:00
b56b41d51f Fix T60402: Increased data.users value, when running: C.active_object.to_mesh(C.depsgraph, True) - on curve.
More like a band-aid than anything else really, that code is horribly
weak and need to be fully re-written at some point (putting all those
temp data-blocks fully outside of bmain...). But for now should do.
2019-01-11 20:26:52 +01:00
7aecb018f6 =Fix unused func warning in GP code... 2019-01-11 20:14:37 +01:00
1b18e0d8f6 Fix syntax error breaking compile in GP code.
Seriously… Build your code before committing!!!
2019-01-11 20:14:37 +01:00
cd41570b55 Revert "Fix T57371: Generative modifiers in editmode display vertex group weights ..."
This reverts commit 6dbfd7f6d6.
2019-01-11 20:09:42 +01:00
00d2237d2a Fix T57371: Generative modifiers in editmode display vertex group weights
In a better way...

6dbfd7f6d6 would make the final vertex weights always calculated in
edit mode. Now it's only if the option is enabled.
2019-01-11 20:09:42 +01:00
9f51fc656e EditUV: Only clear data VBO when selection changes
This is a small optimisation that make UV selection faster.
2019-01-11 20:09:42 +01:00
ee34275e7d Merge branch 'blender2.7' 2019-01-11 20:03:42 +01:00
1ded3d2f7c Fix T55668: Volume Keyframe on Cut-ted Metastrip (re-doing the fix in better way).
Fix T60194: Sequencer cut loses animation data for the right strip.

Fixing the first also fixes the second. First attempt was delaying
uniquename check at a later step of cut process, after everything had
been duplicated. While this fixed first issue, second one became even
more proeminent (it become active for all strips, and not only
video/audio movie strips in meta's).

So instead, passing along the list of (new) sequences, so that duplicated
seqs can be put there immediately, before checking for unique names,
henceforth ensuring even strips inside meta's get properly handled.
2019-01-11 20:01:01 +01:00
c97794520f Revert "Fix T55668: Volume Keyframe on Cut-ted Metastrip."
This partially reverts commit bb98e83b99.
It fixed 'strips having same name' issue, but broke handling of
animation then. Need to find a better way to handle this.
2019-01-11 19:49:06 +01:00
bb9c9d0eaa GP: New Cutter, Constraints and Segment selection
This commit groups a set of new tools that were tested in grease pencil object branch before moving to master. We decide to do all the development in a separated branch because it could break master during days or weeks before the new tools were ready to deploy.

The commit includes:

- New Cutter tool to trim strokes and help cleaning up drawings.

- New set of constraints and guides to draw different types of shapes. All the credits for this development goes to Charlie Jolly (@charlie), thanks for your help!

- Segment selection mode to select strokes between intersections.

- New operator to change strokes cap mode.

- New option to display only keyframed frames. This option is very important when fill strokes with color.

- Multiple small fixes and tweaks.

Thanks to @pepeland and @mendio for their ideas, tests, reviews and support.

Note: Still pending the final icons for Cutter in Toolbar and Segment Selection in Topbar. @billreynish could help us here?
2019-01-11 19:21:56 +01:00
6dbfd7f6d6 Fix T57371: Generative modifiers in editmode display vertex group weights ...
... incorrectly (or assert)

Thanks @angavrilov and @lichtwerk for the fix.
2019-01-11 18:56:05 +01:00
3a9909f38e Fix T59990: Crash when entering edit mode with skin modifier enabled
The skin modifier does not keep the UV layers.

This just add a safety check when there is no UV layers.
2019-01-11 18:56:05 +01:00
1c7695b848 Merge branch 'blender2.7' 2019-01-11 18:09:05 +01:00
48506a3431 Fix T60145: Cycles resets manually set affinity
This change brings back old original logic which was checking
whether worker threads do fit into an active CPU group. But
it does it a bit smarter now and is also checking affinity
within that group. This way Cycles will use all threads on a
Threadripper2 CPU if it's set to automatic number of threads,
but on another hand will not change affinity if user requested
16 threads and changed Blender affinity.
2019-01-11 17:55:36 +01:00
ff44a9957e Update bundled version of NUMA API library 2019-01-11 17:47:10 +01:00
ba4e6d73af GP: Missing in previous count commit 2019-01-11 17:30:53 +01:00
6abbab5b53 Fix T60415: wrong font preview image alpha blending. 2019-01-11 17:26:54 +01:00
a1764cedbd Fix Python errors batch generating preview images. 2019-01-11 17:26:54 +01:00
854485b4b3 Fix T60411: crash in multi-object pose mode, with some armatures in rest pose. 2019-01-11 17:26:54 +01:00
a369004543 GP: Fix missing Fill properties in Topbar
After some internal changes in the topbar, some properties were not visible if use col() instead of row() in python script.
2019-01-11 17:22:13 +01:00
6c056f9ae2 GP: Reduce memory reallocation in multiedit mode
There was a problem counting the number of points for edit points and lines. Now the total size is used allocating the VBO size and not the stroke size.
2019-01-11 16:58:42 +01:00
1c91b6ee29 UVEdit: Port texpaint_loop_wire to batch request
This removes code duplication and put an end to the old "create at request"
batch creation.

Also it uses the same vbo as the uv layer used for shading. Reducing VRAM
usage.

Also fixes the modified uv display in uv edit mode.
2019-01-11 16:00:23 +01:00
621a6d4a5d UVEdit: Add back uv angle stretch aspect correction
This is now done in shader so that the batches are shared across ImageUV
areas.
2019-01-11 16:00:23 +01:00
5f3fdee53a UVEdit: Port batches to batch request
This is in order to allow more spaces to have their batches created at the
same time and sharing the batches.

This is part of the effort fo making the drawing code more optimized. This
commit however should not introduce any difference.

This commit bypass the aspect ratio correction for angle stretch display
but this should be fixed in the next commit.
2019-01-11 16:00:23 +01:00
86ec304ffa WM: Use draw manager to draw UV image editor spaces
This is in order to use batch cache directly without using tricks like
batch presets reseting the VAOs.

Note: For now it also create a depth buffer for this area which is not
needed. We could get rid of this to lower VRAM usage.
2019-01-11 16:00:23 +01:00
74260a2b6d BMesh: Add BM_face_calc_area_uv 2019-01-11 16:00:23 +01:00
b98e6743dc Texture Paint: Add filtering option for texture paint overlay
The overlay should now use the texture interpolation setting in material
mode.

In image mode, there is now a new button to let the user choose the texture
filter. The option is located in the Texture Slots popover and only shows
in Image mode.
2019-01-11 16:00:23 +01:00
9177bb33f6 Workbench: Support node texture "closest" interpolation option
This makes it possible to paint pixel art using the workbench.

Cubic interpolation is not supported but could be added if needed.
2019-01-11 16:00:23 +01:00
1459a70489 GPUShader: Cleanup Unused shaders 2019-01-11 16:00:23 +01:00
a46dc9b234 Mesh Batch Cache: Cleanup Unused 2019-01-11 16:00:23 +01:00
44e3fc66c7 Edit Mode Selection: Make Vertices not occluded by edges
Debugging the edit mode selection I realized the vertices are often
occluded by edges with the same depth. Sometime it can be the center
pixel of a vertex point and that can lead to some selection issue.

So I increased the offset a bit for the vertices and it seems to fix it.
2019-01-11 16:00:23 +01:00
3bc87227f5 GPUMaterial: Cleanup / optimization 2019-01-11 16:00:23 +01:00
55ddb21b7c Mesh Selection: Port to batch cache request
This makes it more future proof and remove baked id offset inside the vbos.
Instead we add the offset as a uniform. This makes it possible to reuse
the vbos instead of discarding them all the time.

Also using batch request may reduce batches creation time.
2019-01-11 16:00:23 +01:00
4c0c4e7f9f Mesh Batch Cache: Fix wrong assert 2019-01-11 16:00:23 +01:00
9d19ff9076 GPUShader: Add selection id shader
This is to separate id drawing from standard color drawing.
2019-01-11 16:00:23 +01:00
943852c0dc Mesh Batch Cache: Put context evaluation out of batch cache
This is in order to be able to call DRW_mesh_batch_cache_create_requested
outside of the draw manager
2019-01-11 16:00:23 +01:00
bda2cd8ba5 DRW: Fix texture paint crashing if object has no material slot 2019-01-11 16:00:23 +01:00
cca35c1013 Merge branch 'blender2.7' 2019-01-11 15:09:46 +01:00
c1dd74580e Fix T60227: Crash when Cycles uses more than system threads
Tweaked scheduling so it survives this situation by scattering
"extra" threads uniformly over all the NUMA nodes.

There are still tweaks possible to make some specific hardware
configurations work better.
2019-01-11 15:03:48 +01:00
e5a1a9288c Fix T60320: Cycles OpenCL denoising filter errors on some drivers. 2019-01-11 11:25:37 +01:00
5793a84f12 GP: Count all strokes when use multiedit for VBO size
When use multi frame edition, the initial size of the VBO must be bigger than normal edition because the realloc of VBO is very slow.
2019-01-11 11:00:30 +01:00
191e812f36 Fix auto-run warning RNA type 2019-01-11 15:43:53 +11:00
459c4e8e6e Theme: update blender light theme preferences
Copy from properties space.
2019-01-11 15:11:00 +11:00
5119d72f9a Theme: disable blender_light 3D view gradient
- Lost contrast w/ faded wire for dupli/set-scene.
- Make grid darker to increase contrast.
2019-01-11 15:02:58 +11:00
0434511a40 3D View: fade out dupli-wire color 70% 2019-01-11 15:02:58 +11:00
9327013796 3D View: use faded wire for set-scene objects
Matches 2.7x behavior.
2019-01-11 15:02:52 +11:00
ee6e02ccf3 3D View: use dupli wire color for shaded wire drawing
Was only working for loose wire.
2019-01-11 15:02:21 +11:00
40706b56db Cleanup: blend existing colors 2019-01-11 13:27:49 +11:00
45dc53410f Cleanup: avoid repetition versioning theme 2019-01-11 13:23:27 +11:00
a33f3cf9b2 startup: view background color wasn't default 2019-01-11 13:15:38 +11:00
5c6d5cb863 Fix background color use in 3D view
TH_BACK was being used when drawing the 3D view even though
there was no way to set the color in the preferences.

The color was zero'd when moving to the new 2.8x theme.

Having both gradient and background colors was confusing,
especially having to use 'TH_HIGH_GRAD' for the 3D view, 'TH_BACK' for
other views.

Move the background color back to 'TH_BACK', 'TH_BACK_GRAD' is used
when gradients are enabled.
RNA is unchanged so presets don't need updating.
2019-01-11 12:59:19 +11:00
f98e4cbedb Preferences: remove author field
This was only used by collada export metadata.

If metadata like this is needed, we can use per-filetype preferences,
to make it clear when user identifiable information is being used.
2019-01-11 11:00:33 +11:00
6439ed844e Cleanup: remove tabs after line start
Allows expanding tabs before running clang-format.
2019-01-11 10:53:21 +11:00
638079af20 Cleanup: unused vars 2019-01-11 10:52:26 +11:00
b1e286bbfe MSVC: remove compiler __func__ define
No longer needed and exposes a bug in clang-format see: D4185
2019-01-11 09:33:20 +11:00
302970b7a5 MSVC: remove compiler __func__ define
No longer needed and exposes a bug in clang-format see: D4185
2019-01-11 09:22:21 +11:00
Trevor Glauz
8b192e1a6a fix D4187: Collada Importer: Material assignment broken after importing Mesh with multiple materials 2019-01-10 20:24:56 +01:00
bf7a1ef11e Fix T60266: missing viewport updates after changing scene world datablock. 2019-01-10 20:10:48 +01:00
4b0c2152db Fix use of uninitialized GPU context memory in release builds.
Reported by valgrind, not sure it caused any real bugs.
2019-01-10 20:03:05 +01:00
b207f4e4a2 Subdiv: Fix memory leak
Was visible when mesh had n-gons.
2019-01-10 17:09:48 +01:00
e551ddf712 Fix T60393: Subdiv gives wrong vertex colors 2019-01-10 17:09:48 +01:00
41b65d9a8e Fix T59631: Crash in Surface Deform modifier Bind when Dynamic Paint is included.
We should *never* prevent copying basic mesh CDLayers (vertices etc.),
that does not make sense.

I guess issue was not in old DM because geometry was duplicated anyway,
and in 'normal' modifier stack eval, probably because bare mesh was
awlays requested? But we should not have to be explicit here about it.
2019-01-10 16:47:41 +01:00
e31a5a4c62 GP: Fix render glitch when have collision with mesh 2019-01-10 16:26:05 +01:00
0f1775205e Use proper ID to create FModifier RNA pointer
Allows to do simple DEG tag, without extra checks for ID type.

Will solve possible missing updates when modifying f-curve
modifier of a shared action.
2019-01-10 16:22:53 +01:00
ba2b26af31 Support proportional edit scaling on dopesheet keyframes
Fixes T60361

Reviewers: brecht

Maniphest Tasks: T60361

Differential Revision: https://developer.blender.org/D4188
2019-01-10 16:07:47 +01:00
92a081ff83 Fix T60340: Removing f-curve modifier doesn't update animation 2019-01-10 16:05:16 +01:00
fc24d1a974 Keep track of owner of f-curve
This is a part of another which, which needs to tag owner
of f-curve for an update. But since this is too many lines
changed committing separately.

Basically, for f-curve AnimElement we are now storing ID
whih owns the f-curve.
2019-01-10 16:05:16 +01:00
Justin Jones
db36eff9f7 UI: make pie menus stick only when tapping key.
When holding down the key for a while, the pie menu will disappear when
releasing the key. This is under the assumption that in this case the user
decided to cancel the action.

Differential Revision: https://developer.blender.org/D4180
2019-01-10 15:55:34 +01:00
f572a157ba Fix T59913: error saving cloth preset
thx @rombout for investigation!
2019-01-10 15:53:32 +01:00
80281e34fd fix T60049: Collada Exporter: When exporting multiple UVs, the set index must start with 0 2019-01-10 13:15:20 +01:00
16b0a74228 GP: Fix unreported pixel glitches
There was a problem in the caps start and in some situations, the pixel was wrong.

Also changed the way the caps are detected because use the alpha in negative was a hack that maybe will not work with all drivers.
2019-01-10 13:13:44 +01:00
80ffa73b3f Fix T60285: allow negative offsets in shrinkwrap (worked in 2.79). 2019-01-10 12:15:20 +03:00
0f99845d2f 3D View: use faded color for dupli instance outlines
Similar to 2.7x, so instanced geometry can be differentiated.
2019-01-10 18:29:13 +11:00
5ce6b344d5 3D View: use faded color for dupli instance wire & points
Similar to 2.7x, so instanced geometry can be differentiated.
2019-01-10 18:28:53 +11:00
ca8f521971 Undo System: switch active text block when undoing 2019-01-10 14:11:07 +11:00
a44ac44c1e Fix anim_utils.bake_action typo
D4172 by @rcorre
2019-01-10 13:11:48 +11:00
11f9938eed Clenaup: remove unused EM_WAITCURSOR 2019-01-10 13:02:07 +11:00
002d0bd344 Cleanup: remove unused copy menu code
Unused since 2.4x.
2019-01-10 12:55:09 +11:00
b389bb5ef8 Cleanup: end DefNode macro w/ semicolon
Needed for clang-format.
2019-01-10 12:41:32 +11:00
0373ff5e9c Cleanup: end bgl macros w/ semicolon
Needed for clang-format.
2019-01-10 12:38:11 +11:00
1e00f91760 Fix gizmo orientation w/ shear tool 2019-01-10 12:25:09 +11:00
f974a02285 Fix T60358: popup clipping within window
Moving menu contents wasn't working properly.
2019-01-10 11:30:30 +11:00
f9d14ceb40 Fix T60358: popup clipping within window
Moving menu contents wasn't working properly.
2019-01-10 11:18:18 +11:00
609d4f5c92 Fix T60354: Paint color shown when not used
Add 'has_color' check to avoid duplicated tool checks.

Also abbreviate text descriptions.
2019-01-10 10:12:23 +11:00
eb3886c7ac Cleanup: sort RNA types after ename 2019-01-10 09:58:04 +11:00
5100e4419e Cleanup: ensure header guards come first
Causes clang-format not to detect header guards,
indenting all preprocessor lines in the header.
2019-01-10 09:04:44 +11:00
5681631109 Cleanup: ensure header guards come first
Causes clang-format not to detect header guards,
indenting all preprocessor lines in the header.
2019-01-10 08:46:38 +11:00
69c8f0cc3b Merge branch 'blender2.7' 2019-01-10 08:10:50 +11:00
f87b93a567 Fix T55336: Crash w/ dyntopo sculpt 2019-01-10 08:03:25 +11:00
399fd54f88 Undo System: apply accumulation steps
Apply steps between the active and the undo state being decoded.
2019-01-10 08:03:18 +11:00
99d001a10f Fix sculpt redo failing to enable dyntopo 2019-01-10 08:03:09 +11:00
7f5bae28db Fix memfile undo decoding creating undo steps
Exiting modes shouldn't be needed since loading the new memfile
will free the old data.

Sculpt mode dynamic topology was adding undo data on exiting the mode
which isn't logical in this case and can be avoided altogether.
2019-01-10 08:02:51 +11:00
ea0abf52bf Fix T59165: Text operations fail to undo
Some undo operations encode multiple actions, now all are undone/redone.
2019-01-10 08:01:50 +11:00
60799d6fee Merge branch 'blender2.7' 2019-01-09 17:20:58 +01:00
49e3f08815 Build Environment: install clang-format for macOS / Linux.
It's already there for Windows.
2019-01-09 17:18:49 +01:00
0bb0e07e61 Fix Cycles viewport render doing some unnecessary work at the start.
In some cases it would load adaptive kernels or even start rendering
twice because the first time the scene was not fully synced yet.
2019-01-09 17:16:29 +01:00
b7fb3296c1 Fix T60300, T57774: Cycles OpenCL viewport crash with subsurface scattering. 2019-01-09 16:42:03 +01:00
513bc5954c Fix T60351: Blender crashes when using fill tool without existent keyframe 2019-01-09 16:39:07 +01:00
90e354fd7a Revert/Redo ugly rBd12b3767f81d commit (i.e. add locked sorting option to UIList).
Too many things done wrong in original rBd12b3767f81d to list them all
here, hopefully nothing bad sneaked in again this time :|

Also cleaned up a little the 'sort by name', even though (since we only
have two options by default, sort by index and by name) we can abuse it
as a binary option for now, this is not a bitflag...
2019-01-09 15:51:46 +01:00
1c42f1c5ca Fix T60324: node linking UI bugs with some shader nodes. 2019-01-09 14:35:48 +01:00
56ceaea5b5 Fix T60244: Bisect in mirror modifier doesn't work properly.
That was indeed not working properly, not at all. Except for
the basic case, but as soon as you used another object to define the
mirror plane, it would be utterly broken, in several different ways!
2019-01-09 13:28:34 +01:00
ddabad2410 Merge branch 'blender2.7' 2019-01-09 12:56:50 +01:00
1a6a80270d Cycles: Add utility to dump BVH tree as graphviz file 2019-01-09 12:14:20 +01:00
8044e5f2d7 Cycles: Make BVH wider prior to packing
This allows to do more non-trivial tree modifications to make
it more dense and more friendly for vectorization.
2019-01-09 12:14:20 +01:00
ff6ff90cbe Fix T60342: exception when creating cycles integrator or sampling preset 2019-01-09 11:58:48 +01:00
22ddd57363 Fix T60338: Allow user to input units of another system 2019-01-09 10:40:05 +01:00
06d1c2f737 Fix T55336: Crash w/ dyntopo sculpt 2019-01-09 20:27:02 +11:00
3cbe2a19df Undo System: apply accumulation steps
Apply steps between the active and the undo state being decoded.
2019-01-09 20:21:24 +11:00
ef33215bb7 Fix sculpt redo failing to enable dyntopo 2019-01-09 18:10:16 +11:00
7e6d7d53cf Fix memfile undo decoding creating undo steps
Exiting modes shouldn't be needed since loading the new memfile
will free the old data.

Sculpt mode dynamic topology was adding undo data on exiting the mode
which isn't logical in this case and can be avoided altogether.
2019-01-09 17:37:13 +11:00
9012ad155c Fix T59165: Text operations fail to undo
Some undo operations encode multiple actions, now all are undone/redone.
2019-01-09 16:08:40 +11:00
a4d21441f9 Avoid assert w/ recent sculpt changes on undo 2019-01-09 13:25:23 +11:00
4069b10be8 Fix swapped active/selected lattice vertex color 2019-01-09 13:09:03 +11:00
df8e8e5b6b UI: use keymap introspection for tooltip creation
Also support non existing keymap items which gave an error, see: T60335
2019-01-09 12:27:58 +11:00
34143a9e7a WM: add keymap.find_from_operator(...) 2019-01-09 12:26:10 +11:00
d615203342 Fix IS_EVENT_ACTIONZONE macro
Caused tweak events not to display.
2019-01-09 12:22:32 +11:00
3c3d80ea22 Assert: add check to last commit 2019-01-09 10:33:36 +11:00
b536d1b95f Object Mode: only toggle active object mode once
- When toggling a mode that doesn't support multi editing
  only do this once of the active object.

- For sculpt mode create sculpt data since this is needed
  for activating other sculpt objects on reload.
2019-01-09 10:21:51 +11:00
1b6b0fbd95 Fix T60044: Sculpting brush is not visible
Same logic as fix from D4153, but only applied when running undo.
2019-01-09 09:12:57 +11:00
Dalai Felinto
583c321334 Revert "Fix T60044: Sculpting brush is not visible on file load"
This reverts commit 4d8ed937f2.

An alternative fix will come soon as a patch, since this introduced an issue.
Rolling back since the original fix (sculpt cursor on load) is less important
than the issue it introduced (crash on weight paint undo/redo).

Fix T60322.
2019-01-08 18:31:36 -02:00
12e9d52882 Fix T60327: Value input with adaptive imperial units not working properly 2019-01-08 19:20:56 +01:00
ae2af46920 Fix inconsistent naming and behavior for base visible/selected/editable.
Fixes T60251.
2019-01-08 18:50:44 +01:00
b486088218 Fix T60320: Cycles OpenCL volume rendering error on some drivers. 2019-01-08 15:59:10 +01:00
8491dba0c6 Fix T60300: Cycles SSS render hanging with AMD OpenCL. 2019-01-08 15:37:16 +01:00
54985ab5f5 Quick Explode: replace BI based material handling (using 'fade'/'blend')
using a simple shader graph mixing Transparent BSDF now

Fixes T59185

Reviewers: brecht

Maniphest Tasks: T59185

Differential Revision: https://developer.blender.org/D4181
2019-01-08 15:35:06 +01:00
4b55945da6 Quick Explode: use keyword argument 2019-01-08 15:32:45 +01:00
369e1d46f0 Fix T56545: Material referencing missing UV crash 2019-01-09 01:05:43 +11:00
22474062b1 Fix T58479: Quick Favorites Lets you add multiple of the same item
Reviewers: brecht

Maniphest Tasks: T58479

Differential Revision: https://developer.blender.org/D4135
2019-01-08 14:47:05 +01:00
24a84c4742 Fix T60314: Missing strength w/ weight gradient 2019-01-08 23:49:58 +11:00
395120ed72 Typo fixes 2019-01-09 01:41:58 +13:00
9d4ed6d03b Fix T59984: Drivers don't update values in UI or show proper errors
We now perform COW -> original data flushing for all the debug values + error
status flags on Drivers/DriverVariables/DriverTargets, as these are only set
when errors are encountered when evaluating drivers.
2019-01-09 01:41:58 +13:00
b4bb9d59ee Fix T59450: brush colors flip inactive w/ texture paint 2019-01-08 23:25:36 +11:00
152c965b75 Fix T60263: render layer node sockets not showing on file load, for some files. 2019-01-08 13:21:39 +01:00
f9cefc4d17 Fix T60291: Wrong tooltip in for Add Cube tool 2019-01-08 12:24:51 +01:00
ef818009e0 Fix T60306: Circle select tool behaves like a mode 2019-01-08 22:15:00 +11:00
e11bb77f31 Properly clean up Python when exiting due to --python-exit-code
When BPY_python_end() is not called, there can be buffered data still in
`sys.stdout` or `sys.stderr`. This generally isn't an issue when those are
connected to a terminal, but when they are read by another process (in the case
of rendering with Flamenco, for example) we could miss the actual error message
that's causing the exit in the first place.

The following script demonstrates the issue; before this commit neither the
writes to STDERR and STDOUT nor the traceback of the NameError were shown.

    #!/bin/bash

    cat > file-with-errors.py <<EOT
    import sys
    print('THIS IS STDERR', file=sys.stderr)
    print('THIS IS STDOUT', file=sys.stdout)
    nonexisting.monkey = 3
    EOT

    blender --enable-autoexec -noaudio --background \
	any-existing-blendfile.blend \
	--python-exit-code 42 \
	--python file-with-errors.py 2>&1 | cat

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: fsiddi

Differential Revision: https://developer.blender.org/D4168
2019-01-08 12:00:18 +01:00
68b4c57ba5 Merge branch 'blender2.7' 2019-01-08 11:47:35 +01:00
1e386d98ce Make DNA and RNA errors more meaningful and friendly 2019-01-08 11:43:15 +01:00
f2d2bafe85 fix rotational limits not showing for GENERIC ridgid body constraint
oversight in rB502aabb9d0c5

part of T60290
2019-01-08 10:21:26 +01:00
859a4dd51b Fix workbench shading pie menu
Expand the enum since it's dynamic, depending on the render engine.
2019-01-08 17:17:52 +11:00
a0d456daf8 Vertex Paint: support vertex masking
Working in 2.7x, was just disabled in 2.8x.

Fixes T60256
2019-01-08 15:18:28 +11:00
91a155833e Cleanup: comments causing bad clang-format output 2019-01-08 10:37:43 +11:00
3d2ff33c26 Fix T60167: wrong shader nodes in Eevee add menu. 2019-01-07 17:32:40 +01:00
b2a0ffc95f Fix bad enum value since 299ff7dcd1
This is why out-sourcing things to a production-tested formatters
is a very very good idea.
2019-01-07 17:18:33 +01:00
8e35a968c5 Subdiv: Use defined order of corner/edge vertices
This switches evaluation of vertices which are on the boundaries
of PTex faces to a single threaded one. While this introduces
some slowdown it fixes ambiguity of PTex index used to evaluate
particular vertex.

Possible alternative solutions would be:
- Do some pre-calculation of index, then do evaluation in threads.
- Try using Gregory patches and see if that makes any affect.

Fix T60235: Flickering of object instances
2019-01-07 17:14:19 +01:00
e637e8dcc6 Subdiv: Move single threaded code to a single function
Allows to more easily add more passes which are supposed to be run
from a single thread.
2019-01-07 17:14:19 +01:00
1b15eb7e71 Subdiv: Cleanup, de-duplicate code 2019-01-07 17:14:19 +01:00
0218268546 GP: Hide Options and Curves popovers for Fill brushes 2019-01-07 16:22:48 +01:00
43a2a73fdb Fix missing updates when muting/soloing/reordering NLA tracks. 2019-01-07 17:35:51 +03:00
299ff7dcd1 Cleanup: corrections to last commit 2019-01-08 01:00:40 +11:00
5a43406e1b Cleanup: move DNA comments before struct members
Needed for clang-format in some cases, see: T53211
2019-01-08 00:43:00 +11:00
0215caeac2 Cleanup: fix typo. 2019-01-07 14:30:45 +01:00
b786416106 Fix T59151 Bevel modifier has bad input width for percent.
The units scaling was inappropriate when the bevel value was
to be interpreted as a percent, so added a separate rna property
for "Width Percent" and made UI show the width appropriate for
current offset_type.
2019-01-07 07:29:54 -05:00
f19b3f9b77 OpenSundiv: Simplify tweaking of shared stencil/patch settings 2019-01-07 10:33:40 +01:00
cfeffa7529 Fix T60247: app.handlers.undo_post calls undo_pre's function.
Undo and redo post were actually calling respective pre funcs...
2019-01-07 09:53:46 +01:00
6015a03255 Cleanup: naming for return args 2019-01-07 15:34:16 +11:00
07287ceda1 Fix T58964: drivers_remove fails w/ missing paths 2019-01-07 15:27:59 +11:00
abe32d2a35 PyAPI: Add AnimationData.drivers.new/remove methods
Low level functions to directly create and remove drivers,
use when high level functions aren't flexible enough, see: T58964.
2019-01-07 14:06:36 +11:00
96f762500e Cleanup: tweak last commit 2019-01-07 11:16:11 +11:00
430cf7e15e Fix generated toolbar keymap w/ annotation tool 2019-01-07 11:00:46 +11:00
Sebastian Parborg
8c0a77b894 Fix T59944: Template operator_mesh_uv.py fails 2019-01-07 10:21:23 +11:00
496f6adce2 Better bevel normal hardening when some faces were smooth.
Harden normals causes normal splitting, which will not give the
appearance expected due to autosmooth unless some edges are sharpened,
so this change fixes that. Also bevel tool will turn on autosmooth
if not already on if hardening normals.
2019-01-06 18:12:00 -05:00
b4a77a351e Cleanup: add trailing commas to structs 2019-01-07 09:15:07 +11:00
d5c24f2030 Correct error in recent button type check 2019-01-07 09:15:07 +11:00
aa6946f6c9 UI: Use grid-flow layout throughout Preferences
Makes the entire Preferences UI nicely width responsive. Also, move
use_tabs_as_spaces option back to file path options, it was too lonely
in its own panel ;)
2019-01-06 21:53:58 +01:00
2edd32c168 Fix typo. 2019-01-06 18:21:57 +01:00
e7d8b945ce GP: Fix missing initialization converting 2.7 files 2019-01-06 17:22:03 +01:00
eb55990777 Fix T60213: crash loading .blend file with material override. 2019-01-06 15:24:02 +01:00
53d6f40760 UI: tweaks to user preferences layout.
* Expand more sub-panels by default.
* Move release confirms and numeric input settings to Input.
* Move 3D cursor settings to Editing.
* Move region overlap to Interface.
2019-01-06 15:24:01 +01:00
e305560f13 Cleanup: add trailing commas to structs
Needed for clang formatting to workaround bug/limit, see: T53211
2019-01-07 00:34:48 +11:00
f10a88ae8d object.dimensions: add warning about multiple consecutive assignments.
Since this is API-only prop now, it's worth warning about that
limitation.

Follow-up to comments in rB9c928bb93e04.
2019-01-06 13:11:31 +01:00
6c7762687e Fix T60187: Latest couple of builds fail to run, need libGLX.so.0 2019-01-06 11:51:38 +01:00
937a7e8cc2 UI: tweak preferences
- Move author to save&load
  (was incorrectly under text editor).
- Rename Memory -> Memory/Limits
  (some of the settings aren't obviously todo with memory).
2019-01-06 20:41:03 +11:00
a153f7628e Cleanup: style, line length 2019-01-06 20:27:35 +11:00
4b7596ec91 fix T59743: Collada exporter: Add option for exporting flat curves
The Collada exporter suppresses the export of flat animation curves
to optimize the animation (in fact to make the exported file smaller).

But sometimes it is important to also have the flat curves exported
because they may be needed to define an initial transformation to
a fixed location - like translating the weapon from the ground floor
to the back of the model in the report.

I added a new option "all keyed curves" which is disabled by default
but when enabled it also exports flat curves.

feedback is very welcome
2019-01-05 21:52:41 +01:00
Julian Eisel
e8d4304b55 Correct version patching of Preferences theme
In a77b63c569, the Preferences navigation region background was
made brighter. Recently stored userpref.blends (since b00963afc1,
so beta release included) would still use the slightly darker
background for the Preferences navigation region.
Now the version patch added for a77b63c569 also sets the new color
for those recent configs.
2019-01-05 19:53:47 +01:00
674d364af0 fix T60092 collada exporter: exporting a rig with one single bone fails
The problem was that removing entries from a vetor while iterating
the vector was implemented badly. This caused the failure when only
one element was in vector.
2019-01-05 18:08:10 +01:00
9c928bb93e Fix T60183: Images as Planes (addon) Attribute Error.
Partially revert rB1b8c3774a86ebc04fceb9cd, there is no good reason to
make object.dimensions read-only, it works perfectly well from python
API! Only breaking case was that weird multi-editing UI feature, due to
how it sets things. But RNA setter itself works fine, and it's a handy
shortcut/helper for scripts.

Also when breaking API, it is good practivce to at least check official
add-ons...
2019-01-05 16:33:38 +01:00
1461d0185c Theme: update 2019-01-05 21:32:38 +11:00
95736683a9 UI: length now scales proportionally w/ multi-but
Use for object dimensions.
2019-01-05 20:09:25 +11:00
16f49f81dd Cleanup: 3d view panel median value storage 2019-01-05 19:56:20 +11:00
a2120001a8 Cleanup: avoid function call for pointer compare 2019-01-05 19:56:15 +11:00
57d4b869be NLA: rewrite evaluation channel data structures.
Implementing a new intelligent mixing mode that combines quaternions
via multiplication requires rewriting the NLA code to recombine array
properties from separate scalar channels during evaluation.

In addition, stable evaluation of NLA stack requires that any channel
that is touched by any of the actions in the stack should always be
set to a definite value by evaluation, even if no strip affects it
at this point of the timeline. The obvious choice for the fallback
is the default value of the property.

To make scanning all actions reasonably efficient, mapping paths to
channels should be done using hash tables.

Differential Revision: https://developer.blender.org/D4120
2019-01-05 10:52:43 +03:00
Severin
a77b63c569 UI: Preferences Redesign Part 2
(Part 1 was 00963afc14978b)

Does the following changes visible to users:
* Use panels and sub-panels for more structured & logical grouping
* Re-organized options more logically than before (see images in D4148)
* Use flow layout (single column by default).
* New layout uses horizontal margin if there's enough space.
* Change size of Preferences window to suit new layout.
* Move keymap related options from "Input" into own section.
* Own, left-bottom aligned region for Save Preferences button.
* Adjustments of names, tooltips & icons.
* Move buttons from header into the main region (except editor switch).
* Hide Preferences header when opened in temporary window.
* Use full area width for header.
* Don't use slider but regular number widget for UI scale.
* Gray out animation player path option if player isn't "Custom"

Internal changes:
* Rearrange RNA properties to match changed UI structure.
* Introduces new "EXECUTE" region type, see reasoning in D3982.
* Changes to panel layout and AZone code for dynamic panel region.
* Bumps subversion and does versioning for new regions.

RNA changes are documented in the release notes:
https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Preferences_API

Design & implementation mostly done by @billreynish and myself.
I recommend checking out the screenshots posted by William:
https://developer.blender.org/D4148#93787

Reviewed By: brecht

Maniphest Tasks: T54115

Differential Revision: https://developer.blender.org/D4148
2019-01-04 22:18:23 +01:00
4b486eaec9 GP: Add Fill keyframe if active not equal to CFRA
When fill a stroke if the fill layer hasn't keyframe, the fill is wrong because previous fill shape hide area to fill.

Now, if the keyframe is missing in the active layer for the current frame, a new frame is added.
2019-01-04 19:36:06 +01:00
bd5394f6c0 Fix T57890: freestyle rendering crash.
Depsgraph objects are deleted after conversion to Freestyle data structures,
so don't keep a pointer to their name strings.
2019-01-04 17:58:55 +01:00
0d736d6896 Fix T60157: Applying subdivide GP modifier gets wrong fill
The problem was the triangulation cache was not initializated.
2019-01-04 17:18:24 +01:00
808510325e Fix T58669, T59772: freestyle + EEVEE render not working. 2019-01-04 17:08:40 +01:00
38796a4971 Fix T59546: Grease Pencil Edit: Rotation around individual origins error
Thanks to Habib Gahbiche (@zazizizou) for helping fixing this bug. See D4156.
2019-01-04 17:01:39 +01:00
6c878c5d3c Fix T58692: splash screen next not working when using BLENDER_USER_CONFIG. 2019-01-04 16:25:37 +01:00
dfc0d3755b Depsgraph: Fix missing relation from node tree to light
Was only happening when lamp had driver on the Light datablock.

Reported by Dalai Felinto in T60137.
2019-01-04 16:17:53 +01:00
b69cbe7d87 Fix T60124: Multires modifier not reading data from external files 2019-01-04 15:58:41 +01:00
Dalai Felinto
bfac8a429c Silence warning 2019-01-04 12:58:01 -02:00
2891043b58 Outliner: better support for clips/masks ('Blender File' view)
- clips/masks were not showing an icon [both dont have a dedicated icon,
took the ones used elsewhere]
- masks hit an assert in outliner_add_element()
- missing outliner update when adding a mask

spotted while looking into T59939

Reviewers: mont29, brecht

Differential Revision: https://developer.blender.org/D4142
2019-01-04 15:51:46 +01:00
Harley Acheson
4053ed022b UI: fix incorrect collapse menu button alignment.
Differential Revision: https://developer.blender.org/D4151
2019-01-04 15:27:51 +01:00
Harley Acheson
86061520ec UI: make text editor scrollbar with consistent with other editors.
Differential Revision: https://developer.blender.org/D4144
2019-01-04 15:26:11 +01:00
Harley Acheson
07c61e0ad8 UI: alter scrollbar extents to not interfere with split/join areas.
Differential Revision: https://developer.blender.org/D4141
2019-01-04 15:24:15 +01:00
Harley Acheson
8ca4b8dc8d UI: fix incorrect area splitting shape in corners.
It was intended to be a quarter-circle, however it was oriented wrong.
Since the triangle is no longer visible and does not overlap with the
button anymore, this just makes it a square.

Differential Revision: https://developer.blender.org/D4139
2019-01-04 15:22:18 +01:00
Harley Acheson
81f29678dc UI: fix display of menu buttons without text and icon, and only a down arrow.
Differential Revision: https://developer.blender.org/D4123
2019-01-04 15:20:02 +01:00
Harley Acheson
ce40b0b3f5 UI: fix too wide resize area on edges of nodes, interfering with content.
Differential Revision: https://developer.blender.org/D3997
2019-01-04 15:14:21 +01:00
e97700ef74 Fix T59898: Slow modifier stack on trasnform 2019-01-04 14:47:41 +01:00
ae01a851a6 Fix T58657: blender 2.7 keymap Alt+A does not work for animation playback. 2019-01-04 14:45:16 +01:00
Sebastian Parborg
e571f0255f Fix T59946: multiple quit dialogs possible.
Differential Revision: https://developer.blender.org/D4147
2019-01-04 14:45:16 +01:00
Sebastian Parborg
f2ebb7bb79 Fix T60068: missing viewport update when renaming objects in outliner.
Differential Revision: https://developer.blender.org/D4155
2019-01-04 14:45:16 +01:00
2c21e3e35f Fix T60132: Convert hair particles to mesh
Needed to port operator to use evaluated particle system.

But also changed interface to always show Convert button when
draw type is set to Path (Hair particle system is forced to
be draws as path). This avoid rather expensive lookup on every
redraw, but will show Convert button for un-baked particle
emitter.

Probably, an acceptable compromise.
2019-01-04 14:30:34 +01:00
Dalai Felinto
1753177ad8 Partial fix T60148: EEVEE hangs when anamorphic bokeh is too low
Fixed by setting the limit to the original limit I used for Cycles.
Rendering still goes extremely slow when bokeh is lower than 1.0.

But at least now it is "waitable". With lower numbers than 0.01 I don't
think we would ever get a render to finish.

@fclem feel free to address the real root of the problem, but I'm afraid
it may be a limitation of the algorithm you are using.
2019-01-04 11:27:28 -02:00
32ae3abbab Fix T59768: UV context menu showing in image editor. 2019-01-04 13:48:30 +01:00
Dalai Felinto
bdbe484428 EEVEE DoF: Fix runtime error: division by zero when blades was 0
Even though the fragment shader was already discarding all members of
dof_bokeh_sides when blades was zero, the C code was still trying to
use this for a few divisions leading to runtime asserts.

Those are harmless yet can lead some to waste time while pursuiting
other bugs (namely a near freeze when blades aspect ratio is too low).
2019-01-04 10:26:03 -02:00
Dalai Felinto
4d8ed937f2 Fix T60044: Sculpting brush is not visible on file load
The original issue is that wm->paintcursors is empty until we go in and
out of the sculpt mode. To fix this we need to toggle inside the sculpt
mode.

This is usually tackled by ED_editors_init(), however the sculpt mode
toggling was never call because the object technically had "mode data".

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4153
2019-01-04 09:55:47 -02:00
7bd31bdcce Cleanup: Spelling 2019-01-04 12:51:10 +01:00
7a10960947 Provide more information on unknown GPU 2019-01-04 12:50:05 +01:00
785fc137ce Merge branch 'blender2.7' 2019-01-04 12:42:13 +01:00
e6acb4fba0 Recognize llvmpipe renderer as software OpenGL 2019-01-04 12:41:35 +01:00
538d58745a Object: don't flip scale when setting dimensions 2019-01-04 19:58:18 +11:00
1b8c3774a8 Fix T54771: Can't change multiple dimensions at once
- Use non-rna button for adjusting dimensions.
- Make Object.dimensions RNA read-only since it never worked well.
  This is mainly a UI editing feature.
2019-01-04 19:52:13 +11:00
c6405f5ee8 Cleanup: unused calculation 2019-01-04 19:08:46 +11:00
670b2944f4 Cleanup: indentation (right shift) 2019-01-04 19:08:09 +11:00
2bee483013 Merge branch 'blender2.7' 2019-01-04 17:08:34 +11:00
3ffce6a130 Fix T60099: Inconsistent normals from spin tool 2019-01-04 17:07:19 +11:00
3f0a26137a Spin Tool: don't flip when using a negative angle
The intention was to flip normals when extruding in the opposite
direction, however the sign of the angle isn't meaningful unless
the geometry center and region normal are taken into account.

Disable, may add back in a way that works more predictably.
2019-01-04 17:07:12 +11:00
eeff7a2f3c Fix eternal loop in spin tool merge first/last 2019-01-04 17:07:06 +11:00
79d3b0b733 Haiku: build fix
D4130 by @miqlas
2019-01-04 17:05:40 +11:00
f489db1c6b Haiku: build fix
D4130 by @miqlas
2019-01-04 17:04:07 +11:00
c3e454b8e0 Fix T60099: Inconsistent normals from spin tool 2019-01-04 16:23:04 +11:00
0fe80121b9 Spin Tool: don't flip when using a negative angle
The intention was to flip normals when extruding in the opposite
direction, however the sign of the angle isn't meaningful unless
the geometry center and region normal are taken into account.

Disable, may add back in a way that works more predictably.
2019-01-04 16:17:49 +11:00
a68fef7c35 Fix eternal loop in spin tool merge first/last 2019-01-04 16:14:00 +11:00
c97c76c01c Merge branch 'blender2.7' 2019-01-04 11:26:11 +11:00
66c3eb36d2 Cleanup: use typed unsigned ints 2019-01-04 11:09:18 +11:00
53d655a0b3 Cleanup: use typed unsigned ints 2019-01-04 11:06:44 +11:00
54a4c1cf35 UI: refactor layout vars out of uiFontStyle
Word wrap and alignment layout args only used by UI_fontstyle_draw
were vars in uiFontStyle.
These were written to before drawing, so better pass as an argument.

Pass uiFontStyle & uiWidgetColors as const args.
2019-01-04 11:00:48 +11:00
4431c5825b Missed last commit 2019-01-04 08:37:17 +11:00
d068c6017c 3D View: use full opacity by default
Vertex paint overlays the color w/ solid mode,
Having a partial overlay makes the sample tool not give useful results.
2019-01-04 08:21:07 +11:00
Sebastian Parborg
5958dd4098 Fix T60101: vertex paint color sample 2019-01-04 08:07:41 +11:00
01244036af Fix T59049: some modal transform keys no working in custom keymaps. 2019-01-03 19:54:52 +01:00
aef01c47e6 Fix T58113 Multiple problems with bevel harden normals.
Move the bevel hardening code all into bmesh_bevel.c.
Based on user feedback, rewrote the bevel hardening algorithm
to be more what users want.
Based on user feedback, changed the UI, removing some
not-useful options. Now hardening normals while beveling
is enabled by a simple checkbox.
Now setting face strength gives options for which faces
get their face strength set.
2019-01-03 13:39:52 -05:00
bdfc10e482 Fix T59349: Cycles viewport render flickering when changing some settings. 2019-01-03 19:21:10 +01:00
88e45b8c99 Merge branch 'blender2.7' 2019-01-03 18:32:51 +01:00
aa175e0033 Fix for T58250 fix: Blender failing to start with OpenGL context < 4.5. 2019-01-03 18:31:32 +01:00
b5372e3e37 Cleanup: don't do nodetree verification/versioning twice. 2019-01-03 18:22:19 +01:00
db03be60ec Fix T60073: can't unlink by dragging from some node input sockets. 2019-01-03 18:21:48 +01:00
a30bdcc142 Fix T60022: Crash when adding grease pencil object to a collection disabled in viewport.
See D4163

Thanks to Habib Gahbiche (@zazizizou) for the fix.
2019-01-03 18:12:25 +01:00
4b2198a96a Fix T59925: Crash when adding any generative modifier on a curve with more than one material.
Am not totally convinced that generating meshes without fully valid
material info is a good thing, but this seems to be rather common in our
code base (in both mesh editing and convert-to-mesh cases).

So for now, duplicated code in mesh eval finalization to main displist
creation/eval function, synchronizing mat data at the end of modifiers
stack eval, if needed.
2019-01-03 18:09:39 +01:00
255ab75eb3 Don't link against GLU library
We are core profile now, no need to link against GLU.

This change makes it so Blender binary is not dependent on liGLU.so.
That was a weird thing that Blender was dependent on it, but was not
using any functions from it.
2019-01-03 17:43:07 +01:00
fffdedbcc1 Fix T54962: Cycles crash using subsurface scattering texture blur. 2019-01-03 17:10:37 +01:00
3c411f5ba1 Fix T58250: crash starting Blender on X11 without OpenGL 3.3.
Instead display an error message and exit.
2019-01-03 16:43:09 +01:00
407272d158 Fix T60119: incorrect filter size in new scenes. 2019-01-03 15:59:58 +01:00
8e9c16b0cf Fix T59072: Text extrusion cannot be animated 2019-01-03 15:48:02 +01:00
d98ec04341 Fix incorrect drawing of material list outline, after recent changes.
For draw cache flushing the default blend mode needs to be set.
2019-01-03 15:38:22 +01:00
481a75a08a Fix T57177: redo select random operator selects hidden objects. 2019-01-03 15:19:32 +01:00
ba1cae5a04 Fix some inconsistencies in object visibility/selectability tests. 2019-01-03 15:19:32 +01:00
a2d24345bf Fix T60107: gizmos should not show for unselectable objects. 2019-01-03 12:39:16 +01:00
853a03c555 Fix T58870: submenus don't open for some specific mouse positions. 2019-01-03 12:15:29 +01:00
323543ae2e Fix accidental changes to default preferences in recent startup.blend commit. 2019-01-03 12:15:29 +01:00
65b4ebbbd5 Fix T60056: Make Duplicates Real with Keep Hierarchy does nothing
Caused by rB36ca072375deea4803df4681716c1d3224095e07
[one instance of `DEG_get_original_object` was neccesary, the other one
breaks getting the parent in `BLI_ghash_lookup`]

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D4154
2019-01-03 12:12:12 +01:00
310e7eee6f GP: Include Lasso eraser in Fill and Primitives
This option allows to delete sections using Ctrl+Alt.
2019-01-03 11:29:33 +01:00
da8febb319 Fix T59527: Segment fault changing layer visibility and onion skin
In some situation when the layer is hidden, the onion skin must be disabled too, because the material is not available.
2019-01-03 10:39:14 +01:00
bef06a658a Cleanup: indentation 2019-01-03 17:30:54 +11:00
d2c941def3 DRW: remove INDEX4 normal flipping
Added in 531e5ad49a but I couldn't find a case when it's needed,
It's not needed for solid-mode viewport drawing for eg.
2019-01-03 17:25:21 +11:00
052150bbcc Revert "GPU: add negated normal conversion functions"
This reverts commit d28b29d428.
2019-01-03 17:19:05 +11:00
4c7b303256 Fix T59842: Curve flat shading doesn't work
Calculate flat shaded normals when creating batch cache.

Note that 2.7x was using vertex normals as flat-face normals.
2019-01-03 16:56:53 +11:00
d28b29d428 GPU: add negated normal conversion functions
Saves having to negate to a temporary variable.
2019-01-03 16:56:16 +11:00
6cb3972063 Cleanup: variable name 2019-01-03 16:02:26 +11:00
9200dc0eb1 Cleanup: preprocessor indentation 2019-01-03 15:52:07 +11:00
b01f2607a6 Transform: default shrink/fatten even-offset to false
Changed for 2.8 but this cases spikes for some geometry, see: T59968
2019-01-03 15:13:46 +11:00
487df02198 Fix new material for pinned objects
Grease pencil check was using active object.
2019-01-03 12:34:31 +11:00
ba9e10fd6a Merge branch 'blender2.7' 2019-01-03 12:25:37 +11:00
847b21ee08 Fix T60014: material link pref ignored
The PreferencesEdit.material_link only worked for adding slots,
adding an initial new material didn't respect the preference.
2019-01-03 12:20:08 +11:00
11f2c65128 Fix (unreported): unpredictable crashes when it is done snap after automerge.
The `em->tottri` of an evaluated object can be different from the actual amount of looptris.
2019-01-02 16:59:20 -02:00
56d6d13b0d Fix T58859: render with compositor does not render other scenes. 2019-01-02 20:22:16 +01:00
7e7657da29 Fix wrong alpha blending for datablock preview icons. 2019-01-02 20:11:10 +01:00
017573495e Merge branch 'blender2.7' 2019-01-02 19:58:26 +01:00
f7e9642da9 Fix T60061: Cycles OSL point density not working.
Add override keywords so we can detect when the function definitions change.
2019-01-02 19:56:49 +01:00
8063d72b08 Fix T60037: single column layout breaks file browse button. 2019-01-02 19:22:56 +01:00
26e0dc5d15 Fix T59063: operator search menu loses background in some cases. 2019-01-02 18:56:36 +01:00
f8ce4ebf07 Fix wrong grease pencil shader FX usage of object location.
It should use the evaluated object location, and not add any unnecessary
dependency on geometry data.
2019-01-02 18:18:11 +01:00
f694d37929 Fix T59792: Cycles crash rendering motion pass with motion blur enabled. 2019-01-02 17:47:27 +01:00
0ee97bd5c4 Fix T60051: Wrong stroke projection when viewmode set to Front
As the z-depth is calculated using the internal drawing, if we use the front mode the z-depth is wrong. The Front or Back mode must be used only for display, but not for calculation.
2019-01-02 17:43:27 +01:00
d903eb6129 Fix T60046: crash with Cycles viewport render and particle info node.
This code was not correctly ported to 2.8.
2019-01-02 17:19:45 +01:00
7765277240 Fix T60031: Joining two Grease Pencilobjects sometimes crashes
The drawing cache was not set as dirty and drawing engine used old data.
2019-01-02 17:10:37 +01:00
ae50a7df03 Fixes and edits to studio light operators
- Remove pathlib use
  (was converting to/from string with no real advantage).
- Use user_resource(..., create=True) to ensure the path exists.
- Pass full path to BKE_studiolight_create, don't add extension after.
- Fix 'sl' filtering glob and move from ui code to operator.
- Fix string copy length.
2019-01-03 02:13:00 +11:00
72e2a0cfb6 Cleanup: py-gpu error checks
Move gpu initialization checks to the start of each function instead
of mixing with argument parsing.
2019-01-03 01:08:26 +11:00
d07bc44a96 Revert file rename from T59773 fix
Mixing file rename with other changes should be avoided.

Using 'module_py_api' convention here
is in keeping with imbuf, idprop, blf & bmesh.
No reason for gpu to have a different convention.
2019-01-03 00:55:07 +11:00
945007b32e Fix T59773: Raise exception if the gpu module is used in backgound mode.
Instead of crashing, an error message is displayed if a function of the gpu module is called without a GPU context.

Reviewers: brecht, campbellbarton, JacquesLucke, mont29

Subscribers: abdelmatinboulbayam, amir.shehata

Differential Revision: https://developer.blender.org/D4143
2019-01-02 10:01:46 -02:00
Dalai Felinto
c862c14339 Fix poll function for SelectPattern operator
Note this is also broken in 2.7x.

This is not a big deal since the operator is exposed in the correct
menus. But some users were accessing it via the search menu which would
lead to issues.
2019-01-02 10:48:34 -02:00
Dalai Felinto
6fdfa55667 Fix T60030: Select pattern fails with pose bones
The original comment in the file was not acknoledging pose bones could be tacked
here as well (my fault since I should not have trusted the comments and read the code
intead).

Problem introduced on aeb8e81f27.
2019-01-02 10:22:00 -02:00
f15205b93f Fix T60060: Corrective Smooth Modifier binding process is broken.
Same as with the other modifiers' binding ops, those need to be
performed outside of regular depsgraph eval.
2019-01-02 11:26:31 +01:00
39e0bfe5a2 GP: Cleanup pad to _pad 2019-01-02 10:55:17 +01:00
e6d0d04dc3 UI: correct sequencer icon in add menu 2019-01-02 19:17:30 +11:00
a3b9cc71b0 UI: Show shade smooth/flat in curve context menu 2019-01-02 19:03:32 +11:00
0e81191596 Fix T59886: Missing transform gizmo update 2019-01-02 18:46:43 +11:00
3788f58e74 3D View: use grid & all axes in axis-views
Matches 2.7x behavior.
2019-01-02 18:33:07 +11:00
a76b045326 UI: add scale option for template_icon_view button
The existing scale option only changed the scale if icons in the popup.
2019-01-02 18:18:54 +11:00
15e63742e2 Cleanup: use RNA icon instead of passing as an arg 2019-01-02 17:24:24 +11:00
1a208f0326 Cleanup: indentation, naming
Use rna naming conventions for unit-settings callbacks.
2019-01-02 17:07:47 +11:00
09f46ef6fa PyRNA: enum no longer returns first item when the value isn't found
This hides errors & makes it confusing to debug mistakes
when the enum items aren't correct.

Return an empty string instead.
2019-01-02 16:39:45 +11:00
aae5f2b046 Fix image editor tool-settings missing from topbar 2019-01-02 16:26:52 +11:00
8fbba22205 Cleanup: rename manipulator references 2019-01-02 15:43:58 +11:00
5484ed01ad Cleanup: use '_pad' in DNA
Convention used elsewhere, has advantage pad vars don't autocomplete
with other vars beginning w/ 'p'.
2019-01-02 15:38:45 +11:00
2b3effe0ce Cleanup: rename target_weight -> weight
Match name of mesh weight paint.
2019-01-02 15:31:56 +11:00
46a6085c47 UI: de-duplicate top-bar and panel paint scripts
- Fixes missing check for unified brush in sculpt mode.
- Re-orders material first in gpencil paint mode
  (matching color-first for other paint modes).
- Avoid minor differences (missing tablet pressure options from topbar).
- Don't repeat properties already displayed in the topbar
  when opening the brush popover.
2019-01-02 14:58:32 +11:00
William Reynish
939c751faa UI: add painting blend mode to top-bar 2019-01-02 13:06:47 +11:00
4dd0a90f42 GP: Don't use offset for Stroke projection
The offset is only used in Surface mode.
2019-01-01 16:44:10 +01:00
4d795cee49 Fix T60015: snap to grid - snaps only to largest increment
Caused by rBc7a96651dfa4 when trying to remove all uses of the deprecated `rv3d->gridview`.
2018-12-31 13:45:20 -02:00
82e0739f64 Outliner: expand view layer collections by default, revealing objects. 2018-12-31 16:39:15 +01:00
c1d82e5849 Templates: tweaks to startup templates.
* 2D Animation: lots of changes from the grease pencil team. Properties
  editor layouts, brush and material settings, and more.
* 3D Viewport: wireframes set to 1.0.
* World: use nodes by default.
* Node Editor: use narrow toolbar.
2018-12-31 16:26:22 +01:00
e9df155d53 Viewport: update default set of HDR images.
Add city, courtyard and interior HDRs. Replace grass field and night
HDR with different images.

Command used for compression:
oiiotool %s --resize 1024x512 --ch R,G,B -d float --compression dwab:300 -o output/%s
2018-12-31 15:40:42 +01:00
fbbbb3be55 Cleanup: remove unused camera studio lights. 2018-12-31 15:40:42 +01:00
93fa7417d5 Cleanup: specify default studiolight name, instead using first alphabetically. 2018-12-31 15:40:42 +01:00
ae3f68a395 Fix T59991: duplicate entries for node select operators in keymap.
Ref D4055.
2018-12-31 14:11:42 +01:00
27619d7271 UI: icon set updates by Andrzej Ambroz. 2018-12-31 13:52:45 +01:00
d96596de29 Fix: Cramped layout in object parent properties 2018-12-30 16:30:17 +01:00
bcf0c71433 Cleanup: remove non-existing function declarations 2018-12-31 00:58:54 +11:00
d273e84c41 GP: Mew Merge Strokes operator
This operator allows to create a new stroke joining several selected points of different strokes.

The new stroke will use the current material.

To use, first select the points to be merged. Optionally can remove the old points and strokes.

The operator is available in Edit mode in the Specials menu and Stroke menu.
2018-12-30 13:08:04 +01:00
543ddbe6bf Cleanup: warnings (clang) 2018-12-30 15:15:05 +11:00
Severin
266b1e2cdb Fix: Scrolling Preferences could cause blank UI
Steps to reproduce were:
* Open Preferences
* Choose "Input" category
* Scroll to the bottom
* Choose "Interface" category

The newly activated category should now use the scrolling set previously
in the other category, causing the contents to be out of view. You
would have to scroll to bring it back.

Now scrolling is stored per category.
2018-12-29 19:10:21 +01:00
07569a333b Fix T59675: Motion path frame numbers at wrong positions
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4113
2018-12-29 18:34:25 +01:00
7c438e5366 Cleanup: avoid counting list multiple times
Also simplify selected sequencer length function.
2018-12-29 10:19:38 +11:00
363cf1152f Cleanup: use bool, style 2018-12-29 10:04:39 +11:00
3f4e3f718f Cycles: restore old sample and material override settings for view layers.
Since there will be no view layer overrides in 2.80, this is needed still.
2018-12-28 18:59:33 +01:00
a7c5f4f206 Fix T57078: Alembic curve import: better check for topology similarity
The old code assumed that if the number of curves was the same, the
entire set of curves would have the same topology (in other words, it
assumed 'same number of curves => same number of vertices for each
curve').

I've added a more thorough check that also considers the number of
vertices in each curve. This still keeps certain assumptions in place
(for example that if the topology is the same, the weights won't change,
which is not necessarily true). However, when the assumption doesn't
hold, at least now Blender doesn't crash any more.
2018-12-28 18:05:31 +01:00
196a5116aa Fix T59164: Run Alembic in background when INVOKE'd
This is similar to what physics baking is doing: invoking the operator
runs a background job, whereas executing blocks. This makes Python
scripts calling the Alembic import/export operators more predictable.

For backwardward compatibility with existing Python code the
`as_background_job` parameter still exists, which overrides the
behaviour chosen by INVOKE/EXECUTE.

Reviewers: brecht

Reviewed by: brecht

Differential revision: https://developer.blender.org/D4137/new/
2018-12-28 17:52:53 +01:00
2987782d6d Docs: update manpage and html with app description matching website. 2018-12-28 17:36:59 +01:00
William Reynish
18cb27b4f4 UI: update Blender application icon on all platforms.
More accurate logo colors, flatter look.
2018-12-28 17:26:09 +01:00
436f1a2afa Alembic import: Fix crash with mcol indices out of bounds
Part of T57377

Reviewers: sybren

Maniphest Tasks: T57377

Differential Revision: https://developer.blender.org/D3847
2018-12-28 16:47:58 +01:00
da7a342478 Alembic import: lock interface while importing
This prevents crashes caused by the viewport evaluating the depsgraph while
the import is still running.
2018-12-28 16:47:58 +01:00
c509507714 Fix T59785: Curve modifier does not update in realtime in object mode
Reviewers: brecht

Maniphest Tasks: T59785

Differential Revision: https://developer.blender.org/D4134
2018-12-28 16:26:40 +01:00
8c01cafabf Fix T59526: VSE Add submenus for clips/masks dont show with only one
item
2018-12-28 15:36:59 +01:00
3610f1fc43 Sequencer: refactor clipboard copy to no longer increase user count.
The clipboard is not a real user and should not be counted. Only on paste
should the user count increase.

This is part of D3621, and was implemented by Richard Antalik and me.
2018-12-28 14:08:02 +01:00
a4e4d9f0ab Fix more issues with recent render passes code cleanup.
Ref D4133.
2018-12-28 12:37:53 +01:00
3700192043 Fix T59910: material editor UI issue after recent changes.
This reverts part of commit 4f98266cf6, ref D4123.
2018-12-28 11:36:14 +01:00
c07ae0e821 Fix T59922: crash reading files with older renderlayers
- own error in rB2c196de56bbb163048b08f321983234a5e72e804
- now introduce RE_PASSNAME_DEPRECATED placeholder for old passes
- also dont allocate NodeImageLayers for these

Reviewers: brecht

Maniphest Tasks: T59922

Differential Revision: https://developer.blender.org/D4132
2018-12-28 11:32:33 +01:00
1e935b090b Fix T59774: Lightmap Pack Error: Element-wise multiplication: not supported between 'Quaternion' and 'Vector' types. 2018-12-28 10:37:54 +01:00
fdc726eb61 GP: Rename GP_STROKE_RECALC_CACHE to GP_STROKE_RECALC_GEOMETRY
The GP_STROKE_RECALC_CACHE identifier was changed to GP_STROKE_RECALC_GEOMETRY because the previous name was confusing and could be confused with the recalculation of the Draw Manager cache.
2018-12-28 08:48:37 +01:00
0661bcba32 Merge branch 'blender2.7'
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2018-12-27 23:33:42 +01:00
111179beb0 Fix (unreported) broken Cycles tests after numaapi changes today.
Please always build tests when messing with build system/libs, am tired
of fixing that kind of issues...

Also, that fix is probably not working for standalone, no idea where's
the numaapi lib then, but committing since I need a building blender
here (with the tests, yes).
2018-12-27 23:20:37 +01:00
83dcdfd356 API Doc: point to blender2.7 new folder.
master is now for 2.8. ;)
2018-12-27 23:02:52 +01:00
df3e7d0361 Point API doc back to master one.
Now that 2.8 is master again...
Still have to update 2.7 thingy there, now (and update API doc site
 accordingly, too).
2018-12-27 22:57:55 +01:00
cd36f54611 Fix (unreported) broken Cycles tests after numaapi changes today.
Please always build tests when messing with build system/libs, am tired
of fixing that kind of issues...

Also, that fix is probably not working for standalone, no idea where's
the numaapi lib then, but committing since I need a building blender
here (with the tests, yes).
2018-12-27 22:40:08 +01:00
4a0063664e GP: Avoid Onion calculation when play animation 2018-12-27 22:01:46 +01:00
3e5374bf1e Merge branch 'blender2.7' 2018-12-27 19:13:27 +01:00
826d7adde7 Fix T59874: Cycles CPU 25% load only during rendering
The issue was introduced by a Threadripper2 commit back in
ce927e15e0. This boils down to threads inheriting affinity
from the parent thread. It is a question how this slipped
through the review (we definitely run benchmark round).

Quick fix could have been to always set CPU group affinity
in Cycles, and it would work for Windows. On other platforms
we did not have CPU groups API finished.

Ended up making Cycles aware of NUMA topology, so now we
bound threads to a specific NUMA node. This required adding
an external dependency to Cycles, but made some code there
shorter.
2018-12-27 19:12:59 +01:00
Sebastian Parborg
5b9440278e Fix T59865: UV editor vertex snap to active does not make any sense.
Differential Revision: https://developer.blender.org/D4129
2018-12-27 18:43:59 +01:00
c55c15bb77 Fix T59870: Can't select "Face area" in average normals operator.
Not sure why the mode prop was hidden at all, tbh...
2018-12-27 17:35:37 +01:00
b3e68a83f3 Fix T58734: bvhtree.fromObject - error ( returned NULL without setting an error) in blender 2.8.
Would free evaluated mesh even when it was the one cached in runtime
data by depsgraph evaluation!

Also fixes the asserts about using non-eval object in some cases.
2018-12-27 17:21:17 +01:00
b2a7aab7db GP: Enable Brush cursor by default for new brushes 2018-12-27 17:04:31 +01:00
de14ddf3a1 Fix T59900: duplicate font loading error and memory leak. 2018-12-27 17:04:07 +01:00
dff011db41 Merge branch 'blender2.7' 2018-12-27 16:45:01 +01:00
7bed048243 X11: support multiple tablet devices.
Previously we would try to guess what the main tablet device is, but this is
error prone. Now we keep a list of X11 devices and try to match events to
them. On the Blender side there are still some limitations in regards to using
multiple devices at the same time, but this should improve things already.

Fixes T59645.
2018-12-27 16:44:19 +01:00
97094a1bb4 Merge branch 'blender2.7' 2018-12-27 16:32:17 +01:00
Sebastian Parborg
357d421ac2 Fix T59864: UV editor missing options in snapping pie menu.
Differential Revision: https://developer.blender.org/D4128
2018-12-27 16:24:04 +01:00
29feb215f4 X11: support multiple tablet devices.
Previously we would try to guess what the main tablet device is, but this is
error prone. Now we keep a list of X11 devices and try to match events to
them. On the Blender side there are still some limitations in regards to using
multiple devices at the same time, but this should improve things already.

Fixes T59645.
2018-12-27 16:21:17 +01:00
53a6a0b258 X11: support multiple tablet devices.
Previously we would try to guess what the main tablet device is, but this is
error prone. Now we keep a list of X11 devices and try to match events to
them. On the Blender side there are still some limitations in regards to using
multiple devices at the same time, but this should improve things already.

Fixes T59645.
2018-12-27 16:18:37 +01:00
2c196de56b cleanup: remove unused passes
- use_pass_indirect, use_pass_specular from ViewLayer RNA
- RGBA, DIFFUSE, SPEC, REFLECT, REFRACT, INDIRECT usages from remaining
places

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4117
2018-12-27 15:22:33 +01:00
21e4f3bd8c Fix T59861: converting GP stroke to curve doesn't immediately work
Reviewers: antoniov, brecht

Maniphest Tasks: T59861

Differential Revision: https://developer.blender.org/D4127
2018-12-27 15:13:18 +01:00
be1b32e4e4 Fix T59884: Rigidbody Calculate Mass Sets Mass to 0
rigidbody_get_mesh() needs an evaluated object

Reviewers: sergey, brecht

Maniphest Tasks: T59884

Differential Revision: https://developer.blender.org/D4125
2018-12-27 15:07:20 +01:00
f1bf604804 Fix T59389: Solidify Modifier does not work with 'beveled' Curve objects.
Curve modifier eval code was actually doing nothing to ensure we passed
mesh with valid normals when required by the modifier.

This is a bit basic, rough code, but think it should cover all cases,
time will say...
2018-12-27 15:03:06 +01:00
Harley Acheson
4f98266cf6 UI: fix display of menu buttons without text and icon, and only a down arrow.
Differential Revision: https://developer.blender.org/D4123
2018-12-27 14:21:49 +01:00
Harley Acheson
e07b58537c UI: fix inconsistent icon button widths for popovers and enums.
Differential Revision: https://developer.blender.org/D4086
2018-12-27 12:49:35 +01:00
097b9019ce Fix T59799: texture paint mode crash for object with no materials. 2018-12-27 12:18:37 +01:00
6de8ff5796 Merge branch 'blender2.7' 2018-12-27 11:43:06 +01:00
81ab9ef968 Fix T56595: Hair Dynamics stop working after saving new file
The issue was caused by NaN valid of the average spring length being
stored in the file. This caused accumulation in the springs builder
to also deliver NaNs, which then caused solver itself to not do
anything.

Not sure why these values where never initialized prior to the
accumulation. Or even, why this runime data is stored in a DNA.

Some sanitizing is possible here, but needs to be done with care
to not disrupt Spring production.
2018-12-27 11:35:31 +01:00
5216dd5fce Merge branch 'blender2.7' 2018-12-27 10:53:02 +01:00
73c4643179 Cleanup: style 2018-12-27 13:14:37 +11:00
ff0285c476 Cleanup: use unsigned char (change previous commit) 2018-12-27 12:58:48 +11:00
40ba73e443 Cleanup: warnings 2018-12-27 12:52:33 +11:00
e4dbfe0a98 Fix T59866: UV editor: no circle select. 2018-12-26 23:09:34 +01:00
61cb1a81a8 Fix T57861: Object.ray_cast (and all RNA functions using "ob->runtime") broken in Blender 2.80
In fact, we can get valid depsgraph 99% of time from current context.

Still added extra optionnal depsgraph parameter just in case (and also
for future, when we might be handling much more temp depsgraphs).
2018-12-26 22:50:03 +01:00
60b930af3e GPU: Add another driver to the list of unused_fb_slot_workaround
I start to think that an automatic detection would be a better solution.
2018-12-25 14:36:51 -02:00
67dc68d104 Fix T59505: Knife tool cut preview line becomes black
The real reason for the problem is still unknown, but this solution adds less overhead than rBdafaa6f22881.
2018-12-25 14:36:50 -02:00
34a538ba1b Revert "Fix T59505: Knife tool cut preview line becomes black"
This reverts commit dafaa6f228.
2018-12-25 14:36:49 -02:00
94dfa6eaac GP: Remove duplicate code moving to single function 2018-12-25 11:10:05 +01:00
6d89337257 Fix/cleanup typos and such in UI messages (and some comments). 2018-12-24 15:03:49 +01:00
64671e53d2 Build script: Don't use external Pugi for OSL
Now, things are becoming REALLY confusing. The script does build
pugi, but is never telling OIIO to use an external one. Which makes
it to use a bundled one.

Trying to link OSL to a different version of pugi causes a lot of
linking errors.

Interestingly enough, that was me who made OSL to use external pugi
to solve configuration problem. But now i can not reproduce that
anymore.

Ideally we would either link everything against our pugi, or not
compile it at all.
2018-12-24 14:41:06 +01:00
1ac311cedc Fix/cleanup another bunch of UI messages issues.
Also (mostly in comments): behaviour -> behavior (we use American English).
2018-12-24 12:32:43 +01:00
Jonathan Merritt
410142caff Fix T59722: stencil texture overlay not working on macOS. 2018-12-24 12:07:12 +01:00
28520e9652 Fix T59799: crash entering texture paint mode. 2018-12-24 09:28:45 +01:00
Julian Eisel
e5e885d0ec Fix floating panel (HUD) applying DPI incorrectly
ARegion.sizex/y should never have DPI factor applied. For regular panel
regions, DPI will be applied in region_rect_recursive already, causing
it to be applied twice when region size is set dynamically (= based on
content dimensions).
2018-12-23 22:42:01 +01:00
59b530ca18 Fix and workaround for i18n messages extraction code. 2018-12-23 22:03:43 +01:00
1158b9f73a Cleanup: First batch of UI messages fixes (typos, final points...).
Also contains some code typo fixes (mostly, adtaptative -> adaptive,
former is nearly innexistant in English, let's stick to simple valid
words ;) ).
2018-12-23 22:03:43 +01:00
Julian Eisel
064cbe9f3f Avoid creating & registering zero sized AZones
Would allocate memory for AZones and register them even if their
coordinates/bounding-box was all 0, meaning they're not visible and not
interactive.
2018-12-23 18:04:48 +01:00
6b13f10d40 GP: Small changes to help text 2018-12-23 16:54:20 +01:00
8746575d09 GP: Add Shift+F to define strength for primitives 2018-12-23 16:45:36 +01:00
f5166233db Fix T59783: Convert GP stroke to geometry menu disabled
The Convert operator works only in Object mode but it was defined in Edit menu.

Now the operator is defined in object menu and in specials menu.
2018-12-23 16:12:50 +01:00
a5cfeaba9e Fix missing update when deleting animation channels. 2018-12-23 17:32:21 +03:00
c3650e496b Fix missing update when toggling NLA solo mode. 2018-12-23 17:32:17 +03:00
02f083cdce BLI_math_rotation: properly name the quaternion power function.
"angular mult factor" is a completely unintelligible description
for a function that raises a unit quaternion to the scalar power.
2018-12-23 15:28:32 +03:00
1574b691f3 Fix T59782: Replace RMB by MMB in bottom help text 2018-12-23 10:16:57 +01:00
2c0c1f494d Point locale sub-repo to blender2.7 branch.
Since we start translating for 2.8 very soon, better to archive 2.7x
translations in their own branch. ;)
2018-12-22 15:10:24 +01:00
4c5e76025d GP: Update Suzanne 2D object
Review of the "D Suzanne to reduce number of points and small changes in shapes and colors.

Designed by Matias Mendiola and Daniel M. Lara
2018-12-22 10:56:04 +01:00
dafaa6f228 Fix T59505: Knife tool cut preview line becomes black
The root of the problem is that KnifeTool_OpData->colors was not init in
some cases. But the reason is unknown as it seems to be random and the
init function was always called.

So instead on init the color only once, we query the colors each time
we draw the knife points.
The overhead of this approach is negligeable.
2018-12-22 01:52:47 +01:00
a451d4abbc Fix T59644: FPS meter not showing in VSE
Issue caused probably by typo
2018-12-21 16:27:08 -08:00
f1f8859ad5 Cleanup: const cast 2018-12-22 08:14:41 +11:00
afa3aec45d Fix T59734: cyclic dependency with drivers on PoseBone.bbone_*.
Allow more flexible use of drivers on B-Bone properties by
connecting the dependencies to the actual operation node that
uses the values, instead of the whole component.
2018-12-21 23:10:16 +03:00
c79b849097 Fix T58327: Quick Favorites "Remove from Favorites" missing for added
Modifiers

Since user menu entries from SPACE_BUTS/SPACE_TOPBAR are also shown in
other Editors (SPACE_VIEW3D), also allow these entries to be removed
from Quick Favorites from these Editors.
Match and deduplicate logic from screen_user_menu_draw() and
ui_popup_context_menu_for_button().

Reviewers: campbellbarton, brecht

Maniphest Tasks: T58327

Differential Revision: https://developer.blender.org/D4112
2018-12-21 21:06:52 +01:00
e6e2f65585 Fix T59686: snap to adaptive grid occurs with a "delay"
In blender 2.8, when you zoom in, the adaptive subdivisions appear earlier than previous versions.
The grid still appears a little before the snap, but since it is very small I see no advantage in snap for this case.
2018-12-21 16:56:55 -02:00
e119868caa GP: Primitive: Changes from gp branch
F-key to change stroke brush size
Fix random bias for jitter
2018-12-21 18:48:57 +00:00
8e331c3431 Fix T59565: NaN/crash with zero radius tip of hair curves. 2018-12-21 18:54:45 +01:00
c93fd8438c Cleanup: fix more ATTR_FALLTHROUGH warnings.
Ref D3960.
2018-12-21 17:23:49 +01:00
275c627b5e Merge branch 'blender2.7' 2018-12-21 17:05:56 +01:00
4eeab96f10 Cleanup: fix ATTR_FALLTHROUGH warnings.
Ref D3960.
2018-12-21 17:02:04 +01:00
2ca4f4f0cb Fix T59708: decimate modifier does not show face count before decimation. 2018-12-21 16:55:26 +01:00
d086c01645 Fix T59691: Crash when deleting data-block video or audio in a video editor 2018-12-21 16:54:17 +01:00
c16a5e772b Cleanup: Indentation 2018-12-21 16:54:17 +01:00
e56aa4ff0c Fix T59668: UV unwrap pinning bugs.
With multi object editing it creates the charts twice, which broke some
logic in the unwrapper.
2018-12-21 16:34:08 +01:00
bf168a05cd Workbench: Fix crash when using more than one metaball
Was caused by recent change in logic
2018-12-21 16:14:19 +01:00
a2a2fe1f22 Fix T59608: Curves invisible in object mode 2018-12-21 16:14:19 +01:00
0edd93effb Fix inconsistent/broken Cycles object visibility for instances.
Object visibility is now handled by the depsgraph iterator, but this API
was incomplete as it made no distinction for visibility of the object itself,
particles and generated instances.

The depsgraph iterator API now includes information about which part of the
object is visible, and this is used by Cycles to replace the old custom logic.
Cycles and EEVEE visibility should now be consistent, which unfortunately does
means some subtle compatibility breakage for both.

Fixes T58956, T58202, T59284.

Differential Revision: https://developer.blender.org/D4109
2018-12-21 16:05:48 +01:00
adec52a8a8 Merge branch 'blender2.7' into master. 2018-12-21 15:56:15 +01:00
82c3fdd559 Fix T57907: Crash with hair when switching between object and edit mode
Was only visible after going in and out (with some strokes inbetween)
hair edit mode. The edit structure was never freed during Blender
session for some reason. Now we free those when leaving particle
edit mode.
2018-12-21 14:39:43 +01:00
494d13115c Fix T59687: Crash when rendering animation
The issue was caused by shape keys datablock from evaluated mesh
being added to the main database.

This commit makes it so shape keys are not copied for the mesh
used as cage.
2018-12-21 14:23:06 +01:00
c9df453ce7 Update for moving blender2.8 to master. 2018-12-21 12:15:21 +01:00
d6ca47a344 Update .arcconfig for moving master to blender2.7 branch. 2018-12-21 12:12:32 +01:00
e72f989cf4 Update for moving master to blender2.7 branch. 2018-12-21 12:01:05 +01:00
4f6b4ceb6c Correct orientation pie menu
Missing from recent orientation update.
2018-12-21 21:30:06 +11:00
1b674d70a3 GP: Cleanup weird thickness scale
This code used old factor, but now this only adds complexity and makes code hard to understand.
2018-12-21 11:27:24 +01:00
Dalai Felinto
36184f7392 Fix T57816: Crash when deleting recently orphaned collection
We were never removing the parent collection from a collection upon removal
of the parent.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D4099
2018-12-21 07:49:10 -02:00
8cbadde1a5 Fix T59673: wrong B-Bone handle references when duplicating bones.
Also fix and improve symmetrize behavior.
2018-12-21 12:10:23 +03:00
cded90f989 Fix T59709: Light target gizmo scaling
Gizmo was scaling w/ object.
2018-12-21 19:25:56 +11:00
890507d12f GP: Move calculated center only for selected strokes 2018-12-21 08:44:38 +01:00
c3545e7311 GP: Cleanup API removing extra ID parameter 2018-12-21 08:43:00 +01:00
be619b5888 Fix bug selecting verts in mixed edge/vert mode
Own regression from 2.7x when adding multi-object select support.
2018-12-21 18:17:59 +11:00
63fcbfc3a7 RNA: naming, user-preferences -> preferences 2018-12-21 12:55:02 +11:00
9dde3e42a7 3D View: add object color drawing option
Has some advantages over existing options.

- Using material links color to rendering with no way to vary colors
  if objects share a material.
- Random gives no control, objects may randomly have the same color,
  duplicating an object often changes it's color.
2018-12-21 11:45:01 +11:00
c8dfe763e5 Cleanup: unused arg 2018-12-21 11:38:38 +11:00
7a26e930a8 Cleanup: macro hygiene, line length 2018-12-21 10:46:26 +11:00
217727cb35 Mesh Batch Cache: Fix missing flag for looptris indexbuf generation
Fix T59637: Crash report - Overlays -> Face Orientation causes crash
2018-12-20 23:42:21 +01:00
d7b7a6945e Workbench: Fix wrong TEXTURE_DRAWING_ENABLED check and rework drawing logic
This makes the code easier to follow. Batches are now assumed to be not
NULL as the request system garatees it.
2018-12-20 23:25:34 +01:00
db410385b7 UI: use smaller widget for expanding hidden region
The '+' widget to show a hidden region came too close to overlapping
the viewport navigation gizmo and text editor text.

Reduce size and use an arrow icon.

D4110 by @gnastacast
2018-12-21 09:12:59 +11:00
0dabd312d4 Library: correct BKE_id_to_unique_string_key fix 2018-12-21 08:37:18 +11:00
4d9606ef19 GP: Use only selected points to calc transform center 2018-12-20 21:25:29 +01:00
b49699b1ec GP: Enable center for Local Origins only
This produces very interesting effects when move using proportional editing.
2018-12-20 19:32:22 +01:00
cb95d20595 GP: Undo center calculation
This is breaking the transformation with falloff enabled.
2018-12-20 19:15:01 +01:00
9ebd309e2b GP: Change default parameters for convert curves.
Now the link strokes is disabled by default.

Also some minor changes to adapt to new GP object.
2018-12-20 17:35:59 +01:00
545f3f1728 Fix T59648: Linking material to greasepencil object causes crash 2018-12-20 17:14:03 +01:00
36121a1bdc GP: Changes in API to make internal update
Now, the internal data is recalculated when add or remove a point.

The change in the API affect to stroke.points.add() that now requires a datablock parameter. This parameter is required to identify the datablock affected.

For example:  stroke.points.add(gpencil, 1) instead of  stroke.points.add(1)

This is the second try to fix T59600
2018-12-20 16:52:42 +01:00
d08db7aef0 Merge branch 'master' into blender2.8 2018-12-20 16:48:41 +01:00
b52465bd32 Cycles: Fixes for recent curve robustness
The key indices were wrong: need to offset curve key index
by first curve key index. Also corrected calculation of the
interpolation step.

Annoyingly, can not reproduce this on a simple file, need
production rig. For the possible future look the following
file from Spring was used: 03_005_A.lighting.debug.blend
2018-12-20 16:45:38 +01:00
8095e660c0 Fix T59672: UVs are not updating when changed in panel
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4111
2018-12-20 13:40:36 +01:00
30dea81fb6 Revert "GP: New Python update API functions (WIP)"
This reverts commit e79f401ffa.

The new API were against general design rules.
2018-12-20 13:38:51 +01:00
63ed86b06f Fix T59674: context menu for channels not found 2018-12-20 13:36:43 +01:00
Sebastian Parborg
a8103a0256 Fix T59083: normal transform orientation ignores absolute grid snap.
Absolute grid snap now takes into account the transform local axis.

Differential Revision: https://developer.blender.org/D4069
2018-12-20 12:49:59 +01:00
b2aae49cf8 Fix for camera background images options not showing when using stereoscopy.
Differential Revision: https://developer.blender.org/D4098
2018-12-20 12:49:59 +01:00
e79f401ffa GP: New Python update API functions (WIP)
For strokes:

myframe.strokes.update(mystroke)

For datablock:

gpencil = bpy.data.grease_pencil['gpencil']
gpencil.update()

Still need a manual refresh of viewport.
2018-12-20 12:37:12 +01:00
c02f67fa8a Fix T57777: Decimate modifier face count does not work
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4106
2018-12-20 11:17:45 +01:00
ae028ef206 Fix T57045: Unhandled degenerate case in bevel code
Reviewers: howardt

Differential Revision: https://developer.blender.org/D4104
2018-12-20 10:58:50 +01:00
b047866459 Fix T58404: Node/Socket grabbing with Lasso tool
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4108
2018-12-20 10:55:30 +01:00
7d8f57e0c0 Correct own error in 1ce9a142b6
Enum for scene orientations included default.
2018-12-20 18:18:42 +11:00
d5f87bdde6 Merge branch 'master' into blender2.8 2018-12-20 17:53:12 +11:00
f7d216c1b6 Fix T59074: BMesh intersect hangs
This is a degenerate intersection, exit early instead of hanging.
2018-12-20 17:50:36 +11:00
320e7f5322 Cleanup: naming 2018-12-20 17:34:30 +11:00
b2b53ee9db Correct error in last commit 2018-12-20 16:41:40 +11:00
c4c2c27f97 Fix context menu w/o an active object
Also remove special case when no items are selected,
since this only has one or two menu items, one being the add menu
which can be better accessed from the header or add shortcut.

If the no-selection case is to have it's own alternate menu - it should
be more complete before enabling.
2018-12-20 15:26:27 +11:00
98d1231fb5 Keymap: use action-tweak for node re-route
Avoids same kinds of conflicts as link-cut w/ box select.
2018-12-20 14:59:36 +11:00
669b23daed Tool System: default node editor to select tool
With box select you can't cut-links with RMB select.
2018-12-20 14:26:50 +11:00
c91778de84 Fix T59300: Box select fails in node-editor 2018-12-20 14:19:36 +11:00
a562bc7452 UI: correct error in recent UI cleanup 2018-12-20 13:47:48 +11:00
e71d489254 Cleanup: style 2018-12-20 13:11:04 +11:00
5921656655 Merge branch 'master' into blender2.8 2018-12-20 12:24:37 +11:00
306bc5fd1a PyAPI: don't truncate enums in exception messages
Not necessary and confusing when only some of the items are displayed.

See: T59044
2018-12-20 12:20:34 +11:00
6b7d03ac03 Cleanup: remove intermediate menu drawing function 2018-12-20 12:02:21 +11:00
dc3d9467f2 Fix T58937: Appended menus to VIEW3D_MT_editor_menus are not displayed 2018-12-20 12:00:20 +11:00
91240f15c5 UI: add UILayout.direction
Read only attribute, needed for introspection.
2018-12-20 11:59:31 +11:00
756be8f4d8 UI: add method to draw menu contents
This supports expanding menu contents into an existing layout.

Needed to fix T58937.
2018-12-20 11:33:08 +11:00
a91886e76e Fix possible key collision w/ BKE_id_to_unique_string_key
BKE_id_full_name_get doesn't ensure unique output, use a simple
method to create a unique key, guaranteed not to collide.
2018-12-20 09:35:46 +11:00
c4ee77cde8 Fix T59626: Outliner rename overlaps icons
Fix for T59219 was using low alpha-light grey for text background
so editing text would always be slightly brighter then the existing
background.

This causes outliner rename to have low alpha making text overlap
icons.

Use solid color to avoid issues with overlapping UI
elements in the future.
2018-12-20 09:13:42 +11:00
ab144437e2 Fix T59579: Grease Pencil copy buffer loses material information 2018-12-19 22:57:03 +01:00
a9706476e3 Mesh Batch Cache: Fix uninitialized loop variable 2018-12-19 22:56:15 +01:00
c0e6cbadfc Fix crash clicking on trackball widget
Missing check in newly added gizmo orientations.
2018-12-20 08:14:48 +11:00
65bc931306 Cleanup: argument wrapping indentation 2018-12-20 08:03:48 +11:00
1ce9a142b6 UI: expose gizmo orientation as a single enum
Avoids awkward logic from the popover,
by faking an extra item in the enum.
2018-12-20 07:46:06 +11:00
Sebastian Parborg
2bc27d3dc5 Fix T59391: Crash snapping to active 2018-12-20 06:51:28 +11:00
Sebastian Parborg
90e253d974 Fix T59387: Axis target crash 2018-12-20 06:33:55 +11:00
205b0d4651 GP: Fix error drawing on Camera view for Surface/Stroke
This bug was introduced fixing task T59595
2018-12-19 19:50:28 +01:00
a8198e6fbf GP: Primitive: Add MMB to confirm
Based on GP team feedback
2018-12-19 17:39:37 +00:00
ad7dd7d8e2 Fix (unreported): Wireframe fails in the sculpt mode on some AMD GPUs. 2018-12-19 13:26:32 -02:00
1fc75dbbce Fix T59595: Grease Pencil and CameraView
The perspective effect deformed the stroke. Now when you are in camera view and the lock axis is not enabled, the stroke is reprojected flat over the view to remove any deformation.

Also fixed reproject operator to use the origin set in topbar and not cursor 3D always.
2018-12-19 17:09:30 +01:00
d9ac4653e7 Fix T59574: Prop_search fails to set objects from scene.
Another case where editstr from search button would be used, when we
actually have desired pointer itself already available in button.

Am growing tired of doing bandaids fixes on that search menu stuff,
whole thing would require some real re-coding imho, to get rid of that
tantacular dependency over string 'identifier' only (when we should also
have access to at the very least, the active index, and also probably
active data pointer itself...).
And/or clearly separate string identifier from 'UI' string shown to user.
2018-12-19 17:02:55 +01:00
42bf7e440c Fix T58376: incorrect tooltip in subsurf modifier 2018-12-19 17:00:20 +01:00
be98fcc6e2 Fix T59273: Text object disappears when Fill Mode is set to None
Reviewers: fclem

Differential Revision: https://developer.blender.org/D4103
2018-12-19 15:56:15 +01:00
4563849c1b Fixes for particle system and physics
- Silence harmless error print about relation.

  Object with particle system which doesn't use physics will
  not have point cache component.

- Tag relations for update when particle system physics type
  change.

  This ensures correct state of point cache component.

This is all part of T59258.
2018-12-19 15:36:09 +01:00
259879e135 Fix T58739: Camera Location, keyframe Bug
This was originally caused by fix for T53788. Not sure why extra
`where_is` is needed there, the object is supposed to be evaluated
already.
2018-12-19 15:02:49 +01:00
d211c9aa0a BLI_bitmap: add functions operating on the whole bitmask.
There is no point having operations that iterate over the whole
bit array as macros, so convert BLI_BITMAP_SET_ALL to a function.
Also, add more utilities for copying and manipulating masks.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4101
2018-12-19 15:53:12 +03:00
dad260c164 GP: Primitive: Fix jitter
Missing vector calculation.
2018-12-19 12:18:45 +00:00
ac8cde69f5 GP: Primitive: Add RMB behaviour to Grab/Move 2018-12-19 12:18:45 +00:00
76d04f9514 Merge branch 'master' into blender2.8 2018-12-19 12:58:22 +01:00
593ed1347c Build info: Ensure hash length is same across all platforms and has no conflicts
The original issue was that different platforms will use different
hash lengths, just because defaults on Git client were different.

Now we use explicit length for the hash, and length is the same as
is used for short hashes in Linux -- apparently they started to have
collisions with length of 11.
2018-12-19 12:56:32 +01:00
2af0ec9457 UI: move gizmo orientation settings into popover
Instead of link toggle with enum, use a single popover that contains
both settings. The code for this isn't nice - needing 3x panels for now.

See D4075
2018-12-19 22:45:36 +11:00
25fcb44d2d Merge branch 'master' into blender2.8 2018-12-19 12:38:31 +01:00
684898cfbf Fix Proportional Edit Projected 2D method skiped center calculation
rBa520e7c85c83 defined T_OVERRIDE_CENTER(1 << 25)
which was already in use T_PROP_PROJECTED(1 << 25)
thus skipping center calculation

Fixes T58882, T59518

Reviewers: campbellbarton, brecht

Maniphest Tasks: T58882, T59518

Differential Revision: https://developer.blender.org/D4100
2018-12-19 12:33:11 +01:00
1a7fe54a85 Fix T59578: enabling "vertex group weights" in edit mode results in crash 2018-12-19 12:32:13 +01:00
61c941f040 RNA: support setting default values for custom properties.
NLA requires a usable default value for all properties that
are to be animated via it, without any exceptions. This is
the real cause of T36496: using the default of 0 for a scale
related custom property obviously doesn't work.

Thus, to really fix this it is necessary to support configurable
default values for custom properties, which are very frequently
used in rigs for auxiliary settings. For common use it is enough
to support this for scalar float and integer properties.

The default can be set via the custom property configuration
popup, or a right click menu option. In addition, to help in
updating old rigs, an operator that saves current values as
defaults for all object and bone properties is added.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D4084
2018-12-19 14:20:35 +03:00
908a274240 Fix T59237: Instancing on a path doesn't do anything
This commit makes it so curve path parent solving accepts an explicit
arguments for both time and curve speed flag, making it so we don't
have to mock around with scene's frame.

One unfortunate issue still is that if the instancing object is used
for something else, we might be running into a threading conflict.
Possible solution would be to create a temp copy of an object, but
then it will be an issue of preventing drivers from modifying other
datablocks.

At least the original issue is fixed now, and things behave same as
in older Blender version. Additionally, the global variable which
was defining curve speed flag behavior is gone now!
2018-12-19 11:59:47 +01:00
bc8f2e9ee4 Fix T59500: Weight Smoothing Not Working
Reviewers: brecht, dfelinto

Maniphest Tasks: T59500

Differential Revision: https://developer.blender.org/D4094
2018-12-19 11:51:49 +01:00
1a21c0c239 UI: show panel type in Python tooltips
Handy when editing UI scripts.
2018-12-19 21:49:04 +11:00
543a34a021 RNA: convenience method for orientation name & icon
Avoids RNA introspection at draw time
which is relatively slow (approx 5x).
2018-12-19 21:41:39 +11:00
f7dc6a63fb Gizmo: optional custom orientations for transform
This aims to resolve a conflict where some users want to keep keyboard
axis setting global, even when the orientation is set to something else.

Move/rotate/scale can optionally each have a separate orientation.

Some UI changes will be made next.
2018-12-19 20:57:51 +11:00
231ea39ed1 Transform: use the scenes transform orientation
- Use the user orientation when pressing XYZ keys,
  second press switches to global.
- Pressing again switches to global, or local
  if you're have global orientation set.

The option for gizmos to have their own orientations will be added,
see: D4075
2018-12-19 20:49:13 +11:00
a246604937 GP: Update Gizmo position when select 2018-12-19 09:13:59 +01:00
a0cca88899 Theme: use menu text color for floating redo panel
blender_light theme was showing black text on dark background.
2018-12-19 13:09:05 +11:00
1a98914bb7 startup: default file selector to empty filename
Someone saved startup.blend w/ filename, tsk.
2018-12-19 12:42:12 +11:00
fd42fe6616 Fix T57139: Transform overlay shows even when disabled
Transform bypasses the gizmo API for drawing overlays,
so custom checks are needed.

Also don't draw the gizmo in other windows when transforming.
2018-12-19 12:30:16 +11:00
6af6ef9771 Fix invalid string comparison 2018-12-19 11:39:24 +11:00
bb4ed5ce39 Fix invalid string comparison 2018-12-19 11:38:20 +11:00
d760a6ed54 UI: tweak shading popover
Show backface culling option even with rendered shading since it doesn't
yet support meshes two-sided option (noted as TODO).

Also correct bad string comparison.
2018-12-19 11:27:26 +11:00
a72220ecf0 DNA: move back-face culling to shading popover
Overlay options shouldn't be used when overlays are disabled.

Move to shading popover, reported as T58070.
2018-12-19 10:55:53 +11:00
d46d8e831c Merge branch 'master' into blender2.8 2018-12-19 10:28:26 +11:00
5c3953010d Cleanup: spelling 2018-12-19 10:18:15 +11:00
fd235e52a2 Cleanup: use static struct for app-template state 2018-12-19 10:18:15 +11:00
61a816e8ff GP: Add calculation of center for transformation by stroke (WIP) 2018-12-18 22:56:40 +01:00
0d7fe55d0e GP: Improve z-depth for Blur FX
Instead to get an average value, use the lower value.

Still some issues when render.
2018-12-18 22:56:40 +01:00
5b277d7a18 Mesh Batch Cache: Port loose_edges to batch request 2018-12-18 22:17:53 +01:00
c29cd41f49 Edit Mode: Show loose edges if in draw type is wire 2018-12-18 22:17:53 +01:00
b655bf6363 Wireframe Overlay: Make use of colorTransform when transforming an object 2018-12-18 22:17:53 +01:00
2f00e0a37b Mesh Batch Cache: Cleanup / Reorder function for more consistency 2018-12-18 22:17:53 +01:00
Dalai Felinto
6fc840b87c Fix T58899: Eevee - Material Index missing from panel 2018-12-18 18:39:50 -02:00
5e4677c962 Workbench: Fix crash when sculpting with a multi material mesh 2018-12-18 20:51:52 +01:00
604101d262 Mesh Batch Cache: Port edge_detection to batch request
Also add proper support for mapped meshes (deformed by modifiers in edit
mode). So this fixes the shadows of workbench in edit mode.
2018-12-18 20:51:52 +01:00
99fb654ffd DRW: Cleanup / Renaming of mesh batch cache functions
THis is in order to avoid the jungle of names being different at each
step of the API.

Also removes some unused functions.
2018-12-18 20:51:52 +01:00
df88b6a48d Mesh Batch Cache: Port all_edges batch to batch request 2018-12-18 20:51:52 +01:00
45e1d4d9ac DRW: Fix flat object not being selectable in wireframe view
The problem was double. They were not selectable in wireframe view and
they would not display with the right color, thus always appearing
un-selected.
2018-12-18 20:51:52 +01:00
6e5b573dc8 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/transform/transform_conversions.c
2018-12-18 20:33:04 +01:00
1875f9e7d7 Fix T59104: Snapping: Align rotation to target broken in edit mode.
This has been unbelievably painful to understand... And solution is only
partially good actually, we may even want a single axis for all the
islands in that case? But for now this is giving much better results
already, compared to the random crazyness it used to produce.
2018-12-18 20:27:50 +01:00
5638db7495 Fix T58335: Grease Pencil Objects in Edit Mode have transform gizmos in wrong location
Original fix P874 with changes from @brecht
2018-12-18 19:18:57 +00:00
Dalai Felinto
74b3b81903 Potential fix for sculpt mask diffuse color drawing update
The sculpt mask diffuse color is not working right now. But when it does it
should follow on the fix for the sculpt mask drawing update (e113b402bd).
2018-12-18 16:48:03 -02:00
Dalai Felinto
e113b402bd Fix Sculpt mask enable/disable does not update drawing immediatelly
Reported as part of T59576.
2018-12-18 16:36:58 -02:00
1ca7b6ca85 Fix T59569: crashes when generate rig.
The fix in 9fa408f51b missed one place that needed the
check, causing the assert because of incomplete data.
2018-12-18 19:52:13 +03:00
0d979b8e6f Fix for T59325. Constraint to Fcurve in Motion Tracking was broken
The check was wrongly ported from querying selection to setting selection.

Reviewers: sergey, brecht

Subscribers: brecht, ElDirector

Tags: #motion_tracking

Differential Revision: https://developer.blender.org/D4074
2018-12-18 17:50:49 +01:00
12d6c13899 GP: Primitive: Fix flickering when using a noise brush
Previously, the random values were generated every draw, now they are generated once.
2018-12-18 15:51:46 +00:00
e62368e6c4 Fix enum icon button size for fractional UI scale.
Err on the side of too much padding.
2018-12-18 15:30:19 +01:00
Harley Acheson
0497ecd5bc Fix edit mesh component buttons width not being consistent.
Differential Revision: https://developer.blender.org/D4087
2018-12-18 15:30:19 +01:00
5fa749ace2 Fix T59536: safe area values were swapped
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4097
2018-12-18 15:20:42 +01:00
37c2382a49 Merge branch 'master' into blender2.8 2018-12-18 15:10:35 +01:00
8c4ae8961c Fix T59564: Huion pen pressure not working on Linux, after recent changes. 2018-12-18 15:07:04 +01:00
Daniel
72456ee198 Fix T59009: UV unwrapp correct aspect fails on some shapes.
Differential Revision: https://developer.blender.org/D4095
2018-12-18 15:07:04 +01:00
d542e55b09 Fix T55105: Smoke Emission from particles was ignoring lattice deformer
on the particles
2018-12-18 14:58:04 +01:00
d4dcad0ad6 Fix crash with armature custom bone in wireframe mode 2018-12-18 14:51:05 +01:00
8e08e323a7 Fix T59484: Particles Lattice deform fails
this was working for object/collection display/render but lattice was
not taken into account for non object/collection display/render types
(halo, axis, cross, circle, ...)

Reviewers: sergey, brecht

Maniphest Tasks: T59484

Differential Revision: https://developer.blender.org/D4096
2018-12-18 14:39:45 +01:00
8839152abf Fix T59529: Auto smooth not working 2018-12-18 14:27:13 +01:00
6ccf961915 Fix T59478: Information Bar Missing Data when in Sculpt Mode
Display statistics from CCG structure.

This makes values to be different from what is shown in object
mode, since CCG is operating on individual grids, and object
mode will stitch those grids. But on another, those values from
CCG is what sculpt mode is actually "sees" or "uses".

The number of faces should be the same in both sculpt and object
modes.
2018-12-18 14:22:12 +01:00
eb78579bb6 Correct own error in changes to pose gizmo center
Multi-pose gizmo center calculation from
5d09f5223e now works as expected.
2018-12-18 23:03:29 +11:00
c92cffb56d DRW: Instance: Makes it possible to have instances of a non-init batch 2018-12-18 13:08:17 +01:00
77d9ddc5ea Armature: temp workaround for crash caused by custom bone drawing 2018-12-18 13:08:17 +01:00
604f5cf3f4 Cleanup: Typo in comment 2018-12-18 12:55:13 +01:00
486be2219a Use proper buffer size for statistics 2018-12-18 12:54:49 +01:00
e6c531353b Cleanup: Reduce indentation level 2018-12-18 12:54:49 +01:00
4046e55f77 Transform: calculate initial depth for axis-target
While the operator needs a depth to work as intended,
it feels buggy if the initial drag does nothing until a depth is found.

If the cursor isn't over any geometry calculate an initial depth.
2018-12-18 22:43:35 +11:00
2dee1772e1 Py Docs: documentation for draw_handler_add/remove 2018-12-18 12:31:37 +01:00
cef41d0144 Fix T59496: Movie Clip Editor does not display metadata 2018-12-18 12:28:44 +01:00
a3e4c333b9 Transform: when snap affect is off for a transform mode, ignore snap settings entirely.
Ref D4022.
2018-12-18 12:14:38 +01:00
e5c6dd3964 Fix crash showing footage information for non-animation movie clips 2018-12-18 12:06:40 +01:00
f71ae30962 Fix edit-mode wire color being used for other objects 2018-12-18 21:21:48 +11:00
d3e1b043c3 Fix T59548: Grease Pencil Primitives ignore the 'draw below' option 2018-12-18 10:44:35 +01:00
787660e15a Gizmo: exclude overlays from origin-set depth
Setting the light orientation would read depth from the light wireframe.
2018-12-18 20:33:16 +11:00
b4d625c88e Fix 3D view depth buffer ignoring overlay option
The depth buffer would include lamps, cameras.. etc
event overlays turned off.
2018-12-18 20:25:19 +11:00
c8e37f70dd Fix T59519: Grease Pencil stroke with noise modifier crashes blender
The first point index was wrong calculated.
2018-12-18 10:24:21 +01:00
9c97170bba Theme: too low contrast blender_light edit-edge
We tried this already for the default theme, but grey edges often don't
stand out against matcaps/solid shading.
2018-12-18 18:22:42 +11:00
9f25dad0a9 Fix T59535: Select linked delimit doesn't refresh 2018-12-18 17:22:11 +11:00
23383910ec Missed when renaming tool settings 2018-12-18 16:40:48 +11:00
372fd07a8e Fix paste/append w/ local-view
Paste in local-view wasn't setting local-view bits.
2018-12-18 16:23:38 +11:00
afc4cd1e67 Cleanup: python quotes 2018-12-18 15:02:49 +11:00
7721886ead Fix T53544: Crash drawing scene w/o world 2018-12-18 13:56:26 +11:00
ac80ceae77 Correct missing NULL check in recent commit 2018-12-18 13:49:09 +11:00
7e9f76944c Fix T59461: Follow active quad asserts 2018-12-18 13:35:43 +11:00
08f15433ba GPencil: Cancel w/ RMB click
RMB is used to cancel almost everywhere in blender, not confirm.
2018-12-18 13:03:34 +11:00
7eaa0b1797 Fix T59366: gpencil eraser shows w/ shape tool 2018-12-18 13:00:57 +11:00
a68edaf11d Mesh Batch Cache: Port vertex paint surface to batch request 2018-12-18 02:19:52 +01:00
bcf390a6c3 Mesh Batch Cache: Port weight paint surface to batch request 2018-12-18 02:19:52 +01:00
8ded149bfc DRW: Polygon Offset: Also offset lines and points 2018-12-18 02:19:52 +01:00
6a1315d6e7 Weight Paint Overlay: Refactor wire drawing
This reduce the number of batch/data needed. Stores a select/visiblee
flag inside the vert/loop normals.
2018-12-18 02:19:52 +01:00
4fceaf3848 Fix gizmos showing for non-visible objects
Active object gizmos were showing even when the object wasn't visible
(local view or with their object type disabled).
2018-12-18 11:59:29 +11:00
7aeb24e037 Fix multi-object state on load
D4091 by @zazizizou
2018-12-18 10:22:42 +11:00
879c966598 Transform: option to use incremental snapping
This resolves this issue where users would enable a snapping mode
besides incremental (vertex for eg), then notice strange behavior w/
rotate and scale.
While this ability can be useful, it's quite an obscure use case.

Now changing snap-modes keeps rotate and scale using incremental snap,
with the option for these modes to be affected by other snapping modes.

D4022 by @kioku w/ own minor edits.
2018-12-18 10:08:23 +11:00
William Reynish
779e252298 UI: use icons for text edit copy/paste 2018-12-18 08:41:06 +11:00
William Reynish
7312e48ae4 UI: Extend context menu to check current selection
- This extends context menus, checking the selection in some cases
  to conditionally show operators.

- When nothing is selected, add, paste .. etc are added to the menu.

- Use columns when mixed mesh modes are used (vert/edge/face).

- Move armature naming operators into sub-menu.

See D4043
2018-12-18 08:12:11 +11:00
54f9e142df RNA: Add Mesh.count_selected_items()
Needed for context menu checks.
2018-12-18 07:36:29 +11:00
Sebastian Parborg
1eafa91f64 Fix T59424: color wheel snaps to center, losing hue when value is zero.
Differential Revision: https://developer.blender.org/D4090
2018-12-17 19:18:16 +01:00
f6a77a759b Fix error when Blender starts - variable not initializated 2018-12-17 19:09:27 +01:00
08e6948da5 GP: Change order of primitive buttons
Group them in a more logic way.
2018-12-17 19:03:46 +01:00
144178bacf DRW: Fix vertex paint using original object for batch cache 2018-12-17 17:11:45 +01:00
4cd558b711 Mesh Batch Cache: Port Texture paint wires to new batch request 2018-12-17 17:11:45 +01:00
7ac49a07c6 Mesh Batch Cache: Port Texture paint batches to new batch request 2018-12-17 17:05:57 +01:00
9bb70e59b8 Curve Batch Cache: Fix issue with cd_used
cd_used needs to be the combination of generated data.
2018-12-17 17:05:57 +01:00
36cc42e796 Mesh Batch Cache: Optimization & Refactor shaded surface support
This now only upload data per loops to the GPU, making use of index buffer
to draw polygon. This make use of the vertex cache, speed up renders
and saves a lot of vram.

Update performance is also slightly faster and can even be improved further
by updating only uvs or vcol independently.

This commits breaks texture paint batches. It will be added back in another
commit.
2018-12-17 17:05:57 +01:00
bc74e48680 Fix T59373: Background Colors don't match in Workbench renderer 2018-12-17 17:05:57 +01:00
29877fb1a4 Workbench: Fix srgb texture not being color managed in texture color mode 2018-12-17 17:05:57 +01:00
0d511e05d3 Cleanup: Fix typo in comment 2018-12-17 16:34:08 +01:00
4f220cd1cd GP: Change Primitive manipulator to secondary Gizmo color 2018-12-17 16:26:25 +01:00
37d09827c6 Fix T59112: bone pinning error
Reviewers: angavrilov, brecht

Maniphest Tasks: T59112

Differential Revision: https://developer.blender.org/D4057
2018-12-17 15:13:29 +01:00
6dcf788d12 Fix T59493: view selected in GP edit mode does not take obmat into account 2018-12-17 15:03:20 +01:00
9b80c70fc5 GP: Change Primitive manipulator color 2018-12-17 14:48:10 +01:00
bb58354232 Fix T59490: wrong curve handle lines 2018-12-17 14:34:32 +01:00
ce3d00b9b7 Fix T59404: Mistake in recent EdgeHash refactor broke edge generations in mesh validate code. 2018-12-17 14:28:29 +01:00
60a5559b6c Correct modifier stack validation 2018-12-17 12:44:48 +01:00
86e6901662 Fix T59172: Blender 2.7x keymap error when setting pivot point
- only call pivot/orientation pies in non-legacy mode (had duplicate
entries)
- space_data.pivot_point > tool_settings.transform_pivot_point

Reviewers: brecht

Maniphest Tasks: T59172

Differential Revision: https://developer.blender.org/D4088
2018-12-17 12:42:47 +01:00
a84c823b89 Fix T58652: Crash editing shape keys weirdness with instances
This is a second attempt to get the crash fixed. The original fix
worked, but it was reverted by d3e0d7f082.

Now the logic goes as:

- All pointers which we can not have shared (the ones which are
  owned by the runtime) are cleared.
- The rest of runtime stays untouched.

This seems to be enough to keep particles happy.
2018-12-17 12:33:37 +01:00
dcc11360c6 Remove some files restored in Game Engine
Most likely was caused by bad resolution of recent merge conflict.
2018-12-17 11:53:54 +01:00
7d36a2a775 Fix T59483: Grease Pencil Additive Drawing mode doesn't work with shapes 2018-12-17 11:34:50 +01:00
b253fe4d1b Eevee: Change Bent normal calculation
This changes the bent normal effect to be a bit more subtle.
I also tuned down the bent normal blending factor so mesh faceted look may
appear more in occluded regions. this is to increase the fidelity of the
indirect lighting. This blending might be a parameter in the future.

Based the calculation on "Bent Normals and Cones in Screen-space"
by O. Klehm, T. Ritschel, E. Eisemann, H.-P. Seidel
2018-12-17 09:54:24 +01:00
99457dd981 GPU: Add Intel HD Graphics 530 to the list of buggy intel gpus 2018-12-17 08:56:38 +01:00
30a0f1a2bf Workbench: Use int to fix compilation issues on certain platform 2018-12-17 08:47:37 +01:00
b322ce0847 Context: add objects_in_mode(_unique_data)
Needed for Python to easily support multi-object edit/pose modes.
2018-12-17 17:55:18 +11:00
8ec7429a70 Merge branch 'master' into blender2.8 2018-12-17 17:32:42 +11:00
42b9df5907 Cleanup: use 'tool_settings' name everywhere in UI scripts 2018-12-17 17:22:50 +11:00
7fac1bfc20 Context: remove active_gpencil_brush
We don't have this for other painting modes,
no need for a special case here.
2018-12-17 17:17:43 +11:00
c73958a100 Theme: use grey for blender_light inactive menu text
There wasn't enough difference between labels and menu item text which
could be selected.
2018-12-17 16:52:06 +11:00
a2a39bada2 Theme: use black for blender_light view-overlay
Cursor axes & transform guide contrasting w/ background was too low.
2018-12-17 14:55:19 +11:00
21c1c3c59c 3D View: empty image option to show front/back
Only back was possible.
2018-12-17 14:49:16 +11:00
365ef09815 Correct error in last commit 2018-12-17 14:46:18 +11:00
d72d2d4133 DNA: clear / remove deprecated flags
- Clear deprecated flags for ID's:
  Scene, Sequence, World, Object & Mesh.
- Clear deprecated flags for Spaces: outliner, 3D view & image.
- Remove unused `Mesh.drawflag`
- Remove unused `USER_ALLWINCODECS`, `USER_MMB_PASTE`.
- Remove `V3D_SOLID_TEX` & `V3D_ZBUF_SELECT` - used in a few areas.
- Flip `Object.empty_image_visibility_flag`
  (avoids do-version on each new flag)
- Rename 'Backside' -> 'Back' in context of drawing - showing 'Back'
  makes sense.
2018-12-17 13:55:06 +11:00
9149e89421 Merge branch 'master' into blende2.8 2018-12-17 10:25:40 +11:00
98f43ba3e4 Cleanup: use bit-shifted flag definitions in DNA 2018-12-17 09:55:47 +11:00
ea33b90a1b Fix T59446: Grease pencil mirror modifier wrong
The mirror was working different to mesh mirror and the result was not the expected.
2018-12-16 19:53:40 +01:00
fbed69866e GP: Add option to occlude eraser
This adds the functionality requested in T59417 adding a new button near of pressure button of the brush to enable/disable occlude effect for eraser.
2018-12-16 18:25:55 +01:00
c733062d27 GP: Primitive: Add curve tool icon
Thanks @billrey
2018-12-16 14:20:05 +00:00
cfa46ddf6c UI: initialize Overridable Static checkbox for custom properties. 2018-12-16 17:09:32 +03:00
1578ce46c5 GP: Fix Onion Skin slow performance
The number of vertex for VBO was not calculated for onion skin and made the realloc of memory very slow.
2018-12-16 12:19:20 +01:00
4488056f3d Theme: blender_light text editing colors were too similar
Make the background of text editing fields dark to contrast with
selection and the cursor, similar to T59219.
2018-12-16 11:27:01 +11:00
e01755033a Cleanup: theme right shift 2018-12-16 11:21:32 +11:00
41a3634f80 Theme: include new colors
No visible changes.
2018-12-16 11:19:26 +11:00
4b545d1bbf Fix T58975: "@=" operator silently fails
D4083 by @artfunkel
2018-12-16 09:49:00 +11:00
3e311fdcd1 Cleanup: style 2018-12-16 09:30:05 +11:00
73dd9c4d34 Fix string formatting, fall through attr 2018-12-16 09:23:07 +11:00
351f537fa8 GP: New Curve primitive and other primitive improvements
This commit adds support for new curve tool and adds more functionalities to the existing primitives, including new handles, editing, stroke thickness curve, noise, preview of the real stroke, etc.

Thanks to @charlie for his great contribution to this improvement.
2018-12-15 17:21:47 +01:00
f9917a8d43 Fix T59396 Grease pencil brush crash
The problem was the brush was not initializated because some code was missing (marked as ToDo)
2018-12-15 09:54:31 +01:00
b73529fafd GP: Add NULL checking for object 2018-12-15 09:36:08 +01:00
ba1f178c1c Fix T56185, T59351: bypass GL_PROXY_TEXTURE.. test on AMD GPU + windows
This replaces the test of consistency and capacity made with `GL_PROXY_TEXTURE_..` on AMD GPUs with one that checks only if the texture fits the limits of size and layer.

Differential Revision: https://developer.blender.org/D4081
2018-12-14 21:33:31 -02:00
Dalai Felinto
9fbada4a3b Fix T59388: Blender crash upon F3 command search in VSE
We may not have an active object depending on where the operator is called from
or well if we simply don't have an active object :)
2018-12-14 20:35:57 -02:00
Dalai Felinto
fa41350c72 UV pin: Use ID_RECALC_COPY_ON_WRITE instead of the almighty 0
I suppose the cow tag is more correct for those generic/non-specific
tags. Thank you Sergey.
2018-12-14 20:33:31 -02:00
Dalai Felinto
a63209e175 Fix T59381: UV editor - Pinned vertex missing update
Pinning doesn't really change the geometry, so we don't really have a
tag for this. Using '0' for now (same we use for Mark Seam).

I will check with Sergey Sharybin which flag to use instead.
We could use ID_RECALC_GEOMETRY to match the notifier, but even the
simpler ID_RECALC_SELECT would do it.
2018-12-14 19:53:07 -02:00
Dalai Felinto
2b7e56964a Fix UV editor missing/typo circle_select 2018-12-14 19:24:35 -02:00
de662e7cd3 NLA: insert keyframes correctly for strips with non-Replace mode.
NLA strips support using the keyframe values in a variety of ways:
adding, subtracting, multiplying, linearly mixing with the result
of strips located below in the stack. This is intended for layering
tweaks on top of a base animation.

However, when inserting keyframes into such strips, it simply inserts
the final value of the property, irrespective of these settings. This
in fact makes the feature nearly useless.

To fix this it is necessary to evaluate the NLA stack below the
edited strip and correctly compute the raw key that would produce
the intended final value, according to the mode and influence.

Differential Revision: https://developer.blender.org/D3927
2018-12-14 22:19:18 +03:00
Dalai Felinto
fc74903f27 Fix T59322: View Layer - Search not working
Basically uiRNACollectionSearch->but_changed was always NULL for the
search templates. So skip_filter would always be true, and we would
never filter.

An alternative fix would be to add the following to the begin of
`template_search_add_button_searchmenu`:
```
static bool always_true = true;
template_search->search_data.but_changed = &always_true;
```
2018-12-14 17:09:29 -02:00
f6f46accfe GP: Added keymaps for Sculpt select
Still T58986 not fixed.
2018-12-14 19:13:53 +01:00
7bf6a9ee94 GP: Fix missing changes after rename CTX
Thanks to Charlie Jolly for find the bug.
2018-12-14 19:07:30 +01:00
ac68f44b8a fix shader editor errors when showing world shader tree
probably an oversight in rBd40bffa17f6d

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4079
2018-12-14 19:01:22 +01:00
ccc09ec124 Merge branch 'master' into blender2.8 2018-12-14 17:40:27 +01:00
4e3562f45a Dependencies builder: Don't rely on system-wide PugiXML 2018-12-14 17:39:38 +01:00
d3e0d7f082 Fix broken particle distribution after recent fix 2018-12-14 17:33:54 +01:00
c7cc97c7b9 Fix wrong color in center of HSV circle picker, after recent changes. 2018-12-14 17:29:41 +01:00
Sebastian Parborg
17905e89a7 Fix T59358: Wrong status bar keymap for release confirms and right click select.
Differential Revision: https://developer.blender.org/D4077
2018-12-14 16:59:49 +01:00
98f6f7bc78 Fix T59182: Blender 2.8 win64 crashes on start 2018-12-14 16:53:45 +01:00
780f0f646d GP: Rename CTX and OB modes
Part of T59335.
2018-12-14 16:52:12 +01:00
a1c8595b09 Edit Curve: Add Normal size in overlay popover and change default range
Change default range to 0..2 to improve the slider behavior.
2018-12-14 16:35:51 +01:00
f371e633f9 Curve Batch Cache: Add support for loose edges and curve/surf modifier
Fixes T58298 Nurbs circle and curve dont draw in objectmode
Fixes T58107 Modified curves/surfaces/fonts do not show their eval mesh
2018-12-14 16:17:29 +01:00
e4b3fe4b69 Wireframe: Fix wireframe color in edit mode for surfaces 2018-12-14 16:17:29 +01:00
f37e45c26b DRW Batch Cache: Fix hack being a bit too much hacky 2018-12-14 16:17:29 +01:00
531e5ad49a Displist: Reuse tesselated pos and nor for wireframes
This lower the memory usage and also fix a bug with metaballs normals/tris
winding being reversed.
2018-12-14 16:17:29 +01:00
18d0566013 Curve Batch Cache: Add back support for shaded geometry
This changes a bit the batches data structure. Instead of using one
vbo per material we use one for all material and use index buffers for
selecting the correct triangles.

This is less optimized than before but has potential to become more
optimized by merging the wireframe data vbo into the shading one.

Also the index buffers are not strictly necessary and could be just
ranges inside the buffer. But this needs more adding things inside
GPUIndexBuf.
2018-12-14 16:17:29 +01:00
c09913e9dd GPUBatch: Add GPU_batch_clear to clear batches without freeing 2018-12-14 16:17:29 +01:00
0ee0f0ebf6 Wireframe: Fix Object Viewport display "all edges" options not working 2018-12-14 16:17:29 +01:00
2afed99da3 Curve Batch Cache: Rework Implementation to use new batch request
Shaded triangles are not yet implemented (request from gpumaterials).

This also changes the mechanism to draw curve normals to make it not
dependant on normal size display. This way different viewport can
reuse the same batch.
2018-12-14 16:17:29 +01:00
77164e30c7 DRW: Simplify text edit drawing
This is to simplify the curve batch cache.
2018-12-14 16:17:29 +01:00
49287b34a2 GPUBuffers: Fix uninitialized memory use causing undefined conditional jump 2018-12-14 16:17:29 +01:00
f85b05111f Fix T59334: Crash initializing crazyspace on object with subsurf and displacement 2018-12-14 16:07:59 +01:00
233b780635 UI: show frame rate in movie clip editor
Feature Request from Hjialti.
2018-12-14 15:34:48 +01:00
e67f7e922c Attempt to sanitize node tree deletion
Make it explicit when freeing node tree which is owned by other
ID or when freeing node tree which is outside of a bmain.
2018-12-14 15:29:16 +01:00
1e18efa1df Fix T59220: Deleting object causes blender 2.8 to crash
The issue was caused by a special code in node tree freeing function
which will free extra fields in the case when tree is not in bmain.
This is how old code was dealing with "nested" trees, but is now
making behavior different from other datablocks. This is exactly
what was confusing copy-on-write logic.

Ideally, ntreeFreeTree() need to behave same as all other datablocks,
ad freeing of data of nested trees should be up to the owner of the
tree (this way it's all explicit and does not depend on check of
some special flag.
2018-12-14 14:53:29 +01:00
e54182427a Merge branch 'master' into blender2.8 2018-12-14 14:50:47 +01:00
0658d047a9 CMake: Fixes for OpenGL library preferences
Prefer legacy OpenGL library, for the compatibility and portability
reasons.

Also use proper OpenGL libraries to be linked against, so we can
change preference to GLVND.
2018-12-14 14:48:05 +01:00
9d4ab3fe58 Fix T59365: Blender crashes when I try to open a .blend file.
Broken logic in check for a valid vgroup storage pointer...
2018-12-14 14:44:20 +01:00
c1adf86a2e fix relationship line always drawing from the parents origin
this can be different though (e.g. vertex parenting) and correct location
is already stored in ob->orig

spotted while looking into T59332

Reviewers: fclem, brecht

Differential Revision: https://developer.blender.org/D4076
2018-12-14 13:27:49 +01:00
Dalai Felinto
0e76ff18b5 Fix T58351: Make Single User crashes 2018-12-14 09:20:56 -02:00
Dalai Felinto
dc4c1be1a4 New object API function : BKE_object_eval_reset()
This restores the object->data to a non-modifier evaluated state.

So this allow us to change evaluated object modifier stack directly and
get BKE_mesh_new_from_object() for the evalauted object.
2018-12-14 08:45:54 -02:00
Dalai Felinto
10508338d8 Build fixup for previous commit
Build error introduced on: 285cfef695.
2018-12-14 08:39:53 -02:00
7e6288cfe6 Fix T58652: Crash editing shape keys weirdness with instances 2018-12-14 11:33:18 +01:00
Dalai Felinto
285cfef695 Fixing crash with cycles baking with is_cage and no cage 2018-12-14 08:31:24 -02:00
21523b5c86 Transform: remove incorrect 3D view check 2018-12-14 16:59:26 +11:00
f4c70a35a2 UI: tweak text editing fields for higher contrast
By default the text button background color was a similar brightness
to the cursor, making it hard to see at times.

Button types number/slider/text background brightness when editing
varied quite a lot too.

- Change the background while editing to match the number button.
- Darken the selection for greater contrast.

Resolves T59219
2018-12-14 15:09:32 +11:00
9e82499d2d Fix T59347: Crash drawing empty image 2018-12-14 14:13:59 +11:00
fb685c01c3 Correct error in last commit 2018-12-14 13:23:02 +11:00
be0c8ed734 Keymap: correct keymap names
Generated names include the current context mode
which is irrelevant for generic 3D view tools.
2018-12-14 12:17:00 +11:00
82a53481ee Keymap: only use double-click MMB w/ LMB select 2018-12-14 12:01:27 +11:00
f13a4b2f12 Fix mesh select path not updating the gizmo 2018-12-14 11:55:29 +11:00
9bac172a79 Merge branch 'master' into blender2.8 2018-12-14 11:39:39 +11:00
f0a481eebd Fix selection history clearing when selecting all 2018-12-14 11:38:02 +11:00
0f7c60c576 Merge branch 'master' into blender2.8 2018-12-14 11:15:24 +11:00
11a242dea1 Missed last commit 2018-12-14 11:14:57 +11:00
dd4c87cd04 Merge branch 'master' into blender2.8 2018-12-14 11:09:42 +11:00
aa3c4b4cb6 Missed last commit 2018-12-14 11:06:34 +11:00
6e2d9ef2db Cleanup: naming (mean -> median) see T47811 2018-12-14 10:54:11 +11:00
aca13040da Cleanup: naming 2018-12-14 10:34:12 +11:00
948256442b Fix T59337: Camera visual aids ignore overlay 2018-12-14 10:18:01 +11:00
9ea645862c Preferences: add option for header position
Sets the header position for newly created windows with few exceptions
(preferences is always bottom, file-selector is always top).
2018-12-14 09:54:34 +11:00
dfa3e0ae81 Fix compiler error 2018-12-14 09:54:34 +11:00
c7a31bad9f GP: Add Subdivide Smooth option 2018-12-13 23:31:57 +01:00
26c8e09cff Fix T59137: Prefs moves header to bottom
Only use a new spaces header alignment when no previous header exists.
2018-12-14 09:09:41 +11:00
cb6d018ec9 Fix T57724: Opening file browser flips user-prefs header 2018-12-14 08:43:14 +11:00
d6225c9caa Merge branch 'master' into blender2.8 2018-12-14 08:14:52 +11:00
e961c1244c Fix typo in context docs. 2018-12-14 08:13:55 +11:00
cb5d23b544 UI: show workspace cycling key bindings in menu 2018-12-14 07:56:19 +11:00
7d3b1cdd7d GP: New Smooth operator
Smooth a stroke, in edit mode, similar how mesh operator works with meshes.
2018-12-13 19:49:13 +01:00
a7b3d58066 Fix T58014, T58650: issues with hex color and Filmic view transform.
Hex color values are now always in sRGB space, as would be expected by
most other applications. Previously they were in display space and using
the view transform.
2018-12-13 19:25:47 +01:00
f527ce5b2f Color management: add OCIO aware utility functions for transform to/from XYZ. 2018-12-13 19:25:46 +01:00
6601a89650 Fix T58549, T56741: HSV color picker issues with Filmic view transform.
In 2d655d3 the color picker was changed to use display space HSV values.
This works ok for a simple sRGB EOTF, but fails with view transforms like
Filmic where display space V 1.0 maps to RGB 16.292.

Instead we now use the color_picking role from the OCIO config when
converting from RGB to HSV in the color picker. This role is set to sRGB
in the default OCIO config.

This color space fits the following requirements:

* It is approximately perceptually linear, so that the HSV numbers and
  the HSV cube/circle have an intuitive distribution.
* It has the same gamut as the scene linear color space.
* Color picking values 0..1 map to scene linear values in the 0..1 range,
  so that picked albedo values are energy conserving.
2018-12-13 19:25:45 +01:00
33993c056a Speedup: new OldNewMap implementation for file loading
In production files that use a lot of linking I measured loading speedups between 5% and 18%. In files that use less linking the speedup might not be noticeable at all, but it should not be slower.

Reviewer: brecht

Differential Revision: https://developer.blender.org/D4038
2018-12-13 15:31:30 +01:00
fdab9a8ed1 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-13 07:01:00 -07:00
756c99b504 deps: add missing sqlite dll to windows build. 2018-12-13 06:59:37 -07:00
b8cb08fa56 Merge branch 'master' into blender2.8 2018-12-13 14:32:32 +01:00
2947882bb1 Cycles: Update standalone app to OIIO 2.0 2018-12-13 14:31:38 +01:00
5b6cb2de9a RNA: revert recent rename 'updated' -> 'dirty'
Partially reverts 45fdf41be8 & 6d38d82437,
added comment why term 'updated' is used in this case.
2018-12-13 23:19:01 +11:00
a3375729f8 Cleanup: macro hygiene, style, doxy comments 2018-12-13 23:04:14 +11:00
54fa78a048 BLI_edgehash: assert when edges use the same vert
This was removed on the recent upgrade.
2018-12-13 22:46:17 +11:00
a4afbe1153 GP: Cleanup const variables 2018-12-13 12:41:46 +01:00
1616c7c538 Fix error in recent key-item filtering
Grouping flags makes it impossible to exclude only modifiers for eg.

Fixes T59303
2018-12-13 22:39:15 +11:00
5cc015f0ad Fix force fields not affecting rigid bodies
This fixes part of T58991.
Still need to add proper relations so that point cache is marked as outdated
when effectors are modified.
2018-12-13 12:34:35 +01:00
Dalai Felinto
4d395a34dc Silence warning (const) 2018-12-13 09:18:17 -02:00
0c011fd689 GP: Missing change of texture format in previous commit 2018-12-13 12:19:06 +01:00
ae5f19e32a Fix T59125: Outliner does not show view layer count
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4060
2018-12-13 11:52:27 +01:00
6c39ea27c8 GP: Create Framebuffer textures only if needed
Now, if there aren't grease pencil objects, the textures and framebuffers are not created. This unload GPU Memory when not using GP.
2018-12-13 11:51:41 +01:00
715ab529f1 GP: Changes textures from DEPTH24_STENCIL8 to DEPTH_COMPONENT24
As we are not using stencil info, we don't need this in the texture.
2018-12-13 11:51:41 +01:00
aa63a87d37 BLI: New Edgehash and EdgeSet implementation
The new data structure uses open addressing instead of chaining to resolve collisions in the hash table.

This new structure was never slower than the old implementation in my tests. Code that first inserts all edges and then iterates through all edges (e.g. to remove duplicates) benefits the most, because the `EdgeHashIterator` becomes a simple for loop over a continuous array.

Reviewer: campbellbarton

Differential Revision: D4050
2018-12-13 11:21:31 +01:00
cef2a25518 Armature Edit Mode: improve box/lasso select
Mostly rewrite logic which now matches (de)select picking,
share between both operators.

- Support all selection operations (eSelectOp), fixes T59255.

- Add function that selects using 'BONESEL_*' flags & eSelectOp.
  This avoids lasso & box select having to handle selection flushing.

- Fix strange behavior with lasso where selecting a bone in a chain
  would only select the tip (from 2.7x).
2018-12-13 21:11:21 +11:00
e79d7747d2 Cleanup: use doxy grouping for view3d select
Easier to navigate, avoid mixing up functionality across the file.
2018-12-13 13:04:25 +11:00
7d4d9e9dbd Cleanup: style 2018-12-13 12:30:38 +11:00
3b95b521fc Cleanup: replace ifdef w/ stub 2018-12-13 12:21:45 +11:00
5d09f5223e Gizmo: multi-object pose-mode gizmo positioning 2018-12-13 11:41:45 +11:00
81ea815dcb Gizmo: use general active center calculation
There are some minor differences in center calculation but I don't think
they're important, if so we can update the code.

- Edit-bone uses head (instead of the middle when both are selected).
- Edit-bone flag for restricting components uses the selection instead
  of the active bone.
2018-12-13 10:51:37 +11:00
0835c224ba Cleanup: de-duplicate active item center access 2018-12-13 10:41:03 +11:00
8a804d5da7 Templates: remove redundant directory init
This is now handled when versioning all startups.
2018-12-13 07:22:22 +11:00
8c08efd1f7 Fix building w/o bullet 2018-12-13 06:38:55 +11:00
9c5d104224 Fix T59248: Crash in Grease Pencil Edit mode when adding Annotation 2018-12-12 19:48:24 +01:00
80ad2f8cf6 Fix (unreported) Broken rigidbody requirements when adding objects to a RB collection.
We have to ensure objects get expected RB data, when they are added to a
RB collection...
2018-12-12 17:21:37 +01:00
4e0291f185 Fix T59208: Error when loading reference/background image in edit mode 2018-12-12 16:39:00 +01:00
10eb92035c Fix T59234: Crash when enter in Edit mode
Edit mode triangles does always need to have access to faces for visibility
and select/active flags.
2018-12-12 15:19:21 +01:00
cf92795953 Mesh Batch Cache: Fix crash when using edit mode normal display. 2018-12-12 15:19:21 +01:00
b60aedc14c Fix T58450: Skin modifier not working if applied after subsurf 2018-12-12 15:07:03 +01:00
879e5cde64 Fix transform gizmo showing with active element pivot point and no selection.
It should be possible to use this when the active element is unselected, but
there still needs to be something else selected. Otherwise it is not possible
to deselect all as a way to get the gizmo out of the way.
2018-12-12 15:02:30 +01:00
b01852f20a UI: use consistent subdivision modifier name when creating from shortcuts. 2018-12-12 13:27:50 +01:00
eedd679ef2 Point API doc to proper path.
We'll have to update that again once we move 2.8 to master...
2018-12-12 12:29:58 +01:00
91c9be7df3 Merge branch 'master' into blender2.8 2018-12-12 12:04:17 +01:00
047d7d3b57 Fix T59213: Application menu links to outdated version of Python API.
Somehow those links were forgotten when we renamed API doc to simpler
names last year...
2018-12-12 11:56:25 +01:00
4357fb63db Keymap: event type filter w/ finding keymap items
Now its possibly to ask for only keyboard/mouse/ndof events
when finding key map items.
2018-12-12 21:43:26 +11:00
adaadb2fa0 Fix T59133: Area light size not updating from viewport gizmo.
When we are directly affecting DNA, we need to handle update ourself...
2018-12-12 10:44:39 +01:00
f2796da2e5 PyTemplates operator_modal_timer: update to 2.8
use keyword argument

Fixes T59232
2018-12-12 09:36:46 +01:00
e3122d3414 startup: default file selector to a useful path
Was initialized to '/home/', use BKE_appdir_folder_default instead.
2018-12-12 16:51:44 +11:00
bbb71ccbde Fix action-zones showing up as shortcuts
Toggle fullscreen area for eg, was showing the action-zone instead of
the key binding.
2018-12-12 15:52:34 +11:00
768e69eb37 Keymap: refactor keymap item find logic
Pass a function to filter items to allow lookups to be more selective.
2018-12-12 15:35:47 +11:00
4ae68d6825 Fix T59170: Box select ignores modifiers-keys once tool option is set
- Key-map items properties now override tool-options
  so modifier keys can have different behavior to the default action.

- Box & circle select now have `wait_for_input` properties
  instead of detecting this based on selection options being set or not.
  This relied on the key-map setting properties which may need to be
  initialize from the tool settings.
2018-12-12 14:26:43 +11:00
49490e5cfb Merge branch 'master' into blender2.8 2018-12-12 13:02:09 +11:00
e757c4a3be Cleanup: use colon separator after parameter
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
2018-12-12 12:50:58 +11:00
16fc62e15f Docs: correct doxy comments 2018-12-12 12:18:52 +11:00
805bf5d602 Keymap: add Shift-F1..3 editor shortcuts
Some frequently used editors didn't have F-key access.
2018-12-12 11:39:52 +11:00
b87b6e8e28 Fix T59211: Edit-mesh display crashes
Caused by ae1f563899
2018-12-12 11:16:56 +11:00
Dalai Felinto
6871402614 Fix Cycles baking active/cage
Basically what we address here is to make sure the active object and the cage
are not interferring with the baking result (e.g., when baking Combined).

To do so, we take advantage of the fact that we create our own depsgraph
for baking. So now we can change the cowed objects, instead of the
original ones.

Note: There is still a way to get a crash. If you try to bake from
selected to active when is_cage, but with no cage object, we get an
assert:

```
BLI_assert failed: //source/blender/blenkernel/intern/DerivedMesh.c
mesh_calc_modifiers(), at
(((Mesh *)ob->data)->id.tag & LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT) == 0
```

We can bypass this by passing ob_low instead of ob_low_eval to
bake_mesh_new_from_object on object_bake_api.c:847 . But then the edge
split modifier change will take no effect.
2018-12-11 21:57:16 -02:00
174acd9ca3 Fix T59210: Measure tool crash w/o overlays/gizmos 2018-12-12 10:44:04 +11:00
ff108aac63 Fix rulers being removed on click 2018-12-12 10:04:24 +11:00
c0b7bdd38b Revert "Tweak UI message of Ruler tool."
This reverts commit 1bf0a4f4d0.

This is a bug, clicks shouldn't remove rulers since it's too easy
to accidentally click instead of dragging.
2018-12-12 09:52:52 +11:00
220ab6290e Fix toolbar key-accelerator w/ LMB select
Tweak events were masking hotkey access.

Reported in T55162
2018-12-12 09:40:37 +11:00
d1237d24ca Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-11 15:14:00 -07:00
ba8d6ca3dd dependencies windows: Replace pthreads-win32 2.9.1 with pthreads4w 3.0.0
maintenance seems to have stopped for pthreads-win32
2018-12-11 15:12:56 -07:00
5049322e62 GPUState: Change isolated glLineWidth usage to GPU_line_width 2018-12-11 23:05:36 +01:00
b7933cc601 GPUTexture: Add debug print for cubemap textures 2018-12-11 22:30:41 +01:00
70d38a996e GPUTexture: Fix memory statistics not working for Multisamples textures
and also output the vram footprint of the texture at the creation.

Also output the full texture memory usage if alloc fails.
2018-12-11 22:10:16 +01:00
c541f3abef DRW: Fix redundant texture creation 2018-12-11 21:25:17 +01:00
bf2e0c7598 GPUState: Remove glLineWidth warnings about size 0x0 2018-12-11 21:15:50 +01:00
0ba02c6e9e GPUTexture: Add debug output to check what texture was created 2018-12-11 21:15:50 +01:00
Harley Acheson
73b19bfb27 UI: fix enum icon buttons haveing different size.
The alignment makes it so the button edges overlap, now one pixel is removed
to account for this.

Differential Revision: https://developer.blender.org/D4063
2018-12-11 20:46:39 +01:00
Mal Duffin
4bf2530952 FFmpeg: enable multi-threaded encoding of multiple frames, for a ~20% speedup.
This enables ffmpeg to encode each frame in its own thread. However in most
cases Blender does not pass frames to ffmpeg fast enough to actually use the
more than two threads. In some tests the speed was measured to be about 20%.
If other parts of the video sequencer get optimized, this should improve.

Differential Revision: https://developer.blender.org/D4031
2018-12-11 20:44:10 +01:00
48a3f97b23 RNA: provide access to bone parent transform math from Python.
Applying the effect of bone parent is much more complicated than
simple matrix multiplication because of the various flags like
Inherit Scale. Thus it is reasonable to provide access to this
math from Python for complicated rest pose related manipulations.

The simple case of this is handled by Object.convert_space, so
the new method is only needed for complex tasks.

Differential Revision: https://developer.blender.org/D4053
2018-12-11 20:40:51 +03:00
4de5478409 Edit Mesh: Make edit cage stick to the mesh when possible
and correctly offset it when it's not possible, otherwise we get zfighting.
2018-12-11 18:21:12 +01:00
1b8e1bb635 DRW: Add polygon offset mode. 2018-12-11 18:18:36 +01:00
2a6bc4a82c Fix T58266 : Bottom half of meshes are transparent with eevee render 2018-12-11 16:21:17 +01:00
4d115f2159 Merge branch 'master' into blender2.8 2018-12-11 15:56:04 +01:00
66d8bfb85c Update code to be compatible with OIIO 2.0
There are some changes in API of OpenImageIO, but those are quite
simple to keep working with older and newer library versions.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4064
2018-12-11 15:50:02 +01:00
54e1d38157 Fix T59001: UV Editor - Crash when hiding all UVs while 3D view is open
and sync selection enabled

Reviewers: brecht

Maniphest Tasks: T59001

Differential Revision: https://developer.blender.org/D4066
2018-12-11 15:39:43 +01:00
eb83efb6d1 Implement BMesh.from_object
Fixes T59069

Reviewers: sergey, brecht

Maniphest Tasks: T59069

Differential Revision: https://developer.blender.org/D4065
2018-12-11 15:20:48 +01:00
f60018e425 Merge branch 'master' into blender2.8 2018-12-11 15:18:43 +01:00
84b02dc54a Cleanup: remove accidentally committed debug code. 2018-12-11 15:18:15 +01:00
ece109dd60 Cycles: Add strict assert when assigning input socket stack offset 2018-12-11 14:34:52 +01:00
b45b082531 Cycles: Remove old nasty workaround
It used to be used for some sort of ignoring automatically
generated bump nodes. But nowadays it causes one of the shaders
in Classroom demo file to be compiled wrong.
2018-12-11 14:34:52 +01:00
765795aed7 Fix macOS buildbot build, wrong CUDA version check. 2018-12-11 14:16:48 +01:00
39d24ffccb Cycles: Cleanup, indentation 2018-12-11 12:57:57 +01:00
d415b5c7b8 Fix crash in do-versions after recent changes
No one can simply go into a datablock before it was linked.
2018-12-11 12:44:29 +01:00
48225a4658 Proper fix for building without Bullet
Stick to an existing way of dealing with disabled feature.
2018-12-11 12:37:04 +01:00
49b5d45118 Fix T59174: Missing particles update 2018-12-11 11:15:12 +01:00
e4153946ad Fix T59005: no FCurve cleanup in the Timeline
as opposed to the 'real' Dopesheet e.g. keyframes were not merged when
placed on the same frame

Reviewers: brecht, aligorith, angavrilov

Maniphest Tasks: T59005

Differential Revision: https://developer.blender.org/D4061
2018-12-11 09:27:04 +01:00
d421f3cac8 Fix T53166: Shift click gizmo axis lock broken 2018-12-11 16:42:00 +11:00
c7ec1fa5e6 Cleanup: use BKE_object_* prefix for object API
Also minor style cleanup.
2018-12-11 15:09:09 +11:00
7fe3d1e7d7 Fix T57934: non-empty duplicators don't render
Convert non-empty duplicators to empties.
2018-12-11 15:02:58 +11:00
8216e9f8a2 DNA: version patch Camera.drawsize to twice it's value
Draw size represented half the actual size used.
2018-12-11 14:42:50 +11:00
42126bdf06 Merge branch 'master' into blender2.8 2018-12-11 14:05:16 +11:00
6bc828ed87 Fix T59161: Edge Rotate CW is CCW 2018-12-11 14:03:42 +11:00
53928f479c Gizmo: update camera ortho-size
This needs to be improved further,
for now it shows in the right location.
2018-12-11 13:19:44 +11:00
65b930af39 Merge branch 'master' into blender2.8 2018-12-11 13:10:56 +11:00
908b6d8be3 Fix T52051: Orthographic camera display size error
It was impractical to create a small orthographic camera with a usable
size in the view-port.

No longer scale the draw-size by ortho-size.
2018-12-11 13:05:32 +11:00
9a8b6d51c1 Fix T58850: NDOF navigation guide not shown 2018-12-11 12:35:18 +11:00
3dfbb72b29 Workbench: Fix shadow artifact caused by degenerate triangles
Fixes T58735 Incorrect workbench shadow from n-gons

This also optimize the degenerate triangle detection by searching if
their area is near 0.0.
2018-12-11 01:25:45 +01:00
a49fdbcc67 Fix building w/o bullet 2018-12-11 10:13:05 +11:00
8c8e9b5586 DRW: Deprecate / Remove DRW_STATE_STIPPLE_*
This was unused and used the old drawing paradygm
2018-12-10 23:17:20 +01:00
1d23024014 Object Mode: Make point clouds a bit less like uniform blobs
Also this display is optimized. It does not use blending and pixel discard.
Working with scanned data should be more pleasant with this.

A better option would be to use gl_FragDepth to have a better sense of
volume but this discards early depth test.
2018-12-10 23:17:20 +01:00
bfb9680e9e GP: Fix problems with stroke Caps
Now the start cap is done and during drawing the end cap is not set because needs to have a UV calculated and this is not done while drawing.
2018-12-10 20:18:45 +01:00
33785baafe GP: Set Brush default material when add new GP Object
Before the brush color was not set equal to object active color.
2018-12-10 20:18:22 +01:00
18d354a5eb GP: Remove Object Onion Skin switch
It was confusing to have two switches.
2018-12-10 20:18:15 +01:00
2debee96ec GP: Replace Clamp icon 2018-12-10 20:18:10 +01:00
b34ff01487 GP: Make Onion Skin ON as default RNA value 2018-12-10 20:18:00 +01:00
bcb5293b9b GP: Enable Object Onion Skin by default
Now, the main switchis on, and the layer onion skin is off.
2018-12-10 20:17:49 +01:00
9def295d57 Edit Mesh: Opti: Reduce max_vertices in geometry shader
This is a really small win that had been overlooked when optimizing the
shader.
2018-12-10 19:02:17 +01:00
0c3535df9f Edit Mesh: Fix edges poking through the verts points in xray/seethrough mode 2018-12-10 19:02:17 +01:00
8e37eb10a1 Edit Mesh: Make "fresnel effect" not transparent but mix between 2 colors
Alpha blending is causing too many issues.
Revert back to something simpler.
2018-12-10 19:02:17 +01:00
834bf357c8 Edit Mesh: Draw inner edge selected in vert edit mode if both verts selected
This only make the edge fully selected. There is still no gradient like in
2.79 when only one vertex is selected.
2018-12-10 19:02:17 +01:00
f7b558cbdc DRW: Batch Cache: Mesh: Port edit mesh batches to batch request method
This also do some renaming/cleanups.
2018-12-10 19:02:17 +01:00
ae1f563899 DRW: Batch Cache: Mesh: Port more batches to batch request method 2018-12-10 19:02:17 +01:00
1d92888ee8 DRW: Batch Cache: Add batch request system
This makes it possible for engines to ask for batches and only fill their
data after all engine populate functions have run.
This means that, when creating the batches data we already know all the
batches that are needed for this redraw and the needed data.

This allows for less redundant data preparation and better attrib masking.
Ideally, we should run all viewports populate function before executing
the batch construction but this is not the scope of this patch.

Conversion from the old request method will be progressive and both can
coexist (see uses of mesh_create_pos_and_nor()).
2018-12-10 19:02:17 +01:00
33cc3344a2 GPU: Make changes to GPUIndexBuf and GPUVertBuf to allow multithreading
This is a small change. We delay all gl calls at the first use of the
GPUIndexBuf / GPUVertBuf in order to be able to create multiple buffers
from different threads without having many gl contexts.
2018-12-10 19:02:17 +01:00
a99eb0ca68 GPU: Cleanup: Rename vbo to ibo for index buffers 2018-12-10 19:02:17 +01:00
f179ac9fc1 Fix T58932: Impossible to influence the particle system 2018-12-10 17:37:30 +01:00
9fa408f51b Fix T58928: New Action causes crash when duplicating bone
Basically, armature update is not supposed to be run in edit mode.
This worked in master and new dependency graph because nobody was
tagging armature for an update.

But with all those copy-on-write and other things we can't ensure
tag doesn't happen (and we shouldn't). So now we ensure unwanted
code is not run from the code itself.

P.S. Deeper reason of this goes to the optimization of not updating
pose channels when in edit mode. Since pose doesn't define anything
there we don't want to be bothered with a pose update after every
operation which changes it.
2018-12-10 15:59:15 +01:00
d7e7c4ddf7 Cycles: Restore properties in the interface
They got lost in one of the merges it seems.
2018-12-10 15:54:45 +01:00
5bd485844c Cleanup: Variable naming 2018-12-10 15:54:45 +01:00
1bf0a4f4d0 Tweak UI message of Ruler tool.
It's much simpler to just click on one end, than dragging it outside of
view. ;)

Related to T59084.
2018-12-10 15:53:53 +01:00
c2b0d8b6d6 Fix T57633: Particle texture update problem
Textures are now hooked up to the RESET operation of particle
settings, which ensures particles being re-distributed when
texture is changed.

This is limited to a direct user modifications, which matches
old behavior in 2.79.
2018-12-10 15:11:57 +01:00
fc52d51d73 Cleanup: Someone forgot again to do the versioning_280 handling when bumping subversion.
Seriously... There is no point in having those subversions if one does
not take advantage of them to reduce doversion work on file load! Now we
have to raise subversion again just for that. :(
2018-12-10 15:10:29 +01:00
7f98ba4725 Proper fix for rigidbody collections's objects missing rb data.
We cannot let those data be generated on-the-fly in RBW evaluation
anymore, since those would be added to CoW eval object and never ported
back to orig objects.

We *could* get orig objects in eval code, of course, but as in
constratints, this is not really threadsafe and future proof, depsgraph
evaluation should really write back to orig data as little as possible.

So instead, add code to ensure required data is generated to objects
when their collection is added to rigidbody world.

Note that we *may* want to clean that up once collection is no more used
by RB? On the other hand, people might want to keep those data around to
be able to switch between different setups easily... So think it's OK to
keep them at least for now.
2018-12-10 15:10:29 +01:00
073a011f91 Fix T58993: Duplicating after setting a rigid body world crashes Blender.
There is no guarantee that object in rigidbody collection already have a
valid rgigidbody data when rebuilding deg relations, that is often
generated on-the-fly by actual rigid body simulation.

Note that this can be an issue when generating deg relations I guess...
But at least it won't crash anymore.
2018-12-10 15:10:29 +01:00
448731ac92 Fix part of T58964: Changing driver path/array index crashes
The issue here is that in the new dependency graph drivers are
individual nodes which depends on what they are driving. This
means that changes to RNA path or property index should ensure
those nodes are updated. Easiest way to do so is to tag relations
for update.
2018-12-10 14:50:05 +01:00
51dbf8d71a Fix T59087: Empty meshes have large bound-box
Initialize to default values for meshes w/o vertices,
note that zeroing for BKE_object_boundbox_calc_from_mesh
matches old derived mesh code.
2018-12-10 19:32:35 +11:00
979a5c34e4 Fix T59107: F3 does not work in Python console 2018-12-10 17:33:36 +11:00
929ad440d7 Fix T57086: Offset Even option is unclickable 2018-12-10 16:51:53 +11:00
155b02a196 Merge branch 'master' into blender2.8 2018-12-10 12:45:38 +11:00
cecd4fe254 Merge branch 'master' into blender2.8 2018-12-10 12:44:24 +11:00
642c315bae Fix T53544: Undo in pose mode selects all fcurves 2018-12-10 12:30:41 +11:00
9df2b6da3a DNA: add runtime struct to for graph & action editor
Move struct members, no functional change
2018-12-10 12:19:18 +11:00
168a6a4bfc Merge branch 'master' into blender2.8
Conflicts:
	source/blender/makesrna/intern/rna_dynamicpaint.c
2018-12-09 21:51:23 +01:00
d7ef1af22b Fix T59059: Blender crashing after adding particle system and dynamic paint (Brush).
Looks like this bug has been there since ages (at least present before
2.79 official release...).
2018-12-09 21:48:37 +01:00
879877295d Simplified #ifdef to not silently fail on certain platforms 2018-12-09 19:24:12 +01:00
e79bb957fc User Interface: Add button color for indicating that the value differs from the interpolated one
One issue that especially newer users often run into is that they accidentally reset changes to the scene by switching frame without creating a keyframe first.

Therefore, this commit adds a new color that is used to draw properties if their current value differs from the one that would be set when switching to this frame.
This works both for existing keyframes as well as for currently interpolated frames.

Unfortunately the flags in but->flag are full, so I had to move the new flag to but->drawflag and pass that to all relevant functions.

I went with orange for the color since afaics it fits with the green and yellow that are currently used for keyframe states and since it's somewhat reddish to signify that there might be something to look out for here.

Reviewers: campbellbarton, #user_interface, brecht

Reviewed By: campbellbarton

Subscribers: brecht, predoe

Differential Revision: https://developer.blender.org/D3949
2018-12-08 18:06:23 +01:00
aff9ccbade Fix T51057 Modifiers lose bevel weight and crease
This is for 2.80 (though bug I mistakenly merged into was for 2.78.
Duplicate bugs T58127, T58411, T58440, and T58789 all fixed.
Bevel weights and crease are not real Mesh layers so get lost
on coversion of mesh to bmesh unelss the mesh's cd_flag member
tells the converter to create layers for them.
Most code the copies or partially copies meshes uses
mesh_new_nomain_from_template_ex, so copied the flag there.
2018-12-08 06:39:46 -06:00
64bca2e648 Fix T58950: wireframe/orthographic/front/side/topview crash 2.8 2018-12-08 11:32:58 +01:00
b4b224dc08 Shrinkwrap: use polygon normals for flat faces in Align To Normal.
Hit normal originates from tesselated triangles and isn't the
actual normal used for shading of flat faces. Thus, it is better
to use the actual polygon normals when available.
2018-12-08 08:27:37 +03:00
1ddfd8c9ec Cleanup: style 2018-12-08 15:01:47 +11:00
0fe5a78983 Fix T58949: Transform feedback shaders not having fragment shader 2018-12-07 21:19:14 +01:00
c3da1691ac UI: Fix typo in hostname stamp tooltip
Also change the part "running Blender" for "that rendered the frame".
2018-12-07 20:40:55 +01:00
a8e459e452 Fix T58360 "Use object as pivot" in GP "Shadow effect" crashes Blender 2018-12-07 20:01:01 +01:00
6a5e809697 Move static get_hostname() to BLI_hostname() in system.c
This makes the `#include <Windows.h>` use more localised and out of the
`image.c` file.

Reviewers: LazyDodo

Reviewed by: LazyDodo

Differential revision: https://developer.blender.org/D4049
2018-12-07 19:28:08 +01:00
de491abf99 Fix modifiers evaluation outside of depsgraph/CoW context.
Fix T58237: Exporters: Curve Modifier not applied when "apply modifiers" are selected.
Fix T58856: Python: "to_mesh" broken in 2.8.

...And many other cases... ;)

Thing is, we need target IDs to always be evaluated ones (at least I
cannot see any case where having orig ones is desired effect here).
Depsgraph/Cow system ensures us that when modifiers are evaluated by it,
but they can also be called outside of this context, e.g. when doing
binding, or object conversion...

So we need to ensure in modifiers code that we actually are always
working with eval data for those targets.

Note that I did not touch to physics modifiers, those are a bit touchy
and rather not 'fix' something there until proven broken!
2018-12-07 18:55:08 +01:00
38ef3d6b91 Remove unused particle system recalc flag 2018-12-07 18:04:13 +01:00
1ab73fde37 Remove obscure debug-only print
The message is not clear for users, and is set for modifier already.
2018-12-07 18:02:43 +01:00
Dalai Felinto
f40a88a4ba Fix selected to active Cycles Baking
Since we started using looptris we no longer need a triangulation
modifier in the highpoly object. In fact having was causing a bug
where baking would be utterly broken.

This fix normal baking. Combined pass still needs a fix to hide the
objects during baking.
2018-12-07 14:58:37 -02:00
e9634b6930 Cleanup, typo in naming
\Something went wrong in the rename script..
2018-12-07 17:30:47 +01:00
e2d9166473 Metadata: add hostname to the available metadata options
Having the hostname allows us to identify which machine rendered which
frame in our render farm.

This simply uses the host's name, and doesn't do any DNS lookup of any
IP address of the machine. As such, it's only usable for identification
purposes, and not for reachability over a network.

Reviewers: sergey, brecht

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D4047
2018-12-07 17:29:07 +01:00
16e67dc206 Merge branch 'master' into blender2.8 2018-12-07 16:42:36 +01:00
0eb61c799d Fix T57994: Particle Instance modifiers 'Index Layer' off by one
better have this vertex color layer cover the whole 0-1 range

thx @sergey for checking

Maniphest Tasks: T57994

Differential Revision: https://developer.blender.org/D3976
2018-12-07 16:33:25 +01:00
f034926dba add 'Control Points' and 'Segments' editmode menus for Surfaces
Fixes T58922

Reviewers: brecht, billreynish

Maniphest Tasks: T58922

Differential Revision: https://developer.blender.org/D4046
2018-12-07 15:15:52 +01:00
4fe578c827 Merge branch 'master' into blender2.8 2018-12-07 15:00:48 +01:00
Dalai Felinto
e7c3f7ba6f Update BVHTree.FromObject API, remove render argument
This information should come from the depsgraph.
2018-12-07 11:55:00 -02:00
3b1f90ed84 Cycles: Do more user-friendly indication that GPU devices are not found 2018-12-07 14:53:29 +01:00
bb0d812d98 Cycles: Disable OpenCL on macOS
This is unfortunate, but the number of bugs in this configuration
keeps growing, and almost all of them are caused by bug in OpenCL
compiler.

The compiler is not likely to be fixed, since Apple declared OpenCL
deprecated.

This evil commit is aimed to keep officially supported features
of Blender in a good working and stable state.
2018-12-07 14:37:47 +01:00
c1f6ecdfab Fix T58902: error getting tools for Image Editor (modes Paint and Mask)
Maniphest Tasks: T58902

Differential Revision: https://developer.blender.org/D4044
2018-12-07 14:17:17 +01:00
012a44cff1 Fix T57640: UV unwrap packing not working without sync selection. 2018-12-07 13:54:59 +01:00
Dalai Felinto
cc61b21dff Partial fix to T58917 - No valid cage
The fix itself simply is to store the cage object as a pointer instead
of a string/name.

That said baking with or without cage is yielding very different results
than in 2.7.
2018-12-07 10:44:19 -02:00
ad47b0236e GP: Refactor coordinates to float
See: D4030

Differential Revision: https://developer.blender.org/D4036
2018-12-07 11:45:48 +00:00
942e9835a9 Fix/workaround crash opening almost any Spring file
The issue was caused mpoly array urequired by the cache filling,
but the pointer was never set when preparing render data.

Seems this change is safe enough, in terms it shouldn't be
causing slowdown, since the assignment of mpoly is cheap, but
hard to tell if there is anything else affected by thing underneath.
2018-12-07 12:41:46 +01:00
fff5df8108 Depsgraph: Make data allocation dependency more robust
This fix aims to fix crash/assert failure related on wrong
evaluation order which happens when there is a cyclic
dependency involved.

The rationality of this change is that we can allow use
of uninitialized scalar value, but memory is better be
allocated.

This might not be ideal still, but worth a try.
2018-12-07 11:37:44 +01:00
89121253db Depsgraph: Use shorter relation name
It is clear enough already that it goes From to To.
2018-12-07 11:37:38 +01:00
5c9a67c63b Depsgraph: Cleanup, line length 2018-12-07 11:37:38 +01:00
79312c1912 Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those:

- OB_RECALC* family of flags, which are rudiment of an old
  dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
  as a separate set since the graph itself did not handle
  particle systems.
- DEG_TAG_* which was used to tag IDs.

Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.

Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.

Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.

Fixes T58632: Particle don't update rotation settings
2018-12-07 11:37:38 +01:00
989fbff16f Cleanup/refactor binding code for MeshDeform modifier.
We had two different ways of doing it, SurfaceDeform and LaplacianDeform
would do it through a special modifier stack evaluation triggered from
binding operator, while MeshDeform would do it through a regular
depsgraph update/eval (also triggered from its binding op).

This enforces the later to search back for orig modifier data inside
modifier code (to apply binding on that one, and not on useless CoW
one).

Besides the question of safety about modifying orig data from threaded
despgraph (that was *probably* OK, but think it's bad idea in general),
it's much better to have a common way of doing that kind of things.

For now it remains rather dodgy, but at least it's reasonably consistent
and safe now.

This commit also fixes a potential memleak from binding process of
MeshDeform, and does some general cleanup a bit.
2018-12-07 11:22:31 +01:00
41e4059f3c Fix T58046: Crash when changing Particle type, when Hair has dynamics
thx @sergey for checking
2018-12-07 10:54:44 +01:00
999b466784 Cleanup: split mixed_bones_object_selectbuffer
Split basic object picking logic out into it's own function.
2018-12-07 20:49:11 +11:00
b48156d012 Cleanup: style 2018-12-07 20:48:56 +11:00
20261a7581 Fix T58913 Won't focus on Grease Pencil
When the datablock was empty, the center was not calculated. Now it uses the object location.
2018-12-07 10:42:14 +01:00
32aefb6fba Fix T58911: Picking objects fails in pose mode 2018-12-07 19:10:08 +11:00
10540822dc Fix T58811: Scale bezier handle uses tip as origin 2018-12-07 18:22:14 +11:00
136e88f4ea Merge branch 'master' into blender2.8 2018-12-07 17:11:28 +11:00
52824f008e Cleanup: redundant counter 2018-12-07 17:06:21 +11:00
606223f6a6 Merge branch 'master' into blender2.8 2018-12-07 15:54:17 +11:00
d6d76759f8 Fix error in Main cleanup
See 481cdb08ed
2018-12-07 15:42:34 +11:00
0c6d5232a3 DRW: Remove the use of GPUTexture buffers for edit wire rendering
See previous commit for detail as why.
2018-12-07 05:33:53 +01:00
e929cad706 DRW: Rework wireframe overlay implementation
The shader is way simpler and run way faster on lower end hardware
(2x faster on intel HD5000) but did not notice any improvement on AMD Vega.

This also adds a few changes to the way the wireframes are drawn:
- the slider is more linearly progressive.
- optimize display shows all wires and progressively decrease "inner" wires
  intensity. This is subject to change in the future.
- text/surface/metaballs support is pretty rough. More work needs to be done.

This remove the optimization introduced in f1975a4639.
This also removes the GPU side "sharpness" calculation which means that
animated meshes with wireframe display will update slower.
The CPU sharpness calculation has still room for optimization. Also
it is not excluded that GPU calculation can be added back as a
separate preprocessing pass (saving the computation result [compute or
feedback]).

The goal here was to have more speed for static objects and remove
the dependency of having buffer textures with triangle count. This is
preparation work for multithreading the whole DRW manager.
2018-12-07 05:33:53 +01:00
9f5a27c5be GPU: Remove EXT and add assert
Some drivers accept shaders with only vertex stage, but some just silently
fails.
2018-12-07 05:33:46 +01:00
fe20aa1edf GPU: Add GPU_vertformat_triple_load to load next vertices attrib
Right now does not add padding at the end of the buffer.

This seems not necessary but may cause problem on some platform. If needed
we will add this padding (only 2 more vertices).
2018-12-07 05:33:17 +01:00
88d36e6456 DRW: Add Provoking vertex state. 2018-12-07 05:33:17 +01:00
58398acc68 Fix crash recovering last session 2018-12-07 15:04:57 +11:00
8f40fbad5b Add license headers for app-templates 2018-12-07 14:29:03 +11:00
8a5656caa9 Fix T58897: Show folders in video editing template
Show folders and start in the users home.
2018-12-07 14:27:22 +11:00
a304ed1b01 WM: alternate fix for T58904
Use messages instead of notifiers.
2018-12-07 14:07:05 +11:00
2fefbfd2d0 Revert "Fix T58904: Side tabs disappear when creating new View Layer"
This reverts commit 892a104d2c.
2018-12-07 13:49:00 +11:00
0d4ec8a7a9 Fix T58905: Knife project redo fails 2018-12-07 13:33:58 +11:00
341d5b08b0 Fix adding objects in local view 2018-12-07 13:01:26 +11:00
Dalai Felinto
a48bd6cc74 Fix T58871: New Scene Collection Does Not Create A New Collection 2018-12-06 23:59:11 -02:00
Dalai Felinto
892a104d2c Fix T58904: Side tabs disappear when creating new View Layer
Using listener here, although I suspect we should be using message
subscriber only. That said, this mimics the behaviour of the buttons
main region.

As for the original bug report what was happening was that when
switching between viewlayers (or when creating one) we may not get the
same active object. So the context breadcrumbs are different.

And the bug itself was that we were missing a redraw on view layer
change.
2018-12-06 23:40:29 -02:00
Sebastian Parborg
497a9ef7a3 Fix T58750: missing fallof power tooltip.
Differential Revision: https://developer.blender.org/D4042
2018-12-07 01:15:02 +01:00
Dalai Felinto
3cce7b7ab9 Fix T58325: Local view Bug
Aka all the thousand of reports duplicated here.
I should have seen this coming, since I had to add a hack in the first
place because things were "not working".

I should have figured out earlier that COW handles base in a really
special way, with its own special object_runtime_backup hack.
2018-12-06 22:06:05 -02:00
Lucas Boutrot
d40bffa17f UI: add material settings in shader editor sidebar.
Differential Revision: https://developer.blender.org/D3926
2018-12-07 00:57:20 +01:00
27e77d4f9c Fix Alembic indexed UVs being merged for different vertices.
Other software uses this to define UV islands, so we can't just merge
any UVs with the same coordinate. They have to share a vertex too.

Contributed by Maxime Robinot, with changes by me.

Differential Revision: https://developer.blender.org/D4006
2018-12-07 00:19:53 +01:00
5fdf739e7f Fix T58898: Python error clicking in empty space in text edit mode. 2018-12-06 23:44:21 +01:00
7e722afc62 3D View: hide pose bones w/o overlays
Part of T58690
2018-12-07 09:28:32 +11:00
6aad5de58b Docs: hint to why we have option to toggle bones
Without this, it might seem redundant since there is an option
to toggle armature object display.
2018-12-07 08:49:01 +11:00
cccc40db51 Fix T57963: Cycles crash using AO for displacement.
Note this is not supported, there exists no geometry at this point, but
it should not crash at least.
2018-12-06 19:50:05 +01:00
234c112971 Fix T58223: curve tilt not working correct with left click select. 2018-12-06 19:26:39 +01:00
828c4d1c54 Fix T58863: 'Smooth/Flat Shading' to 'Shader Smoot/Flat' in context menu 2018-12-06 16:19:29 +01:00
50d26e7c78 Speedup: optimize DNA_elem_array_size to speedup file loading
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4037
2018-12-06 15:50:01 +01:00
39efb58446 GPU Framebuffer: simplify gpu_framebuffer_update_attachments_and_fill_empty_slots func 2018-12-06 11:47:37 -02:00
c8467ccc8d Fix T58310: Crash when removing multires modifier from sculpt object 2018-12-06 15:22:21 +01:00
b0726b31e6 DRW: Mesh: Make uvs use the final mesh display 2018-12-06 14:43:09 +01:00
b576e14902 DRW: Fix Uvs not working in solid mode + edit mesh 2018-12-06 14:42:25 +01:00
da7f00b9c9 GPU Extensions: unused_fb_slot_workaround: Compare only the driver.
Dozens of renderes are included.
2018-12-06 10:05:42 -02:00
32d50858c3 Fix T58663: UV Align Auto does nothing
one case was missing in cleanup commit rB8fc6609cc008
2018-12-06 13:18:13 +01:00
Sebastian Parborg
e850ae14ee Fix T58659: absolute grid snapping wrong with custom grid scale.
Differential Revision: https://developer.blender.org/D4039
2018-12-06 13:06:00 +01:00
50b0448bd3 Fix T58840: SHIFT+K in vertex paint doesn't update 2018-12-06 13:00:31 +01:00
4c336f034e Draw manager: Use render view transform as default 2018-12-06 12:31:58 +01:00
7ed8e9167d Color management: Use default view with no extra transform when not specified 2018-12-06 12:31:50 +01:00
005e6274ad Color management: Cleanup, make function name more clear
The idea is to reflect that the view settings are the best
for cases when one wants to see things as if they are a
render result.
2018-12-06 12:31:50 +01:00
0e5f97a3a1 Fix T58816: Color management Display Device other than sRGB crashes
This fixes our workaround for until proper solution is accepted
in upstream.

Now, when default view behaves same as it was supposed to (and
as it behaves in OCIO-1.0.9) it is obvious that our configuration
violates own design -- default view  is used for cases when
images don't want to be displays using "render" settings.
2018-12-06 10:55:31 +01:00
a60536956e Color management: Fix issue when active views/displays are not specified 2018-12-06 09:16:52 +01:00
ca2680aaeb Update relations when modifier texture changes 2018-12-06 09:09:21 +01:00
1f5dd9c437 Fix T58788: Apply Visual Geometry crash 2018-12-06 18:28:32 +11:00
285b06da51 Fix multi-object edit state on load
Objects selected on save would enter edit-mode on file load.
2018-12-06 17:53:59 +11:00
aeffaf75ab Fix knife project, add to mesh menu 2018-12-06 16:52:49 +11:00
6c19412ad1 Fix T58837: "Tab for Pie Menu" lags leaving gpencil edit mode 2018-12-06 16:23:01 +11:00
c39bb6bd58 Fix T58836: Shift-C doesn't update the view 2018-12-06 15:52:12 +11:00
45afcd6b86 Merge branch 'master' into blender2.8 2018-12-06 15:08:42 +11:00
d24cfa329b Fix T58832: Spin tool creates duplicate faces 2018-12-06 14:52:55 +11:00
1cc0705062 Armature: support select-linked deselection
Matches edit-mesh mode.
2018-12-06 14:00:07 +11:00
8afc4cf3ea Fix crazyspace transform w/ armatures 2018-12-06 13:05:35 +11:00
74db65e542 Merge branch 'master' into blender2.8 2018-12-06 11:27:57 +11:00
f6c615a8c2 Fix T58819: Weight paint gradient crash 2018-12-06 11:22:00 +11:00
ffdd5b3699 Fix T56362: sub surface scattering does not work on eevee on radeon hd 7600 series 2018-12-05 21:22:12 -02:00
c0a71b8369 Fix problem with unused color slot in framebuffer on some bugged AMD GPUs
Differential Revision: https://developer.blender.org/D4035
2018-12-05 21:00:08 -02:00
75b739c969 Keymap: only use MMB workaround whe MMB is enabled
Using double-click with selection breaks selection cycling behavior
(making you have to wait to click again to cycle-select the next item).
2018-12-06 10:05:53 +11:00
095f9f26aa Fix T57770: Edit-mesh wireframe cage select fails 2018-12-06 09:38:08 +11:00
05da1d7fb2 Merge branch 'master' into blender2.8 2018-12-06 08:48:43 +11:00
5bc7b9c3c6 Cleanup: unused var, style 2018-12-06 08:45:41 +11:00
5103fa4ae7 DRW: Optimize adjacency data creation a bit
This is a very small improvement and only concerns wireframe update.

My tests.
old 6fps > new 7fps > baseline (wireframe disabled) 10fps
2018-12-05 22:43:15 +01:00
ad2e68b826 Cleanup: no need to access final mesh 2018-12-06 08:37:09 +11:00
d6454a15f7 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-05 22:05:19 +01:00
3552731551 Fix (devtalk 4053): Collada build with older cmake versions broken 2018-12-05 22:04:10 +01:00
5584cad5d9 GHOST: WGL: Silence Errors when testing opengl context versions 2018-12-05 21:57:49 +01:00
0424ee86f0 Fix T58407: Wire frames are not showing with subdivision surfaces 2018-12-05 21:57:49 +01:00
efe769f3f0 Cleanup: unused function 2018-12-06 07:44:25 +11:00
5ad217fe0a Fix own mistake in recent rB74361eebe68c.
One cannot assign to Class.__dict__, that is not a 'real' dictionnary...

Thanks to @JacquesLucke for noting the issue.
2018-12-05 20:54:02 +01:00
9fa8c01f6b Fix (unreported, related to T58210) LaplacianDeform binding state incorrectly reported by RNA.
LaplacianDeform binding handling is a catastrophee in CoW context,
because half of the binding (the laplacian solver cache thingy) is not
saved, and can be re-generated on the fly from stored vcos.

This means that binding is not only done when hitting 'bind' button, but
also at file load, and when some things change.

And this utterly breaks with CoW design, not sure how to fix, will add a
task about that.

But this also means that NULL laplacian solver cache pointer is not a
good check to know whether it is binded or not, only stored vcos are
relevant for that (and the binding flag, of course).
2018-12-05 20:54:02 +01:00
484389cdcd Fix T58210, Part II: Surface Deform modifier (un)binding is broken.
This fixes/clarifies Surface Deform evaluation code that does the
binding, since that part should only be called outside of depsgraph
evaluation, with orig data-blocks and not CoW ones.

Now we have a decent amount of asserts and checks to ensure eveything
works as expected.

Also had to add a special case to get target's mesh in binding case,
since often target's evaluated mesh is not available, in that case (and
in that case only), we can actually compute that mesh (because we are
out of depsgraph evaluation).
2018-12-05 20:54:02 +01:00
71e2efc4ce Fix T58210, part I: Surface Deform modifier (un)binding is broken.
Binding and unbinding *has* to happen outside of 'normal' depsgraph
evaluation of modifiers now that we have CoW, otherwise persistent data
stored in modifier data are always lost!

Note that this is only first step of the fix, modifiers code needs also
some work. Surfacedeform one is in next commit, Laplacian case is much,
much more complicated to handle, given how it uses its cached data. :(
2018-12-05 20:54:02 +01:00
c0baa648dc Minor cleanup in Laplacian deform modifier DNA code. 2018-12-05 20:54:02 +01:00
f692886164 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-05 20:30:46 +01:00
da4991fcae fix: Collada: remove Class from method definition in header file 2018-12-05 20:28:23 +01:00
Harley Acheson
9b228e465f UI: reduce area splitting action zone size.
This would overlap with buttons in the header. It's smaller to hit, but
still wider than the outlines for resizing, so hopefully it's fine.

Differential Revision: https://developer.blender.org/D4033
2018-12-05 18:51:59 +01:00
Glenn Tester
9375c941b7 Fix T57939: animated values in compositing nodes not working.
For now this is not part of copy-on-write, and needs extra animation evaluation.

Differential Revision: https://developer.blender.org/D4019
2018-12-05 18:08:46 +01:00
6e00415a85 Fix T58679: Missing modifiers update on changes to texture 2018-12-05 17:35:48 +01:00
d355a2b7d8 Depsgrapgh: Use more distinctive opcode for texture and image evaluation 2018-12-05 17:35:48 +01:00
56aa86ae25 GP: Tag datablock after mode change 2018-12-05 17:22:03 +01:00
21de125657 GP: Add icon for Arc primitive 2018-12-05 16:03:48 +00:00
94503efb12 GP: Fix precision issue with Circle and Arc tools
Differential Revision: https://developer.blender.org/D4030
2018-12-05 15:59:23 +00:00
cdf626615d Fix In front option not working in solid mode 2018-12-05 16:57:44 +01:00
16749070ae GPU: Fix gpu workaround detection 2018-12-05 16:57:44 +01:00
309d4bfbbc Fix T58762: Issue with weight painting on deformed mesh
Was initially reported when painting on a mesh with armature,
which was failing due to missing bbone cache. The issue was
deeper, and was related on the way which object was used to
calculate crazyspace.
2018-12-05 16:55:25 +01:00
81449320e4 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-05 08:46:12 -07:00
4cb6d97691 deps: update opencollada to v1.6.68 2018-12-05 08:44:50 -07:00
16aa7dfa19 Fix T58391: correctly handle Curve Shape Key layout in Python API.
The layout changed when the radius property was added to shape
keys in 2.8, but the RNA code wasn't updated.

Also, even before that, the code didn't do anything to correctly
handle mixing sub-curves of different type (nurbs vs bezier) in
the same Curve object. Now that case is handled correctly but not
very efficiently by allocating a mapping table when necessary. To
recover some performance, a custom index lookup function is added.
2018-12-05 18:36:52 +03:00
6dcb474dd4 GP: Disable Draw Modes if enable Annotation
When enable annotations with a grease pencil object, the GP Object must be set to Object mode because the annotation Draw and the GP draw are incompatible.
2018-12-05 16:31:43 +01:00
3e1ca9a693 Fix T58764: solid mode error 2018-12-05 15:47:41 +01:00
cbb82720be Fix T58726: Pixels not being drawn if dpi scalling > 1 2018-12-05 15:47:41 +01:00
c014e03b17 Don't tag objects from inside function which is used by dependency graph
This partially reverts 9edc64e255. If tag is needed, do it outside of
dependency graph evaluation.
2018-12-05 15:37:25 +01:00
34d5651a17 Remove old dependency graph
Yes, again.
2018-12-05 15:35:18 +01:00
23688ec39a Fix T58794: extended shading pie menu wrong order in lookdev mode. 2018-12-05 15:22:20 +01:00
a3b03b8146 Merge branch 'master' into blender2.8 2018-12-05 15:15:06 +01:00
834fa06614 Fix (unreported) building Cycles tests with Embree enabled. 2018-12-05 15:14:16 +01:00
378e5232e8 Fix T58104: Duplicated previews for Matcaps/HDRIs in portable installs
Reviewers: brecht

Maniphest Tasks: T58104

Differential Revision: https://developer.blender.org/D4028
2018-12-05 14:53:44 +01:00
fb3f1a3567 Merge branch 'master' into blender2.8 2018-12-05 14:41:00 +01:00
be359fc6e5 Fix T58756: crash changing shading.type in 3D viewport in inactive screen. 2018-12-05 14:40:10 +01:00
6122e1d6c0 Color management: Fix/workaround broken getDefaultDisplay()
This is something what is caused by OCIO library. The patch
has been submitted there:

  https://github.com/imageworks/OpenColorIO/pull/638

For until it is refined and checked we do workaround from
our side.
2018-12-05 14:11:21 +01:00
b927d19696 Color management: Query default view from display
Solves weird situation when default display name is queried
from OCIO, but Default view being assumed to be set for it.

Now view is initialized to a default view of that display.
2018-12-05 14:11:21 +01:00
9c7f01b905 Color management: Cleanup, typos 2018-12-05 14:11:21 +01:00
c9344d6c5b Fix T58776, T58030: pressure sensitivity on Linux not working for some tablets. 2018-12-05 14:02:37 +01:00
e7643ee6b4 Install_deps: bump collada version to 1.6.68. 2018-12-05 13:52:39 +01:00
6be0948e6d UI: rename UV Edit to UV Editor, for consistency. 2018-12-05 13:51:37 +01:00
4a21345665 Merge branch 'master' into blender2.8 2018-12-05 12:54:45 +01:00
f5b46daf52 Fix build with old CMake versions. 2018-12-05 12:53:19 +01:00
11ff2022d5 Cleanup: remove deprecated piece of code in library reading code.
That one was flagged as useless since 2.77, and only kept 'to be sure'
everything was OK. This was years ago now, and never got any report on
this, so 2.8 sounds like a good time to nuke it.
2018-12-05 11:46:49 +01:00
eeabed2132 Fix T58771: Wrong path to Unit Settings
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4034
2018-12-05 11:26:01 +01:00
74361eebe6 Fix T58772: Stray "forward" and "up" options in 2.8 import addons?
Nice side-effect of using new __annotations__ thingy to store
dynamically-generated fields in a class: __annotations__ dict is not
ensured to exist for a given class, so we may end up modifying on of the
parents' one!
2018-12-05 11:08:57 +01:00
Dalai Felinto
80ffd7b459 Implement bvhtree.fromObject
Passing depsgraph instead of scene, since a scene does not fully define the
state of object you want to use for the BVH.

Also, mesh_create_eval_final_view and mesh_create_eval_final_render are pretty
much the same, so mesh_create_eval_no_deform and
mesh_create_eval_no_deform_render are as well.

Issue reported on: T58734

Reviewers: sergey
https://developer.blender.org/D4032
2018-12-05 07:58:58 -02:00
8e31e67bf5 GP: Add missing pressure button to Topbar 2018-12-05 10:46:41 +01:00
5c8f1053b5 UI: split UV editor out of the image space 2018-12-05 14:38:58 +11:00
d59c4c9d61 GPU: Cleanup: Replace glFlush by GPU_flush 2018-12-05 04:23:45 +01:00
a7712e8594 GPU: Improve detection of intels UHD graphics 2018-12-05 04:22:32 +01:00
4d4f0dbd8d GPU: Print opengl infos if using --debug-gpu-force-workarounds 2018-12-05 04:03:40 +01:00
1dac00f7ad Fix T58551: Dragged in images do not display orange highlight border when selected 2018-12-05 03:45:12 +01:00
b4d192def8 UI: Select Linked Instanced Collection still named Dupligroup
Fixes T58747
2018-12-05 03:40:13 +01:00
1fa527bfa3 BKE: Add "--debug-gpu-force-workarounds" to force gpu workarounds
This is nice to test workarounds on other configs that may benefits from
the existing workarounds.
2018-12-05 03:05:39 +01:00
354b1c162a Fix T58733: Segmentation fault at start causes by shader compillation 2018-12-05 02:51:48 +01:00
b5ebdb09af Workbench: Remove specular shadowing for red and blue metal 2018-12-05 02:51:48 +01:00
7ffde286be Workbench: Cleanups and reduce shader variations
Also optimize deferred engine by only outputing material data if needed.
This make the bare flat shading mode (no effects) only a depth prepass.
2018-12-05 02:51:48 +01:00
5368540431 Workbench: Fix workbench broken on some config due to usuned fb slot
This seems to be a driver bug. Only windows + Radeon HD 7500M seems
to be affected. Fix can be extended to more config if necessary.
2018-12-05 02:51:48 +01:00
f4261cd2ed Workbench: Remove unused framebuffer slot. 2018-12-05 02:51:48 +01:00
5c59244238 Object: select objects when revealing
Matches behavior for other modes.
2018-12-05 12:12:07 +11:00
baf599610a Fix T58661: Shading pie doesn't highlight x-ray when on 2018-12-05 11:50:35 +11:00
8fb3a222a1 Fix T58690: Disable overlay doesn't hide bones 2018-12-05 11:08:50 +11:00
9c963d363e Merge branch 'master' into blender2.8 2018-12-05 11:03:48 +11:00
45c11c1a1b Fix T49624: Fly uses camera settings outside camera view 2018-12-05 08:36:37 +11:00
b83cf9d340 GP: Enable Smooth Sculpt brush when press Shift key 2018-12-04 22:35:17 +01:00
Dalai Felinto
be012c88c5 Cleanup: Action zone coordinates
No functional changes, but it makes all the coordinates more consistent
(going from small to larger values). It helps debugging in the future
to be able to rule out vertex order as a culprit.
2018-12-04 17:42:31 -02:00
Dalai Felinto
7c56ac2355 Fix area splitting from action zone flipping viewports
The top-left and bottom-right corners were creating the new area in the
wrong place.

Blender 2.7x only had action zone corners in the top-right, and
bottom-left corners. So it had some hardcoded assumptions based on that.

This commit feels a bit like a hack, but I think it may be fine.

Bug reported via IRC, how to reproduce:

* Change shading to Rendered.
* Split viewport from the top-left corner.
2018-12-04 17:42:31 -02:00
baf89af0f5 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-04 20:31:30 +01:00
22bba02bc8 fix T58568: used wrong case in variable name 2018-12-04 20:28:20 +01:00
5c3955452b Merge branch 'master' into blender2.8 2018-12-04 19:48:21 +01:00
10c50d7dbf fix T58568 build errors when using collada 1.6.68 or newer 2018-12-04 19:11:57 +01:00
Niels
8908670623 Fix T58466: bug in macOS GHOST_GetSwapInterval.
No user level changes since this function is not used in active code.
2018-12-04 18:44:42 +01:00
34b73cb11c Fix T57620: display custom normals in Edit Mode.
Since it seems that CD_ORIGINDEX is not available for loops,
the only choice is to simply use the loop normals already
computed by depsgraph after evaluating modifiers.

This revealed a bug where the Auto Smooth settings would be lost
from the mesh after complex modifiers, or after edit mesh to mesh
conversion, so restoring them is needed to get correct results.
2018-12-04 19:53:14 +03:00
7e5f31be41 Fix T58609 Subdivision Surface modifier, "Optimal Display" not working
I tried to make it progressive using the wireframe slide but it did not
work well.

So taking the most straight forward way.
2018-12-04 17:52:32 +01:00
6f198f7851 Wireframe: Optimization: Only draw triangles that have edges
This only happens after a certain wireframe threshold.

We sort triangles into 2 bins (start and end of the buffer) based on a
threshold and just draw the first bin if the wireframe slider is low enough.

This optimization is disabled for deformed meshes when playback is active.
This optimization is only implemented for meshes object for now.

This should help resolve (to some extent) T58188.
2018-12-04 17:52:32 +01:00
f1975a4639 Wireframe: Optimization: Only draw triangles that have edges
This only happens after a certain threshold.

We sort triangles into 2 bins (start and end of the buffer) based on a
threshold and just draw the start bin if the wireframe slider is low enough.

This optimization is disabled for deformed meshes.

This should help resolve (to some extent) T58188.
2018-12-04 17:52:32 +01:00
89ef69d23c Wireframe: Optimization: Output degenerate triangles if no edges 2018-12-04 17:52:32 +01:00
6a0c25b447 Fix T58700: Modifier error msgs not showing.
We need to copy those back from evaluated modifierdata to orig one (as
part of `BKE_object_synchronize_to_original()`).
2018-12-04 17:07:47 +01:00
64474fbc22 Cleanup: typo in comments. 2018-12-04 16:56:54 +01:00
be91d4ef95 Fix T55774: Crash when reloading clip during prefetch
Simply kill prefetch jobs when reloading. Not sure what else
we can do here..
2018-12-04 16:40:04 +01:00
b9b88d59dd Merge branch 'master' into blender2.8 2018-12-04 16:35:16 +01:00
cf2e35fcfe Fix T58118: Make duplicates real does nothing
The issue was caused by transflag set in geometry evaluation
never copied back top original object.

Now we have a dedicated operation which does all sort copy
back to original object, so we don't have to worry about
atomic assignments or what gets set where.

Still need to move boundbox to the same function, but it
needs some careful doublechecking first.
2018-12-04 16:04:10 +01:00
f63da3dcf5 Buildbot: enable support for NVIDIA Turing cards in Cycles (like GTX 20xx).
We currently only build the sm_7x kernels with CUDA 10.0, older cards still
use 9.1 until rendering errors are solved for them.
2018-12-04 16:03:18 +01:00
b14ec18601 Cycles: add initial CUDA 10.0 support, but only recommend use for Turing cards.
There may still be rendering errors when used for older graphics cards.
2018-12-04 16:03:18 +01:00
e666ee965c Fix T58227: Subdivision Surface Type Simple messes up UVs
This seems to be a bug in OpenSubdiv. For now simply use Catmark
subdivision scheme with infinitely sharp edges.

Later on it's either gets fixed in OpenSubdiv or we do bilinear
subdivision on our side.
2018-12-04 15:18:37 +01:00
245065460f Remove the Draw Curve operator from the Add menu
this operator was only working in editmode and we now have a dedicated
tool for this.

Fixes T58495

thanx @billreynish for usability advice
2018-12-04 14:42:08 +01:00
3d013f7b10 Fix for assert failure in material preview
All localized datablocks are not supposed to have animation
data associated with them.

There was an easy way to reproduce assert failure: toggle
animation decorator for Viewport Display -> Color.
2018-12-04 12:31:32 +01:00
e6141d7b3b Fix T58117: Crash with keyframing, take two
More operators need to become aware of action possibly being gone.
2018-12-04 12:31:32 +01:00
b97cd0e690 Depsgraph: execute all COPY_ON_WRITE nodes first as a separate stage.
COW nodes in the graph are mostly connected via a relation type
that doesn't propagate the update flags. Unfortunately, due to
the scheduling implementation that means the relations don't
actually guarantee execution order for indirect dependencies.
Relations also don't guarantee order in case of cycles.

As mentioned in IRC, the simplest way to fix possible problems
is to execute all COW nodes as a separate execution stage. This
seems to fix crashes with Data Transfer modifier in a cycle.

Staging works by simply delaying actual scheduling of tasks for
non-COW nodes until the second run of schedule_graph.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4027
2018-12-04 14:08:50 +03:00
01581d4a1e BLI_task: fix queue in work_and_wait, and support resetting.
To make the pool more usable for running multiple stages of tasks,
fix local queue handling in BLI_task_pool_work_and_wait.

Specifically, after the wait loop the local queue should be empty,
or the wait part of the function contract isn't fulfilled. Instead,
check and run any tasks in queue before the wait loop.

Also, add a new function that resets the suspended state of the pool.
2018-12-04 14:08:50 +03:00
c86e828eee Fix (IRC reported) missing update for RNA Object's matrix_local property.
Reported by @zeffii, thanks!
2018-12-04 12:06:24 +01:00
df2635099b Merge branch 'master' into blender2.8 2018-12-04 11:45:22 +01:00
3f31ec8398 Cleanup: Spelling 2018-12-04 11:43:53 +01:00
c6f47ffa98 Fix T58117: Crash with keyframing 2018-12-04 11:28:54 +01:00
6330b715ef Fix T58220: EdgeSplit at Split Angle: 0 doesn't split flat faces.
Add special handling for both edge cases (:p):
* 180° is same as no splitting by angle;
* 0° is same as split on all edges unconditionnaly.

In both cases we can also avoid computing poly normals.
2018-12-04 10:51:19 +01:00
36ca072375 Fix T58481: "Make duplicates real" operator settings crashes 2018-12-04 10:18:21 +01:00
9b933ccdf6 Fix error reloading scripts
Operator.is_registered needs to use RNAMeta class.
2018-12-04 17:54:54 +11:00
d8ed96a6a0 Cleanup: remove unused brush set by index 2018-12-04 17:33:47 +11:00
b16f03566b Show tool title for favorites menu 2018-12-04 16:14:21 +11:00
61678ca8ae Fix T57076: Remove property from favourites menu fails 2018-12-04 15:11:26 +11:00
e7641b6834 Edit last commit
Split out ensure-tool check into its own function.
2018-12-04 14:33:45 +11:00
80816fc712 Fix T58256: error message w/ missing Select Box tool
Support space modes not having tools.
2018-12-04 13:55:50 +11:00
2ff79613a8 Fix T58670: Spin tool crashes w/o gizmo overlay 2018-12-04 13:00:10 +11:00
1b6a394d86 Cleanup: unused args 2018-12-04 10:39:03 +11:00
c631782542 Fix T58474: Gizmo Operator template fails on rerun 2018-12-04 10:17:42 +11:00
2c19c9b2f6 GP: Draw Mode: Add Arc Primitive
This adds an elliptical arc primitive.
Press CKEY for toggling closed/open arc.
Press FKEY key for flipping arc.

Additional changes to gpencil primitives.
Increases default edges of circle to 64.
Keymap changes to allow primitives to be drawn with Shift or Alt key.
Allow Plus/Minus key to adjust number of edges.

Missing: Toolbar icon

Differential Revision: https://developer.blender.org/D4024
2018-12-03 22:11:38 +00:00
f0432e37ab Fix T58636: repeat image in UV editor not working.
A little too much code got removed in fb24813.
2018-12-03 20:08:20 +01:00
dc26c5e1ad Fix T58635: 2.8 - "3D Markers to Mesh" error. 2018-12-03 20:06:50 +01:00
9637a17856 Depsgraph: immediately free object's derived caches in the COW step.
After update of the mesh some of that data is so broken that using
it would crash. To reduce the risk of crashes in case of dependency
cycles, clean it up immediately.
2018-12-03 20:48:47 +03:00
4b8b369218 Fix T58448: Cloth presets fails to load due to missing attribute structural_stiffness.
Presets were not updated when parameter were changed in rBe3d31b8dfbdc.

Note that will also check on generating more resistent py code for that
kind of presets, since that will also affect any custom preset made by
users...
2018-12-03 17:46:39 +01:00
65779b022d Fix T58280: Blender 2.8 hangs when the LookDev mode is enabled
The hang was due to the nodes being "evaluated" for every incomming link.

Solution: only evaluate once per nodetree.

Also merge the tagging of SSS and SSR into one traversal only.
2018-12-03 17:19:11 +01:00
95eca49e54 DRW: Make default debug mode a bit more silent
Use --debug-gpu for debugging non found uniforms
2018-12-03 17:19:11 +01:00
0759480529 Workbench: Encode Roughness and metallic into 8bits
This reduces the bandwidth + vram usage of workbench even further.
2018-12-03 17:19:11 +01:00
223c1a107a Workbench: Make object ID pass optionnal
We separate the background and foreground shading passes to be able to make
the object id pass optionnal if we don't need it.

This saves a bit more memory. Also not clearing all rendertargets saves
some GPU time too.
2018-12-03 17:19:11 +01:00
a022811441 DRW: Make fullscreen quad in the background
This is to be able to only draw the background pixels by using a depth
test EQUAL.
2018-12-03 17:19:11 +01:00
d8d52e273e Workbench: Cleanup: Remove Spherical harmonic evaluation
It is not used anymore
2018-12-03 17:19:11 +01:00
82f01c666f View3D: Grid: Don't make the Zaxis produce any fragment is not needed
This was a bug that was making the grid drawing even more slower than it
is.
2018-12-03 17:19:11 +01:00
24fd03d0c2 Workbench: Reduce VRAM usage depending on mode
We exploit the fact that we are using the metallic workflow for material
and pass the metallic parameter instead of the specular color.

Pack the front facing bit in the color buffer only for matcap display.

Change buffer formats to use less bytes as possible.

Also don't request buffers that we won't use.

Saved 40MB on 2K screen on StudioLight + Shadows + Specular Lighting.

Includes several cleanups.
2018-12-03 17:19:11 +01:00
17a4323ef5 Subdiv: Set edge render flags according to Optimal Display
This is a part of T58609, but work is still needed to properly
support this flag in the draw manager.
2018-12-03 17:05:28 +01:00
bb16167fd8 Depsgraph: completely move customdata_mask to the ID node.
Move all mask-related fields from Object and OperationDepsNode
to Object_Runtime and IDDepsNode. Auto-apply DEG_TAG_GEOMETRY
if the mask changes after DEG rebuild. Update DEG API and all
code that uses it.

This fixes "source mesh data is not ready" errors from Data
Transfer modifier when parameters are changed in the UI after
the recent mesh_get_eval_final fix.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4025
2018-12-03 18:29:06 +03:00
fadad895b2 T58338 Edit Mode rotation doesn't work if object is far away from world origin
The fix code was done by Brecht Van Lommel, I only tested that the solution works.
2018-12-03 16:26:52 +01:00
3235a3081c Fix T57858: Add validation callback to CustomData layers.
Our mesh validation was only checking cd layout so far, not their actual
data. While this might only be needed for a few types, this is a
required addition for things like imported UVs, else we have no way to
avoid nasty things like NANs & co.

Note that more layer types may need that callback, time will say. For
now added it to some obvious missing cases...
2018-12-03 16:22:27 +01:00
957435785c Cleanup: Use BLI's is_finite_v helpers instead of manualy checking each item. 2018-12-03 16:22:27 +01:00
f880b60353 Depsgraph: Add missing cache file handling in build_id() 2018-12-03 16:05:17 +01:00
5a6f1fa563 Fix T58600: update OSL scripts to work with OSL 1.10.x. 2018-12-03 15:14:21 +01:00
95be6826e3 Data Transfer Modifier: fix mesh_get_eval_final usage.
It can't be used during modifier evaluation, and rna
enum code should access the evaluated objects.
2018-12-03 17:01:02 +03:00
1983a52e04 Depsgraph: assert that mesh_get_eval_final/deform aren't used in eval.
Using those functions during multithreaded evaluation is a sure
way to have a race condition and crash.
2018-12-03 17:01:02 +03:00
764e937d1a Fix T58258: Select Objects in Collection not working
Maniphest Tasks: T58258

Differential Revision: https://developer.blender.org/D4023
2018-12-03 14:19:52 +01:00
40f4343679 3D View: remove non tool-system ruler
There was duplicate code for the ruler being accessed
as a tool and an operator.

Remove the modal operator code in favor of tool access.
2018-12-03 21:21:36 +11:00
394b086b9c Fix T58556: Some remaining 'dupli_types' in pycode after renaming. 2018-12-03 10:39:54 +01:00
1ac7a840f6 Fix T58594: Modal circle select can't select & de-select 2018-12-03 19:32:42 +11:00
d89faac7d2 Merge branch 'master' into blender2.8 2018-12-03 19:31:54 +11:00
63d0ea8ecf Fix T58535 Crash on Load
The particles was not ready when the drawing cache try to use it.
2018-12-03 09:12:29 +01:00
6bb825e083 Fix T54580: Pointer buttons skip undo push 2018-12-03 18:43:33 +11:00
599f6c791a Merge branch 'master' into blender2.8 2018-12-03 18:07:50 +11:00
be2e549111 Use scene active object for sculptmode enter/exit calls
Match logic in previous commit.
2018-12-03 18:00:20 +11:00
f32dfd0819 Fix T56331: Undo crash w/ sculpt on hidden layer 2018-12-03 17:42:26 +11:00
2df86ca967 Fix T56642: 3D view gizmo orientation wont update 2018-12-03 16:52:21 +11:00
ffdc1f8924 Cleanup: warning, style 2018-12-03 16:50:50 +11:00
81c2fd25e5 Fix T58528: Assign material skips non-active 2018-12-03 15:53:31 +11:00
ff3601b9ae Fix/workaround T58368: Crash w/ mapped mesh + autosmooth 2018-12-03 14:58:29 +11:00
085e5765df Cleanup: remove flag from GizmoCommonData
Use struct member instead,
there are already many gizmo flags to keep track of.
2018-12-03 13:01:04 +11:00
4978ef5ed5 Fix T58573: Camera lens gizmo error on click 2018-12-03 12:55:55 +11:00
a205493426 Fix camera lens gizmo sensor comparison 2018-12-03 11:27:22 +11:00
63ac7c799c Fix T58566: Blender 2.7x keymap not correct for select all toggle and spacebar. 2018-12-03 00:40:09 +01:00
cf18eb2de3 Fix T56996: MacOS: Lagging when rotating the view
It happens on multiple configuration so we cannot isolate the fix to only
some config.

Thanks Hugo Lamarche for helping finding the fix.
2018-12-02 22:35:15 +01:00
756df74fca Fix T58101 : Image empties are only rendering their border when using MSAA 2018-12-02 20:11:40 +01:00
c44a203aa7 Texture Paint: fix fast selection update to also work without modifiers.
If there are no (non-deform) modifiers, the evaluated mesh simply
shares arrays with the base COW copy instead of having CD_ORIGINDEX.
2018-12-02 20:05:53 +03:00
4ee29d3fdf GP: Fix line primitive when using to square behaviour
Previously the shift key for line primitives only allowed diagonals.
This change allows the line to constrain to vertical and horizontal lines.

Differential Revision: https://developer.blender.org/D4012
2018-12-02 14:44:50 +00:00
ebfea8c2bb Fix texture previews not updating when parameters are changed.
Maybe there is a more correct way, but this works for now.
2018-12-02 14:57:52 +03:00
71c624dcd8 Partial fix for T58113 bevel harden normals bug.
This fixes the problem where not all faces got hardened properly
when using a hardening mode in the bevel modifier.
2018-12-02 06:29:58 -05:00
925380050d Keymap: fix error in recent enum-menu support 2018-12-02 15:09:15 +11:00
55b31dd98c Merge branch 'master' into blender2.8 2018-12-02 14:37:04 +11:00
335e1b507b Cleanup: BKE b-bone API naming
Use BKE_pchan_bbone prefix.
2018-12-02 14:29:54 +11:00
2e392a0fdc Merge branch 'master' into blender2.8 2018-12-02 14:16:09 +11:00
c00e1f68e9 Cleanup: BKE_effect.h naming 2018-12-02 14:14:51 +11:00
e1b8645c6a Keymap: use strict format for keymap definitions
Ensure we use lists for keymap items and item properties.

This means scripts can access keymap definitions from other layouts,
manipulating them without sometimes encountering a tuple that needs
to be converted into a list.
2018-12-02 14:02:03 +11:00
a56b024964 Cleanup: simplify poll function 2018-12-02 14:02:03 +11:00
28b83b34d4 Fix T57455: Fix faulty gpu detection 2018-12-02 03:49:54 +01:00
7be9bf43a4 Cleanup: de-duplicate gpencil material UI
Top-bar and properties-editor were near duplicates.
2018-12-02 13:26:39 +11:00
4320adbf86 Cleanup: remove redundant gpencil material checks
Poll checks for an object, no need to check for non-object
materials in the draw function.
2018-12-02 13:12:06 +11:00
2c6f767452 Add missing include 2018-12-02 13:12:06 +11:00
40d0374411 Fix T57455: Laggy, freezing UI with Linux and Intel UHD 620
Seems like a driver bug but doing glFlush() before these calls fixes it.
2018-12-02 01:57:30 +01:00
8c620c8e2b Optimize ghash usage
Avoid double hash calculation.
2018-12-02 10:15:22 +11:00
d3940c2211 Fix button data access for python context menus
D4016 by @raa
2018-12-02 10:15:22 +11:00
5d4073e248 Fix T58460: Proportional edit icon disappears 2018-12-02 00:05:01 +01:00
783d8d4adf Workbench: Don't use alpha channel if not doing render
Lower Vram usage a bit
2018-12-01 20:38:52 +01:00
505309f659 WM: Optimization: Don't clear the window color buffer
This is not needed and is rather costly.

Can be reverted if that causes problem.
2018-12-01 20:38:52 +01:00
d55c269dd1 UI: Simplify the area border drawing
Instead of doing a lot of alpha blended drawing with jittering, use the
fragment shader to do the masking using a circle mask.

This is much simpler and requires much less resources.

Hopefully this may solve the issue we have with the Intels UHD Graphics 620
on linux.
2018-12-01 20:38:52 +01:00
6a80a786f8 Fix T58433: Limit Distance constraint distance not auto-computed.
Another case of a value that needs to be written back to non-COW copy.
2018-12-01 20:02:14 +03:00
18f0618677 Fix T58412: in weight paint + pose mode certain armature operations crash.
The cause is that FOREACH_OBJECT_IN_MODE_BEGIN assumed that the active
object is in the correct mode, which is wrong in this case. It also
only considered objects of the same type as active, which had to be
replaced with an explicit type parameter.
2018-12-01 19:44:24 +03:00
9ed522db73 Fix more cases of evaluated mesh being built for non-COW objects. 2018-12-01 19:09:09 +03:00
dbb479b998 fix: Collada exporter has similar issue as reproted in T58150 2018-12-01 15:38:18 +01:00
0606829850 fix T58293 Collada: Does not export Texture coordinates when option 'only selected UV Map' is enabled 2018-12-01 14:18:35 +01:00
02a4fc1395 Texture Paint: implement efficient face selection updates.
Fix the old code that propagates selection changes to the
evaluated mesh directly without rebuilding, and avoid tagging
DEG_TAG_COPY_ON_WRITE if it succeeds.
2018-12-01 15:40:48 +03:00
ee8a2edb96 Fix usage of mesh_get_eval_final in vertex selection.
It's a very bad idea to call this on non-COW instances - see T58150.
Also, when rebuilding mesh it's better to accumulate mask flags to
avoid possible repeated rebuilds from different users.
2018-12-01 14:46:55 +03:00
47ef301c76 Texture Paint: fix face selection with subsurface. 2018-12-01 14:38:11 +03:00
b0ec08cfa1 Texture Paint: emulate subsurf optimal display in paint mode wireframe.
The wireframe is intended for showing selected faces, and selection is
based on original faces, so the extra wireframe lines are pure noise.
2018-12-01 13:44:29 +03:00
3bd057d472 Texture Paint: fix wireframe and hiding not working with subsurf.
The editflag field is only valid in the original mesh instance.
2018-12-01 13:20:18 +03:00
bfcd25b313 Texture Paint: avoid rebuilding evaluated mesh on first stroke.
Ensure all relevant CustomDataMask bits are set during normal evaluation.
2018-12-01 12:12:35 +03:00
32d46f7de6 Fix camera gizmo sensor check
Also correct wrong but harmless assignment.
2018-12-01 19:57:43 +11:00
2699ababa9 Cleanup: style 2018-12-01 19:55:52 +11:00
40f45a7eac Cleanup: redundant NULL checks
Also use unsigned shifting for values not in int range.
2018-12-01 19:36:57 +11:00
0f5b53ba4d Revert "Win32: Use the nicer looking blender-drawn confirmation message box when"
This reverts commit 60d6eb0b5d.

There is already a full patch (D3118) by brecht for this, will leave it up to him.
2018-11-30 23:29:32 +01:00
597d425638 Cleanup: duplicate include 2018-12-01 08:29:26 +11:00
81f898f053 Merge branch 'master' into blender2.8 2018-12-01 08:19:38 +11:00
a9bd788348 Cleanup: style 2018-12-01 08:15:25 +11:00
60d6eb0b5d Win32: Use the nicer looking blender-drawn confirmation message box when
quitting with unsaved changes, instead of an ugly messagebox
2018-11-30 21:11:59 +01:00
0b50ce1db4 Fix file browsers thumbnail selection with tablet failing, after recent changes. 2018-11-30 19:18:24 +01:00
4e92cc2759 Fix T58244: Proportional editing center is wrong
The global center was not calculated at all. Now a center is calculated using the selected points
2018-11-30 19:04:39 +01:00
8d4da34883 Fix T58267: node socket grabbing not working well with box select tool. 2018-11-30 18:27:36 +01:00
ed5202ac6a Fix T58235: broken baking of tangent space normals. 2018-11-30 16:28:56 +01:00
cedbaec468 Annotation: Replace ALT key to CTRL for Eraser
This makes the keymap consistent with Grease Pencil.
2018-11-30 16:23:36 +01:00
fe28554898 StudioLight Editor: Add copy settings and overwrite prompt
Copy settings let users create variations more easily.

Ovewrite prompt is there to be able to edit already existing studiolight.
2018-11-30 15:40:57 +01:00
4251ab4675 StudioLight Editor: Fix defaults 2018-11-30 15:40:57 +01:00
9ccf27d1f7 StudioLight: Renaming stuffs 2018-11-30 15:40:57 +01:00
909fa08a76 StudioLight: Add a 4th light to adjust lighting
There was a bug due to non-aligned struct in the DNA that prevented us
to increase the size of the userdef light array.

Since the studio lights are now presets and stored in external files,
there is no need to keep backward compatibility with theses lights.

Remove the old array and create a new one.

Add blue tint light for specular.
2018-11-30 15:40:57 +01:00
856b858f88 Studiolight: Fix bad memcpy size 2018-11-30 15:40:57 +01:00
e68c0bf76a Workbench: Add Shadow Focus and change Shadow Orientation
Shadow focus let the user choose how hard are is the shadows transition.
Harder shadow transition can be used for stylistic effects or more uniform
shading.

Make shadow orientation respect the same orientation as the studio light
(view from +Y direction aka. front view). Make the default shadow direction
more similar to the default light position (the default light object, not
the default studio lighting).
2018-11-30 15:40:57 +01:00
dabd6615cc Fix T58150: crash in Texture Paint after changing selection in Edit Mode.
Texture paint code was retrieving the evaluated mesh from the
original object, which isn't supposed to happen, so the cached
mesh isn't properly cleaned up by Edit Mode toggle.
2018-11-30 17:11:50 +03:00
06df05a35b Merge branch 'master' into blender2.8 2018-11-30 12:16:19 +01:00
ed07bccf7c Fix missing "need eval data" for texpaint mode toggle op.
Note that am not sure that is actually needed, since switching to that
mode does not actually use any eval data, it's only needed during init
of first stroke... But in doubt, that won't hurt to have it here anyway.
2018-11-30 11:59:16 +01:00
180e871020 Cleanup: remove useless depsgraph parameter in some texpaint helper func. 2018-11-30 11:59:16 +01:00
84285c1e34 Fix T58275: WITH_OPENSUBDIV not enabled by default with some CMake versions.
Solution provided by Ulysse Martin.
2018-11-30 11:52:39 +01:00
8c01e71cda GP: Fix ALT key conflict with Eraser 2018-11-30 11:05:00 +01:00
ba4d920ab5 Fix Alt key conflict in Annotation Eraser
There was a conflict when the Alt key was pressed while drawing and this makes eraser very difficult.
2018-11-30 10:58:37 +01:00
a8c884c3ba Fix T58279: crush when load this scene _ with simple materials and simple objects.
Not sure why eevee's light_cache is NULL in that file, but this can be
handled gracefully instead of crashing. ;)
2018-11-30 10:45:16 +01:00
530e567578 Revert "3D View: locked camera was using the original view offset"
This reverts commit 3f31c28a02.

Gives issues zooming, could be resolved but it mostly worked OK before,
and it's not a priority to spend time on, so leave as is for now.
2018-11-30 19:01:06 +11:00
cff0dfea9a Be sure Annotations use default color and thickness
Depending of the last tool used, the Note layer was created when draw but it was using the wrong color and thickness.
2018-11-30 08:57:36 +01:00
d12461a9ba Merge branch 'master' into blender2.8 2018-11-30 18:16:21 +11:00
3f31c28a02 3D View: locked camera was using the original view offset
Now used the original dist instead, since using the distance between
the camera and the views offset may seem random from the users POV.

This addresses strange behavior noticed in T56934.
2018-11-30 18:15:06 +11:00
cb8afaf5db Merge branch 'master' into blender2.8 2018-11-30 17:07:59 +11:00
6e253fc627 Correct missing semicolon in recent commit 2018-11-30 17:07:13 +11:00
0f17425d6e Fix T58255: "Set Spline Type" missing in the menu 2018-11-30 16:40:39 +11:00
a760e73dcf Merge branch 'master' into blender2.8 2018-11-30 15:49:06 +11:00
6429e6c91e Cleanup: ensure '_END' macros end with a semicolon
Missing these breaks auto-indent for editors that don't expand macros.
2018-11-30 15:35:15 +11:00
Dalai Felinto
a687d98e67 Remove from Local View operator
This was the old, obscure, little known, M shortcut operator when in local view
back in the 2.7x days.
2018-11-30 02:28:41 -02:00
3612ce5579 Cleanup: name macros w/ matching BEGIN/END 2018-11-30 15:22:01 +11:00
8f8c238659 Merge branch 'master' into blender2.8 2018-11-30 15:11:32 +11:00
8c85f1316c Cleanup: name macros w/ matching BEGIN/END 2018-11-30 15:08:47 +11:00
c312cc171b Merge branch 'master' into blender2.8 2018-11-30 14:58:46 +11:00
28316493bd Cleanup: style 2018-11-30 14:56:20 +11:00
bae188bf46 Cleanup: duplicate include 2018-11-30 14:23:13 +11:00
0b044a4ab2 Cleanup: style 2018-11-30 14:23:10 +11:00
1119f1eb3b Fix sculpt app-template editing the users startup 2018-11-30 13:33:17 +11:00
7e21c99d05 PyAPI: add load_factory_startup_post handler
Needed so we can apply changes to the startup file,
only in the case when it's load loaded from a user-saved startup.
2018-11-30 13:33:13 +11:00
dc312609dd Merge branch 'master' into blender2.8 2018-11-30 13:24:17 +11:00
dd8469608b Cleanup: unused return arg 2018-11-30 13:21:12 +11:00
1965db2be2 Workbench: StudioLight: Fix worldspace rotation 2018-11-30 02:02:36 +01:00
6a4f5f6eb4 Workbench: Cleanups & Simplifications
* Move the curvature computation to the cavity pass: One can argue it's not
  the best performance wise (it gets a tiny perf pernalty if it is done
  alone without the ssao), but it make the code cleaner and reduce
  considerably the number of shader variation possible.
* Lower shader variation to 2^8 instead of 2^12
2018-11-30 02:02:36 +01:00
e1023014f4 GPUTexture: Add support for GL_R16 texture format 2018-11-30 02:02:36 +01:00
4c31bed6b4 Fix T57981: Crash entering sculpt mode 2018-11-30 11:46:42 +11:00
7ec5a68091 Fix T58240: mathutils.noise.voronoi crash 2018-11-30 11:22:17 +11:00
76a5e2abe3 UI: helpful text when favourites menu is empty 2018-11-30 10:44:39 +11:00
63c0653170 Merge branch 'master' into blender2.8 2018-11-29 23:54:30 +01:00
William Reynish
679b156756 Icons: uv-sculpt 2018-11-30 09:51:56 +11:00
4390101205 UI: move curve point/segment menus into header
Now matches mesh vertex/edge/face menu placement.

Also move some menu items to match mesh vertex menu.
2018-11-30 09:48:25 +11:00
a8b8da5567 Fix T58183: crash with CPU + GPU rendering after profiling changes.
Multi-device was not passing along profiler to the CPU.
2018-11-29 23:43:27 +01:00
b49a398baa Fix T58213: Crash w/ Vertex paint average 2018-11-30 09:29:30 +11:00
f81aeac2bc Docs: rename group -> collection 2018-11-30 09:10:40 +11:00
8c9d632128 Cleanup: de-duplicate default object tools 2018-11-30 09:06:36 +11:00
bb4e53faf2 Tool System: add tools for edit-mode surface 2018-11-30 09:02:11 +11:00
2a8f6946fe Docs: update quickstart for 2.8 2018-11-30 08:53:36 +11:00
6af997710b Merge branch 'master' into blender2.8 2018-11-30 08:39:59 +11:00
8ac2d85d2f Cleanup: trailing space 2018-11-30 08:38:25 +11:00
c754b2239c Fix T58196: Annotation thickness is 0
When the annotation is created by other tools, the thickness was set to 0
2018-11-29 22:34:59 +01:00
6dbc820633 Fix crash creating enum tooltips
Error from recent changes to shortcut display.
2018-11-30 08:03:30 +11:00
0487089c31 Enable annotations when GP object is selected.
Now when try to add annotation, if a grease pencil object is selected, first the object is unselected. This solution is not perfect but it's better than cancel the annotation.

Thanks Dalai for his help.
2018-11-29 21:59:57 +01:00
6cfed6d775 UI: Minor changes to studiolight user preferences 2018-11-29 21:52:36 +01:00
030f9d084d Workbench: Add button to go out of studiolight edit mode
This makes it more clean why you cannot choose studio lights in this mode.
2018-11-29 21:52:36 +01:00
4851ec7f19 Workbench: Add 4 default studio lights
Made by me. Not definitive, subject to change.
2018-11-29 21:52:36 +01:00
48a7785fd4 Workbench: Add option to have world space lighting in studio light mode
This option is per viewport.

Having view space shading make sense when working on isolated objects like
if you were holding them in your hands. But for entire scene work, it is
better to have the lighting fixed to have a better spatial representation.
2018-11-29 21:52:36 +01:00
844788a36c Workbench: Add back studio lighting presets
This changes a bit how the userprefs solid lights works. They are not
visible until enabling the "Edit Solid Light" checkbox. Once enabled the
current studiolight used for solid mode will be overwritten.

Once the lighting settings are tweaked, the user can click the
"Save as Studio light" button to save the current settings.
This makes it easy to create new lighting without messing the other
presets.

The studio lights are stored as ASCII files on the disk using a dead
simple custom format.

The UI/UX is not perfect and will be improved in other commits.

Also includes:
* Separate LookDev HDRI selection from Solid Lights
* Hide LookDev HDRIs from the Solid Lights selection list
2018-11-29 21:52:36 +01:00
8f4ab480bf Workbench: Rename orientation to type and Camera studio light to Studio 2018-11-29 21:52:36 +01:00
18c9101acc Templates: tweak sculpt to work w/o opensubdiv 2018-11-30 07:23:41 +11:00
23284e4dde add: visual studio Compiler warning (order of attribute init in c++ constructors) 2018-11-29 18:33:46 +01:00
e03eaf5b81 Fix wrong property name in preview render Python script. 2018-11-29 18:26:48 +01:00
3c767cecce add: visual studio Compiler warning (order of attribute init in c++ constructors) 2018-11-29 17:04:12 +01:00
26d5a3625e Texture Paint: fix artifacts when using masks with symmetry.
For most brushes, texture painting uses a special mask accumulation
table in order to ensure that the amount of added color only increases
when the same pixel is touched multiple times by the stroke.

Unfortunately, only the mask texture was added to the mask before
this check, while normal, stencil, texture alpha masks were applied
after this check. This means that the check can pass if e.g. the
pressure is increased, but the final mask value is actually lower.
One might think that the mask values are fixed per pixel, but with
symmetry that isn't true. The result is a nasty stripe artifact due
to the discrete cutoff nature of the accumulation test.

In order to fix this, apply all masks before accumulation.
2018-11-29 18:57:10 +03:00
43e7c5dd43 Bump version to 2.80 beta. 2018-11-29 16:50:01 +01:00
919503d204 New splash image for Beta.
This one focuses on the development fund campaign. We plan to do more
more splash updates during the Beta.
2018-11-29 16:50:00 +01:00
7c6fc8b275 Merge branch 'master' into blender2.8 2018-11-29 16:49:21 +01:00
1f5216c57a GP: Add option to draw primatives from center
This allows primatives to be drawn from the center using the ALT key.
Also fixes SHIFT constraint not working correctly in all directions.
Both options can be used together.

Differential Revision: https://developer.blender.org/D4009
2018-11-29 15:44:20 +00:00
2c154399a2 Fix internal compiler error when building with VS 2017 (15.9.3).
It doesn't like alignment for function arguments, and I don't think this
alignment is needed.

Solution found by Ray Molenkamp.
2018-11-29 16:42:52 +01:00
1c0bc19e3f Fix T57796: bad 'draw emitter' conversion, importing shared particle systems from 2.79b to 2.80
Not sure what those #ifdef's were supposed to do exactly... But one
thing is for sure, clearing that flag in particlesettings after first
encounter would prevent transferring it properly to other objects that
would use same particlesettings.
2018-11-29 16:25:23 +01:00
51c85a23ca Cleanup: mark PART_DRAW_EMITTER of ParticleSetting drawflags as dreprecated. 2018-11-29 16:25:23 +01:00
e6605d5f37 Fix depth offset in paint mode wireframe.
The original offset was wrong because it applied a constant to
homogenous coordinates (the actual depth is z/w), which broke
totally if near clip distance was reduced.

A correct depth offset has to take slope into account like
glPolygonOffset in order to avoid dotted lines caused by
interpolation precision variations. When drawing wire lines
however only the slope of the line itself is accessible, so
also generally increase the offset when the object is close.
2018-11-29 17:51:43 +03:00
4c2a3b4701 Fix T57878: 2.8 Opening project in Blender Crashes.
Crash was due to some modifier trying to access the editmesh of its
target just after loading, when that editmesh has not yet been
re-created...
2018-11-29 15:49:09 +01:00
3cc0eb36c3 Fix T58068: gizmo crash for bone on a disabled armature layer
Maniphest Tasks: T58068

Differential Revision: https://developer.blender.org/D4004
2018-11-29 14:28:43 +01:00
28d2058e2c Fix rotate around point under cursor 'seeing' hidden faces in paint modes. 2018-11-29 14:25:16 +03:00
fbb19bcaf9 UI: make Q key available for quick favorites in clip editor. 2018-11-29 12:23:51 +01:00
213414674b Fix T58105: Subdivision Set operator stuck in relative mode
Maniphest Tasks: T58105

Differential Revision: https://developer.blender.org/D4007
2018-11-29 12:21:20 +01:00
3aed46a6cf Fix T58100: Crash on bpy.context.object.visible_get()
Maniphest Tasks: T58100

Differential Revision: https://developer.blender.org/D4003
2018-11-29 12:17:03 +01:00
63521f57ed UI: put clip editor annotation panel in own tab in sidebar. 2018-11-29 11:57:06 +01:00
9888374f4b Transform: re-revert new user-axis-first behavior
This restores old behavior but leaves in new code
which is more flexible.

See: 6491d50d02 for feedback on why this isn't ideal.
2018-11-29 21:52:38 +11:00
4f997c0ebb Revert "Transform: use scene-orientation for MMB axis constraint"
This reverts commit 78a6c2e12c.
2018-11-29 21:52:38 +11:00
c007e3be72 UI: add back clip editor tool tabs until there is a toolbar. 2018-11-29 11:30:56 +01:00
8a92976254 Fix T57653: Fix T58075: Crash when switching between Edit and Sculpt/Paint modes.
Sculpt (and paint) modes rely on valid evaluated data at their initialization.

Added code to ensure that in `ED_object_mode_toggle()`, when relevant
toggle operator requires it (looks like sculpt/paint should be the only
ones affected, although particle edit may be too...).
2018-11-29 10:42:56 +01:00
f24147d459 Merge branch 'master' into blender2.8 2018-11-29 09:35:39 +01:00
b00819bcca Atomic: Avoid conflicts with definitions in other areas
While atomics library was trying to use "user-space" defined
LIKELY() and UNLIKELY(), this is not always true that user
code was checking for those macro coming from an unrelated
area.
2018-11-29 09:33:50 +01:00
068b61e5e9 UI: menu items for Ctrl-Tab dope sheet/graph switching
Make this shortcut discoverable.
2018-11-29 19:07:00 +11:00
9f2bc87e57 UI: update shortcut display to check space cycling 2018-11-29 18:45:37 +11:00
301e3155ec Keymap: cycle space-subtypes on successive presses
Some space types are exposed as multiple space types,
previously the key binding to set the space type would use the last
used space-type.

Now pressing the key again cycles to the next space sub-type.

Without this, shortcut display is confusing since some space types share
a key. Keymap display will need to be updated to support this.
2018-11-29 18:17:08 +11:00
8055871e5b UI: support enum key shortcut detection
Shows shortcuts in space-selector.
2018-11-29 17:32:35 +11:00
a740cc53ea Fix paint initialization, incorrect pointer checks 2018-11-29 15:19:29 +11:00
6e24dd9a1e Fix T58125: UV Editor transform fails 2018-11-29 14:45:48 +11:00
559fff160e Debug: Assert to ensure layer iterator uses a 3D view 2018-11-29 14:34:48 +11:00
9893fee4e6 Merge branch 'master' into blender2.8 2018-11-29 12:55:58 +11:00
140f2209b6 Cleanup: correct typo, no need for ./ prefix 2018-11-29 12:54:30 +11:00
2089feeb1b Fix leak in CPU brand check 2018-11-29 12:52:39 +11:00
535984a848 Cleanup: simplify transform orientation cycling
Remove dummy first index, store a pointer to the user orientation
instead of having it store twice (which could get out of sync).
2018-11-29 12:49:02 +11:00
7fa6f72084 Cycles: Add sample-based runtime profiler that measures time spent in various parts of the CPU kernel
This commit adds a sample-based profiler that runs during CPU rendering and collects statistics on time spent in different parts of the kernel (ray intersection, shader evaluation etc.) as well as time spent per material and object.

The results are currently not exposed in the user interface or per Python yet, to see the stats on the console pass the "--cycles-print-stats" argument to Cycles (e.g. "./blender -- --cycles-print-stats").

Unfortunately, there is no clear way to extend this functionality to CUDA or OpenCL, so it is CPU-only for now.

Reviewers: brecht, sergey, swerner

Reviewed By: brecht, swerner

Differential Revision: https://developer.blender.org/D3892
2018-11-29 02:45:24 +01:00
27cccaeccd UI: expand set origin in specials menu
Also remove menu, expand operator instead.
2018-11-29 12:24:20 +11:00
8850875866 Fix transform axis orientation cycling
This ignored operator defined orientation.
2018-11-29 09:41:44 +11:00
f1edccdbe1 Cleanup: remove unused files 2018-11-29 09:05:49 +11:00
b02696f855 CMake: add missing files 2018-11-29 09:01:03 +11:00
1e10206590 Merge branch 'master' into blender2.8 2018-11-29 08:55:34 +11:00
fb057153b0 CMake: update checker
Support skipping cmake files
2018-11-29 08:55:05 +11:00
67d77f47f0 Fix leak in CPU brand check 2018-11-29 08:22:15 +11:00
ce84d64546 UI: rename Center Points -> Origins
See: T56648
2018-11-29 08:19:57 +11:00
7ced3da6ac GP: Cleanup duplicated code moving to function 2018-11-28 20:15:02 +01:00
0f4cc474c9 Fix broken subdivision surface edit mode cage display. 2018-11-28 20:13:28 +01:00
bad0ace6a0 Fix COLLADA build warning.
This properties does not appear to be used anymore.
2018-11-28 20:06:25 +01:00
William Reynish
ec8e8562f0 Fix instancing tooltips still using old dupli name. 2018-11-28 20:06:25 +01:00
94a069a795 Startup.blend: rename Lamp to Light. 2018-11-28 20:06:25 +01:00
5c48b97e8c GP: Deselect points if click outside selection area
To make consistent with Left click select, now if click outside any point, all points are deselected.

Reduced the circle of selection to get more precission. The radius used before was too wide.

Note: There is a minimum distance to consider outside selection area.
2018-11-28 19:44:41 +01:00
303b49ea37 Add Onion Skin support to Annotations
The old onion skinning used in 2.7x has been ported and converted to 2.8. Only basic features have been included. For more advanced onion skin features, use grease pencil objects.

Onion Skin is supported in View 3D and Sequencer.
2018-11-28 19:19:53 +01:00
565de7750b Use term Instancing in the interface
Currently only see this in object's properties, but might
be missing something.

Part of T56648.
2018-11-28 18:22:51 +01:00
7c7f3776dd Use collection and instance terminology in Python API
This follows naming convention agreed on in T56648.
2018-11-28 18:22:51 +01:00
98ecab1af0 Fix T56906: Mesh from Curve not working on curves beveled by curves.
Not exactly sure why we did not have cached displist for bevel object
here... But anyway, that conversion operation should really happen
outside of depsgraph evaluation area, so makes sense to do it as when
generating geometry for rendering, imho. Also solves issues like loosing
hidden parts of the curve/surface, etc. Still using viewport resolution
for curves, though.
2018-11-28 18:16:48 +01:00
6d2da3950e cleanup: Collada replaced outdated usage of CD_MTFACE Layers by CD_MLOOPUV 2018-11-28 18:14:12 +01:00
91795e756c Merge branch 'master' into blender2.8 2018-11-28 18:05:59 +01:00
2b371b65bc More fixes for NUMA on macOS 2018-11-28 18:05:35 +01:00
11ff47a134 Merge branch 'master' into blender2.8 2018-11-28 17:57:37 +01:00
8a6aa15903 Fix compilation error on macOS 2018-11-28 17:57:04 +01:00
bef9f42ef0 Merge branch 'master' into blender2.8 2018-11-28 17:55:27 +01:00
547bc2a620 Fix compilation error on 32bit Windows 2018-11-28 17:54:58 +01:00
278d9c8322 Merge branch 'master' into blender2.8
Conflicts:
	source/blenderplayer/CMakeLists.txt
	tests/gtests/blenlib/CMakeLists.txt
2018-11-28 16:52:47 +01:00
c16321cb9d Fix building gtests and bplayer after recent NumaAPI addition.
Seriously... like, seriously...
2018-11-28 16:50:02 +01:00
6fd5f95ca1 Fix (unreported) Cycles not rendering correctly modified curves/surfaces/texts.
Meshes from evaluated objects may already have modifiers applied, but
that's not the case for curves, we need to do that when converting them
to meshes.
2018-11-28 16:25:15 +01:00
e392e03354 UI: Layout tweaks to Studio Lights panel in Preferences.
Move Studio Lights panel first, and use single-column layout.
2018-11-28 16:24:55 +01:00
2d720f51cd Workbench: Change Studio lighting
This is in order to have more flexible ligthing presets in the future.
The diffuse lighting from hdris was nice but lacked the corresponding
specular information. This is an attempt to make it possible to customize
the lighting and have a cheap/easy/nice-looking pseudo-PBR workflow.

* Add cheap PBR to Workbench with fresnel and better roughness support.
  This improves the look of the metallic surfaces and is easier to control.
* Add ambient light to studio lights settings: just a constant color added
  to the shading.
* Add Smooth option to studio lights settings: This option fakes the
  effect of making the light bigger making the lighting smoother for this
  light. Smoother lights gets reflected like a background hdri.
* Change default light settings to include the smooth params.
* Remove specular highlights from flat shading. (could be added back but
  how do we make it good looking?)
* If specular lighting is disabled, use base color without using metallic.
* Include a lot of code simplification/cleanup/confusion fix.
2018-11-28 15:59:56 +01:00
52458ab49d GPU: Add AMD Radeon RX series to macos blitting workaround list
Fixes T55987
2018-11-28 15:59:56 +01:00
dd102a4757 fix:T58093 Collada Exporter does not create bind_vertex_input and texcoord attribute
The Collada exporter used MTFACE layers (deprecated) instead of
CD_MLOOPUV layers. In 2.8 the exporter could no longer find the UVMaps
reliably.
2018-11-28 15:36:09 +01:00
3ed0d5b4d4 Merge branch 'master' into blender2.8 2018-11-28 14:42:38 +01:00
ce927e15e0 Tweaks for threading schedule for Threadripper2 and EPYC
The idea is to make main thread and job threads to be scheduled
on CPU dies which has direct access to memory (those are NUMA
nodes 0 and 2).

We also do this for new EPYC CPUs since their NUMA nodes 1 and 3
do have access but only to a higher range DDR slots. By preferring
nodes 0 and 2 on EPYC we make it so users with partially filled
DDR slots has fast memory access.

One thing which is not really solved yet is localization of
memory allocation: we do not guarantee that memory is allocated
on the closest to the NUMA node DDR slot and hope that memory
manager of OS is acting in favor of us.
2018-11-28 14:41:22 +01:00
b3e2c69416 Add utility function to query CPU brand string 2018-11-28 14:35:26 +01:00
683662e630 Add cross-platform NUMA library
Makes it simple to use NUMA libraries on various platforms.
2018-11-28 14:35:26 +01:00
2bd62b076f Outliner/visibility: revert changes for now until we find better solutions.
See T57857 for discussion. This reverts:

"Outliner: Do not gray out empty collections"
4521d3e707.

"Remove eye column from the outliner"
fd16b35997.

Fix/workaround issues in pose and edit mode"
6d2e2e30d5.

"Per view-layer collection visibility"
4de6a210c6.
2018-11-28 14:34:13 +01:00
cb9c4b4552 Fix defined but unused static variable warning 2018-11-28 14:13:42 +01:00
dac747bd09 UI: rename settings back to preferences.
This distinguishes it better for the many other types of settings.

Ref T54115.
2018-11-28 13:58:35 +01:00
1a8d998868 Tool System: support for dynamic tooltips
Tools can define a function that generates the tooltip using a function,
this takes the tools keymap as an argument which can be used
to extract keys to include in the tip.
2018-11-28 23:53:27 +11:00
43248164a4 PyAPI: add KeyMapItem.to_string() method
Useful for generating dynamic tooltips that include shortcuts.
2018-11-28 23:26:32 +11:00
edbf15d3c0 Defaults: left click select is now the default.
A few reasons motivating this change:
* It works well for all devices: mouse, trackpad, and tablet pens.
* For beginners or users coming from other software, it's easier to get
  started and avoids an initial stumbling block.
* Many users in 2.7 (about half?) were already using left click select, so
  combined with the above advantages it makes for a practical default.

Note that we continue to support right click select, as many experienced
Blender users (and developers) see efficiency advantages in this approach.

The option to switch is in the first time setup splash screen, and in the
user preferences.
2018-11-28 11:36:13 +01:00
9c8d31520d Fix curve stats when using modifiers.
Curve/surface/text final data may be an evaluated mesh instead of a
displist, when some modifiers (constructive ones in particular) are
applied to it.

Note that this is just getting feet wet, whole draw code suffers from
the same issue! :P
2018-11-28 11:21:56 +01:00
6d2e2e30d5 Fix/workaround issues in pose and edit mode
Edit mode was unable to select, pose mode was unable to move bones.
2018-11-28 10:36:07 +01:00
ff0a29df14 Fix crash entering editmode 2018-11-28 20:26:40 +11:00
78a6c2e12c Transform: use scene-orientation for MMB axis constraint
Follows the change made for axis keys.
2018-11-28 19:48:19 +11:00
7ecdcfe173 Cleanup: quiet keymap float compare warning 2018-11-28 17:50:44 +11:00
c527c78174 Cleanup: remove missing operator from UI 2018-11-28 17:48:26 +11:00
b1d67e6aab Tool System: add node links cut tool 2018-11-28 17:37:40 +11:00
c2863326af Cleanup: correct assert, remove redundant NULL checks 2018-11-28 17:20:23 +11:00
ca05985ca7 Gizmo: fix compositor node crop w/ negative rectangles
min/max could be negative, causing the gizmo to fail.
2018-11-28 17:02:03 +11:00
62edc31d34 Cleanup: correct function signatures 2018-11-28 16:21:24 +11:00
0c8a7069b5 Fix assert opening file selector 2018-11-28 16:20:57 +11:00
Dalai Felinto
4de6a210c6 Per view-layer collection visibility
We still control this in the viewport collections visibility menu. But
now we are actually changing the visibility of the collections, not of
the objects.

If a collection is indirectly invisible (because one of its parents are
invisible) we gray it out.

Also if you click directly in the collection names, it "isolates" the
collection by hiding all collections, and showing the direct parents and
all the children of the selected collection.

Development Note:

Right now I'm excluding the hidden collections from the depsgraph.
Thus the need for tagging relations to update.

If this proves to be too slow, we can change.
2018-11-28 02:33:04 -02:00
Dalai Felinto
4521d3e707 Outliner: Do not gray out empty collections
We can still have a special icon for them, but graying out is not the way to go.
2018-11-28 02:33:04 -02:00
Dalai Felinto
fd16b35997 Remove eye column from the outliner
To control per-viewlayer, per-object visiblity users should either use
the menu or the H shortcuts (H, Alt+H, Shift+H).

Following next will be to have proper per-viewlayer collection
visibility. This will replace the functionality currently at the
viewport collections visibility menu.
2018-11-28 02:33:04 -02:00
b5ba5a0b94 Correct error clearing runtime tool in recent commit 2018-11-28 14:11:10 +11:00
b58d4e7fe4 WM: remove tool initialization code
Area initialization handles these cases now.
2018-11-28 13:58:53 +11:00
ba8c21989c WM: avoid re-initializing tools while resizing areas
Every update caused the gizmo to be recreated.
2018-11-28 13:50:15 +11:00
dcf0860dab Fix tool not being initialized switching windows 2018-11-28 13:41:36 +11:00
5429536904 RNA: disable animating sequence channel, lock 2018-11-28 12:16:24 +11:00
3377241f1e Scene: 3D cursor rotation wasn't initialized 2018-11-28 11:50:46 +11:00
4c6e7ef11f Missing from last commit 2018-11-28 11:27:06 +11:00
43512b06b3 Cleanup: remove unused app-template flag 2018-11-28 11:24:45 +11:00
36da85ebeb Cleanup: style 2018-11-28 11:24:45 +11:00
Dalai Felinto
37b882982a Local View: Objects to be selected once back to regular view
They were already selected, but we needed to bump depsgraph.
2018-11-27 22:17:59 -02:00
1b870bce85 Tool System: remove custom tool registration
API is not ready for beta (likely to change).
2018-11-28 10:40:02 +11:00
6491d50d02 Transform: default to user-defined orientation
Previously we tried this but reverted (see 64d40c82c3)
because there wasn't a predictable set of keys to use global-space.

Now the keys are swapped:

- 'GX' always transforms in the user defined orientation.
- 'GXX' always transforms in global space.

As before 'GXXX' cycles back to disabling constraints.

This does have a down side that GXX won't be used for local-space
when the user has global space set.
Also, when global is the user-orientation, pressing GX and GXX
does the same thing.

Note: examples here use GX but could be any transform-mode/axis.
2018-11-28 10:15:02 +11:00
437d7d7cb9 UI: Reduce amount of padding between VSE channels.
Suggested by cezarfarias on RightClickSelect. Code snippet by MalDuffin.
2018-11-27 23:25:48 +01:00
9d535f7ce8 Print filepath in message when saving userprefs
Was just printing 'ok' on success.
2018-11-28 08:35:37 +11:00
c28fe9c304 transform_snap_object: Fix snap in edit mode.
Do not use the texture space of a mesh to pretest the snap.
(The texture space is only really updated when you exit edit mode).
2018-11-27 18:24:22 -02:00
3f33b4573d Keymap: Change default spacebar action to play
This has been a contentious topic: Artists at the Blender-Studio prefer
this behavior, while the user community overwhelmingly prefers 2.7x
operator search. Previously this defaulted to accessing tools
(eg: Space-T activates transform.. Space-R rotate etc) which I still
believe is a better long term default - otherwise we don't have
efficient tool switching for a system we intend to make more use of,
nevertheless as far as I can tell users haven't been keen on adopting
this so far. Show the preference on the setup screen since many users
don't animate and will may want to quickly search or switch tools.
2018-11-28 08:00:04 +11:00
9d4129eee6 Modifiers: fix bunch of missing 'self transform' deg relations.
When a modifier depends on some other object's position, then it also
depends in its own position, this has to be also told to depsgraph.

Fixes several modifiers where moving target would update the modifier,
while moving modified object itself would not.
2018-11-27 21:17:06 +01:00
0ebb632f69 Fix missing reset-to-NULL in own recent changes in modifiers utils. 2018-11-27 21:17:06 +01:00
013a5c8b77 MOD_wave: fix various issues.
Missing dependsOnNormal callback, potential usage of NULL mesh
pointer, style...
2018-11-27 21:17:06 +01:00
930a3813fe Shrinkwrap: minor simplification of code. 2018-11-27 21:17:06 +01:00
1f1ea26d8c Fix typos. 2018-11-27 21:17:06 +01:00
2a578b37b3 Modifiers: cleanup/harmonize deform modifiers code re. mesh source.
Also fixes a few issues (like meshdeform's EM variant not using editmesh
data), and adds a few optimizations (like only generating that source
mesh when we do have a vgroup defined in parameters, for modifiers only
using it to access vgroup)...
2018-11-27 21:17:06 +01:00
22e6ae11b4 VGroup search: do not try to search for empty string.
Vgroups always have a non-empty name, this is just loss of time...
2018-11-27 21:17:06 +01:00
b4087ea639 Modifiers: Refactor MOD_deform_mesh_eval_get() helper a bit.
Now that function also takes expected number of vertices, and do the
checks against generated mesh internally.
2018-11-27 21:17:06 +01:00
4543da6ca6 MOD_simpledeform: do not compute mesh when not needed.
Related to T57972.
2018-11-27 21:17:06 +01:00
c89bb6f165 MOD_smooth: do not compute mesh when not needed.
Related to T57972.
2018-11-27 21:17:06 +01:00
9c82cc5123 MOD_smooth: do not compute mesh when not needed.
Also fixes potential memory leak.

Related to T57972.
2018-11-27 21:17:06 +01:00
bd957435ac Cleanup: tweak ED_region_is_overlap checks 2018-11-28 06:31:13 +11:00
0ed4cadf5a Docs: use float in bpy.app.timer examples
Makes it clear seconds are not integers,
also avoids conversion to float.
2018-11-28 06:09:42 +11:00
Dalai Felinto
e9875fc82c Fix local view undo (T58051)
Like in 2.7x we don't restore the previous view zoom.

This goes along the fact that we don't store viewport navigation
transformations either.
2018-11-27 16:50:07 -02:00
Dalai Felinto
9c546c70d7 Fix localview duplicated objects not in localview
Following the behaviour present in Blender 2.7x, where if you duplicate
an object it will show in all the local views the original object was
visible.
2018-11-27 15:11:25 -02:00
365a5b75c1 Partial fix for T57868, crash when using bevel from Python.
These changes are necessary. Need to mark vertices of edges passed
in geom; also the normals.out slot has a custom element type, not
ELEM, so need to prevent attempt by python code to convert it to
an elem.  But this leaves a memory leak. I will rework code to not
use normals.out slot at all, but that's a bigger fix.

Now there is a crash in a different place (GPU code). Think that if
using Op on its own (instead of from edbm_bevel_calc, there needs to
be a dependency graph update and maybe more?
2018-11-27 09:59:03 -05:00
1d4ad68198 Workbench: Fix crash when enabling cavity 2018-11-27 15:08:35 +01:00
86e88df03c Fix outliner click select with tablets, after recent changes. 2018-11-27 15:04:42 +01:00
b71006ceed Fix T58088: OpenSubdiv not enabled by default in macOS builds. 2018-11-27 14:40:25 +01:00
a80ddb7f9a Fix file browser click to select not working on tablets, after recent changes.
The highlight on mousemove operator should not swallow events.
2018-11-27 14:21:04 +01:00
0217af2f99 UI: Bring back User Preferences entry in Editors list.
It's nonstandard and kind of weird, but it's nice when making keymaps, themes, quickly test things without spawning a new window.
2018-11-27 14:19:06 +01:00
32ab0647a5 DRW: Implement Hair Weight drawing
Fixes T57931 Particle weight edit mode is not supported.

There is a bug that prevent refresh of the toolsettings on which is based
the weight / non-weight display selection (see T58086).
2018-11-27 13:49:22 +01:00
4c1a01d1a0 fix: Collada Exporter: improve usage of viewlayer and depsgraph
* The exporter now gets the view layer from the context
  instead of the depsgraph.
* The depsgrap is now fetched only on demand since the graph
  is not always needed for exporting (currently only for armature exports).
2018-11-27 12:22:30 +01:00
dcb86689b0 Python API Docs: Examples for new timer api 2018-11-27 11:31:48 +01:00
39dcf6a10a make node editor tool region background transparent
followup to rB1944bca49a22c18b059d84daf56908b6e15591ad

Differential Revision: https://developer.blender.org/D3999
2018-11-27 11:09:56 +01:00
00d438639d Fix T57929: missing UI updates when changing active object
was caused by NC_SCENE notifier being skipped with a non-scene reference
showed e.g. in timeline not updating keyframes/cachelines

Maniphest Tasks: T57929

Differential Revision: https://developer.blender.org/D4000
2018-11-27 11:07:44 +01:00
884638494d Python API: Fix partial build
`gpu_extras` was always visible
2018-11-27 10:56:37 +01:00
47bf0a33ef Fix T57070: Take Two of 2.8 Crash in sculpting mode with tilling and Dyntopo.
Accessing ob->bb directly is not a good idea anyway.

Still, would like to know why/where this bbox is freed, since it is
allocated at least once by depsgraph eval, as part of
`BKE_object_handle_data_update()` function...
2018-11-27 10:43:01 +01:00
1944bca49a Tool System: use tools for node editor 2018-11-27 18:43:08 +11:00
1f8360171c Keymap: share annotation tool keymaps between spaces
Not sharing caused duplication in the keymap and
required a factory class generator.

Simplify tool & keymap definitions by sharing them.

It's highly unlikely we will ever want these to use different keys
once they're set as the active tool.
2018-11-27 17:52:15 +11:00
a58f0eea4f RNA: expose access to B-Bone shape data from Python.
B-Bone shape is a non-trivial computation, so access to
the results would be useful for Python scripts working with
B-Bones, e.g. rig generation.

This exposes both final segment matrices, and the tangent
vectors computed from the custom handle bones.

Since the handle tangents use the axis+roll orientation math
of edit bones, add matrix conversion static methods to Bone.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3983
2018-11-27 09:31:34 +03:00
fe65867c3d WM: add print for missing tool keymap
Also correct function name (gizmo -> tool).
2018-11-27 17:06:43 +11:00
09f97f937d Cleanup: move non-toolbar panels out of the toolbar 2018-11-27 15:25:52 +11:00
030830be9a Revert "Fix texture space not updating in edit mode."
This reverts commit 3a038db576.

Caused CoW crash switching from edit to sculpt mode.
2018-11-27 14:18:44 +11:00
6fcaa5de06 Revert "Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion."
This reverts commit e6322abad2.
2018-11-27 14:17:54 +11:00
b201196c2e Keymap: restore 3D view center w/ cursor (Shift-C)
Pablo Vazquez requests this back, an quick way to reset the cursor.
2018-11-27 13:26:39 +11:00
a2a0ad74c3 Keymap: 3D view center to cursor operator
Addition to Alt-MMB-Drag orbit,
Alt-MMB-Click centers the view on the mouse.
2018-11-27 13:26:39 +11:00
1752d9f3f9 Keymap: add preference for spacebar to run operator search 2018-11-27 13:14:09 +11:00
83821f698a UI Theme: Transparent toolbar for UV/Image Editor and consistency tweaks.
Spotted by the community during a live stream!
2018-11-27 02:18:25 +01:00
da46580026 UI: Fix Set Origin via Specials menu not prompting options. 2018-11-27 02:18:25 +01:00
26b1aa9943 Fix T58062: Missing redo panel 2018-11-27 11:52:56 +11:00
621405ee0f Merge branch 'master' into blender2.8 2018-11-27 11:41:33 +11:00
9a5df92c1b Fix T56872: Edge slide gives invalid normals
Add the ability to skip overwriting normals.
2018-11-27 11:40:32 +11:00
Dalai Felinto
b205cb369a Silence warning (potentially misused twidth) 2018-11-26 21:54:29 -02:00
Dalai Felinto
8e65e38649 Font textbox overflow: Different methods
Sometimes the text doesn't fit. What to do in this case?

* Overflow: The default behaviour still is to overflow the text.
* Truncated: If any text box is defined we can also not draw the text
  that goes outside the text boxes.
* Scale to Fit: For single-text box texts we can scale down the text until
  it fits.

To support textboxes we are bisecting the scale until we find a good
match. Right now the hardcoded iteration limit is 20, and the threshold 0.0001f.

An alternative in the future would be to tackle this by integrating existing
layout engines such as HarfBuzz.

Note: Scale to fit won't work for multiple text-boxes if any of them has
either width or height as zero.

Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D3874

Feature development sponsored by Viddyoze.
2018-11-26 21:47:33 -02:00
63db89b5c1 Fix crash iterating over empty view layer 2018-11-27 10:26:58 +11:00
3c76751a68 fix: Collada exporter: take care of parent inverse for exports of Armatures with child objects 2018-11-26 23:14:46 +01:00
c99f18a787 Fix: Collada Importer: Keep bindinfo option is not properly handled
Actually the option was not at all used and the importer always created the bindinfo custom properties.
2018-11-26 23:14:46 +01:00
65874d3f33 fix: Collada: The limit precision option does nothing 2018-11-26 23:14:45 +01:00
f753fd1779 GP: Correct Tonemapping for Blend Layers 2018-11-26 22:52:28 +01:00
26df95cff6 GP: Make Multiply blend works with opacity 2018-11-26 22:20:06 +01:00
fb262f942e Cleanup: style, includes 2018-11-27 08:01:54 +11:00
0b0322099c Fix T57930 : Wrong hair shading in particle edit mode
Implement strand selection visualisation but without any shading.

I think this is not the overlay job to draw the strands shaded.

We can already view the children strands shaded for now but we might add
an option to draw the shaded strand instead of (or in addition to) the
guide strand.
2018-11-26 21:25:33 +01:00
aac2eba1aa DRW: Cleanup: Fix missing uniform warning in curve edit mode 2018-11-26 21:25:33 +01:00
14ea3130ee DRW: Hair: Fix hairs not working properly with duplis
Fix T55355 Instanced hair not working well for EEVEE and workbench
2018-11-26 21:25:33 +01:00
408cdf0cba DRW: Add access to object dupli parent 2018-11-26 21:25:33 +01:00
15add11595 MOD_shrinkwrap: do not compute mesh when not needed.
This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Note that surface_project and subsurf option also need more work at some
point, but this is probably not that urgent for now.

Also, use MOD_get_vgroup() helper in modifier code itself and pass
resulting MDeformVert & index to BKE_shrinkwrap's `shrinkwrapModifier_deform()`,
this is simpler and avoids duplicating vgroup handling code.

Related to T57972.
2018-11-26 21:07:50 +01:00
ede994c314 MOD_curve: do not compute mesh when not needed.
This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Also, use MOD_get_vgroup() helper in modifier code itself and pass
reluting MDeformVert & index to BKE_curve's curve_deform_verts(),
this is simpler and avoids duplicating vgroup handling code.

Also fixes crash when used on lattice.

Related to T57972.
2018-11-26 21:07:50 +01:00
8cd5edf850 MOD_cast: do not compute mesh when not needed.
This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Also fixes crash when used on lattice.

Related to T57972.
2018-11-26 21:07:50 +01:00
c1adf938e6 Timer: Generic BLI_timer with Python wrapper
There is a new `bpy.app.timers` api.
For more details, look in the Python API documentation.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3994
2018-11-26 20:25:15 +01:00
d5778b5bc1 UI: rename "OpenGL" render engine to "Workbench".
Neither is very descriptive for its task, but at least workbench is more
future proof and distinguishes it from Eevee.
2018-11-26 19:05:37 +01:00
d92e9a4a25 Fix broken face select in paint modes with RMB select. 2018-11-26 18:46:46 +01:00
7d32d87a86 Viewport: implement hiding faces in paint modes.
In 2.79 hiding works in paint modes with selection enabled,
so it is a missing feature. This implements it in texture
paint overlays and in workbench base shading.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D3989
2018-11-26 20:26:29 +03:00
99f7934e19 GP: New Blend Layers functionality
Now it's possible define the blend mode between layers including the option to clamp the layer using underlying layers.

Also a new Simplify option has been added to disable blend layers.
2018-11-26 18:12:39 +01:00
c0816cd03b Workbench: Add Curvature overlay for better visibility of surface detail for e.g. sculpting
The approach is fairly simple, just apply an edge detection filter to the view normal and scale the brightness based on that.

The overlay is disabled at object boundaries to avoid dark lines around objects.

Generally, this implementation follows the proposal of @monio at https://blender.community/c/rightclickselect/J9bbbc.
The changes are:
- Dynamic filter radius (on high-DPI displays, a radius of two is used)
- Options to reduce the strength of both ridges and valleys
- Tweaked function for the strength reduction (the original method actually had a local maximum, resulting in a brighter line inside valleys)
- Multiplication for blending instead of overlay, which doesn't work reliably with scene-referred intensities
- Renamed to point out the distinction between it and the SSAO-based cavity overlay

Reviewers: jbakker

Reviewed By: jbakker

Subscribers: billreynish, manitwo, linko, monio

Differential Revision: https://developer.blender.org/D3617
2018-11-26 17:31:18 +01:00
9238b7308a Fix view layer set in the outliner of child window not syncing to parent window. 2018-11-26 16:57:59 +01:00
cacff6ad27 Keymaps: for LMB keymap, add ctrl+LMB to select bones in weight paint mode. 2018-11-26 16:28:10 +01:00
b711be9b99 Keymaps: don't do CLICK event when PRESS was already handled.
This fixes conflicts where the tool and editor keymap use different event
types. Tools need to be able to mouse buttons on PRESS without triggering
CLICK events in the editor keymap.
2018-11-26 16:17:22 +01:00
9abcf56fa8 Enable OpenSubdiv modifier by default
This commit makes it so that subsurf/multires modifiers will respect
the WITH_OPENSUBDIV option. The WITH_OPENSUBDIV_MODIFIER option is
now gone.

For artists it mean that subsurf modifier will behave same as it is
planned for 2.80. Multires will now support sculpting, but it has some
known limitations. Those will be worked on before the final release.

If OpenSubdiv is disabled, no subsurf/multires functionality will
present.

For the details see:

  https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Modeling#Subsurf.2FMultires
2018-11-26 15:41:37 +01:00
e6322abad2 Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion. 2018-11-26 11:02:14 -02:00
bb52ef4ee9 Hide OpenSubdiv compute device
That is only used by GPU side of OpenSubdiv, which was not yet
brought back.
2018-11-26 14:21:58 +01:00
e7662ea257 Keymaps: keep Select Box as default tool. 2018-11-26 13:53:09 +01:00
68c7553dd9 Fix gizmos not using same tweak threshold as other places.
The low hardcoded threshold made clicking on the navigation gizmo difficult
on tablets.
2018-11-26 13:46:44 +01:00
18103c9ec2 UI: expand tooltips for left/right click select. 2018-11-26 13:29:12 +01:00
fea3451cf2 Fix inverted texture paint overlay display icons. 2018-11-26 14:52:24 +03:00
c8ad4c1a62 Defaults: set "release confirms", for transform tweak with single click and drag.
The old behavior with two clicks evolved out of a gesture system, and it can
have some advantages if you want to press more keys to constrain for example. But
this seems a better default.
2018-11-26 12:18:28 +01:00
0970ed0550 Merge branch 'master' into blender2.8 2018-11-26 12:00:36 +01:00
acd1d1a31d CMake: Remove Cycles specific OpenSubdiv options
Just use one flag which enables OpenSubdiv globally for all the
areas of Blender.
2018-11-26 11:41:38 +01:00
3a038db576 Fix texture space not updating in edit mode. 2018-11-26 07:32:04 -02:00
9d7b767dd7 transform_snap_object: fix ray_start_correction in snap to edit_mesh. 2018-11-26 07:32:03 -02:00
36429a5bc9 Fix T56167: Crash when extruding + snap to face.
This is a local fix.
The problem with duplicate looptris still remains.
That is, it can still be released in one place but not upgraded in the other.

(note: setting the looptris to NULL in the evaluated mesh and assert whether it is still NULL when the mesh is freed could indicate where those cases are).
2018-11-26 07:32:02 -02:00
33cbcd7344 Fix T57985: Out of the edit mode, the texture space is affected by the modifiers of a mesh.
Go for the simple solution for now (disable auto-texspace in evaluated mesh).
Proper fix would be part of known TODO redesign of bbox handling.

Solution suggested by @sergey, thanks!
2018-11-26 10:31:02 +01:00
3919f99354 Fix T58032: particle children 'Use Clump Curve' crash
Maniphest Tasks: T58032

Differential Revision: https://developer.blender.org/D3988
2018-11-26 09:20:37 +01:00
945fddc4be UI: collapse redo panel by default
For some operators this fills a lot of vertical space,
users can expand it if they need.

Also remove workaround for T56752 (now fixed).
2018-11-26 17:44:33 +11:00
16c46aabad Correct last commit
Initial display was fixed, broke refreshing.
2018-11-26 17:43:23 +11:00
59e8d532d9 UI: fix glitch showing redo panel
There were still cases it would show for the first time w/o content.
2018-11-26 17:29:02 +11:00
aa2079bad3 Fix crash accessing mesh.point_normals default
This memory needs to be static,
in this case the argument isn't needed so remove it.
2018-11-26 16:28:00 +11:00
10bded145d Keymap: use 'W' key for select toolbar shortcut 2018-11-26 16:10:00 +11:00
c906cdc197 Cleanup: remove unused code & add comments 2018-11-26 16:07:03 +11:00
f968256b42 Fix T58027: Scene.ray_cast crash
Reintroduce BASE_VISIBLE_BGMODE

D3987 by @Soundwave
2018-11-26 15:52:10 +11:00
a46290aaa8 Fix object selection in edit-mode
Ctrl-RMB in edit-mode is needed for setting vertex parent.
2018-11-26 15:28:59 +11:00
2b07c31fcf Fix proportional edit-mode w/ multi-object editing
D3992 by @Al
2018-11-26 14:20:51 +11:00
7493848008 3D View: remove 3D cursor
Use 3D cursor from the scene (was previously used for local-view).
2018-11-26 14:02:09 +11:00
b4e037fe14 Fix extended shading pie menu not having same order as before. 2018-11-26 01:01:00 +01:00
48b0695806 Cleanup: unused vars, imports 2018-11-26 09:27:25 +11:00
a0cde8ed08 Cleanup: unused vars 2018-11-26 09:26:38 +11:00
cb66a28d82 Cleanup: unused vars, imports 2018-11-26 09:26:15 +11:00
24c383cfc4 Fix some errors in the Blender Light theme. 2018-11-25 20:37:54 +01:00
356d450b64 Fix missing versioning code for user preferences navigation bar. 2018-11-25 20:35:41 +01:00
43325e98da Tools: add Select tool, with transform tweak on drag and no click delay.
For users that want the 2.7 LMB keymap behavior, this provides a way of
working without tools interfering. For RMB select this operator is quite
redundant with the Cursor tool, we may have to find a solution for that.

Note that we also might later add transform tweak to the transform tools,
when nothing is selected. But this is important for existing users who
preferred the existing workflow.
2018-11-25 20:09:43 +01:00
e840f0a90b Keymaps: add 3D view click empty space to deselect all.
The implementation of this operator was modified to be more efficient and
ensure the undo history has the exact operator used.
2018-11-25 20:07:47 +01:00
7051a95516 Cleanup: Silent compiler warning
A void function cannot return a value.
2018-11-25 20:00:44 +01:00
Julian Eisel
6c704b4632 UI: Disable font shadow in tooltip
When I added this a few years ago, it was meant to create a fake bold effect.
With the new text shadow drawing code, that doesn't work well though.
2018-11-25 19:51:15 +01:00
b7e02c677d Fix mesh_build_data() calling mesh_finalize_eval() before copying texspace.
mesh_finalize_eval() may set ob->data to evaluated mesh, needs to be
done *after* call to BKE_mesh_texspace_copy_from_object(), else that one
is meaningless.

Related to investigations on T57985, but does not solve it at all. :(
2018-11-25 18:49:57 +01:00
2b97a250f6 Cleanup: remove useless redundant NULL check. 2018-11-25 18:49:57 +01:00
5f6fae9ad0 Fix T57070, T57389, and other bbox-related issues with meshes.
Thinks whole bbox code needs a complete rewrite, one can see a lot of
old history in it, it has way too many functions doing
nearly-the-same-thing(c), it spreads in very inconsistent ways across a
lot of files, ... But have no time for this right now, and would not be
a good idea with Beta comming up close anyway.

So for now going the simple and (hopefully) sane & safe way: forbid
object-level functions to affect data-level bbox. Mesh and curve ones
would generate bbox in obdata instead of object, for some reason (all
other obdata types only use object's bbox ever). That may have been
working in old ages, but with CoW and threaded depsgraph this is just
calling for piles of issues.
2018-11-25 18:49:57 +01:00
Julian Eisel
5e5db7db89 UI: Disable font shadow in tabs
This was used to fake a 3D look, however that doesn't work well with the new,
flat style. It just made text appear blurry.
2018-11-25 18:35:48 +01:00
Julian Eisel
b00963afc1 UI: Initial User-Preferences redesign
Implements the first changes for T54115:

* Rename "User Preferences" window to "Settings" in the UI.
  We'll likely put workspace settings in there, separate from the global
  user settings. System settings should become separate from user
  settings in future to allow settings for specific hardware.
* Add sidebar region for navigation (scrolls independently).
  Addresses space problems, so we can add more categories as needed now.
* Increase size of Settings window to compensate new navigation bar.
* Group sections into User Preferences and System.
  Icons for section groups by Andrzej Ambroz. Thanks!
* Bumps subversion for file compatibility.

Screenshot: https://developer.blender.org/F5715337

I also added categories for future work, but commented them out.
We may also want to redesign contents of each section now.

Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3088
Design Task: https://developer.blender.org/T54115
2018-11-25 17:08:58 +01:00
3135ed376b Texture Paint: prevent normal angle masking duplicating backface culling.
If backface culling is off, the user obviously wants to paint on
back faces, so the normal angle cutoff designed to prevent painting
at glancing angles shouldn't do the culling as a side effect.
2018-11-25 18:51:36 +03:00
Dalai Felinto
4c3ed98ca2 Local View
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.

We are using both the numpad /, as well as the regular /.

Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
  (probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.

The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
2018-11-25 09:50:34 -02:00
e60c49ecf0 Use orig_pchan when searching for the original copy of a constraint. 2018-11-25 10:59:40 +03:00
7e9389b83d Fix box select of edges not working when box does not fully contain edge. 2018-11-25 02:12:48 +01:00
f48a089db8 Addons: enable GLTF 2.0 addon by default. 2018-11-24 23:59:25 +01:00
a2e209f20a Merge branch 'master' into blender2.8 2018-11-24 23:44:17 +01:00
33750e8abb Fix T58006: smart UV project island margin should not use length units.
This distance is in UV space, not world space.
2018-11-24 23:43:03 +01:00
487af39c99 Sequencer: remove unnecessary limit on transform rotation. 2018-11-24 23:43:03 +01:00
7c19d9e9af Fix X11 tablet pen and eraser distinction being wrong in some cases.
This extends the earlier fix to use the latest logic from Wine's wintab.c,
to better handle eraser detection.
2018-11-24 23:24:32 +01:00
13fa509187 Merge branch 'master' into blender2.8 2018-11-25 08:06:22 +11:00
b348d1ac62 Cleanup: remove unused file 2018-11-25 08:05:42 +11:00
059c119719 Merge branch 'master' into blender2.8 2018-11-25 08:01:53 +11:00
e742e0934d Cleanup: trailing space 2018-11-25 08:01:14 +11:00
fa0fcbe4d6 Fix T56374, T57066, T58037: crash on startup on macOS when using translation. 2018-11-24 20:04:53 +01:00
5166132708 Fix random color drawing having similar colors for similar names. 2018-11-24 20:04:53 +01:00
Julian Eisel
23d66c5d60 Fix T58022: Changing workspace may change layout of User Pref window
Logic to update child windows on workspace changes should simply ignore
temporary child windows. Users opened those for a specific purpose (i.e. edit
user preferences or show render result). Blender should not come in and
repurpose it.
2018-11-24 19:20:31 +01:00
e5bc9fae54 Fix penpressure for tablets that use libinput on linux 2018-11-24 18:26:20 +01:00
0c8b0771f2 refactor: Collada reorganize class constructors
- Class constructors without body (only attribute initialisations)
  can safely be kept in the class header files

- Constructor variables should be initialized in the order of their
  definition in the header files

This change is also aimed to remove a couple of
build warnings from the linux builds.
2018-11-24 14:30:19 +01:00
31e3b7790a Keymap: preference for extended shading menu
This brings back the option to have x-ray & overlay toggle.
2018-11-24 11:24:34 +11:00
1e820898ff Depsgraph: add a new operation node for computing B-Bone segments.
Computing the shape of a B-Bone is a quite expensive operation, and
there are multiple constraints that can access this information in
a variety of useful ways. This means computing the shape once per
bone and saving it is good for performance.

Since the shape may depend on the position of up to two other bones,
often in a "cyclic" manner, this computation has to be a separate
node with its own dependencies.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D3975
2018-11-23 23:19:23 +03:00
e49c66efae fix: Collada: used wrong Enumeration type for comparison 2018-11-23 19:23:55 +01:00
bd25523aff fix: collada: must use case sensitive filename in include 2018-11-23 19:23:16 +01:00
397272e561 fix: Collada: use reference to BezTriple instead of copy 2018-11-23 19:21:29 +01:00
7eb9091e96 fix: compiler errors on mac_x86_64_10_9 2018-11-23 18:38:19 +01:00
b9b50c0e39 cleanup: Collada: remove unused variables 2018-11-23 18:38:19 +01:00
Dalai Felinto
9be5b2d23f Pass viewport to BASE_ related tests, for viewport view/select restrictions
Note: functions like select all are still not respecting that.
I will fix this as part of the local view commit though.
2018-11-23 15:13:14 -02:00
0d0c79e879 DRW: Make non Mesh object wire show in edit mode 2018-11-23 18:03:18 +01:00
ff6e61f09a DRW: Support Wireframe for metaball objects 2018-11-23 18:03:18 +01:00
be940fcd5f GP: Avoid crash when adding new layer 2018-11-23 17:34:53 +01:00
b05adc1f97 Icons: add Select tool icon. 2018-11-23 17:12:57 +01:00
e1c393b51a Keymaps: fix broken LMB select and transform tweak in 2D editors. 2018-11-23 17:12:57 +01:00
322cf89a14 Partial rewrite of the Collada Module for Blender 2.8
Most important changes are in the Animation exporter and Animation Importer.
There is still some cleaning up to be done. But the Exporter/Importer basically
work within Blender 2.8

Some details:

User Interface:
The interface has been reorganized to look more like the FBX interface.

New options in user interface:

* keep_keyframes:
  When sampling the distance between 2 keyframes is defined by
  the sampling rate. Furthermore the keyframes defined in the
  FCurves are not exported. However when this option is enabled
  then also the defined keyframes will be added to the exported fcurves

* keep_smooth_curves:
  When sampling we do not use FCurves. So we also have no Curve handles
  for smooth exporting. However when this option is enabled, Blender
  does its best to recreate the handles for export. This is a very
  experimental feature and it is know to break when:

  - the exported animated objects have parent inverse matrices
    different from the unit matrix
  - The exported objects have negative scaling

  There may be many other situations when this feature breaks.
  This needs to be further tested. It may be removed later or replaced
  by something less wonky.

BlenderContext:
is a new class that contains the bridge to Blender. It contains
pointers to the current export/import context plus derived values
of Depsgraph, Scene, Main

Reporting:
I reorganized the output on the Blender Console to become more
informative and more readable

Preservation of Item names:
name attributes are now encoded with XML entities. This makes
sure that i can export/import names exactly defined in the tool.
This affects material names, bone names and object names.

Hierarchy export:
* Object and Bone Hierarchies are now exported correctly
  by taking the Blender parent/child hierarchy into account
* Export also not selected intermediate objects

  Problem:
  When we export an Object Hierarchy, then we must export
  all elements of the hierarchy to maintain the transforms. This
  is especially important when exporting animated objects, because the
  animation curves are exported as relative curves based on the
  parent-child hierarchy. If an intermediate animated object is missing
  then the exported animation breaks.

  Solution:
  If the "Selected" Optioon is enabled, then take care
  to also export all objects which are not selected and hidden,
  but which are parents of selected objects.

Node Based Material Importer (wip):
Added basic support for Materials with diffuse color and
diffuse textures. More properties (opacity, emission) need
changes in the used shader.
Note: Materials are all constructed by using the principled BSDF shader.

Animation Exporter:
* Massive optimization of the Animation Bake tool (Animation Sampler).
  Instead of sampling each fcurve separately, i now sample all
  exported fcurves simultaneously. So i avoid many (many!)
  scene updates during animation export.
* Add support for Continuous Acceleration (Fcurve handles)
  This allows us to create smoother FCurves during importing Collada
  Animation curves. Possibly this should become an option ionstead of
  a fixed import feature.
* Add support for sampling curves (to bake animations)
* The animation sampler now can be used for any animation curve.
  Before the sampler only looked at curves which are supported by
  Standard Collada 1.4. However the Collada exporter currently
  ignores all animation curves which are not covered by the 1.4.1
  Collada Standards. There is still some room for improvements
  here (work in progres)

  Known issues:

    * Some exports do currently not work reliably, among those
      are the camera animations, material animations and light animations
      those animations will be added back next (work in progres)

    * Exporting animation curves with keyframes (and tangents)
      sometimes results in odd curves (when parent inverse matrix is involved)
      This needs to be checked in more depth (probably it can not be solved).

    * Export of "all animations in scene" is disabled because the
      Collada Importer can not handle this reliably at the
      moment (work in progres).

* Support for Animation Clip export
  Added one extra level to the exported animations
  such that now all scene animations are enclosed:

  <Animation name="id_name(ob)_Action">
    <Animation>...</Animation>
    ...
  </Animation>

Animation Importer:
* Import of animations for objects with multiple materials
  When importing multiple materials for one object,
  the imported material animation curves have all been
  assigned to the first material in the object.

Error handling (wip):
The Importer was a bit confused as it sometimes ignored fatal
parsing errors and continued to import. I did my best to
unconfuse it, but i believe that this needs to be tested more.

Refactoring:

update : move generation of effect id names into own function
update : adjust importer/exporter for no longer supported HEMI lights
cleanup: Removed no lopnger existing attribute from the exporter presets
cleanup: Removed not needed Context attribute from DocumentExporter
fix    : Avoid duplicate deletion of temporary items
cleanup: fixed indentation and white space issues
update : Make BCAnimation class more self contained
cleanup: Renamed classes, updated comments for better reading
cleanup: Moved static class functions to collada_utils
cleanup: Moved typedefs to more intuitive locations
cleanup: indentation and class method declarations
cleanup: Removed no longer needed methods
update : Moved Classes into separate files
cleanup: Added comments
cleanup: take care of name conventions
...    : many more small changes, not helpful to list them all
2018-11-23 17:08:14 +01:00
3bf7c846ee Fix T57996: Crash - delete node with a driven parameter 2018-11-23 17:03:14 +01:00
e5abce9220 Tag relations for update when clip's animation changes 2018-11-23 17:03:14 +01:00
d13a53e71d Return truth when animation fix changed animation
This can be used to inform higher level modules that animation
is changed and that dependency graph likely requires relations
update now.
2018-11-23 17:03:14 +01:00
1ec21ed41a DRW: Support Wireframe for cruve/surface/text objects 2018-11-23 16:44:53 +01:00
1cc7bcd8d8 Add missing COW updates when selection changes in paint modes. 2018-11-23 18:37:28 +03:00
d891c8f1f8 Merge branch 'master' into blender2.8 2018-11-23 14:41:21 +01:00
859d5e5699 Use default movie cache size of 4GiB 2018-11-23 14:40:51 +01:00
Stefan Werner
874f12480f Cycles: Fixed a warning. 2018-11-23 13:47:25 +01:00
Stefan Werner
aa000400dc Cycles: Improved robustness of hair motion blur.
In some instances, the number of control vertices of a hair could change mid-frame.
Cycles would then be unable to calculate proper motion blur for those hairs. This adds
interpolated CVs to fill in for the missing data. While this will not necessarily result in
a fully accurate reconstruction of the guide hair, it preserves motion blur instead of disabling it.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey, brecht, #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D3695
2018-11-23 13:25:26 +01:00
7b0f638ff6 UI: swap wireframe/solid order in pie to match order in header. 2018-11-23 12:37:43 +01:00
920525c216 Merge branch 'master' into blender2.8 2018-11-23 12:11:44 +01:00
29f75dd7b8 Python API: restore bpy.app.autoexec_fail variables, some scripts use it. 2018-11-23 12:11:41 +01:00
fc830ce78f Fix T57616: Deleting particle system instance object leads to crash
Explicitly tag copy-on-write form library remap. Previously, this
tag was used implicitly via geometry/transform tagging, which worked
ok for objects. For non-objects we do need to ensure all copies has
correct pointer and the only way to do so is to pass tag explicitly.

There is probably more places in the library remap where this is
needed, but not being familiar with the code makes it difficult to
spot where possible tags are missing.
2018-11-23 12:03:26 +01:00
4b06d0bf51 Python API: bpy.app.handlers.depsgraph_update_pre/post
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3978
2018-11-23 11:52:09 +01:00
956e58679c Fix T57998: crash at start with jemalloc package on some Linux distributions.
The jemalloc library must be ahead of pthread in linking order, so jemalloc
can find the pthread symbols for its background thread.
2018-11-23 11:26:31 +01:00
2ded8fca79 UI: initialize drag-lock x/y axis from region type
When dragging in a vertical or horizontal region,
there is no need to detect the drag axis.

Gives minor usability improvement for dragging over vertical tabs.
2018-11-23 19:12:34 +11:00
4ed7c10a32 Correct missing NULL check in recent changes 2018-11-23 18:12:28 +11:00
7a7c9ee71a Fix uv lasso/box multi-object select logic
Was de-selecting all UV's on each iteration.
2018-11-23 18:06:50 +11:00
a6eb9a3e21 Tool System: uv lasso/box select options
These tools now support (new, add, subtract),
(xor, and) could be supported but are complicated by UV's sticky
selection modes.
2018-11-23 17:52:52 +11:00
dcf359b15a Error in last commi 2018-11-23 16:28:50 +11:00
93c143ecf3 Fix wire-toggle restoring previous shading mode 2018-11-23 16:27:54 +11:00
811814b60c Keymap: remove redundant keys from toolbar popup
Adjust the keymap so tools that don't exist wont use keys
from the default keymap.
2018-11-23 15:46:47 +11:00
ca5dd63618 Fix toolbar keymap accumulating items
Create a temporary keymap with items from the original.
2018-11-23 15:19:57 +11:00
cfffe615f4 Keymap: add Keymap.keymap_items.new_from_item
Needed to copy keymap items from other keymaps.
2018-11-23 15:16:13 +11:00
1fcb3e791f Cleanup: single quote enums 2018-11-23 13:55:33 +11:00
d56c0a0a6a Cleanup: rename bone-select to xray
This shows bones in font and uses the xray toggle binding.
Also 'bone select' isn't very meaningful on it's own.
2018-11-23 13:48:21 +11:00
3fdcd2293e UI: Don't promt when deleting via Object Context Menu.
Suggested in the UI paper-cut thread at devtalk.blender.org by ThinkingPolygons
2018-11-23 03:47:32 +01:00
1540a1ddd1 UI: Icons in context menu for copy/paste 2018-11-23 03:47:32 +01:00
1ffb2bf917 Pose: make pose-bone xray usable in wpaint mode
Update UI, draw-manager and operator to support with pose-bone-xray
when in weight paint mode.
2018-11-23 13:19:22 +11:00
e829e47b55 Keymap: remove 'Z' key to toggle bone-select
Alt-Z already does this.
2018-11-23 12:28:18 +11:00
5f2ac43b5f UI: allow inaccurate swipe motion to switch tabs
Removes the need to keep your cursor over tabs while dragging.
2018-11-23 12:11:18 +11:00
abf9c628b2 Keymap: restore grease pencil keys for default map
Pie menu for draw modes is now on the 'Z' key.
2018-11-23 11:44:31 +11:00
4022a16fbe Keymap: adjustments to shading keys
- Z shows pie menu (removed wire/xray toggles).
- Alt-Z toggles x-ray.
- Shift-Z toggles wireframe.
- Shift-Alt-Z toggles overlays.

Note that toggle overlays had no binding for 2.7x,
this is likely not a heavily used option and could even be left out.
2018-11-23 11:39:44 +11:00
60865ccefd Fix for weight paint object occluding pose bones
This makes it so weight paint + pose mode can't switch to other
weight paint objects.
2018-11-23 10:38:15 +11:00
73547952a9 Pose: support wpaint+pose w/ object-lock enabled
Mode locking made it nearly impossible to enter wpaint + object mode.

Now enter pose mode when entering wpaint mode
when the pose object is selected.
2018-11-23 10:19:12 +11:00
7b4f545e28 Fix bone selection w/ mixed wpaint & pose mode 2018-11-23 10:03:04 +11:00
7c74f5006a Cleanup: newlines in error prints 2018-11-23 07:29:21 +11:00
3fb77591f4 UI: fix wrong icons after recent update.
This cleans up old icon .data files that were still hanging around,
but not in the SVG anymore.
2018-11-22 21:27:20 +01:00
a7f9b57983 UI: activate tabs immediately on press, and drag to quickly cycle through. 2018-11-22 21:10:12 +01:00
14b60c620f Fix T55535: N panel in sequencer breaks display of preview.
This preview region should not have been part of region overlap.
2018-11-22 21:03:50 +01:00
62592ae987 UI: Object Context Menu tweaks.
* Move type-specific options first.
Allows to get quicker access to settings like Shading Smooth/Flat
by pressing W -> S/F, or camera or light settings.

* Lights: Rename Strength to Energy
* Lights: Show Energy when using EEVEE
2018-11-22 19:02:51 +01:00
f30271e3d4 Image Empties: Potential Fix for T57696
So far this makes a new pass for image empties that does not write to the depth buffer.

Todo:
- Sort empties using `DRW_pass_sort_shgroup_z`.
- Calculate correct bounding boxes.
- fix bounding box memory leak.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D3922
2018-11-22 18:31:03 +01:00
e16ef56a0d Fix T57980: Assert failure in draw manager when opening file 2018-11-22 16:55:29 +01:00
ce6d1e890c Cleanup: Use proper module prefix in function names 2018-11-22 16:35:12 +01:00
76ea125c2e GP: Keep activated the same Brush in toolbar 2018-11-22 16:26:39 +01:00
6a3451fe4e Depsgraph: Ensure solver cleanup order
Ensure that pose cleanup is never run before all IK solvers are finished.
2018-11-22 16:17:18 +01:00
60857cdb79 Depsgraph: Cleanup, line wrapping 2018-11-22 16:17:18 +01:00
447cfdca01 Fix missing newline in error print 2018-11-22 16:17:18 +01:00
a20d350dd5 Depsgraph: Cleanup, make it easier to create relations with flags 2018-11-22 16:17:18 +01:00
3d77517ad5 Eevee: Reflection Plane: Small UI fix and invert facing fading 2018-11-22 16:15:14 +01:00
3280adc0aa Fix T57977: VSE: Markers lines get highlighted when using box select
Was caused by a missing uniform.
2018-11-22 16:15:14 +01:00
e815784aa6 Keymaps: make click event detection use a larger distance threshold.
Previously this was hardcoded to 2 pixels, which is too low for tablets and
not taking into account DPI. Now we set it equal to the tweak threshold, so
you either always do click or drag.

The default distance of 10 pixels may be quite far for something to be
considered a click, and we'll need to see how well it works. But I find this
to help a lot when selecting vertices in quick succession.

Thanks to Julien for spotting this.
2018-11-22 14:33:07 +01:00
783b0809b6 Fix T57578: Vertex Connect crash with less than two verts selected 2018-11-22 13:28:53 +01:00
a0d7d3187b GP: Cleanup old TODO comments
These ToDo were ported when 2.7x code was ported to 2.8, but now they are not needed.
2018-11-22 10:44:06 +01:00
d9215b064c Cleanup: keymap wrapper for tool-setting operator 2018-11-22 16:58:46 +11:00
5155572fc7 Keymap: add popup keymap
Allow manually mapping keys for the popup toolbar.

Useful for tools that don't have immediate access,
add transform, annotate & measure.
2018-11-22 16:52:57 +11:00
d0ac13d6b1 Cleanup: minor simplification of keyconfig merge 2018-11-22 16:33:57 +11:00
ea2d0f9a7a Correct typo 2018-11-22 16:17:09 +11:00
William Reynish
dcf4bf8db9 Icons: use newly added icons 2018-11-22 15:31:19 +11:00
27bbf19af8 Icons: binary data update from SVG 2018-11-22 15:29:26 +11:00
9b788546b7 Icons: updates by jendrzych
Changed to correct disclosure triangles everywhere,
added new icon for Output Properties,
added new icons for Image & Empty types in Add menu,
added icons for add-on types, plus other tweaks and adjustments.
2018-11-22 15:26:01 +11:00
4b9d242be5 Merge branch 'master' into blender2.8 2018-11-22 15:16:45 +11:00
c66570f519 Fix T57989: File loaded as startup
The file contents was used to check if the file was a startup file.

Now pass in an argument from startup loading code instead.
2018-11-22 15:06:14 +11:00
1844ccd521 UI: disable screen edges for full-screen areas 2018-11-22 12:34:15 +11:00
3e625a7a06 UI: hide shortcut from gizmo tip when none found 2018-11-22 12:19:07 +11:00
fb8aa611d0 UI: String tweak for "UnLock" and Un-Mute in VSE 2018-11-22 02:02:11 +01:00
644e66caca UI: Fix Lock/Mute menu in VSE
Thanks @tintwotin for reporting it!
2018-11-22 02:02:11 +01:00
d5f1d4f789 Cleanup: utility function to avoid duplicate keys 2018-11-22 11:54:53 +11:00
553307bec1 Tool System: auto-assign A-Z keys for toolbar popup
Assign keys based on tool name when they're free, allows:
Space-T for Transform, Space-A for Annotate.
2018-11-22 11:35:46 +11:00
120be7740d Fix toolbar popup keymap not allowing 'A' key 2018-11-22 11:33:10 +11:00
3b7daa5bf4 Tool System: Updates for keymap stored as string 2018-11-22 11:13:53 +11:00
1a4595618c Fix factory-settings using stale preferences
We need to reload defaults on factory startup because the defaults
now have preferences that may have changed.
2018-11-22 10:51:27 +11:00
f44a8bd257 Tool System: store keymap name in tool instead of the keymap
Resetting keymaps caused them to become invalid (crashing on access).
2018-11-22 10:25:24 +11:00
4fa693f627 Keymap: always show pie menu w/ tab-pie-menu pref
Wasn't working well with armatures used ctrl-tab
to switch to pose mode, making tab always switch to pose mode
w/ this preference enabled.

Now always show pie-menu.
2018-11-22 09:09:42 +11:00
7e50813d58 Keymap: Use Z to toggle wire instead of xray
This now works like 2.7x more or less exactly,
x-ray is enabled by default for wire so unless users change this,
it will enable x-ray too.
2018-11-22 09:01:00 +11:00
d52c41b040 Keymap: 3D view pref for tab to show pie menu
This behaves like the 2.7x pie menu add-on,
for users who prefer single-key access to all modes.
2018-11-22 08:14:20 +11:00
77764ab22c UI: Add Image and Clip space panels category.
Pretty much all were missing those here... Put all in same category for
image, tried to sort them logically for Clip, since we already had at
least two (stabilization and 'misc')... sigh.

Another topic for UI team to work on I guess.
2018-11-21 22:03:24 +01:00
b508de3d3c UI: First batch of fixing missing categories for panels. 2018-11-21 22:03:24 +01:00
ce137699f9 Cleanup: Move debug warning message about panels missing category from drawing code to registering code.
In drawing it was pretty stupid (since we did not know *which* panels were
affected), and really, really annoyingly noisy!
2018-11-21 22:03:24 +01:00
a9bf6a3b3a UI: hide keymap preferences when filter is used 2018-11-22 07:52:34 +11:00
360fd9ac2c Keymap: correct error in grease pencil change 2018-11-22 07:48:34 +11:00
d78f1eb916 Keymap: remove annotation keymap editmode toggle
This is now used for grease pencil objects.
2018-11-22 06:51:47 +11:00
4c63ea2bc8 Keymap: Adjust shading key bindings
- 'Z' now toggles xray
  (convenient, 2.7x-like binding to show occluded).
- 'D' shows the draw-type pie-menu.
2018-11-22 06:51:00 +11:00
2ad4cd097a Keymap: remove D-Key shortcuts for annotations
Use tools for annotations instead.
2018-11-22 06:44:32 +11:00
7d985fcc1b 3D View: move x-ray toggle to operator
Allows binding to a key.
2018-11-22 06:44:32 +11:00
44612e07fe Keymap: use Ctrl-Tab to toggle fcurve/graph editor
Suggested by Pablo Vazquez.
2018-11-22 05:59:02 +11:00
0a3cf08364 Keymaps: take into account DPI for tweak/drag/pie thresholds.
The intention is to fix a too low default threshold on high DPI screen.
Users with high DPI screens that have increased the threshold to fix this
or liked the lower threshold will need to lower it again.

This is still somewhat of a guess, ideally this would be based on the
physical distance travalled, and maybe different per type of input device.
However we do not have access to this information, and hope this gives a
better default.
2018-11-21 19:31:20 +01:00
e8b9ff78dc Keymaps: a few small improvements.
* Annotation tools now have Alt+LMB as for erase, like sculpt.
* In the LMB keymap, Shift+RMB drag now transforms 3D cursor for easy snapping.
* Curve edit mode draw is now only availble as tool, solves 3D cursor conflict.
2018-11-21 19:31:20 +01:00
d203234dd0 Python API Docs: better titles.
The HTML title did not make it clear that these are docs for the API rather
than a general Blender documentation. Some of the page titles were also too
long and redundant.
2018-11-21 19:31:20 +01:00
f5df1efa2f Cleanup: warnings 2018-11-22 05:26:18 +11:00
146f6cea55 GP: Set Vertex opacity default for templates 2018-11-21 19:19:10 +01:00
79ef6f30f0 UI: Use primary gizmo color for loopcut edge pre-select.
Instead of hardcoded pink.
2018-11-21 19:14:56 +01:00
2ab798feb0 transform_snap_object: Use the texture space bound box to test the need to snap to meshes in edit mode.
Before a value for bound box was stored in a local cache.
2018-11-21 14:38:56 -02:00
2261aed031 GP: Init new Eraser Hard 2018-11-21 18:04:08 +01:00
96e39af948 transform_snap_object: Fix snap to curves.
Use `BKE_curve_texspace_get` instead `BKE_curve_boundbox_get`.
The snap to curve, even out of edit mode, is not done on the displist. So test a boundbox that covers the points seens in edit mode.
2018-11-21 13:07:51 -02:00
cec83e92e6 Fix T57884: Triangle count is incorrect when above around 2 billion
Maniphest Tasks: T57884

Differential Revision: https://developer.blender.org/D3962
2018-11-21 16:34:32 +01:00
d3e686d61e Depsgraph: Update comment 2018-11-21 16:29:22 +01:00
2a354dd4bd Depsgraph: Allow flush of CoW tag from Action
This way we guarantee that action tagged for CoW will ensure
order of updates with objects which are using it.

Fixes T57870: Scaling keyframes in Graph Editor causes crash
Fixes T57971: Moving keys in the Dopesheet crashes with Segfault 11
Fixes T57530: Moving keys on a rig, Crash
Fixee T57491: Crash when trying to move keyframe in dope sheet
2018-11-21 16:21:24 +01:00
693233b198 Fix T57975: Drawing with Onion Skin enabled crash Blender 2018-11-21 15:53:45 +01:00
5e4ed2793b Depsgraph: Move boundbox sync to the post-geometry evaluation
Boundbox does not depend on transform and only need geometry
component.

This change solves possible race condition accessing geometry
data and allocating/assigning pointers.

Based on disacussion in IRC with @mano-wii and @brecht.
2018-11-21 15:04:18 +01:00
b6693f1f54 Depsgraph: Cleanup, use more clear name
Five years later since the original commit, is probably not so bad
timing on calling things by their clear name.
2018-11-21 14:52:42 +01:00
539b465b32 Implement basic global tablet pressure curve options.
Grease Pencil already implements support for full-featured
per-brush pressure curves, but it is useful to have some
basic global settings that affect all brushes and tools.

This adds two simple options:

- Raw pressure required to achieve full brush intensity.
- Softness control, using a gamma curve internally.

The most important one is the max pressure setting, because it is
critical for ergonomics, but the Linux Wacom driver lacks it.

The softness option internally converts to gamma = 4^-softness.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D3967
2018-11-21 16:34:07 +03:00
968bf0df14 Fix T57811: Render crashes in certain scenes when AO Bounces are used 2018-11-21 14:17:26 +01:00
b93c81e002 Image Empties: always show in orthographic view by default 2018-11-21 13:52:12 +01:00
6f48bfc7a8 Cycles: Cleanup, use utility function
Replaces inlined platform-specific code.
2018-11-21 13:51:18 +01:00
65143542af Cycles: Cleanup, reduce indentation level 2018-11-21 12:41:24 +01:00
ed1ee89288 I18N: tweak some UI labels and tips. 2018-11-21 12:06:59 +01:00
638622971b I18N defaults: enable tooltip translation.
That is minimal change for now, we may want to fully enable i18n by
default...
2018-11-21 12:05:56 +01:00
5892f0fd0c UI: small clean-up of I18N UI in userpref.
Mainly do not hide i18n options anymore, this is against our rules, just
disable them instead.
2018-11-21 12:04:09 +01:00
700330afe8 Cycles: Cleanup, comments and dead code 2018-11-21 11:33:11 +01:00
65d01def80 Cycles: Cleanup, CUDA code path is not possible inside AVX2 2018-11-21 11:28:49 +01:00
e85aa8b8da GP: Change cursor for primitves 2018-11-21 10:52:46 +01:00
3a64d7ca48 GP: Remove Target Weight switch 2018-11-21 09:03:17 +01:00
7de712e1e5 Fix uv-sculpt use w/ tool-system 2018-11-21 17:56:10 +11:00
77a80d9f2f Gizmo: show dial handle for unconstrained extrude
Now only show an arrow when extrude was constrained on an axis.
2018-11-21 17:15:53 +11:00
1a551328b4 Gizmo: set operator options before execution
Avoid setting all operator options every redraw,
instead set them before invoking.
2018-11-21 16:00:00 +11:00
6b6105a87e Gizmo: run invoke_prepare even when the gizmo isn't modal
This is useful for setting up state for gizmos that run
operators too.
2018-11-21 15:35:29 +11:00
67c3791f63 Object: minor changes to jump-to API
- Always select the jump-to object, even if it's active.
- Remove check for invalid object data
  (these cases will fail much earlier).
2018-11-21 13:07:36 +11:00
18593c7cd3 Cleanup: add reveal_hidden arg to jump-to API calls
Jumping to data shouldn't necessarily change hidden status
or visible layers.
2018-11-21 13:04:03 +11:00
a86a1292f3 Gizmo: workaround for extrude modifying normals for XYZ axis
This was done for the normal gizmo, but not the XYZ handles.
2018-11-21 12:58:06 +11:00
774471dd45 Fix custom matrix orientation being written to scene 2018-11-21 12:58:06 +11:00
ac5889a9ee Correct editbone root-select check
Mistake in recent commit.
2018-11-21 12:58:06 +11:00
63150511a2 Gizmo: use Y-axis for armature extrude on normal
For bones it's useful to extrude a bone aligned to the existing bone.
2018-11-21 12:14:28 +11:00
04d09014e9 Gizmo: set the extrude transform constraint matrix 2018-11-21 11:45:16 +11:00
b6918eaf23 UI: Horizontal/Vertical split options in Area menu. 2018-11-21 01:33:41 +01:00
5b45434be4 Transform: use root/tip for bone normal orientation
When there are no fully selected bones,
use the normal of bones which only have the root/tip selected as a
fallback.

Without this, the extrude gizmo isn't very useful
since extrude is often used with only the tip selected.
2018-11-21 11:32:08 +11:00
d433e9de5c UI: Icon and separator for Add Node (Search). 2018-11-21 01:25:44 +01:00
f021536bab UI Theme: Minor improvements on contrast and consistency.
* 3D Viewport grid adjustment to work with both bright/dark viewports (e.g. 2D Animation)
* Match header/grid of NLA with Dopesheet/Graph Editor.
* Avoid pure whites in unselected/inactive text.
* Darken the scrollbar numbers.
2018-11-21 00:40:36 +01:00
91e8509467 Cleanup: use boolean array for mirror modifier 2018-11-21 10:30:51 +11:00
19875439b5 Modifier: Mirror learns to bisect on plane
D3966 by @kioku w/ edits.

This adds bisect and flip options to mirror modifier.
2018-11-21 10:01:04 +11:00
6aa7cea3c2 Cleanup: rename extrude gizmo 2018-11-21 09:25:55 +11:00
d3a75c48fd Cleanup: move extrude gizmo to transform module
Since this is no longer mesh only, move out of mesh,
rename next.
2018-11-21 09:20:19 +11:00
34b9bd3a9b Gizmo: initial extrude support for non mesh types 2018-11-21 09:09:34 +11:00
c17cc4c0d8 Fix extrude tool redo
Redo operator properties weren't being set.
2018-11-21 08:20:22 +11:00
fb4c2ed1a9 Fix T57892: Align Objects in Blender 2.8 Alpha 2 last Builds.
Needed some update for API changes...
2018-11-20 22:14:00 +01:00
b7ee0912a7 Fix T57921: Crash when loading 2.7x .blend with scene without any render layer.
We need at least one view layer, always. :)
2018-11-20 21:50:46 +01:00
3a13b89296 Cleanup: unused args, indentation 2018-11-21 06:29:19 +11:00
176b0df920 Cleanup: gcc function type warning 2018-11-21 06:24:52 +11:00
a4a9123c33 GP: Refactor target weight paint
Now, the target weight is defined as the final maximum value with a new property and all fields have be moved to brush struct.
2018-11-20 20:05:37 +01:00
e63c947204 GP: Refactor drawing engine to single VBO
This is part of T57829.

Reduce the number of batches used to only one by shader type.  This reduces GPU overhead and increase a lot the FPS. As the number of batches is small, the time to allocate and free memory was reduced in 90% or more.

Also the code has been simplified and all batch management has been removed because this is not necessary. Now, all shading groups are created after all vertex buffer data for all strokes has been created using DRW_shgroup_call_range_add().

All batch cache data has been moved to the Object runtime struct and not as before where some parts (derived data) were saved inside GPD datablock.

For particles, now the code is faster and cleaner and gets better FPS.

Thanks to Clément Foucault for his help and advices to improve speed.
2018-11-20 20:05:37 +01:00
140d383393 Fix T57935: Crash Alt clicking w/ poly build tool 2018-11-21 05:25:52 +11:00
5aa728ec7e Cleanup: style 2018-11-21 05:25:52 +11:00
ec908beab3 GP: New option to paint a predefined weight
Enabling this option, the weight is set to the predefined value and not the result of the sum of the paint actions.
2018-11-20 18:12:04 +01:00
53d9ddf772 UI: Color Ramp: Add menu and functions to distribute color stops
Suggestion from Right-Click Select: https://blender.community/c/rightclickselect/Npcbbc/color-ramp-flags-auto-distribution-function

Differential Revision: https://developer.blender.org/D3965
2018-11-20 17:02:31 +00:00
23656d01d8 Merge branch 'master' into blender2.8 2018-11-20 18:01:13 +01:00
ec851efda9 Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
Second part of the fix: do not try at all to compute normals in degenerated
geometry. Just loss of time and potential issues later with weird
invalid computed values.
2018-11-20 17:54:48 +01:00
c9c6433a59 Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
Fix first part of it, the freeze itself being caused by float NAN values
never comparing equal to anything, not even themselves.
2018-11-20 17:52:21 +01:00
d2e473f01c GP: Reorganize Reproject options
The options depend of drawing mode and this was very strange. Now, the options are listed in the menu.
2018-11-20 16:29:33 +01:00
1824aad3f3 GP: Set Gizmo orientation for edit mode 2018-11-20 16:04:19 +01:00
4dc639ac99 Speedup rigs with multiple objects deformed by bbones
Previously each of the objects which has armature modifier will
request deformation matricies from bbones. Thing is, all those
deformations are the same and do not depend on object which is
being modified. What's even worse is that this calculation is
not cheap.

This change makes it so bbones deformation is calculated once
and stored in the armature object. After this armature modifiers
simply use it.

With a rigs we've got here dependency graph evaluation time
goes down from 0.02 sec to 0.012 sec.

Possible further optimization is to make bbone deformation
calculated at the time when bone is calculated. This will avoid
an extra threaded loop over all bones.
2018-11-20 15:53:59 +01:00
163be42a96 Cleanup: Use more const qualifiers 2018-11-20 15:07:38 +01:00
5c632ced53 Merge branch 'master' into blender2.8 2018-11-20 15:02:13 +01:00
01e8e7dc6d Task scheduler: Optimize parallel loop over lists
The goal is to address performance regression when going from
few threads to 10s of threads. On a systems with more than 32
CPU threads the benefit of threaded loop was actually harmful.

There are following tweaks now:

- The chunk size is adaptive for the number of threads, which
  minimizes scheduling overhead.

- The number of tasks is adaptive to the list size and chunk
  size.

Here comes performance comparison on the production shot:

 Number of threads        DEG time before        DEG time after
       44                     0.09                   0.02
       32                     0.055                  0.025
       16                     0.025                  0.025
       8                      0.035                  0.033
2018-11-20 14:58:17 +01:00
98bcd52ef2 Comment out all derived mesh evaluation
Seems all the usecases of derived mesh are if-defed already,
so no need to have API for it in place, and definitely no
need to waste CPU ticks on converting evaluated mesh to
derived mesh.
2018-11-20 14:54:16 +01:00
e81aca85cb Depsgraph: Don't use derived mesh
Ideally would need to make check based on evaluated mesh,
but is now a good time to go away from derived mesh.
2018-11-20 14:54:16 +01:00
fd926f0058 Modifier stack: Only ensure derived mesh when USE_DERIVEDMESH is defined
This is more an internal transition away from derived mesh.
2018-11-20 14:53:41 +01:00
1ee8c3e46a Modifier stack: Use evaluated mesh to check normals 2018-11-20 14:53:41 +01:00
88d634ca05 Vertex parent: Remove CCGDM optimization
Currently we never return CCGDM from the modifier stack,
so the optimization was doing pretty much nothing.

Removing it completely for now, it needs to be re-done
with the new evaluated Mesh/Subdiv.
2018-11-20 14:53:41 +01:00
129b8833c6 UI: increase spacing at sides of headers, to avoid region split zone overlap. 2018-11-20 13:39:49 +01:00
fc181d855e Fis T57948: Crash in 2.8x lookdev 2018-11-20 13:30:29 +01:00
566a4a96cb Fix T57891: Radius of strip hair doesn't scale with object scale
Note that this only works fine with uniformly scaled objects.
Otherwise, the hair thickness will vary in a weird way depending on viewing
angles.
2018-11-20 13:09:27 +01:00
86e0d13218 Images: "Image" submenu in "Add" menu
The submenu has two entries currently: "Reference" and "Background".
Both operators produce an image empty with different settings.
2018-11-20 12:44:49 +01:00
76d602f38d Add option not to print debug/info in ngon_tessellate.
That func can be called a lot, generating a lot of noise in the
console...
2018-11-20 12:35:05 +01:00
a29740e290 GP: Fix bottom statistics 2018-11-20 11:42:36 +01:00
a19ee4e926 Tool System: define tools for lattice editmode 2018-11-20 21:41:39 +11:00
057ba2eb68 Fix error generating toolbar tooltip
C code needed to be updated for module move.
2018-11-20 21:35:24 +11:00
789a259d71 Merge branch 'master' into blender2.8 2018-11-20 10:46:36 +01:00
9bc2570e2a Removed superfluous NULL check 2018-11-20 10:46:17 +01:00
f8f5751dac Merge branch 'master' into blender2.8 2018-11-20 10:38:55 +01:00
92a47e3b53 Multires: Cleanup, remove unused function 2018-11-20 10:34:01 +01:00
0540d2b65c Added MovieClip.fps read-only property to RNA
This makes it possible for a Python script that loads a MovieClip into the
clip editor to also change the scene frame rate to match.
2018-11-20 10:32:24 +01:00
698f1e3d94 Fix T57938: Dynamic paint baking issues
Quite usual fix for the caching systems.
2018-11-20 10:29:35 +01:00
640eb00670 Tool System: define tools for meta-ball editmode 2018-11-20 18:52:56 +11:00
812205f936 UI: unhide bones in Jump To Target instead of failing.
The whole point is to avoid the need to manually hunt for the
bone, so it makes more sense to unhide it automatically.

If the bone is on multiple layers, just the first one is enabled.

Also, ED_pose_bone_select already checks PBONE_SELECTABLE.
2018-11-20 10:24:33 +03:00
1edc3f74ed Cleanup: make object deselect match other ED_ APIs
Use SEL_* argument, matching ED_pose_deselect_all.
2018-11-20 18:08:24 +11:00
d227c58e3e UI: support jumping to target object/bone
Complex rigs are built from many bones (often overlapping)
connected by constraints.

When investigating or debugging such rigs one often wants to switch to
the target of a constraint, or a parent bone, but it is difficult to do
manually due to overlap confusion.

This adds a right click menu option that automatically selects
and makes the target object or bone active for UI fields where a
suitable reference is readily available.
2018-11-20 17:38:35 +11:00
93f82698e7 Object: utility (de)select all functions
part of D3955 by @angavrilov
2018-11-20 17:00:55 +11:00
82eecc6c00 Multi-Objects: Calc origin w/ all edit-objects
D3924 by @Leon95 w/ code de-duplication.
2018-11-20 16:26:46 +11:00
15db2acd9f Fix T57722: Clipped LookDev preview spheres
D3948 by @pablodp606
2018-11-20 15:08:56 +11:00
720368e2d0 Cleanup: use const mesh arg to BM_mesh_bm_from_me
Needed for D3966
2018-11-20 13:30:25 +11:00
9d85cf0d54 Theme: avoid right-shift in XML files
Use 2 space indent for attributes, ~20% smaller files.
2018-11-20 13:15:26 +11:00
9a1796797e Keymap: update addon register/unregister utilities
Use the same data format and loader that the default key-maps use.

This supports nested properties (needed for macros)
and fixes modal key-maps which weren't supported.

This format still needs to be documented.
2018-11-20 12:37:04 +11:00
916446e83f Cleanup: move keymap hierarchy into own file 2018-11-20 11:38:13 +11:00
bb5a96e76e Cleanup: move toolbar keymap generation to bl_keymap_utils
The function is getting complicated, any refactoring
would be best done outside of 'space_toolsystem_common'.
2018-11-20 11:17:36 +11:00
f8c16b0175 Cleanup: move bpy_extras.keyconfig_utils to own module
bpy_extras were meant to be useful high-level helper functions for
script authors to perform common operations,
to avoid writing to verbose API's.

bpy_extras.keymap_utils contains some specialized API calls
mainly intended for Blender's own internal use.

Move keymap import export to internal API.
2018-11-20 11:06:01 +11:00
d870e7d930 Keymap: skip save prompt for default keymap
See T57880
2018-11-20 10:15:33 +11:00
47139c69d7 Keymap: only use delete confirmation for X-key
Only use confirmation w/ X-key since this is more likely to be pressed
by accident. Delete-key delete doesn't confirm.

Part of D3953 by @Zachman w/ edits
2018-11-20 10:06:02 +11:00
750690ae7a Object: report number of deleted objects
Part of D3953 by @Zachman w/ edits
2018-11-20 09:49:52 +11:00
5f9de429ac UI: show keyconfig prefs directly under preset
The keyconfig preset and it's preferences were too far apart,
show the preferences under the preset in a collapsible box.
2018-11-20 09:15:53 +11:00
f0b5a9da01 Cleanup: style, unused 2018-11-20 08:53:00 +11:00
8617594515 Keymap: remove 3ds and maya keymaps
These aren't well maintained and as far as we know
never gained wide adoption.

Remove, we can focus efforts on other key-maps, see: T54963.
2018-11-20 08:15:53 +11:00
c9f24a5690 WM: remove interaction presets
These only exposed a few options, which didn't end up helping
much to make Blender's key-map fit the behavior of other applications.
2018-11-20 08:11:46 +11:00
3c8c976086 Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
5f21030a81 Image Empties: Option to not display the backside of image empties
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3964
2018-11-19 19:33:09 +01:00
99d9d3dbce Fix T57554: texture bake object to active error after recent changes. 2018-11-19 19:19:03 +01:00
eff8903026 UI: hide scene / layer in properties context in some cases, for compactness. 2018-11-19 19:19:03 +01:00
0ff05daee0 Fix handling of B-Bone custom handle references in Edit mode undo.
Correct a couple of places that should process the handle pointers.
2018-11-19 20:35:21 +03:00
7bb512594c Workbench: Use non-negative lighting evaluation
This makes the lighting a bit more diffuse but don't produce negative
values.

Add a bias of 1.5f to make the lighting a bit more directionnal.

The implementation is based on:
https://github.com/kayru/Probulator/blob/master/Source/Probulator/SphericalHarmonics.h#L136
which is derived from:
http://www.geomerics.com/wp-content/uploads/2015/08/CEDEC_Geomerics_ReconstructingDiffuseLighting1.pdf

The shader implementation is optimized and has the same runtime cost
as previous method:
* no sh eval : 0.13ms
* prev sh eval : 0.14ms
* new sh eval : 0.22ms
* new sh eval opti : 0.14ms
2018-11-19 18:05:15 +01:00
2b56d21839 Workbench: Performance: Fix performance drop caused by specular lighting
In my test, the composite pass went from 1.52ms to 0.24ms when specular
lighting is enabled.
2018-11-19 18:05:15 +01:00
98f8b48e69 Remove note about Blender Internal 2018-11-19 16:28:26 +01:00
6ffb0a0ee7 DRW: Make profiling more precise on certain drivers.
This makes the whole rendering slower (because of sync point) but the
numbers displayed by the draw manager profiler is more precise on some
buggy drivers. They seems to issue the query before the last one ends.
2018-11-19 15:48:17 +01:00
ee44dd1b2b Studio Lights: Big Cleanups
* Less Lengthy enum/macro names.
* Optimize computation of Spherical Harmonics.
* Reduce radiance cubemap size a bit. Higher resolution is not necessary.
* Remove STUDIOLIGHT_LIGHT_DIRECTION_CALCULATED (was not used).
* Do windowing on each component separately instead of using luminance.
* Use ITER_PIXELS to iterate on each pixels, using pixel center coords.
* Remove gpu_matcap_3components as it is only needed when creating the gputex.
* Fix a lot of confusion in axis denomination/swizzle.

These changes should not affect functionallity.
2018-11-19 15:48:17 +01:00
8d51e3c062 STUDIOLIGHT: leave a comment of why STUDIOLIGHT_SPHERICAL_HARMONICS_WINDOWING was commented. 2018-11-19 10:39:30 -02:00
422992a135 Py API Docs: use new bind context manager in gpu examples 2018-11-19 14:32:51 +01:00
51711fdcaa Revert "BKE object: Correct bound box of bezier curve objects not matching the object viewed."
This reverts commit 24677cf77b.
2018-11-19 10:28:31 -02:00
3f59bdc1bd PyAPI: GPUOffscreen: Add context manager for the bind method to work with the with statement.
Differential Revision: https://developer.blender.org/D3918
2018-11-19 10:16:27 -02:00
d2560dc614 LOOKDEV: disable STUDIOLIGHT_SPHERICAL_HARMONICS_WINDOWING
This option is causing the texture to become full of nan(ind)s.
I don't know how it worked before.

Until this is resolved, this feature (which improves the quality of LOOKDEV's irradiance texture) will be disabled.
2018-11-19 09:05:22 -02:00
6647e2c71e EEVEE: Cleanup: default_world_frag.glsl 2018-11-19 09:05:22 -02:00
80499bcc52 EEVEE: Cleanup remove unused shader. 2018-11-19 09:05:20 -02:00
24677cf77b BKE object: Correct bound box of bezier curve objects not matching the object viewed. 2018-11-19 09:05:20 -02:00
de231887b4 Themes: Remove deprecated themes.
Most themes have missing/wrong settings due to the new editors in 2.8

A Call-for-content has been made at devtalk.blender.org for the community to contribute new ones.
2018-11-19 12:31:08 +01:00
b0c463a274 Fix T57889: Crashes on undo and redo while working with image or image empty 2018-11-19 12:04:39 +01:00
9b8d479e41 RNA: re-enable update notifier flags
This was causing too many missing updates and each need investigation
which won't happen before beta.
2018-11-19 21:30:54 +11:00
6fe1b7158b Py API Docs: Fix wrong type 2018-11-19 10:29:10 +01:00
b33afe4df3 Tool System: improve popup w/ modifier keys
When the toolbar is accessed with modifiers (eg shift-space):

- Check if we can use the key without any modifiers to set the cursor.
- Pie-menu stile release event no longer checks for modifiers.
2018-11-19 14:39:25 +11:00
740adf2a4b Cleanup: style 2018-11-19 13:37:18 +11:00
db8f662cc9 Cleanup: use define for key-config string 2018-11-19 13:16:18 +11:00
472b114761 Fix keymap loading multiple times
Blender defaults data-file was loading it's own key-map
with a capital 'B', the preset would load it again w/ a lowercase name.

Use lowercase key-map names.
2018-11-19 13:11:33 +11:00
3d92afca7e Fix tool-system popup and tips w/ empty keymap
That this looks like an issue loading keymaps correctly,
needs to be investigated.
2018-11-19 11:58:09 +11:00
90be7e90e0 Gizmo: tweak navigation highlight display
Show occluded axis highlight on top when pointing away.
2018-11-19 11:40:59 +11:00
5dc2ecdf05 Merge branch 'master' into blender2.8 2018-11-19 08:54:07 +11:00
Roel Koster
f74fa98e53 Linux: list GVFS mount points 2018-11-19 08:53:19 +11:00
3e096b47ba Fix object box select new w/o any objects
A new selection with no objects found needed to de-select all.
2018-11-19 07:21:14 +11:00
9f4e4d672c Cleanup: naming 2018-11-19 07:06:38 +11:00
3b48620098 Cleanup: naming 2018-11-19 07:04:24 +11:00
074cd53c19 Keymap: move left click select to a preference 2018-11-19 06:27:17 +11:00
64920a8feb GP: Harmonize Sculpt Struct and field names
Changed the following names:

- GP_EditBrush_Data->GP_Sculpt_Data
- eGP_EditBrush_Types->eGP_Sculpt_Types
- eGP_EditBrush_Flag->eGP_Sculpt_Flag
- eGP_BrushEdit_SettingsFlag->eGP_Sculpt_SettingsFlag
- GP_BrushEdit_Settings->GP_Sculpt_Settings
- GP_EDITBRUSH_FLAG*->GP_SCULPT_FLAG*
- GP_EDITBRUSH_TYPE*->GP_SCULPT_TYPE*
- GP_BRUSHEDIT_FLAG_*->GP_SCULPT_SETT_FLAG_*
2018-11-18 19:30:20 +01:00
991bb00762 GP: Rename GPENCIL_OT_brush_paint to GPENCIL_OT_sculpt_paint
This makes the operator name more consistent. Part of T57818
2018-11-18 18:07:16 +01:00
1b7b1d60c5 Fix T57835: Textured-fill layer opacity not working
This was an unsupported feature.
2018-11-18 16:28:57 +01:00
5e61fd7c23 Fix T57896: Crash updating grease pencil material preview 2018-11-18 15:56:57 +01:00
bbd4613ed9 Keymaps: make click event use position on button press rather than release.
This may improve reliability with left click select and pen input, assuming
that the place where the pen first touched the surface is closer to the
intended location than where it was released from the surface.

I'm not sure if this will make a significant difference in practice, but it
seems worth a try.
2018-11-18 12:21:55 +01:00
c1e1ea5b8f GP: Set Rim Blur default to 0 2018-11-18 10:21:37 +01:00
0cac506f6e Keymap: preference to swap space/shift-space keys
This option is for animators who may not use the tool-system much
(mostly staying in object/pose-mode with the transform-tool active).
2018-11-18 13:43:44 +11:00
c57951d903 Keymap: add user-prefs to the default keyconfig
Currently the only option is to use select-all as a toggle.
2018-11-18 12:45:14 +11:00
50a4a899fd Keymap: Default pref for select-all to toggle
Access in the UI next.
2018-11-18 12:39:31 +11:00
d5c751012b UI: show active keymap user preferences 2018-11-18 12:32:35 +11:00
0f1a63d34c PyAPI: add bpy.utils.execfile
Wraps `importlib.util`, avoids duplicate preset loading calls.
2018-11-18 11:49:03 +11:00
f520f01b46 Cleanup: tweak to keymap layout args
Needed to support user-keyconfig draw call.
No functional changes.
2018-11-18 11:16:25 +11:00
d5e61240ae GP: Set Thickness default to 2
New modifiers have thsi default value.
2018-11-17 19:28:58 +01:00
65fa5a1926 Eevee: Optimize Color Ramp node for common cases. 2018-11-17 18:20:10 +01:00
68b670698f Eevee: Fix SSR/SSS when the bsdf nodes are inside groups 2018-11-17 17:08:21 +01:00
c599aeaee5 GPU: Cleanup / Opti : Vectorize + MADD and remove unused function 2018-11-17 14:56:18 +01:00
735ad525a6 Fix T53750: Mirrored UV have bad tangent space
I feel silly because it was my fault all along! (see the WATCH IT warning)
2018-11-17 14:56:18 +01:00
0c987aa7ac BLI: Math: Add normal_float_to_short_v4 2018-11-17 14:56:17 +01:00
b4640ea020 DRW: Fix object wire appearing when object is drawn as bounds 2018-11-17 14:56:17 +01:00
9c378dc901 Cleanup: correct variable names 2018-11-17 22:23:25 +11:00
93cd8e2494 Cleanup: style 2018-11-17 22:23:25 +11:00
dab0bc7bf8 Cleanup: correct const usage 2018-11-17 22:23:24 +11:00
92d1e6606c Draw Manager: Fix memory leak 2018-11-17 00:23:17 -02:00
2c347ebbba Fix T57874: Crash due to IMM_BUFFER_SIZE when drawing cached frames...
... in the timeline.
2018-11-16 19:26:23 +01:00
64dc0f2685 UI: Eevee: Rename Volume Exponential Sampling to Distribution 2018-11-16 19:24:55 +01:00
b24b1ec74b Eevee: SSR: Only fade based on reflected pixel position
Not on reflector pixel position. This improve the feel of SSRs and the
final render quality.
2018-11-16 18:49:45 +01:00
1f458895f8 Fix crash when rendering a scene first and then goes to eevee preview modes and cleanup
The crash only occurs with Intel 3rd generation GPUs.
It occurs because the program needs to be used at least once in the opengl context in which it is created.
2018-11-16 13:46:13 -02:00
0d5b291b74 Cleanup: removes unused varyings 2018-11-16 12:43:46 -02:00
f6c2fb0eb6 Minor edits in effect_ssr_frag.glsl 2018-11-16 12:43:45 -02:00
e9eb80055b Cleanup: remove unused variable 2018-11-16 12:43:44 -02:00
33ac6c25b9 Fix T56673: Tara.blend from Blender cloud crashes on load
The issue was caused by dependency cycle solver killing relation
which was guaranteed various things: i.e. copy-on-write component
orders and pose evaluation order (which must first run pose init
function).

Now it is possible to prevent such relations from being ignored.

This is not a complete fix, but is enough to make this specific
rig to work. Ideally, we also need to run copy-on-write operation
prior to anything else.
2018-11-16 16:29:46 +01:00
91aa81b61d Fix T57850, bevel modifier crash with vertex groups and face area mode.
Used wrong Loop variable in this case.
2018-11-16 10:06:05 -05:00
54091d935f Fix inconsistent frame set event in graph compared to other animation editors. 2018-11-16 15:53:48 +01:00
d5ab6af864 Keymaps: some more tweaks for left click select based on user feedback.
* More tools now combine with select click by only starting on drag.
* Alt+LMB works again as loop select as alternative to double click LMB.
2018-11-16 15:28:56 +01:00
2589263b6e Fix related to T57851: broken normalmap handling in py shader wrapper.
Pretty stupid mistake...
2018-11-16 14:59:30 +01:00
be405495a9 Fix T57477: Switching between edit mode, and particle edit mode crashes 2018-11-16 14:22:35 +01:00
da344b4045 Merge branch 'master' into blender2.8 2018-11-16 14:05:05 +01:00
ec20d311da Call PRE_VIEW and POST_VIEW draw callbacks in movie clip editor 2018-11-16 13:59:16 +01:00
20963a6a06 PyTemplates operator_modal_view3d_raycast: update to blender2.8 (*/@) 2018-11-16 12:10:35 +01:00
50ba4762f6 Fix T57566: Blender 2.8 crashes with the new multires 2018-11-16 10:34:00 +01:00
c1f5ccb11a Keymap: allow filling in existing key-configs
Needed so we can get the preferences of a key-config
which are sent to a function that generates the contents.
2018-11-16 16:00:37 +11:00
cb79b691cd Cleanup: set variable for preference name 2018-11-16 15:00:27 +11:00
f54b239269 Keymap: add support for key-config preferences
This is needed for keymaps to define their own options,
which can include left/right mouse select.

This can also help to us to provide popular keymap tweaks as options,
so users can easily fit blender to their workflow with well supported
adjustments which don't give the overhead of having to maintain
your own keymap, which become out-dated when operators change.
2018-11-16 14:54:41 +11:00
77ff9a2006 Keymap: remove loading keymaps from old files
These keymaps are not going to work usefully in 2.8x,
remove support for loading them.
2018-11-16 12:30:02 +11:00
59f0db430a Cleanup: remove 27X define 2018-11-16 11:04:57 +11:00
a765403955 BKE: Fix probe duplication not duplicating data block 2018-11-16 01:03:13 +01:00
b24de94c29 Cleanup: de-duplicate 3d view select items 2018-11-16 10:51:33 +11:00
a915da221f Edit Mesh: Fixes display of custom normals
Should fix T57620
2018-11-16 00:45:22 +01:00
988c4259e5 Keymaps: add double click loop select to RMB keymap. 2018-11-16 00:37:30 +01:00
e18cc071f8 Fix Blender RMB keymap cursor being set when using border select. 2018-11-16 00:37:30 +01:00
8510ef02f9 Fix Blender 2.7 keymap missing spacebar search menu. 2018-11-16 00:24:52 +01:00
23c3124b56 Edit Mesh: Improve mesh cage drawing / fix errors and cleanup
* Fixes vertices with bad coloring. Now vertices draw with depth write so
they occlude the underlying face geom overlay, avoiding double drawing the
vertex.

* Decrease the z_offset of edges so they don't poke too much through
geometry. Also delete this offset in ortho view.

* Add zoffset to active and selected vertices so they always draw on top
if they overlap a non selected vertex.

* Fix alpha of edge_fix in vertex selection mode
2018-11-16 00:13:06 +01:00
Dalai Felinto
98765e3700 RNA: LayerCollection.has_hidden_objects
With this we have a way to tell that a collection has visible objects
but not all of its objects are visible.
2018-11-15 21:01:01 -02:00
bf7af31e9f Keymaps: left click select keymap changes
Both the active tools and selection are now on LMB, which leads to
various conflicts.

For that reason the LMB keymap now has a couple of differences
compared to before. These changes do not affect the RMB keymap.

* Context Menu: W -> RMB
* Select Tool activate: None -> W
* Set Cursor: RMB -> Shift+RMB
* Loop Select: Alt+LMB -> double click LMB
* Mask Feather Vertex Slide: Shift+RMB -> Ctrl+Shift+RMB
* Node Select: only with LMB now, no RMB

The idea behind the W key Select Tool shortcut is that various
tools can't be combined with selection, unlike the RMB keymap.
So this works as a quick shortcut to drop a tool
and go back to selection.

Tools: set Select Box tool as default, rather than Cursor.

This goes along with coming LMB select keymap changes,
where we want the user to be able to LMB click to select by default,
rather than set the cursor.
The cursor will still be directly setabble with shift+RMB.
2018-11-16 09:54:50 +11:00
5215c42e3c Revert "Keymap: remove 3D cursor keymap"
This reverts commit 8ecc51e87f.

This is needed for keymaps that dont include cursor placement by
default.
2018-11-16 09:44:19 +11:00
0f21b64b1a WM: fix hard coded rename
Currently the filenames are used when setting keymaps.
This hard coded naming meant the preset and setting function
need to be kept in sync.

Prefer to not have hard coded replacements which need to be duplicated.
2018-11-16 09:37:18 +11:00
be66428a8f Error in recent keymap update 2018-11-16 09:23:48 +11:00
e0a30aef19 WM: Fix secondary toolbar events being ignored
Error in recent workaround.
2018-11-16 09:19:33 +11:00
088be7eb2f Keymaps: replace select / action mouse system
For Blender builtin configurations the option to choose the select mouse remains
and is now also in the splash screen. It works by changing the keymap dynamically
in the script, rather than using special events.

The system of automatic switching of events was not flexible enough to deal with
side effects that require further keymap changes, so it is now under more manual
control in the script.

This breaks compatibility for some scripts and exported key configurations.
These can be fixed by replacing SELECTMOUSE, ACTIONMOUSE, EVT_TWEAK_S and
EVT_TWEAK_A with appropriate LEFTMOUSE, RIGHTMOUSE, EVT_TWEAK_L and
EVT_TWEAK_R events.

Other than that, there should be no functional changes.
2018-11-16 08:31:00 +11:00
8ecc51e87f Keymap: remove 3D cursor keymap
Rely on 3D view keymap, fixes T57843
2018-11-16 07:59:00 +11:00
ffa461f13c Eevee: Add Filter Quality setting
This setting can be tweaked to improve glossy reflection cubemaps.

It increases the sample count for each roughness level.
This settings affect the lookdev mode quality as well.
2018-11-15 20:04:47 +01:00
1b321048a7 Eevee: Add Glossy Reflection clamping
This enables reducing the noise comming from very bright light sources
(like a sun) that can be found in distant HDRIs.

The lost energy may be replaced manually by a sunlight that compensate the
this loss.

This clamping only concerns Reflection Cubmaps and is done on all on all
of them.

Setting to 0.0 disables it (default).
2018-11-15 20:04:47 +01:00
Dalai Felinto
f8964809b8 Viewport collections visibility: Viewport and Selection options
Right now we have a different behaviour whether users click on the name or on
the visibility eye.

When clicking on the eye, it is a toggle. When clicking in the name, you
are isolating this collection (unless you use shift).

As for the UI I tried using separator_spacer, but it was more work than
worth. A lot of sub panels, and LEFT/RIGHT alignment work just fine.
2018-11-15 16:59:42 -02:00
Dalai Felinto
0ff424b299 Viewport collections visibility: Remove collection icon
I added the icon inspired by the H menu, but there is no need for this.
2018-11-15 16:49:20 -02:00
Dalai Felinto
d9abb0eaae Explicitly disable separator spacer in popover and pie menus
It is doable to get it to work, you just need to process it line
by line though, and get the right width of each one.

Disabling it for now since it is not implemented anyways.
2018-11-15 16:48:23 -02:00
26ea8cd2d0 Fix tool error opening Sculpt template. 2018-11-15 18:48:29 +01:00
d1ff122db6 Templates: set autosmooth threshold to 30°, matching default for new meshes. 2018-11-15 18:35:57 +01:00
113a70808c Fix T57854: Disable viewport visibility crash 2018-11-15 18:29:02 +01:00
c2164e579c Eevee: Add irradiance smoothing
This is a parameter that will make the interpolation between irradiance
cells of a same Irradiance Volume smoother, reducing the weight of the
light leaking correction factors.

It is usefull in some cases to avoid harsh lighting transition that can
happen when a sample point it near a surface.
2018-11-15 18:16:30 +01:00
11b3954346 Eevee: Irradiance Grid: Make the influence shape corners round
This makes it easier to add corrective light grids without having ugly
blending corners revealing the shape of the grid bounds.
2018-11-15 18:16:30 +01:00
21b0f74a6f Eevee: Lights: Reduce default cascade distance 2018-11-15 18:16:30 +01:00
7ced0d3cc0 Eevee: Cleanup & small optimization 2018-11-15 18:16:30 +01:00
516e000aa9 Eevee: Add Light Threshold value
This is an important change. Starting from now, all lights have a finite
influence radius (similar to the old sphere option for BI).

In order to avoid costly setup time, this distance is first computed
automatically based on a light threshold. The distance is computed
at the light origin and using the inverse square falloff. The setting
can be found inside the render settings panel > shadow tab.

This light threshold does not take the light shape into account an may not
suit every case. That's why we provide a per lamp override where you can
just set the cutt off distance (Light Properties Panel > Light >
Custom Distance).

The influence distance is also used as shadow far clip distance.

This influence distance does not concerns sun lights that still have a
far clip distance.

---

This change is important because it makes it possible to cull lights
an improve performance drastically in the future.
2018-11-15 18:16:30 +01:00
d082b18d87 Eevee: Optimisation: Bypass light power calculation when not needed
This makes quite a big improvement in my case 1.8ms vs 2.3ms for a single
area light.
This will make even more difference with light attenuation.
2018-11-15 18:16:30 +01:00
d0b0e7efed Eevee: Cleanup: Fix wrong sun area light power calculation 2018-11-15 18:16:30 +01:00
f3074b96d6 Eevee: Make sun power match cycles better.
I made an empirical test with a 100% diffuse sphere and manually tweak the
lighting power of a sun lamp trying to fit cycles and eevee the best I can.

Then I plotted the result and found a rough fit to the equation and that
seems to work pretty well.
2018-11-15 18:16:22 +01:00
cfb6f14616 Fix node_shader_utils: "Specular Tint" is a float (not a color) 2018-11-15 17:52:40 +01:00
e6276e1748 RNA: always allow fallback from defaultarray to defaultvalue.
The python getters for the array already allowed that, but not the
actual C RNA access functions. This is inconsistent, so implement
the fallback in all cases. Now if by default the property should
contain the same value in all positions, it is not necessary to
actually use an array.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3940
2018-11-15 19:42:03 +03:00
8610b57271 Cycles: Cleanup, code style 2018-11-15 17:19:26 +01:00
c617fcad10 Merge branch 'master' into blender2.8 2018-11-15 17:17:37 +01:00
cd9ab9d99e Cycles: Cleanup, code style 2018-11-15 17:16:40 +01:00
4fbde56f51 Py API: Fix documentation/actual behavior missmatch in gpu.matrix 2018-11-15 17:10:32 +01:00
4d04235d5f Py API Docs: Fix formatting 2018-11-15 16:54:29 +01:00
7291996f3b Fix T57825: Crash when assign material
We need to make sure that all the nested node trees are localized.

Because of this reason, we need to roll back to a bit older way
of dealing with materials.

Should be all safe now with the fixes from few moments ago.
2018-11-15 16:50:30 +01:00
637d5ab635 Depsgraph: Clear localization tag for CoW IDs
They are self-contained now, and should not cause any sync or
free happening when freeing them.
2018-11-15 16:38:20 +01:00
ba9bd979f1 Tag all localized ID types as such 2018-11-15 16:36:35 +01:00
9edff9ce9b Remove legacy node tree localization tag
Is stored on ID level now.
2018-11-15 16:35:28 +01:00
c5219abd74 Followup to the previous commit
Thought this is to be fixed in master first. Turns out, nope :)
2018-11-15 16:33:00 +01:00
d546269de8 Cleanup: Double semicolon at the end of line 2018-11-15 16:32:18 +01:00
9d52ff1ced Fix strict compiler warnings/errors 2018-11-15 16:31:26 +01:00
61ee2f0db8 Merge branch 'master' into blender2.8 2018-11-15 16:28:37 +01:00
74fdf68a41 Cleanup: Comments 2018-11-15 16:28:07 +01:00
2aa0a69015 Splash: tweak quick setup to use single column style layout. 2018-11-15 15:26:53 +01:00
8dbf0957f6 Keymaps: add select with left / right option to quick setup splash screen. 2018-11-15 15:12:48 +01:00
Dalai Felinto
098e807f9e Viewport collections visibility popover
This brings the functionality currently in the H shortcut, to hide/show
individual collections.

In order to convey hierarchy, and to make justice to the originally
intended 1-10 shortcuts, we group the collections per siblings.
2018-11-15 11:52:00 -02:00
Dalai Felinto
b85886f8d5 LayerCollection RNA API util functions
* has_objects()
* has_visible_objects(view_layer)
* has_selected_objects(view_layer)
2018-11-15 11:51:57 -02:00
Dalai Felinto
570e37261d Hide collections menu: ignore excluded collections
Note: I didn't change the shortcuts, I think this is a separate decision
to be made. I just want at the moment to have the H operator to mimic
the upcoming popover.

Personally if we are to keep the 1-10 shortcuts (and they do work) I
think we should skip the excluded collections altogether.

In fact we could have an option to hide them from the outliner too.
2018-11-15 11:51:57 -02:00
bdca863956 Units: Identifiers in Python
I only specified the identifiers for the units that are actually accessible for now.
This way we can postpone some decisions for now. E.g. if it should be `METER_SQUARE`, `SQUARE_METER`, `METER_SQ`, ...

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3945
2018-11-15 14:40:22 +01:00
cdfc128267 Fix T57848: Transforming large linked instances freezes Blender 2018-11-15 13:55:15 +01:00
71fd7e610a Keymaps: minor code refactor after adding tools to default preset. 2018-11-15 12:50:33 +01:00
9a9ca5e40b Depsgraph: Build all type of IDs for modifiers and constraints
It was missing handling of collections there, which caused collection
used for smoke colliders to not be in the dependency graph.
2018-11-15 12:48:55 +01:00
William Reynish
c3e2b40a91 Icons: sculpt tool updates r62157
- Blue = Add/Subtract
- Yellow = Flatten/Contrast
- Red = Grab
- Grey = General/Other
2018-11-15 22:32:38 +11:00
William Reynish
165c447691 Tool System: add curve tilt tool 2018-11-15 22:31:47 +11:00
William Reynish
93b373060f Icons: add tilt tool 2018-11-15 22:31:42 +11:00
d2c41293a0 Fix T57831: Crash with multi-select / delete of the same object in Collection outliner.
Tssst… that piece of code should have been removed when we got rid of
bases here, kind of obvious it would break if object pointer itself is
NULL! And since deleting an object clears its ID pointers in outliner
tree, this fixes for free the issue of deleting several time the same
object (being selected in several collections at once).
2018-11-15 12:26:55 +01:00
e318da5350 Remove unused parameter. 2018-11-15 14:19:35 +03:00
90cf9bcc7d Depsgraph: Make drivers builder less noisy
Do early output when trying to add target relation with wrong rna_path.

We can't do anything reliably in that case anyway, so hopefully it is
a no-functional-change for artists, just avoids noisy error prints in
the terminal.
2018-11-15 12:13:28 +01:00
a575c508fe Stretch To: fix initialization of the constraint with copy-on-write.
The constraint is supposed to automatically initialize the rest
length when it is first evaluated, so now that evaluation is done
on a separate copy it also has to copy the value to the master
instance - or newly created constraints will be broken.

Since this is supposed to happen once at constraint creation,
implementing as a search for now instead of adding new fields.
2018-11-15 14:10:24 +03:00
773110f848 Depsgraph: Save memory by ignoring invisible objects
This finished old standing TODO which was attempting to
ignore objects of all invisible collections.

The difference here is that we remove invisible bases from
view layers. This guarantees that the evaluated state is
consistent and does not reference original objects.
2018-11-15 11:43:12 +01:00
156fe74f91 Depsgraph: Fix/workaround crash after recent point cache changes
For some reason relations can not always be found. This is to be
investigated, but doesn't hurt to be safe here. Also allows to
unlock production.
2018-11-15 11:43:12 +01:00
4a3a4eef14 Depsgraph: Use more human readable relation keys identifier 2018-11-15 11:43:12 +01:00
48c137ad5d UI: remove node tree panels
This duplicates items in the add menu and uses a lot of vertical space.

This should be used for tools or disabled.
2018-11-15 19:36:32 +11:00
b8d21f9b9b Cleanup: typo, whitespace 2018-11-15 18:50:18 +11:00
5ec1d709e7 WM: use Python bytecode cache to run presets
Key-maps can be very large, avoid parsing on every startup.
2018-11-15 18:46:00 +11:00
49cd13768f UI: 'Add Object' rename dimensions
D3943 by @Zachman w/ edits
2018-11-15 17:44:50 +11:00
7c03365861 WM: use spacebar press event (not double click)
Functionality) is nicer but this uses a hack to make it work,
keep the code under a variable in case we want to remove.
2018-11-15 17:12:33 +11:00
02a21420e8 Fix gizmos in the node editor 2018-11-15 15:43:50 +11:00
8c7727946c Gizmo: tweak navigation drawing for axis views
Axis aligned views now show both small/large handles,
this makes it possible to well if the view is in front or behind.
2018-11-15 14:11:08 +11:00
b3d84853ac Keymap: remove keymap export that wrote API calls
Use new keymap format which defines data to be loaded.
2018-11-15 13:51:55 +11:00
8734a09379 Tool System: use preset keymap loading logic
The data structures for tool keymaps and presets were different,
use the same structure and expose function publicly.
2018-11-15 13:38:27 +11:00
349d85eb9e Missed when moving tool keymaps 2018-11-15 13:34:47 +11:00
02d77e5bf5 Keymap: use parameters for tool keymap 2018-11-15 12:54:44 +11:00
27eba3867a Keymap: move tool system keymaps into the default keymap
Note that tools can still define their keymaps,
since it's useful for add-ons.
2018-11-15 12:45:45 +11:00
c94f806dc7 WM: remove warning when toolbar not found
Not useful for general usage, so removing.
2018-11-15 09:51:37 +11:00
3ecc79fa1a Gizmo: use color fading to show depth for navigate
Previously the positive axis was always brighter,
now use bright colors which face towards the view.
2018-11-15 09:44:03 +11:00
28e7c94de2 Gizmo: minor fix for navigation axis color
When view aligned, the near axis was hidden,
making it seem as if the opposite axis was at the front.
2018-11-15 08:17:16 +11:00
d04947b422 Gizmo: skip text drawing w/ select for navigate
Also use struct for storing extra args.
2018-11-15 07:59:03 +11:00
78207eac9b Py API Docs: New custom shader example 2018-11-14 18:41:33 +01:00
6f08124fbd Fix assert in bevel modifier with certain geometry.
This happened in in the barbershop_interior.blend benchmark file, seems
duplicate hash entries are ok for this algorithm.
2018-11-14 18:21:28 +01:00
a4fccde67a Fix some templates for 2.8. 2018-11-14 18:21:06 +01:00
844c7440fc Fix (unreported) bpy.ops.wm.read_factory_settings(use_empty=True) crash.
`BKE_blendfile_read_make_empty()` was not preserving workspaces...
2018-11-14 18:21:06 +01:00
e20557046b Depsgraph: suppress logs from add_relation on invalid driver variables.
Rig generators (e.g. rigify) use dummy drivers to attach extra
ID references to rigs for Append/Link. These references use
Single Property variables with empty path, which is intentionally
invalid and shouldn't produce low-level error logs from depsgraph.

The removed code would always print an error because RNAPathKey
requires a valid path to produce a non-NULL reference.
2018-11-14 20:18:48 +03:00
10bab568d3 Fix assertion failure evaluating depsgraph on an empty armature.
If there are no bones, chan_array may not be allocated.
2018-11-14 19:15:41 +03:00
b44e6f2b3d Fix T57760: Depsgraph 'object_instances' showing incorrect list of objects.
It appears that Python gets next item before using current one, which
would break our Depsgraph instance iterator (since only current item is
valid there, we use the same memory at each iteration).

Working around that with an ugly ping-pong game between two sets of
iterator data, so that previous one (C RNA-iterator-wise) remains valid
memory for Python to access to.
2018-11-14 17:07:02 +01:00
d2dd278c5e Fix typo in comment. 2018-11-14 17:07:02 +01:00
b785586232 Fix T57558: Outliner displaying same object twice in some cases.
Logical flaw in `BKE_scene_objects_iterator_begin()` code (two errors
actually, wrong handling of first object of Master collection, and
missing call to `object_base_unique()` to 'register' that first object
and avoid getting it returned a second time).

Simply fixed by always calling `BKE_scene_objects_iterator_next()`
after minimal proper init, that one knows how to do the things. ;)
2018-11-14 17:07:02 +01:00
46ac317a29 Py API Docs: documentation for gpu_extras.presets 2018-11-14 16:43:48 +01:00
eefae747da Depsgraph: Remove meaningless evaluation mode
With the current implementation it only confuses logic around
checks like vewport/render subdivision levels.

If this mode is really needed for any decision making, implement
this properly.
2018-11-14 14:08:39 +01:00
d3c08b1aa6 Depsgraph: Fix missing point cache reset when physics changes
Among all the lines moved around, the general idea is quite simple.
Actually, there are two ideas implemented there.

First one, is when object itself is tagged for update, we tag its
point cache component for evaluation, which makes it so point cache
is properly reset. We do it implicitly because otherwise we'll need
to go everywhere and add explicit tag in almost all the properties.

Second thing is, we link all collider and force fields to a point
cache component using special type of link. This type of link only
allows flush if change is caused by a user update. This way reset
does not happen when change is caused due to animation, but will
properly happen when user causes indirect change to the objects
which are part of physics simulation.
2018-11-14 14:08:39 +01:00
1d8db50538 Depsgraph: Remove unused operation code 2018-11-14 14:08:39 +01:00
39cd872acb Add function to query whether object has any point cache 2018-11-14 14:08:39 +01:00
ec2fea733b Make object point cache iteration more generic
Currently should be no functional changes, but this will
simplify implementing some incoming logic.
2018-11-14 14:08:39 +01:00
fdd1fea851 Depsgraph: Cleanup, code style
Should be no functional changes.
2018-11-14 14:08:39 +01:00
1386a4a0f2 Gizmo: get background color based on view option 2018-11-15 00:05:54 +11:00
69a04c6140 Cleanup: correct flag comparisons
Also use smaller types for shading data.
2018-11-14 23:31:06 +11:00
69a9bcc206 minor cleanup 2018-11-14 13:06:11 +01:00
61ecd3d24e minor cleanup 2018-11-14 13:06:10 +01:00
4722003ca5 Fix icon in Clip Editor header (Graph view type with enabled Filters)
fix provided by sebastian_k over IRC, thx!
2018-11-14 12:39:59 +01:00
57573e0da9 Fix copy tracking settings operators
use keyword arguments
2018-11-14 12:39:59 +01:00
8778656692 minor api docs fix 2018-11-14 12:33:10 +01:00
92166ecd91 Py API: Remove GPUShader.transform_feedback_enable/disable
It couldn't really be used in the current implementation, so it is better to remove it instead of confusing everyone.
2018-11-14 12:27:09 +01:00
5c27c76ed3 Depsgraph: fix relations for drivers on bone weight in Armature constraint. 2018-11-14 14:01:40 +03:00
43ee433dce UI: Comment out "Clip border" operator
Also Remove it from the UI as it has not been ported to 2.8 and it is a
delicate thing to do.
2018-11-14 11:50:37 +01:00
c3d03b4434 Lamps: Remove HEMI light type
This type is not supported by either Eevee or Cycles. If other types of
lamps are needed by external engines, we should support adding custom types.
2018-11-14 11:50:37 +01:00
0b0b3d7f7e Keymap: assigning keys for tools now checks mode
Adding shortcuts to tools was always adding to the top-level window map.
2018-11-14 20:26:00 +11:00
f91b797b2b Tool System: remove duplicate gpencil draw UI
Tool properties showed options twice.
2018-11-14 19:19:04 +11:00
477407bd3b Gizmo: draw navigation negative axes over positive
Using low alpha meant it wasn't possible to see which was in-front.
2018-11-14 18:00:20 +11:00
cf6a101d23 Correct assert generating tool tip/keymap 2018-11-14 17:40:12 +11:00
55e719ec35 Merge branch 'master' into blender2.8 2018-11-14 17:21:34 +11:00
d7f55c4ff5 Cleanup: comment block tabs 2018-11-14 17:10:56 +11:00
c279f879ab Paint: remove brush select paint_mode
Instead check which property has been set.
2018-11-14 11:55:02 +11:00
2b3b481c3d Merge branch 'master' into blender2.8 2018-11-14 11:27:42 +11:00
b97a2c3688 Cleanup: naming for paint modes
- Rename ePaint* -> PAINT_MODE_*.
- Use PAINT_OVERLAY_ prefix for eOverlayControlFlags.
2018-11-14 11:20:08 +11:00
91d0c7f979 Fix gizmo handler initialization w/ quad-view
It's not enough to get the active window region,
now the region is passed in as an argument.
2018-11-14 10:48:59 +11:00
Dalai Felinto
79fa8f193b Fixup for view3d collection name drawing when no active object 2018-11-13 21:33:29 -02:00
ae6e84471a Merge branch 'master' into blender2.8 2018-11-14 09:54:55 +11:00
c1d29ea783 WM: enforce descriptions being NULL or defined
Without this bugs slip through that don't null check the descriptions
since many were set to empty strings.
2018-11-14 09:47:23 +11:00
a5a86f3921 Cleanup: python doc-strings
Indentation & trailing space.
2018-11-14 09:26:53 +11:00
72369c638d Cleanup: python doc-strings
Indentation & trailing space.
2018-11-14 09:05:07 +11:00
Dalai Felinto
4a71102309 Add active collection to viewport "name" stats
Only visible when in object mode.

Most of the time we will have the active object not being a part of the active
collection. So it is important to clearly communicate what is the active
collection, so users know for instance where new or appended objects
will be added to.
2018-11-13 18:39:17 -02:00
Dalai Felinto
51a14b64d8 Add active collection to stats bar
Only show the collection name when in object mode.
It is not relevant in any other mode.
2018-11-13 18:34:38 -02:00
Dalai Felinto
42fbb8af83 Util to get collection UI name
Note we still have hardcoded IFACE_("Scene Collection") in the outliner.
I'm ok with getting of them as well, though no strong feelings here.
2018-11-13 18:14:14 -02:00
520f71b43a Fix tool keymaps not working properly after recent changes.
Not sure this is the best fix, but this should be working. Regardless it seems
good to tag active tool keymaps as such.
2018-11-13 21:02:40 +01:00
f9145bded3 Keymaps: minor code refactor to abstract some events, no functional changes. 2018-11-13 20:29:36 +01:00
ca6dd692b5 Keymaps: reload key configuration when changing select mouse.
For configuration scripts that want to change keymaps based on this setting.
2018-11-13 19:29:13 +01:00
c39d5a6c88 Fix T57708: Crash on Eevee rendering with SSR enabled.
Intel does not like dead code.
The driver for `Intel HD Graphics 4000` crashes in these cases.
2018-11-13 15:19:10 -02:00
b0d0179d60 Depsgraph: fix missing relations for drivers on ShaderNode properties.
Also fix duplicate driver to target relations due to a redundant line.
2018-11-13 21:11:09 +03:00
445d813c87 GP: Don't calculate fast drawing when playing 2018-11-13 18:53:42 +01:00
8a14306c38 Keymap: code refactor to makes some events changeable with parameters.
No functional changes.
2018-11-13 18:22:07 +01:00
7aae28af2d Keymaps: refactor loading of default keymap, fix bugs.
This refactors loading of key configurations to clear and refill existing
ones, rather than adding a new one and then removing the old one.

This fixes broken loading of non-default configurations after recent changes,
and prepares for future changes to make it possible to dynamically change
key configurations based on user preferences.
2018-11-13 18:22:07 +01:00
fe4df40f30 Fix crash when Python creates modal keymaps without items. 2018-11-13 18:22:07 +01:00
81caa7fd6d GP: Fix wrong fill texture when draw primitives 2018-11-13 17:09:29 +01:00
c2dc5dfa0d GP: Fix wrong fill after subdivide 2018-11-13 17:09:28 +01:00
9caa587519 Py API Docs: Remove older GPUOffScreen example
I think this example does not belong into the api docs and certainly not in the place where it was until now.
Maybe this can become a template in Blender but personally I don't see much value in it as an "official example" because it is hard to see what is going on exactly.
There are a few other examples that show how to use the GPUOffScreen object now.
2018-11-13 16:43:17 +01:00
3aa30406dd Py API Docs: New Example for off screen rendering 2018-11-13 16:38:12 +01:00
dc6ba4f2ec Py API: fix parameter order in offscreen.draw_view3d 2018-11-13 16:23:31 +01:00
77238819f4 Python GPU API: gpu_extras.presets.draw_texture_2d
Review wasn't finished yet, but I just commit this for now so that I can make some progress..

Differential Revision: https://developer.blender.org/D3901
2018-11-13 16:20:16 +01:00
c8975b0fc7 Py API Docs: GPUVertFormat documentation 2018-11-13 15:25:51 +01:00
444f1fd423 Py API Docs: Cleanup 2018-11-13 15:25:51 +01:00
3f478f4260 Py API Docs: GPUIndexBuf documentation 2018-11-13 15:25:51 +01:00
4e1057780b GP: Remove redundant texture attachment 2018-11-13 13:44:56 +01:00
6ae84ddc6e Py API Docs: GPUBatch documentation 2018-11-13 13:00:18 +01:00
de36a2f99b Fix T57794: Text in Clip Editor Dopesheet not visible
Maniphest Tasks: T57794

Differential Revision: https://developer.blender.org/D3937
2018-11-13 12:04:46 +01:00
34058c4ff1 Fix T57105: Baked Particles could not be rendered as expected
Same fix as for smoke (and is what caching proposal is AFAIK):
share cache between copied and original objects.

One thing which is still missing to be fixed is to make auto-cache
more reliable. It was already kind of broken, so don't think it
should be a stopping factor for this fix.
2018-11-13 11:39:02 +01:00
647a798076 Workbench: Volume: Fix slice display opacity 2018-11-13 11:22:29 +01:00
14e4fb2773 GPU: Fix crash at startup 2018-11-13 11:22:28 +01:00
f4d4f50212 UI: move gpencil paint into topbar only layout
Tool properties were duplicating UI elements.
2018-11-13 20:59:25 +11:00
4503c96a17 Cleanup: remove redundant checks 2018-11-13 17:04:57 +11:00
aab959d71c Cleanup: split object mode out of tool checks 2018-11-13 16:58:29 +11:00
b657e9875c Tool System: use enum for gp sculpt/weight paint
Fixes T57525
2018-11-13 16:52:39 +11:00
3437cd9ac2 Cleanup: add arg to GP_EDITABLE_STROKES macro
Without this, we use arguments defined in the macro
making code hard to read.
2018-11-13 15:07:10 +11:00
184ab749c3 Merge branch 'master' into blender2.8 2018-11-13 14:25:36 +11:00
fe566a30f3 Cleanup: use lowercase 2d/3d in function names 2018-11-13 14:21:42 +11:00
97062a1b9b Cleanup: use doxy groups 2018-11-13 14:16:23 +11:00
ab2fa6d3f4 Keymap: more more standard keys for select tools
This uses shift to extend, ctrl to de-select, both to intersect.
2018-11-13 14:05:20 +11:00
b323167600 GP: box/lasso support for select-operations
This adds support for more adbvanced select operations
matching 3D view select operators.

Also de-duplicate box/lasso select code.
2018-11-13 14:04:00 +11:00
ed4f204d86 WM: default operators to replace selection
Tools now default to creating new selection.
2018-11-13 14:02:28 +11:00
bba868ebf9 Cleanup: use const args 2018-11-13 13:28:43 +11:00
9879ea8a53 Cleanup: remove unused source 2018-11-13 09:38:02 +11:00
e17843782c Cleanup: use namedtuple for KeymapParams
Prefer immutable types where possible.
2018-11-13 08:58:53 +11:00
6844f7eb0c Merge branch 'master' into blender2.8 2018-11-13 08:25:50 +11:00
77a5250975 Eevee: Hide Sprite threshold as it is not implemented yet 2018-11-12 21:18:10 +01:00
6ba7345ca5 Workbench: Volumes: Fix volumetrics step length calculation
Step size is now one voxel diagonal.
Fix T57678 Culling of smoke depending on view direction
2018-11-12 21:15:58 +01:00
3eb7928406 Workbench: Volumes: Fix volumetrics rendering twices 2018-11-12 21:12:34 +01:00
20d06eb3a8 WM: avoid string replace w/ appconfig-activate
Better construct an exact path, this would fail if the path exists
multiple times in the string.
2018-11-13 07:02:51 +11:00
d941f40c21 Fix T57571: Blender crashes on UV transformation
That was caused by a thread safety issue on gpu_batch_presets_unregister()
which was not designed to be used for this kind of situation (managing 3D
meshes batches).
2018-11-12 18:07:01 +01:00
7f2401532e style fix 2018-11-12 18:04:48 +01:00
bb39e33d25 Fix: draw_circle_2d not using the segment count from parameter list 2018-11-12 17:54:51 +01:00
15a5cc6ca0 Py API Docs: another use case for offscreen rendering 2018-11-12 17:54:51 +01:00
c34c688b47 Fix build: min and max not found. 2018-11-12 19:36:31 +03:00
3b9700aa51 Remove AnimMapper: it has been left unimplemented for almost ten years.
It was supposed to be a feature for substituting RNA paths on the
fly, but has never been implemented, apart from a couple of structure
definitions and passing around some always-NULL pointers. Now it gets
in the way of refactoring NLA evaluation to use GHash for efficiency.
2018-11-12 19:36:31 +03:00
406452ec5d Py API Docs: Another example for offscreen rendering 2018-11-12 17:17:59 +01:00
583bc70435 GP: Hide cursor in some modes 2018-11-12 16:56:50 +01:00
c199040438 UI: Scale control points on curve map when zooming
Mentioned by Pablo on Blender Today : https://www.youtube.com/watch?v=67NIL5A-07c @ about 27:47

Differential Revision: https://developer.blender.org/D3902
2018-11-12 14:18:35 +00:00
36d25fc81b GP: Cleanup unused code 2018-11-12 14:31:55 +01:00
314048b195 GP: Change View icon for annotations 2018-11-12 14:31:55 +01:00
aee0446b6b Add a lot of update tagging to operations with NLA tracks and strips. 2018-11-12 16:18:33 +03:00
36a3a40033 Eevee: Fix ESM not working after a certain distance
This was caused by overflow caused by the background and precision during
filtering.
2018-11-12 13:50:22 +01:00
e51dae4af8 Eevee: Fix lamps shadows not updating correctly
This was visible if the lamps was out of frustum.
2018-11-12 13:50:22 +01:00
150218e58b Ruler Tool: Fix non readable text
The ruler tool is using a hard coded background color. Invert it if the
text color is bright. In the future we should maybe use a theme color
instead of guessing as it does not work well with middle gray colors.
2018-11-12 13:50:22 +01:00
b44ea9f8bb Ruler Tool: Fix text background glitch
It was using UI_draw_roundbox_aa which is not available when drawing with
the view3d opengl context (because of VAO not being shared). Replace with
simpler rect box. Of course it's a bit more ugly but at least it's working.
2018-11-12 13:50:22 +01:00
ded780f13e Py API Docs: fix typos/wording
found by Omar Ahmad
2018-11-12 13:48:31 +01:00
3a05331445 Merge branch 'master' into blender2.8 2018-11-12 12:16:31 +01:00
d23a53c74a Cycles: Fix/workaround for gcc-7.2
For some reason when building with gcc-7.2 (which is default
in previous Ubuntu LTS) the guarded allocator is not being
properly instantiated.

Doesn't happen with newer version of gcc-7 which is 7.3, and
also doesn't happen with gcc-6 and gcc-8.

Would be nice to know what is wrong, but for the time being
committing workaround which keeps Blender users happy.
2018-11-12 12:16:07 +01:00
492dbae4d1 Py API Docs: Restructure gpu module introduction 2018-11-12 12:14:18 +01:00
e37a6be9e1 Fix T57766: error in Quick Effects > Quick Fur
Maniphest Tasks: T57766

Differential Revision: https://developer.blender.org/D3933
2018-11-12 12:10:49 +01:00
a0022f80f4 Merge branch 'master' into blender2.8 2018-11-12 11:02:46 +01:00
e732c6af3b Cycles: Proper comment for closing header guard 2018-11-12 11:02:10 +01:00
b6ad300a13 Fix T57713: Object not selecteable after separate strokes
The object was duplicated in Edit mode.
2018-11-12 10:09:10 +01:00
df6530594f Fix T57527: GP draw takes events from gizmos
Add keymap flag to the gizmo handler so events can be handled
on the UI level and not get over-ridden by grease pencil.
2018-11-12 18:51:14 +11:00
5aeec31821 Fix hidden HUD region being used - zero winrct 2018-11-12 15:01:00 +11:00
30ed837473 Revert "Fix hidden action-zone interaction"
This reverts commit 03e5ba3183.

Causes T57729, will look into an alternative fix.
2018-11-12 14:31:28 +11:00
64b463c262 Revert "Fix for hidden regions becoming active"
This reverts commit 484faaea4f.

Causes T57729, will look into an alternative fix.
2018-11-12 14:27:47 +11:00
81ed1d7093 UI: don't show shortcuts in toolbar buttons
Restrict these to displaying in tooltips.
2018-11-12 14:05:54 +11:00
48ad67f4a3 Tool System: support for 'dropping' tools
While there is no support for dropping tools exactly,
the cursor tool supports a keyboard oriented workflow
which is often over-ridden by other tools key-maps

While many tools had shortcuts there was no fast way to get back to
the cursor tool.

Now double-tapping space sets the cursor tool
(as long as this tool doesn't have a key mapped).
2018-11-12 13:18:08 +11:00
8d2ca0b8ef Fix error clearing the popup toolbar keymap
Generating the keymap for the tooltip stopped shortcuts from running.

While this could be supported - the shortcuts show in the button,
so remove shortcuts from these tips.
2018-11-12 12:22:05 +11:00
89786d4e30 Add back layout context for toolbar popup
Removed when removing search.
2018-11-12 11:56:13 +11:00
423668765a Missed last commit 2018-11-12 11:19:30 +11:00
e58da0b6e8 UI: remove search from toolbar popup
Reduce toolbar clutter, keep it only for tool access.

This is available in the menu, users who need to access this can use
the direct shortcut.
2018-11-12 10:46:09 +11:00
fb70ee0bb5 Cleanup: minor gpencil changes
- Replace BKE_brush_getactive_gpencil -> BKE_paint_brush
  (no need for per-paint-type brush access).
- Rename TOT_GP_EDITBRUSH_TYPES -> GP_EDITBRUSH_TYPE_MAX
  (avoid sharing prefix w/ unrelated constants).
- Rename instances of `GP_EditBrush_Data` to 'gp_brush'
  (`Brush` is typically called 'brush').
2018-11-12 09:59:16 +11:00
9c3e324a0d Fix headless build 2018-11-12 09:18:45 +11:00
92263b67eb Update test, missed when changing Object.select_set() 2018-11-12 09:05:38 +11:00
2fdd80ba1d GP: Use same name when duplicate datablock 2018-11-11 14:31:23 +01:00
fd65ebf39a Fix T57776: Error when adding a Torus to the scene.
Not all Object.select_set() cases had been updated to new API... Tsst. ;)
2018-11-11 11:22:38 +01:00
0dea135a36 NLA: fix frame mapping applied twice keyframing from graph/action editors.
The insert_keyframe function already applies NLA strip to action
time remapping, so doing it in insert_graph_keys/insert_action_keys
is redundant outside the code path that inserts directly into fcurve.
2018-11-11 12:42:13 +03:00
d81d77d17c Merge branch 'master' into blender2.8 2018-11-11 16:35:44 +11:00
89c2ff31d9 PyAPI: update keyword list 2018-11-11 09:37:26 +11:00
a48bc15707 GP: Change Thickness Text 2018-11-10 22:20:21 +01:00
473465aae2 GP: Add brush parameter to Shapes tools
Need the brush to define thickness and color of the primitive (line, box, circle)
2018-11-10 20:33:37 +01:00
2ff435adb4 GP: Fix mouse cursor problems
In some situations the check of the windows got false positives and the cursor was hidden by error.
2018-11-10 16:30:37 +01:00
fcf6f78d19 Fix (unreported) crash when deleting collection in freshly duplicated scene.
From startup .blend, add a 'full copy' new scene, and delete its
Collection 1.001 collection. That would make blender crash, once again
due to NULL collection pointer in some ChildrenCollection struct...
2018-11-10 16:22:41 +01:00
78ebb59604 GP: Reorganize Drawing Plane options 2018-11-10 13:19:20 +01:00
cabb918aea GP: Keep synchronized layer list in top bar
Now when the layer is changed, the list of layers and the topbar selector keep equal.
2018-11-10 13:06:44 +01:00
f1ae7f9cc1 GP: Autolock layers was not working with dopesheet
Also fixed a delayed update of the panels
2018-11-10 12:58:07 +01:00
e8251289d2 GP: Add to stats number of objects/selected
This information was not visible when select a GP object and can be useful.
2018-11-10 11:48:02 +01:00
William Reynish
c7d2b4530a Brush: re-order sculpt tool enum
Order is now used by the tool-system,
separators currently not supported.
2018-11-10 20:36:09 +11:00
9268de3a0e Cleanup: naming 2018-11-10 20:27:20 +11:00
f9378e5413 Merge branch 'master' into blender2.8 2018-11-10 20:02:33 +11:00
3756f920f4 BMesh: backport minor changes from 2.8 2018-11-10 19:56:02 +11:00
5a59327fb3 Cleanup: includes 2018-11-10 19:02:26 +11:00
0feeea1bd5 BMesh: avoid incorrect/invalid matrix calculation
- `BKE_object_scale_to_mat3` was used to get the worldspace scale,
  without taking constraints, parenting etc into account.
- Don't pass object's into BMesh API, (prefer matrices instead).
- Avoid matrix invert for each edge-angle calculation.
- Avoid 2x matrix multiplies when looping over edge pairs.
2018-11-10 18:55:03 +11:00
dc21ef7b86 Fix 'Load Factory Settings' loosing the keymap
Caused by recent move to Python based keymaps.
2018-11-10 11:04:32 +11:00
0121258770 Merge branch 'master' into blender2.8 2018-11-10 10:57:35 +11:00
7efac2b0b0 PyAPI: add imports arg to BPY_execute_string
Allows for avoiding `__import__` in expressions,
was already supported for BPY_execute_string_as_* API calls.
2018-11-10 10:55:04 +11:00
2f44ea68d3 Cleanup: style 2018-11-10 09:27:20 +11:00
4d5c87f101 Fix missing tips for some RNA Object API functions parameters.
Without description, parameters are not documented at all in API (not
even their type)... Always nice to have a short description anyway.

Also fixed a few other issues in existing descriptions.
2018-11-09 22:33:27 +01:00
2618d0e8e2 GP: Make Sculpt and Edit Toolbar consistent 2018-11-09 22:20:39 +01:00
0c1934f3c2 Multi-Objects: MESH_OT_select_similar worldspace completion
This makes the operator to work 100% with worldspace similarity:
* SIMFACE_PERIMETER
* SIMFACE_AREA
* SIMEDGE_FACE_ANGLE

Note from revisor (Dalai Felinto):

I'm not sure we want to pass Object * to the bmesh api, though I
personally don't see why not. Either way I group the patches together so
we can more easily roll them back if needs be.

Maniphest Tasks: T56948
Differential Revision: D3908, D3899, D3896
2018-11-09 17:19:04 -02:00
dc346c05fe GP: Add missing preset properties 2018-11-09 20:04:37 +01:00
e6b08b6306 GP: Hide Arrow cursor while painting
The arrow cursor is too intrusive
2018-11-09 20:01:41 +01:00
03ca79a509 GP: Remove duplicate shapes popover
Now the tools are in Toolbar
2018-11-09 19:48:25 +01:00
Dalai Felinto
221d078641 Multi-Objects Metaball: Selection refactor - fix pick and box selection
This is inspired/based on the code we use for armature bone selection.
Both pick selection, and box selection should be working now.
2018-11-09 16:40:43 -02:00
983a928e1d GP: Reorder Move to Layer to TopDown 2018-11-09 19:25:38 +01:00
a4bfccc439 Py API Docs: More gpu module documentation 2018-11-09 19:20:55 +01:00
6cbb6db987 Cleanup: fix layer_collection_sync() using int's for short values.
Collection flag and runtime_flag are shorts, not ints...
2018-11-09 18:43:08 +01:00
615e383ec2 Fix typo in assert that we do not delete master collection.. 2018-11-09 18:43:08 +01:00
William Reynish
89a66633f1 UI: split grease pencil brush curves into subpanels. 2018-11-09 18:06:25 +01:00
William Reynish
8aa17c5b12 UI: add edge markings to top level of edge menu again.
These are commonly used and should be quick to access.
2018-11-09 18:06:25 +01:00
8d07af5d10 Merge branch 'master' into blender2.8 2018-11-09 17:56:28 +01:00
65e9388440 Revert "Cycles: Cleanup, move Embree BVH logic to own file"
While we shouldn't have logic in an entry point, and since one should
not be making typos when moving lines around, there is bigger entanglement
issue with BVH host code using kernel function. This is bad violation,
but is tricky to get solved moments before the weekly.

In order to keep things in a (less) broken state than before own cleanup
reverting the changes.

This reverts commit 2bad10be96.
This reverts commit ddabb21d05
2018-11-09 17:54:09 +01:00
5494683651 Cycles: Free Blender side data as soon as we don't need it
Currently this is possible after built-in images are loaded in memory.
Allows to save memory used by dependency graph and copy-on-write.

In practice this lowers peak system memory usage from 52GB to 42GB on
a production file of spring 03_035_A.lighting.

Note, that this only applies to F12 and command line renders.

Bigger note, that this optimization is currently only possible if
there are no grease pencil objects to be rendered.
2018-11-09 17:53:02 +01:00
cbbf991f62 Cycles: Add name field to scene
Doesn't mean much for Cycles itself, but allows to have nice logs
and progress reports without access of original scene.
2018-11-09 17:53:02 +01:00
1ed31bef1a Draw manager: Expose grease pencil helper function 2018-11-09 17:53:02 +01:00
Dalai Felinto
49a7bcafd9 gpu.offscreen, fix pydoc, example and rename modelviewmatrix > viewmatrix
Technically this is only the view matrix, not model view matrix.
And view layer was missing from the pydoc.
2018-11-09 13:54:38 -02:00
6cb5340e01 RNA ID: forbid editing names of non-GMain IDs.
We even had an assert about that in setter callback!

That means that we do not allow editing names of evaluated IDs, nor
non-data-block IDs (mainly root nodetrees and scene master collections).
2018-11-09 16:51:09 +01:00
3d0383d259 Fix T57737: crash displaying expanded tooltip for transform tool
Maniphest Tasks: T57737

Differential Revision: https://developer.blender.org/D3923
2018-11-09 16:32:47 +01:00
0c8cf8fe7f Fix use of wrong icon IDs. 2018-11-09 15:39:57 +01:00
8bf5af7bd3 UI: Make Region overlap slide instead of fade
Requested by @billreynish.
Increases the TIMESTEP to 60Hz to have smooth animation.
2018-11-09 15:35:31 +01:00
36e6a41f6f Object Mode: Grid: Make antialiasing more grounded
Went a bit anal on this but at least we will have a decent AA reference
for lines in the future.
2018-11-09 15:35:31 +01:00
9c1c2a40bf Merge branch 'master' into blender2.8 2018-11-09 15:22:21 +01:00
e6573138f7 Cycles: Cleanup, remove unused method declaration
Was never defined. If it's really needed, consider using `const string&`.
2018-11-09 15:21:19 +01:00
78a6689aea Merge branch 'master' into blender2.8 2018-11-09 14:34:33 +01:00
Dalai Felinto
6c10ec74d5 Fix crash when renaming metaballs
This handles both renaming via outliner and rna.

Metaballs as we all know have their geometry based on the metaballs that
share the same name with them.

Changing the name of a metaball without tagging its geometry to change
is asking for trouble.
2018-11-09 11:01:55 -02:00
Dalai Felinto
88d621a68f BKE_id_is_in_gobal_main > BKE_id_is_in_global_main 2018-11-09 10:59:31 -02:00
Dalai Felinto
e49485a15c Greasepencil: double promotion cleanup and related 2018-11-09 10:01:22 -02:00
Dalai Felinto
494ba42254 GreasePencil: division by zero when stroke has one point
Error "runtime error: division by zero" when opening:
"Sketch 1 demo by Brain Graft.blend"
2018-11-09 09:57:37 -02:00
ab77f5b5fe Improvements on CURVE_OT_select_similar: SIMCURHAND_DIRECTION
Consider rotation and scale when calculating direction in world space.

Reviewers: dfelinto
Maniphest Tasks: T56948

Differential Revision: https://developer.blender.org/D3911
2018-11-09 09:39:46 -02:00
9ee9a257c9 UI: Fix checking for sequences. 2018-11-09 12:39:26 +01:00
ddabb21d05 Cycles; Cleanup, line length
There are some more sanitization which would be cool to be done
in the neighbourhood of those functions, but that could also happen
later.
2018-11-09 12:31:46 +01:00
2bad10be96 Cycles: Cleanup, move Embree BVH logic to own file
There is no way we can keep generic entry point functions easy to
follow if we start adding actual logic in them.
2018-11-09 12:28:55 +01:00
2d98b198e9 Cycles: Cleanup, indentation in preprocessor 2018-11-09 12:12:11 +01:00
3e76cc494a Cycles: Cleanup, indentation 2018-11-09 12:10:48 +01:00
203de0bbf0 Cycles: Cleanup, space after (void)
It was used in like 95% of places.
2018-11-09 12:08:51 +01:00
7c227e4740 Py API Docs: Warnings for some properties that are slower to access than expected. 2018-11-09 12:07:10 +01:00
2330cadb0f Cycles: Cleanup, don't use strict C prototypes
Those are more like a legacy of language, which is not
needed in C++.
2018-11-09 12:04:41 +01:00
c86d4b1d80 Cycles: Cleanup, split array from vector
Those are similar but different types, no reason to keep
their definitions in a single file.
2018-11-09 11:54:24 +01:00
395f0fdd48 UI: Fix bug when no sequencer strips were selected on a new scene.
Reported by Tintwotin on DevTalk. Thanks!
2018-11-09 11:53:20 +01:00
b394e05118 Cycles: Cleanup, some documentation 2018-11-09 11:46:09 +01:00
a15e631537 Cycles: Cleanup, remove unneeded manual constructors specification 2018-11-09 11:44:33 +01:00
0e9be6fd7d Cycles: Cleanup, remove unneeded method from vector
Since we've defaulted to C++11, no need to override this
method manually anymore.
2018-11-09 11:42:12 +01:00
cb4b5e12ab Cycles: Cleanup, spacing after preprocessor
It is supposed to be two spaces before comment stating which if
else/endif statements corresponds to. Was mainly violated in the
header guards.
2018-11-09 11:34:54 +01:00
ab73935dbb Cleanup, indentation 2018-11-09 09:46:12 +01:00
f47d2163c6 Correct error in last commit 2018-11-09 17:48:19 +11:00
26e904ab5c Icons: rename gpencil 2018-11-09 17:41:18 +11:00
77b925c9f8 Icons: update to r62155
- Tweaked GP toolbar icons and added Line, Rectangle & Circle.
- Added the remaining toolbar icons for all our paint & sculpt modes.
- Made all the toolbar icons the same simple style.
2018-11-09 17:33:50 +11:00
b1df82fc88 Cleanup: de-duplicate poll function 2018-11-09 17:18:38 +11:00
80a7c57e5e Tool System: add grease pencil primitive tool 2018-11-09 17:12:07 +11:00
39663fd049 UI: Decrease the fade in/out time of regions with region overlap on. 2018-11-09 03:26:50 +01:00
f96e7154f6 UI: tweak object type active state
The state of the objects visibility should only impact
the 'active' display of the select icon, not it's self.
2018-11-09 13:18:50 +11:00
7346c4f513 Cleanup: use proportional edit template for keymap 2018-11-09 13:14:48 +11:00
e81c1d3d48 Cleanup: use tuple instead of dict
This just loops over pairs so no mapping is needed.
2018-11-09 13:14:48 +11:00
87186f49cc UI: Tweaks to Object Types Visibility popover.
Replace checkbox for visibility with eye icon instead.
Thanks a.monti and zebus3d for the help.

Closes T57714
Part of UI Paper Cuts T56950
2018-11-09 02:58:35 +01:00
8a41de0f8c Cleanup: de-duplicate keymap items 2018-11-09 12:46:00 +11:00
e2a401f344 UI: Name added LightProbe objects after their type.
Just like Light objects do.

Thanks ThinkingPolygons from DevTalk forums for suggesting this!

See T56950
2018-11-09 02:18:05 +01:00
2c2c996a1b readme: remove 'game creation'. 2018-11-09 11:51:40 +11:00
dd96c8dda7 Merge branch 'master' into blender2.8 2018-11-09 11:51:14 +11:00
33039a4602 readme: use name 'macOS' 2018-11-09 11:49:49 +11:00
04cdf8d040 Keymap: skip loading the keymap preset in background mode
Caused a crash on exit and isn't needed.
2018-11-09 11:43:45 +11:00
3064da1200 Keymap: move builtin keymaps from C to Python
This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.

Notes:

- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/blender_default.py`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907
2018-11-09 11:33:06 +11:00
b43ce7908f Eevee: Fix broken Vector Transform node
The Camera to Object space matrix was not implemented in gpu_codegen.
2018-11-08 21:50:17 +01:00
4f11441913 Eevee: Add partial support for the Light Path Node
This makes it possible to tweak indirect lighting in the shader.

Only a subset of the outputs is supported and the ray depth has not exactly
the same meaning:

Is Camera : Supported.
Is Shadow : Supported.
Is Diffuse : Supported.
Is Glossy : Supported.
Is Singular : Not supported. Same as Is Glossy.
Is Reflection : Not supported. Same as Is Glossy.
Is Transmission : Not supported. Same as Is Glossy.
Ray Length : Not supported. Defaults to 1.0.
Ray Depth : Indicate the current bounce when baking the light cache.
Diffuse Depth : Same as Ray Depth but only when baking diffuse light.
Glossy Depth : Same as Ray Depth but only when baking specular light.
Transparent Depth : Not supported. Defaults to 0.
Transmission Depth : Not supported. Same as Glossy Depth.

Caveat: Is Glossy does not work with Screen Space Reflections but does work
with reflection planes (when used with SSR or not).
We have to render the world twice for that to work.
2018-11-08 19:20:40 +01:00
9d12a5aa9e Eevee: Fix geometry node for environments and support true_normal
Also minor cleanup for the Bump node.
2018-11-08 19:20:40 +01:00
1250ace641 Eevee: Fix refraction materials
Fix refraction depth not working without ScreenSpace Refraction.
Fix ScreenSpace Refraction masking reflections.
2018-11-08 19:20:40 +01:00
de8c2336ad Fix wrong selectability icon in viewport menu. 2018-11-08 19:06:42 +01:00
626ca4a2d5 Fix X-Ray option showing in LookDev mode, where it does nothing. 2018-11-08 19:00:53 +01:00
f17a5a96c2 Fix depsgraph console warning after recent changes. 2018-11-08 18:53:30 +01:00
c39f34def9 Fix Cycles viewport render info overlapping other text.
Now it shows more compact info below the view/object name. Render time and
memory usage is left out, as in most cases this is not so important. These
could be added back optionally if needed.
2018-11-08 18:31:33 +01:00
c81ddc97ef UI: Tweaks to Add menu in Video Sequencer Editor.
Mainly organization and bringing it closer to the Add menu in the 3D Viewport.

* Icons for most top-level items when available.
* New Transitions menu for Cross, Gamma Cross and Wipe.
* Move Color and Text to top level. These options are used way too often to be in a submenu.
Having a menu with 2 entries defeats the purpose, so I've removed it for now. I checked if
add-ons used it and apparently not. It can be brought back if needed.
* Avoid empty dropdown in Scene/Mask/Clip. Solution is ugly for now and should be improved in C.
* Some effects couldn't be used without 1 or 2 strips selected, now the menu entry is grayed out accordingly.
* Some more icons for other menus.
2018-11-08 16:01:26 +01:00
acb8334e70 UI: Some icons for Image menu in Image editor. 2018-11-08 16:01:26 +01:00
11a53ec28a Fix T57689: world nodes / texture not updating for Eevee.
Only do GPU material updates through depsgraph evaluation now. This was
already happening for material, just missing for the world.
2018-11-08 16:01:02 +01:00
d4370e2e00 Cleanup, compiler warnings in release mode 2018-11-08 15:49:25 +01:00
146b39a45d Merge branch 'master' into blender2.8 2018-11-08 15:15:29 +01:00
3cf724209f Cleanup, spelling 2018-11-08 15:00:19 +01:00
116be3deff Fix build on 32bit after Embree changes. 2018-11-08 14:58:01 +01:00
70355052e2 Fix: show options of image empty only for image empties 2018-11-08 14:30:27 +01:00
fe0fdf1771 RNA: tag animation update when changing Action Extrapolation/Blend/etc.
These fields affect the final result when using NLA.
2018-11-08 14:01:45 +03:00
0bb33294c1 RNA API: ViewLayers: add name to LayerCollection struct.
Just use Collection name (same as for material slots e.g.).

That way, one can access those by their names as well, in
LayerCollection.children ... collection property (yeah, collection,
collection, and moar collection).
2018-11-08 11:36:33 +01:00
aba4a56703 UI: fix glitch showing the redo panel 2018-11-08 15:44:59 +11:00
406f36f574 build: add proper embree support to platform_win32.cmake
made the use of findpackage optional and add support for debug builds
2018-11-07 19:34:49 -07:00
d3b11de7d6 build_environment: add debug libs for embree on windows 2018-11-07 19:33:07 -07:00
cd9f3019f4 build_deps_windows: add option to to only create project files. 2018-11-07 19:18:53 -07:00
47c77cd89c Cycles: Write Cryptomatte metadata according to the specification
Reviewers: brecht, sergey, swerner

Subscribers: creamsurfer, Tanguy, Noss, SteffenD

Differential Revision: https://developer.blender.org/D3862
2018-11-08 01:07:54 +01:00
5987c4bc57 Render API: Support arbitrary length for custom image metadata fields 2018-11-08 01:07:54 +01:00
a421cfa8d3 UI: hide bundled addons which haven't been updated
All are displayed when '--debug' is set, see: T56351
2018-11-08 10:10:08 +11:00
bcf1997ac2 Merge branch 'master' into blender2.8 2018-11-08 09:56:22 +11:00
9ccb70f202 Cleanup: minor simplification to user-addon check 2018-11-08 09:54:13 +11:00
f12d2adc87 RNA: Object.select_set use boolean, only select
- Was setting active state, making it necessary to backup/restore
  active object in cases where this isn't needed.
  Existing scripts are explicitly setting the active object when needed.

- Use a boolean select arg (toggle selection wasn't used anywhere).

- Add an optional view layer argument since scripts should be able to
  operate outside the user context.
2018-11-08 08:54:55 +11:00
c121bc6219 Cleanup: use explicit 'select_and_set_active' API name
Selection should be separated from active state and handled by higher
level code (operators/editors) instead of happening automatically.
2018-11-08 08:31:11 +11:00
bdd44564c9 GPU: Cleanups: Remove GPUMatType, Vectorize / MADD some operations 2018-11-07 22:16:13 +01:00
4f709152f4 Eevee: Add support for interpolation options for Environment Texture nodes 2018-11-07 22:16:13 +01:00
e0edac4cb2 Eevee: Support for extension type in the Node Image Texture
This does not work with the box projection mode. Implementing for box
projection mode would be difficult, slow, and produce a lot of code
duplication. Also i'm not sure this is worth it, as it's not a common use
case.
2018-11-07 22:16:13 +01:00
0b837a4986 Cleanup: style, use const args 2018-11-08 08:02:09 +11:00
64ec05b64d Cleanup: remove some useless BKE_library and BKE_main includes.
Makes it simpler to make some changes...

Also fix order of some includes (use alphabetical please).
2018-11-07 20:58:54 +01:00
1ff8be24ef Cleanup/Refactor: move Main stuff into BKE's new main.c file (and header).
We already had a BKE_main.h header, no reason not to put there
Main-specific functions, BKE_library has already more than enough to
handle with IDs and library management!
2018-11-07 20:58:53 +01:00
4b2110fc86 Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'
That kind of implicit includes should really only be done when totally,
absolutely necessary, and ideally only with rather simple 'second-level'
headers.

Otherwise not being explicit with includes always end up biting in
unexpected ways...
2018-11-07 20:58:53 +01:00
4779165ca1 Fix dpesgraph wrongly refcounting NLA strip actions when duplicating IDs.
NLA strips are users of their action, so we need to pass along ID
management flags.

This commit also cleans up a bit things by passing along ID_CREATE/COPY
flags instead of dummy booleans...
2018-11-07 20:58:53 +01:00
Stefan Werner
a0d8e52b54 Cycles: Fixed BVH UI options enabling/disabling when Embree is enabled. 2018-11-07 20:50:45 +01:00
Stefan Werner
85a9744905 Merge branch 'master' into blender2.8 2018-11-07 20:44:40 +01:00
Stefan Werner
ee6cc1d558 install_deps: Added optional build of Embree to install_deps.sh, turned off by default. 2018-11-07 20:36:03 +01:00
6be69a6b75 NLA: use animsys_write_orig_anim_rna when applying NLA stack results.
Without this keyframing on top of an NLA stack is quite weirdly broken.
2018-11-07 19:59:15 +03:00
921cad194d Depsgraph: add proper handling of actions contained in NLA strips. 2018-11-07 18:17:30 +03:00
b82eac8986 Py API Docs: improve 2D image example 2018-11-07 16:14:11 +01:00
c018cea680 GP: Show all objects sharing data in edit modes
Only need hide particle objects
2018-11-07 16:13:49 +01:00
9a38526be0 Py API Docs: show gpu_extras module 2018-11-07 15:45:28 +01:00
Stefan Werner
d3320c5488 Cycles: Rearranged macros in kernel_types.h to fix Embree build. 2018-11-07 15:20:24 +01:00
7b271d5fc1 Depsgraph: Ensure dependency cycle does not clear runtime memory
If there was a dependency cycle involved, it was possible that pchan
array will be freed before all bones are evaluated. Now clear is
done in a dedicated node, which is never a part of dependency cycle.
2018-11-07 15:06:39 +01:00
4610ca599a Merge branch 'master' into blender2.8 2018-11-07 14:54:32 +01:00
36b9ee1277 Fix T57390: properties editor crash creating new scene in some cases. 2018-11-07 14:54:16 +01:00
33201a48b0 Fix build with OSL, remove unneeded file after Embree changes. 2018-11-07 14:38:07 +01:00
Stefan Werner
9d0eac6ba5 Merge branch 'master' into blender2.8 2018-11-07 14:30:09 +01:00
0c8aa85069 Physics baking: tag interface locked during backing
This is a variation of older hach which was setting is_rendering
to truth to tell window manager to not do dependency graph update.

In the nowadays reality window manager is supposed to do dependency
graph update during rendering, that was the whole purpose of CoW
project. This works fine for rendering, since render engines has
their own dependency graphs.

Physics, on the other hand, is using same dependency graph as used
for the viewport, and what's worse: it modifies objects from it.
For example, in a single threaded evaluation ASAN instantly catches
case when cached BVH constructed by smoke is referencing looptri
layer which is freed by viewport's update.

Now we are locking interface, allowing only a subset of navigation
operators to run. This seems to be safest way of dealing with the
problem. There are following variations which we can consider
doing:

- Allow viewport navigation, which will require making it so draw
  manager does not write to the objects.

  A bit dangerous, since smoke simulation might in theory modify
  data which is also used by a draw manager.

- Make physics simulation to have own dedicated dependency graph,
  solving all threading conflicts all together.

This fixes crash when baking smoke. Steps to reproduce:

- Call "Quick Smoke"
- In smoke panel, click "Bake".
2018-11-07 14:04:47 +01:00
ee201d8a50 Cleanup, more meaningful and up to date comments 2018-11-07 14:04:47 +01:00
48488b7106 Skip dependency graph update when interface is locked
This is a variation of legacy dependency graph update check based on
G.is_rendering. Now it is ensured, that locked interface does not
tempter around with the dependency graph.
2018-11-07 14:04:47 +01:00
1cadd811ce Cleanup, indentation 2018-11-07 14:04:47 +01:00
Stefan Werner
d3dd3739f6 Cycles: Fixed a warning. 2018-11-07 14:04:22 +01:00
Stefan Werner
e96986fa47 Cycles: Fixed OpenCL render after the Embree checkin. 2018-11-07 13:53:56 +01:00
e31625a697 Fix 'Set and Use 3D Cursor' normal editing command.
Was missing a return of OPERATOR_RUNNING_MODAL for that subcommand.
2018-11-07 07:43:19 -05:00
13944c3dda Workbench: Scale shadowing based on density
This makes previewing thick smoke a bit more plausible with better shadows.

The shadowing is clamped so that nothing is completely black. That said the
lower bound is pretty low.

This is not an option but could become one if users do not like it in
all situations.
2018-11-07 13:25:28 +01:00
84ad9b102e Workbench: Add cubic filtering for smoke simulation
The option is per domain and only affects the solid / xray / wireframe view.

Eevee is not yet supported.
2018-11-07 13:25:28 +01:00
faecd16d31 Eevee: Fix volumetric broken after recent change 2018-11-07 13:25:28 +01:00
Stefan Werner
2c5531c0a5 Cycles: Added Embree as BVH option for CPU renders.
Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag.
Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly.
There, Embree is off by default too and must be enabled with the WITH_EMBREE flag.

Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint.

TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache).

Differential Revision: https://developer.blender.org/D3682
2018-11-07 12:58:12 +01:00
f1fc5ba537 Fix installing Blender due to missing icons. 2018-11-07 11:31:07 +01:00
5dfe7858b1 CMake: missed removing from file list 2018-11-07 21:14:40 +11:00
469005f1f6 Dopesheet: correctly use floating point threshold in ActKeyColumn tree.
After some thinking, since the tree itself does always use floating
point numbers, it is better to use the threshold - but correctly.
2018-11-07 10:41:38 +03:00
03e5ba3183 Fix hidden action-zone interaction 2018-11-07 18:20:15 +11:00
484faaea4f Fix for hidden regions becoming active 2018-11-07 18:20:07 +11:00
767a395727 Fix redraws from non-existing scrollbars
Cursor motion was often causing redraws.

Distance to scrollbars that don't exist in hidden regions
caused redraws (for alpha fading).

Check if scrollbars are used before calculating fade.
2018-11-07 18:19:46 +11:00
0bd61227c2 Tool System: display tooltip generation error
While this shouldn't ever happen there have been reports
of tooltip creation failure - keep this until the issue is resolved.
2018-11-07 14:40:44 +11:00
4e11b6f037 Merge branch 'master' into blender2.8 2018-11-07 13:40:39 +11:00
8a014e780e Cleanup: use STRPREFIX for mount point checks
From D3846 by @kostex
2018-11-07 13:37:42 +11:00
5f8d369495 Multi-Objects: MBALL_OT_select_similar
Compared to previous implementation, the following has been changed:
* Threshold: is now an absolute value. This allows a comparison with e.g. radii
  that are much larger than selected radius. This is also consistent with
  `CURVE_OT_select_similar`

* Radius in world space is the average of the radius scaled in x, y and z
  directions
* Since MetaBalls are symmetrical, rotation is only considered from 0 to π/2.
  So for example rotations of 90° and -90° are considered equal.
  This is also consistent with the way `CURVE_OT_select_similar` works.

Fix/changes from committer (Dalai Felinto):
* Drawing not updating after changes. (see original patch for details).

Reviewers: dfelinto
Differential Revision: https://developer.blender.org/D3895
2018-11-07 00:15:39 -02:00
ad3a2415fc Icons: add ops.paint.weight_sample 2018-11-07 12:57:24 +11:00
b9e919b003 Icons: remove unused vertex paint icons
Also update names to match enum.
2018-11-07 12:57:24 +11:00
188857e0f2 Cleanup: style 2018-11-07 12:57:24 +11:00
Dalai Felinto
0a893c0901 Multi-Objects: MBALL_OT_select_all
Based on D3893 by Habib Gahbiche.
2018-11-06 23:32:49 -02:00
f6bec570c5 Merge branch 'master' into blender2.8 2018-11-07 12:28:26 +11:00
dca3d3ef0e Cleanup: use BLI_compiler_compat.h for BLI_INLINE 2018-11-07 12:17:58 +11:00
6bda925aa1 Cleanup: remove GPENCIL_OT_sculpt_select
This can be done via WM_OT_context_set_enum
2018-11-07 12:04:03 +11:00
101fd08348 Merge branch 'master' into blender2.8 2018-11-07 11:59:41 +11:00
4e9911663a Multi-Objects: CURVE_OT_select_similar
Implemented the following methods:
* SIMCURHAND_TYPE
* SIMCURHAND_RADIUS
* SIMCURHAND_WEIGHT
* SIMCURHAND_DIRECTION

Limits:
* DIRECTION does not support surfaces, because `BKE_nurb_bpoint_calc_normal`
  does not work with Nurbs of type `CU_CARDINAL`. This also didn't work prior
  to this patch, so we wait until surfaces are properly supported in EditMode.

* Also DIRECTION should take scaling into consideration. We need our own
  versions of BKE_nurb_bpoint_calc_normal/bezt.

* Threshold default is too large. Not sure if it's better to change the default
  or scale the threshold in code.

Differential Revision: https://developer.blender.org/D3846

Changes from committer (Dalai Felinto):
 * Moved nurb_bpoint_direction_worldspace_get/bezt to functions.
 * Comments hinting at the mode (direction) that require scaling to be
   taken into account - to be addressed by patch creator in a future
   patch.
2018-11-06 22:56:33 -02:00
59e70d5f8d Cleanup: renmae ePaintTexture(Projective) -> 3D
Matches ePaintTexture2D, less verbose.
2018-11-07 11:52:14 +11:00
c19dafd2a6 Paint: paint.brush_select now supports gpencil
Replace grease pencil specific brush select operator.
2018-11-07 11:42:30 +11:00
895295a9f0 Paint: update shortcut detection for new logic 2018-11-07 10:54:56 +11:00
87a6aab251 UI: Fix hard to see unselected channel name in Graph Editor.
And unify colors with the Dope Sheet.
2018-11-07 00:43:39 +01:00
451ca8453b GPU: Make node texture "Blend" parameter interactive.
This parameter is only used for Box projection type.
2018-11-07 00:19:14 +01:00
b23c68a937 Workbench: Improve volume render by removing noise using temporal AA 2018-11-07 00:19:14 +01:00
8af53dbeab Workbench: Fix volumetric blending leading to corrupted render results
Use simpler premultiplied blending.
2018-11-07 00:19:14 +01:00
4c8d88b485 Workbench: Fix non transparent background in viewport render 2018-11-07 00:19:14 +01:00
1fe561e662 Eevee: Wireframe: Increase precision a bit
Take the full derivative and compute its length instead of using fwidth.
2018-11-07 00:19:14 +01:00
c3a0af736a Eevee: Make Normal node interactive
Before it was triggering shader recompilation. Include small cleanup/opti.
2018-11-07 00:19:14 +01:00
57b4e122fc GPU: Fix wrong socket value struct
This was causing bad behavior of the node Normal.
2018-11-07 00:19:14 +01:00
d6908471c0 Eevee: Fix non normalized Normals in BSDFs and Layer Weight
Although the normal was normalized when evaluating the lighting, the normal
is often used for other purpose. In this case using the non normalized
normal maybe the source of errors.
2018-11-07 00:19:14 +01:00
c6c3d2e0f0 GPU: Cleanup: Vectorize operations and use MADD 2018-11-07 00:19:14 +01:00
fac2cfdfa7 Eevee: Improve Hashed Alpha transparency by reducing noise size
This only affect renders and static viewport accumulation.
It reduces helps reduce noise when lots of half transparent surfaces
overlaps.
2018-11-07 00:19:14 +01:00
8a204ccdb4 Eevee: Support monochromatic Transparent BSDF correctly
This fits Cycles better even if it is only for grey scale values. This only
work if the blend mode is Alpha Blend or Alpha Hashed.
2018-11-07 00:19:14 +01:00
bc1c263a8a Cleanup: naming (inconsistent paint_mode term) 2018-11-07 09:43:07 +11:00
fb932bb52a Cleanup: use BKE_brush_tool_get/set macros
Also add API call WM_toolsystem_ref_sync_from_context
(was in rna_workspace_api.c)
2018-11-07 08:43:56 +11:00
150864dfb9 Paint: bring back brush switching
Was temporarily replace with code that used the tool-system,
bring back logic which cycles and toggles brushes.

Tool slots are used for the initial brush,
after that toggle or cycle is used.
2018-11-07 08:43:56 +11:00
99c1075e3b Paint: fix for creating duplicate brushes
Setting the tool added a brush if none was found
but wasn't checking for existing brushes.
2018-11-07 08:43:56 +11:00
57aea0ce19 Paint: correct brush defaults 2018-11-07 08:43:56 +11:00
87c1893f8d Cleanup: style 2018-11-07 08:43:56 +11:00
fbce8f27c8 UI: Move pin icon to the right in the context breadcrumbs.
Leaves more room for the actual breadcrumbs path, and it's less intrusive.

Thanks Luciano for the suggestion!
2018-11-06 22:43:12 +01:00
a55ef18309 UI: Use icons for some operators.
* Area and Workspace duplicate.
* Toggle Area Fullscreen
* Operator Search
* Workspace reorder to front/back (arrows help to know which direction means front/back)
2018-11-06 22:05:05 +01:00
2b1843c491 Fix broken shortcuts in F3 'operator search' menu.
From own changes in that area... Now we also enforce handling shortcuts
in case relevant drawflag of searchbutton is set. Should allow to cover
all cases, hopefully.
2018-11-06 20:56:38 +01:00
5c18393c8e Fix T57656: Keyframes cannot be selected in Grease Pencil Dopesheet.
Partial revert of rBf250f9256e065: GP and masks use integer
frames, so float code isn't working or even needed.
2018-11-06 22:36:10 +03:00
ad248333a6 Merge branch 'master' into blender2.8 2018-11-06 20:04:06 +01:00
d323c0ad9c UI: change Cycles render panels organization.
Move geometry panels to top level, move device/OSL back to top, and
various other changes.
2018-11-06 20:04:04 +01:00
Troy Sobotka
81e2515a04 Fix T56055: color discrepancy between viewport and render for Filmic transforms. 2018-11-06 19:35:50 +01:00
f600b4bc67 Shrinkwrap: new mode that projects along the target normal.
The Nearest Surface Point shrink method, while fast, is neither
smooth nor continuous: as the source point moves, the projected
point can both stop and jump. This causes distortions in the
deformation of the shrinkwrap modifier, and the motion of an
animated object with a shrinkwrap constraint.

This patch implements a new mode, which, instead of using the simple
nearest point search, iteratively solves an equation for each triangle
to find a point which has its interpolated normal point to or from the
original vertex. Non-manifold boundary edges are treated as infinitely
thin cylinders that cast normals in all perpendicular directions.

Since this is useful for the constraint, and having multiple
objects with constraints targeting the same guide mesh is a quite
reasonable use case, rather than calculating the mesh boundary edge
data over and over again, it is precomputed and cached in the mesh.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D3836
2018-11-06 21:20:17 +03:00
0709fac41e BKE_mesh: add a utility to get edge indices from looptri.
Not all three sides of a tesselated mesh triangle are guaranteed
to be original mesh edges, so a somewhat complicated check is
required to detect which ones are real. It seems that until now
there was no utility function for that, only some example code.
2018-11-06 21:20:17 +03:00
84fa806491 BLI_kdopbvh: add an option to use a priority queue in find_nearest.
Simple find_nearest relies on a heuristic for efficient culling of
the BVH tree, which involves a fast callback that always updates the
result, and the caller reusing the result of the previous find_nearest
to prime the process for the next vertex.

If the callback is slow and/or applies significant restrictions on
what kind of nodes can qualify for the result, the heuristic can't
work. Thus for such tasks it is necessary to order and prune nodes
before the callback at BVH tree level using a priority queue.

Since, according to code history, for simple find_nearest the
heuristic approach is faster, this mode has to be an option.
2018-11-06 21:20:16 +03:00
39b1e66afd Defaults: disable AV Sync by default again, it breaks physics caching.
This reverts back to the 2.79 situation. The better solution would be to make
physics caching somehow simulate the skipped frames. But for now the more
important thing is to have working physics.

Ref T54943, T56352.
2018-11-06 17:52:27 +01:00
b04c856122 UI: some reordering of Cycles panels. 2018-11-06 17:51:58 +01:00
7b38df41ae Fix/cleanup RNA viewlayer API.
RNA's ViewLayer would present 'first level' of layer collection as a
list (collection property), when it is actually now only a single item,
same as the scene's master collection.

Note: did not try to update view_layer python tests, those are already
fully broken for quiet some time I guess (they still assume
view_layer.collections to be mutable e.g.)...
2018-11-06 17:20:49 +01:00
aa9912ec04 Proper fix for new 'SimpleHeap' gtests...
This reverts reverting commit rB55324b8a2e6799300, and do proper 'cleanup' (sigh)
in gtest as well.

Sorry for the noise, did not understood what had happened here
immediately. :/
2018-11-06 16:25:00 +01:00
55324b8a2e Revert rBfee6ab18e7e9 in BLI_heap_test.cc
Most certainly commite by mistake, FastHeap is not in BLI yet!
2018-11-06 16:06:53 +01:00
a145c7dc62 Cleanup: No need to save/restor frame buffer twice 2018-11-06 15:46:07 +01:00
50b43ff6d4 GPU: frame buffer stack
Reviewers: fclem

Differential Revision: https://developer.blender.org/D3903
2018-11-06 15:24:13 +01:00
ddc64b9dd4 UI: Tooltip for context properties too verbose.
"Type of active data to display and edit" is a bit too descriptive and takes
away from reading which context we're actually viewing. Also minor tweaks to
context description.
2018-11-06 14:32:04 +01:00
9d32b9fb8a GP: Fix unreported error moving material slots 2018-11-06 13:08:31 +01:00
5d6ec23e3e Multires: Refactor propagation to the higher levels
Now it is forumlated in terms of deltas, and consists of the
following steps:

- Original displacement at the reshape level are being backed up.
- New displacement is being written by the reshape routines.
- Delta of the displacement is calculated.
- Deltas are propagated to the higher levels, which also includes
  their interpolation/
- Original displacement is restored.
- New interpolated displacements are added to the original ones.

This is a base ground for the upcoming change related on using
Catmull-Clark smoothing for the deltas instead of linear
interpolation. Currently is no changes for artists, just preparing
for upcoming work.
2018-11-06 12:40:50 +01:00
c3149a712c Eevee: Make nodegroup fix recursive. 2018-11-06 12:05:21 +01:00
26d5a92606 Eevee: Fix broken shader if only using an Ambient Occlusion node
This quick fix does generate some invalid uniform. Will fix that later on.
2018-11-06 12:05:21 +01:00
2a0a7cd73d Eevee: Fix missing UBO bound if using a muted Shader to RGB node with SSS
This is a nasty bug. Because the node does not get properlly tagged as SSS
(sss_id is 0) but is still evaluated (so tagging the GPUMaterial as having
SSS). The sssProfile UBO is still declared and we need to bind something
to it.
2018-11-06 12:05:21 +01:00
15ad75ffef Eevee: Correctly handle Sharp glossy/refraction BSDF nodes
This is a quick workaround, but I don't see the point of making the
lighting functions more complex than it is now in order to optimize this
rather not so common case.
2018-11-06 12:05:21 +01:00
5ccd60e0e7 GP: Fix Time Offset for frames before range 2018-11-06 11:10:14 +01:00
0f1390c99e GP: Rename variable 2018-11-06 11:10:14 +01:00
32dca36afb Cleanup: Use annotation for the new class 2018-11-06 09:57:03 +01:00
798cdaeeb6 Implement an Armature constraint that mimics the modifier.
The main use one can imagine for this is adding tweak controls to
parts of a model that are already deformed by multiple other major
bones. It is natural to expect such locations to deform as if the
tweaks aren't there by default; however currently there is no easy
way to make a bone follow multiple other bones.

This adds a new constraint that implements the math behind the Armature
modifier, with support for explicit weights, bone envelopes, and dual
quaternion blending. It can also access bones from multiple armatures
at the same time (mainly because it's easier to code it that way.)

This also fixes dquat_to_mat4, which wasn't used anywhere before.

Differential Revision: https://developer.blender.org/D3664
2018-11-06 10:56:08 +03:00
a817613be5 Cleanup: remove unused brushes 2018-11-06 18:21:52 +11:00
80109c976c Brush: split out vertex paint tool & blend mode
- Vertex & weight paint now use the 'blend' setting.
- Weight paint now has it's own tool setting,
  since weight paint doesn't deal with color - we'll likely
  support different tools eventually.
2018-11-06 18:06:33 +11:00
900c562b71 Cleanup: rename fast-heap -> heap-simple
In general prefer API names don't start with adjectives
since it causes grouping of unrelated API's for completion.
2018-11-06 13:06:49 +11:00
d805a4a5ef Cleanup: move fast heap into own source & header 2018-11-06 12:52:34 +11:00
a90bcdf93d Tool System: use tool type enum to access brushes
Previously the brush names were used which had the limit that:

- Brush names that were deleted wouldn't show up in the toolbar.
- Naming collisions between user defined brushes and existing tools
  broke tool selection.

Now brushes are created as needed when tools are selected.

Note, vertex/weight paint combine tool and blend modes,
this should be split out into a separate enum.
2018-11-06 12:39:51 +11:00
29dfe9a614 Cleanup: style 2018-11-06 12:39:51 +11:00
a22167b9a2 Fix/Updated Object API example.
Was still 2.7x code... ;)
2018-11-05 20:42:00 +01:00
5ae853d20a Fix (unreported) potential race condition in view_layer_bases_hash_create().
When you check for undone work before acquiring a lock that ensures you
are the only one actually doing the work, you have to redo the check
*after* acquiring said lock.

Otherwise, there is room for nasty random race condition issues...
2018-11-05 20:29:36 +01:00
46060d54bf GP: Limit internally Time offset to something logic
If the offset is greater than frame range, the offset could gets some unlogic values, so now the value is normalized in the range.
2018-11-05 19:52:51 +01:00
a8e9959e07 API Docs: gpu api introduction + examples 2018-11-05 19:28:28 +01:00
abbe4df301 GP: More tweaks to Time Offset 2018-11-05 19:10:52 +01:00
fee6ab18e7 BLI_heap: implement a limited but faster version of heap.
If the user only needs insertion and removal from top, there is
no need to allocate and manage separate HeapNode objects: the
data can be stored directly in the main tree array.

This measured a 24% FPS increase on a ~50% heap-heavy workload.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3898
2018-11-05 20:49:17 +03:00
a120b120ce GP: Fix Time Offset bug when use range
The frames greater than frame range were wrongly calculated.
2018-11-05 18:35:34 +01:00
b4dfe00fd6 Wireframe: Extend Xray slider range
This makes it possible to bypass the depth dithering effect at the cost
of less accurate depth perception.
2018-11-05 16:31:12 +01:00
946f9d8fb3 Eevee: Fix "Show Irradiance/cubemap" icons 2018-11-05 16:31:12 +01:00
2ae88c4d78 UI: Make the grid alpha themable
Now that the 3d grid is infinite, antialiased, not occluded, and overlaid
on top of rendered view, being able to decrease its opacity to reduce
visual strain is a must.
2018-11-05 16:31:12 +01:00
205d1876ff DRW: Fix crash with deferred compilation 2018-11-05 16:31:12 +01:00
050e91340d Edit Mesh: Fix wire opacity when not rotating the view in Xray mode 2018-11-05 16:31:11 +01:00
3927fbf98e LightProbe: Fix description of influence type 2018-11-05 16:31:11 +01:00
83b3b540de GP: Change Lock icon and Popover title 2018-11-05 16:29:07 +01:00
72a23e6564 UI VSE: Use icon for Refresh Sequencer button in the header. 2018-11-05 15:34:23 +01:00
3e5e4a05f1 UI VSE: Rename submode Image Preview to Preview.
It's confusing that it says Image when it's also video or final result.
And also since the third option is called Sequencer/Preview, having the
others called Sequencer, and Preview, makes sense.
2018-11-05 15:34:23 +01:00
721a484ccb BLI_kdopbvh: reduce branching in calc_nearest_point_squared.
This lets the compiler use min/max instructions for 4.5% FPS
improvement in Shrinkwrap to Nearest Surface Point.
2018-11-05 17:16:06 +03:00
a70589e439 BLI_heap: optimize heap_swap, heap_down and heap_up.
The index field of nodes is supposed to be its actual index, so
there is no need to read it in swap. On a 64-bit processor i and
j are already in registers, so this removes two memory reads.

In addition, cache the tree pointer, use branch hints, and
put the most frequently accessed 'value' field at 0 offset.

Produced a 20% FPS improvement for a 50% heap-heavy workload.
2018-11-05 17:16:06 +03:00
2d3493d50c UI VSE: Rename OpenGL Render to Sequence Render.
Follows change in the 3D Viewport.
2018-11-05 15:12:27 +01:00
69fcffb78f UI: Move Sync Markers from View to Marker menu.
In Dopesheet and Sequencer. Suggested by tintwotin in DevTalk, thanks!
2018-11-05 15:11:56 +01:00
7c7c8f3492 GP: Add new layer above active layer
Before, the layer was added to tail always, but this was weird for 2D animators.
2018-11-05 09:59:38 +01:00
efd133a9a6 Paint: setting the brush now updates tool slots
Adding a brush wasn't refreshing the tool-system (left blank topbar).
2018-11-05 16:20:15 +11:00
1b928c2d9a Paint: add tool offset & mode to runtime data
It was getting too impractical to call BKE_paint_brush_tool_info
which needed to lookup the scene pointers.

Now each store tool offset and brush mode in 'Paint.runtime'
2018-11-05 16:18:43 +11:00
56917bcf73 Missing from last commit 2018-11-05 15:47:22 +11:00
8b31f6fb21 Paint: add BKE_paint_ensure to initialize toolsettings
Each mode had its own logic for initializing paint structs,
move to a single function.

Also remove "BKE_brush_get_gpencil_paint", entering grease pencil
mode is responsible for ensuring the data is created.
2018-11-05 15:31:25 +11:00
8fcc04edce Cleanup: avoid using instance to get enum 2018-11-05 13:54:43 +11:00
25a9816c30 Cleanup: use bool 2018-11-05 13:22:49 +11:00
9361c1c83d UI: Add back line to curve map
D3894 by @charlie with edits
2018-11-05 13:04:43 +11:00
7c5d014666 UI: rename Cursor 'Depth' -> 'Surface Project' 2018-11-05 12:08:51 +11:00
642fe9e0f2 PyAPI: use keywords for ToolDef.from_fn.with_args
Enforces explicit names,
allows for keywords to be forwarded to the dictionary.
2018-11-05 11:58:23 +11:00
4cdf4d1eba Cleanup: correct last commit, also use font_id var 2018-11-05 11:06:09 +11:00
c192ce6717 Gizmo: use fonts for drawing 3D axis characters 2018-11-05 10:48:18 +11:00
1e56c8c47d Merge branch 'master' into blender2.8 2018-11-05 00:30:33 +01:00
4e37796976 Fix various Freestyle rendering bugs. 2018-11-05 00:22:33 +01:00
287c023b85 Gizmo: tweak 3D view navigation axis sizes
This now matches original design more closely, see: T54723.
2018-11-05 08:31:31 +11:00
61c5890c2c Fix missing NULL check initializing paint tools 2018-11-05 07:15:47 +11:00
2f8a45e314 Tool System: support passing in args to ToolDef functions
Needed since class aren't yet defined
so we can't access their namespace.

This avoids intermediate draw functions.
2018-11-05 07:12:57 +11:00
5195f03ca1 Cleanup: style, use ARRAY_SET_ITEMS macro 2018-11-05 07:12:53 +11:00
8d9d473eec GP: New API to move layers in layer list
This can be required  in som production scripts
2018-11-04 20:56:38 +01:00
b98f76cd90 Fix T57388: Blender Internal + Freestyle viewport render wrongly using FSAA. 2018-11-04 20:36:49 +01:00
ea8e45de29 Fix assert rendering hair tests on some systems. 2018-11-04 20:25:57 +01:00
db59f30f2b Fix assert rendering with denoising, after recent changes. 2018-11-04 20:15:33 +01:00
bbb348afc1 GP: Move init code to new version section 2018-11-04 19:52:42 +01:00
665efe401a Fix T57611: Crash on entering Grease Pencil Sculpt Mode
The problem was when some layers was locked in multiedit. The cache size was not checked and gets an segment fault.
2018-11-04 19:37:03 +01:00
807b460a11 GP: Time Offset verify range if loop is disabled 2018-11-04 13:27:41 +01:00
5cfcee8c39 GP: Reorganize Canvas Grid
Now the grid is always controlled by the topbar selector and not in the canvas panel. To have two places to define orientation was confuse.

The orientation by default (no lock) is always to view plane.
2018-11-04 13:00:37 +01:00
d3c815bd08 BLI_heap: add an API function to directly read the top node value.
It is very commonly needed in loop conditions to check if
the items in the heap are good enough to continue.
2018-11-04 13:29:17 +03:00
0d69a5aa34 Merge branch 'master' into blender2.8 2018-11-04 18:12:58 +11:00
76b9eaf7a8 Fix ghash masking out upper bits on 64bit systems
The code this was taken from assumes a 'size_t' result,
which isn't the case here.

In practice the bucket distribution wasn't bad,
even so this was a nop so best fix.
2018-11-04 16:48:36 +11:00
179358e6c4 UI: Don't nest sculpt scrape/flatten
These are different enough not to be grouped.
2018-11-04 10:33:51 +11:00
628a0209a4 Cleanup: missed last commit 2018-11-04 10:32:04 +11:00
2402c56a67 UI: move gpencil tool-draw code to topbar
The grease pencil UI was showing twice in tool properties space.
Move to top-bar because this UI is meant as quick convenience access
which is expanded on in the tool properties editor.
2018-11-04 10:29:40 +11:00
bc870f17a7 Cleanup: style, shadow warning 2018-11-04 10:10:00 +11:00
771b9c8010 GP: Update Canvas grid orientation when change option 2018-11-03 20:33:38 +01:00
0db31c03c6 GP: Fix Time Offset when range frame is 0 2018-11-03 20:27:30 +01:00
f2858fbb9a UI: Draw curve map with solid color
Differential Revision: https://developer.blender.org/D3891
2018-11-03 17:42:40 +00:00
d2b4eaa137 GP: New Time Offset custom frame range parameters
These parameters allow to define a frame range for the animation loop and make possible to loop a section while the scene is playing.
2018-11-03 17:11:38 +01:00
ec017861b6 GP: Fix update problems with Grid Canvas
The grid canvas was not updated when changed parameters
2018-11-03 16:18:54 +01:00
f267921774 UI: remove grease pencil icons
Grease pencil tool now uses an icon for each tool,
previously it mapped icons to tool icons which is now not needed
because for each tool a different brush can be selected which has it's
own icon.
2018-11-03 20:35:34 +11:00
e53cb83d07 UI: separate sculpt from smooth, flatten 2018-11-03 20:35:34 +11:00
c2a12eedd1 GP: Use stroke and fill switches while drawing 2018-11-03 10:01:28 +01:00
270a6a6689 GP: Change presets for new stroke and fill switches 2018-11-03 10:01:28 +01:00
97336343c4 UI: show brush selector in topbar 2018-11-03 19:47:20 +11:00
628908a710 GP: New main switches to hide stroke and fill material
New parameters to switch visibility of stroke and fill
2018-11-03 08:51:36 +01:00
c48ca87bce Correct error in last commit 2018-11-03 16:54:17 +11:00
888a0735ee Tool System: validate tool slots when setting modes
Needed for entering paint modes on new scenes.
2018-11-03 16:52:06 +11:00
13c3c9b22f Cleanup: move brush query into utility function 2018-11-03 15:55:45 +11:00
a18927463c Cleanup: style 2018-11-03 15:55:45 +11:00
4affea081a UI: Move Simplify panel from Scene to Render properties.
It mainly contains properties that affect the final render/viewport and it's handy
to see if it's enabled or not while going through the render settings.
2018-11-03 05:12:45 +01:00
9b2fff4ff8 UI: On markers alternate between filled/outline camera icon on selection.
Instead of between the Camera and Camera Data as they are completely different shapes that don't indicate selection.
2018-11-03 04:39:40 +01:00
3bfd2cdad6 UI: Align Panel drag widget with collapse triangle.
As pointed out by Harleya in DevTalk. Thanks!
2018-11-03 04:11:04 +01:00
689cf14447 Transform Snap: Refactoring to avoid duplicate code. 2018-11-02 23:55:02 -03:00
df0058061d UI: Soft drop shadow on 3D Viewport info text.
Soft shadow similar to the title of pie menus to increase readability.
For the full white background issue an extra box container might be needed.
2018-11-03 03:47:25 +01:00
2b6ae64257 UI: Blue color for selected row in Outliner.
Same hue as used in the rest of the Default theme. Darkened slightly the background and tweaked category icon colors for better contrast.
2018-11-03 03:43:14 +01:00
018d22fb7a UI: Sort panels in Properties.
* Viewport Display always last before Custom Properties.
* DoF panel second as it's changed more often than Camera sensor width.
* In scene, move Simplify higher up as it is changed more often than Gravity or Audio.
2018-11-03 03:25:51 +01:00
346b00f6d1 UI: Tooltip for 3D View and rename to 3D Viewport. 2018-11-03 02:26:31 +01:00
56a8781116 UI: Don't use abbreviations for view names. 2018-11-03 02:18:22 +01:00
a8c545e61e UI: Fix white shadow when resetting to defaults.
Resetting the theme to default would set the shadow brightness to 1.0f,
which was used as emboss when we used dark text on brighter backgrounds.
Now that we use white labels, bright shadows just makes all text fuzzy.
2018-11-03 02:03:42 +01:00
Dalai Felinto
046ec863ff Multi-Objects: MBALL_OT_duplicate_metaelems 2018-11-02 16:15:21 -03:00
Dalai Felinto
6bee49eca4 Multi-Objects: MBALL_OT_delete_metaelems 2018-11-02 16:15:21 -03:00
74737091c0 GP: Fix problem when alpha is too low
There are still some color when the alpha is set to 0
2018-11-02 19:28:36 +01:00
55a743fade GP: Add Draw Brush selector to topbar 2018-11-02 19:28:36 +01:00
982ca8c45a Add hide_buttons option to template_ID_preview
When use the template in the topbar for only select an ID is very annoying to have the buttons after the name and only adds noise to the selector.

This option hide the number of users, new and delete buttons to get a cleaner topbar selector.

By default the parameter is disabled in order to keep all existing code/UI running.
2018-11-02 19:28:36 +01:00
Dalai Felinto
c63d133f4d Small cleanup on curve separation error handling 2018-11-02 14:12:20 -03:00
Dalai Felinto
3335618489 Multi-Objects: CURVE_OT_make_segment
And another go at a more complete error handling.
I couldn't test all the error throwing cases but hopefully it is all
working as expected.
2018-11-02 14:12:20 -03:00
Dalai Felinto
b5a18c1aac Multi-Objects: CURVE_OT_reveal 2018-11-02 14:12:20 -03:00
Dalai Felinto
597d0ce93c Multi-Objects: CURVE_OT_hide 2018-11-02 14:12:20 -03:00
Dalai Felinto
3e55b3c6d0 Multi-Objects: CURVE_OT_switch_direction 2018-11-02 14:12:20 -03:00
Dalai Felinto
14344de261 Multi-Objects: CURVE_OT_tilt_clear 2018-11-02 14:12:20 -03:00
Dalai Felinto
3d4fd6ce1e Multi-Objects: CURVE_OT_handle_type_set 2018-11-02 14:12:20 -03:00
3f9a751d47 Fix T57586: crash linking node group through material properties editor. 2018-11-02 17:49:34 +01:00
aa41c17d32 UI: add option for permanently allowing execution of scripts to dialog.
Ref T57197
2018-11-02 17:34:50 +01:00
26c613c061 Fix missing separators after recent changes. 2018-11-02 17:28:20 +01:00
3e5483ffe1 Fix T57316: material preview icons not updating.
The editors update callback was getting the COW datablock, it should be the
original where the preview icons are stored.
2018-11-02 16:54:07 +01:00
Dalai Felinto
500ebf7348 Multi-Objects: CURVE_OT_normals_make_consistent 2018-11-02 12:37:56 -03:00
fddf608e79 GP: Reduce space between draw option buttons
Using new separator parameter, reduce space. The default value was too much.
2018-11-02 16:35:53 +01:00
f3ffb4e049 Add new factor parameter to layout.separator()
The new parameter allows to define the scale of the space.
2018-11-02 16:35:53 +01:00
d3ade45774 Armature: Fix stick bones not scaling with pixel size 2018-11-02 16:27:34 +01:00
Dalai Felinto
4135c7786e Multi-Objects: CURVE_OT_separate
This is also a first take on trying to handle errors for partial
succeeded operators. Handling it all manually for now.

For the remaining operators I will use changed_multi to get over with
multi-objects. But we can handle their errors in a separate pass.
2018-11-02 12:16:59 -03:00
ef42dcd31e UI: Darken the backdrop of navigation gizmos.
Bright backdrop would get lost when having bright elements/background in the viewport.
This makes it use a darkened/lighten version of the theme space header color.
Since icons are colored using the 'text' value of the Theme Space, it's likely that any
theme is going to have a contrasting background color, but just in case darken/lighten it slightly.
2018-11-02 16:16:40 +01:00
46d88c5850 Edit Mesh Mode: Improve edge drawing
Make edge decoration a bit thinner and try to reduce missing edge segment
due to triangle barycentrics.

This invert the "edge fix" strip offset direction, meanning there is now
the possibility that these triangles poke through nearby geometry depending
on the viewport near/far clips distances.
2018-11-02 15:45:13 +01:00
819e6745b0 DRW: Use GPU module wrapper for line width 2018-11-02 15:45:13 +01:00
721a19d2b8 GPU: Add safety check for max line width
On some platform does not support line width > 1.0 and can even throw and
error. Better check an at least display something rather than no lines at
all.
2018-11-02 15:45:13 +01:00
00ef0a4d8e UI: disable decorators for color management and motion path panels. 2018-11-02 15:35:06 +01:00
c7d20949fb Multires: Apply uniform scale on displacement when applying scale on object
This is sued by both object joinig and object apply scale operations.

Currently only uniform scale is working correct. Non-uniform gets averaged
and will produce slightly distorted results. This is something we should
fix, but priority of this particular case is not so high.
2018-11-02 15:24:54 +01:00
c75a25e9e1 Fix issues with hide/restrict icons after recent changes.
Set the names to match the original order again, to avoid breaking addons and
various places in the code that relied on them.
2018-11-02 15:21:54 +01:00
2e6637bdf6 UI: Fix 'extra' fake user showing in UI ID template usercount.
User do not care about that 'virtual' user, it only makes it more
confusing. So now, that template always shows actual number of real
users, we already have own dedicated button to show fake user status.
2018-11-02 15:12:10 +01:00
f2132b0237 UI: Fix showing '2' number of users in ID templates for fake-user IDs.
Using FakeUser on an ID sill put its usercount to 2 if it is actually
also 'really' used once. But we do not want to show that to user
(especially not since it also allows to 'make single user' of an ID
already only used once...).
2018-11-02 15:12:10 +01:00
8197b247d9 Fix 'id_single_user' wrongly reseting usercount to 0.
We want to undo the initial usercount from low-level ID duplication, not
to erase all possible extra processing (like e.g. setting Fake User...).

Fixes part of mess in brush usercount.
2018-11-02 15:12:10 +01:00
a0e82342d7 Multires: Cleanup, naming
First of all, follow our naming convention to use module prefix.

Second of all, mesh is being created and is to be freed, we also
have convention for such function names.
2018-11-02 13:59:04 +01:00
f2873b3ce5 Multires: Prevent crash when joining two multires objects
This only works thing around, just so we can unlock production here.
Joining objects of a different scale will not yet work correctly.

Proper fix is coming later (the code needs to be ported to new
Subdiv API).
2018-11-02 11:00:51 +01:00
ac8d787327 Tool System: brushes are now categorized by tool
The toolbar now shows brush types, the brush selector now
only shows brushes matching the current tool type.

Details:

- Add's Paint.tool_slots (used by the toolbar).
- Removed custom grease pencil brush tool code.
- Bumped subversion.

See T57526 for details.
2018-11-02 19:40:39 +11:00
5bd3f3e64b Fix assert setting fake user then removing 2018-11-02 16:23:05 +11:00
37fc52cbc6 UI: Minor tweaks on User Preferences header.
* Move Save User Preferences to the right (matches file browser and quit prompt).
* Icons for Import/Export keyconfig
* Match order of install/reset of Themes section
* Rename "Install MatCap/HDRI" to "Add MatCap/HDRI"
2018-11-02 03:15:38 +01:00
d9dd20bcb3 UI: Rename Save User Settings operator to Save User Preferences.
The term Settings is not used anywhere, plus the menu entry and editor use the word Preferences.
2018-11-02 03:08:58 +01:00
1f4068214f UI Cycles: Open "Sampling" panel by default
Now that the Dimensions panel moved to Output, we can have the Sampling panel as the only one open by default.
2018-11-02 02:29:09 +01:00
034e777038 UI: Sort panels in Render and Output 2018-11-02 02:21:35 +01:00
c4c62e6df5 UI: tweak panels open by default 2018-11-02 12:04:04 +11:00
86b2f8ef38 UI: add render output tab to properties editor 2018-11-02 11:58:56 +11:00
2d6a10615d UI: Typo 2018-11-02 01:19:34 +01:00
2959e4c72c Multi-Object-Mode: Edit curve draw (deselect all)
D3887 by @zazizizou
2018-11-02 08:31:36 +11:00
93b99306d8 Multi-Object-Mode: Edit curve toggle cyclic
D3882 by @zazizizou
2018-11-02 08:26:11 +11:00
68a4610fc4 UI: Math Node Menu: Group and reorder
Change menu so that maths functions are grouped together more logically.
2018-11-01 21:01:52 +00:00
28f3f4da12 Cleanup: style 2018-11-02 07:44:26 +11:00
f667a250f4 Fix bpy.app, sentinel was removed by accident 2018-11-02 07:43:28 +11:00
fecb09ceff Eevee: Fix crash during Light cache baking
This was caused by some threading conflict.
2018-11-01 21:23:12 +01:00
b2a6e149a6 Eevee: Opti: Irradiance: Remove sqrt and max on backface test
Did not have any impact in my tests and it saves some instructions.
2018-11-01 21:23:12 +01:00
10d7740e01 UI: show messages and progress in topbar when status bar is collapsed. 2018-11-01 19:44:03 +01:00
c2bcde5c28 UI: show blocking popup when auto execution of scripts is disabled.
This is important information, and it was easily missed at the top/bottom of
the screen.

Ref T57197.
2018-11-01 19:44:03 +01:00
1e8a2e1a10 UI: support red alert on labels, not just buttons. 2018-11-01 19:43:46 +01:00
c7752df86d Fix T57559: fix wrong disable/mute icons for particles and shape keys. 2018-11-01 19:31:20 +01:00
97bb56711e Defaults: leave user prefs temp directory empty, so it gets right value per OS. 2018-11-01 19:31:20 +01:00
79ec5f5cb8 GP: Separate not related buttons on topbar 2018-11-01 19:03:06 +01:00
1237e50c9b GP: Reorganize origin popover and top area
- Draw on back buttons moves near mode
- zDepth offset moved from View Panel to Popover
- Target for Stroke mode moved to popover
- New First point snap mode
2018-11-01 17:05:04 +01:00
e6da49295c UI: Rename "Cursor to Center" to "Cursor to World Origin"
Center is misleading since it could mean the center of the objects, selection, etc.
Python API is left as is to not break compatibility. Maybe it could be renamed as well?
2018-11-01 16:12:52 +01:00
7d765eca13 UI: Rename Copy Material to Others to Copy Material to Selected.
"Others" is not clear, "selected" is more descriptive and it follows the convention used in similar operators
2018-11-01 15:57:27 +01:00
423e887c74 UI: Rename AO to Ambient Occlusion in tooltips and labels when possible.
Just tooltips and RNA labels when possible. Node outputs use their name to keep connections,
so they haven't been changed, otherwise it will break old files.
2018-11-01 15:57:27 +01:00
d6d5c436e3 Subdiv: Cleanup, better naming yet again 2018-11-01 15:45:57 +01:00
623574ffa2 Subdiv: Cleanup, de-duplicate some code 2018-11-01 15:20:50 +01:00
d710cb91b9 Subdiv: Cleanup, de-duplicate tangent matrix calculation 2018-11-01 15:20:50 +01:00
c2aa8d03f2 Subdiv: Cleanup. better naming 2018-11-01 15:20:50 +01:00
34ec716352 Subdiv: Cleanup, deduplicate some code 2018-11-01 15:20:50 +01:00
9d5edf2d39 Eevee: Fix nodegroup sockets behaviour
Node group inputs should behave like cycles now.

----

We create dummy nodes that contains the default values for the nodegroup
inputs and link them to the sockets. This way the uniform buffer gathering
function can read them.

But we also need to disconnect all the internal links to sockets that have
hidden values. Theses sockets must not get the values from the nodegroup
input sockets if there is no link to them otherwise we get broken results
(i.e.: normals for a bsdf node).
2018-11-01 15:06:42 +01:00
Dalai Felinto
c2316909ff Fix for object.set_select not updating selection in viewport
Note: This function changes the active object as well. Not sure it
should do.
2018-11-01 12:43:48 +00:00
1b974563b1 Fix T57529: 2D image paint fill tool not taking into account alpha. 2018-11-01 13:05:57 +01:00
77c126dd4c Fix T57553: Python operator popup size does not follow UI scale and DPI.
Make it the convention to multiply by scaling factor inside the function, so
Python scripts that didn't add DPI scale start working correctly.
2018-11-01 12:33:27 +01:00
8f1b1b5abb GP: Fix Stroke mode when annotations not enabled
Internally, a drawing is done to calculate z-depth and needs always the drawing.
2018-11-01 12:02:08 +01:00
10d7ebc469 Merge branch 'master' into blender2.8 2018-11-01 16:20:52 +11:00
38f57734ea Cleanup: move progress utility module into bpy_extras
Try avoid having too many toplevel modules with generic names.
2018-11-01 16:19:49 +11:00
Dalai Felinto
ae87adc73a Font cleanup: use ELEM 2018-10-31 21:45:27 -03:00
4a013e5dd5 Fix T57540: 3D Cursor snap in editing mode ignoring changed geometry. 2018-10-31 20:47:51 -03:00
Dalai Felinto
95d4a6bdb1 Fix swapped on/off icons for brush overlays
This is the panels that you see when you invoke the painting tools from
the Image Editor.

If you do so from the viewport, the panels are different (and have it
properly swapped already, although the panels should be the same as
those ones I suppose - that said I like the one from the image editor
better, in regard to the overlay panel).
2018-10-31 19:27:49 -03:00
Dalai Felinto
679e0daaf8 Fix ui errors for brush toolbar 2018-10-31 19:23:58 -03:00
bb3219d2b1 Eevee: Fix pingpong buffer not using 32bit float buffer when rendering 2018-10-31 22:35:42 +01:00
c07d486dcd Fix gizmo extrude adjust & normal axis w/o faces
- Extruding edges/vertices on normals gave bad/strange results.
- The adjust gizmo used the orientation axis instead of the
  last-orientation (which could get out of sync).
2018-11-01 07:56:44 +11:00
eb8ddaee4c Transform: support for custom matrix property
Needed for situations when we can't use the orientation.

With extrude the initial extrusion recalculates normals for edges
and vertices which then don't give a useful axis.
2018-11-01 07:55:53 +11:00
798cd8a723 Cleanup: style 2018-11-01 07:32:13 +11:00
35b888fbda Eevee: Fix compilation issue cause by cleanup 2018-10-31 21:14:32 +01:00
97a1561283 Eevee: Cleanup: Remove TODOs about MSM
Soft shadows are supported in another manner, Multiple Shadow Maps are not
needed anymore.
2018-10-31 19:44:01 +01:00
f14315bac4 Eevee: Fix wrong default overscan value 2018-10-31 19:40:08 +01:00
e3384800a1 GP: Change icon for draw on back 2018-10-31 19:36:22 +01:00
acecadf16a UI: Particles improvements
* Icons in specials menu (Copy and the new Duplicate icon)
* Remove redundant "Settings" label next to ID template widget.
* Remove "Type" label and expand dropdown, since it only has 2 options (emitter/hair), saves 1 click.
* Move "Seed" to and "Hair Segments" to Emission panel
* Rename "Duplicate Particle Systems" to "Duplicate Particle System", since it
only duplicates one (the active one) at a time.
2018-10-31 18:39:01 +01:00
f4bc205a32 UI: Detach Material specials menu from add/remove column. 2018-10-31 18:39:01 +01:00
cde64619ca Eevee: Implement Overscan option
This option make the internal render size larger than the output size in
order to minimize screenspace effects disapearing at the render edges.

The overscan size added around the render is the maximum dimension
multiplied by the overscan percentage.
2018-10-31 18:32:54 +01:00
c6466ed0d2 UI: tweak usage of duplicate/add icon for consistency.
Still difficult to know when exactly the operator will duplicate and when
it will add a new one. Some open a menu with different choices too.
2018-10-31 18:31:27 +01:00
1180363792 UI: Small tweaks to Shape Keys/Vertex Groups menus
Mainly added separators to the Vertex Group/Shape Keys specials menu,
separating items by type and removing redundant icons for better readability.
2018-10-31 18:14:05 +01:00
748b89f124 Allow changing B-Bone custom handle references from Pose Mode.
@jpbouza was rather upset these were made read-only, and unlike
parents, it's not that hard to allow changing these Bone fields:
all is needed is to carefully refresh the matching fields in the
relevant bPoseChannel objects and properly tag update.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3870
2018-10-31 20:04:01 +03:00
William Reynish
9fbba61f4b UI: icon set updates by Andrzej Ambroz.
New icons for duplicate, driver types, window, hue/saturation.
2018-10-31 17:59:00 +01:00
William Reynish
4b7b1ba114 UI: more single column layout for brush and render properties. 2018-10-31 17:58:57 +01:00
a2a8e71210 OpenSubdiv: API, expose vertex boundary interpolation option
Only affects internal API, bout could be exposed as an option for
the compatibility reasons with other software.

Is a part of some ongoing development of multires, but might or
might not be used.
2018-10-31 17:47:40 +01:00
9c328502bb GP: Fix icons 2018-10-31 14:44:15 +01:00
494fbfc045 GP: Move Autlock to Layer menu 2018-10-31 14:18:39 +01:00
a3802f66e2 Image Empties: More visibility settings
Support for showing images in background/foreground and only in perspective/orthographic view.

Internally the depth of the image is modified in the fragment shader by setting `gl_FragDepth` explicitly.

The UI still needs some work to improve usability, see D3863 for details.
Currently there is one duplicated function, not sure how to best deduplicate it yet. (`is_image_empty_visible`)

Reviewer: fclem, brecht, campbellbarton

Differential Revision: https://developer.blender.org/D3863
2018-10-31 13:42:33 +01:00
0727abf1bc Expose full ID name in RNA as well.
That way scripts can have a consitent way to get unique ID key/string,
and can use it for access in bpy.data collections as well.

Note that this kind of douples the old py API way of doning this
(passing tuple of (ID-name, lib-path) instead of just ID-name).
2018-10-31 13:34:06 +01:00
06c5a9426a Make new library IDs named from the .blend file.
Now that we do use that ID name of them in UI sometimes...
2018-10-31 13:34:06 +01:00
08a92d8578 UI/Unique ID name: add library ID name if present.
Also reshuffle a bit that whole code, did some renaming,
`BKE_id_to_unique_string_key()` is now using same base code (instead of
using whole library filepath...), etc.
2018-10-31 13:34:06 +01:00
7fe1ecf89d UI: Move Color Management panel from Scene to Render properties.
It makes more sense to have Color Management under Render properties,
even though they are per scene (so are render dimensions anyway).
2018-10-31 13:06:44 +01:00
117bc96ce8 Eevee: Fix dot corruption on intel HD5xx/6xx series
It is caused by some sync issue apparently. Adding glFlush in these
two places fixes it.

Caveat: it might have a small perf impact (did not measure it).

The fix is limited to the affected driver/operating systems.
2018-10-31 12:32:18 +01:00
a248c2001a GPU: Add glFlush and glFinish wrapper 2018-10-31 12:32:18 +01:00
fc12a736bb Merge branch 'master' into blender2.8 2018-10-31 11:49:04 +01:00
e0cc3e9809 Cycles: Fix wrong BVH used when disabling AVX2 in debug settings
Mainly useful for debugging. Previously, when AVX2 was disabled
in the debug panel but BVH layout was kept on BVH8 nothing was
rendered.

Needed to make it so supported BVH layout mask for devices is
queried in "dynamic", so it is possible to use DebugFlags there.
2018-10-31 11:46:52 +01:00
14e1dfda4e GP: New Autolock Inactive Layer
This option locks any layer no active to avoid any accidental change.
2018-10-31 11:00:28 +01:00
7bc84559aa Add an option to do keyframe insertion in a cycle-aware fashion.
When enabled, inserting keyframes into F-Curves with simple cyclic
extrapolation (the same conditions as required for cycle-aware auto
handle smoothing to activate) will take the cycle into account:

- Keyframes that are being inserted outside of the cycle bounds
  are remapped to be inside the cycle. Thus it is not necessary
  to be within the main iteration of the cycle when tweaking.

  This becomes especially useful in the final animation tweaking
  phase when the channel keys may be staggered for overlap, so
  the actual master period is different for different channels.

- Modifying one of the end points of a cycle also changes the
  other end point when appropriate, to preserve smooth transition.

This feature applies to both manual keyframe insertion using
'I', and auto-keyframing.

Differential Revision: https://developer.blender.org/D3140
2018-10-31 11:50:57 +03:00
2d37f55559 UI: Match region tabs with other navigation tabs 2018-10-31 16:14:48 +11:00
bafd1b6d92 Multi-Object-Mode : Edit Curve Decimate
D3309 by @thornydre
2018-10-31 15:40:01 +11:00
1fb9fcb333 Cleanup: indentation 2018-10-31 14:43:25 +11:00
8d496c2f85 Cleanup: rename PyAPI VertBatch to Batch
Only used for internal functions, follow 'GPU_batch.h' naming.
2018-10-31 12:34:10 +11:00
b1d2db2c77 Fix leak in successive calls to Batch.program_set 2018-10-31 12:32:57 +11:00
205eac3038 PyAPI: add check for exceeding batch VBO limit 2018-10-31 12:11:38 +11:00
1a865b4ff0 Cleanup: batch Python API
Add utility function to raise an error.
2018-10-31 12:02:22 +11:00
756d1502e4 Fix missing error returns in batch API 2018-10-31 11:55:28 +11:00
9c23e24543 Fix T57504: Scaling 3D cursor crashes 2018-10-31 11:51:15 +11:00
c469c72405 Cleanup: grease pencil RNA naming
Follow naming conventions for boolean's,

Also rename enable_settings -> use_settings_postprocess.
2018-10-31 11:51:15 +11:00
3224b79289 Cleanup: remove redundant 'gpencil_' prefix
Also rename 'gpencil_brush_type' -> 'tool' & correct typo.
2018-10-31 11:51:15 +11:00
40412e3579 Fix grease pencil RNA path 2018-10-31 11:51:15 +11:00
Julian Eisel
fe07839d01 UI: Right-click menu entry to flip properties Tab Bar left/right 2018-10-31 00:52:07 +01:00
Julian Eisel
0bc427f5c3 UI: Don't show scrollbar in Properties tab-bar
Addresses feedback from D3840.
2018-10-31 00:52:07 +01:00
4e23c69bfa Workbench: Attenuate dithering effect when using viewport render
Quick hack to get rid of most of the noise when doing a viewport render in
xray or wireframe mode.
2018-10-31 00:46:08 +01:00
d86e77ac16 UI: Rename "OpenGL Render" operator to "Viewport Render"
Since we now have an Opengl "render engine", it is misleading to have this
operator still called "OpenGL Render" when all it does is take a snapshot
of the viewport.
2018-10-31 00:46:08 +01:00
ca30930e36 Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-30 17:39:20 -06:00
5490708c39 make.bat: fix unquoted variables.
causing build issues for some users.
2018-10-30 17:36:36 -06:00
036a4b4087 UI: Match tabs active color with properties background color
Also match topbar background color with active tab so they blend better.
And other minor adjustments for consistency.
2018-10-30 23:37:22 +01:00
Julian Eisel
a287194bce Fix Properties tabs all showing tooltip of active tab 2018-10-30 23:21:34 +01:00
Dalai Felinto
e9980e5a75 Multi-Objects: CURVE_OT_split 2018-10-30 18:59:43 -03:00
Dalai Felinto
46bf079b7f Fix error checking on curve duplication 2018-10-30 18:59:43 -03:00
Dalai Felinto
5a156fd109 Cleanup style :|
So much for saving time by copying existing patches from phabricator.
2018-10-30 18:48:21 -03:00
Dalai Felinto
b9d5888728 Multi-Objects: CURVE_OT_duplicate 2018-10-30 18:31:27 -03:00
Dalai Felinto
993f4d4827 Multi-Objects: CURVE_OT_extrude 2018-10-30 17:53:52 -03:00
Dalai Felinto
258ad21cf2 Multi-Objects: CURVE_OT_spin 2018-10-30 17:37:45 -03:00
Dalai Felinto
d7c6013d01 Multi-Objects: CURVE_OT_dissolve_verts 2018-10-30 17:07:32 -03:00
df613a52e6 Multi-Objects: CURVE_OT_de_select_last
Reviewers: dfelinto
https://developer.blender.org/D3841
2018-10-30 16:22:55 -03:00
9d9d44dbcb Multi-Objects: CURVE_OT_de_select_first
Reviewers: dfelinto
https://developer.blender.org/D3839
2018-10-30 16:22:55 -03:00
Dalai Felinto
47afabbb42 Multi-Objects: CURVE_OT_select_nth
Based on D3407 by Daniel Griffin.
2018-10-30 16:22:55 -03:00
456e3f00e0 Fix broken 'search pointer' UI since this morning.
Own rB4669c3692cc4f broke completely those searchbox pointers UI
widgets... This is a quick fix, better name handling is for tomorrow.
2018-10-30 19:55:02 +01:00
10caf398b3 UI: Cleanup typos and minor tweaks to Grease Pencil related text
First pass on adding articles, capitalize Grease Pencil, use 'keyframes' instead of 'frames' when
possible, and other minor adjustments.
2018-10-30 19:54:42 +01:00
603774c1eb Fix T56865: Selection of bones not working properly if the option In Front (old X-ray) is enabled
Differential Revision: https://developer.blender.org/D3828
2018-10-30 15:31:32 -03:00
bf5ba49698 Partial fix to T56865: X-ray modes does not work for the weight paint overlay.
Part of the D3828 review.
2018-10-30 15:20:47 -03:00
ffcf193653 UI: Make Wireframe size respect DPI settings 2018-10-30 19:07:49 +01:00
Roel Koster
09416fe6e1 Fix outliner scrollbar overlapping icons.
Differential Revision: https://developer.blender.org/D3650
2018-10-30 19:04:38 +01:00
c8e6134386 Fix T56499: Adapt incremental snapping to orthographic viewport scale. 2018-10-30 14:22:30 -03:00
6f311ef57e GP: New Fade no active layer overlay option
This option allows to fade all layers except active one. This can help in very crowded scenes with a lot of layers, to verify you are working in the right one.
2018-10-30 17:54:01 +01:00
e7811ce0c4 Fix T57517: multires displacement baking relative to smooth base mesh not working.
When baking relative to multires level 0, it would apply one level of simple
subdivision still, which gave artifacts.
2018-10-30 17:15:32 +01:00
87f4c83018 Object Mode: Grid: Allow more subdivision in orthographic views
2.7x was displaying 2 additional subdivision for theses views. Bumping to 3
just to say we improved it!
Hypothetically it can be increased as much as we want but float precision
can quickly become an issue.
2018-10-30 16:44:23 +01:00
c4f69794ca UI: Fix point size and line width ignoring UI scaling option 2018-10-30 16:44:23 +01:00
26223f8d9a Object Mode: Grid: Reduce line thickness a tiny bit and apply UI scaling 2018-10-30 16:44:23 +01:00
a1cdf9cc3f UI: Fix inverted selection restrict icon 2018-10-30 16:44:23 +01:00
c62fad2a9a Fix T57512: Creating a full copy scene doens't support parenting.
Will say it once again: we should really, really switch all that
duplicating code to proper use of new ID management API :(
2018-10-30 16:14:33 +01:00
974d158f3f PyAPI: GPU: improve GPUShader.from_builtin and GPUShader.code_from_builtin description. 2018-10-30 11:38:42 -03:00
2dbddaf3be Fix "make update" on Windows not updating addons to the blender2.8 branch.
based on rB8e183a83b7aa3bbdefcdea6a86ca2c0dbd00417f
2018-10-30 07:55:45 -06:00
8e183a83b7 Fix "make update" on macOS/Linux not updating addons to the blender2.8 branch.
This will need to be removed once we merge into master.
2018-10-30 14:43:09 +01:00
450f0c4a90 Fix wrong grease pencil modifier show viewport/render icons. 2018-10-30 14:15:03 +01:00
6e04c8e3ff UI: update Cycles passes panel for single column. 2018-10-30 14:14:56 +01:00
dffde4a49c Merge branch 'master' into blender2.8 2018-10-30 14:13:47 +01:00
500fbfd02a GP: Back Stroke projection mode
Back the old 2.7x  stroke mode when drawing. This mode try to project the new strokes over the previous strokes.
2018-10-30 12:59:58 +01:00
5f0cee26f0 GP: Cleanup unused 2018-10-30 12:59:58 +01:00
f3961ab46d GPU: Extend mac blitting workaround to AMD Radeon R9 familly 2018-10-30 13:04:06 +01:00
7c0d37deca Fix build error on Windows 32bit, alignment was wrong. 2018-10-30 11:39:44 +01:00
c760285ae0 Add 'O' for Overrides to our key-coded ID UI-names generator. 2018-10-30 11:00:25 +01:00
4669c3692c Add library-hint to datablock search menus.
We had those for ID templates, but it's also tremendously useful for
regular ID pointers UI, since often you can get local and linked
data-block with same exact name...

Fetaure request from Spring team (and long due TODO...).
2018-10-30 11:00:25 +01:00
76a047893c GPU: Fix faulty mac gpu detection 2018-10-30 11:02:59 +01:00
f907eb4268 PyAPI: Use 'None' arg to clear header text 2018-10-30 16:20:38 +11:00
f711c44b8d PyAPI: Support for 'None' string args from Python
This is needed because some RNA functions differentiate a NULL 'char *'
argument from an empty string.

Previously a NULL argument could be passed when the C definition
defined the default as NULL and the argument wasn't passed
which is a fairly hidden way of handling things.

Now strings use `PROP_NEVER_NULL` by default
which can be cleared for function arguments that allow None -> NULL.
2018-10-30 16:17:46 +11:00
0973ea5132 Multi-Object EditMode: curve delete
D3859 by @zazizizou
2018-10-30 14:14:03 +11:00
c3d170d538 Sequencer: replace notifier /w message-bus 2018-10-30 11:49:06 +11:00
3d550dd900 Cleanup: keep RNA types sorted 2018-10-30 11:07:00 +11:00
5e091de0dc Fix memory leak in workspace menu 2018-10-30 10:57:46 +11:00
817319a79e UI: add uiItemMenuFN which frees it's argument 2018-10-30 10:57:33 +11:00
4205cd269d UI: add uiItemMenuFN which frees it's argument 2018-10-30 10:53:47 +11:00
b3478930d8 Fix crash adding workspace 2018-10-30 10:28:12 +11:00
Julian Eisel
70582cf8d2 UI: Support using Ctrl+Scrollwheel to cycle properties editor tabs
Small side effect is that area operators (toggle fullscreen/maximized, duplicate
area) are now displayed in RMB-menu. Makes sense anyway.
2018-10-29 23:29:26 +01:00
Julian Eisel
a0d40c6a8c UI: Move Properties editor context path into header
This will probably be a temporary solution to fill empty space, for until we
have a search button there. Hence, I made this optional using a compile flag.
2018-10-29 22:59:57 +01:00
39a1d45279 WM: correct description for header/status_text_set
Make text a required argument for both.
2018-10-30 08:55:36 +11:00
79ff9a0e19 3D View: use 1.0 opacity for wpaint shading
Now the colors are multiplied, faded color isn't useful to see weights.

Matches 2.7x behavior.
2018-10-30 08:50:44 +11:00
d69fe6325d Eevee: Fix clearcoat materials not recieving AO 2018-10-29 22:40:42 +01:00
4f4a74c0af UI: Fix Studio Light panel in user preferencies 2018-10-29 22:40:42 +01:00
Julian Eisel
d64247976c UI: Update Default Theme File After Recent Changes 2018-10-29 21:47:27 +01:00
Julian Eisel
ab6c7ff2ab UI: Vertical Properties Editor Tabs
Moves the Properties editor context switching to a vertical tabs region.

Design Task: T54951
Differential Revison: D3840

The tabs are regular widgets, unlike the 'old' toolshelf tabs. This means they
give mouse hover feedback, have tooltips, support the right-click menu, etc.
Also, when vertical screen space gets tight, the tabs can be scrolled, they
don't shrink like the toolshelf ones.
The tab region is slightly larger than the header. The tabs are scaled up
accordingly. This makes them nicely readable.

The header is quite empty now. As shown in T54951, we wanted to have a search
button there. This should be added next.

Implementation Notes:

* Added a new region type, RGN_TYPE_NAVIGATION.
* Having the tabs in a separate region allows scrolling of the tab-bar, unlike
  the toolshelf tabs. We might want to remove the scrollbars though.
* Added a new region flag RGN_FLAG_PREFSIZE_OR_HIDDEN, to ensure the tab region
  is either hidden or has a fixed size.
* Added some additional flags to support fine-tuning the layout in panel and
  layout code.
* Bumps subversion.
2018-10-29 21:44:01 +01:00
Julian Eisel
ce148716c8 UI: Support Displaying Enums as Tabs
Adds `uiLayout.prop_tabs_enum(data, property, icon_only)` to BPY.
2018-10-29 21:20:58 +01:00
a0dfa320cd Dope Sheet: new option to display keyframe interpolation mode and extremes.
With the new automatic handle algorithm, it is possible to do a lot
of the animation via keyframes without touching the curves. It is
however necessary to change the keyframe interpolation and handle
types in certain cases. Currently the dopesheet/action editor
allows changing the types, but does not show them in any way.

To fix, add a new menu option to display this information. For handle
type, it is represented using the shape of the key icons: diamond for
Free, clipped diamond for Aligned, square for Vector, circle for Auto
Clamp, and cirle with dot for Automatic.

Non-bezier interpolation is a property of intervals between keys,
so it is marked by drawing lines, similar to holds. In this initial
version, only the fact of non-bezier interpolation is displayed,
without distinguishing types. For summaries, the line is drawn at
half alpha if not all curves in the group are non-bezier.

In addition, it is sometimes helpful to know the general direction
of change of the curve, and which keys are extremes. This commit
also adds an option to highlight extremes, based on comparing the
keyed values with adjacent keys. Half-intensity display is used
for overshot bezier extremes, or non-uniform summaries.

Reviewers: brecht, aligorith, billreynish

Differential Revision: https://developer.blender.org/D3788
2018-10-29 22:04:19 +03:00
William Reynish
b18ac77df3 UI: icon set updates Andrzej Ambroz, and various fixes.
* Text editor word wrap, line numbers & syntax toggles now use consistent icons
  that don’t change when you enable or disable them.
* Replaced icon toggle buttons in the snapping popover with normal checkboxes
  and descriptive text labels. This makes it clearer which item is the main
  radio button, is more consistent with other popovers, and allows us to use
  more descriptive text.
* Added correct icons for grease pencil add menu.
* Added bespoke icons for grease pencil modifiers.
* Added icon for particle instance modifier.
* Added icon for fake user on & off states.
* Added correct icons for enabling/disabling modifiers in the dopesheet &
  f-curve editor.
* Made it so the restrict viewport & restrict render toggles for modifier
  update correctly when enabled or disabled, by flipping the order in the
  icon sheet. This also required changing the outliner to match.
* Removed the few old remaining icons in the old style and made sure to replace
  the last places where they were used.
* Updated many icons to be clearer & more consistent.
2018-10-29 19:04:07 +01:00
b5667c2ca7 UI: allow off/on icons to be in reverse order.
The same icons are reused for "hide" and "show" properties, which need
to be in reverse order compared to each other.
2018-10-29 19:04:07 +01:00
4c7f08e5eb Cleanup: remove unused RNA flag. 2018-10-29 19:03:47 +01:00
bb770a2c85 Depsgraph: use full operation key to preserve update tags on rebuild.
The key used by find_operation consists of the operation code,
node name, and an index for array property drivers. All three
elements are required to unambiguously look up a node.
2018-10-29 20:54:38 +03:00
62e2bbd068 Fix T57488: crash in Shrinkwrap constraint due to unsafe multi-threading.
- Constraints must not use mesh_get_eval_final as it isn't thread-safe.
- Depsgraph should keep lastDataMask when re-running COW.
2018-10-29 20:33:15 +03:00
bd7cb42f3d GP: Remove unneeded code to get icon
Test the object type is not good idea here.
2018-10-29 17:49:26 +01:00
11f9018ec6 GP: Cleanup typo 2018-10-29 16:43:11 +01:00
29428859d9 Depsgraph cleanup: use proper DEG_debug_print_eval call... 2018-10-29 16:37:27 +01:00
363a196ed6 BBox accessor: switch to switch, add missing gpencil case. 2018-10-29 16:37:27 +01:00
8ee575867a Eevee: Fix Sun soft shadows not starting at first sample 2018-10-29 16:26:52 +01:00
6b3981737a Edit Mode: Fix "Hidden Wire" option not working 2018-10-29 16:26:52 +01:00
e3817e5ec1 Cycles: Support generating Denoising passes without actually denoising
Needed for the animation denoiser since the denoising filter is done separately there.

Reviewers: brecht, sergey

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3833
2018-10-29 15:50:01 +01:00
2a9b53b970 UI: Typo in tooltip 2018-10-29 14:43:12 +01:00
abdda29dab Fix: Pose Breakdown operator (continued) 2018-10-29 14:07:47 +01:00
1c326e5079 Fix: Pose Breakdown operator
Reviewer: brecht

Differential Revision: D3848
2018-10-29 13:58:09 +01:00
e7f423dffd Merge branch 'master' into blender2.8 2018-10-29 13:26:09 +01:00
17d91bcb61 Cycles: more detailed tooltips for cryptomatte options. 2018-10-29 13:22:58 +01:00
48f9e24f0c Enable dependency graph update while rendering
It is a whole point of copy-on-write to make such updates safe.
If this causes an issues, we need to solve them.

Fixes T57302: Viewport (selection etc) not updated while rendering
2018-10-29 12:16:18 +01:00
b2411fe269 Fix unneeded/unwanted user counter when freeing CoW NLA 2018-10-29 11:48:37 +01:00
61d49d3448 Fix T57360: Crash when Play Animation in this scene
Was caused by a code which was putting animation value back to
original datablock.

The tricky part here is that we don't always know ID, so can not
put those values. Would be nice to have a solution for this, but
for until then we should be relatively good.
2018-10-29 11:48:37 +01:00
f887dc1f5c Fix T57372: Second full scene copy crashes on deletion.
Hope this time we are done for good (root of the issue was that master
collections are not in bmain...).
2018-10-29 11:42:38 +01:00
c2791777bd Fix stupid multiple-call of same function in Collections remapping code.
Related to T57372: Second full scene copy crashes on deletion (fixes
deleting second copy, but now it crashes on deleting the first copy...).
2018-10-29 10:53:10 +01:00
262504ddd1 Fix T57384: Depsgraph assert after loading file with Mask Node
Maniphest Tasks: T57384

Differential Revision: https://developer.blender.org/D3831
2018-10-29 10:40:02 +01:00
4e6f5fabd4 Fix topbar UI being lost on undo w/ mode change 2018-10-29 20:20:16 +11:00
0e268fb68b Fix topbar tool UI being lost on undo
Using operators to the object mode was resetting the tool.

See: T56865
2018-10-29 17:36:39 +11:00
cf1cf105a0 Merge branch 'master' into blender2.8 2018-10-29 15:23:02 +11:00
7367c0bde4 Fix assert weight painting after undo 2018-10-29 15:21:25 +11:00
95150b8414 Multi-Object EditMode: curve select next/prev
D3842 & D3843 by @zazizizou
2018-10-29 13:41:44 +11:00
45aa812fb3 Multi-Object EditMode: curve select more/less
D3844 by @zazizizou with support for select-less
2018-10-29 13:25:04 +11:00
a0453dadf0 Merge branch 'master' into blender2.8 2018-10-29 13:04:47 +11:00
6c892efdbc Modifier: mask threshold option
D3834 by @Allosteric
2018-10-29 13:03:28 +11:00
d58cf8292c Cleanup: avoid C++ keyword in DNA 2018-10-29 12:49:47 +11:00
c750ebe113 PyAPI: remove GPUVertFormat() creation from a list
We already have `attr_add` method,
best not have two ways to do the same thing.

See: D3830
2018-10-29 11:08:55 +11:00
02035c34b7 Cleanup: typo 2018-10-29 10:35:05 +11:00
26ed545276 Cleanup: style 2018-10-29 10:24:42 +11:00
Julian Eisel
05588f909a Fix crash flipping region without active area
Would happen when cursor is in-between editors for example.
2018-10-28 22:56:37 +01:00
49f6c3556c DRW: Cleanup: Redundant check 2018-10-28 21:48:22 +01:00
b8331b79e6 Eevee: Implement jittered soft shadowmap
This new option is located in the shadows options in the render settings.
This approach is simple and just randomize the shadow map position (not
the lamp itself) and just let the temporal supersampling do the average of
all the shadowing. The downside is that is needs quite a large number of
samples to give smooth results and individual sample position can remain
visible.

Enabling this option will make the viewport refresh all shadow maps every
redraw so it has a serious performance impact.

This approach is not physicaly based at all and will not match cycles.

----

The sampling for point lamps (spheres) is not
2018-10-28 21:48:22 +01:00
2c545c0409 BLI: Add comment about to orthogonalize_m3/4 2018-10-28 21:48:22 +01:00
61e4e3178d Eevee: Fix contact shadow creating to overshadowing
This was because the shadow rays could be generated below the geometric
normal.
2018-10-28 21:48:22 +01:00
f15afc47ed Use keyword argument for ui label text in cryptomatte passes 2018-10-28 20:39:44 +01:00
39bc44ffc5 GP: Refactor Instance modifier and rename to Array
The old name Instance was logic when the modifier created new object instances, but now works equal to mesh Array modifier, so the old name was not logic and must be Array.

Also added a Object to use as offset similar to mesh Array modifier.
2018-10-28 18:20:50 +01:00
9bcdb19a3e Fix label misalignment when there are multiple buttons on the right side. 2018-10-28 17:46:52 +01:00
41a284212a Cleanup: fix compiler warnings. 2018-10-28 17:46:51 +01:00
046735d751 Merge branch 'master' into blender2.8 2018-10-28 16:41:30 +01:00
Roel Koster
e3d2df0380 Fix snaps appearing in system bookmarks on Linux.
Differential Revision: https://developer.blender.org/D3838
2018-10-28 15:08:21 +01:00
47953dee79 Fix Linux build after Cryptomatte commit. 2018-10-28 14:55:55 +01:00
94ab6429bb Fix T57394: missing bl_category in panel (custom props / stereoscopy)
Differential Revision: https://developer.blender.org/D3835
2018-10-28 10:40:38 +01:00
Stefan Werner
e58c6cf0c6 Cycles: Added Cryptomatte output.
This allows for extra output passes that encode automatic object and material masks
for the entire scene. It is an implementation of the Cryptomatte standard as
introduced by Psyop. A good future extension would be to add a manifest to the
export and to do plenty of testing to ensure that it is fully compatible with other
renderers and compositing programs that use Cryptomatte.

Internally, it adds the ability for Cycles to have several passes of the same type
that are distinguished by their name.

Differential Revision: https://developer.blender.org/D3538
2018-10-28 05:37:41 -04:00
Severin
3bc8bc0709 Cleanup: More meaningful variable name 2018-10-27 17:18:29 +02:00
c0b3e3daeb Fix T57393: Cycles OSL bevel and AO not working after OSL upgrade. 2018-10-27 15:00:37 +02:00
7e3e26d00a Tool System: pie menu style activate-on-release
Support activate on release for the popup toolbar.
2018-10-27 12:25:05 +11:00
5e853849eb UI: operator to press the active button
Needed to use the keymap to activate buttons from other keys.
2018-10-27 12:25:02 +11:00
Dalai Felinto
6479e800bc Multi-Objects: Curve - select pick, linked and short path
I'm following mesh editing to decide when to switch active object, or
deselect the other objects. I hope we can keep this all consistent in
the end.
2018-10-26 20:01:19 -03:00
Dalai Felinto
7cbbc65faa Cleanup: Remove silly redundant if check in ED_armature_edit_select_pick 2018-10-26 19:20:12 -03:00
Dalai Felinto
254774a988 Fix T57367: Multi-Object-Mode: Edit Lattice selection only working for active object
For the records, curves still have this problem.
2018-10-26 19:18:52 -03:00
Dalai Felinto
cd36d3f4d3 Fix lasso selection not working for lattices
Regression introduced on e88e80a6.
This was broken for both single and multi-objects.

It is a typo that apparently slipt through testing, oh well.
I'm glad I caught this, I just wished it would have been faster.
2018-10-26 18:30:09 -03:00
Dalai Felinto
009bfbf408 Fix crash when switching to Scripting workspace
Crash introduced on: a4a6ed1ba3.
2018-10-26 15:33:20 -03:00
Dalai Felinto
b6a795f285 Small cleanup: Remove uneeded/wrong check
If ob was NULL it would crash in the else part of the if statement.
If we really think we may run into that (which we should not) we can just assert
or add a if (ob == NULL) return; in the top of the function.
2018-10-26 13:48:14 -03:00
Dalai Felinto
f1974bb340 Fix unreported: Crash when adding lattice vertex group 2018-10-26 13:48:14 -03:00
Dalai Felinto
6d4e776711 Fix unreported: Crash when removing lattice vertex group 2018-10-26 13:39:51 -03:00
Dalai Felinto
4af280ac90 Refactor cleanup: BKE_object_is_in_editmode
Using switch and keep it concise.
2018-10-26 13:39:51 -03:00
Dalai Felinto
a2dc4d2532 Fix T57368: Multi-Object-Mode: Edit Lattice draws only active
As it turned out the issue wasn't that we were drawing only the active,
but that the "object mode" lattice drawing was drawing on top of the
drawing for all the edit mode lattice objects.

We are doing the same original behaviour for curves and even meshes. To be
investigated if it is ok for those other cases.
2018-10-26 13:11:07 -03:00
f1673d20fa Cycles: Expose noisy image pass by default when rendering with denoiser
Apparently quite a few users would like to have the noisy pass available when using the denoiser, and since it's being generated anyways we might as well expose it by default.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3608
2018-10-26 16:21:11 +02:00
Dalai Felinto
1cc7d71a0b Multi-Objects: LATTICE_OT_make_regular
Committing this for the sake of completionism. I'm going to bring this
up for review, I think we may want to revert it.

Fundamentally I'm changing the behaviour of the operator both in object
mode (acting on all selected lattice objects), as well as the edit mode
(acting on all lattices in edit mode, regardless of them having any
 selected vertice).
2018-10-26 11:04:54 -03:00
70d73ff500 Eevee: SSS: Fix issue with mac and stencil buffer blitting
Adding a workaround in this case: we blit the depth buffer instead of the
stencil buffer and use the copy as the texture. This is slower but at
least it should work.
2018-10-26 10:54:21 +02:00
d5fe6e4785 GPU: Add workarounds for buggy glBlitFramebuffer function on macOS + Radeon
When calling glBlitFramebuffer on most (if not all) mac that have a GPU
from the Radeon Pro series, the data is not properly copied and only a
subset of the pixels are correctly copied.

This only happens when blitting the depth buffer if the depth buffer is
GL_DEPTH24_STENCIL8.

Changing the depth buffer format to GPU_DEPTH32F_STENCIL8 fixes the issue
but only works if blitting the depth componnent. The stencil componnent
still provoke issues when being copied.
2018-10-26 10:54:21 +02:00
48b56481ea GPUTexture: Add supports for GL_DEPTH32F_STENCIL8 texture format 2018-10-26 10:54:21 +02:00
a321f68f64 Workbench: Fix shadows on macOS 2018-10-26 10:54:21 +02:00
9b7dd0a93f GP: Assign new materials to brushes
When create a new material, this must be set to the brushes automatically.
2018-10-26 09:02:28 +02:00
6be7a98906 PyAPI: raise error when toolbar panels use tabs
Add-ons that register panels in the toolbar can
no longer use 'bl_categories' (tabs).
2018-10-26 15:05:07 +11:00
4c75cc488a Correction for Gizmo.draw_custom_shape utility API 2018-10-26 12:43:40 +11:00
0264c050bf PyAPI: gpu utility module to create new batches
Support the common case of creating batches from python geometry,
a shader and optionally indices.

See D3779
2018-10-26 12:40:43 +11:00
ca8fee62ab Update gpu offscreen PyAPI example 2018-10-26 12:13:03 +11:00
065d19e223 Fix parsing single int for uniform_int
This worked for float but not int.
2018-10-26 11:59:49 +11:00
0f0eafaa0e Cleanup: minor change to last commit 2018-10-26 11:48:42 +11:00
6d2897c7ed Update Gizmo.draw_custom_shape for API changes 2018-10-26 11:26:39 +11:00
a4a6ed1ba3 WM: default tool was being set for space types w/o tools
Add mask for space types so we don't accidentally add tools
for space types that don't support it.
2018-10-26 10:46:35 +11:00
6c86e1a781 PyAPI: draw handlers now store args in the capsule context
Was using the handlers custom-data which crashes
when Blender frees the screen data before Python removes the handler.
2018-10-26 09:30:17 +11:00
35991d9990 PyAPI: Temp workaround for crash removing cursor
Opening a new file frees the cursors,
add check if the cursor is still valid.

This leaks a Python reference, so a better solution is needed.
2018-10-26 08:49:10 +11:00
1d8ba9d618 PyAPI: Make GPUVertFormat() argument optional 2018-10-26 08:06:05 +11:00
b445d57ccf GP: Add warning when mix Build and Time Offset 2018-10-25 19:15:32 +02:00
4c2561a877 GP: Include option to render layers by view layer
This allows to make composition getting each grease pencil layer in a different render output.
2018-10-25 16:50:42 +02:00
2b6253175e Cleanup: comments and unused code 2018-10-25 13:41:32 +00:00
65b25df801 Cycles: Overhaul ensure_valid_reflection to fix issues with normal- and bumpmapping
This function is supposed to prevent the black artifacts caused by strong normal- or bumpmapping, but failed in some cases.

Now the code correctly handles all test files and previous issues I am aware of and also has extensive comments describing
the algorithm and the math behind it.

Basically, the main problem was that there can be multiple valid solutions that fulfil the reflection angle criterium,
but I had assumed that only one would exist and therefore simply picked the first solution with a positive term in srqt().
Now, the code uses additional validity checks and a simple heuristic to pick the best valid solution.

Additionally, the code messed up very shallow reflections even if the normal map strength was zero due to the constant
limit for the outgoing ray angle, which caused shallow incoming rays to fail the initial test even when reflected directly
on Ng. Now, the code accounts for this by reducing the threshold in the case of a shallow incoming ray, ensuring that at
least N=Ng is always a valid solution.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3816
2018-10-25 14:50:48 +02:00
869b1a8d6e Tool System: draw circle-select brush outline 2018-10-25 21:05:47 +11:00
9a6d8f809d Tool System: support custom cursor drawing 2018-10-25 21:05:47 +11:00
f606ee7637 PyAPI: initial gpu_extras module (circle drawing utility) 2018-10-25 21:05:47 +11:00
6ed9fcbabc PyAPI: rename GPL VertBuf.attr_fill identifier to id
This is used elsewhere in the API and its a common abbreviation.
2018-10-25 20:34:23 +11:00
c25fa615d4 Depsgraph: don't lose the update tag on rebuild for op nodes with a name.
This fixes a missing update when clearing the Text On Curve
(follow_curve) option of a text object.
2018-10-25 10:32:32 +03:00
1a827e0564 Cleanup: move params into their own struct 2018-10-25 17:20:26 +11:00
ce08b07a89 PyAPI: take paint-cursor space/region type args 2018-10-25 16:27:13 +11:00
6d49b623e2 WM: space, region type filtering for paint cursor
Avoids calling poll on mouse-move for unrelated space/region types.
2018-10-25 16:06:47 +11:00
46587b3ccb PyAPI: support for Python paint cursors 2018-10-25 15:31:02 +11:00
f2c77558b4 Merge branch 'master' into blender2.8 2018-10-25 15:19:35 +11:00
2046817c08 WM: minor changes to cursor API 2018-10-25 15:18:24 +11:00
05f2caa210 Merge branch 'master' into blender2.8 2018-10-25 12:26:08 +11:00
c9e36e5434 Cleanup: unused vars, correct bad (unused) logic 2018-10-25 12:24:38 +11:00
23fdac8672 Cleanup: unused variables 2018-10-25 12:03:34 +11:00
bf34f95a9e UI: move 2d paint panels to topbar & toolsettings
Removed 'Tool' and 'Options' panels,
both these settings are quite obscure and
already available in the 'Brush' menu.
2018-10-25 11:15:48 +11:00
03e0fd289d Fix top bar unified color & image paint brush 2018-10-25 09:54:18 +11:00
4082502239 GP: Fix compiler warnings 2018-10-24 22:53:28 +02:00
97ec802da7 Depsgraph: fixes for the eval_flags API behavior.
- Use the original ID pointer for lookup in DEG_get_eval_flags_for_id.
- When the flags change after a DEG rebuild, tag the object for update.
- Instead of mixing int and short in different places, use uint32_t.

This fixes text not updating when a Follow Curve reference is set.
2018-10-24 22:14:32 +03:00
e66084268c Fix T56172 Accessing COW data from RNA - Dimension
Also fixes T55769 Dimension Not properly work
and T56064 Blender crashes on selecting text-object

We decided to go to the easy way in the end, simply enforcing computing
BBox of all objects when using 'active' depsgraph, and copying back to
orig object (same as transform matrix, etc.).
2018-10-24 17:21:56 +02:00
0ce8ee526f GP: Add missing title for Armature modifier 2018-10-24 17:10:51 +02:00
9691c32d38 GP: Rename Fixed type in Time modifier 2018-10-24 16:59:13 +02:00
735d6cb8d8 GP: Add new Layer Pass Index filter to modifiers
Now the modifier can be filtered using the new layer index.

Also changed panels to put layers and passes filter always at the end of the panel.
2018-10-24 16:46:35 +02:00
a211937892 Fix T57361: Creating a new scene with a full copy doesn't work.
BKE_scene_copy() & co. were pretty much doing nothing right...

Was a tough fight, but at least now they should behave a tad better (and
reported issue is fixed).

Proper fix is to fully rewrite that PoS, it was already a mess without
collections, now it's even hairier to handle properly, we need to use
modern new ID handling API for that (and maybe extend it a bit as
needed). But way too late to do that in 2.80.
2018-10-24 14:48:05 +02:00
91c6beb28a Cleanup: Remove unused modifiers callback
Was only used by subsurf in the past years, it is unlikely
other modifiers will every need this any time soon.
2018-10-24 14:04:29 +02:00
547d31c8da Depsgraph: minor renaming and refactor of API for adding evaluation flags. 2018-10-24 13:45:03 +03:00
6e3a9b9313 Subsurf: Remove edit mesh modifier callbacks
Those were used for partial updates during edit mode, which will
not be possible anymore with OpenSubdiv.

Optimization for OpenSubdiv would be to re-use topology refiner
if topology does not change. But this is something to be done
for both edit and object modes, no need to have separate code
paths for those.

This commit makes OpenSubdiv to properly work in edit mode.
2018-10-24 12:40:05 +02:00
f1f0666bfc Fix Python warnings when running in background. 2018-10-24 11:14:49 +02:00
727d6644da Cleanup: fix compiler warnings. 2018-10-24 11:14:49 +02:00
e1a66201da GP: Add layer pass index to time modifier 2018-10-24 11:03:09 +02:00
341306995b Fix: buffer overflow when creating gpu.types.GPUIndexBuf 2018-10-24 10:57:46 +02:00
5af716620a GP: Add new modes to Time Offset modifier 2018-10-24 10:32:03 +02:00
0589368615 GPUShader: shader.uniform_float, matrix parsing
Add checks to parse 3x3 or 4x4 matrices,
also use error from `mathutils_array_parse` instead of overwriting.
2018-10-24 18:47:36 +11:00
c8ab88fb89 Partially revert "GPUShader: shader.uniform_float parameters"
`mathutils_array_parse` is meant to parse 1d arrays of numbers.

Using matrices internal memory layout is confusing since
mathutils matrices are exposed as row major.

Also, the matrix shape wasn't checked for.

Callers that want to handle matrices should check for them explicitly.
2018-10-24 18:47:36 +11:00
ee18b21201 Fix T57359: Crash adding a Driver and then changing frame 2018-10-24 09:44:57 +02:00
8ccb27fc0a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/scene.c
2018-10-24 09:00:13 +02:00
65d4314b8e Fix (unreported) bad halding of ID usercounts when fully copying a scene. 2018-10-24 08:43:20 +02:00
7b79216c54 Merge branch 'master' into blender2.8
Conflicts:
	intern/locale/boost_locale_wrapper.cpp
2018-10-24 08:26:32 +02:00
35d7211bfa I18n: tweak/fix exception catching code of pgettex() wrapper.
Related to T57066, rather unlikely to fix core of the issue, but may
solve crash itself.

Same as rBf22385f28ec8 (did it by mistake in 2.8 first :/ ).
2018-10-24 08:23:14 +02:00
a41f85d324 Fix error w/ poly-build clearing the edit-object 2018-10-24 16:26:33 +11:00
4b2b8a0c3f Fix T57351: Deform modifiers skipped in editmode 2018-10-24 14:48:17 +11:00
Dalai Felinto
175326fed7 Fixup for LATTICE_OT_flip
Committed by accident (1076523b1b).
But now I need to fix building.

Note: The operator itself shouldn't have been committed because it
should operate in the world space (for the axis), not local.

I will tackle this later.
2018-10-24 00:00:57 -03:00
Dalai Felinto
975974e291 Silence some false positiver warnings 2018-10-23 23:47:04 -03:00
Dalai Felinto
1076523b1b Multi-Objects: LATTICE_OT_flip 2018-10-23 23:29:51 -03:00
69dd58f210 Fix mapped mesh display skipping generated faces 2018-10-24 13:12:18 +11:00
7dfd3539d5 Cleanup: use bmesh index access functions 2018-10-24 13:07:21 +11:00
860dd31647 Merge branch 'master' into blender2.8 2018-10-24 12:55:44 +11:00
db69deea89 BMesh: inline index lookups
For release builds this is now the same as indexing the array directly.
2018-10-24 12:54:26 +11:00
901ccfab52 Fix T57366: Mesh.from_pydata invalid loose-edge state 2018-10-24 11:37:44 +11:00
Dalai Felinto
134db5618a Lattice UI: Add select more/less to menu 2018-10-23 20:40:19 -03:00
Dalai Felinto
9f1857002e Multi-Objects: LATTICE_OT_select_more/less
Note: Those operators are yet to be added to the menu.
2018-10-23 20:38:30 -03:00
Dalai Felinto
c052d38d0a Multi-Objects: LATTICE_OT_select_ungrouped
I thought about having a single error message, or to use BKE_reportf to just
add the "s". That would be bad for translators, so now we have two
explicit messages.
2018-10-23 20:25:59 -03:00
ed7f6b511f Eevee: Fix lightcache not working for small caches
Was caused by a threading issue. The lightcache was free before the endjob
function pass it to the scene.

Also fix cache reuse if size matches.
2018-10-23 18:04:45 +02:00
8e8d1cab6f Eevee: Fix crash when clicking the lightcache bake button multiple time 2018-10-23 18:04:45 +02:00
ee8e866a0e Eevee: Fix crash when baking
Was caused by the normal pass being enbaled in the renderlayer settings.

Fix T57344
2018-10-23 18:04:45 +02:00
2c35307f09 Workbench: Use AntiAliasing in render even if not enabled in the User Prefs 2018-10-23 18:04:45 +02:00
8742f6358b Workbench: Fix Wrong AntiAliasing in renders
Was caused by offseting the same matrix for each samples instead of adding
the offset to the original projection matrix.
2018-10-23 18:04:45 +02:00
51b6e313de Fix T57326: Adding Scene with Transparent Film to VSE Crashes Blender
Previous Framebuffer can be NULL.
2018-10-23 18:04:45 +02:00
28d5ebbc15 Wireframe: Fix wireframe object drawtype with "in front" draw option
First problem is that enabling the "in front" option made the wire object
test against an not updated stencil buffer.

Second problem is that the "in front" option was useless on wire objects.
To fix this we bypass the depth test and live with some sorting problem.
2018-10-23 18:04:45 +02:00
238d3471bd Xray Mode: Fix wireframe object display type not being correctly occluded 2018-10-23 18:04:45 +02:00
0d453d3c48 GP: Rename Offset to Frame Offset in Time modifier 2018-10-23 17:28:02 +02:00
3e9405e26d GP: Add new frame scale parameter to Time modifier
This new parameter allows to increase or decrease the animation speed to break animation patterns when reuse data blocks.
2018-10-23 16:47:09 +02:00
ca003d0f5c Fix missing relations update after allocating compositor
Compositor has own node in the dependency graph, so need to make
sure relations are up to date.

This fixes wrong user counter when creating compositor nodes for
a new scene.
2018-10-23 15:38:09 +02:00
f22385f28e I18n: tweak/fix exception catching code of pgettex() wrapper.
Related to T57066, rather unlikely to fix core of the issue, but may
solve crash itself.
2018-10-23 14:36:05 +02:00
1ab08a2dff Rename editor to "Texture Node Editor"
This editor edits nodes, and the old name of "Texture Editor" is misleading,
since when one want to edit it is unclear whether UV/Image or Texture editor
is more suitable for the task.
2018-10-23 14:29:13 +02:00
767b49e492 Fix: missing sequencer update
This should be fixed differently in the future. Read D3821 for more details.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3821
2018-10-23 14:03:57 +02:00
bc480c4989 GP: Rename modifier Time to Time Offset 2018-10-23 13:16:15 +02:00
7cb0e1499d Fix compiler error in Windows 2018-10-23 13:13:04 +02:00
f77eafed33 GP: Add transform tools to Toolbar 2018-10-23 13:03:46 +02:00
f927f388f6 Fix T57288: Assert when deleting duplicated collection (id->us == 0).
Copying an ID also add a default user to new one (just like creating an
ID), by default...
2018-10-23 12:00:46 +02:00
6d1fd1dc58 GP: Reduce samples in glow
The number of samples was too high.
2018-10-23 10:57:50 +02:00
fc3d771801 GPUShader: shader.uniform_float parameters
Allow to pass in single numbers, sequences and mathutils.* types into `shader.uniform_float`.

Reviewers: mano-wii

Differential Revision: https://developer.blender.org/D3820
2018-10-23 10:19:08 +02:00
13cfb641c6 Point addons contrib to 2.8 branch 2018-10-23 09:41:12 +02:00
32de646d3d Multi-Objects: Calculate Transform origin w/ all editmode meshes
D3550 by @Leon95
2018-10-23 17:55:02 +11:00
bb3d999571 Fix T57190: loopcut crash w/o overlays 2018-10-23 15:16:49 +11:00
756ac74f81 Cleanup: rename 'dm' -> 'me' for 'Mesh' types 2018-10-23 15:00:40 +11:00
dbdf653f8e Fix bad origindex layers for editmode modifiers
Reverts workaround from last commit.
2018-10-23 13:53:42 +11:00
e3013fdc3b DRW: workaround for editmode crash w/ constructive modifiers
Actual cause is bad orig-index layer,
commit this to avoid crash for now.
2018-10-23 12:34:34 +11:00
5891f81f25 Cleanup: style, warning 2018-10-23 11:01:25 +11:00
e5182fa101 Cleanup: rename VertBuf.fill_attribute > attr_fill 2018-10-23 10:50:48 +11:00
William Reynish
43c6aba670 Fix various icon related issues:
* Used correct icons for Tracking.
* Flip Copy/Paste icons so they are correct.
* Add correct icon for softbody modifier.
* Replace speaker icons for enabling F-Curves with checkboxes.
2018-10-22 19:28:24 +02:00
efa3389b83 Fix build after recent changes, filename must have right case. 2018-10-22 19:10:48 +02:00
7e3c954bea Fix memory leak in drivers pover 2018-10-22 18:58:07 +02:00
e010d5e3b1 GP: New Time modifier
This modifier allows to offset the keyframe animated to get more variations in the animation when reuse the same datablock.
2018-10-22 18:30:26 +02:00
4bf4da12de Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-22 10:19:06 -06:00
86dbbd156f Windows: Enable python debugging in Visual Studio.
see D3817 for technical details, and https://wiki.blender.org/wiki/Tools/Debugging/Python_Visual_Studio for a end user quick-start guide.

Differential Revision: https://developer.blender.org/D3817
2018-10-22 10:17:08 -06:00
9d81e937d2 Optimizadion: Fix performanse issue of UI on some old GPUs.
Apparently the registry is not large enough and the compiler does something bad in indexing the array.
2018-10-22 12:59:09 -03:00
650cdc6b2d Drag & Drop: Support Open/Link/Append when dropping .blend file
When a .blend file is dropped into Blender a small menu opens.
In that menu the user can choose between three options: Open, Link and Append.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3801
2018-10-22 17:18:42 +02:00
0628fe7a6c Followup to previous change, reduce number of relations updates
Only tag relations update when new f-curve was allocated. This solves
possible too slow keyframe insertion when doing character animation,
but still does proper relation update when new ID component became
animated.
2018-10-22 17:13:19 +02:00
3c655fd372 Depsgraph: Fix missing relation update
The issue was happening when adding animation to properties
which affects different components of IDs.

Reported by Philipp Oeser as part of T56636.
2018-10-22 16:49:39 +02:00
b4ebb9d8ef Fix T56636: Custom property cannot be animated
No need to tag object for time update, with new dependency graph
this forces animation to be re-evaluated, which is not something
we want in this instance.

Same patch/solution Philipp Oeser came to as well.
2018-10-22 16:43:49 +02:00
eba9c1507a Mark TODO/XXX as solved
We do have proper access to bmain now.
2018-10-22 16:43:34 +02:00
b31fc40fcd DRW: Fix missing uniform warning in debug mode
Fix T57318
2018-10-22 15:56:12 +02:00
a20c590966 DRW: Fix crash on startup for old Nvidia drivers
This should fix T57296 once and for all.
2018-10-22 15:56:12 +02:00
59054d5eba Python API: fix docstrings 2018-10-22 15:01:25 +02:00
c49142dafe API Docs: remove 'level' from blf.color arguments
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3819
2018-10-22 14:55:18 +02:00
0f4064c66f Fix T57028: Connect Vertex not working with more than 2 selected
vertices

rB944054fbb61e introduced a sanity check which is not needed and
prevents the operator to run successfully with more than 2 selected
vertices

Reviewed By: dfelinto

Differential Revision: https://developer.blender.org/D3763
2018-10-22 14:09:43 +02:00
0f54c3a9b7 Outliner: drag&drop - separate moving from parenting
Use drag&drop to parent objects in the outliner by holding down shift.
Previously it was easy to accidently parent objects and there was no way to notice it immediatly.

In some views it is possible to parent objects without using shift; should be obvious from context.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3812
2018-10-22 13:53:36 +02:00
2d084d4ec4 GPU: Fix Issue with recursive downsample and Intel HDXXX
This is caused by a driver bug that prevent us from rendering to (or even
binding) a texture mip level that is below GL_TEXTURE_MAX_LEVEL of the
target texture. This is fine in most drivers (and legal AFAIK) but not on
thoses Intels HDXXX + Windows.

As a fix we just put GL_TEXTURE_MAX_LEVEL lower (which is illegal because
it is undefined behaviour), but in practice it works ok and does not
trigger any warnings or errors.

This commit fixes most of the problems encountered on these GPUs (T56668).
2018-10-22 13:00:40 +02:00
0e70feab22 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/windowmanager/intern/wm_init_exit.c
2018-10-22 10:55:16 +02:00
32d66889e9 Tentative fix for T57066: Daily build of Blend 2.79 crashes on OSX Mojave.
Looks like we need to explicitly set i18n language to default value on
some OSs... Unless that 'need to create new translated-name IDs in
versionning code for startup file' situation is really seldom.

Anyway, hopefully that will fix the crash.
2018-10-22 10:39:57 +02:00
91b768ccb1 UI: remove mask toolbar, use menus instead 2018-10-22 18:08:19 +11:00
827207b08e UI: move scrollbars inside region tabs 2018-10-22 16:43:09 +11:00
84eff5c126 Merge branch 'master' into blender2.8 2018-10-22 15:13:43 +11:00
24162c977c Prevent G.fileflags changes when WM_OT_save_mainfile() is called from script
This is to solve an issue where a blend file could be compressed
unbeknownst to the artist. This happened in the following situtation:

- Artist edits an uncompressed blend file.
- Some script saves a compressed blendfile to a separate location.
- When the artist saves the file (s)he is editing (File>Save, or Ctrl+S),
  it was silently compressed.

Cherry pick from: cd3b313d5f
2018-10-22 15:08:26 +11:00
71466cac1e Merge branch 'master' into blender2.8
Reverts: 92fd931e53
2018-10-22 14:59:12 +11:00
64a6c78a9a Fix T57328: 'Save As Copy' prints warning 2018-10-22 14:51:06 +11:00
02e6916890 Cycles: Enable shadow information in requested features when denoising is used
The shadow information isn't only used for shadowcatchers, but also to generate the shadowing feature pass of the denoiser.
2018-10-22 00:14:22 +02:00
7756973b0c Fix T57320: Crash when adding a linked scene, then deleting it.
You want to check collections (for NULL children) first, before you
actually go into those children collections checking for NULL objects...
2018-10-21 17:22:09 +02:00
c989c5d37d Fix non-sense overloaded code in remapping post-process of objects and collections.
In one case, code was calling the same func on bmain for all objects or
collections inside that bmain... seriously...
2018-10-21 17:20:17 +02:00
4e36ebf593 Optimize meta-ball basis check.
`BKE_mball_is_basis_for()` was processing whole name, when we can
actually rule out most of cases by just checking third char of the ID
names first, which is much, much cheaper.

Even though MBalls are not much used nowadays, that's a nice
optimization when this is called over a whole Main database full of
meta-balls objects...
2018-10-21 17:17:34 +02:00
William Reynish
96fef7db5a Icons: update geometry icons
- Tweaked icons for Box Select, Circle Select & Lasso Select.
- Tweaked icons for Rip Region & Rip Edge.
- Added icons for Bone Envelope, Bone Size, Pose Breakdown,
  Pose Push & Pose Relax.
- Added icons for curve Extrude, Extrude Cursor.

Also removed grease pencil mirror tool which wasn't an active tool,
and is now consistent with regular Edit Mode.
2018-10-21 16:23:15 +11:00
1f67db75f1 Cleanup: style 2018-10-21 16:23:15 +11:00
769b979abb Cleanup: trailing space 2018-10-21 16:23:15 +11:00
34f2ed7f71 Cleanup: compiler warnings 2018-10-21 16:23:15 +11:00
8c9f8d6cbb GP: Fix duplication when draw strokes in multiple windows
The stroke must be visible only in the current region and only visible when the stroke is completed.
2018-10-20 19:40:29 +02:00
541d07045b GP: Redesign drawing cache to support particles
Full redesign of the cache system used for drawing strokes and handle derived frame data.

Before, the cache was saved in bGPdata and a hash was used to manage several objects with the same datablock.

Old design made the use of particles very inefficient and prone to bugs and segment faults, and especially when this was mixed with onion skinning and multiple objects using same datablock. Also, there were some conflicts with the depsgrah logic (the old design was done before despgraph was in place) that made the use of hash not working.

The new design saves the data in the object runtime struct and avoid the use of any hash to find the right data. This improves the speed and reduce a lot the complexity of the code, memory allocation, hash overload and adds full support for particles and reused datablocks.

The particles can reuse the modifiers and shader effects of the original grease pencil object.
2018-10-20 09:08:34 +02:00
b634bf9fb6 Fix typo 2018-10-20 15:30:21 +13:00
37ffd95594 Fix: Drivers popover not showing
This was broken since cca87ccc75

The problem was that as this popover was defined in the C-code
for the Graph Editor, the relevant panel never got added to the
WM_paneltype registry, since only Python defined panels get
WM_paneltype_add() called when they are defined.

Since the majority of panels defined for regions are only used there,
a more localised fix was applied here by only adding the driver popover
to the global list manually.
2018-10-20 15:30:21 +13:00
Dalai Felinto
3c61efcf20 Multi-Objects: pose slide operators
* POSE_OT_breakdown
* POSE_OT_relax
* POSE_OT_push
* POSE_OT_propagate

Note: I could not test relax because of T57313.

Note 2: I believe those are the last armature related operators to be
ported - \o/
2018-10-19 21:20:24 -03:00
8e3a680ebe Fix Eevee Reflection CubeMap and Irradiance Volume on some Intel gpus
When you pass a struct as a parameter to a function, the qualifier "layout(column_major)" is lost.
2018-10-19 18:23:26 -03:00
Dalai Felinto
39ad5c3ef1 Rename BakeAction > NLA_OT_bake
This was already the bl_idname anyways.

Now this seems to be working, for single and multi-pose.
That said, the operator seems to fail on redo.
2018-10-19 16:35:09 -03:00
Dalai Felinto
f10bc11061 Remove defunct NLA_OT_bake
It's been 9 years too long.
And don't get this one confused with nla.bake (why would you even?).

The·BakeAction operator will be renamed to NLA_TO_bake next.
2018-10-19 16:14:42 -03:00
Dalai Felinto
caad2d7528 Multi-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_KEYINGSET 3/3
Note for posterity, I couldn't figure out a way to test this mode
properly. That said, it should be working with multiple-poses now.
2018-10-19 15:45:34 -03:00
Dalai Felinto
ed34e57796 Multi-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_LAYER 2/3 2018-10-19 15:45:34 -03:00
Dalai Felinto
b8a792ddd2 Multi-Objects: POSE_OT_select_grouped > POSE_SEL_SAME_GROUP 1/3
And disable the other options for now.
2018-10-19 15:45:34 -03:00
Dalai Felinto
7cc799d03d Cleanup: CTX_DATA_BEGIN_FOR_ID no longer needed 2018-10-19 15:45:34 -03:00
af58646467 Fix py API docgen script for new context members. 2018-10-19 20:13:50 +02:00
fbf4c11960 Make Static Override optional/hidden by default.
That feature will not be ready (or at least, not tested enough) to be
officially part of 2.80 beta. So we disable it by default, hidding it
behind a startup option (`--enable-static-override`), and a python
app var (`bpy.app.use_static_override`).

That way, people who really want to play with it can do it easily, while
not exposing/enabling non-production-ready feature by default.

Note that underlying override code remains active, i.e. files we do have
overridden data-blocks will be loaded correctly according to static override.
2018-10-19 18:38:19 +02:00
e6fe207a52 Eevee: LightProbes: Fix negative padding 2018-10-19 18:13:22 +02:00
905921d2b5 Fix function using same local variable name as output variable
This may fix issues with certain compiler.
2018-10-19 18:13:22 +02:00
eaa527f694 Dope Sheet: remove many hard-coded color and alpha constants.
Add the necessary colors and/or alpha components to the theme instead.
Also switch the background for ordinary channels to use the likely
intended theme option, instead of the window background color.

The general rule is that the channel color is drawn full strength in the
channel list on the left, and with alpha in the actual key frame area on
the right. This alpha is also reused with bone group colors.

Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D3813
2018-10-19 18:30:24 +03:00
891078b3bc UI: reorder and group blend modes in menus, similar to other apps.
Differential Revision: https://developer.blender.org/D3815
2018-10-19 17:21:01 +02:00
b2d495c2de UI: move reports / job back to status bar, but make it more visible with color. 2018-10-19 17:19:03 +02:00
be52fd0d0f Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-19 09:16:26 -06:00
dcef3c30e3 build_depenencies: Fix url for openal. 2018-10-19 09:09:06 -06:00
cdef1e911b Fix shadows of sun type lights on some Intel gpus
When you pass a struct as a parameter to a function, the qualifier "layout(column_major)" is lost.
2018-10-19 11:12:30 -03:00
fbfa3999e1 Fix T57284: poor result UV unwrapping concave n-gon. 2018-10-19 15:32:01 +02:00
Dalai Felinto
374a8b9da5 Multi-Objects: Implement/Fix POSE_OT_select_constraint_target
This operator had an initial multi-objects implementation.
However it would not select target bones across different selected objects.
2018-10-19 09:42:43 -03:00
c17f2c2eb6 Outliner: Open empty collection when something is dragged into it
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3814
2018-10-19 14:30:39 +02:00
Dalai Felinto
bdd02cc082 UV_OT_unwrap: Error messages
Make sure a message is not reported multiple times when working with
multi-objects. Like in 2.7x we may have two infos coming from the same operator.

In 2.7 we could report non-uniform xor non-scaled, and subsurface.
Now we can report each one of those errors separately.
2018-10-19 09:14:01 -03:00
Dalai Felinto
15d5cd961c Fix multiple-object uv selection not "deselecting" other objects 2018-10-19 08:49:55 -03:00
Dalai Felinto
d01e0d1ef1 CTX_DATA_BEGIN for active object only (..._from_active_object)
For now only `selected_pose_bones_from_active_object`, more options can
be added on demand.

Discussed this with Campbell Barton. We may need this only for selected
pose bones, time will tell.
2018-10-19 08:31:58 -03:00
51b2d06613 Versioning: name screens by their workspaces
Avoids all screens in the startup file being named 'Default.###'.
2018-10-19 20:29:15 +11:00
16882ca535 Image Space: make 'UV Edit' a separate mode
This is needed for splitting UV into its own editor, see: T54744
2018-10-19 20:15:18 +11:00
3c30d3bcbd Outliner: only drag element under mouse if it was not selected before
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3811
2018-10-19 10:59:53 +02:00
c92f125e75 Partial Revert: bring back some comments 2018-10-19 10:51:33 +02:00
56fd821e97 RNA: add widget property access 2018-10-19 19:33:29 +11:00
3f542312cf Merge branch 'master' into blender2.8 2018-10-19 17:51:40 +11:00
0bbc6a903a Fix error disabling all addons 2018-10-19 17:49:48 +11:00
13a797466b UI: correct face center button active state 2018-10-19 17:10:40 +11:00
30b1e37e94 Fix T57295: Edit-mesh modes got out of sync 2018-10-19 15:48:39 +11:00
9b5183769b Cleanup: compiler warnings 2018-10-19 14:51:55 +11:00
c41fb5fac2 Fix UI message-bus automatic subscription 2018-10-19 14:46:24 +11:00
6add652c38 Fix T57294: Modifiers cage ignore face visibility 2018-10-19 13:57:00 +11:00
60d7740fe6 Tool System: option for transform drag action
See: T57203
2018-10-19 11:54:26 +11:00
a30c9f710a Partial revert '#if 0' cleanup
Partially revert 41216d5ad4

Some of this code had comments to be left as is for readability,
or comment the code should be kept.
Other functions were only for debugging.
2018-10-19 09:18:22 +11:00
642b77e874 Edit Mesh: Decrease the depth bias on vertices 2018-10-18 20:42:32 +02:00
de3f9303eb Fix Copy Selection to Buffer breaking library paths.
This is a bug experienced by animators in the Blender Studio that developers
have been trying to fix for a /long/ time.

What happens is that partial file writing extracts the needed datablocks from
the main list of datablocks into a smaller one. Afterwards they are added back
to the main list, but in some cases not exactly in the same order.

There is file path remapping code that depends on the datablocks being in
exactly the same order as before, and when this was not the case filepaths
would get swapped between datablocks

The reason datablocks are not restored in the same order is because the sorting
of datablocks by name is a) case insensitive and b) undefined if there are
multiple datablocks with the same name from different libraries. This should
be made well defined, but the fix in this commit is simpler.

The way animators ran into this bug is that they use the Copy Attributes addon
a lot, which has as the first item in the menu Copy Selection to Buffer. In
some cases this would be clicked accidentally when menu is near the edge of the
window, breaking the library paths which would only be noticed a much later on
file save and reload.

The way this bug was finally tracked down is that it was suspected that the
undo system was the cause, and so Bastien added library validation for undo.
When Hjalti then did undo and noticed the error, he remembered accidentally
clicking Copy Selection to Buffer just before, and we could finally reproduce
the bug.
2018-10-18 20:21:36 +02:00
9d318da4a7 Merge branch 'master' into blender2.8 2018-10-18 20:11:14 +02:00
1d05f0dc22 Fix Copy Objects to Buffer breaking library paths.
This is a bug experienced by animators in the Blender Studio that developers
have been trying to fix for a /long/ time.

What happens is that partial file writing extracts the needed datablocks from
the main list of datablocks into a smaller one. Afterwards they are added back
to the main list, but in some cases not exactly in the same order.

There is file path remapping code that depends on the datablocks being in
exactly the same order as before, and when this was not the case filepaths
would get swapped between datablocks

The reason datablocks are not restored in the same order is because the sorting
of datablocks by name is a) case insensitive and b) undefined if there are
multiple datablocks with the same name from different libraries. This should
be made well defined, but the fix in this commit is simpler.

The way animators ran into this bug is that they use the Copy Attributes addon
a lot, which has as the first item in the menu Copy Selection to Buffer. In
some cases this would be clicked accidentally when menu is near the edge of the
window, breaking the library paths which would only be noticed a much later on
file save and reload.

The way this bug was finally tracked down is that it was suspected that the
undo system was the cause, and so Bastien added library validation for undo.
When Hjalti then did undo and noticed the error, he remembered accidentally
clicking Copy Selection to Buffer just before, and we could finally reproduce
the bug.
2018-10-18 20:10:15 +02:00
4925bb1ec3 Links: update development fund link to new URL. 2018-10-18 18:57:01 +02:00
Dalai Felinto
ec305ea91f Fix assert/crash when copying RGBA color into RGB
For example, copy from viewport display color into brush color.
2018-10-18 16:14:40 +00:00
ce0a468408 Outliner: drop into master collection when below everything else
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3810
2018-10-18 15:45:48 +02:00
41216d5ad4 Cleanup: Remove more #if 0 blocks
Continuation of https://developer.blender.org/D3802

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3808
2018-10-18 15:43:06 +02:00
cfdd902d2d Fix debug build after recent changes. 2018-10-18 15:32:54 +02:00
3e6b34dede Eevee: Fix default texture coord for procedural texture in world tree 2018-10-18 15:30:16 +02:00
6ef5bc1b99 Cleanup: node_tex_checker: Vectorize operation in GLSL 2018-10-18 15:30:16 +02:00
a18b806004 Fix use of uninitialized variable in cloth collision.
No apparent difference in a quick simulation, but was clearly wrong.
2018-10-18 12:59:27 +02:00
5869bf5002 Cleanup: fix compiler warnings. 2018-10-18 12:19:06 +02:00
William Reynish
b3814d8645 UI: closure some more panels by default, leaving open mostly 1 per tab. 2018-10-18 12:14:25 +02:00
108475dc01 PyAPI: Support for custom tool registration
Added a module bpy.utils.toolsystem which only exposes ToolDef,
to avoid scripts referencing bl_ui internals.
2018-10-18 17:13:22 +11:00
321c8232bc Tool System: expose shear tool x/y option 2018-10-18 13:55:01 +11:00
3e0c87b27d Keymap: use tweak event for shear 2018-10-18 13:06:23 +11:00
9b5cf593a6 Gizmo: tweak sorting to avoid view-aligned shear 2018-10-18 13:00:16 +11:00
678c200309 Gizmo: remove 'Click Anywhere' option
Having an invisible gizmo caused event handling problems (see: T56603).

This is hard to avoid since gizmos are similar to buttons in the way
they have priority over the regular keymap.

Transform events use tweak so events to fall though to the general
view 3d keymap (for cursor placement for eg).
2018-10-18 12:36:39 +11:00
4c1250570b Cleanup: style 2018-10-18 12:03:04 +11:00
a5467637f2 Cleanup: use mul_m3_series 2018-10-18 11:50:22 +11:00
eee8153299 Gizmo: depth sort shear gizmos 2018-10-18 11:50:22 +11:00
40f679ccb9 Cleanup: move gizmo sort functions into an API 2018-10-18 11:50:22 +11:00
a2922f9840 Optimization: Edit Mesh Overlay
In tests with edit_cage: performance jumped from 9.37ms to 9.17ms.
2018-10-17 15:46:58 -03:00
65ea9ec948 node_shader_utils: Proper fix for node_normalmap accessor returning ellipsis value.
Ellipsis value is internal ingredient only, to tag hidden _node_normalmap
'real' property as not yet initialized. Public node_normalmap accessor
should never ever have that value, it's either None or a valid node!
2018-10-17 20:18:40 +02:00
5c038a6930 Revert "Fix error on FBX export after material changes"
This reverts commit ce4cfbe108.

Obviously wrong 'fix', please do not touch other dev’s code, especially
in active/WIP area, when you do not fully understand it.
2018-10-17 20:17:02 +02:00
Dalai Felinto
ce4cfbe108 Fix error on FBX export after material changes
Update the addons repository as well.
2018-10-17 17:12:17 +00:00
c9faaa6ea7 DRW: Fix DRW_shgroup_create_sub returning source shgroup
instead of the actual sub group...
2018-10-17 19:01:56 +02:00
f666be6edf EditMesh: Fix uninitialized value causing red outline on edges 2018-10-17 18:49:27 +02:00
fd61b49d50 ObjectMode: Fix Outlines being drawn for BBox meshes 2018-10-17 18:09:37 +02:00
91e5e02aff ObjectMode: Fix instances with BoundBox drawtype not displaying 2018-10-17 18:09:37 +02:00
e5b18390fa Shrinkwrap: implement the use of smooth normals in constraint & modifier.
- Use smooth normals to displace in Above Surface mode.
- Add an option to align an axis to the normal in the constraint.

I've seen people request the alignment feature, and it seems useful.
For the actual aligning I use the damped track logic.

In order to conveniently keep mesh data needed for normal
computation together, a new data structure is introduced.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D3762
2018-10-17 17:55:34 +03:00
d31ea3b89a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_global.h
	source/blender/editors/undo/ed_undo.c
2018-10-17 16:50:36 +02:00
5f8222501c DEBUG_IO: add sanity check on libdata in undo step as well.
There are serious suspicions that weird corruptions faced by studio
artists may happen in undo/redo code, so let's see whether that's the
case.

With this, and when --debug-io arg is passed on startup, the whole lib
data are checked at every undo. This makes undo slower (from two to
three times slower), but it could help us spot better what happens...
2018-10-17 16:43:02 +02:00
496c325ffa Expose 'debug_io' flag in bpy.app 2018-10-17 16:42:36 +02:00
2d1b9f7841 Minor style cleanup. 2018-10-17 16:42:18 +02:00
938aa52313 Dope Sheet: fix assert in new hold code when bezier keys are not sorted.
Turns out this can happen during duplicate+drag operations.
2018-10-17 16:30:34 +03:00
e6adf9ac9a Fix T57096: Crash when scaling bones
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3777
2018-10-17 15:09:01 +02:00
21744217ce Cleanup: remove some #if 0 blocks
Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D3802
2018-10-17 12:43:41 +02:00
c6eb5651ba Eevee: Fix error when using texture coordinate on world shaders
Compilation errors were happening on OSX with errors of the type:
```ERROR: Input of fragment shader 'viewNormal' not written by vertex shader```
2018-10-17 12:18:06 +02:00
53d152258e UI: particle deflector options in topbar
See: T57228
2018-10-17 18:56:21 +11:00
ec7c3b5b4f Cleanup: better naming
Suggested by Campbell here: https://developer.blender.org/rB09cd651bb7e59044cbcd0664e8b1064cb37734ed
2018-10-17 09:53:05 +02:00
8e071e76de Gizmo: change axis used for shear handles
The shear direction should be more obvious this way.
2018-10-17 17:47:09 +11:00
80fb943e4f Transform: map mouse input to shear direction 2018-10-17 17:18:30 +11:00
9273b91eef Transform: show arrows for 'custom' ratio input
Arrows are now shown for vertex/edge slide.
2018-10-17 17:14:36 +11:00
7ce387b1cd RNA: disable notifiers from property updates
This was re-enabled because it made copy-on-write bugs hard to
track down.

Since copy-on-write implementation has been simplified
this isn't a problem anymore.
2018-10-17 16:17:00 +11:00
8ecec995ed Cleanup: naming 2018-10-17 14:09:32 +11:00
ae093e6a84 Cleanup: whitespace 2018-10-17 14:08:44 +11:00
96dc1ad308 Fix T56735: Autosmooth option corrupts UVs 2018-10-17 13:26:27 +11:00
Dalai Felinto
098b86475d Use CTX_DATA_BEGIN_FOR_ID 2018-10-16 22:18:02 -03:00
Dalai Felinto
ff9e0b6781 Fix sculpt curve stroke paint 2018-10-16 21:41:29 -03:00
96bc69b117 Merge branch 'master' into blender2.8 2018-10-17 11:26:59 +11:00
Dalai Felinto
df816d534f Fix cmake not triggering rebuild on .glsl changes
At least on windows we do not re-run datatoc when the .glsl files change.

To test is simple, just change edit_mesh_overlay_common_lib.glsl
remove lines, write plain text, ..., now rebuild and go in edit mode
with the default cube.

I also had to remove the entry in gpu/CMakeLists.txt for
gpu_shader_material.glsl since this was being tracked directly, as well
as running data_to_c_simple (otherwise CMake raises an error for
duplicated entries).

We probably want to do the same for the other datatoc functions.

Reviewers: LazyDodo, brecht
Differential Revision: https://developer.blender.org/D3803
2018-10-17 11:24:33 +11:00
Dalai Felinto
7baa8d2e8f Multi-Objects: POSE_OT_ik_add + POSE_OT_constraint_add_with_targets
You can now add the target from the non-active armature when they are
both in pose mode.

There were different ways of going about those operators:

* We could create one constraint on each active bone of each object.
  That wouldn't follow what creating constraints from the UI does
  though.

* We could change the selection/active order and create a constraint for
  all the selected bones, to the active bone. However this would change
  the design of changing only the active bone (which also is the one we
  see in the buttons editor).

But in the end I think it makes more sense to let users set a constraint
from a charactor to a prop in a handy way.

This is pretty much what we had in 2.7x. There we would go for the
selected objects, if no selected bone was found in the active object.
In 2.8, however, we need this change to make things working as
before/intended.
2018-10-16 21:10:31 -03:00
41ad845531 Optimization: Edit Mesh Overlay: Avoid computing fixvec unnecessarily.
This brings a big difference to meshes with edit cage adjusted for modifiers.
In my tests, the suzanne with subdivision modifier level 3 went from 4.80ms to 3.05ms.
2018-10-16 20:42:50 -03:00
Dalai Felinto
418c16bd3b Multi-Objects: POSE_OT_constraints_copy (refactor)
This was already supporting multiple objects, but I changed it to use the API
we are using elsewhere.
2018-10-16 19:20:01 -03:00
Dalai Felinto
647218af07 Multi-Objects: POSE_OT_constraints_clear 2018-10-16 18:41:45 -03:00
Dalai Felinto
f3153f1c7f Multi-Objects: POSE_OT_ik_clear 2018-10-16 18:30:27 -03:00
Dalai Felinto
540f37003c Fix armature bones spline ik lines offset 2018-10-16 18:28:35 -03:00
Dalai Felinto
f280f83f83 Fix armature bones ik lines offset 2018-10-16 18:22:17 -03:00
1f1da26840 Edit Mesh Overlay Geometry Shader: Ignore correction geometry for loops that are not part of an edge.
By the tests I could only observe a considerable difference in the peformanse when the vertex size is 30.
Vertice 3 showed no difference in a suzzane with subdivision modifier level 3 + show-on-cage.

Point Size 30: 7.29ms vs 2.55ms

Reviewers: fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D3805
2018-10-16 23:04:57 +02:00
2ab6272233 DRW: Fix assert with BoundBox object display mode 2018-10-16 22:53:32 +02:00
Dalai Felinto
28a3958cb3 Fix cmake not triggering rebuild on .glsl changes
At least on windows we do not re-run datatoc when the .glsl files change.

To test is simple, just change edit_mesh_overlay_common_lib.glsl
remove lines, write plain text, ..., now rebuild and go in edit mode
with the default cube.

I also had to remove the entry in gpu/CMakeLists.txt for
gpu_shader_material.glsl since this was being tracked directly, as well
as running data_to_c_simple (otherwise CMake raises an error for
duplicated entries).

We probably want to do the same for the other datatoc functions.

Reviewers: LazyDodo, brecht
Differential Revision: https://developer.blender.org/D3803
2018-10-16 16:58:12 -03:00
Harley Acheson
90d1d39a95 UI: fix misaligned underline for menu item shortcut keys. 2018-10-16 20:31:42 +02:00
Harley Acheson
dd199d8032 UI: tweak icon spacing in menus to put them in the middle of the edge and text. 2018-10-16 20:31:03 +02:00
5134ed60d6 UI: icon set updates Andrzej Ambroz.
This adds and changes various icons, in particular modifier and force field
icons are now included.
2018-10-16 20:23:43 +02:00
569dfe5784 Fix T56250: brush cycling with shortcuts is broken.
It was cycling both in the brush system and tool system which conflicted.
Now it uses just the tool system. This is more of a temporary fix until
the new tool/brush decoupled design is in place.
2018-10-16 20:19:11 +02:00
fb550ca6b9 node_shader_utils: fix bad setting of use_nodes in readonly case.
Also added access to extension property in texture wrapper.
2018-10-16 19:58:50 +02:00
f250f9256e Dope Sheet: unify comparison threshold for the ActKeyColumn tree.
Use the same floating point precision threshold to merge keys
when building the tree as when searching it.
2018-10-16 19:49:03 +03:00
c7a84c23f1 Dope Sheet: rewrite computation of keyframe hold blocks.
Computation of hold blocks was done by storing ranges (with start and
an end, and likely overlapping) in a tree keyed only by the block start.
This cannot work well, and there even were comments that it is not
reliable in complex cases.

A much better way to deal with it is to split all ranges so they don't
overlap. The most thorough way of doing this is to split at all and every
known keyframe, and in this case the data can actually be stored in the
key column data structures, avoiding the need for a second tree.

In practice, splitting requires a pass to copy this data to newly added
keys, and the necessity to loop over all keyframes in the range being
added. Both are linear and don't add excess algorithmic complexity.

The new implementation also calls BLI_dlrbTree_linkedlist_sync for
its own needs, so the users of the *_to_keylist functions don't have
to do it themselves anymore.

Differential Revision: https://developer.blender.org/D3790
2018-10-16 19:27:10 +03:00
bd24ee8cb6 Templates: updated 2D animation template from grease pencil team. 2018-10-16 18:09:10 +02:00
cf2e5e3163 Small change to Annotation panel
Add one line more by default
2018-10-16 17:59:42 +02:00
d09a46c2ac UI: tweak and fixes for cycles sampling panel, remove unneeded decorators. 2018-10-16 17:14:49 +02:00
324e8ebb96 UI: put show emitter option in particles panels.
This settings is duplicated from the object duplication panel, but
otherwise it's too hard to find.
2018-10-16 16:54:45 +02:00
William Reynish
4aac9c934f Fix remaining copy/paste button header, these are in menus now. 2018-10-16 14:58:54 +02:00
William Reynish
dacc539f57 Fix incorrect icon for UV selection sync. 2018-10-16 14:58:11 +02:00
3f3eae675a Cleanup: naming
'mp' was a reference to 'manipulator'
2018-10-16 22:09:27 +11:00
48034f0eb3 Tool System: add gizmo for shear tool 2018-10-16 22:06:23 +11:00
5b9ab20fe4 Transform: axis support for shear tool 2018-10-16 22:06:23 +11:00
345175082b Fix T57247: Render animation does not respect render single view layer
Reviewers: brecht

Maniphest Tasks: T57247

Differential Revision: https://developer.blender.org/D3800
2018-10-16 13:00:45 +02:00
eba1b0487c Event System: don't invoke operator that should only be executed
Problem was that the event was not `NULL` even though the `context` is `WM_OP_EXEC_*`.
I noticed this problem when dropping .blend files into Blender.
Instead of only executing `WM_OT_open_mainfile`, it was invoked (opening a file selector).

The `wm_operator_invoke`, which also executes operators, always invokes operators when `event != NULL`. So setting `event` to `NULL` tells `wm_operator_invoke` not to invoke but to execute the operator.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3799
2018-10-16 11:48:12 +02:00
09cd651bb7 View 3D: fix image dropping in 3d view
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3798
2018-10-16 11:18:16 +02:00
f807371c3e GP: Set Dopesheet layers in Top-Down order
The layers are Top-Down and the dopesheet must use the same order.
2018-10-16 10:37:18 +02:00
0b5786e96c GP: Fix Blur shift when add more samples
The image was moving in +X and +Y when added samples due round precission.
2018-10-16 10:23:13 +02:00
88f392f045 Set Annotation list in Top-Down order
This makes consistent the orders of any grease pencil related list
2018-10-16 08:45:01 +02:00
c1b8ce3170 Fix crash in loose edge check 2018-10-16 15:02:30 +11:00
a57f32b14c Cleanup: headers 2018-10-16 13:18:03 +11:00
1b65a95a08 Mesh: use mesh tessellation for face-map drawing
Also use batch instead of immediate mode.
2018-10-16 13:12:00 +11:00
c5f4c69643 Cleanup: replace check for derivedFinal w/ mesh_eval 2018-10-16 10:33:44 +11:00
e75169974c Fix UI error in annotation tool 2018-10-16 09:13:26 +11:00
8a94425e96 Cleanup: redundant check for hidden edge 2018-10-16 09:01:52 +11:00
3852e4bb8f Cleanup: redundant len() checks 2018-10-16 08:52:46 +11:00
20d38dafbd Mesh: replace derived-mesh with mesh API's for project paint 2018-10-16 08:45:25 +11:00
cf910575b1 Add popover for Annotations in topbar
Part of T57211
2018-10-15 18:54:23 +02:00
9ecf68e8ae Eevee: Fix Missing alpha when rendering with DOF
NOTE: There is a float imprecision near the focus plane
due to the current technique used for DOF. This makes the alpha channel
transparent on nearly in focus objects even when they should not.
This artifact should be fixed when the DOF will use scatter as gather for
low brightness areas.

Fix T57042 : Eevee does not render alpha when DOF is turned on
2018-10-15 16:04:50 +02:00
478899dee7 Edit Mesh: Fix missing loop normal display 2018-10-15 16:04:50 +02:00
22814ca555 Fix related to T55961: Glitch in selecting loose edges on some AMD drives. 2018-10-15 09:54:24 -03:00
c2afa3ef46 Edit Mesh: Add comments explaining weirdness in the code. 2018-10-15 09:50:31 -03:00
2875fb9e7b Texture Paint: Don't create material if operation is cancelled
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3793
2018-10-15 13:53:14 +02:00
d1145306ec Texture Paint: remove odd UI behavior
Differential Revision: https://developer.blender.org/D3791
2018-10-15 12:17:45 +02:00
8fa16411e6 Fix an obvious typo: use CD_MASK_CUSTOMLOOPNORMAL for CustomDataMask. 2018-10-15 12:28:44 +03:00
0c39453071 Cleanup: Edit Mesh shader: Remove unecessary varying 2018-10-15 10:43:49 +02:00
38828309d3 Cleanup: unused code 2018-10-15 18:12:14 +11:00
918bb05799 GP: Cleanup style 2018-10-15 08:42:47 +02:00
4479813ae5 GP: Small tweak to improve speed 2018-10-15 08:42:46 +02:00
dbb35ff7c8 Cleanup: unused functions 2018-10-15 17:37:54 +11:00
27389362a4 Mesh: remove DerivedMesh for boundbox calculation
Fixes edit-mesh not having a boundbox calculated for it.
2018-10-15 17:14:05 +11:00
0941d99323 Cleanup: remove unused functions 2018-10-15 16:59:27 +11:00
2deeca4fb0 Cleanup: remove references to DerivedMesh 2018-10-15 16:06:42 +11:00
0ef4c4e12a Mesh: remove DerivedMesh for displist conversion 2018-10-15 16:01:39 +11:00
62a3dfec78 Mesh: mostly remove DerivedMesh for vertex parent
The exception is for subdivision surface which still uses derived mesh.
2018-10-15 15:31:17 +11:00
5b86899f21 Mesh: remove DerivedMesh for face-map drawing 2018-10-15 15:12:36 +11:00
f9f67e0239 Mesh: remove DerivedMesh from various places 2018-10-15 14:29:46 +11:00
881334c499 Cleanup: remove DerivedMesh bvhtree_from_mesh_get 2018-10-15 13:40:46 +11:00
2a2db39f3a Bake: remove derived mesh for bake API
Multires baking still uses DerivedMesh.
2018-10-15 13:38:58 +11:00
cd48d4576b Depsgraph: Add proper API functions for CustomDataMask dependencies.
There were a few copies of the same few lines in depsgraph build code,
so it seems to be logical to introduce a function for it, and make it
accessible from C code for completeness.

As an example, register the mask needs of the Data Transfer modifier.
2018-10-14 20:48:39 +03:00
9a38a91f41 Fix T55961: Anomalous edges cage on some AMD buggy drivers.
Reviwed on irc by @fclem.
2018-10-14 14:07:45 -03:00
ac61eb3900 GP: Fix several issues in blur FX
There were some problems with the z-depth and especially when tries to blur a pixel outside the viewport.
2018-10-14 12:21:44 +02:00
55e3c17ccc Edit Mesh: Optimize the overlay triangle geometry shader
On my test it's 30% faster than before.

Test case : Suzanne, subsurf lvl3, 64K tris, Edge select mode for fair
comparison.

0.95ms before optimization
0.64ms after optimization

Note that this only optimize the "nicest" display of edit mesh overlays,
not the one when rotating the view where half of the border edges are
missing.
2018-10-13 23:55:30 +02:00
de76a809f9 Edit Mesh: Do not use barycentric coord in EDGE_FIX shader and ...
... display vertex even when occluded.

Add back the vertex display because occluded vertex are not visible when
the triangle is almost parallel to the view.

The problem with the barycentric coord is that they are hard to work with
and their derivatives not enough precise to compute the vertex positions.

So we need to pass the vertices scree positions down to the fragment shader.
2018-10-13 23:48:19 +02:00
4e168e0036 Edit Mesh: Fix and increase the depth bias on vertices 2018-10-13 23:48:19 +02:00
b8327ee129 GP: Remove Layer order userprefs parameter
After a lot of discussion about this option (see 18f1175940) we have decided set always the order of GP layers in 2D mode (Top->Down) and remove the parameter from User Preferences screen.

Internally all works equal, but in the UI the list is inverted.

The filter buttons to reverse the list or sort alphabetically have been removed because these buttons are not logic in this context.
2018-10-13 20:34:36 +02:00
dd6bf3f84a node_shader_utils: several fixes, improvements and cleanups.
Fix broken behavior in case of texcoords mapping (we do need texcoords
node in all cases, then, even for UV coords...).

Use nodes by default when generating new write-allowed wrapper around a
material.

Do not try to find nodes in existing tree all the time, do it only once,
even for lazy-initialized nodes (through accessors).

Fix ugly spacing in property accessors (since it looks like some people
do not like a single 'block' with both getters, setters and prop
definition, at least use one sep line everywhere (and two sep lines to
separate properties)...
2018-10-13 19:36:47 +02:00
b11515332b GP: Improve qualitty in Wave when alpha is extreme 2018-10-13 18:28:33 +02:00
78673e5780 GP: Add more blur samples to some FX 2018-10-13 18:24:57 +02:00
7b9049f278 GP: Improve Blur FX quality in transparency. 2018-10-13 18:21:54 +02:00
Dalai Felinto
605fbad872 ED_pose_recalculate_paths: Run only for active object
New iterator CTX_DATA_BEGIN_FOR_ID, to restrict the loop to the specified object only.
This is not super efficient, but it should be fine for now.

I will talk to other developers. A more elegant solution would be to
have something like "active_object_selected_pose_bones" in the context.
2018-10-12 19:53:07 -03:00
Dalai Felinto
c462c43c1a Multi-Objects: POSELIB_OT_pose_add
Make it work only for the active object bones
2018-10-12 19:51:11 -03:00
Dalai Felinto
cf74a6db7e Revert "Multi-Object Pose: POSE_OT_select_parent by Harsha"
This reverts commit dcf1210c44.

In 2.79x select parent would only work for the active bone.
There is no reason to have it working for multi-objects.
2018-10-12 19:34:24 -03:00
Dalai Felinto
e02f6ed13d Pose path: skip time printing when not DEBUG_TIME 2018-10-12 19:34:21 -03:00
Dalai Felinto
478446e3a4 Revert "Multi-Objects: POSE_OT_paths_*"
This reverts commit 178530cc50e2fb4bd3faf4fff22392a58688bed1.

Those operators are called from the UI, which only takes into
consideration the active object for the parameters and whether to call
reset, update or calculate.

We can re-revert if needs be.
2018-10-12 17:44:29 -03:00
Dalai Felinto
3ffc2a8330 Multi-Objects: POSE_OT_paths_*
* POSE_OT_paths_clear
* POSE_OT_paths_calculate
* POSE_OT_paths_update

Despite my personal opinion on the matter, those operators were listed
as to be converted (see T54650).

They are called from the UI, where you only see the parameters for the
active object/armature.

I will commit and revert soon after, so we can quickly bring it back
once we re-visit this design.
2018-10-12 17:44:29 -03:00
5bf1128642 Dope Sheet: fix hold highlighting for non-bezier interpolation.
The automatic highlighting of constant curve areas was checking that
the bezier handles are horizontal even if a non-bezier interpolation
mode was active. Conversely, it was highlighting based on just handles
with Elastic interpolation, which always generates movement.
2018-10-12 22:20:32 +03:00
e333765d3e Python GPU: Best description for exceptions 2018-10-12 15:48:55 -03:00
Dalai Felinto
75e1c70577 Revert "Fix for ARMATURE_OT_layers_show_all
This reverts commits:
* 2a2858b30d
* 7cf8eed5e0

Similar to ARMATURE_OT_layers_show we should keep this operator
single-object oriented. This one is a bit more tricky since we
may want to quickly see all the layers of all the armatures.

I will check with animators what is the best way to proceed here.
But overall I think it makes sense to have this only for the active
object.
2018-10-12 15:26:23 -03:00
Dalai Felinto
894c3b1532 Revert "Multi-Objects: ARMATURE_OT_armature_layers
This reverts commits:
* 29a281f9ef
* 3a8b56ce24

This operator shouldn't behave multi-objects. This would only work
if all the selected objects had the same logic for their layers,
which may be likely for characters, but it won't be for mixing props and
characters.
2018-10-12 15:26:23 -03:00
Dalai Felinto
29a281f9ef Multi-Objects: ARMATURE_OT_armature_layers for pose
That said, I think we should not support multi-object for either edit or pose armatures.
2018-10-12 15:15:22 -03:00
Dalai Felinto
bb7f4f5714 Multi-Objects: POSE_OT_bone_layers 2018-10-12 15:05:46 -03:00
Dalai Felinto
299b51dc83 POSE_OT_rotation_mode_set: Adding missing notifier
Otherwise the space button does not redraw.
2018-10-12 14:56:13 -03:00
Dalai Felinto
3b9b6a80ba Multi-Objects: POSE_OT_rotation_mode_set 2018-10-12 14:55:15 -03:00
Dalai Felinto
dba7312f5e Rename: multi_changed > changed_multi
We are using changed_multi plenty more than multi_changed. May as well keep it
consistent across the code.
2018-10-12 14:48:12 -03:00
Dalai Felinto
c7bbcfe954 Multi-Objects: POSE_OT_autoside_names
Using CTX_DATA_BEGIN_WITH_ID here.

Unlike the edit mode counter-part this operator is well served with the
macro above. ARMATURE_OT_autoside_names needs to treat mirrored bones
separately, while for pose we don't handle those cases.

Be ware that using this macro makes the code smaller, however it also
tags every single (selected) pose to update, regardless of whether we
changed the names of the bones.

In this case it is fine since we most likely renamed all the bones.
But In other cases I'm still a bit wary of using CTX_DATA_BEGIN_WITH_ID
instead of BKE_view_layer_array_from_objects_in_mode_unique_data.

To be seen in upcoming commits. Stay tuned.
2018-10-12 14:42:08 -03:00
Dalai Felinto
2677e99217 Revert "Multi-Objects: ARMATURE_OT_select_hierarchy"
This reverts commit dcc623e7e7.
2018-10-12 13:49:55 -03:00
Dalai Felinto
d95bb08f39 Multi-Objects: POSE_OT_select_hierarchy (no real change)
This operator doesn't need any changes. Following the guideline of
multi-objects behaving alike joined armatures, there is no need
to change any armature that is not the active one.

That said I will revert the behaviour of ARMATURE_OT_SELECT_hierarchy to
follow the same rule (i.e., revert dcc623e7e7).
2018-10-12 13:49:55 -03:00
77653d97fb Edit Mesh: Fix issue with Edit cage on some buggy drivers 2018-10-12 17:21:04 +02:00
03d0219d7a Edit Mesh: Refactor edit mesh drawing
This decouple the vertex display from the face+edges.

This is to reduce the number of triangles required to fix the edges
artifacts (aliasing) and increase viewport reactivity when not actively
navigating (ie. mouse scroll).

Also it makes all vertices visible (not cut-off) even when navigating.

However it makes the navigation drawing a bit slower because it has to
render twice.

Also add a depth bias to the wires to avoid depth fighting when previewing
final mesh (modifiers applied).
2018-10-12 16:43:40 +02:00
fe4840ed4d Wireframe Overlay: Use Barycentric coord to optimize shader
This also fix a driver bug I was having on Linux + Mesa + AMD Vega.
2018-10-12 16:38:55 +02:00
01745051de DRW: Add DRW_shgroup_create_sub to create children shgroup
This makes is easy to create nested drawcalls that will inherit all the
parents properties. This is usefull if only a few uniforms changes for that
drawcall.
2018-10-12 16:38:55 +02:00
9b692ecabd GPUTexture: Add support for GPU_RGBA8UI 2018-10-12 16:38:55 +02:00
f2e6f8bb8d Fix misaligned icon in search buttons after recent changes. 2018-10-12 15:55:36 +02:00
78390f7724 Python: change node_shader_utils diffuse RGBA to base_color RGB.
Best to give its actual name so it's clear that the Principled BSDF does
not have a diffuse color exactly, and does not have an alpha component.

Also image textures use UVs by default, so avoid creating a texture
coordinate node for that.
2018-10-12 15:55:09 +02:00
86635402d5 Mesh: remove derivedFinal from various places 2018-10-12 19:29:40 +11:00
cd3b313d5f Prevent G.fileflags changes when WM_OT_save_mainfile() is called from script
This is to solve an issue where a blend file could be compressed
unbeknownst to the artist. This happened in the following situtation:

- Artist edits an uncompressed blend file.
- Some script saves a compressed blendfile to a separate location.
- When the artist saves the file (s)he is editing (File>Save, or Ctrl+S),
  it was silently compressed.
2018-10-12 10:24:25 +02:00
5eeb6c00be GP: Disable reverse list order when uncheck userprefs option
Before, the list kept the reverse order enabled in the filter. Now the filter is reset when the option is disabled and don't need any user change or restart.
2018-10-12 09:55:43 +02:00
fe1befcadf Modifier: remove derived mesh call for bind 2018-10-12 18:39:24 +11:00
b15123d279 Cleanup: remove unused derived mesh wrappers 2018-10-12 18:14:11 +11:00
8962b5e16b GP: Removed unused lines after previous commit
The reverse order is controlled inside operator.
2018-10-12 09:08:57 +02:00
54ecff1fca Mesh: remove derived mesh for nurbs conversion 2018-10-12 18:05:26 +11:00
75e4648e27 Mesh: remove derived mesh for conversion 2018-10-12 17:49:38 +11:00
5400d6a8fa DRW: correct loose edge hidden face check 2018-10-12 17:00:10 +11:00
db91414d7b Cleanup: minor mesh allocation changes 2018-10-12 16:47:43 +11:00
eef365a126 Cleanup: use const pointers 2018-10-12 16:42:11 +11:00
33e2cf2aab Cleanup: fill vertex buffer in order 2018-10-12 16:25:16 +11:00
8ef8b64fc6 DRW: edit-mesh cage loose edge/vert support 2018-10-12 16:05:31 +11:00
f4b0684a3f DRW: edit-mesh cage selection support 2018-10-12 13:05:18 +11:00
fcc88a6bf0 Cleanup: use generic macro 2018-10-12 10:42:12 +11:00
bbc5571093 Cleanup: trailing space w/ slash, right shift 2018-10-12 10:36:45 +11:00
bbca6af6a5 Fix crash in grease pencil fill 2018-10-12 10:22:05 +11:00
08ac015360 Cleanup: redundant 'struct' & 'static' vars 2018-10-12 10:12:25 +11:00
75bdfa2d46 Cleanup: style 2018-10-12 10:04:20 +11:00
6f6d76554f UI: move layer up/down reverse into the operator 2018-10-12 09:54:26 +11:00
45881003f0 GP: Remove old simplify code
The simplify is controlled by brush and thsi function is not used.
2018-10-11 19:16:55 +02:00
fb8332b1c0 GP: Reorder Userprefs grease pencil parameters 2018-10-11 19:14:18 +02:00
070c95dfe4 GP: Invert merge down if layer list is reversed 2018-10-11 18:49:03 +02:00
d6dc8cda8b GP: Invert UP/DOWN buttons when layer list is inverted
This fix the task T56985
2018-10-11 18:30:10 +02:00
18f1175940 GP: Add new Userprefs parameter to reverse layer list
This allows to configure the system as any other 2D software with the layers in a Top/Down order.
2018-10-11 18:30:10 +02:00
d12b3767f8 Add new parameter to reverse UIList items
Now, it was possible to invert the order of the UIlist using the filter, but it was impossible to know if the list was inverted or not.

The problem with this is that any other element depending of this value could not be adjusted.

See https://devtalk.blender.org/t/how-to-access-uilist-properties/2268

The new parameter allows to set the reverse order by default. When the list is set as reverse, it cannot be inverted again, so the invert button is removed of the filter.

This change is needed to fix a requested feature for Grease Pencil (T56985) and because a lot of 2D softwares use the drawing layers in the inverse order used in Blender.
2018-10-11 18:30:09 +02:00
cc1d6b849d Fix T56898: misaligned icons in buttons in popovers. 2018-10-11 17:45:17 +02:00
cd23e89634 Fix (unreported) wrong 'use_sep' setting for menu items.
This option defines whether or not menu items drawing code must
separate drawstring in two, keeping right part at all cost.

This is used to show shortcuts of operators' enum entries usually.

Previous way to decide that was based on button having an RNA prop
pointer, assuming those without it were not 'data buttons' and hence
needed the shortcut special handling thingy.

That's wrong is many, many cases (especially since search templates
often generate more than one buttons, not all linked to actual RNA
data). So instead now checking whether a button has an optype set or
not, hopefully this will be much more accurate...

Other solution if thsi also fails, is to add new flag to buttons, and
explicitely set it when needed, instead of trying to guesstimate...
2018-10-11 17:36:37 +02:00
4add09053c GP: Cleanup duplicate code moving to function 2018-10-11 16:05:08 +02:00
250ba17c83 GP: Cleanup duplicate code 2018-10-11 15:18:26 +02:00
45477efd0e UI: increase spacing between icon and text.
To avoid the icon and text blending together too much, which happens with
the new monochrome and slightly bigger icons.
2018-10-11 14:20:25 +02:00
d90eb35662 UI: tweak vertical centering of text in buttons.
This effectively moves up the text by one pixel to make it look more
centered in the button and relative to the icon.
2018-10-11 14:19:25 +02:00
3f0873fa1e Eevee: Fix blank output if scene complexity is high
Encountered on Nvidia + Linux, it seems that doing everything all at once
can make the driver give up the whole command list and return nothing as
the output of the render.
2018-10-11 13:20:00 +02:00
c901ebcd21 DRW: add mapped edit-mode face-dot drawing 2018-10-11 17:23:29 +11:00
5e9afe5018 Missed when bumping flags
Ideally these wouldn't be repeated in multiple places.
2018-10-11 17:02:42 +11:00
641190adff DRW: Initial edit-mode cage support
Modifiers such as sub-surf and mirror now work with show-on-cage.

Selection and loose geometry still needs to be supported.
2018-10-11 16:53:25 +11:00
d74b89aed0 DRW: add ability to skip drawing vertices 2018-10-11 16:43:38 +11:00
b7363941f7 Cleanup: make BKE_mesh_ensure_normals_for_display public 2018-10-11 16:34:12 +11:00
bf455c2ca9 DRW: avoid edit-mode layer lookups for freestyle 2018-10-11 15:24:26 +11:00
fb79357b3e Cleanup: assign a var to check an edge is real
Makes code slightly more readable.
2018-10-11 15:15:30 +11:00
fd2ffb0b9e RNA: remove redundant new_from_object/to_mesh arg
If the caller wants loop-tris, there is a function to calculate them.
2018-10-11 12:24:38 +11:00
92a494ed51 DRW: remove redundant editmode mesh tessellation
Also re-order logic so loop indices are ensured to be valid.
2018-10-11 11:41:24 +11:00
121c94b082 Cleanup: mesh iterators
- Split indexed/non-indexed into separate loops.
- Avoid assigning the same value in the loop.
- Use const variables.
2018-10-11 10:34:30 +11:00
4728eed70c UI: increase size of copy buffer
The length was 400 which isn't enough for some file paths.
2018-10-11 10:09:04 +11:00
926b9ae80a UI: copy-buffer was cleared w/ non-text buttons
Also correct invalid strncpy use.
2018-10-11 10:04:11 +11:00
f5e51ded09 Merge branch 'master' into blender2.8 2018-10-11 09:38:17 +11:00
b618c185cb Fix incorrect strncpy use
Didn't ensure null terminated.
2018-10-11 09:36:43 +11:00
59e4935266 Fix draw manager out of bounds assignment 2018-10-11 09:29:23 +11:00
0f147bf6d6 Remove image based bitmap font support
Was used in the game engine and is no longer used.
2018-10-11 09:27:29 +11:00
66738d4aa0 Merge branch 'master' into blender2.8 2018-10-11 09:08:30 +11:00
2083a7e274 Cleanup: style (pointers) 2018-10-11 09:03:39 +11:00
95f2604ea7 Cleanup: indentation 2018-10-11 08:20:35 +11:00
060adfbd1b Correct case 2018-10-11 08:14:04 +11:00
c2519d8521 GP: New Glow Shader FX (wip)
New shader to simulate a glow of the color.

The glow can be generated by luminance threshold or using a selection color.
2018-10-10 23:00:56 +02:00
d29f98e3f2 Python GPU: Use PyC_AsArray_FAST in GPUVertBuf.fill_attribute.
This allows you to use other types of sequences besides tuples.
2018-10-10 13:39:03 -03:00
5e88d103f7 Python GPU: Use PyC_AsArray_FAST when initing GPUIndexBuff.
This allows you to use other types of sequences besides tuples.
2018-10-10 13:39:02 -03:00
Dalai Felinto
1b1702abb0 Fix runtime error: shift of uint
The warning was: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'

Patch by Clément Foucault.
2018-10-10 13:35:34 -03:00
7dc2a5a267 Fix T57144: saving theme presets not working after recent changes. 2018-10-10 18:27:01 +02:00
Dalai Felinto
4149ee9bf6 Revert "Cmake build missing geom icons"
This reverts commit 468474a653.
2018-10-10 16:10:58 +00:00
54931324f5 Fix diagonal line artifact in view navigate icons.
Thanks to Clément for finding the fix!
2018-10-10 17:47:26 +02:00
e65784a051 Python API: add loop triangles access, remove tessfaces.
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.

Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.

Details on porting code to loop triangles is in the release notes.

Differential Revision: https://developer.blender.org/D3539
2018-10-10 17:43:44 +02:00
Dalai Felinto
468474a653 Cmake build missing geom icons
The icons themselves (their .dat) still need to be updated. But this will make
sure they are part of the pack next time the icons are updated.
2018-10-10 14:56:44 +00:00
074cbc403c Fix material properties Python error when there is no active object. 2018-10-10 15:09:12 +02:00
ae3ac8062f Fix T57128: error in Blender 27X keymap (Z key)
Reviewed By: brecht

https://developer.blender.org/D3781
2018-10-10 14:32:24 +02:00
1fad887d9e Fix T57130: Crash when running 'set active object as camera' on an empty
Reviewed By: brecht

https://developer.blender.org/D3782
2018-10-10 14:30:44 +02:00
84cf670d1d Modifier: Fix cage option for deform modifiers
Show-on-cage and show-in-editmode options now work as it did in 2.7x
(but only for deformation).
2018-10-10 15:53:52 +11:00
606ac3eb7f Fix modifier cage option being overwritten
Editmesh modifier calculation behaved as if eModifierMode_OnCage
was enabled for all modifiers.

Remove assignment after all modifiers are calculated.
2018-10-10 15:22:47 +11:00
9751d7188e Cleanup: naming 2018-10-10 15:18:34 +11:00
9bb1bd0b5e Correct bad statvis default in recent commit 2018-10-10 15:11:00 +11:00
62020eddec Cleanup: naming
- mesh_calc_modifiers & editbmesh_calc_modifiers
  now follow similar naming.
- me and mesh were too easily confused in mesh_calc_modifiers
  (remove 'me', access ob->data).
2018-10-10 15:01:46 +11:00
58a41df51e Cleanup: add back add_shapekey_layers to modifier stack
Looks like this might not be used, add back just in case.
2018-10-10 14:37:08 +11:00
c3c4f8f60a Cleanup: uncomment statvis calculation (still disabled) 2018-10-10 14:28:31 +11:00
c61142c0b5 Modifier: use simplified bmesh -> mesh conversion 2018-10-10 13:14:15 +11:00
633e2cddd7 BMesh: simple bmesh -> mesh for evaluation
Copied from CDDM_from_bmesh, the modifier stack doesn't
need to handle shape keys, vertex parents or selection history
(needed for mode switching).
2018-10-10 13:14:15 +11:00
7e6a8678c6 RNA: Always keep at least one element in snap_mode. 2018-10-09 22:30:00 -03:00
44f478bb1a Modifier: remove derived-mesh for sculpt crazy-space 2018-10-10 12:01:05 +11:00
Dalai Felinto
8c470e26d2 Fix for VIEW3D_OT_snap_selected_to_active
There is no active bone data in the cowed edit armature.

This was introduced on rBe12df10120a0, back when we hoped the depsgraph
would fullfill all our hopes and dreams.

Before the single-context-editing depsgraph reality came crashing on us.
2018-10-09 21:28:06 -03:00
9f2b3fc80e Cleanup: prefer parenthesis over breaking lines 2018-10-10 11:21:30 +11:00
626def1ac2 Cleanup: naming
lockaxis -> lock_axis
2018-10-10 11:18:09 +11:00
bfe4e79f02 Cleanup: naming 2018-10-10 11:12:41 +11:00
43f46bb664 Tool System: add back layer selector
This was removed in 1b0c1c551a since most settings changes the
current stroke, however the layer selector is used for the next stroke.
2018-10-10 11:10:13 +11:00
1dd3b93d2f Revert "Cleanup: avoid for loop"
This reverts commit 390dc94562.

After testing this is approx half the speed of a for loop.

Add missing break and assign snap_elements to a variable.
2018-10-10 10:57:13 +11:00
Dalai Felinto
2a2858b30d Fix for ARMATURE_OT_layers_show_all in pose mode 2018-10-09 20:42:54 -03:00
4fa39d9df8 UI: show confirmation for metaball delete
Matches other modes.
2018-10-10 10:31:48 +11:00
390dc94562 Cleanup: avoid for loop 2018-10-10 10:31:48 +11:00
Dalai Felinto
7cf8eed5e0 Multi-Objects: ARMATURE_OT_layers_show_all 2018-10-09 20:30:29 -03:00
ae90dc19e7 View3D Header: Display the text "Mix" instead of an icon when more than one snap element is enabled. 2018-10-09 20:11:52 -03:00
Dalai Felinto
ba36e90170 Dissolve/delete dont need confirmation when called from menu 2018-10-09 19:41:04 -03:00
Dalai Felinto
396eba4533 Multi-Objects: ARMATURE_OT_reveal 2018-10-09 19:28:12 -03:00
Dalai Felinto
4c3578b6af Multi-Objects: ARMATURE_OT_hide 2018-10-09 19:28:12 -03:00
91ea42b8df Remove Align to View Operator
This only worked on new objects, which is no longer needed.
It didn't account for:

- Quaternion or axis-angle rotation.
- Parenting.
- Constraints.

If we support object rotation alignment, it might be best to
make it a more general set of alignment operators
(align transform, orientation - not limiting to view).
2018-10-10 09:21:37 +11:00
54967955bc Empty Image: use draw size instead of object scale
Object scale has implications for parenting, use draw size instead.

Also use add-empty view_align option instead of a separate operator.
2018-10-10 09:11:45 +11:00
Dalai Felinto
10a8786054 Removal of "extend" option for ARMATURE_OT_select_linked
This property (even in 2.7) was not working. In fact it behaves as extended
when extended was FALSE.

Besides all that, the operator is not affected my multi-objects, so it
is good to go.
2018-10-09 18:33:16 -03:00
3f93091e8b UI: reduce greying out of icons in radio and toggle buttons.
With the monochrome icons this reduced the contrast too much.
2018-10-09 23:05:43 +02:00
195dd9888a Cleanup: Remove old shader reference 2018-10-09 20:22:40 +02:00
944e22115d Eevee: Lights: Bump the minimum area light size
This is to avoid visible artifacts with default lamps intensity.
2018-10-09 19:08:25 +02:00
65fee32324 Eevee: Volume: Fix incorrect Light intensity compared to cycles 2018-10-09 19:08:25 +02:00
bb83bd773c Cleanup: Remove old smoke drawing code 2018-10-09 19:08:25 +02:00
2c0f02dd0a GP: Add Shift+F to change Drawing Brush strength 2018-10-09 19:07:20 +02:00
c630ce3f6d Fix T57097: Crash when adding a Texture Slot in Texture Paint mode
Was caused by the use of a batch that was using a discarded index buffer.
2018-10-09 17:55:19 +02:00
d2eb7e8dfa GP: Add RNA path function for gp brush settings 2018-10-09 17:45:52 +02:00
a1dbd2bb6c GP: Minor changes to canvas panel 2018-10-09 17:45:51 +02:00
47e1e7212c Eevee: Fix crash with defered compilation and volumetric shaders 2018-10-09 17:34:04 +02:00
e234ce9b22 Eevee: Add support/Fix Object Info node
Caveat: Random output does not yet work with instance (dupli) objects.
2018-10-09 17:34:04 +02:00
6d6e3869ce Fix T57122: Sample color during texture painting not working.
Stupid +1/-1 fiddling of mat indices (between MPolys and object...).

Initial investigation and patch by @dfelinto, thx.
2018-10-09 17:32:10 +02:00
b0b547bd1e Python GPU: Update shader.from_builtin and shader.code_from_builtin description. 2018-10-09 12:18:28 -03:00
8fc8131bc9 GPU Python: Use string literals in shader.from_builtin and shader.code_from_builtin.
Also, the gpu.shader.builtin submodule becomes obsolete, so it has been removed.
2018-10-09 12:07:06 -03:00
90e360c39f GP: Improve center object in viewport when press .
Before when press . (view_select) the object was centered at the dummy, but now it's centered with the strokes bounding box size.

Also fixed some problems in edit mode when the object origin was not in view origin.
2018-10-09 16:55:29 +02:00
Dalai Felinto
5cb633ce3f Cleanup 2018-10-09 13:38:25 +00:00
f81e8903b4 Fix T55202: 3D Cursor Snapping not working correctly in Edit Mode.
Use `mesh_eval_final` in this case.
2018-10-09 10:24:15 -03:00
Dalai Felinto
18be4d942b Fix build error on windows/MSVC 2018-10-09 12:45:00 +00:00
Dalai Felinto
9a670a67d2 Fix for assert when sampling color to non-existent palette 2018-10-09 12:43:11 +00:00
85944a2d7e Image Empties: Usability improvements and fixes
- new "Align to View" option when loading a new image
- automatically align to view when dropping an image into a viewport
- larger default size for image empties
- fix image empty gizmo in orthographic view
- new "Align Objects to View" operator

Reviewer: brecht

Differential: https://developer.blender.org/D3778
2018-10-09 14:36:15 +02:00
3e2422a947 Fix T57115: buttons drawing wrong after recent icon drawing changes. 2018-10-09 14:05:57 +02:00
f1959f0999 Fix Weight Paint display with Subdivision Surface modifier.
The flag used to be set by the now removed old weight paint coloring code.
2018-10-09 14:21:23 +03:00
0749808d51 DRW: Fix volume visibility when object draw type is wire or bbox 2018-10-09 12:12:38 +02:00
9cf01d35be Workbench: Smoke: Add support for Color Mappping for smoke debugging 2018-10-09 12:12:38 +02:00
d4d6cbe0a7 GPUDraw: Smoke: Cleanup/Refactor 2018-10-09 12:12:38 +02:00
2471b9c528 Fix crash in T56064: Blender crashes on selecting text-object.
The root of the issue remains though, see T56172, this is just a quick
bandaid to stop crashing on it, until we find a proper solution.
2018-10-09 11:35:21 +02:00
9560fe60e4 Python API: new GPUShader.format_calc() method
Reviewers: mano-wii, fclem, campbellbarton

Differential Revision: https://developer.blender.org/D3772
2018-10-09 11:17:29 +02:00
1b910082a0 Edit Mesh: replace DerivedMesh w/ Mesh
DerivedMesh is now removed from edit-mesh modifier evaluation.
2018-10-09 17:48:28 +11:00
79ca13a745 Cleanup: naming
Use BKE_mesh_* prefix for mesh module.
2018-10-09 16:09:59 +11:00
72e90c5db3 Cleanup: remove unused EditDerivedBMesh 2018-10-09 15:57:38 +11:00
3c78763482 Edit Mesh: remove derived-mesh from crazy-space calculation 2018-10-09 15:38:06 +11:00
20fbe6bca8 Modifier: move edit-mesh calculation from DerivedMesh to Mesh 2018-10-09 15:11:06 +11:00
75ac83610b Modifier: add non derived mesh modifier wrappers
Rename modifier_deformVerts_ensure_normals &
modifier_applyModifier_ensure_normals with wrappers that match 2.7x
convention.
2018-10-09 13:20:20 +11:00
c8c3bbaade Cleanup: naming
Rename DerivedMesh modifier functions to make room for mesh versions.
2018-10-09 12:23:22 +11:00
e7218e7049 Cleanup: naming
- immAttrib*    -> immAttr*
- immSkipAttrib -> immAttrSkip

Term 'attr' is a convention for GPU module.
2018-10-09 11:01:50 +11:00
9b49a0d971 Cleanup: naming 2018-10-09 10:51:35 +11:00
d43c776a56 Cleanup: warnings 2018-10-09 10:41:36 +11:00
793d5cb7fd Merge branch 'master' into blender2.8 2018-10-09 10:41:13 +11:00
cf03658adb Fix misuse of Py_INCREF in module creation.
Differential Revision: https://developer.blender.org/D3697
2018-10-08 20:01:55 -03:00
76f640c27d Cleanup: spelling 2018-10-09 09:29:14 +11:00
d592eb510e Cleanup: naming 2018-10-09 09:25:33 +11:00
7920ebd157 Cycles: Fix NLM denoising kernels zeroing the wrong buffer on OpenCL
Since my temporary buffer commit (about a month ago), the OpenCL device was zeroing the wrong buffer, leading to
completely wrong filtered feature passes and therefore significantly lower-quality results than CPU and CUDA.
2018-10-09 00:14:29 +02:00
733e6c0b1d Merge branch 'master' into blender2.8 2018-10-09 08:46:00 +11:00
11877e5bec GP: New Canvas offset parameters
Now the canvas can me moved in X/Y axis.
2018-10-08 23:21:44 +02:00
3bc885e5f4 Cleanup: style 2018-10-09 07:58:06 +11:00
da39f10eb7 Fix T57103: Subdivide smooth results in NAN verts 2018-10-09 07:49:54 +11:00
7aaeb06fb6 Cycles: Clean up extra minus in previous commit
Forgot to add that change, sorry for the noise.
2018-10-08 22:22:05 +02:00
0234de7d85 Cycles: Reuse existing buffer in the NLM denoising kernels on CPU 2018-10-08 22:17:06 +02:00
15e9d80375 Cycles: Use existing shared temporary memory in reconstruction step of the denoiser
Previously the code allocated its own temporary memory, but it's possible to just use the existing shared one instead.
2018-10-08 22:13:40 +02:00
e1293da014 Splash: add themes to first time setup in splash screen.
* Add default theme as Blender Dark.
* Rename Flatty Light to Blender Light.
* When setting theme, reset to default first for consistent results.
2018-10-08 19:46:00 +02:00
William Reynish
6a41691a0d UI: layout tweaks for headers.
* Move all copy & paste operators into the menus. There was no real reason
  why these particular operators should be in the header and not in the menus,
  like all other operators
* Move ‘Update Automatically’ toggle from UV/Image Editor header into menu.
* Move the pin toggle next to the ID blocks, because it is related.
* Move OpenGL render from sequence header into View menu.
* Sequence editor display mode and channels are now not expanded.
2018-10-08 19:46:00 +02:00
cf8e71db61 UI: add icon color coding for different data types in the outliner.
For now we have categories collection, object, object data, modifiers &
constraints, and shading. The icons can be categorized by adding e.g.
DEF_ICON_OBJECT() in UI_icons.h.

Light themes will need to be updated to use darker colors to keep icons
visible in the outliner.
2018-10-08 19:46:00 +02:00
2ac65f6153 UI: new icon set by Andrzej Ambroz.
This is a monochrome icon set, with a more modern look and icons for
various features that did not have a proper icon before.
2018-10-08 19:46:00 +02:00
192a99f477 Fix incorrect alpha blending for icon drawing outside buttons.
This was not so noticeable for old icons with black outline, but with
white outline it's problematic.
2018-10-08 19:45:59 +02:00
Dalai Felinto
14d0aa728a Fix tool panel not refreshing when updating color 2018-10-08 17:15:39 +00:00
b8a0434bc5 GP: New automatic adaptative UVs parameter
Now by default the UVs are calculated with a fixed size and this makes easier to add patterns for drawings like Manga. Before, the texture changed depending of the stroke size.
2018-10-08 18:33:26 +02:00
e5c7c21630 Workbench: Smoke: Port back Flame display
The appearance is a bit different than 2.79 where the flame was just added
on top of the smoke without correct blending.

Now it's much more realistic and using volumetric integration. You can see
the smoke actually masking the flame.

The other difference is that the flame color was not using proper color
managed blending. Now with the use of filmic it shows bright yellow.
This could be adjusted and displayed as a user parameter in the future.
2018-10-08 17:20:09 +02:00
8c4a7593f2 EEVEE: Fix unpremultiplied alpha in render result
Fix T57102
2018-10-08 17:20:09 +02:00
eea22dd5ef Workbench: Smoke: Fix display
Includes the following fixes
- Fix smoke texture creation: data was interpreted as Byte instead of Floats.
- Fix Velocity texture not being free after draw: also was causing crashes.
- Fix display_thickness not being copied during COW.
- Fix Blending and general volume rendering algorithm.
- Add Volume Shadowing support.
2018-10-08 17:20:09 +02:00
ba3ef44a6b Implement display of weight isoline contours in the fragment shader.
Add an option to display contour lines tracing through points with the
same interpolated weight value in weight paint mode. This can be useful
for working on gentle gradients over a relatively high resolution mesh,
where the difference in color between adjacent vertices is very small.

The contour grid has 3 levels of detail going down to step 0.001,
which automatically fade in or out based on the weight gradient.

Fade out works by capping both screen space and weight space line
width, and reducing alpha when the screen space width becomes too
small for moire and noise-less rendering.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D3749
2018-10-08 14:15:47 +03:00
d12e781810 Fix T57083: Grease Pencil / Texture Paint Crash in 2.8
The brush of texture paint hadn't gp_icon
2018-10-08 10:32:41 +02:00
7d38654ecd use keyword argument for template_node_socket() 2018-10-08 09:15:31 +02:00
772c4d6313 Edit Mesh: basic show in edit mode support
Note this is just using the derived-mesh data at the moment,
to support this properly we'll need to remove derived-mesh.
2018-10-08 17:31:32 +11:00
215c23590a Edit Mesh: use deformed mesh w/ face-dot & normals 2018-10-08 12:18:45 +11:00
df82d35ceb Cleanup: extract cache calculation from derived-mesh 2018-10-08 12:04:23 +11:00
04064fb186 Cleanup: use DRW_object_is_* for object checks
Also use const qualifier for object's.
2018-10-08 10:43:34 +11:00
d022794cad Cleanup: rename checks for Python struct strings
Using 'format' prefix made this read as if t was for string formatting.

Use 'PyC_StructFmt' prefix instead since these values are compatible
with formatting from Python's 'struct' module.
2018-10-08 08:37:32 +11:00
1fd1735df0 CPython: use format char utilities in idprop_py_api 2018-10-07 12:24:47 -03:00
af7967b010 CPython: py_capi_utils: format char utilities do not need to be inline. 2018-10-07 12:22:17 -03:00
91bfea5b05 CPython: py_capi_utils: use more descriptive names for format string utilities. 2018-10-07 12:21:09 -03:00
ee2e30683c Cleanup: style 2018-10-07 17:49:22 +11:00
9756475ed6 Tests: Support parallel execution of render tests
Previously, parallel tests would overwrite each others temporary outputs.
2018-10-06 22:12:28 +02:00
a0cc7bd961 Cycles: Implement vectorized NLM kernels for faster CPU denoising 2018-10-06 21:49:54 +02:00
db1a04313c Fix crash unregistering parent panel before children.
This caused crashes with addon enabling/disabling and template loading.
2018-10-06 20:56:31 +02:00
7d5fb2e103 Vertex Paint: support switching to secondary color temporarily holding Ctrl
while it is possible to permanently flip the colors using the 'X' button, this makes it consistent with Texture Paint.

fixes T56994

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: JulienKaspar

Tags: #sculpting_and_painting

Maniphest Tasks: T56994

Differential Revision: https://developer.blender.org/D3753
2018-10-06 15:11:24 +02:00
495a7128cb Cleanup: use the naming convention in py_capi_utils
And use inline functions instead of preprocessor directives.
2018-10-06 01:15:15 -03:00
0f55334413 Cleanup: use new format string utility 2018-10-06 00:13:54 -03:00
98e62d459a py_capi_utils: add utilities for format string in struct module style syntax. 2018-10-06 00:13:40 -03:00
Dalai Felinto
bb0b4b008e Pseudo-fix for ARMATURE_OT_autoside_names and x-mirror
It now works like 2.7x. That said this operator is kind of incompatible with
x-mirror (the way it is implemented anyways). But if people were happy with
this in 2.7x they will be multi-object happier.

That said, do turn off x-mirror before using this or select all bones, or just
stop using this operator altogether ;)

Jokes aside, the operator can also be fixed. It shouldn't be hard.
2018-10-05 19:50:20 -03:00
Dalai Felinto
d5e72c0e96 Fix for ARMATURE_OT_flip_names and x-mirror
There was a reason this was using CTX_DATA_BEGIN in the first place.
Issue introduced on 47cf8bd928.
2018-10-05 19:29:19 -03:00
Dalai Felinto
c762074b7b Multi-Objects: ARMATURE_OT_parent_clear 2018-10-05 19:08:30 -03:00
Dalai Felinto
219a4987b9 Multi-Objects: ARMATURE_OT_symmetrize 2018-10-05 18:34:16 -03:00
Dalai Felinto
fa8e91f03c Multi-Objects: ARMATURE_OT_separate 2018-10-05 18:13:57 -03:00
Dalai Felinto
74e01d2235 Multi-Objects: ARMATURE_OT_split 2018-10-05 17:55:54 -03:00
Dalai Felinto
7d1bf58760 Silence warning 2018-10-05 17:55:34 -03:00
Dalai Felinto
28d617199d ARMATURE_OT_fill: cleanup
Remove nonsensical insanity check.
Remove FIXME that would never be addressed anyways.
2018-10-05 17:50:09 -03:00
Dalai Felinto
d67972a9e1 Multi-Objects: ARMATURE_OT_merge
Also removed the insane insanity check. This would fail in the
poll function. No point in that level of paranoia.

And return OPERATOR_FINISHED regardless. Since this has a parameter
(though not used) you may get want to tweak REDO (in the future).
2018-10-05 17:50:09 -03:00
9bd65528e3 GPU Python: optionally init the vertexformat in the vertexbuffer itself. 2018-10-05 17:22:03 -03:00
Dalai Felinto
8882b3d7b6 Multi-Objects: ARMATURE_OT_autoside_names 2018-10-05 17:02:37 -03:00
a33a4e132e Add and use a utility for computing B-Bone roll from custom handles.
This also fixes a stability problem with the start handle
due to an incorrect matrix multiplication order.
2018-10-05 21:52:01 +03:00
8044743741 Texture Paint: reorganize texture slots UI panel. 2018-10-05 20:09:59 +02:00
84f8862b06 Texture Paint: automatically set default color when adding texture slot. 2018-10-05 20:09:59 +02:00
975af239ed Fix wrong RNA handling of some internal pchan pointers.
There were two issues here:
* cutsom_shape_transform was not properly tagged as not-owned pointer.
* custom_shape_transform and bbone_start/_end could be set to a pchan from
  another data-block (not from UI, but RNA access code itself allowed it).

Those two issues were specificaly breaking complex rigs in static
override case.

EDIT: since yesterday, bbone_start/_end are mere accessors to edit_bone
data in RNA, so most of fix related to those was ditched (they still needed
to be 'deactivated' from RNA diffing with PROPOVERRIDE_NO_COMPARISON).
2018-10-05 20:07:51 +02:00
Dalai Felinto
0b8e92783e Multi-Objects: ARMATURE_OT_duplicate 2018-10-05 15:05:51 -03:00
550fee8eb6 GPU Python: use _PyArg_ParseTupleAndKeywordsFast. 2018-10-05 14:38:35 -03:00
25bd9feadb Add a new B-Bone Custom Handle type that uses the handle bone direction.
Both original handle types are based on location, and Absolute uses it
in a weird way: the Start handle uses the head, while End uses the tail.

This makes controlling the shape of the B-Bone via control bone rotation
really non-intuitive, especially if trying to add a single control for
the tangent in the middle of a B-Bone chain.

To remedy this, add a new custom handle type that uses the orientation
of the control bone, while completely ignoring location. It is even
possible to control both ends of one B-Bone with the same handle bone,
resulting in an S shape.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3769
2018-10-05 20:19:58 +03:00
Dalai Felinto
6723e173a5 Multi-Objects: ARMATURE_OT_click_extrude
This operator is actually working as expected, but I added some
comments explained that it was already "ported".
2018-10-05 14:01:16 -03:00
Dalai Felinto
1d6817d580 Fixes for ARMATURE_OT_extrude / ARMATURE_OT_extrude_move
* Return OPERATOR_FINISHED only if at least one object succeeded.
* Have a per object fork value, otherwise an object may influence the next.
(which is why we should use `const foo = ...; foo_iter = foo;`)
2018-10-05 13:33:31 -03:00
Dalai Felinto
234d609f94 Multi-Objects: ARMATURE_OT_extrude / ARMATURE_OT_extrude_move
Based on D3384 by Nick Milios.
2018-10-05 13:21:07 -03:00
Dalai Felinto
13dfb91149 Multi-Objects: ARMATURE_OT_calculate_roll
The patch itself was fine (save for sending notifiers for objects instead of ob).
But I couldn't apply it, so I re-did from scratch.

Based on D3394 by @codemanx
2018-10-05 12:56:27 -03:00
Dalai Felinto
def3b8c68c Multi-Objects: ARMATURE_OT_roll_clear 2018-10-05 12:37:07 -03:00
Dalai Felinto
149e912b1f Special enum item when no sound is found
This happens when you build without sound libraries and such.
Without that the console is spammed with tons of RNA messages because
the enum is empty.
2018-10-05 12:37:07 -03:00
eab00bf202 GPU Python: fix crash when calling batch.draw without passing a shader. 2018-10-05 11:55:17 -03:00
35dcc3d4f4 Transform: hide the Dial3d drawing if the operator has not been called by a Gizmo. 2018-10-05 10:43:06 -03:00
44df83a588 Dial3d Gizmo: consider the offset value in the incremental angle drawing.
This prevents misalignment with the Spin tool gizmo for example.
2018-10-05 10:43:06 -03:00
564d37c4b6 Python API: new GPUVertFormat constructor and vbo.fill_attribute method
Reviewer: fclem

Differential Revision: https://developer.blender.org/D3760
2018-10-05 15:10:56 +02:00
William Reynish
1aae42aa88 UI: move set origin operators into own object submenu. 2018-10-05 14:14:49 +02:00
7c443ded1e Vertex Paint: multiply vertex paint overlay
Fixes the first part of T56999.

Reviewer: brecht

Differential Revision: https://developer.blender.org/D3768
2018-10-05 14:05:48 +02:00
23e9b35bf4 GP: Rename Canvas Grid to Canvas 2018-10-05 14:00:47 +02:00
3c0736bc4b Redefine the Relative custom B-Bone handle type to be more reasonable.
Specifically, it should always use the position of the custom handle
bone head, even when affecting the handle at the tail of the main bone,
and shouldn't apply the special handling for joining two B-Bones.

This handle type was unusably broken before a bug fix included in
recent changes, so it should be safe to break backward compatibility.
2018-10-05 13:29:05 +03:00
8ce5f015dc GP: Remove decoration in Viewport Display panels 2018-10-05 10:39:02 +02:00
e8f135c2cf GP: Cleanup grid RNA settings moving to separated struct 2018-10-05 10:23:31 +02:00
f28dd2c944 Cleanup: capitalize runtime in struct name 2018-10-05 17:20:23 +10:00
b69301d4aa Context: add uv_sculpt_object
While this may be temporary, it avoids copy-pasting these
checks in Python code.
2018-10-05 17:10:27 +10:00
8b05d38305 GP: Cleanup names and code 2018-10-05 08:59:33 +02:00
f36f029321 Cleanup: style 2018-10-05 15:01:58 +10:00
402bde39d1 UI: show uv sculpt options in topbar & toolsettings 2018-10-05 14:54:53 +10:00
19d8aa5652 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-10-04 21:57:00 -06:00
ddfd6b518c Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-04 21:56:20 -06:00
9f7c7cb98e Cleanup: remove gpencil label from common code path 2018-10-05 13:55:08 +10:00
1b7b6d9060 Tool System: prepare for showing non 3D view tools 2018-10-05 13:48:43 +10:00
1b38effd5f RNA: add access to tool mode 2018-10-05 13:29:51 +10:00
143ece7199 Tool System: initial support for UV-sculpt
This currently conflicts with the UV-sculpt toggle being manually set,
ideally this would work more like other paint modes in Blender.
2018-10-05 13:13:30 +10:00
c15439bcdc Cleanup: use PyModule_AddIntConstant 2018-10-04 23:53:57 -03:00
b0c1fe3618 Fix invalid flag passed to mesh batch dirty tag 2018-10-05 11:22:08 +10:00
0b98a679bb UI: rename Border Select -> Box Select
See: T56648
2018-10-05 10:29:31 +10:00
50cb8013eb UI: rename overlay: Ornaments -> Extras
See: T56648
2018-10-05 09:49:09 +10:00
3a1e9b9997 GP: Move grid parameters to GP object data level
The grid now can be configured by object because this helps to identify objects and allows to define diferent grid parameters for each objects.

Also added a color option.
2018-10-04 23:27:34 +02:00
65f77ccea1 Fix T56268: display the correct rest shape for B-Bones in Edit Mode.
The rest shape of B-Bones is actually affected by custom handles or
the default connected parent/child mechanism. Ignoring these effects
thus leads to the edit mode shape being different from the actual
rest pose.

This splits the b_bone_spline_setup function that is used to compute
the correct rest and pose shape from pose channels into two parts,
and applies the data structure independent half to edit mode.

In order to access the custom handle settings in Edit Mode, they are
moved to Bone and EditBone, while the bPoseChannel fields are downgraded
in status to a cache for performance. Also, instead of flags, introduce
an enum to specify the handle operation modes, so that new ones could
be added later.

Reviewers: aligorith, brecht

Differential Revision: https://developer.blender.org/D3588
2018-10-04 19:55:44 +03:00
61a24c799b Move B-Bone custom handle settings to Edit mode.
Custom handle settings actually affect the B-Bone rest shape,
so they should be changed in Edit mode rather than Pose mode.
This is necessary to be able to display the correct rest shape
of the bone in Edit Mode.

Also, instead of flags, introduce an enum to specify the handle
operation modes, so that new ones could be added later.

Differential Revision: https://developer.blender.org/D3588
2018-10-04 19:55:44 +03:00
6932eaa2bc Revert "tmp"
This reverts commit 9d8c05f7ec.
2018-10-04 13:54:57 -03:00
a2d633316b Cleanup: Remove some unneeded code
Reviewers: fclem

Differential Revision: https://developer.blender.org/D3767
2018-10-04 18:54:08 +02:00
33d89e482b Revert "UI: start maximized on X11 if possible, like other platforms."
This reverts commit ac0dfcced3.
2018-10-04 18:52:55 +02:00
ee6c8be183 GPU Python: rename methods "shader_from_builtin" and "shader_code_from_builtin" to "from_builtin" and "code_from_builtin". 2018-10-04 13:51:21 -03:00
b183f57a9e GPU Python: Fix assert in PySequence_Fast_GET_SIZE 2018-10-04 13:49:06 -03:00
9d8c05f7ec tmp 2018-10-04 13:49:05 -03:00
fe47f6e56a Fix channels region showing in timeline editors in startup templates. 2018-10-04 18:12:31 +02:00
4933dd716c Gizmo: Fix artifacts when having large angles
Reviewer: brecht

Differential Revision: https://developer.blender.org/D3765
2018-10-04 17:53:05 +02:00
4388549124 Units: Change '1000 Kilograms' to 'Tonnes'
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3766
2018-10-04 17:52:17 +02:00
7bd5ba5019 Fix T57062: missing preview range drawing in graph editor. 2018-10-04 15:48:12 +02:00
528a8bd788 UI: duplicate X-ray option in popover, makes relation with alpha more clear. 2018-10-04 15:26:38 +02:00
d2f913a37a Fix T57040 Mesh Disappearing after exiting edit mode in sculpt 2018-10-04 14:57:23 +02:00
9869e4ffe5 Fix T56992 caused by typo in previous fix 2018-10-04 14:56:51 +02:00
6e08b01bd9 Fix T57059: "make deps" build error when sndio library is present. 2018-10-04 13:34:08 +02:00
6bd60292da Transform: fix glitch in the rotating gizmo drawing. 2018-10-04 08:23:52 -03:00
cc92d83d39 Fix T57011: Crash pressing Free Light Cache during Indirect Light Cache
Baking

just kill the bake job prior to freeing

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D3764
2018-10-04 11:24:17 +02:00
935b18ec75 UV: support setting the cursor w/ non-cursor tools 2018-10-04 17:07:05 +10:00
b7aeadcaa9 Gizmo: UV transform cage now uses all edit-objects 2018-10-04 16:46:20 +10:00
105f9e577f UV: avoid redundant batch cache w/ UV select pick & all
Only tag UV's as needing an update.
Also correct notifier for region redraw.
2018-10-04 16:19:27 +10:00
d0b47ddd7d Fix UV select tools not refreshing
Add BKE_mesh_batch_cache_dirty_tag option for resetting UV's.
2018-10-04 16:03:51 +10:00
69496bd843 Remove empty file added by accident 2018-10-04 15:29:30 +10:00
51d6d1d8fb WM: fix non-undo operators stealing redo panel
Non-undo actions would move the redo panel into a different space.
2018-10-04 15:26:36 +10:00
165a83345a UV: border/circle select/deselect support 2018-10-04 15:14:00 +10:00
f4e38974b3 UV: use circle select/deselect 2018-10-04 13:21:25 +10:00
4469ca7f3e UV: rename circle select operator
Word order was swapped from all other operators.
2018-10-04 13:21:21 +10:00
d23447d8d5 UI: disable UV operator register
Was showing redo panel for cursor & selection operators.
2018-10-04 13:08:28 +10:00
46eb050c9d Cleanup: remove single backtick quotes
This isn't valid RST.
2018-10-04 13:08:28 +10:00
ffa15f4b4a Python GPU: GPUBatch and GPUShader refactor.
The changes are:
- The shader now is passed as a parameter of the batch `draw` method (batch.draw(shader)). Since the batch always has to set a shader before drawing;
- The batch methods to specify a value to a uniform have been removed. Uniforms are parameters of the program (here called shader). If you change a uniform, it changes in all batchs that use the same program;
- New methods were added to set uniforms by the shader;
- The `batch.program_set_builtin` was removed. It is a duplicate of `program_set` but without a shader object. We need the shader object to configure the uniform;

Differential Revision: https://developer.blender.org/D3752
2018-10-03 23:34:27 -03:00
98a10fd7de Tool System: add UV cursor & transform tools
Instead of showing the transform handles for all selections,
move this functionality into a tool as done for the 3D view.
2018-10-04 12:10:26 +10:00
a4530f59d2 Transform: support for 2D cursor editing 2018-10-04 12:04:23 +10:00
e30f32b5a3 Transform: make gizmo pie section start from where you drag. 2018-10-03 22:31:01 -03:00
b36f17b8c2 Fix missing free w/ UV-lasso 2018-10-04 11:03:53 +10:00
3c8c1841d7 UI: use shared toolbar region callbacks
Image toolbar now starts with a single column width
and snaps to button increments.
2018-10-04 09:37:22 +10:00
55f62b94f8 DRW: minor tweaks to mode checking
Avoid accessing object mode via the view layer active object
when drawing since it's done everywhere we store the active object mode
in the draw-context.
2018-10-04 09:37:18 +10:00
971ab57c7d Cleanup: style 2018-10-04 09:33:49 +10:00
a04155dd52 ED_gizmotypes_dial_3d_draw_util: use a struct to hide most parameters. 2018-10-03 19:59:35 -03:00
851b2ac29f UI: remove toolbar UV panels
These duplicate existing menu items.
2018-10-04 08:32:26 +10:00
ab8a64a5b9 GP: Show 3D cursor in draw mode
The cursor is used as location to draw new stroke
2018-10-03 22:59:52 +02:00
204ad852a6 GP: Hide different UI elements depending of mode
The 3D Cursor, origin and dummy are hidden depending of the mode to get a cleaner drawing space.
2018-10-03 22:56:23 +02:00
c52485c16a Editor Transform: use the dial3d drawing in the rotation operation 2018-10-03 17:45:56 -03:00
dfce96dbf7 Dial3d Gizmo: Add the Incremental Angle option to snap. 2018-10-03 17:45:55 -03:00
222ea72981 GP: Allow canvas grid with different scales in X/Y
Now it's possible create rectangular shapes and disable the subdivisions to get only a rectangle
2018-10-03 22:42:45 +02:00
77def38eab GP: Allow 0 subdivisions for canvas grid 2018-10-03 22:14:56 +02:00
77787310ad Cleanup: tiny improvement in error reporting for makesrna 2018-10-03 21:56:33 +02:00
5a4ff142de GP: Hide the origin when enable origins 2018-10-03 20:30:13 +02:00
5f4d2be735 GP: Hide dummy and cursor in drawing mode 2018-10-03 20:25:14 +02:00
9a674a749b cycles: Support building with cuda 10 on windows. 2018-10-03 10:18:22 -06:00
9c09998530 UI strings: Fix asserts in 'middle-splitting' fitting string code.
The problem is that string width computing is performed in integers
(pixels), which can generate a rather annoying error (a few pixels)...
Simply work around that for now, by trimming an extra middle char when
needed.
2018-10-03 16:24:35 +02:00
fb60fb055d Improvements to internals blf_font's blf_font_width_to_strlen()/to_rstrlen()
`to_strlen` just benefits from using pre-computed kerning table for
ascii chars (gives about 30% speed improvements).

`to_rstrlen` was re-written and heavily simplified, basically using same
logic as `to_strlen`, and `BLI_str_find_prev_char_utf8()` to loop
backward in the string, instead of looping forwards the whole string,
storing each gliph's width in temp array, and looping backward on that
temp array to find final string matching expected width. Gives about 70%
speed improvements!

And both functions can now share their core logic.
2018-10-03 16:24:35 +02:00
89c30ff746 Pose Mode: Add back IK Degrees of freedom display 2018-10-03 15:44:12 +02:00
34a627f345 Fix T56992: OpenGL Render Engine ignores Transparent Background
Correct the outline blending for alpha 0 background.
2018-10-03 15:44:12 +02:00
36d457e887 DRW: Fix assert in texture paint 2018-10-03 15:44:12 +02:00
Dalai Felinto
b6c1443742 Silence warning 2018-10-03 12:06:11 +00:00
a3d9e8edce Merge branch 'master' into blender2.8 2018-10-03 12:56:44 +02:00
44d47526af Fix icon alpha theme option not working for monochrome icons. 2018-10-03 12:56:39 +02:00
d05b9e0a2e Fix build with older CMake versions that we still need to support. 2018-10-03 12:55:43 +02:00
e5387eef18 Merge branch 'master' into blender2.8 2018-10-03 12:12:22 +02:00
d2da3af073 Fix T54287: memory not freed after rendering on Linux.
With new jemalloc versions memory allocated by threads that then become
inactive is not longer automatically freed. Instead we have to enable a
background thread to do it.

Some testing is needed to find out of this is sufficient, because the
background thread only runs periodically.
2018-10-03 12:09:31 +02:00
8d26705b3e GP: Add z-depth offset parameter
This parameter allows to define the percentage of offset of a stroke when uses surface mode.

Before, this was a fixed value, but for some artists' purposes, it's good to have the option to change it.
2018-10-03 10:55:26 +02:00
2d21eb79ad Units: Support for fixed units
Users can select the main unit they want to use now.
Previously the displayed unit always depended on the magnitude of the value.
The old behavior can be restored by switching to the "Adaptive" mode for length, mass and time units.

Meters, kilograms and seconds are the default units for new and old scenes.

The selected unit is also the default unit for user input.
E.g. if cm is selected, whenever the user inputs a unitless number into a field of type length, it will be interpreted as cm.

Reviewer: brecht

Differential: https://developer.blender.org/D3740
2018-10-03 10:20:16 +02:00
1c3411ac89 Keymap: expose tool keymaps in the preferences
Currently some modes share tool keymaps, we might want to disable
this since it's confusing editing one thing in multiple places.

However this should be resolved in the tool definitions.
2018-10-03 15:55:57 +10:00
e44dfbbba5 Transform: enable shrink-wrap even offset by default
Holding Alt now disables.
2018-10-03 13:10:11 +10:00
fb8d268f62 Fix T56975: Transform incorrect w/ constraint 2018-10-03 12:23:55 +10:00
65e577d222 Dial 3d Gizmo refactoring.
Transform the gizmo's drawing function into a generic function for use in other parts of the code.
2018-10-02 23:00:29 -03:00
6a4bed75b2 RNA: Make various .add(count) a required arg 2018-10-03 10:20:55 +10:00
2de21113b9 RNA: curve points add(count) a required arg 2018-10-03 09:08:54 +10:00
2d37901941 RNA: fcurve keyframe add(count) a required arg
This matches mesh add methods, and doesn't force it to be a keyword arg.
2018-10-03 09:04:51 +10:00
9596dfc261 Extrude: add normal flip to mesh.extrude_context
Was giving errors on each access.
2018-10-03 08:34:50 +10:00
2497b2d202 Shrink/Fatten: change default 'even-thickness'
Accessing from the tool and keyboard had different defaults,
disable by default for both.
2018-10-03 08:28:36 +10:00
8ba4dd389b Fix gizmo tooltips ignoring preference 2018-10-03 08:20:07 +10:00
4c22807e69 Cleanup: style 2018-10-03 08:10:48 +10:00
Dalai Felinto
00c0e55227 Multi-Objects: TRANSFORM_OT_vertex_random
This was listed under the armature task yet it is used for meshes too.

Also make sure all the UI names are capitalized (normal > Normal).
2018-10-02 20:11:59 +00:00
Dalai Felinto
1fd8e183d0 Multi-Objects: Select similar armature: SIMEDBONE_LAYER
And final one as well.
2018-10-02 19:54:19 +00:00
Dalai Felinto
ecce4f49bb Multi-Objecs: Select similar armature: SIMEDBONE_PREFIX and SIMEDBONE_SUFFIX 2018-10-02 19:47:10 +00:00
Dalai Felinto
6b3ff1ec75 Multi-Objects: Select similar armature: SIMEDBONE_DIRECTION
Also added epsilon into the mix.
2018-10-02 19:46:16 +00:00
Dalai Felinto
e39d17096f Multi-Objects: Select similar armature: SIMEDBONE_LENGTH
Also added epsilon into the mix.
2018-10-02 19:46:16 +00:00
Dalai Felinto
821379e58d Multi-Objects: Select similar armature initial commit
This includes all the modes that don't need multi-object support:

* SIMEDBONE_CHILDREN
* SIMEDBONE_CHILDREN_IMMEDIATE
* SIMEDBONE_SIBLINGS
* SIMEDBONE_GROUP
* SIMEDBONE_SHAPE

Unlike the mesh select similar operator, in this case we take
only the active bone in consideration, not all the selected ones.

I decided not to change that, and keep this 2.79 behaviour.
We could though if we want to.
2018-10-02 19:45:46 +00:00
Dalai Felinto
dcc623e7e7 Multi-Objects: ARMATURE_OT_select_hierarchy 2018-10-02 17:39:11 +00:00
Dalai Felinto
27f2108e8a Multi-Objects: ARMATURE_OT_select_less and ARMATURE_OT_select_more 2018-10-02 17:39:11 +00:00
Dalai Felinto
2a7ccf6e88 Fix for POSE_OT_select_mirror
It was not taking duplicated objects into consideration, so the operator would
only work if you had an off number of objects with the same armature.
2018-10-02 17:39:11 +00:00
Dalai Felinto
8b2bcce3d2 Multi-Objects: ARMATURE_OT_select_mirror 2018-10-02 17:39:10 +00:00
9c02f6b1ed Fix (unreported) memleak with legacy IKsolver.
Looks like new depsgraph may initialize some IK trees, without ever
executing them (which also frees them with legacy IKSolver code)...
2018-10-02 18:00:42 +02:00
9d104f57b6 Addons: reactivate BVH and PLY format addons
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3758
2018-10-02 17:51:39 +02:00
c71577d195 RNA ID: add accessors to original ID, and a boolean stating whether it is evaluated or original data-block.
Since RNA depagraph API mostly returns evaluated data, it is mandatory
to have access to original datablocks now...
2018-10-02 14:14:50 +02:00
038c7a7f1e Depsgraph/RNA: add warning that all data from object instances iterator are COW data.
It is crucial that scripts do not write, and even more importantly, do
not store any references to those. Otherwise, that’s a rather straight
path to crash.
2018-10-02 14:14:50 +02:00
dcf1f891ea UI: Fix error in shading popover 2018-10-02 12:27:07 +02:00
0ec6ad027e Fix weight drawing in Edit Mode by using the Weight Paint shader.
After rB3da46a8d8df2 the vertex color shader can't draw the raw
weight data produced by DRW_cache_mesh_surface_weights_get.
2018-10-02 12:38:26 +03:00
ee05143078 Keymap: disable alt-comma for origin only transform
This is quite an obscure option only useful in rare cases,
when enabled by accident it's confusing since single objects
can't be transformed.

Also, w/ 2.8x you don't see the option change in the header.
2018-10-02 19:11:50 +10:00
dc689fe407 GP: Redo blur z-depth fix
The problem with previous fix was that only the original pixels were blurred, but the surrounding pixels no.
2018-10-02 11:09:44 +02:00
c03ceb0f61 Gizmo: scale xyz axis to 1.0
The normal and xyz no longer overlap so can be the same size.
2018-10-02 19:05:15 +10:00
9678bc3a29 Correct extrude shortcut and description
To get the toolbar Key binding, the same operator needs to be
referenced from the tool.
2018-10-02 18:51:43 +10:00
03b8d6ce54 GP: Cleanup shader 2018-10-02 10:31:49 +02:00
1a9d1317aa GP: Fix blur FX z-depth error
The z-depth must not be blurred, but use the original value.
2018-10-02 10:22:40 +02:00
d2519c2aa1 Gizmo: option to switch between normal/xyz widgets 2018-10-02 18:17:25 +10:00
6b51e15973 Cleanup: split extrude gizmo into own file 2018-10-02 17:34:27 +10:00
c14949e9ed Gizmo: move spin tool axis option into gizmo-group
Having this setting here wasn't correct (the operator ignores it).
2018-10-02 17:09:53 +10:00
07d4580f64 Gizmo: support for gizmo-group properties
This allows gizmo groups to store properties in the tool.
This makes sense for gizmo options which only control gizmo display and
don't control operator execution.

Unlike similar kinds of properties,
this isn't accessible via the gizmo-group-type instance.

For now the it's only stored in the workspace tool as can be done for
operator properties, so each instance doesn't have different settings
which would be confusing from a user perspective and complicate access
from the top-bar.

Later we could add gizmo-group properties if needed.
2018-10-02 17:03:23 +10:00
dce12293d0 WM: generalize tool property initialization
Prepare for storing different kinds of properties in tools.
2018-10-02 15:39:20 +10:00
0e7a592c3c WM: report error w/ unknown operator name 2018-10-02 15:28:14 +10:00
5db328c063 Correct extrude tool operator references
Caused incorrect tooltips.
2018-10-02 15:17:00 +10:00
1e526de9bd Merge branch 'master' into blender2.8 2018-10-02 11:19:11 +10:00
bf37c93533 Correct tooltip 2018-10-02 11:17:31 +10:00
60d4d58376 Fix T56990: AutoIK fails
Regression from 5d628c519
2018-10-02 10:10:26 +10:00
3aed08377d GPY Python: program_use_begin and program_use_end.
The user has to be encouraged to use the `program_set` or `program_set_builtin` before drawing.
This avoids problem with gl_context.
2018-10-01 13:58:51 -03:00
b77191c035 UI: Fix Xray alpha slider being incorrectly greyed out 2018-10-01 18:56:26 +02:00
8ed17c37c5 DRW: Fix unselectable wire object in solid mode 2018-10-01 18:56:26 +02:00
238d30169f Templates: tweaks to startup templates, add sculpting template. 2018-10-01 17:32:59 +02:00
ac0dfcced3 UI: start maximized on X11 if possible, like other platforms. 2018-10-01 17:29:48 +02:00
f40ff62647 Fix app template __init__.py not running without a userpref.blend. 2018-10-01 17:16:43 +02:00
6afd5292e2 Fix Cycles Python warnings related to annotations. 2018-10-01 17:16:43 +02:00
fd0250f1bc UI: collapse some paint / sculpt panels by default. 2018-10-01 17:16:43 +02:00
057f2a1878 UI: use backdrop circle for navigation icons, make clickable area bigger.
This will look a bit better once the icon outline is gone.
2018-10-01 17:13:08 +02:00
ffcc4be3bb GP: Change Blur default parameters for Rim and Shadow effects. 2018-10-01 16:42:12 +02:00
a3afcae39e GP: Add Blur to Shadow FX
The shadow needed a blur to make soft transitions and get a better effect.
2018-10-01 16:31:04 +02:00
c234c3db1b UI: Update theme colors for pie menu selected items 2018-10-01 15:28:47 +02:00
832f5d36e5 UI: Color the inside of pie menu items when selected
Follows the same as other selected/active items in the UI.
Tested in Default theme, 2.7x, 2.4x, Flatty Light and Amaranth
all seem to work fine.
2018-10-01 15:28:47 +02:00
212ce03aaf Edit UVs: Fix missing wires with multiple windows
All that was needed is a VAO refresh. It's not a performance problem
because it only concerns a handful of batches.
2018-10-01 15:14:46 +02:00
283f0ae9af Edit UVs: Refactor drawing Shadow UV in Image Editor
Currently it's not showing the subdivided mesh (if there is a subdiv mod)
and there is some sync issue if there is multiple uv image space opened.
But thoses will be tackled later on. The purpose of this commit is to fix
the overflow issue of IMM and speed issue.
2018-10-01 15:14:46 +02:00
3a9ee33328 GPU: Fix partial draw of batches with index buffers 2018-10-01 15:14:46 +02:00
781995a09c Edit UVs: Refactor drawing Edit UV in Image Editor
NOTE: This commit only concern edit UVs and not the "shadow" mesh displayed
when texture painting. This will be address in a future commit.

We now cache the uv mesh in the mesh batch cache and only reupload data on
changes.

Update could be more granular (and a bit faster) but it's not our main
concern ATM.

This should fix problem caused by the IMM api used to draw large meshes.
This makes performance skyrocket compared to previous implementation.
There is still a big CPU bottleneck when not in sync selection mode but it
is not related to the drawing function directly.
2018-10-01 15:14:46 +02:00
a5101de6a9 BLI: Add mul_v2_v2v2 function 2018-10-01 15:14:46 +02:00
e38a0b3748 Shrinkwrap Constraint: implement projection features from the modifier.
Allow raycasting in two directions and culling front or back faces.

Also implement a new Invert Cull option in both constraint and
modifier that can be used to aim for faces aligned with the project
axis direction when raycasting both ways.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D3737
2018-10-01 15:47:03 +03:00
be0e58d980 GP: Fix Shadow rotation bug 2018-10-01 11:36:18 +02:00
534009098e Remove obsolete weight paint color computation code.
The new weight paint drawing code converts weight to color
directly in the shader, so the old CD_PREVIEW_MLOOPCOL based
code is not needed anymore.
2018-10-01 11:02:24 +03:00
d64e60340f 3D View: use context mode string for sidebar
When moving panels from the toolbar to the sidebar,
'bl_context' is now used for filtering panels in both places.
2018-10-01 16:58:28 +10:00
c06333d77b Object Join: use 'selected_editable_objects'
Was using 'selected_editable_bases', which used to save a lookup.
This is no longer the case and complicates access from Python
which cant yet easily access Bases.
2018-10-01 16:45:57 +10:00
786870e26f Fix T56909: wrong interface scale on macOS 10.14, when using 10.14 SDK.
This does not affect existing releases as far as I can tell, only new builds
using the new SDK have the problem.
2018-10-01 08:35:32 +02:00
5fca5c8065 Merge branch 'master' into blender2.8 2018-10-01 14:06:24 +10:00
d6ca699d7e BLI_math: add isect_seg_seg_v3 2018-10-01 13:52:00 +10:00
9df476ecaa BLI_math: add isect_seg_seg_v3 function and use in the cloth collision algorith.
In my tests a 4% improvement in performance was achieved by simulating a square cloth over the cube.
2018-10-01 00:16:44 -03:00
1f2c4f8809 Cleanup: use standard prefix for boolean settings
Avoid using 'add' as a prefix, it reads like a method.
2018-10-01 12:00:08 +10:00
12c49d05c6 Fix freed memory use w/ panel unregister 2018-10-01 10:32:48 +10:00
bda7a333a3 Cleanup: use tuple unpacking 2018-10-01 09:20:32 +10:00
0256d8b4e2 Cleanup: pep8, unused import 2018-10-01 09:20:32 +10:00
8ee4fd0bdf Cleanup: style 2018-10-01 09:20:31 +10:00
3cd98d9ef7 Fix T56981: python .scene_raycast returned object is not selectable.
Was returning COW evaluated object, not actual data-block...
2018-09-30 23:54:11 +02:00
3a09ff77a1 Fix T56879: Blender2.8 Crash when Editing Text on Curve.
Moving cursor in 3D text edit mode calls `BKE_vfont_to_curve_ex()`,
which expects to work with evaluated data (curve cache runtime etc.).
2018-09-30 21:37:32 +02:00
bbd3ac73bc Fix T56396: Cycles wrong object motion blur with deformation blur disabled. 2018-09-30 19:34:34 +02:00
0722981e99 Fix T56909: wrong interface scale on macOS 10.14, when using 10.14 SDK.
This does not affect existing releases as far as I can tell, only new builds
using the new SDK have the problem.
2018-09-30 19:33:41 +02:00
40f10fe11a GP: The primitive line must not enable cyclic mode 2018-09-30 18:45:45 +02:00
da032bdf23 GP: Cleanup and remove old debug code 2018-09-30 18:26:50 +02:00
5c184c4fec Fix T56984: GP: Materials: Isolate (lock/visibility) buttons don't work. 2018-09-30 17:36:07 +02:00
0bb9ebd058 io_utils: remove orientation_helper_factory.
Now we only use orientation_helper decorator.
2018-09-30 17:30:29 +02:00
ec06532cef GP: New option to disable lasso while drawing
Now it's possible to disable the lasso effect of the fill color while drawing with a fill color.

This sometimes is required to see the lines and it's the first step to implement a new lasso brush.
2018-09-30 16:21:28 +02:00
60935cb9d8 GP: Ensure falloff curve is always initializated 2018-09-30 15:59:10 +02:00
8c3077ff94 Fix T56970 GP: Sculpt mode : Grap tool doesn't work 2018-09-30 13:54:23 +02:00
419fd80d46 GP: Fix error in mutiedit if curve is not available 2018-09-30 12:54:17 +02:00
4a72408124 GP: Do not use UI pixel scale for strokes
This scale value only must affect the interface, but never the stroke.
2018-09-30 11:49:02 +02:00
f1afa6f6a7 GP: implement Shadow FX (wip)
Initial implementation of effect to create a drop shadow of the strokes
2018-09-30 11:49:02 +02:00
d9f6fdae4b Add Image Operator: minor tweaks
- Use exception message on error.
- Use 3D view cursor location (for local view).
2018-09-30 17:55:39 +10:00
f36efe0e2a Fix mysterious crash when using textureGather on Intel drivers.
The crash occurs in a shader with uniform block of a certain size and misaligned.
2018-09-29 16:56:47 -03:00
7e26991472 GP: Fix Thickness modifier error for strokes with few points 2018-09-29 18:07:54 +02:00
Dalai Felinto
3fe56ee8e7 Fix mixed drawing face and edge checks in draw manager 2018-09-29 12:22:44 -03:00
631ddc5acc GP: New parameters for instance modifier: Material and On Top
Now it's possible to define what material is used in the generated strokes and if the strokes are put in front of the original (default) or keep the original in front.

Before, the generated strokes have been always on top of the original because they were drawn later.
2018-09-29 16:54:16 +02:00
2ca67de960 A new function to move list at the beginning of another list
This is a change of the BLI_movelisttolist but in reverse order.
2018-09-29 16:45:33 +02:00
Dalai Felinto
0f9b7560db Multi-Objects: ARMATURE_OT_switch_direction 2018-09-28 19:11:27 -03:00
Dalai Felinto
3a8b56ce24 Multi-Objects: ARMATURE_OT_armature_layers 2018-09-28 19:06:07 -03:00
Dalai Felinto
1eb26680d4 Expose armature.dissolve to the menu
Following the vertice delete menu logic here, where delete needs no verb
and the special case (dissolve here) gets the full verb + noun)

Note: This operator wasn't even listed in the T54646 task. I suspect other
operators may share the same fate.
2018-09-28 18:53:29 -03:00
Dalai Felinto
bfb0ebc3d1 Multiple-Objects: ARMATURE_OT_dissolve 2018-09-28 18:43:23 -03:00
Dalai Felinto
47cf8bd928 Multiple-Objects: ARMATURE_OT_flip_names 2018-09-28 18:23:32 -03:00
Dalai Felinto
f4fe3f1975 RNA: Cleanup - remove no longer needed get/set functions
Left over from rBbdbf4471a6c4ba2d444eea5e7f0e6984b3aaafc2.
2018-09-28 16:54:17 -03:00
Dalai Felinto
fc96283c1c Fix painting clone ui/rna not working 2018-09-28 16:34:12 -03:00
0c6103557a GP: Fix Fx Wave options panel
The orientation was layout vertical
2018-09-28 18:56:15 +02:00
Dalai Felinto
c87d6048b9 Multi-Objects: Fix edit mesh texts drawing in the wrong place
It was always drawing on the active object localspace.
2018-09-28 13:40:51 -03:00
637d938c0b Fix T56396: Cycles wrong object motion blur with deformation blur disabled. 2018-09-28 18:24:19 +02:00
Dalai Felinto
62aee662ae Fix errors for show_occlude_wire not in view3d.overlay 2018-09-28 12:31:25 -03:00
Dalai Felinto
ffb424c85f Multi-Objects: MESH_OT_sort_elements
Based on D3330 by Falk David
2018-09-28 12:31:25 -03:00
Dalai Felinto
8a06249058 Fix wireframe threshold not active on wireframe mode 2018-09-28 12:31:25 -03:00
0e7742d604 Templates: tweaks to 2D animation template from grease pencil team. 2018-09-28 17:28:23 +02:00
a01afe04b0 GP: Remove Shader FX use_property_split to keep UI consistency
In order to get the same look and feel of modifiers, we need disable this single column option.
2018-09-28 17:25:35 +02:00
3037acf375 GP: Remove show lines from Pixelate effect
The grid lines get a weird result and it's better keep disabled. Maybe in the future we implement a new shader with a full grid.
2018-09-28 17:20:00 +02:00
c78d83bca7 GP: Set pixel shader fx lines to OFF by default 2018-09-28 16:52:20 +02:00
0d2c95a77a GP: Make Layer and Material lists shorter
This reduces UI vertical space.
2018-09-28 15:47:53 +02:00
Dalai Felinto
0f03750f4f Cleanup: Remove bmo_similar.c and small renaming 2018-09-28 10:32:04 -03:00
Dalai Felinto
75b2091d42 Multi-Objects: Select similar vertex: SIMVERT_VGROUP
I'm storing the name of the vertex groups in a gset. This way
we can select vertex groups with the same name across different
objects.

Also this is the last select similar mode that needs porting o/
2018-09-28 10:25:23 -03:00
d2d0b4fcd7 Merge branch 'master' into blender2.8 2018-09-28 15:03:03 +02:00
de3ee3c6e8 Cycles: Fix compilation error of CUDA kernel
Was caused by previous commit.
2018-09-28 15:02:44 +02:00
3341d42ad5 Fix T56947: Copy text from disabled search menu crashed
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3745
2018-09-28 14:12:25 +02:00
6dd047c333 Tests: recurse into directories for finding OpenGL draw test .blends. 2018-09-28 14:09:42 +02:00
9e8c0d061c GP: Remove add/delete buttons from topbar material popover 2018-09-28 14:01:52 +02:00
b880c13c3a Merge branch 'master' into blender2.8 2018-09-28 13:58:30 +02:00
b030277e79 Cycles: Fix crash with BVH8 on certain scenes
The crash was caused by BVH traversal stack being overflowed.

That overflow was caused by lots of false-positive intersections
for rays originating on a non-finite location.

Not sure why those rays will be existing in the first place,
this is to be investigated separately.

This commit moves pre-SSE4.1 check to a higher level function
and enables it for all miroarchitectures.
2018-09-28 13:57:50 +02:00
45271007cf Fix T56905: unsupported channel layout error writing AAC audio.
This uses same mapping as Audaspace to specify channel layout, which was
missing before.
2018-09-28 12:07:05 +02:00
a33034cc3f UI: move messages and running jobs to top bar.
It's too easy to miss at the bottom of the screen, and if the status bar is
collapsed critical messages may not be seen at all. There might be a better
looking solution, but for now this solves the main usability problem.
2018-09-28 11:05:04 +02:00
c3052f9126 Fix merge error, this should have been included from master. 2018-09-28 10:47:11 +02:00
29c8c6cf4f Fix T56940: crash rendering with OpenGL as engine. 2018-09-28 10:39:20 +02:00
89264d8c40 Make struct initialization happy for CLang 2018-09-28 10:13:56 +02:00
c72770d1cb Subdiv: Return enumerator of proper type
Was harmless, that code is never to be reached.
2018-09-28 10:13:18 +02:00
763c78fccb Fix/workaround stupidity of CLang
Seems there is something wrong with ternary operator
and type deduction.

Copying matrix to a variable with cleaner name seems
to be better solution than to force cast to an array.
2018-09-28 10:11:28 +02:00
6398e6608f GPencil: Avoid tautology assignment
This is considered a warning which is usually promoted to
error in developers' environment.

Probably worth adding an assert or so, if possible?
2018-09-28 10:10:25 +02:00
ee1b2cce5f CMake: Default to C11 for Clang and GCC
The option WITH_C11 is gone, and C++ is defaulting to C++11 now,
so guess it's fine to assume we need C11 now.

This is technically what we use anyway, with all the re-definitions
of structs (like when we typedef anonymous struct in a header file
first, and them define it to a proper structure in implementation
file).
2018-09-28 10:09:46 +02:00
fa6b0cdc79 GPencil: Use proper enumerator type
Was using GpencilModifierType in type definition,
but rest of usage was using values from GpencilModifierTypeType.
2018-09-28 10:04:31 +02:00
e26620337a Merge branch 'master' into blender2.8 2018-09-28 09:47:02 +02:00
81f68bbba1 Fix compilation errors and warnings with Clang-6 2018-09-28 09:46:12 +02:00
6f42eb245b Python IO: Initial nodal shader support for import AND export.
That new bpy_extras' node_shader_utils module is remotely based on
existing addons' cycles_shader_compat module. It has some key
differences though:
 - It is based on Principled shader, instead of the noodle combination
   of half a dozen simpler shaders.
 - It does not do any value conversion (like e.g. clamping, which was
   only suited for FBX). Any conversion/adaptation is to be done
   by each IO add-on.
 - It extensively uses accessors to offer:
   - Easy read/write of values, hiding all the hairy noodly nodes
     (principled shader helps a lot here).
   - lazy creation of most nodes on accessing (when generating a
     material), which avoids getting unused nodes in final shader.
 - We only use Principled BSDF so far though, which means some features
   supported by previous system are not yet implemented in new one.

Note that, even though we support 'exporting' side of things, this will
only work for a very specific (and basic) kind of shader. This will have
to be clearly explained in end-user documentation.

Also, that code has had some basic testing, but most certainly needs a
lot more refinement.

As proof-of-concept, OBJ IO script will be updated to use that new
system after that commit.
2018-09-27 23:32:56 +02:00
69c9266d81 GP: Expand properties material list 2018-09-27 22:10:39 +02:00
a914159f62 GP: Expand properties layer list 2018-09-27 22:08:27 +02:00
b3cb4eaa03 GP: Remove separator line in materials submenu 2018-09-27 22:06:47 +02:00
2b6cbc8c43 GP: Remove material submenu icons
The icons made too heavy for the UI
2018-09-27 22:05:32 +02:00
3988c5b93a GP: Expand topbar layers list 2018-09-27 22:03:50 +02:00
1bd81babbd GP: Make materials topbar list longer 2018-09-27 21:11:13 +02:00
bb06598fd6 GP: Reorganize topbar material selector 2018-09-27 20:50:22 +02:00
Sebastian Parborg
a16e5b8efa Cleanup: remove unused DerivedMesh code.
Differential Revision: https://developer.blender.org/D3736
2018-09-27 20:19:28 +02:00
975a40dceb Merge branch 'master' into blender2.8 2018-09-27 20:12:14 +02:00
6baea955bf UI: use new 3D viewport navigation icons and image icon in add menu.
I had to make the viewport navigation icons a bit smaller in the SVG since
the edges were being clipped off, we only support 16x16 icons currently.
They are a bit blurry because of this.
2018-09-27 20:11:10 +02:00
0b4c440baa UI: add first batch of monochrome icons designed by Andrzej Ambroz.
Currently only for simple commands like play, add, zoom, expand, etc.
2018-09-27 18:41:27 +02:00
28324143c4 UI: draw mono icons with button type text color, instead of area text color. 2018-09-27 18:39:50 +02:00
99fa874c85 Fix blender_icons_update.py not working after mono icon changes. 2018-09-27 18:39:50 +02:00
37d88fdb86 GP: Remove old annotation panel from Image editor
This has been replaced with tools.
2018-09-27 18:03:13 +02:00
beb91b5f41 GP: Enable force fill recalc by default 2018-09-27 17:39:16 +02:00
18262bcb1e Fix missing libquery processing of ID pointers in GPencil Modifiers.
...
2018-09-27 16:34:45 +02:00
3da46a8d8d Implement a new dedicated weight painting shader.
Move the weight paint drawing to the fragment shader. The shader
uses a texture that uses the U.coba_weight custom color band, or
an internal color band.

In addition to actual weights, the shader has to display two
alert colors: missing vertex group, and zero weight. The zero
weight alert has to be blended with regular weight colors,
so that a single alert vertex surrounded by weighted ones is
still visible.

Reviewers: campbellbarton, fclem

Differential Revision: https://developer.blender.org/D3675
2018-09-27 17:33:33 +03:00
6791d95b1d Empty Object: new "Load Image as Empty" operator
New entry in the Add Object menu.
Opens a file selector and creates a new empty object from the selected image.
Previously more steps were needed to archieve the same.

Differential: https://developer.blender.org/D3708

Reviewer: brecht
2018-09-27 16:21:51 +02:00
a3fea39724 Fix T56915: Selectability in Solid Xray Mode
This was caused by the object center being selected by the wireframe pass.

The wireframe pass is now only drawn if we search for the nearest surface.
This makes all wire objects (like non-meshes objects) higher priority than
mesh surfaces.
2018-09-27 16:09:27 +02:00
efc4862ee6 Refactor: Copy/Paste values from/to UI
Previously copy and paste was handled within the same function using a mode switch, which is quite ugly in most cases.
This patch separates the function into two and splits up those in even smaller functions to increase maintainability.

Finally one new feature was added: You can copy from disabled fields now. (requested by hjalti)

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3738
2018-09-27 16:06:24 +02:00
bd267b0332 Fix cycles_cubin_cc build error on macOS. 2018-09-27 15:59:14 +02:00
58adc58661 Merge branch 'master' into blender2.8 2018-09-27 15:49:59 +02:00
a247b53084 Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3732
2018-09-27 15:36:35 +02:00
0f6b2504f8 Cleanup: fix harmless compiler warnings. 2018-09-27 15:33:44 +02:00
e8e2f51063 Fix CUDA build with Xcode 10.0, use nvrtc due to incompatible compilers. 2018-09-27 15:20:33 +02:00
4de1e673a4 Merge branch 'master' into blender2.8 2018-09-27 14:51:33 +02:00
8f9a6b1bab Cycles: Cleanup 2018-09-27 14:49:37 +02:00
bee16ec4d8 Cycles: Sync BVH8 unaligned node packing code with BVH4
Similar to dfae3de6bd.
2018-09-27 14:49:12 +02:00
1472550ba1 UI: new clip editor panels and headers layout.
* Panels now use single column layout.
* Footage Info was moved into Footage Settings.
* Display settings are now in a popover in the header.
* Graph view shows tracking controls in the header center.

Differential Revision: https://developer.blender.org/D3643
2018-09-27 14:15:10 +02:00
e9a38c50d9 UI: update camera background images panel layout.
Differential Revision: https://developer.blender.org/D3739
2018-09-27 14:14:05 +02:00
f35cc54c11 GP: Avoid duplicated weight deformation for strokes
If the point had several weights, the result could be wrongly accumulated.
2018-09-27 14:12:37 +02:00
250a377592 Partial revert of recent toolsystem defaults
- Use ctrl for de-select since we may want to use shift for extend.
- Use cursor tool by default,
  it's agreed lasso select isn't accessible from a shortcut by default.
2018-09-27 21:19:45 +10:00
14e7fcfdde Cleanup: warnings 2018-09-27 21:15:55 +10:00
2a63e062b0 Tests: add --no-window-focus to open window without focus.
This is useful to run OpenGL tests while continuing to do other tasks
without windows constantly popping up in the foreground.
2018-09-27 12:21:48 +02:00
c722728b7f Fix T56927: Grease pencil materials issues with lock and hide 2018-09-27 12:07:43 +02:00
358d8c14d8 GP: Fix infinite loop in Dope Sheet 2018-09-27 11:11:33 +02:00
c67305f21b UI: Use "View" category for 3D view panels
Allows add-ons to add other categories.
2018-09-27 16:35:43 +10:00
5f7c671c56 UI: Tabs on right w/ right aligned regions 2018-09-27 16:35:43 +10:00
5afe91c504 Fix missing free 2018-09-27 16:35:43 +10:00
da96336e5f Python GPU module: Wrap GPUIndexBuf
Differential Revision D3714
2018-09-27 00:53:45 -03:00
1e647a570d Python GPU module: replace PyArg_ParseTupleAndKeywords by _PyArg_ParseTupleAndKeywordsFast
part of T47811 ("for faster argument parsing").
2018-09-27 00:22:57 -03:00
d559eaffd4 Cleanup: remove star import 2018-09-27 13:27:53 +10:00
08f9cd3218 Tool System: expose rotate-source for click-extrude 2018-09-27 12:23:01 +10:00
e2b6a59317 Merge branch 'master' into blender2.8 2018-09-27 11:53:08 +10:00
09c7bfe42b Spin Tool: hide options unrelated to duplication 2018-09-27 11:52:21 +10:00
06846efdb0 Keymap: use shift to de-deselect for tools
This allows for Ctrl-LMB
to be used for lasso even with Border-Select active.
2018-09-27 11:31:41 +10:00
ed83075402 Tool System: set a default tool for each mode
Also clear tools for the default startup file
so changes to defaults apply to new files.
2018-09-27 11:20:27 +10:00
6ebe211644 Cleanup: pep8 2018-09-27 09:41:18 +10:00
c5c987cde9 Cleanup: flip option unlock -> lock
Nearly all options are currently to toggle locking.
2018-09-27 08:51:47 +10:00
5732d9e1dc Wireframe/Xray: Make Xray option local to wireframe mode
This commit make the Xray option for the wireframe different from the other
shading mode. This makes it possible to rapidly switch between wireframe +
Xray and Solid mode without Xray.

Xray alpha is also decoupled.

Both variables are duplicated and exposed separately through RNA.
2018-09-26 20:31:20 +02:00
ebd234eee5 UI: switch shortcuts for pivot and orientation pie menus.
Pivot is now period key, orientation is comma key.
2018-09-26 18:40:30 +02:00
William Reynish
ad3fb94ccf UI: keep some buttons fixed size in 3D view header. 2018-09-26 18:24:34 +02:00
cbe82f81e1 UI: allow fractical unit size for layouts. 2018-09-26 18:24:09 +02:00
William Reynish
b2a569dd68 UI: use pie menu for snap, pivot and proportional editing.
* Proportional pie menu at shift+O.
* Snap pie menu at shift+S.
* Pivot pie menu at comma. Previous comma, ctrl+comma, period
  and ctrl+period shortcuts for specific pivot types were removed.

Ref T56881.
2018-09-26 18:24:09 +02:00
c0b9a4a86e Depsgraph: Add missing relation for spline IK
Solver should clearly depend on initializaiton.
2018-09-26 18:16:55 +02:00
0666ece2e2 Cloth: Collision improvements
This commit includes several performance, stability, and reliability
improvements to cloth collisions.

Most notably:
* The implementation of a new self-collisions system.
* Multithreading of collision detection.
* Implementation of single sided collisions and normal overrides.
* Replacement of the `plNearestPoints` function from Bullet with a
dedicated solution.

Further, this also includes several bug fixes, and algorithmic
improvements.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D3712
2018-09-26 17:49:40 +02:00
a27d97d1b7 Addons: reactivate 'STL format' addon
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3735
2018-09-26 17:32:46 +02:00
586ec7588f Cleanup: Edit Surface & Curve engines unused code 2018-09-26 16:42:57 +02:00
f7a81abe19 Edit Surface: Use edit curve engine to display edit surface
It's so similar in practice that we don't need a separate engine for edit
surface overlays.
2018-09-26 16:42:57 +02:00
1407a11138 Edit Curve: Fix "show handles" option hiding nurbs segments 2018-09-26 16:42:57 +02:00
e16afa5c73 GP: Only check annotation origin for 3D View 2018-09-26 16:25:11 +02:00
1cdf136846 GP: Rename parameter unlock_color and tooltip 2018-09-26 16:17:54 +02:00
9ac5eae433 GP: Fix unreported crash when click+drag in edit mode 2018-09-26 16:07:44 +02:00
150cba73c9 GP: Change menu icons for hide/show 2018-09-26 16:01:01 +02:00
3378782eee Implement additional modes for Shrinkwrap to a surface.
In addition to the original map to surface and Keep Above Surface,
add modes that only affect vertices that are inside or outside
the object. This is inspired by the Limit Distance constraint,
and can be useful for crude collision detection in rigs.

The inside/outside test works based on face normals and may not be
completely reliable near 90 degree or sharper angles in the target.

Reviewers: campbellbarton, mont29

Differential Revision: https://developer.blender.org/D3717
2018-09-26 16:52:58 +03:00
310f1b0579 GP: Fix unreported change material operator error
The first material of the list could not be assigned.
2018-09-26 15:49:46 +02:00
81a7d3cd07 Fix T56926: Highlighted selection doesn't disappear when locking layer 2018-09-26 15:28:11 +02:00
280de3df07 Multires: Use proper subdivision level for reshape
Apparently, part of code got lost last minute prior to push.
2018-09-26 15:08:04 +02:00
e4284d06ad Fix T56899: mesh deform bind does not work. 2018-09-26 14:51:08 +02:00
dc316f72b3 Multires: Promote OSD CCG to be officially supported
Only active when WITH_OPENSUBDIV_MODIFIER is set to ON.

There is still some work to be done to make that one enabled by
default.
2018-09-26 14:42:16 +02:00
6fc798e049 Subsurf: Tweak versioning code
Select minimum of render subdivision levels and 3 for
the initial value of quality. This way we don't force
too much quality for meshes which were not supposed to
be too much quality :)
2018-09-26 14:42:16 +02:00
619961df3a Fix crash opening some old files, after recent changes. 2018-09-26 14:24:26 +02:00
5d3c815c2f Revert "Compositor: Added Weighted Standard Curve evaluation"
This reverts commit b8c9df6f21. The code is not
correct with regards to color management, and its purpose was not documented.
2018-09-26 14:24:13 +02:00
d06d1937ef GP: Check weight data before using it 2018-09-26 13:12:49 +02:00
2e9b86923c Fix T56920: Crash: Renaming bone through outliner 2018-09-26 12:50:24 +02:00
6d3e42ccbd Cleanup: Silence strict compiler warning
Was happening when using OSD for modifiers.
2018-09-26 11:54:19 +02:00
de811518c0 OpenSubdiv: Cleanup, the TODO was actually solved 2018-09-26 11:52:06 +02:00
b125bd7e0e Clip editor: Fix usage of template_marker
Needs an update to the new Python API.

Reported by Sebastian in IRC, thanks!
2018-09-26 11:29:21 +02:00
12c664f7fb GP: Adjust topbar layer selector to new fixed width 2018-09-26 10:49:46 +02:00
3a15834d63 OpenSubdiv: Cleanup 2018-09-26 10:21:34 +02:00
d599368cd4 Fix access past array boundaries
Need to resize `have_functions` arrays when adding more functions.
Not sure there is more reliable way which will prevent accidents
like this.

Was caused by c47be43674.
2018-09-26 10:14:25 +02:00
c67a51db42 Gizmo: initial snap support for move
This allows the gizmo to snap to 3D view elements,
Although currently this isn't usable gizmo's that use operator redo.
2018-09-26 17:38:09 +10:00
4a6ee9c4c2 Gizmo: support for cancelling move3d modal changes 2018-09-26 16:44:45 +10:00
d1bac6f70d Spin Tool: match dial orientation to active gizmo 2018-09-26 16:31:31 +10:00
c47be43674 Gizmo: add invoke_prepare callback
Allows gizmo groups to set values based on the gizmo about to be invoked.
2018-09-26 16:31:31 +10:00
bb8023ff7f Fix misleading field naming.
This is not any kind of length, it is the number of true values.
2018-09-26 09:05:13 +03:00
f5c4cc877e Spin Tool: option (disabled) for gizmos to follow selection
Disable since this causes multiple axis to overlap too often.
It's also glitchy since we don't have a good way to detect
changes to selection.
2018-09-26 14:36:23 +10:00
bd79ea03cb Correct error in last commit
Didn't account for non-identity orientation.
2018-09-26 13:30:15 +10:00
12cfa13470 Spin Tool: correct the initial redo dial rotation 2018-09-26 13:08:02 +10:00
77b381bd35 Merge branch 'master' into blender2.8 2018-09-26 11:42:38 +10:00
63658ae76d Cleanup: redundant include 2018-09-26 10:55:22 +10:00
07747bcd67 Merge branch 'master' into blender2.8 2018-09-26 10:30:34 +10:00
c72380a427 Merge branch 'master' into blender2.8 2018-09-26 10:28:23 +10:00
Dalai Felinto
c29d18c4c8 Multi-Objects: Selects similar face SIMFACE_COPLANAR
Unlike 2.79 I am not using the comparison type to get coplanar planes that are above/below the plane.
That seems arbritary at best, and a bit of a challenge to get it right.

Also, I'm doing some shenanigans to use a single tree to store the face direction and the distance.
Here in my tests it is working fine though.
2018-09-25 21:10:46 -03:00
741ed1029e Cleanup: naming of DRW mesh weight API 2018-09-26 10:16:17 +10:00
e40870c479 Cleanup: warnings, style 2018-09-26 10:01:32 +10:00
34d98cfe61 BMesh: spin option to merge first/last
For 360d revolutions this is almost always whats intended,
enable by default.
2018-09-26 09:55:17 +10:00
Dalai Felinto
c419cb7305 Multi-Objects: Select similar face SIMFACE_FACEMAP
Facemap is per object, so we store them in a gset per object, and only check the object
faces with its own facemaps.
2018-09-25 19:58:03 -03:00
Dalai Felinto
235c51f11a Remove wrongly copy/pasted comment on object_facemap_ops.c 2018-09-25 19:58:03 -03:00
682c64d3e1 Curve Edit: Fix handles glitch when MSAA is enable 2018-09-26 00:49:50 +02:00
5158da9e37 Curve Edit: Cleanup/Improve/Fix handles drawing
Now handles are drawn using index buffer instead of duplicating memory
requirement.

Also make use of shader tricks to draw handles antialiased, and respond to
UI scalling.

Make vertex point match edit mesh vertex size.
2018-09-26 00:49:50 +02:00
Dalai Felinto
c9d0873e90 Multi-Objects: Select similar face SIMFACE_FREESTYLE
Note: 2.7x seem to be checking for edge data instead of face, but I do not see why not to get FreestyleFace.
2018-09-25 19:18:30 -03:00
Dalai Felinto
424bb2ebdc Multi-Objects: Select similar face SIMFACE_SMOOTH 2018-09-25 19:18:30 -03:00
Dalai Felinto
f59b968cef Multi-Objects: Select similar face SIMFACE_NORMAL
We could/can deduplicate the code with SIMVERT_NORMAL.
2018-09-25 19:18:30 -03:00
Dalai Felinto
c32b63f8fd Multi-Objects: Select similar face SIMFACE_AREA and SIMFACE_PERIMETER
Note: Not doing worldspace comparison for now. We would need to create new
BM_face_calc_area and BM_face_calc_perimeter equivalent functions for that.

Not sure if it is worth the trouble.
2018-09-25 19:18:30 -03:00
Dalai Felinto
3618646e71 Multi-Objects: Select similar face SIMFACE_MATERIAL
Note: Unlike 2.79 we are not comparing face->mat_nr, but the material itself.
On top og that, if the material slot is empty we are just ignoring this face.
2018-09-25 19:18:30 -03:00
Dalai Felinto
8990ad1b9c Multi-Objects: Select similar face SIMFACE_SIDES 2018-09-25 19:18:30 -03:00
Dalai Felinto
b75648694c Cleanup comments on select similar edge 2018-09-25 19:18:30 -03:00
Dalai Felinto
ebe955b1c8 Fix memleak on edbm_select_linked_pick_invoke
Issue introduced on 549ac6ddeb.
2018-09-25 19:18:30 -03:00
Dalai Felinto
5a6b46f0ca Remove warnings 2018-09-25 19:18:30 -03:00
311db0e9f0 Edit Curves: Fix warnings due to recent changes 2018-09-25 23:04:41 +02:00
Dalai Felinto
9dbf71adb8 Code style cleanup after recent object drawing > viewport changes 2018-09-25 17:56:14 -03:00
0c21773199 Edit Curve: Fix cannot hide handles 2018-09-25 22:51:54 +02:00
2cff9b4cb6 Curves: Move draw options to overlays
This commit add one regression: it is impossible to currently hide handles
in the viewport. But this should be fixed in another commit.
2018-09-25 22:51:54 +02:00
05d0e5315b Weight Paint: Fix weight paint overlay not displaying correctly
This was because weight paint was using the original obj to show weights.
But the mesh can be deformed by the armature and this is not visible on
the original object.
2018-09-25 22:51:54 +02:00
9f6978a1ba Eevee: Don't render meshes in hidden wire mode 2018-09-25 22:51:54 +02:00
a3bb385ca0 Edit Mesh: Move Edit Mesh display settings to overlay's
This makes the Edit Mesh display settings common to all objects. They can
also be set differently per viewport.

Modifying extra data (seams, sharp edges etc...) will no longer set them
automaticaly visible.

Bumping version because we need to force set all extra draw options for
older files.
2018-09-25 22:51:54 +02:00
7cc9998809 Edit Mesh: Center text when Edge length & Edge Angle is activated
This is more readable as the informations will never overlap and be off the
center of the edge.
2018-09-25 22:51:54 +02:00
Dalai Felinto
75eb947275 Multi-Objects: Select similar edge SIMEDGE_CREASE and SIMEDGE_CREASE
All edge options are done now.
2018-09-25 16:36:02 -03:00
f4f99d1d75 Add fixed width/height parameter for layouts
New parameters to define a fixed size for a layout. This allows to avoid UI changes when the text length changes.

This commit implements D3725
2018-09-25 20:59:04 +02:00
0f7e858f06 GP: New pressure option for sculpt brush radius 2018-09-25 20:43:50 +02:00
9df3467b4e GP: Add const to variable 2018-09-25 20:23:55 +02:00
e3f3a8101a Fix T56917: GP noise modifier vertex group crash 2018-09-25 19:48:57 +02:00
4ad3182eb1 GP: Fix multi viewport onion error
For onion skin, the cache is set as dirty always because can be too many combinations of overlays and windows and makes impossible to control all changes of dirty flag.

This reduces performance, but it's safer and the onion is disabled while play animation, so the fps value is not affected.
2018-09-25 19:30:50 +02:00
fcf3aa90da CMake: Repress deprecation warnings with MSVC. 2018-09-25 11:05:35 -06:00
0f652a1ec0 GP: New deselect by material option
Now the operator to select by color can unselect too.
2018-09-25 19:01:12 +02:00
fd1870b995 GP: Small changes to assign color operator 2018-09-25 18:44:53 +02:00
Alan Troth
d95a8988ea Fix UV edit smart stitch not redoing correctly.
Differential Revision: https://developer.blender.org/D3687
2018-09-25 18:36:14 +02:00
df5cb4d66f GP: Add multiframe support to select by color 2018-09-25 18:17:48 +02:00
89b535690c GP: Fix select strokes by color error 2018-09-25 18:17:48 +02:00
3e86cfa1ff depsgraph: re-Fix 32 bit shift bug in get_visible_components_mask.
1UL << n still results in a 32 bit result, 1ULL << n actually retains all 64 bits.

fixes stupid typo in rBbd51cada8db64e45cabca66cd61438c1ae2bdf25
2018-09-25 10:12:58 -06:00
af998b40a0 Implement correct drawing of advanced Weight display features.
This adds existing behavior from calc_weightpaint_vert_array
that was missing from the new rendering code:

- No selected Vertex Group displays as a solid pink color.
- Zero weight displays as alert color depending on Options.
- Multipaint mode correctly displays collective weight.

In order to properly implement this variety, a data structure
holding all relevant parameters is introduced.

Reviewers: fclem, campbellbarton

Subscribers: jbakker

Differential Revision: https://developer.blender.org/D3722
2018-09-25 18:44:57 +03:00
bd51cada8d depsgraph: Fix 32 bit shift bug in get_visible_components_mask.
1 << n results in a 32 bit result, 1UL << n retains all 64 bits.
2018-09-25 09:23:00 -06:00
2f00f5b98f despgraph: Use regular iterators for erase, fixes build error on centOS
CentOS7 ships with gcc 4.8.2 which does not support the const_iterator for erase.
2018-09-25 08:35:31 -06:00
e61861e393 GP: Add popover for Sculpt and Weight Paint panels 2018-09-25 15:39:15 +02:00
Michel Anders
5960254045 Fix missing metaball capsule properties in properties editor.
Differential Revision: https://developer.blender.org/D3726
2018-09-25 15:06:14 +02:00
Roel Koster
3816592fc6 Fix broken shift + A menu in curve edit mode.
Differential Revision: https://developer.blender.org/D3699
2018-09-25 14:55:26 +02:00
Sebastian Parborg
d191676400 Modifiers: use Mesh instead of DerivedMesh for explode.
Differential Revision: https://developer.blender.org/D3718
2018-09-25 14:01:23 +02:00
456ed41e2c GP: Remove Strokes menu in Sculpt mode 2018-09-25 13:35:14 +02:00
42600ab214 GP: Add select tools in sculpt mode 2018-09-25 13:35:14 +02:00
Dalai Felinto
19bdb84466 Fix build on windows after ccg changes 2018-09-25 11:26:31 +00:00
unknown
1de9ecec14 Merge branch 'blender2.8' of https://git.blender.org/blender into blender2.8 2018-09-25 08:18:15 -03:00
6ed581c107 Multires: Allow changing sculpt level without loosing data
As the comment states, this is not really great solution, but
is good enough for now. Proper solution needs some more work,
and maybe reconsideration of what is stored where.
2018-09-25 12:37:00 +02:00
13915c05dd CustomData: Allow copying content of a single layer 2018-09-25 12:27:43 +02:00
554b26cf88 Fix T56912: bpy.data.masks.new() crashed
I think there are two possible ways to fix that.
1. Make the name a required parameter.
2. Provide a default value.

I choosed option 1 in this fix to be consistent with other .new functions.

Also I think `RNA_def_string` instead of `RNA_def_string_file_path` should be used here. Looks like a copy-paste error.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3728
2018-09-25 12:01:43 +02:00
e60bbcafc5 Cleanup: indentation 2018-09-25 11:38:41 +02:00
53b25e88f4 Multires: Make code more ready for mesh uised by multiple objects
Probably more work is needed, but is good starting point.
2018-09-25 10:44:29 +02:00
15792eb728 Cleanup: Variable name in mesh runtime
Matches type better, avoiding possible confusion.
2018-09-25 10:32:34 +02:00
43c4d0bf23 Multires: Pass total level instead of modifier data
This is the only thing which needs to be done to perform propoer
reshape. Makes it easier to re-use code from other places.
2018-09-25 09:58:40 +02:00
a933293f11 Multires: Pass mesh instead of object
There is nothing we need from object in this case.
2018-09-25 09:38:23 +02:00
518451757e Gizmo: dial support for a click setting a value
Useful for click w/o drag to spin a full revolution.
2018-09-25 15:15:38 +10:00
1040e4008c Gizmo: reset dial value on cancel 2018-09-25 14:37:19 +10:00
ebdeb3eca0 Gizmo: support spin tool normal flipping
Use the 2x spin tool has 2x handles to control normal direction,
dragging either handle backwards now reverses normals.

Previously it was common for the spin result to have normals
flipped the wrong way.
2018-09-25 14:24:19 +10:00
0083c69624 Missing from last commit 2018-09-25 13:44:25 +10:00
a7bf4966e2 Merge branch 'master' into blender2.8 2018-09-25 13:42:51 +10:00
06d4fad313 BMesh: option to flip normals for extrude/spin 2018-09-25 13:31:29 +10:00
d915e6dc8d Merge branch 'master' into blender2.8 2018-09-25 11:50:47 +10:00
10fbea8845 Cleanup: style 2018-09-25 11:41:29 +10:00
c4806bbcb9 GP: Move MIrror modifier to Generate column 2018-09-24 22:26:44 +02:00
ac747c96d9 GP: Move Unlock Color to Adjustments panel
This option is not used all the time and can be moved to additional panel
2018-09-24 22:26:21 +02:00
2b628ba52b GP: Disable AA for material previews
This is not visible and it's using a lot of GPU memory
2018-09-24 22:10:08 +02:00
a6b125b06f Remove unused files 2018-09-24 14:50:20 -03:00
342e73f90f Spelling fixes in comments and descriptions (2.8 changes), patch by luzpaz.
Differential Revision: https://developer.blender.org/D3719
2018-09-24 18:48:29 +02:00
9682e43bf9 BGL: Wrap glBlitFramebuffer 2018-09-24 13:12:50 -03:00
dd01b2882a Merge branch 'master' into blender2.8 2018-09-24 18:11:14 +02:00
50731ff596 Fix T56861: freestyle + BI + full sample AA not working correct. 2018-09-24 18:09:21 +02:00
253dce07d7 Merge branch 'master' into blender2.8 2018-09-24 17:42:52 +02:00
0cff044d84 Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3719
2018-09-24 17:28:40 +02:00
Sebastian Parborg
fe52a05e95 Modifiers: use Mesh instead of DerivedMesh for dynamic paint.
Differential Revision: https://developer.blender.org/D3720
2018-09-24 17:14:01 +02:00
19f46c6ac0 Weight Paint: Multiply overlay on the mesh
Use the multiply blending mode for the weight paint overlay.
To support the opacity slider, we need a new shader. Otherwise this combination of multiplication and mixing does not seem to be supported by glBlendFunc.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3727
2018-09-24 17:10:29 +02:00
809be0099e GP: Some changes in Appearance panel 2018-09-24 16:36:08 +02:00
ea61700a2d Tracking: Use pixel aspect from clip
Don't force square pixel, since on a more real pipeline
expected delivery is same anamorphic as an input footage.
2018-09-24 16:26:27 +02:00
29602bbd62 Depsgraph: Always respect visibility flag when building object
Before it was only doing this for directly linked objects. This was
initially needed to solve fps issues in some of the shots. Now this
fps drop i can no longer reproduce. Was likely needed prior to
modifiers dependencies "inheriting" visibility from the "parent".

This commit makes it so objects which are linked indirectly to the
scene via collections are properly considered visible (or, rather,
evaluatable) by dependency graph.

Solves missing eyelashes and braids issues with 01_035_A.
2018-09-24 15:57:43 +02:00
736f91ad01 Depsgraph: Tweak to visibility flush
Make flush ready for component forced to be affecting visible things
from builder.
2018-09-24 15:55:02 +02:00
65c71fc410 Depsgraph: Provide more information about component 2018-09-24 15:55:02 +02:00
8008cdac2e Depsgraph: Cleanup, spelling in comment 2018-09-24 15:55:02 +02:00
a7c96a7aa6 Cleanup: Spelling 2018-09-24 15:55:02 +02:00
8dfdd248b5 Fix T56895: crash loading template with Load UI unchecked. 2018-09-24 15:48:50 +02:00
8f51308dba Build: allow overriding DEPS_BUILD_DIR and DEPS_INSTALL_DIR for make deps. 2018-09-24 15:48:50 +02:00
920173072e Fix: insert missing break in switch statement (second try) 2018-09-24 15:44:12 +02:00
6fff22b017 Revert "Fix: insert missing break in switch statement"
This reverts commit e904bb64df.
2018-09-24 15:40:01 +02:00
Dalai Felinto
cdb772490a Fix object restrict selection toggle in outliner not working 2018-09-24 11:53:25 +00:00
969cbed49b Add support for a one-dimensional Force Field source shape.
The fields currently support a Point source and a two-dimensional
Plane source, but there is no way to create a field that pulls
toward or from a line in space other than using the Texture field
type. This adds a new simple shape option to do that.

The line is aligned along the Z axis so that it works meaningfully
with the Tube and Cone falloff modes.

Reviewers: brecht, mont29, LucaRood

Differential Revision: https://developer.blender.org/D3721
2018-09-24 13:57:59 +03:00
2721700b7a GP: Make topbar layer popover wider 2018-09-24 12:57:11 +02:00
e904bb64df Fix: insert missing break in switch statement
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3724
2018-09-24 12:43:26 +02:00
24330f679e Fix T56875: Auto Render not working after render pass name refactor
The default compositor node update function sets the need_exec flag on the node
which the Auto Render feature checks, but the custom update function that was
added as part of rB4cf7fc3b3a4d didn't do so.

Therefore, the two custom update functions that were added now also call the
default update function.
2018-09-24 11:40:00 +02:00
3d860f53e8 Gizmo: hide redo gizmo when spin tool not active
Selecting a another tool left the gizmo,
which could overlap other tools gizmos.
2018-09-24 17:13:16 +10:00
6db79dafb3 Gizmo: show partial arc & icons for spin tool 2018-09-24 17:06:55 +10:00
6457aaa420 Gizmo: dial3d option to draw a partial arc 2018-09-24 17:06:04 +10:00
b931e7ab4f Gizmo: option to hide from selection
Allows some gizmo to be used as guides.
2018-09-24 16:40:21 +10:00
9a77f33bad GPU: utility function to draw a partial circle 2018-09-24 16:22:22 +10:00
5fff3d2237 Cleanup: rename gizmo flag 2018-09-24 16:20:08 +10:00
c3d46694e2 Gizmo: add spin-tool rotate on view axis
This also acts to catch stray click events so missing a gizmo
doesn't move the cursor or execute another spin action.
2018-09-24 10:13:39 +10:00
2abbe1d125 Cleanup: skip translation to calculate length 2018-09-24 08:34:05 +10:00
0e65c4839c Cleanup: style 2018-09-24 08:25:51 +10:00
b350b194eb GP: Change direction text depending of sculpt brush 2018-09-22 16:27:04 +02:00
38402e7fdd Remove last traces of game engine and blenderplayer 2018-09-22 15:54:30 +02:00
17c4e5eb8a Depsgraph: Shrinkwrap modifier needs its own object transform.
It depends on the relative position of its own object and target.
2018-09-22 12:00:12 +03:00
fbede83afd GP: Change appearance panel for sculpt brushes 2018-09-21 23:11:30 +02:00
3a61771fdc GP: Move mask button to header 2018-09-21 22:59:24 +02:00
664865680a GP: More changes to sculpt panels and topbar 2018-09-21 22:50:20 +02:00
Dalai Felinto
502dbcf404 Select Similar: Cleanup - WITH_FREESYTLE 2018-09-21 16:32:24 -03:00
Dalai Felinto
09616c3f2f Multi-Objects: Select similar edge SIMEDGE_FREESTYLE
I'm not happy with #ifdef WITH_FREESTYLE everywhere.
But I will remove them in an upcoming commit
2018-09-21 16:28:25 -03:00
Dalai Felinto
eeeb469db2 Select Similar: Cleanup 2018-09-21 15:42:07 -03:00
Dalai Felinto
c2582bfc63 Select Similar: Skip hidden elements 2018-09-21 15:39:36 -03:00
Dalai Felinto
e8ec01dbb5 Multi-Objects: Select similar edge SIMEDGE_SEAM/SIMEDGE_SHARP
I'm not sure why we may want to sample both a sharp and an unsharp edges at the
same time, maybe to see if the selected edges all have the same values?

Either way, implemented as in 2.79. I also believe we may have a faster way to
select all the edges, but let's file this under optimizations to be done later.
2018-09-21 15:33:09 -03:00
d5f94b49bd Fix part of T56865: wrong center with orbit around selection in weight paint. 2018-09-21 20:21:40 +02:00
890b617919 Fix Python errors in weight paint mode. 2018-09-21 20:21:40 +02:00
529e22d6e2 GP: Initial changes in sculpt brush panel
Move some options to subpanels
2018-09-21 20:15:41 +02:00
4323ccfa6b GPU Python API: matrix.load_projection_matrix
If the `push_projection` and `pop_projection` functions already exist, there should naturally be a way to load a projection matrix.
2018-09-21 15:07:41 -03:00
444711e615 Re-enable OBJ add-on. 2018-09-21 20:06:51 +02:00
Dalai Felinto
438e09dbbe MESH_OT_select_similar: Cleanup 2018-09-21 14:46:50 -03:00
Dalai Felinto
e406a9f305 Multi-objects: Select similar edge SIMEDGE_FACE_ANGLE
I'm not sure why the original implementation was only checking for equal
comparison but I'm doing the same here. It is a one line change if we
want to support LT/GT anyways.

Also "technically" we should compare the angles in the worldspace, since
different scales will result in different angles. Added as a TODO but
honestly I think this is overkill.
2018-09-21 14:46:50 -03:00
Dalai Felinto
35f659aeb4 Rename bm_sel_similar_cmp_short > select_similar_compare_LONG 2018-09-21 14:46:50 -03:00
Dalai Felinto
3e46bea46b Multi-objects: Select similar edge SIMEDGE_LENGTH
I'm using kdtree here but there is nothing preventing us from using a simple
float linked list with a sorting and finding "nearest" equivalents.

At least we are benefitting from bisecting as oppose to the original solution.

Also we need epsilon for the float comparisons.
2018-09-21 14:46:50 -03:00
Dalai Felinto
b38be90515 Multi-objects: Select similar edge SIMEDGE_DIR 2018-09-21 14:46:50 -03:00
Dalai Felinto
acc6c50d8a Multi-objects: Select similar edge SIMEDGE_FACE 2018-09-21 14:46:50 -03:00
Dalai Felinto
850fda2358 Select similar edge: Granular error message
This way we can implement them onw by one
2018-09-21 14:46:50 -03:00
0edb2b8de9 Py io_utils: deprecate orientation_helper_factory and add new orientation_helper decorator.
This fixes warning about not using annotations, and a decorator here is
a much cleaner solution anyway.
2018-09-21 19:31:57 +02:00
Dalai Felinto
a3020d5558 Fixup for gpu.types.GPUOffscreen.py example
Addressing the changes introduced on: 43fa51835a
2018-09-21 13:34:53 -03:00
2ece296d4f Wireframe Mode: Fix missing wireframe if overlays are disabled 2018-09-21 18:29:25 +02:00
43fa51835a gpu.types.GPUOffscreen.py example file: Move the shader reference removal code to execute on __main__ 2018-09-21 13:26:23 -03:00
18252e407f Viewport: tweak shading pie layout and naming. 2018-09-21 17:55:25 +02:00
8143f27209 Cleanup: Indentation 2018-09-21 17:40:32 +02:00
fbb403e094 Multires: Remove unused field from reshape context 2018-09-21 17:40:32 +02:00
964bb28e21 gpu.types.GPUOffscreen.py example file: Delete the reference of the previous shader.
Strange that the `bpy.utils.register_class` utility does not remove the reference of the class with same name.
2018-09-21 12:36:38 -03:00
d2a491da5f Viewport: tweak shading pie menu to have X-ray on same side as wireframe. 2018-09-21 17:01:10 +02:00
202baaaa16 Viewport: change Z key to shading pie menu to switch mode, X-ray and overlays.
This lets us do the most common shading switching with one shortcut. We keep
alt+Z and shift+Z for quickly toggling to lookdev and rendered mode and back,
it's debatable which settings deserve a dedicated shortcut like this.

The downside is that switching X-ray is a little slower, and that there is
some risk of accidentally going to lookdev or rendered mode which can be slow
to cancel.
2018-09-21 16:52:34 +02:00
684739c6f9 Fix: missing cache invalidation when the active vertex group changed
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3716
2018-09-21 16:20:32 +02:00
d2dba449fe Edit Mesh Mode: Increase Face dot Z bias 2018-09-21 15:45:03 +02:00
37fea2c0f0 Edit Mode: Merge Xray and "Limit selection to visible" options behaviour
We now treat Xray as being the mode where Limit selection to visible is off.
If Xray is OFF, Limit selection to visible is considered ON.

To allow 'see through wires' with solid shading (not Xray shading) we still
draw solid shading if Xray is ON with Xray Alpha set to 1.0.
2018-09-21 15:45:03 +02:00
3523958de9 DRW: Add back wireframe mode
This is using the existing engine (workbench forward) with 0.0 xray_alpha
and forcing wireframes on all objects.

There is no workflow/shortcut changes in this commit.
2018-09-21 15:45:03 +02:00
6934b246d1 Cleanup: Inetnation 2018-09-21 15:35:34 +02:00
5ee0200d43 Multires: Support masks propagation to higher levels 2018-09-21 15:31:44 +02:00
cec4c77719 Multires: Copy mask from sculpt to multires
Allows to paint mask in sculpt mode, then go out of sculpt
mode, come back and see proper mask.
2018-09-21 15:31:43 +02:00
b32832a7e8 Subdiv: CCG, initialize grid mask from paint mask 2018-09-21 15:31:43 +02:00
da800621ed Subdiv: CCG, cleanup 2018-09-21 15:31:43 +02:00
6a7914b73e Re-enable FBX add-on. 2018-09-21 15:15:08 +02:00
06dc059f48 Depsgraph: update frame in scene on frame change.
Normally the time can be read from DEG_get_ctime(depsgraph), but this is a
bit more forgiving for e.g. addons that don't care too much about the details
of the COW depsgraph.
2018-09-21 14:15:27 +02:00
4494be513a Fix smoke to render in Cycles again.
Viewport caching seems still broken, though baking works.
2018-09-21 14:15:27 +02:00
b7035cb8bd GP: Change canvas titles
These changes are to harmonize names.
2018-09-21 14:10:40 +02:00
cfb7565cd5 Cleanup: convert smoke modifier from DerivedMesh to Mesh. 2018-09-21 13:56:22 +02:00
91a5b665b0 Cycles: keep material settings panel closed by default. 2018-09-21 13:56:22 +02:00
0192f0b1e4 Revert "Fix: setUp of ID Property tests failed"
This reverts commit 52cee1a23c.
2018-09-21 12:54:43 +02:00
52cee1a23c Fix: setUp of ID Property tests failed 2018-09-21 12:51:06 +02:00
9ecce9b4c4 Subdiv: Fix crash subdividing mesh withotu faces 2018-09-21 12:18:50 +02:00
12372e8d8b Multires: Support sculpting on a lover levels
Added propagation of displacement to a higher levels.

Has the same limitation as reshape from object, which makes
grids somewhat choppy due to linear interpolation nature.

This is to be addressed next.
2018-09-21 11:43:42 +02:00
619c55027f Multires: Fix reshaping from object at lower level
This brings basic implementation of displacement propagation
to a higher levels. Currently does linear interpolation between
grid points at which reshape happened. It makes results a bit
choppy, proper solution would be to use some interpolation
weights from the limit patch.
2018-09-21 11:24:33 +02:00
495c7463fc UI: fractional DPI scaling of splash, instead of always 1x or 2x. 2018-09-21 10:46:08 +02:00
87bbf4439d GP: Fix select tools from toolbar error
The operators used were not the right ones.
2018-09-21 10:30:05 +02:00
c71db48b27 Fix minor typo in comment. 2018-09-21 10:08:42 +02:00
cf34c165ea GP: Convert lock axis to popover 2018-09-21 08:51:25 +02:00
391536ef12 Fix missing edge in shape-to-wire utility 2018-09-21 16:09:32 +10:00
7a3474ddfd Gizmo: spin tool XYZ axis toggles
New handle type for initial spin,
gives clear differentiation between do & redo (similar to extrude).

Some tweaks still required to match T56571.
2018-09-21 13:48:22 +10:00
3266ebf9e5 Gizmo: enable spin tool redo gizmos again
- Add x,y rotate and translate controls.
- Remove x-depth adjustment.
2018-09-21 13:34:29 +10:00
7deb38eec6 Gizmo: fix incorrect dial clip scaling
Failed with obvious error when the dials scale wasn't 1.0
2018-09-21 10:30:55 +10:00
Dalai Felinto
fbc837b2f8 Updated gpu.types.GPUOffscreen.py example file
The image I get is a bit too dark, which is the same I get in the viewport
itself when there is no Display Device. So I believe for cases like this
we need to have color management on top of the buffer.

Also, on EEVEE it looks like it needs to clear some extra buffers. You can see
that, by rotating the camera view around.

That said, this is the first step to bring back fun addons
that use external offscreen buffers.

Note: When using gpu offscreen with POST_VIEW (as oppose to POST_PIXEL)
I get a crash with DST having 0xFF..
2018-09-20 22:21:19 +00:00
5340e9ac1b Merge branch 'master' into blender2.8 2018-09-21 08:18:23 +10:00
0a968510bf Cleanup: style, use raw strings 2018-09-21 08:15:46 +10:00
08c7733c13 Cleanup: style 2018-09-21 08:11:50 +10:00
Dalai Felinto
fb88088203 Preserve the actively bound framebuffer after using gpu.offscreen
Otherwise we cannot draw anything after drawing in the offscreen buffer
2018-09-20 21:43:08 +00:00
5e2c032f1a GP: Change lock axis property text 2018-09-20 22:51:56 +02:00
5e5a950dca GP: Rename origin to stroke placement 2018-09-20 22:51:34 +02:00
Dalai Felinto
425cfdd5be GPU Python API: shader.uniform_float
The existing alternative is to use a buffer and call
uniform_vector_float which is overkill for such a simple operation.
2018-09-20 19:51:06 +00:00
Dalai Felinto
e316e41f84 Typo on pydoc for uniform_int 2018-09-20 19:49:08 +00:00
f0149bc070 gpu.batch module: keep shader reference in batch. 2018-09-20 16:38:43 -03:00
9fb9604c19 gpu.shader module: Do not free builtin shaders. 2018-09-20 15:21:59 -03:00
Sebastian Parborg
d0eed5e50a Texture Paint: unify missing data and slots panels, better auto position nodes.
Differential Revision: https://developer.blender.org/D3694
2018-09-20 19:54:33 +02:00
09ea940e7b Fix missing Eevee volume panel in material tab. 2018-09-20 19:28:56 +02:00
1a0181bb6d UI: add support for defining any icon as a mono icon.
Previously it was hardcoded to one row. These icons are colored with the
text color. Changes include some refactoring.
2018-09-20 19:15:41 +02:00
decc323b4e UI: default to single icon column toolbar in new 3D views. 2018-09-20 19:15:01 +02:00
9c2dc808ce gpu.shader.builtin module: Add GPU_SHADER_2D_IMAGE. 2018-09-20 13:55:43 -03:00
4264cee921 GP: Cleanup unused code 2018-09-20 18:52:57 +02:00
963d668a03 GP: Move origin selector to center and convert to popup 2018-09-20 18:50:19 +02:00
ce1b57227d GP: Add new popover with layers panel 2018-09-20 18:50:19 +02:00
b8d55a570e GPUCodegen: Remove unnecessary GLEW_VERSION_3_0 checks 2018-09-20 17:53:47 +02:00
667add5fc5 Eevee: Implement Wireframe Node
This implementation is a bit hacky but match cycles pretty close.

If pixel size is not enabled, it will use the geom shader to
compute distances between vertices. This will have a cost.

Implementation is a bit hacky in gpu_codegen to make the geom shader works
in an optional manner.
2018-09-20 17:53:47 +02:00
5c20161f81 Fix compilation error in the stick bones shader for some Intel gpus. 2018-09-20 12:11:23 -03:00
Dalai Felinto
cffae36381 Fix build for MSVC: Remove trailing double semicolon
Not sure why but MSVC is complaining for some of those.

In particular for the struct in BKE_subdiv_ccg.h. Those were the ones
crashing here..
2018-09-20 14:59:55 +00:00
9a91e67825 Multires: Cleanup, more proper variable name 2018-09-20 16:35:50 +02:00
315929e095 Sculpt: Fix undo not working for multires 2018-09-20 15:39:41 +02:00
00037059e9 Subdiv: CCG, implement averaging along edges and corners
Makes it so smooth brush works properly, without causing grids
to become disconnected from each other.

This need to optimize the code for brush, to only average edges
and vertices which are adjacent to modified faces.
2018-09-20 15:39:41 +02:00
d3aafbddd9 Subdiv: CCG, store vertex adjacency information
Similar to previous commit, but for vertices.
2018-09-20 15:39:41 +02:00
d511c72056 Subdiv: CCG, store edge adjacency information
This information is stored for each non-loose edge.

For each of such edge we store:

- List of CCG faces it is adjacent to.

  This way we can easily check whether it is adjacent to
  any face which is tagged for update or so.

- List of boundary elements from adjacent grids.

  This allows to traverse along the edge and average all
  adjacent grids.
2018-09-20 15:39:41 +02:00
8196b9d7bc OpenSubdiv: Add extra base level queries to topology refiner 2018-09-20 15:39:41 +02:00
069fa8279d Subdiv: CCG, fix memory leak
Forgot to free memory used by grid to face mapping array.
2018-09-20 15:39:41 +02:00
13820ec5c1 Subdiv: CCG, fix crash going from sculpt to edit mode
Was happening for "new" objects, which did not have MDisps
allocated yet.
2018-09-20 15:39:41 +02:00
0a596eda2a Subdiv: CCG, localize Mesh usage even more 2018-09-20 15:39:41 +02:00
6a7e914476 Subdiv: CCG, go away from Mesh
Use topology refiner where possible, which will make code more
portable and less dependent on all the possibly outdated pointers.
2018-09-20 15:39:41 +02:00
a5d985b441 Merge branch 'master' into blender2.8 2018-09-20 15:39:20 +02:00
87ad27ca89 Sculpt: Fix memory leak in undo system
Was not freeing undo nodes themselves.
2018-09-20 15:38:15 +02:00
52f19683f9 GP: Remove Copy & Paste buttons 2018-09-20 13:50:37 +02:00
de994d6b7b GP: Fix problem with mode opening 2D Animation template
The grease pencil does not need a toggle of mode.

This fix also the problem when open grease pencil files that did not keep the mode saved.
2018-09-20 13:47:59 +02:00
5bfcd6f303 GP: Fix falloff curve using 2D animation template 2018-09-20 13:10:56 +02:00
b9b371625d GP: Fix template name typo error 2018-09-20 13:04:56 +02:00
9dad2a0e08 GP: Fix Alt+S problem with multiframe edition
The stroke must not be recalc, because the number of points does not change,so the triangulation of fill is the same.
2018-09-20 12:54:19 +02:00
b5dbe43d3e Cleanup: move DerivedMesh wrappers for modifiers further down the hierarchy
The main goal of this patch is to cleanup the interface of every modifier. More specifically the interface of modifiers should be DerivedMesh-free.
Internally some modifiers still use DerivedMesh. However I think it is better when the wrappers are in the modifiers so that higher level functions can use the simplified interface.

This patch removes the applyModifier_DM and applyModifierEM_DM functions. In a previous patch (rB3614d9d) the other functions that used DerivedMesh have been removed.

Reviewers: brecht
2018-09-20 12:04:17 +02:00
add8e1c018 GP: Add keymap 1 and 2 for select mode 2018-09-20 11:56:59 +02:00
67a6cb665e GP: New select mode
Now it's possible select points or strokes
2018-09-20 11:56:59 +02:00
1278890611 Put the Radius property of Curve points under shape key control.
Since shape keys are stored as raw floating point data, this
unfortunately requires changes to all code that works with it.

An additional complication is that bezier and nurbs control
points have different entry size, and can be mixed in the same
object (and hence shape key buffer).

Shape key entries are changed from:

  bezier: float v1[3], v2[3], v3[3], tilt, pad, pad;
  nurbs:  float vec[3], tilt;

To:

  bezier: float v1[3], v2[3], v3[3], tilt, radius, pad;
  nurbs:  float vec[3], tilt, radius, pad;

The official shape key element size is changed to 3 floats,
with 4 elements for  bezier nodes, and 2 for nurbs. This also
means that the element count is not equal to the vertex count
anymore.

While searching for all curve Shape Key code, I also found that
BKE_curve_transform_ex and BKE_curve_translate were broken. This
can be seen by trying to change the Origin of a Curve with keys.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D3676
2018-09-20 11:52:42 +03:00
1789c1e90d Gizmo: hide redo gizmo when any operator runs 2018-09-20 15:45:16 +10:00
e4c53d9163 Missing from last commit 2018-09-20 14:57:01 +10:00
e228574417 PyAPI: correct term for class property warning 2018-09-20 14:55:07 +10:00
e8c27b1bba Cleanup: use win_to_3d_on_plane function 2018-09-20 12:53:39 +10:00
9dac8633d6 Merge branch 'master' into blender2.8 2018-09-20 12:51:16 +10:00
1cc9022eb5 Cleanup: use win_to_3d_on_plane for curve drawing 2018-09-20 12:45:07 +10:00
abe36478c6 3D View: add clip argument to win_to_3d_on_plane 2018-09-20 12:42:00 +10:00
6672019484 Gizmo: use simple unclipped win_to_ray function
When projecting the cursor onto a plane, clipping isn't important.
2018-09-20 12:13:11 +10:00
8377febcb7 Merge branch 'master' into blender2.8 2018-09-20 12:06:53 +10:00
1a2e41a0f2 Cleanup: renaming missed from merge 2018-09-20 12:05:10 +10:00
c9df0ea147 3D View: add a simple un-clipped win_to_ray 2018-09-20 12:00:02 +10:00
65fb2ebb3c Merge branch 'master' into blender2.8 2018-09-20 11:51:01 +10:00
de32dc6b27 Cleanup: rename 3D view ray calculation functions
Using near far and optionally clipping planes is
involved and not needed in many cases.

Rename so a simpler version of this function can be added.
2018-09-20 11:47:17 +10:00
ce56088bcd Gizmo: use ED_view3d_win_to_3d_on_plane 2018-09-20 11:38:11 +10:00
6a01f62df4 Merge branch 'master' into blender2.8 2018-09-20 11:26:31 +10:00
470407ec3b 3D View: point-on-plane from screen location utility 2018-09-20 11:24:13 +10:00
2c30922e2c Fix spin/rotate gizmo not updating view orientation
Check for navigation didn't refresh when navigation was completed.
2018-09-20 10:19:59 +10:00
83ac16d241 Merge branch 'master' into blender2.8 2018-09-20 10:11:01 +10:00
0acc1b4c6c Cleanup: style 2018-09-20 10:06:59 +10:00
5ada6e7540 GPUTexture: Fix HDRI being clamped on OSX
Seems like GLEW_ARB_texture_float is not defined in core profile on OSX
even if float textures are part of the 3.3 core spec.

So removing uneeded backup cases.
2018-09-19 23:59:25 +02:00
e620380cc2 GP: Rename eraser brushes 2018-09-19 23:24:52 +02:00
87b628db2a Cleanup: style 2018-09-20 07:15:45 +10:00
Wybren van Keulen
104fb1fb76 Fix T53745: Alembic exported with vertex colors not readable by other software.
Most other software expects to read indexed vertex colors, so write indices
along with the colors as we already do for UVs.

Differential Revision: https://developer.blender.org/D3704
2018-09-19 20:17:04 +02:00
73ac72fa89 DRW: Fix crash when new shader requires 0 customdata layers
It was using last cache->auto_layer_len which led to a buffer overflow.
2018-09-19 20:02:12 +02:00
7ad8272952 DRW: Only trash UV and tangent data when using BKE_MESH_BATCH_DIRTY_SHADING
This improves the problem encountered when animating materials on static
meshes but does not fix the core issue. See T55326.
2018-09-19 20:02:12 +02:00
960ab2ab58 Cleanup: Remove "_new" from GPU_generate_pass_new
Not needed anymore since old one has been deleted.
2018-09-19 20:02:12 +02:00
9cd4788403 Fix T55059: EEVEE UV not available until you go in and out of edit mode
This is a dirty hack that should become irrelevant when depsgraph will
support CD masks.
2018-09-19 20:02:12 +02:00
a53c81c60b Merge branch 'master' into blender2.8 2018-09-19 18:42:17 +02:00
a5101e4da8 Cycles: Cleanup, double semicolon 2018-09-19 18:41:43 +02:00
6b433f4eb3 Merge branch 'master' into blender2.8 2018-09-19 18:20:50 +02:00
a4f2ebc78d Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3700
2018-09-19 18:18:05 +02:00
424839e3c2 make.bat: fix build error when there are spaces in the path to svn/git/cmake 2018-09-19 10:16:46 -06:00
a7d43eb1c6 Depsgraph: Another followup to the previous commit
Apparently, only mesh objects has SHADING component.
2018-09-19 18:03:15 +02:00
e60492b6fb Fix wrong pointer used in modifier stack
Was passing pointer to a pointer of context.
2018-09-19 17:51:14 +02:00
93d4752dbe Depsgraph: Correction for the previous commit 2018-09-19 17:49:38 +02:00
3614d9d2a2 Cleanup: Remove some DerivedMesh wrappers for modifiers
Specifically the deformVerts_DM, deformMatrices_DM, deformVertsEM_DM and deformMatricesEM_DM functions are not used anymore.

Reviewer: brecht
2018-09-19 17:33:03 +02:00
e81f7f25ac GP: Verify weight data is correct before assigning 2018-09-19 17:26:09 +02:00
03bb7cd9ad GP: Fix crash when select vertex group in modifiers 2018-09-19 17:20:55 +02:00
828c0e9813 Depsgraph: Ensure shading update order
Previously it was possible to have geometry component to
tag batch for DIRTY_ALL and shading to tag with SHADING_UPDATE.

Now there is a relation between uber eval and shading, which
solves this issue.
2018-09-19 17:16:03 +02:00
63c636518f GP: Fix copy frame error in dopesheet 2018-09-19 16:47:23 +02:00
09d3c907e7 Depsgraph: Always assume scene camera is visible
Allows to disable camera collection to make objects to go out of
the way, but still be able to animate.
2018-09-19 16:43:59 +02:00
a0402074ed Fix wrong CUDA version warning in cmake.
Fix suggested by Dalai.
2018-09-19 16:24:45 +02:00
d5e29f4140 Fix T56697: missing viewport update after keyframe edits in animation editors.
It was updating during transform, but not a final time after keyframes get
reordered or merged.
2018-09-19 16:19:26 +02:00
edb6f192ee UI: make new icon consistent with other places. 2018-09-19 16:19:26 +02:00
39600d7c96 Fix own mistake in previous commit. 2018-09-19 16:10:33 +02:00
749d5c033c Depsgraph: Make visible update to operate on per-component level 2018-09-19 16:10:12 +02:00
afb4da6650 Despgraph: Keep track of per-component visibility
The idea of those flags is to avoid evaluation of operations
which are not needed to bring visible objects to an up to date
state.

Previously, dependency graph attempted to do combine those
into an ID level flag. In practice it proved to be rather
tricky, since there could be dependency cycles on ID level
which will not exist on component level.
2018-09-19 16:10:12 +02:00
cc061d349b Depsgraph: Connect duplicating geometry to duplicator
This allows to force duplicated object to be fully evaluated for
display/draw.

Previously only transform component of duplicated object was
forced to become evaluated.
2018-09-19 16:10:12 +02:00
1b98fff713 Depsgraph: Make geoemtry to tag function more reusable 2018-09-19 16:10:12 +02:00
34c361db5a Depsgraph: Correct early output in collections
Need to ensure objects from collection which was built but
is became visible in the new "context" are poked for re-built.

This should be rather cheap, since this only will update
their visibility flag.

Can not rely on visibility flush here, since there is no
relations between collection and its objects.
2018-09-19 16:10:12 +02:00
3714c83441 Depsgraph: Handle text datablock in ID builder
Just silence the assert/print, we do not add text data blocks
to dependency graph.
2018-09-19 16:10:12 +02:00
Dalai Felinto
828627a796 Addon Utils: Green light the uv layout addon 2018-09-19 13:58:01 +00:00
33edfefa8e Depsgraph/RNA: Fix broken 'dupliobject' RNA interface.
Previous code would crash on whole lot of accessors in case current item
was not a real dupli instance.

And code was missing access to crucial dupli (world) matrix! Pretty
useless without that.

Also reordered a bit members in here, let's try to keep a bit of logic...
2018-09-19 15:46:49 +02:00
238a270d8f Fix possible misuse of BLI_strncpy.
Same issue as rB39f7c8256d58.
2018-09-19 09:04:55 -03:00
a349527981 GP: Fix stupid mistake 2018-09-19 12:15:53 +02:00
25f25a6f30 GP: Remove unneeded flag 2018-09-19 12:15:05 +02:00
f9f34fb9ab Fix T56756: Pivot Point update issue(minor issue). 2018-09-19 11:41:16 +02:00
d053508916 Merge branch 'master' into blender2.8 2018-09-19 11:12:45 +02:00
340527cd37 Fix unused var in case Alembic is not enabled, in own previous commit.
Sorry for the noise...
2018-09-19 11:11:39 +02:00
71d18f59a3 Mesh Sequence Cash: do not *always* report as depending on time! 2018-09-19 11:09:12 +02:00
2be5621be8 Fix T56838: Quick smoke failing with Python error.
Again the change to @ operator for matrix multiplication...
2018-09-19 10:32:58 +02:00
eab3ca7348 Cleanup: Unused variable in release build 2018-09-19 09:48:32 +02:00
fe467735e5 Subdiv: CCG, remove redundant call 2018-09-19 09:48:07 +02:00
574484006b EditMesh: show the spin arc as a thin ribbon
Closer to the design from T54661
2018-09-19 17:52:13 +10:00
ba38206608 Gizmo: tweaks to dial drawing
- Add Arc-Inner-Factor, to increase the inner arc radius from 0
  (show as a disk).
- When showing an angle value, show the angle-end line thicker
  (since thats whats being adjusted).
- Remove offset used by arc drawing which caused aliasing artifacts.
2018-09-19 17:47:15 +10:00
3b4782dc24 Gizmo: exclude arc from selection
Also disable polygon smooth before drawing arc.
2018-09-19 16:47:07 +10:00
6c7ad56f00 EditMesh: orient spin arc to follow the cursor 2018-09-19 16:41:56 +10:00
40ac38f18d Gizmo: remove matrix rotation for the dial gizmo
This makes it impossible to rotate the gizmo using the matrix Y axis.

Testing without this and I can't find any cases it breaks.
2018-09-19 16:22:01 +10:00
414e5fe068 Correct polygon_smooth being left enabled 2018-09-19 15:32:28 +10:00
2065669716 Cleanup: comments 2018-09-19 13:41:52 +10:00
88cd23914f Gizmo: dial3d option to show the final angle
Was showing modal-delta-angle, which isn't useful for the spin tool.
2018-09-19 13:35:15 +10:00
5739523b3e Merge branch 'master' into blender2.8 2018-09-19 13:33:01 +10:00
39f7c8256d Fix unreported: Undo of texts pasted in the Text Editor misses one character.
Caused by commit rB28c34ae7e2d6
Unlike `strncpy`, `BLI_strncpy` ensures the last character is '\0'.
2018-09-19 13:31:55 +10:00
bb3ec3ebaf BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values.

Name macros so the conversion is obvious,
use common prefix for easier completion.

- GET_INT_FROM_POINTER  -> POINTER_AS_INT
- SET_INT_IN_POINTER    -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER   -> POINTER_FROM_UINT
2018-09-19 12:12:21 +10:00
3d3531acb0 Fix unreported: Undo of texts pasted in the Text Editor misses one character.
Caused by commit rB28c34ae7e2d6
Unlike `strncpy`, `BLI_strncpy` ensures the last character is '\0'.
2018-09-18 23:11:59 -03:00
4597589503 Cleanup: replace pointer/int casts with macros 2018-09-19 12:22:48 +10:00
f35e9f047a Merge branch 'master' into blender2.8 2018-09-19 12:14:36 +10:00
0ad183bf02 Merge branch 'master' into blender2.8 2018-09-19 12:05:08 +10:00
4c918efd44 Cleanup: trailing space 2018-09-19 12:04:34 +10:00
0322e854da Cleanup: missed when using doxy groups 2018-09-19 11:56:52 +10:00
Dalai Felinto
c0fb90ff9a Multi-Objects: Initial select similar support
Note: I had to add an epsilon on top of the threshould for SIMVERT_NORMAL.
Otherwise I was getting differences such as 0.000000something when comparing
supposed-to-be-identical normals.

The way I see it, the Threshold option is a user feature, where users can
control more or less what they want selected. While the epsilon is a
non-negotiable requirement for our float comparison here.

This includes support for:
* SIMVERT_NORMAL
* SIMVERT_FACE
* SIMVERT_EDGE

Not included and currently not supported/disabled:
* SIMVERT_VGROUP
* SIMEDGE_*
* SIMFACE_*

While we are working on this, we prevent users from using the non-ported modes.
Note: the bmo_similar.c file is still around, to be removed in the near future.

Everyone: Please fell free to jump in and help tackling the missing modes.

For details on the implementation discussion:
https://developer.blender.org/D3674
2018-09-18 22:42:07 -03:00
Dalai Felinto
a1acff5459 Move select similar to its own file 2018-09-18 22:42:07 -03:00
1ed7c85f54 Cleanup: replace comment headings w/ doxy groups
Also minor changes:

- Remove unused headers.
- rename SimpleExprParseState -> ExprParseState
- rename max_ops -> ops_count_alloc

  Was misleading since maximums are often limits which can't be exceeded.
2018-09-19 11:53:28 +10:00
d44c8ce1cb Cleanup: BLI_expr_pylike argument ordering
- Order array length after the array.
- Put return argument last.
2018-09-19 11:40:40 +10:00
3aea5695bb Cleanup: rename BLI_simple_expr -> BLI_expr_pylike_eval
Simple isn't a good prefix for library names since
lots of unrelated modules could be called 'simple'.

Include 'py' in module name since this is a subset of Python,
one of the main motivations for this is to be Python like/compatible.
2018-09-19 11:08:04 +10:00
345c348262 Cleanup: style 2018-09-19 10:29:57 +10:00
69aac13524 Correct invalid enum default 2018-09-19 10:14:37 +10:00
a30f32891f Cleanup: remove dummy tooltips 2018-09-19 09:52:33 +10:00
900b7127eb UV Snap: minor uv-nearest optimizations
- Pass in the snap distance
  (to avoid comparisons in the multi-object version).
- Loop directly over BMLoop's (without using the iterator).
- Use squared distance instead of manhattan.
2018-09-19 09:54:36 +10:00
e6766287d6 Fix T56827: Crash when enable onion skin in multiwindow
The problem was the cache was not set as dirty if one of the window had the overlay disabled.
2018-09-18 23:18:48 +02:00
ad50671937 GP: Remove vertex transformation when mode is not EDIT mode 2018-09-18 22:36:59 +02:00
a5fedd535d GP: Change Frames title for Onion panel 2018-09-18 22:36:59 +02:00
e9c6f69cb6 GP: change hide icon in materials 2018-09-18 22:36:58 +02:00
93780411e9 LookDev: Use theme background instead of world color
This is much less confusing than relying on an hidden parameter (the world
color) that you can only see if you disable the world node tree.
2018-09-18 22:18:49 +02:00
629c6a8769 Eevee: Rename "Trace Quality" into "Trace Precision"
The thing is that the quality is something a bit subjective regarding this
option value.

A more precise trace will have more noise so quality is also diminished in
a way. I believe that using "Precision" is more correct than "Quality" in
this case.
2018-09-18 21:39:53 +02:00
5aa3e33565 LookDev: Use black background color if world is not present 2018-09-18 21:39:53 +02:00
32e6d5cd6f StudioLight: Fix crash when closing blender
The studiolight was being free after the window manager and was attempting
to stop the job again.
2018-09-18 21:39:53 +02:00
a1a58c8d0a Fix T54685: EditMesh UV's transform snapping only checks active object
Reviewers: dfelinto
https://developer.blender.org/D3653
2018-09-18 16:26:22 -03:00
Dalai Felinto
8fc6609cc0 UV_OT_align: Cleanup (use enum instead of chars for modes enum
Also tested the straighten option and it is working-ish.

That said, I think straighten should take all the meshes vertices to determine
the line you want to use as reference. However we would need a different way to
determine the first and last uvs to use as reference for the line.
2018-09-18 16:03:36 -03:00
William Reynish
6a6bdacd82 UI: hide "Active Tool" panel header. 2018-09-18 19:38:20 +02:00
b49abbec5f Splash: add first time setup and templates to splash screen.
The first time setup screen only has the interaction preset currently, some
more work is needed to be able to set e.g. the language or compute device
here as in the mockups.

The splash screen stayed the same for now, to make room for the templates
most of the links are now in the Help menu. If there are no recent files yet
the links still show.

The splash screen buttons implementation was fully moved to Python, in the
WM_MT_splash menu.
2018-09-18 19:38:20 +02:00
1c815e0826 Workspaces: move 2D Animation, VFX and Video workspaces into own templates.
These can now be acessed from the File > New, Ctrl+N, or the splash screen.
Since these are application templates, users can save a separate startup.blend
for each. User preferences are shared between these templates though.

This also fixes some issues in the default startup.blend (triangulated cube..).

Differential Revision: https://developer.blender.org/D3690
2018-09-18 19:38:20 +02:00
84f21c170d Application Templates: make templates more prominent in the UI.
The goal here is to make app templates usable for default templates
that we can ship with Blender. These only have a custom startup.blend
currently and so are quite limited compared to app templates that fully
customize Blender.

But still it seems like the same kind of concept where we should be
sharing the code and UI. It is useful to be able to save a startup.blend
per template, and I can imagine some scripting being useful in the future
as well.

Changes made:

* File > New and Ctrl+N now list the templates, replacing a separate
  Application Templates menu that was not as easy to discover.
* File menu now shows name of active template above Save Startup File
  and Load Factory Settings to indicate these are saved/loaded per
  template.
* The "Default" template was renamed to "General".
* Workspaces can now be added from any of the template startup.blend
  files when clicking the (+) button in the topbar.

* User preferences are now fully shared between app templates, unless
  the template includes a custom userpref.blend. I think this will be
  useful in general, not all app templates need their own keymaps for
  example.
* Previously Save User Preferences would save the current app template
  and then Blender would start using that template by default. I've
  disabled this, to me it seems it was unintentional, or at least not
  clear at all that saving user preferences also makes the current

Differential Revision: https://developer.blender.org/D3690
2018-09-18 19:38:20 +02:00
b08d9f036e UI: don't show Redo Unsupported, just hide buttons in that case. 2018-09-18 19:38:20 +02:00
77edcf5ff1 GP: Change isolate layer icon 2018-09-18 19:01:16 +02:00
ebcbb50420 Subdiv: CCG, implement stitching of given faces
Will speed up (or rather bring speed back to what it is supposed to be)
for brushes like smooth.
2018-09-18 17:46:00 +02:00
7016f11d92 Subdiv: CCG, make inner face grids averaging more reusable 2018-09-18 17:35:59 +02:00
9bf3e0299b Subdiv: CCG, initial grids stitching implementation
Currently is only working on an "inner" grid boundaries.
Need to implement averaging across face edges.
2018-09-18 17:09:08 +02:00
41c039d6e9 Subdiv: CCG, evaluate final position for multires
This makes it so coordinates and normals for CCG are calculated
with mutires displacement taken into account. This solves issues
with multires displacement being lost when entering sculpt mode.

The missing part is averaging of normals along grid boundaries.
But even then sculpting shows decent results.

The plan to solve that would be to introduce function to stitch
grids, which can also be used by Smooth brush which requires
this.
2018-09-18 14:48:27 +02:00
b6ff37ee67 Merge branch 'master' into blender2.8 2018-09-18 14:31:44 +02:00
06fd94140c Fix T56833: "zoom to cursor" in Clip editor not handling aspect ratio.
Trivial fix, just using same code as in Image editor...
2018-09-18 14:31:05 +02:00
eafec6d4f7 GPUShader: Manually validate sampler count
This happens on NVidia GPUs, using more textures than the maximum allowed
by the gl will NOT trigger a linking issue (maybe because of bindless
texture implementation?).

So in this case we manually count the number of samplers per shader stage
and compare it against the GL limit. We discard the shader if the sampler
count is too high. This shows the user something is wrong with the shader.
2018-09-18 14:22:42 +02:00
bf2a54b058 Support evaluating simple driver expressions without Python interpreter.
Recently @sergey found that hard-coding evaluation of certain very
common driver expressions without calling the Python interpreter
produces a 30-40% performance improvement. Since hard-coding is
obviously not suitable for production, I implemented a proper
parser and interpreter for simple arithmetic expressions in C.

The evaluator supports +, -, *, /, (), ==, !=, <, <=, >, >=,
and, or, not, ternary if; driver variables, frame, pi, True, False,
and a subset of standard math functions that seem most useful.

Booleans are represented as numbers, since within the supported
operation set it seems to be impossible to distinguish True/False
from 1.0/0.0. Boolean operations properly implement lazy evaluation
with jumps, and comparisons support chaining like 'a < b < c...'.

Expressions are parsed into a very simple stack machine program
that can then be safely evaluated in multiple threads.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D3698
2018-09-18 13:25:28 +03:00
34ee9ab97c CMake: remove PYTHON_NUMPY_INCLUDE_DIRS as a cache variable on macOS/Windows.
It's in a fixed location on those platforms, and having it as a cache variable
just means things break when we upgrade to a new Python version.
2018-09-18 12:11:06 +02:00
f3b7e99c04 UI: use monochrome lock icons next to decorators. 2018-09-18 12:11:06 +02:00
5aa5066c3b Merge branch 'master' into blender2.8 2018-09-18 11:49:08 +02:00
d04eb330e8 Close OpenEXR thread pool on exit
This partially solves ASAN report about unfreed memory. There is still
something in the report, need to have a closer look with debug version
of OpenEXE library.
2018-09-18 11:10:49 +02:00
eadf0f3d70 Fix T56831: Crash - Transfer Weight & changing it's properties.
Usual Undo/Redo case with operators needing evaluated data...
2018-09-18 09:42:52 +02:00
5ae531d813 Cleanup: spelling 2018-09-18 16:35:13 +10:00
d421adb83e Gizmo: de-duplicate poll logic
Checking the active tool or operator was a common way to check
if the gizmo was still in use.
2018-09-18 16:15:06 +10:00
0a3b66cfb5 Gizmo: dial3d option to get angles w/o wrapping
Needed for spinning multiple revolutions.
2018-09-18 14:58:20 +10:00
2b57222ece Gizmo: add snap & tweak to the dial widget
Allows holding Ctrl to snap w/ the spin tool.
2018-09-18 14:38:05 +10:00
f677ff274c Cleanup: group gizmo dial members into structs 2018-09-18 14:13:35 +10:00
add961c209 Correct view orientation update in last commit 2018-09-18 14:04:55 +10:00
e16e17486b Gizmo: use spin widgets by default
- Now the spin tool has a persistent gizmo.
- Uses scene orientation, with additional view orientation.
- Uses the cursor center, ignoring the pivot since the
  selection center is rarely useful.
- Disable most of the redo gizmo's for now since they overlap,
  only allow adjusting the angle.

  Note: mixing new action with adjusting previous is confusing,
  we'll want to have design guidelines regarding this.
2018-09-18 13:44:41 +10:00
67f3f31f00 Cleanup: spin redo naming changes 2018-09-18 13:22:14 +10:00
8b41cd5b96 FIX: linker error with a 'make deps' library set and opencollada enabled.
PCRE_LIBRARIES was not being set if the pcre library was found but not the headers.
2018-09-17 18:06:02 -06:00
2ca7d14814 Cleanup: spin redo naming changes 2018-09-18 09:58:27 +10:00
2f8994f4af Cleanup: spin redo naming changes 2018-09-18 09:55:20 +10:00
03bccd0010 Cleanup: move editmesh spin gizmo into own file
To mix both initial spin and redo ends up being more involved,
move into own file.
2018-09-18 09:51:12 +10:00
5b221f1a6e Gizmo: minor tweak to spin tool
Make main angle adjustment radius larger since it's the most useful.
2018-09-18 09:41:54 +10:00
16b8d223b7 Cycles: Fix usage of AVX2 intrinsics in AVX kernel
While building the AVX kernel, util_avxf.h/avxb.h were using some AVX2 intrinsics,
these were never called, so it wasn't a run-time issue, but the intrinsics headers
on centos excluded the AVX2 prototypes when building the AVX kernel causing build errors.

This commit cleans up the improper usage of the AVX2 intrinsics and provides AVX
fallback implementations for future use.

Differential Revision: https://developer.blender.org/D3696
2018-09-17 16:27:13 -06:00
51ac494f21 build_files: bump python version in FindPythonLibsUnix.cmake to 3.7 now that all platforms have been updated 2018-09-17 13:45:12 -06:00
d2161d6463 build_environment: linux/python, help python find ffi.
we were building ffi, but python wasn't finding it.
2018-09-17 13:13:17 -06:00
683d0f0a7e GP: Remove duplicate clean menu 2018-09-17 20:39:40 +02:00
9e4f44ad30 build_environment: ffi/linux force predictable lib path.
ffi stubbornly wants to put libs in lib64 even when you tell it not to on some linux distributions.
patch based on sed fix the gentoo guys did [1]

[1] https://bugs.gentoo.org/462814
2018-09-17 11:58:13 -06:00
91e87f5cf2 Merge branch 'master' into blender2.8 2018-09-17 19:40:39 +02:00
39c18c5413 Install_deps: workaround building bloody broken OpenEXR release. 2018-09-17 19:40:12 +02:00
284cd1375b Cycles: Cleanup, remove dead code 2018-09-17 18:07:22 +02:00
81f1f9c85e Cycles: Remove unused malformed function
This isn't really possible to do the shuffle which was attempted to do.

While it's possible to achieve expected behavior, the function needs to
be rewritten. Since it's not used anyway, it's simpler to remove it for
now.
2018-09-17 18:05:32 +02:00
82e729d986 Cycles: Use proper mask for vectrorized boolean print 2018-09-17 18:02:01 +02:00
8c97cdd6a8 build_environment: force a consistent libdir across Linux distributions.
on some distributions libs ended up in lib64 confusing the cmake builder.
2018-09-17 08:13:08 -06:00
731d0d8d0f Eevee: Fix shader linking error with volumetric shaders 2018-09-17 15:08:14 +02:00
3da5b03b8a Eevee: Fix crash when using refraction with alpha clip blend mode 2018-09-17 14:46:22 +02:00
a738586810 Fix object selection with eyerdropper not respecting property poll function. 2018-09-17 12:36:31 +02:00
68f139db0d Fix T56800: Reflection Plane in Eevee crashes Blender 2018-09-17 12:20:51 +02:00
ad8b187a53 Fix T56803: Indirect lightning bake crashes Blender 2018-09-17 12:20:51 +02:00
5bf32f3337 Fix T56801: Enabling smoke crashes Blender. 2018-09-17 12:20:51 +02:00
dc1e03b4a2 Depsgraph: Cleanup, indentation 2018-09-17 11:19:42 +02:00
f87fbf9cce Depsgraph: Gnuplot, put heaviest objects at the top 2018-09-17 11:19:42 +02:00
231a384587 Merge branch 'master' into blender2.8 2018-09-17 10:23:55 +02:00
640fcc25a4 Fix T56811: Do not show cancel button for jobs when UI is locked.
Since that button is then totally useless and unusable...
2018-09-17 10:22:00 +02:00
7b11558aa8 UI: show steps for spin tool 2018-09-17 14:52:54 +10:00
2997f11941 Gizmo: start spin gizmo dragging
- Only respond to drag event, so placing the cursor is possible.
- Start off with zero rotation, dragging adjusts.
2018-09-17 14:34:51 +10:00
b8592b656b Gizmo: Functions to re-initialize a group type
Partially re-initializing a gizmo is often more trouble then removing
and re-adding.
2018-09-17 14:30:46 +10:00
f409c1ec93 Gizmo: only respond to mouse-move events
Missed in recent update to event handling.
2018-09-17 14:30:41 +10:00
9759059d58 Cleanup: use SCE_GIZMO_ prefix for gizmo_flag 2018-09-17 12:51:32 +10:00
ae3754838a Cleanup: rename gizmo group data
Abbreviate to 'ggd', replacing manipulator reference.
2018-09-17 12:47:45 +10:00
75980f4af2 Revert "Cleanup: use tuples in python according to feedback"
This reverts commit b1f0e4c2d6.

Sets are typically preferred for __contains__ checks
when order doesn't matter.
2018-09-17 09:01:00 +10:00
a06d803a5a Fix T56817: Assert because of invalid framebuffer 2018-09-16 21:22:55 +02:00
8c87e681a5 Fix driver expression bytecode validation crash if parsing fails.
Another NULL pointer access: nothing to validate if it already failed.
2018-09-16 10:46:28 +03:00
db0c37f2f7 GP: Rename select group color to materials 2018-09-16 09:32:54 +02:00
9901679ce8 Fix a crash when a driver expression evaluates to NaN.
The debug logging statement was accessing a NULL pointer.
Also happens in 2.79.
2018-09-16 09:06:57 +03:00
1079da9deb GP: Initialize new brush factors 2018-09-15 19:26:01 +02:00
b1f0e4c2d6 Cleanup: use tuples in python according to feedback 2018-09-15 17:28:20 +02:00
ca3628ba0c Cleanup: style 2018-09-15 10:35:03 +10:00
83d4328ce7 PyDoc: add gpu.shader
Also some syntax corrections.
2018-09-15 10:35:03 +10:00
3f20b3b585 Cleanup: use r_ prefix for return args 2018-09-15 10:34:59 +10:00
b3a9069170 GPUTexture: Fix problem with glGenerateMipmap
Fix T56789: There was issue with certain driver with glGenerateMipmap and
GPU_DEPTH_COMPONENT24.
In this case we just create a complete texture with mipmaps manually
without downsampling / initializing the data.
2018-09-15 00:11:25 +02:00
6b024c7e1a GP: Improve errase panel and toolbars
Some names were not clear enough and some parameters were missing.
2018-09-14 22:54:19 +02:00
54f1375e29 GP: Add pressure option to eraser size 2018-09-14 22:54:18 +02:00
460731f39e GP: Some changes to eraser panel 2018-09-14 22:54:18 +02:00
424aeda112 Object Mode: Draw object center after the floorgrid 2018-09-14 18:32:04 +02:00
1f1d5e1dd2 Object Mode: Make Flat object selectable in ortho view ...
... when wireframe is enabled
2018-09-14 18:32:04 +02:00
b62d140be9 Object Mode: Make Flat object outline visible in orthographic view 2018-09-14 18:32:04 +02:00
5feb03c3ae Motion Paths: interactively update current frame location while dragging. 2018-09-14 17:42:58 +02:00
fe6a6dee0b Motion Paths: only update once when transforming multiple bones or objects. 2018-09-14 17:42:58 +02:00
a415d521db Fix object motion paths not updating correct after filtering optimization. 2018-09-14 17:42:58 +02:00
66ad9ef2ce Fix OpenColorIO link errors in some Linux builds.
The library can get installed in a lib/static subdirectory, so search there
as well now.
2018-09-14 16:35:10 +02:00
898c780633 Fix OpenColorIO link errors in some Linux builds.
The library can get installed in a lib/static subdirectory, so search there
as well now.
2018-09-14 16:28:39 +02:00
cfaf92c079 GP: Fix T56802 - Add/Delete Vertex Group crashes 2018-09-14 16:09:10 +02:00
c4ef2e2f2e Cloth: Improve UI
This reorganizes the cloth UI, and changes some of the behaviour to be
more reasonable.

Changes included here:
* Reorganized cloth panels
* Improved some tooltips
* Removed `vel_damping` option
* Removed cloth pinning checkbox
* Removed stiffness scaling checkbox
* Separated shrinking from sewing
* Separated self collisions from object collisions

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D3691
2018-09-14 15:52:00 +02:00
1287965089 GPU module: Initial implementation of the gpu.shader submodule.
Differential Revision: https://developer.blender.org/D3688
2018-09-14 09:46:19 -03:00
d15928c234 Depsgraph: Use default visibility of false
Avoids invisible objects from being considered visible when they
are used as driver variables.

If those cases are actually coming from a visible object, then
deg_graph_build_flush_visibility() will ensure visibility is
properly flushed there.
2018-09-14 14:43:56 +02:00
d7fdd505da Depsgraph: Respect parent object visibility in more places
Mainly coverts object->parent and pose constraints.
2018-09-14 14:43:56 +02:00
95f257395e Depsgraph: Make indirectly linked objects inherit visibility from parent
This way objects which are pulled into dependency graph via modifier
stack from an invisible object will be invisible.
2018-09-14 14:43:56 +02:00
06c0febe70 Depsgraph: Use explicit argument values 2018-09-14 14:43:56 +02:00
8e8952b7e3 Multires: Initial work to get sculpting to work with OpenSubdiv
Allows to go to sculpt mode, do brush strokes, get out of sculpt mode
and have deformation preserved.

The issues currently is that the current implementation of CCG
storage is created from the limit surface, without displacement
taken into account. It is trivial to get displaced coordinates,
but it is more tricky to get displaced normals. This is something
to be solved next.

Another limitation is that this only works for sculpting at a maximal
multires level. There is code to be done to support propagation
of displacement onto a higher levels.
2018-09-14 14:43:56 +02:00
744233f207 Subdiv: Cleanup, variable name spelling 2018-09-14 14:43:56 +02:00
9a1ed28365 Sculpting: Fix wrong object was using for PBVH
The function is supposed to be called for original object.
Draw manager abuses this a bit, will solve later by moving
PBVH (re)creation to dependency graph.

At the time being, stop adding object evaluation to draw
manager, this is really where it does not belong to.
2018-09-14 14:43:56 +02:00
f827e3c84b Subdiv: Cache Subdiv in CCG surface
Allows to do re-shaping easier, since we will know for sure
what was the limit surface the CCG is created for.
2018-09-14 14:43:56 +02:00
e37479ad89 GPUBuffers: Rework support for pbvh grids + fast navigate
Flat shaded grids are now rendered as a long triangle strip with
degenerate triangles.

Smooth shaded grids are not changed.

Also add back fast navigate. The only difference with 2.79 is that fast
navigate + flat shading will show slitly "incorrect" smooth face. But that's too
much effort to fix for what it is.
2018-09-14 12:20:01 +02:00
1d76fbf3df GP: Add thickness and stregth factor to UI
Now it's possible change the factors for soft eraser.
2018-09-14 10:31:47 +02:00
18141863b2 GP: Fix armature deformation weight problem
The armature was using only weight 1 or 0, but not the real value.

Also removed unused parm in UI panel.
2018-09-14 08:57:46 +02:00
ee7236859d GP: Change fill option text 2018-09-13 18:35:45 +02:00
d6f896da22 GP: Add strength factor for eraser brush
This gives more control.
2018-09-13 18:34:34 +02:00
74a3519a15 GP: More tweaks in soft eraser
Follow with the changes to get a good feeling using the eraser.
2018-09-13 17:04:35 +02:00
a273e432cc GP: Add pressure button for eraser brushes 2018-09-13 16:52:27 +02:00
03e8de9dae Merge branch 'master' into blender2.8 2018-09-13 16:09:49 +02:00
5c10c92b23 Fix building deps when OpenCV dev package is present.
Since we are not linking against OpenCV ourselves, that generated
linking errors later on (while building OSL e.g.).
Those 'open' libs link against way too many other libs... :/

Thanks to @intrah for initial report (T56785), and @LazyDodo for
suggested solution.
2018-09-13 16:09:24 +02:00
379225d2bc GP: More changes to improve soft eraser
Small changes to improve "feeling" of the soft eraser.
2018-09-13 16:06:45 +02:00
1e3d6ae09b Gizmo: only use mousemove for generic gizmos
This caused slow performance for spin/bisect for eg.
2018-09-14 00:10:59 +10:00
3e6f37b936 Fix a crash with duplivert, and move to evaluated mesh in object_dupli.c
There are still lots of issues/TODOs here though, like missing 'cage'
for editmesh, etc.
2018-09-13 15:56:46 +02:00
3d2f596d94 GP: Add a separartion for leak size in fill panel 2018-09-13 15:40:48 +02:00
a2325495f9 Merge branch 'master' into blender2.8 2018-09-13 23:38:53 +10:00
1a4aca1b69 WM: move mousemove out of internal undo function
This causes a feedback loop in 2.8x,
where gizmo redo caused fake mousemove that executed gizmo again.

Move the mousemove into the undo/redo operator.
2018-09-13 23:28:02 +10:00
e082fc7c77 Workspaces: reference count screens, otherwise they are never freed.
They are not directly accessible in the UI anymore, it's the workspaces
that we always keep until they are manually deleted now.
2018-09-13 14:44:36 +02:00
80f083f993 Gizmo: avoid redundant value2d updates 2018-09-13 22:25:15 +10:00
00bdd04570 Gizmo: set header text when editing the value 2018-09-13 22:15:44 +10:00
5a90ebc278 GP: Sample points in both sides for soft eraser
Now the soft eraser use the previous point and not only current and next. This makes the transition smoother.
2018-09-13 13:55:33 +02:00
8326fe7aa5 Gizmo: value2d cancel, snap & precise support 2018-09-13 22:04:54 +10:00
3b8251664e GP: Improve soft eraser rounded caps
When draw segments the rounded cap must be only visible in some situations.
2018-09-13 12:39:02 +02:00
09aa446100 Merge branch 'master' into blender2.8 2018-09-13 20:15:18 +10:00
254067106e PyAPI: remove operator methods that leak memory 2018-09-13 20:10:56 +10:00
ff432a410a PyAPI: use brief description for operator repr
Only include description in docstring.

Also avoid using op_get_rna.
2018-09-13 19:59:15 +10:00
2c4f091feb Merge branch 'master' into blender2.8 2018-09-13 11:27:38 +02:00
aacdd28edd PyDoc: add bpy.app.icons to docs 2018-09-13 19:21:08 +10:00
2be1d8bbaf Tentative fix for T56770: Crash after set language to Simplified Chinese.
That bug probably did not affect 2.7x, only 2.8 with COW copying IDs in
threads... But root of the issue is that underlying boost i18n lib does
not support well multi-threaded access. So simply forbid any translation
from non-main thread. This *may* be an annoying limit at some point, but
doubt it will be any issue currently.
2018-09-13 11:20:49 +02:00
e8fa13b01e Fix leak in tool tooltip creation 2018-09-13 18:21:54 +10:00
af1cf00003 Merge branch 'master' into blender2.8 2018-09-13 18:19:24 +10:00
a6fc718029 PyAPI: add API call to get an operators type
Getting the instance leaks memory and was only meant to be used for
generating docs.
2018-09-13 18:16:06 +10:00
d538de90a7 Merge branch 'master' into blender2.8 2018-09-13 17:56:32 +10:00
9900addf11 Cleanup: _bpy.ops utility to lookup an operator 2018-09-13 17:47:56 +10:00
c197c210e4 PyAPI: add bpy.app.icons to sys.modules 2018-09-13 17:20:27 +10:00
76d67b4db4 Merge branch 'master' into blender2.8 2018-09-13 17:08:58 +10:00
44f719b632 Cleanup: use PyImport_GetModuleDict
Replace direct access using PyThreadState_GET
2018-09-13 17:06:07 +10:00
1c2358224f Merge branch 'master' into blender2.8 2018-09-13 16:35:09 +10:00
c062d360ca PyDoc: replace use of deprecated API call 2018-09-13 16:33:34 +10:00
0a23d39b9f Merge branch 'master' into blender2.8 2018-09-13 16:21:56 +10:00
99e06af9c8 Cleanup: move 'make help_features' into own file 2018-09-13 16:20:02 +10:00
a4e4dc1b75 Merge branch 'master' into blender2.8 2018-09-13 15:39:21 +10:00
ffe5b92325 PyDoc: disable ASAN exit code for doc building
Prevented docs from building on any minor issue when ASAN was enabled.
2018-09-13 15:37:30 +10:00
c2fb0bacb8 Gizmo: code comments
Note about limits of new tool-init flag.
2018-09-13 13:35:26 +10:00
f65a703cc8 Cleanup: whitespace 2018-09-13 09:26:42 +10:00
4c2ac2a02f UI: show options for smooth and randomize 2018-09-13 09:23:24 +10:00
9e5259b043 Tool System: make smooth and randomize interactive 2018-09-13 09:19:30 +10:00
1f1802307f Gizmo: value2d utility to adjust operator values
This allows any operator to interactively redo without having to
manually make each operator modal.
2018-09-13 09:10:19 +10:00
26a6e58e9a Cleanup: add editor gizmo doxy group 2018-09-13 08:33:21 +10:00
8d3a39ff56 Cleanup: use float name in property range function 2018-09-13 08:17:16 +10:00
e103618b28 Cleanup: move cycles addon check out of versioning 2018-09-13 08:00:05 +10:00
07ab3eec01 Cleanup: style 2018-09-13 07:51:59 +10:00
2a14807f39 Merge branch 'master' into blender2.8 2018-09-13 07:50:45 +10:00
6873f47ede Cleanup: GCC ignored qualifier warning 2018-09-13 07:42:38 +10:00
df289785b3 GP: Delete invisible points when use soft eraser 2018-09-12 21:26:07 +02:00
32a461adf2 Shader Editor: tweak when the UI for managing the material is enabled
- disable the UI if the currently selected object does not support materials.
- add Metaballs and GPencil as types supporting material.
2018-09-12 20:07:03 +02:00
2ab1063616 Fix T56662: Autocomplete for texture slot Crash (in console).
That pointer can be NULL, RNA default string handling does not support
that. (that whole uv_layer prop is quite nasty actually, since it does
not own that string, always borrows it from some other data :((( ).
2018-09-12 18:31:14 +02:00
2e07af36fd Fix T56763: Removing driver variable crashes Blender.
Rebuilding depsgraph is not enough, with COW we also need to ensure COW
copies get updated accordingly.

Had to tweak the generic update system here, since it was always passed
a NULL pointer for the callback arg, this should not change existing
behavior (besides crash fixing ;) )...
2018-09-12 17:48:02 +02:00
6a20e2653e GP: Reduce factor of thickness for soft eraser 2018-09-12 17:06:37 +02:00
84e9dbe38b GP: Improve SOFT eraser to affect strength and less to thickness 2018-09-12 16:55:27 +02:00
57b50f75f9 Cleanup: Spelling mistakes
Pointed by John Roper and Ray Molenkamp.
2018-09-12 16:32:18 +02:00
61462ab2b4 Multires: Use more clear naming
There are so many reshapes now, and one more is to come.
Better be explicit.
2018-09-12 16:31:04 +02:00
9d0b7babd9 GP: Fix pressure jitter problem
The pressure was not used in jitter factor.
2018-09-12 15:32:22 +02:00
6018a3b4e8 GP: Hide panels for eraser brushes 2018-09-12 15:18:23 +02:00
b172209b4b GP: Remove brush type from panel
The brush type is get from previous brush
2018-09-12 15:18:22 +02:00
0d0e8979ab FIx T56758: Outliner - Select Hierarchy not working.
Reversed logical check on object's visibility...
2018-09-12 15:03:17 +02:00
Dalai Felinto
bf709f9d36 Fix T56759: Status bar not working for multi-objects nor object mode 2018-09-12 09:55:21 -03:00
f04ddd37ea Cleanup, fullstops in comments 2018-09-12 14:39:08 +02:00
39fabaddfd GPU: Remove residue of OpenSubdiv
Was done more like a hack on top of old drawing pipeline.
Should be re-implemented to fit new draw manager closer.
2018-09-12 14:30:28 +02:00
721c691a27 Merge branch 'master' into blender2.8 2018-09-12 12:29:19 +02:00
aa844ad676 Cycles: Don't allocate Extra if BSDF allocation failed
Failed as in did not allocate due to possibly weight cutoff.
Tryign to allocated Extra storage for closure in such situation
will consfuse Cycles and cause crashes later one due to obscure
values in ShaderData.
2018-09-12 12:28:55 +02:00
e9ffe93350 Fix T56766: Bake Action Visual Keying Not Working.
Consequences of new requirement to use named keywords parameters for our
RNA API... Hopefully fixed all other cases in that file as well, but
guess we'll find more of those in comming weeks. :|
2018-09-12 11:52:06 +02:00
52baf87f1f Cleanup: move theme versioning into own function 2018-09-12 19:59:28 +10:00
915c1f3a38 GP: Cleanup unused code 2018-09-12 11:43:44 +02:00
65e155d757 Cleanup: redundant assignment is later overwritten 2018-09-12 19:51:59 +10:00
e56c5dd982 Remove ifdef's default audio device
If we want to select an audio device based on build flags,
it should be done as a final step.
2018-09-12 19:49:25 +10:00
4464a86a6e Merge branch 'master' into blender2.8 2018-09-12 11:30:35 +02:00
8f1027a58b Fix Cycles issue moving versioning to blenloader 2018-09-12 19:32:54 +10:00
f088bbae6a Cleanup: More correct terminology work
Matches threading API.
2018-09-12 11:04:42 +02:00
008ed839f4 GP: Fix problem with brush angle parameter
The angle was related to random settings, but this is wrong.
2018-09-12 10:37:17 +02:00
a3241a8ff7 CMake: Fix compilation with Bullet enabled
Obvious bug in recent CName cleanup commit, while BGE library
was indeed mentioned on that line it was to put Bullet libraries
after all the other libraries.

One day we should really switch to a CMake dependency graph to
take care of library dependencies.
2018-09-12 10:34:53 +02:00
cf376bc451 GP: Change UI panel parameter smooth order 2018-09-12 10:17:18 +02:00
759ad6aa77 Cleanup: move preference versioning into own file
It's more convenient to keep version patching in the same place,
this also splits out some function calls from version patching
and supports updating UserDef structs besides the 'U'l global.
2018-09-12 18:24:08 +10:00
ec72b3e19b Cleanup: remove BGE references 2018-09-12 17:29:13 +10:00
c13644c390 Cleanup: make shapekey functions local
Were only exposed for the BGE.
2018-09-12 17:27:22 +10:00
e6540ec175 Merge branch 'master' into blender2.8 2018-09-12 16:28:50 +10:00
2e36a1809f CMake: add openjpeg 2x search paths
Wasn't finding the include path by on Linux.
2018-09-12 16:26:15 +10:00
265b5238de Merge branch 'master' into blender2.8 2018-09-12 16:21:00 +10:00
2597cd3998 Merge branch 'master' into blender2.8 2018-09-12 15:54:07 +10:00
a8c924423e Cleanup: remove alpha_check variable from DNA
Just pass as an argument.
2018-09-12 15:48:00 +10:00
7eecc94074 Cleanup: use uint/uchar types in GPU 2018-09-12 12:19:46 +10:00
baca8344d9 Cleanup: use _len suffix 2018-09-12 12:07:35 +10:00
ef32be25c1 Fix scale-cage editmode pivot point 2018-09-12 07:27:48 +10:00
c350424014 Fix scale-cage refresh w/ view orientation 2018-09-12 07:27:46 +10:00
18986160a5 Tool System: show bisect tool options 2018-09-12 06:36:26 +10:00
8eedccb3f5 Fix T56752: Tooltip flicker alpha on redraw 2018-09-11 22:11:15 +02:00
6c6c3bad02 Cleanup: style 2018-09-12 05:57:31 +10:00
d495916547 Multires: Fix memory leak on reshape
Was happening when number of vertices didn't match.
2018-09-11 17:37:14 +02:00
57f9e31bf4 DRW: Convert common theme color to linear for viewport render
This is not 100% correct (it should use a transfer function depending
on the display profile) but this is already much better than using srgb.
2018-09-11 17:05:16 +02:00
3fbdcefa17 Subdiv: Initial implementation of CCG
Attempts to substitude CCGDM with an OpenSubdiv based structure
which has less abstraction levels. The missing part in this
substitude is a face pointers which old CCGDM/multires code was
using to stitch faces (averaging boundaries).

Another curial bit missing: "reshaping" of multires CD_MDISPS
to the state of new PBVH grids.

The new code is only available when OpenSubdiv modifier is
enabled (WITH_OPENSUBDIV_MODIFIER=ON) and with debug value of
128. This is so this WIP code is not interfering with current
production machines in the studio.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3685
2018-09-11 16:37:02 +02:00
998a804358 DRW: Don't highjack all debug values (cont) 2018-09-11 16:34:52 +02:00
1a590c7a1c DRW: Don't highjack all debug values 2018-09-11 16:27:55 +02:00
19082763dd Fix workspace order and shortcut keys not matching. 2018-09-11 16:21:00 +02:00
5a7c3d5a08 Eevee: Prepare for fullres tracing 2018-09-11 16:15:43 +02:00
aa5c543a7f Eevee: Fix downsampling shader with textureGather
This was leading to issues with all raytracing and AO algorithm.

Fix T55619
2018-09-11 16:15:43 +02:00
766d9c2937 GPUMaterial: Fix issue with coloramp and constant interpolation
It was not respecting the clamp to edge texture param because we use
texelFetch directly in this case.
2018-09-11 16:15:43 +02:00
9ac72ab69d Cloth: Fix mistake in recent angular bending commit (b6f0f8a5b5)
The angular spring force computation function was being called even in
linear mode, with empty angular springs.
2018-09-11 16:09:45 +02:00
eaf993ad94 Followup for previous PBVH commit
Didn't realize the index buffer is stored once in a BVH
and same pointer is reused. Surprisingly, simple files
were fixed with the previous fix.

Now disabled the optimization all together, and it was
simpler to just completely remove all residue of the
code. It is likely to be a different implementation
anyway, so no need to try to keep code in a semi-broken
state.
2018-09-11 15:34:09 +02:00
cde66d7916 GPUVertBuf.fill: support for objects with buffer interface.
Differential Revision: https://developer.blender.org/D3684
2018-09-11 10:03:53 -03:00
8dde1e13e2 FIx/workaround wrong number of primitives in PBVG grid buffers
Nodes can have different number of grids, so can not so simply
re-use index buffer across nodes. For now allow re-using buffer
if number of grids matches.

The issue is, number of grids is probably almost never matches,
so in order to have this optimization working need more tricks.
Maybe we can "instance" index buffers?
2018-09-11 14:45:13 +02:00
7951adfb9c UI: fix redo panel becoming permanently hidden 2018-09-11 22:39:38 +10:00
a1651ddc98 Build: require OpenJPEG 2.x minimum, remove bundled version.
* WITH_SYSTEM_OPENJPEG is removed and is now always on, this was already
  the case for macOS and Windows.
* This should not break existing Linx builds. If there is no new enough
  OpenJPEG installed, CMake will no find libopenjp2 and WITH_IMAGE_OPENJPEG
  will be disabled.
* install_deps.sh was updated with new package names, since distributions
  put this version in a new package.

Differential Revision: https://developer.blender.org/D3663
2018-09-11 12:45:05 +02:00
e1178266e7 Workspace: support reordering of workspaces from RMB menu.
Drag and drop will follow later, it's a bit complicated to make this work
reliable in the current UI code.
2018-09-11 12:43:28 +02:00
6acf8642e5 Cleanup: remove unused GPU code. 2018-09-11 11:53:56 +02:00
7c64f8537f PBVH: Fix miossing normals for grids 2018-09-11 11:50:22 +02:00
43abc5dabf GP: Use original datablock and not evaluated version
This is required to avoid COW delay while drawing.
2018-09-11 10:33:29 +02:00
65c5abc236 Cleanup: remove dead code 2018-09-11 18:30:55 +10:00
b05f9e35cb Cleanup: unused variables 2018-09-11 18:15:55 +10:00
29fa45b695 Correct merge conflict 2018-09-11 17:47:30 +10:00
01e6f09001 Merge branch 'master' into blender2.8 2018-09-11 17:45:38 +10:00
bf8aac0d49 Cleanup: unused variables 2018-09-11 17:32:21 +10:00
William Reynish
a0581daf75 UI: use property split for motion paths 2018-09-11 16:52:18 +10:00
17e57859e7 Error in last commit 2018-09-11 16:37:56 +10:00
f34a2af4b3 Fix scale cage tool never using object boundbox 2018-09-11 16:22:30 +10:00
45af6b61d9 Merge branch 'master' into blender2.8 2018-09-11 08:03:31 +02:00
0276e0e7de Build: update for new macOS libraries.
Run "make update", or "svn update" in lib/darwin to get the matching
precompiled libraries.
2018-09-11 08:02:41 +02:00
cd5db90726 Build Environment: updates for macOS.
Mainly this is following Linux to build own xml2/lzma/ssl/sqlite and linking
them all statically. This ensures the Python ssl module uses a recent openssl
version rather than a very old one shipped with macOS.
2018-09-11 07:51:17 +02:00
0117a4c351 Cleanup: use UI_ prefix for block flag 2018-09-11 15:08:08 +10:00
bdf215ca82 Merge branch 'master' into blender2.8 2018-09-11 15:01:41 +10:00
6bf003bce0 Correct own error in recent transform orientation changes 2018-09-11 15:00:50 +10:00
c317a21a4c Cleanup: replace magic number 2018-09-11 14:31:19 +10:00
a0fdea271b Workaround T56752: redo panel alpha flicker
The bug applies to tooltips, but isn't as noticeable.
2018-09-11 13:50:30 +10:00
58a8277098 GPU: utility function to unregister presets 2018-09-11 13:21:47 +10:00
0b597bf7b9 UI: use popup draw style for redo panel 2018-09-11 11:22:08 +10:00
15bab56fbc Merge branch 'master' into blender2.8 2018-09-11 11:02:37 +10:00
5bb11cfde2 UI: split theme draw style into separate field
Was using UI_BLOCK_LOOP to control draw style,
this meant we couldn't use popup theme colors for cases
where it the interface has the same purpose as a popup but happens
not to use this flag.
2018-09-11 10:56:08 +10:00
29c2c307f6 UI: workaround for glitch redo panel glitch 2018-09-11 09:20:02 +10:00
406554c4db UI: key binding draw code didn't set line-width 2018-09-11 09:20:02 +10:00
a1dda992c0 UI: disable register for insert text
Hides redo panel.
2018-09-11 09:20:02 +10:00
06ae3d3573 UI: disable register for grease pencil select
Avoid showing in redo panel
2018-09-11 09:20:02 +10:00
Dalai Felinto
207483dbfe Remaining fix for multiple text-boxes
As mentioned in d81aeb60fe the alignment for multiple text boxes should all
respect the same overall padding.

Vertical alignment is fully implemented now.
2018-09-10 18:15:36 -03:00
f176c2fdb3 Revert wrong add-on folder update 2018-09-10 22:04:53 +02:00
3319f80e03 GP: Fix performance problem with big files
During drawing, the depsgrah was tagged to update and this produced a full copy of the datablock. This tag was done in order to get the right data in drawing engine, but this added a great overhead while drawing and the response of the pen was not good.

Now, the depsgraph is not tagged and the drawing engine uses the original copy data of the buffer datablock. This is not a problem because only can draw in one window at time.
2018-09-10 20:24:37 +02:00
Charlie Jolly
89295c7f6b Eeevee: update to match recent voronoi GLSL features for Cycles.
Differential Revision: https://developer.blender.org/D3680
2018-09-10 19:48:14 +02:00
Sebastian Parborg
86aa621f4b Texture paint: properly implement image slots for principled BSDF node.
Now we can create new base color, roughness, metallic, specular, normal,
bump and displacement images, and linked them to the appropriate socket.

Also fixes image nodes inside groups not being visible.

Differential Revision: https://developer.blender.org/D3679
2018-09-10 18:56:54 +02:00
49dee07e9c Cleanup: fix compiler warnings. 2018-09-10 18:56:54 +02:00
76a4042c23 Fix Cycles principled BSDF black with transmission and IOR 1.0. 2018-09-10 18:50:15 +02:00
Dalai Felinto
b94d34915f Textbox removal and creation should update text data 2018-09-10 13:41:56 -03:00
a01fe76ded Eevee: Fix assert when using transparent shadows
Was missing some UBO bindings.
2018-09-10 18:05:11 +02:00
a4b18bd1b9 Fix T56627: Crash because of incomplete LightCache 2018-09-10 18:05:11 +02:00
2a907bea9c Fix assert when toggling Xray mode after going to Solid and lookedev/eevee 2018-09-10 18:05:11 +02:00
5e7a56dc64 Eevee: Cleanup DoF implementation 2018-09-10 18:05:11 +02:00
ec64cad5a8 Eevee: Lookdev: Fix memleak 2018-09-10 18:05:11 +02:00
defbe14077 Fix object_utils.py's matrix multiplication (use new @ syntax). 2018-09-10 18:03:40 +02:00
fc95efec06 Fix image_utils.py's load_image() helper. 2018-09-10 17:35:50 +02:00
Dalai Felinto
c0b61cf64b Silence GP warning 2018-09-10 11:40:27 -03:00
d483dfd03d Fix T56717: crash removing/adding objects.
Object bases hash always needs to be freed on library remapping.
2018-09-10 16:09:52 +02:00
b2865560a8 GP: Cleanup commented lines 2018-09-10 16:08:55 +02:00
5e89d1d96c GP: Remove annotation stroke mode
This option has not been working since a lot of time and it looks is unused. When we confirm is not used, we can remove it completely.
2018-09-10 16:08:55 +02:00
Dalai Felinto
58622eb3a6 Image/UV Editor: Remove show other option
This is no longer useful now that we have multi-object editing support.
2018-09-10 10:43:30 -03:00
0ee212682e GP: Use correct name for new Stroke object
To follow Blender standards, the name of the new primitive stroke must be different of blank object.

Also changed the default orientation of Suzanne 2D to use the same as other objects (not aligned by default)
2018-09-10 15:29:22 +02:00
0284392c48 Cleanup: More variables unused in release 2018-09-10 09:56:14 +02:00
ad713dc457 Cleanup: Warning in release builds 2018-09-10 09:50:50 +02:00
c30e12455b Correct argument type 2018-09-10 17:45:54 +10:00
18dc84dc35 Poly Build: disable use_boundary_tear
Without this, it's more like deleting the vertex than dissolving.
2018-09-10 17:35:03 +10:00
7283179a00 Poly Build: dissolve was using selection, not highlighted
Also no need to clear selection history,
BM_mesh_elem_hflag_disable_all handles this.
2018-09-10 17:29:24 +10:00
5b39b83af4 Poly Build: set newly added elements active 2018-09-10 16:24:38 +10:00
a4d126cac6 Cleanup: use title caps 2018-09-10 16:14:26 +10:00
549ac6ddeb Edit Mesh: pass Base array to picking functions
In some cases we need to use this array afterwards,
so this gives control over which objects are used for picking.

Also use an index argument as return argument
so callers that need to know the index in the array
don't need to calculate it afterwards.
2018-09-10 16:02:12 +10:00
fc06bd7236 Cleanup: use 'mesh' in preselect identifiers
We may have preselection for other types later.
2018-09-10 14:44:15 +10:00
0c2001e5ef Missing from last commit 2018-09-10 14:40:12 +10:00
a331b5dde6 Cleanup: rename edge-ring preselect file
Having all pre-selection in one file isn't so nice,
differentiate edge-ring from element pre-selection.
2018-09-10 14:38:13 +10:00
20634fd433 Tool System: use preselect highlight w/ poly-build
- Poly build now uses a new gizmo for pre-selection
  which has the same behavior as loop-cut.

  This replaces hack where mouse-move set the active element
  which was no longer working properly because of missing
  depsgraph updates.

- Multi-object support for poly-build.

- Support for deformed cage.

- Fix error where changing active object wasn't properly
  refreshing the preselect gizmo (for loopcut too).

Currently holding Alt to select non-boundary element's isn't working.
2018-09-10 14:35:04 +10:00
2b5d4d426a Cleanup: use function to set the active base 2018-09-10 14:21:11 +10:00
bb9b0fcdbe Cleanup: remove unused field args 2018-09-10 14:05:33 +10:00
6b551c0b8c Eevee: Depth of Feild: Fix ringing issue of background objects
There was an issue caused by Antialiasing being done after DoF. Move TAA
after DOF and Motion Blur.

Also certain pixel with lower CoC would be spread all over the background
because the neighbooring pixel have higher CoC. So we need to apply some
bilateral filtering when downsampling. Currently we limit the influence of
neighbor pixels with a CoC inside the range [MaxCoC-2, MaxCoC].
2018-09-09 23:26:14 +02:00
d69d68621f GP: Improve smooth interpolation calc 2018-09-09 16:06:10 +02:00
84d85f963f GP: Fix strange pressure values when drawing
This strange values produced an "explosion" of the stoke and it was very annoying.
2018-09-09 14:08:18 +02:00
d7d4baa50f GP: missing change in previous commit 2018-09-09 11:48:02 +02:00
d5d354b1a2 GP: Fix scale problem when object is parented
The stroke was not scaled as expected in child objects.
2018-09-09 11:41:25 +02:00
f074642b2c Fix T56712: Compositor image loader skips frames.
Bad removal of 'Fields' option for image sequences...
2018-09-08 16:46:44 +02:00
73e9ae608c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/lattice.c
2018-09-08 15:32:44 +02:00
4594cc25ac Fix T56720: Lattice: crash on setting points_u/v/w from python.
One need to check that there is something to free, before trying to free it...
2018-09-08 15:29:39 +02:00
5a1e9e5af8 Fix T56722: Crash - Entering mesh Edit Mode.
Seriously...
2018-09-08 11:19:07 +02:00
31b8dbf8c0 Fix extrude gizmo redo after selection glitch
It was possible to adjust extrusion after selection.
2018-09-08 13:36:47 +10:00
cb909afa12 Correct last commit 2018-09-08 13:22:34 +10:00
9189fd643a Gizmo: fix extrude depth ordering 2018-09-08 13:01:46 +10:00
f7f4c05bbf WM: add temporary field to gizmo's 2018-09-08 12:49:46 +10:00
dc29ae579f UI: make extrude gizmo similar size to transform 2018-09-08 10:50:53 +10:00
b8ac2379eb Cleanup: remove redundant assignment 2018-09-08 07:29:15 +10:00
0ffca8b7b3 Fix gizmo poll function
Missed cast switching to bool return type.
2018-09-08 07:27:29 +10:00
aa6c9ca899 Cleanup: style 2018-09-08 07:03:14 +10:00
5e942f459f UI: Disable popup for object mode delete from menu
Since there are no options to change, delete immediately.
2018-09-08 06:56:48 +10:00
570b328fac Cleanup: Update shortcut in comment 2018-09-08 06:54:03 +10:00
9c441dcd73 Gizmo: update template to use matrix multiply 2018-09-08 06:51:02 +10:00
66d275f8d3 RNA: update gizmo API for changes in Blender
- gpu module renamed.
- make gizmo.new() take type as a required argument.
2018-09-08 06:50:02 +10:00
f23319d095 RNA: Area.header_text_set text is now required 2018-09-08 06:23:25 +10:00
9c7195789d Merge branch 'master' into blender2.8 2018-09-08 06:03:29 +10:00
59eaa90300 Cleanup: move area API into own function 2018-09-08 05:59:28 +10:00
e2fc6615c4 Merge branch 'master' into blender2.8 2018-09-07 20:41:27 +02:00
639a916f12 Install_deps: fix llvm/clang ARCH package names.
Issue raised in T56540, thanks.

Also tried to re-enable using fedora's llvm/clang packages, would hope
and assume old issue here is fixed.
2018-09-07 20:39:42 +02:00
2659f3be13 Merge branch 'master' into blender2.8 2018-09-07 20:32:41 +02:00
98323160d2 Install_deps: Fix wrong URL for ILMBase/OpenEXR source archives.
They also went to github...
2018-09-07 20:31:50 +02:00
b75ebd0877 Merge branch 'master' into blender2.8 2018-09-07 20:22:57 +02:00
1d0e15c911 Install_deps: Fix building python on fedora 28
Looks like libffi is now a dependency of python as well...

Done it for the other distro as well, just in case. ;)
2018-09-07 20:21:57 +02:00
f440fdec84 Fix operators from W menu for the API changes 2018-09-07 16:41:19 +02:00
d9083212d6 GP: Replace hide icon in materials
Now the layers and materials icons are consistent.
2018-09-07 15:53:01 +02:00
2f3311ed30 Depsgraph: Cleanup, naming
If something is a list of data, it is to be called list, and data
is to be called data. No need to call list a data and data a weird
two letter abbreviation.

Clarity is our friend!
2018-09-07 15:10:24 +02:00
bf5609cc8c Annotate Tool: allow drawing dots 2018-09-07 21:16:36 +10:00
Dalai Felinto
d85ff86f7e Codestyle cleanup: uvedit_smart_stitch.c 2018-09-07 07:18:29 -03:00
601fd9683c Multi-Objects: UV_OT_stitch
Reviewers: dfelinto
https://developer.blender.org/D3645
2018-09-07 07:08:12 -03:00
db259e0889 Silence warning in release mode 2018-09-07 11:55:55 +02:00
dfeff72af7 Subdiv: Add ptex offsets to a subdiv structure
This is something what we need to know quite often from various places.
Added it as a cached value in Subdiv itself, so it can be queried easily
from any area.

Shouldn't be a problem from memory usage point of view, it's 4MB per
1M faces coarse mesh. This is very low percentage of mesh itself, and
even lower percentage of highres subdivided mesh.
2018-09-07 11:54:20 +02:00
cbab3e1e90 Cleanup: Unused undef
That symbol is never defined.
2018-09-07 11:04:54 +02:00
9c12f58908 GP: Fix unreported crash when use Alt key in Surface draw 2018-09-07 09:29:33 +02:00
49fa58e330 Gizmo: fix extrude handles
Only use the 2D selection function when 3D selection isn't defined.

Regression from e18a2c4ed7
2018-09-07 16:36:02 +10:00
066afa2198 Fix T56707: Assert changing grease pencil modes 2018-09-07 13:41:31 +10:00
ee6b95f7e0 UI: move toolbar arrow closer to button edge
Could overlap icons.
2018-09-07 12:21:24 +10:00
8115b99ecd UI: add useful information to 'Measure' tooltip 2018-09-07 11:48:03 +10:00
77c0a7e1d5 Fix missing line width for helper line drawing
Also scale by pixel size.
2018-09-07 11:35:33 +10:00
5940ea11ce Merge branch 'master' into blender2.8 2018-09-07 11:27:18 +10:00
7be3378d16 Fix normal transform orientation calculation
When using the 'normal' orientation, the normal would be ignored
if the plane couldn't be calculated.

Now use only the normal if the plane is zero length,
this was already done, just not in all cases.
2018-09-07 11:25:54 +10:00
d49cbe1936 Fix own error in changes to transform logic
Regression in 3c8e4e4180
2018-09-07 11:02:15 +10:00
3733c52985 Merge branch 'master' into blender2.8 2018-09-06 20:11:18 +02:00
a5bb401704 Cleanup: fix compiler warning. 2018-09-06 20:09:13 +02:00
0728c897d7 Fix T56704: black / NaN values in Cycles normal pass. 2018-09-06 20:06:23 +02:00
d1ab109619 Fix T56698: saving render result from compositing as EXR is empty. 2018-09-06 17:46:34 +02:00
90ea5c543a Fix T56643: crash drag & dropping ID onto a text field. 2018-09-06 17:35:16 +02:00
310e396b51 Cleanup: remove unused Blender Internal preview.blend. 2018-09-06 17:16:11 +02:00
Sebastian Parborg
329b4c3363 Fix T54329: brush texture preview not working.
With the removal of blender internal, the texture preview had to be
rewritten. Now we evaluate and write the texture directly to the
preview buffer instead of going through the renderer.

Differential Revision: https://developer.blender.org/D3670
2018-09-06 17:10:54 +02:00
5a134910b1 Fix T56705: Z axis do not displays in side views 2018-09-06 15:00:44 +02:00
b2d82d096a Fix T56706: Lattice crash when enter in edit mode 2018-09-06 15:00:44 +02:00
Dalai Felinto
5ff15a1777 Multi-Objects: orthographic support for UV project
D3375 by @Al

I did a few changes before the commit:
* Initialize flot arrays with {0} instead of memset(foo, 0, sizeof(foo)).
* Use add_v4_v4 instead of for loop.
* Rename uv_map_rotation_matrix_w_offset > uv_map_rotation_matrix_ex.

bjects: orthographic support for UV project
2018-09-06 09:26:53 -03:00
William Reynish
6eeb07b870 UI: add mark/clear seam to UV menu in 3D viewport. 2018-09-06 14:13:43 +02:00
ed7048ee05 GP: Add multiframe support to vertex group operators
Before, the operators only worked in the current frame
2018-09-06 13:37:56 +02:00
e0a4dc6a79 UI / Python: rename X-Ray to In Front, Draw to Display.
See T56648.
2018-09-06 13:26:46 +02:00
1450a37555 CMake: add missing headers 2018-09-06 21:23:25 +10:00
c89791ba78 Multi object support for UV live unwrap
D3658 by @Al
2018-09-06 20:49:31 +10:00
f1c8c25a3e UI: rename Translate/Grab to Move in UI, shortcuts stay the same. 2018-09-06 12:22:09 +02:00
32ef77bf0a UI: change default modifier name from Subsurf to Subdivision. 2018-09-06 11:49:26 +02:00
6a2305191f Cleanup: Remove unused modifier evaluation flag 2018-09-06 11:47:44 +02:00
28c363aa0b Fix bad conflict resolution 2018-09-06 11:35:40 +02:00
79e8805a9e Subdiv: Some ground work for CCG support
Nothing really interesting, just starting laying down API which
seems to be a decent substitute to CCGDM, without requiring too
much work be done in sculpting area.
2018-09-06 11:32:21 +02:00
8a3adaa485 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/space_node/drawnode.c
2018-09-06 11:31:58 +02:00
bb98eef777 Update install_deps.sh to latest libs.
Tested with Debian Testing, might need some adjustements for other
distributions...

Also removed last patches we used here, we shall not need any anymore!
2018-09-06 11:29:21 +02:00
b07d866cf6 Compositor: Always use AA on masks
In a real world it is very weird to disable AA on a mask,
it will give ugly looking result. For some fast preview
passes (like in the node preview) the system can decide
to disable AA without asking user to do anything.

One thing we can consider doing is to remove Feather
option as well. If real compo becomes measurably slower
in cases when mask has no real feather, we can disable
feather internally, without user input. Disabling
feather in the interface is like making things faster
but giving a wrong result, which doesn't sound that
helpful either.

Reviewers: brecht

Reviewed By: brecht

Subscribers: hype, sebastian_k

Differential Revision: https://developer.blender.org/D3677
2018-09-06 11:26:19 +02:00
5f66924066 Fix exception w/ grease pencil brush tooltips 2018-09-06 18:28:33 +10:00
8d3c641270 GP: Disable outdated pie menus
The pie menus were a legacy of old grease pencil and now need a full redesign or maybe a new add-on.

While we decide the way to go, the pie menus are disabled.
2018-09-06 10:17:17 +02:00
9eb1c3f70c gpu module: close quotation marks in descriptions 2018-09-06 04:43:08 -03:00
5ad36c975f gpu module: retouching the description of the types. 2018-09-06 04:39:39 -03:00
5ed9dc6852 Fix ruler not setting line width 2018-09-06 14:45:45 +10:00
1f22ef34bb Merge branch 'master' into blender2.8 2018-09-06 14:43:47 +10:00
f5daa58242 Fix ruler angle arc displaying past endpoints 2018-09-06 14:42:31 +10:00
feb3c74a05 Cycles: Allow cancel during displacement of meshes 2018-09-06 00:25:35 -04:00
31026f8c0e UI: keep showing label tooltip once it's open
This means dragging the cursor over the tools will show all labels
immediately, but only once a single label is displayed.
2018-09-06 14:22:12 +10:00
26c17b0ab1 UI: delay tool label tip display
Displaying the labels tip immediately feels too intrusive,
make this work more like regular tooltips, displaying more quickly.

Tooltips can now uses multiple passes, each pass with it's own delay
for the next pass to show.
2018-09-06 14:19:15 +10:00
59572cbbc4 UI: tweak tool bar tooltips
- Only show label-tips when tools are icon-only.
- Don't show shortcuts in label-tips.
- Position both tool label & full tips around the button bounds.
2018-09-06 11:19:14 +10:00
fa6ed6259c Cleanup: style 2018-09-06 10:47:46 +10:00
539c140b3e Correct build errors 2018-09-06 10:47:46 +10:00
6d04e48539 Join the python modules gpu and _gpu into one.
Maybe it's still early to set the new drawing api for python.
But joining these two modules is an initial step.

```
>>> gpu.
        matrix
        select
        types
```
```
>>> gpu.types.GPU
                 Batch(
                 OffScreen(
                 VertBuf(
                 VertFormat(
```
The creation of a new offscreen object is now done by the `GPUOffscreen.__new__` method.

Reviewers: campbellbarton, dfelinto

Reviewed By: campbellbarton, dfelinto

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3667
2018-09-05 21:15:44 -03:00
Dalai Felinto
b060248324 Multi-Objects: UV_OT_follow_active_quads
Starring: the overengineered error report system to make sure only one error
is reported.
2018-09-05 19:27:44 -03:00
85c9765d82 Multi-Objects: UV_OT_remove_doubles
Use kdtree for doubles (old standing TODO for this operator).

Small changes from reviewer (Dalai Felinto):
* Code style ({ is in a new line only if it is a two-line if).
* Skip objetcs loops when we know for sure nothing is selected (or all is)

https://developer.blender.org/D3441
2018-09-05 18:48:42 -03:00
Dalai Felinto
a8fffa4da8 Fix error message from MESH_OT_faces_mirror_uv
Reported/Patch by Alan Troth.
2018-09-05 17:31:04 -03:00
Dalai Felinto
5dbf9e09a8 UV_OT_lightmap_pack: Distinction between edit and object modes
I don't even know why this operator was ever made to work in object mode.
That said, since it does, we should have different options for it
(or rather, always do all faces for it).
2018-09-05 17:24:07 -03:00
Dalai Felinto
2b83b36a30 Multi-Objects: UV_OT_lightmap_pack
I removed the All Objects option. This doesn't make more sense now that
all the selected objects will be in edit mesh mode.
2018-09-05 16:58:56 -03:00
Dalai Felinto
9c1150a295 Cleanup: uvcalc_smart_project.py 2/2 2018-09-05 15:36:31 -03:00
Dalai Felinto
9710056fb5 Cleanup: uvcalc_smart_project.py
Removing old commented out code. It includes progress bar and other bits
that were never implemented for this script since the 2.5 transition.
2018-09-05 15:27:40 -03:00
Dalai Felinto
67682f567b Multi-Objects: UV_OT_smart_project 2018-09-05 15:23:42 -03:00
Dalai Felinto
92f70c45ea Multi-Objects: UV_OT_snap_selected 2018-09-05 15:02:52 -03:00
f2a166b227 Fix T56657: Crash when creating a collection instance containing probes 2018-09-05 19:32:12 +02:00
41997d171b Edit Mesh: Add back the option to not highlight selected faces/edges
Do note that we force showing the face dot if we are in face select mode
but faces and edges overlays are disable to not loose the selected faces
entirely.
2018-09-05 19:00:13 +02:00
58a90dbd97 UI: Change "Show Edge Seams" toggle position 2018-09-05 19:00:13 +02:00
b3aa0cfe75 Cleanup: Remove unnecessary uniform 2018-09-05 19:00:13 +02:00
457df4fa9b Edit Mesh: Add support for draw option parameters
The visuals was already implemented but we could not toggle them off.
2018-09-05 19:00:13 +02:00
c05b9bbcc0 Fix T56692: The edges are not highlighted in Mark Freestyle Edge
This was not ported yet.
2018-09-05 19:00:12 +02:00
Dalai Felinto
e8dc73a0c9 Fix GPU.offscreen to use depsgraph and updated API 2018-09-05 12:50:33 -03:00
Dalai Felinto
994f438af3 Multi-Objects: UV_OT_align and UV_OT_weld 2018-09-05 11:19:46 -03:00
de187c0ba7 Merge branch 'master' into blender2.8 2018-09-05 16:05:43 +02:00
94ec80d21c CCG: Remove number of layers from key
The issue there was that number of layers did not include normals,
while element size counts bytes used by normals. This sounds very
fragile and dangerous to work further. Also, one value can easily
be delivered from another, so it is redundancy going on here.

Possible difference now is that multires subdivision will copy
normals to a higher levels. Shouldn't be big of a problem, since
leaving old normals and updating coordinates is not correct either.
2018-09-05 15:56:50 +02:00
Dalai Felinto
d81aeb60fe Fix for text alignment on multiple text boxes
The original code was already making a distinction between lines in the last
text box and all lines. However I removed that bit since when I tested the
values were the same (I tested with a single text box).

Bringing this distinction back.

Not addressed here: All boxes should respect the alignment. Which at the moment
they don't seem to fully do.
2018-09-05 10:05:34 -03:00
66f8a2d67e UI: remove delete redo panel
Since the option is now hidden from the UI, add to the object menu
(without this the key binding isn't discoverable).
2018-09-05 22:57:45 +10:00
7f95ea6f78 UI: hide mesh mode element redo panel 2018-09-05 22:57:45 +10:00
William Reynish
0894f07737 UI: use grid flow for Cycles object settings. 2018-09-05 13:48:49 +02:00
be00a22c23 Fix T56695: Selecting an occluded object in xray causes crash 2018-09-05 12:53:14 +02:00
0db545554a GP: Set first color as default when create new Stroke or Monkey 2018-09-05 11:37:54 +02:00
d8ee6158e9 keyingsets_builtins: use keyword parameters 2018-09-05 11:01:17 +02:00
2ffe7dbef1 UI: tweak tooltip placement
Only apply offset w/ non overlapping placement.
2018-09-05 17:10:59 +10:00
717f976a0e Correct last commit (keep same location as brushes) 2018-09-05 16:05:00 +10:00
e965af50b3 Tool System: show weight for the gradient tool 2018-09-05 16:01:53 +10:00
8ceff4c9ee Merge branch 'master' into blender2.8 2018-09-05 15:01:58 +10:00
44d4a61ed0 Cleanup: replace doxy @ with backslash
The rest of Blender uses backslashes.
2018-09-05 14:56:29 +10:00
246aed8847 Merge branch 'master' into blender2.8 2018-09-05 14:48:18 +10:00
1be265afc0 Cleanup: style 2018-09-05 14:46:54 +10:00
1e35f4da72 Merge branch 'master' into blender2.8 2018-09-05 14:34:31 +10:00
c13b2a2504 Fix T54152: --env-system-scripts fails on win32 2018-09-05 14:32:19 +10:00
af7d0af153 UI: avoid comma which can be used in shortcuts 2018-09-05 14:03:28 +10:00
6f1f7296f4 UI: show a small label next to the tool
Instead of showing the full tip immediately when hovering over a tool,
show only the (label, shortcut), without suppressing the regular tip.
2018-09-05 13:52:19 +10:00
e1751415dc Merge branch 'master' into blender2.8 2018-09-05 12:14:53 +10:00
bb6a94fa7b Fix VSE cut both-sides option
Was ignoring the option, using the mouse in all cases.

D3671 by @ISS w/ edits.
2018-09-05 12:13:12 +10:00
Dalai Felinto
312af01fb4 3D Text: improvements to vertical alignment
They way Blender handles vertical alignment is very buggy:

- Top-Base: It works perfectly.

- Bottom: It is actually bottom-baseline,
  and it fails when line size is != 1.0 when working with text boxes.

- Top: Poorly implemented, it should use font's ascent
  (recommended distance from baseline),
  so it has room for accents,
  but it's not one line distance far from the origin (as it is now).

- Center: Poorly implemented.
  This is tricky since there is no silver bullet.

To clear this situation I created a new option (Bottom-Baseline),
and addressed the issues above.
I'm getting the ascent and descent from freetype2,
and use this for padding above/below the text.
Also for vertically centering the text.
2018-09-05 11:33:14 +10:00
053669e4ae UI: hide brush select redo panel 2018-09-05 09:34:26 +10:00
54ea26f019 Merge remote-tracking branch 'origin/master' into blender2.8 2018-09-04 17:00:44 -06:00
19c7e499e1 cycles: Fix x86 build error.
WITH_CYCLES_CUDA_BINARIES was set as a regular variable causing it to be overwritten by the release.cmake settings.
2018-09-04 16:58:41 -06:00
e1a4d58ecc Cleanup: style 2018-09-05 08:54:11 +10:00
5ca3407ac4 Correct edge rip tool operator 2018-09-05 08:46:57 +10:00
9db228c05e Multi-Objects: MESH_OT_faces_mirror_uv
Changes from reviewer (Dalai Felinto):
* pep8.
* Skip meshes that come from libraries.
* `Copy Mirrored UV coords > Copy Mirrored UV Coords`.
* Remove mesh(es) from warnings, report mesh or meshes based on number.

https://developer.blender.org/D3529
2018-09-04 17:50:37 -03:00
ecbfc7ade5 Fix T56524: Navigate Gizmo obscured by objects in orthographic view 2018-09-04 22:25:58 +02:00
ba6daadb9d GP: Reorder Viewport Display panel options 2018-09-04 22:11:18 +02:00
Dalai Felinto
e5ee12f535 Multi-Objects: UV_OT_seams_from_islands 2018-09-04 16:27:16 -03:00
4250baa471 Multi-Objects: UV_OT_minimize_stretch
Changes from Reviewer (Dalai Felinto):
* MEM_SAFE_FREE > MEM_freeN.
* Skip loop if sync selection and no face selected.

https://developer.blender.org/D3415
2018-09-04 14:37:08 -03:00
600b6f2069 UI: icon keyword argument to popmenu_begin__internal 2018-09-04 20:32:34 +03:00
e026a3b016 Multi-Objects: UV_OT_average_islands_scale
Changes from reviewer (Dalai Felinto):
* Skip loop if sync selection and no vertex selected.

https://developer.blender.org/D3406
2018-09-04 14:21:34 -03:00
a48513eca8 Multi object editing - UV_OT_mark_seam
Changes from reviewer (Dalai Felinto):
* MEM_SAFE_FREE > MEM_freeN.
* Skip loop if sync selection and no edge selected.

https://developer.blender.org/D3417
2018-09-04 13:56:21 -03:00
Dalai Felinto
577d35ef2c Multi-Objects: UV_OT_select_split 2018-09-04 12:21:01 -03:00
2dff0c99c0 Fix T56686: Crash when copy and paste Annotations
Annotations are not designed to edit, copy or paste, so the operators must be disabled.

By design annotations can only be added or deleted, but not edited.

Still pending clean the pie menus, but this will be done during UI cleanup.
2018-09-04 17:16:36 +02:00
30ae0ce0e1 Xray: Add possibility to select wires in priority before surfaces
If no wires were found, try to select surfaces in a second loop.
2018-09-04 17:15:00 +02:00
950dcaea10 Fix T56682: GP Edit mode, deselected vertices not visible 2018-09-04 17:00:27 +02:00
eead6a6046 Multi object edit: UV_OT_select_less & UV_OT_select_more
https://developer.blender.org/D3387
2018-09-04 11:51:54 -03:00
Dalai Felinto
b55e304815 Multi-Objects: UV_OT_circle_select
Although this was marked as done, it wasn't, I'm glad I caught it.
Based entirely on the uv border select operator.
2018-09-04 11:29:29 -03:00
fc115e1ab2 Cleanup: remove legacy layer and dupli code. 2018-09-04 16:11:27 +02:00
Dalai Felinto
0f50caf556 Multi-Objects: UV_OT_pin
Also introducing a way to skip the object loop when using synced selection.
I plan to use this for the upcoming operators too.
2018-09-04 11:10:50 -03:00
Dalai Felinto
9947011ade Multi-Objects: UV_OT_select_pinned
Inspired by patch from Alan Troth, with minor changes
(codestyle and update to latest source code).
2018-09-04 11:10:50 -03:00
2b1c3f3429 Subdiv: Clarity resolution parameter
Was a bit misleading, since different ptex faces will be
tessellated at different resolution, depending whether they
are coming from quad or not.
2018-09-04 16:06:25 +02:00
a92a1d9986 Correct doxygen file headers 2018-09-04 15:45:48 +02:00
c9707a408f Subdiv: Move mesh creation functionality to own header 2018-09-04 15:34:52 +02:00
916edab639 Subdiv: Move evaluation functionality to own header 2018-09-04 15:34:52 +02:00
f1508cc8d5 Subdiv: Move FOREACH functionality to own header 2018-09-04 15:34:52 +02:00
3f76c54a68 Subsurf: Clarify what Subdiv structure is for 2018-09-04 15:34:52 +02:00
f1de256ea0 Fix T56679: Blender 2.8 crashes with bezier curve snap.
Follow up to rB621b16468ef72fb actually... Seriously... :/
2018-09-04 14:31:21 +02:00
4dfc846fe3 OpenSubdiv: Disable varying elements interpolation
We currently don't use those. Skipping creation of stencils for
them gives about 7% speedup of evaluation creation.
2018-09-04 12:38:54 +02:00
3c04ef63f8 Cleanup: Typo in comment 2018-09-04 12:30:06 +02:00
f87533ba6f UI: keep no-overlap tips open on cursor motion
Was causing flicker.
2018-09-04 19:35:22 +10:00
3140304940 Cleanup: overly polite/rude messages 2018-09-04 18:45:17 +10:00
3cb936295f Fix mistake in previous commit 2018-09-04 10:22:55 +02:00
765d1eadb9 Fix error when no tool is active 2018-09-04 18:31:02 +10:00
9b2e336cdf Cleanup, indentation 2018-09-04 10:21:26 +02:00
7bb856b3c8 Fix assert creating a tools tip 2018-09-04 18:20:51 +10:00
571aead323 UI: support immediate non-overlapping tooltips
Use these for the toolbar, since they're non-overlapping the interface,
showing them quickly isn't a problem.
2018-09-04 18:05:17 +10:00
e913e79fb5 Merge branch 'master' into blender2.8 2018-09-04 17:34:46 +10:00
8cd6e22ec0 Cleanup: use const arg for BLI_rect inside check 2018-09-04 17:33:12 +10:00
621b16468e Fix T56675: Crash when snapping Cursor to selected a Bone in Edit Mode.
Seriously...
2018-09-04 09:13:21 +02:00
531183dfd8 Merge branch 'master' into blender2.8 2018-09-04 15:29:27 +10:00
52f4531eeb UI: cleanup tooltip bounds clamping
Wasn't properly clamping on the window minimum.
2018-09-04 15:26:50 +10:00
113c180902 UI: show tool name in tip w/ icon-only display 2018-09-04 14:37:19 +10:00
25c1c0455a Fix T56660: Use horizontal enums w/ image template 2018-09-04 14:09:45 +10:00
578879253d UI: use horizontal alignment for expanded enums
With the property separate option, the direction of expanded enums
now follows the current layout.
2018-09-04 14:09:37 +10:00
1d04d7721b Cleanup: pep8 2018-09-04 08:50:11 +10:00
f428efc6db Correct toolbar tips for non sculpt modes 2018-09-04 08:13:54 +10:00
William Reynish
549592274a UI: tweak object viewport display panel, use grid flow. 2018-09-03 19:35:25 +02:00
William Reynish
544c8453d5 UI: use grid flow for metadata panel. 2018-09-03 19:35:25 +02:00
fbbadc8775 Fix T56544: Crash on startup with Radeon + Win 7
Testing GLEW_ARB_texture_gather is not sufficient in this case. We need to
test if GL_ARB_texture_gather is defined in the shader, which is always true
on some NVIDIA drivers who does not support it...
So trying to make everything work.
2018-09-03 19:21:23 +02:00
William Reynish
cdd8a430d3 UI: reorganize render output and encoding panels for single columns.
This will look a bit better once horizontal expanded enums work.
2018-09-03 17:51:04 +02:00
f1f99c4991 Fix T56667: missing sockets with Cycles render layer nodes in compositing. 2018-09-03 17:49:52 +02:00
a43ebc63fa Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/collision.c
2018-09-03 17:44:36 +02:00
265ec400ab ClosthCollision: fully avoid computing BVHTree when we have no collision objects to test against.
Followup to rBc6bbe6c5aac29, much more elegant solution to the problem. ;)
2018-09-03 17:32:46 +02:00
b46e987a70 Fix T56423: Fully broken drag'n'drop parenting in Outliner.
`BKE_libblock_find_name()` expects ID names *without* ID type 'prefix'...
2018-09-03 17:25:41 +02:00
b0067db852 Cleanup: Split function up
We would need to at least support one more PBVH building
here, trying to squeeze everything into one function will
make it really hard to read and follow.
2018-09-03 17:07:46 +02:00
4da2acae3a Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3668
2018-09-03 16:55:01 +02:00
b812dfd161 Fix T56622: crash and other bugs deleting scenes.
Simplify library remapping code to handle special collection/object links
in postprocess. Previously base contained the actual object link which
needed special handling in preprocess, now objects are linked through
collection and the base cache can be updated in postprocess.
2018-09-03 16:29:59 +02:00
Dalai Felinto
27c954386b Weightpaint mode: Removing barbarian batch tagging on engine init
This was introduced in the original implementation of weightpaint
in 2.8 (20f95de6ba). But this is very shortsighted, we can't assume only one
object will be edited at once, nor should we tag things during drawing.

There is a chance this introduces "bugs". If it does, we then tackle them in the
proper way (usually tagging DEG after operators changing the weight paint data).
2018-09-03 11:17:53 -03:00
70382fe7b3 Topbar: Remove unused variable 2018-09-03 16:13:27 +02:00
f922881620 Fix T56666: Crash typing "w" in the search function.
One shall check object is a GPencil one, before trying to use ob->data...
2018-09-03 16:06:56 +02:00
101b2ce7b6 Depsgraph: Cleanup, put symbols to a proper namespace 2018-09-03 16:05:41 +02:00
Dalai Felinto
eb2226dde2 Multi-Object Editing: MESH_OT_bridge_edge_loops by Philippe Bachour
I (Dalai) did a few changes before committing:
* Code style (mostly tabs instead of space).
* Skip loop when no vert selected.
* Keeping comment on why always return FINISHED.

Maniphest Tasks: T54643
https://developer.blender.org/D3338
2018-09-03 10:52:50 -03:00
2580399498 Fix T56593: Crash when enabling collection with curves
Was missing update of ID blocks which are becoming visible.
2018-09-03 15:36:20 +02:00
30a2ad8efe Merge branch 'master' into blender2.8 2018-09-03 15:33:07 +02:00
Dalai Felinto
3dee8b4a12 Multi-Objects: OBJECT_OT_vertex_group_smooth
In this case we call the operation multiple times.
2018-09-03 10:30:59 -03:00
c6bbe6c5aa Fix (unreported) potentially giant memory leak in Cloth collision solver.
Not freeing its BVHTree in case there were no collision objects,
could quickly lead to hundreds of MB of memleak!
2018-09-03 15:30:33 +02:00
d57cb8fa22 Depsgraph: Use more meaningful name for flags storage 2018-09-03 15:20:06 +02:00
e152483a32 Tool System: add paint brush shortcut 2018-09-03 23:19:27 +10:00
0a26c122ed Eevee: Fix missing meshes on Win + Intel HD 530/540
This is only a workaround. The real issue should be adressed by the
driver team upstream.
2018-09-03 14:38:06 +02:00
c6037b39a1 Fix slow .blend file load due to recent accidentally committed debug code. 2018-09-03 14:20:34 +02:00
cd693955ad Set active base to NULL if its object is gone 2018-09-03 13:42:47 +02:00
3451cb56db Depsgraph: Cleanup, make it more obvious what ID references 2018-09-03 12:57:04 +02:00
6690816fe5 Depsgraph: Cleanup, make it more clear what function does 2018-09-03 12:55:26 +02:00
6ba5dc9147 Depsgraph: Generalize storage for already existing ID nodes
Currently no functional changes, just allows to store mo information.
2018-09-03 12:39:56 +02:00
296a1afc0c Cleanup: Remove unused lay_updated
Is no longer used, having it around was more of a confusion than
anything else.
2018-09-03 12:17:55 +02:00
73a474dd8b Depsgraph: Cleanup, indentation level 2018-09-03 12:11:11 +02:00
Alex Fuller
107f1c0a2b Fix Cycles half float pragma for strict OpenCL compilers (like ROCm).
Differential Revision: https://developer.blender.org/D3669
2018-09-03 12:03:56 +02:00
cc03218962 Fix T56659: Flow UI: Checkboxes report wrong width, making layouts jump to multi-columns too soon.
Wrong handling of ideal width when splitting buttons and labels appart
for checkboxes...
2018-09-03 11:07:29 +02:00
4bfc236d39 Cleanup: warning 2018-09-03 18:24:45 +10:00
ff59553dc9 GP: Cleanup function parameter
There was a mix of enum parameters and int/bool values.
2018-09-03 10:14:13 +02:00
ad68470d44 Fix exception running toolbar w/o an active space 2018-09-03 14:22:58 +10:00
ba21c27e76 Cleanup: use single quotes for enum's 2018-09-03 14:15:18 +10:00
0be6146d26 UI: remove rotate/reverse UV's from menu
These are quite obscure operations and are already available in the
"Face Data" menu.
2018-09-03 14:03:32 +10:00
660477f4a4 UI: disable key shortcuts for tools
Only show shortcuts in the tooltips since they use different logic.
2018-09-03 13:56:33 +10:00
d015c1db3e Cleanup: replace __import__ w/ import argument 2018-09-03 12:53:42 +10:00
88a893a838 Merge branch 'master' into blender2.8 2018-09-03 12:48:51 +10:00
7ff1750218 PyAPI: add optional imports to expression eval API
Avoids having to use `__import__` to access modules.
2018-09-03 12:43:43 +10:00
0c389862c4 Tool System: Show popup accelerators in tooltip
The tooltips for tools in the toolbar now show how to access.
2018-09-03 11:29:37 +10:00
0e09ee3350 Tool System: map keys bound directly to a tools
If a key is bound to activate a tool in the tool-system,
add this to the popup keymap.
2018-09-03 11:11:56 +10:00
4893b8c693 Fix toolbar popup outside the window region 2018-09-03 10:19:30 +10:00
41f4d21079 Fix part of T56654: Freestyle hiding viewlayer buttons when there is no lineset.
Buttons' context 'path' has to bee handled carefully, especially when
building more than one step in a single call...
2018-09-02 15:30:06 +02:00
32e8f2e982 Keymap: Double tap A-Key to de-select all
Uses double click events for the keyboard, which wasn't used before.

Experimental feature suggested by @venomgfx
2018-09-02 21:41:30 +10:00
8c74462f18 Cleanup: move select all/none/invert into template 2018-09-02 21:25:14 +10:00
4e3457115c UI: correct unintended space in string formatting 2018-09-02 20:05:45 +10:00
3cba77f16b Merge branch 'master' into blender2.8 2018-09-02 19:45:56 +10:00
4bb8dba340 Cleanup: move keymap helpers into own file 2018-09-02 19:37:09 +10:00
127603f70e Merge branch 'master' into blender2.8 2018-09-02 18:56:02 +10:00
0ddf3e110e Cleanup: comment blocks 2018-09-02 18:51:31 +10:00
ae57383648 Cleanup: comment blocks 2018-09-02 18:28:27 +10:00
6abb37babc Cleanup: style 2018-09-02 16:49:45 +10:00
83199b6430 Cleanup: shadow warning 2018-09-02 16:27:44 +10:00
Dalai Felinto
a5f950ed38 Fix MESH_OT_loop_select: Deselect object objects
Before that if you loop select a mesh, it would deselect the previous selected
edges of the selected mesh, leaving the other objects untouched.
2018-08-31 17:43:59 -03:00
Dalai Felinto
f6b902a9ca Follow up to MESH_OT_offset_edge_loops
Committing this as a separate commit since we may want to keep this mode syncing
elsewhere. But for now it makes sense to do it like this.
2018-08-31 17:23:34 -03:00
efd843b51c Multi-Objects: MESH_OT_offset_edge_loops
Changes from reviewer (Dalai Felinto):
* Code style (replace tabs with spaces).
* Return OPERATOR_CANCELLED if no a single object get through.

Maniphest Tasks: T54643
https://developer.blender.org/D3392
2018-08-31 17:14:56 -03:00
Dalai Felinto
41759e74de Fixup for MESH_OT_vertices_smooth_laplacian
Failing to repeat should return, but continue the object loop.
Should test for selected vertex, not face.
2018-08-31 17:02:37 -03:00
Dalai Felinto
3065dc435c Fixup for multi-objects snap functions
Sanitizing the use of TransVertStore, making sure it is always freed.
Skip meshes with no vertex selected.
2018-08-31 16:46:16 -03:00
Dalai Felinto
0610c09f8c Fix memleak on snap_curs_to_sel_ex 2018-08-31 16:25:37 -03:00
Dalai Felinto
b0c146a9eb MESH_OT_symmetrize: Cleanup, get op->ptr props outside objects loop 2018-08-31 15:53:07 -03:00
n-kall
7f9768cb80 Multi-Objects: MESH_OT_symmetry_snap
Reviewers: dfelinto
Differential Revision: https://developer.blender.org/D3374
2018-08-31 15:52:16 -03:00
Dalai Felinto
53ae9b1034 MESH_OT_blend_from_shape: Add error when no selected vertex
This is just something simple I caught while testing the patch for multi-object.
2018-08-31 15:23:02 -03:00
6ae09dfcad Multi-Object-Mode: MESH_OT_blend_from_shape
"Blend from Shape" lists keys from active object and applies to all selected
objects that have keys with a matching name.

Changes from reviewer (Dalai Felinto):
* Code Style.
* Move Object **objects after sanity check to prevent leak when
  returning OPERATOR_CANCELLED.
* Skip objects that have no selected vertex.
* Fixed existent comments code-style: Since we are changing the indentation of
  these lines, may as well correct this as well.

Differential Revision: https://developer.blender.org/D3656
2018-08-31 15:20:21 -03:00
Dalai Felinto
f3a1ca1872 MESH_OT_shape_propagate_to_all: Add error when no selected vertex
This is just something simple I caught while testing the patch for multi-object.
2018-08-31 14:21:35 -03:00
3a43528274 Multi-Objects: MESH_OT_shape_propagate_to_all
Pressing "Propagate to Shapes" now propagates the current shapes to the selected
object's respective keys, if at least one selected object has shape keys.

Discussion here:
https://devtalk.blender.org/t/behaviour-of-shape-keys-in-multi-object-mode/1956/4

Changes from reviewer (Dalai Felinto):
* Code style
* Error message
* Remove dead code

Reviewers: dfelinto
Differential Revision: https://developer.blender.org/D3651
2018-08-31 14:20:56 -03:00
7f36fb458c Merge branch 'master' into blender2.8 2018-08-31 17:08:29 +02:00
8a3b548cb2 Buildbot: Usable PIE
Makes it impossible to run from GUI on certain platforms, see T56628.
2018-08-31 17:07:30 +02:00
Dalai Felinto
fede95aa68 Cleanup: edbm_do_smooth_laplacian_vertex_exec 2018-08-31 11:45:53 -03:00
1f30232aa7 Multi-Object-Editing: MESH_OT_vertices_smooth_laplacian
Since D3284 was inactive for a long time, I figured I could finish this.

This revision also gives warning when there are no selected faces or when
selected faces are invalid.

Changes from reviewer (Dalai Felinto) :
* Code style
* Fix checking for ngons (BM_ITER_MESH is a for loop, you need to break from it
before continuing the object iteration loop).

Differential Revision: https://developer.blender.org/D3659
2018-08-31 11:45:53 -03:00
b6f0f8a5b5 Cloth: Implement angular bending springs
This implements angular bending springs for cloth simulation. This also
adds shearing springs for n-gons.

This angular spring implementation does not include Jacobian matrices,
as the springs can exist between polygons of different vertex counts,
rendering their relationships asymmetrical, and thus impossible to solve
with the current implementation. This means that the bending component
is solved explicitly. However, this is usually not a big problem, as
bending springs contribute less to instability than structural springs.

The the old linear bending model can still be used, and is the default for
existing files, to keep compatibility. However, the new angular bending
model is the default for any new simulation.

This commit makes small breaking changes, in that shearing springs are
now created on n-gons (also in linear bending mode), while n-gons were
previously ignored.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D3662
2018-08-31 16:39:43 +02:00
e3d31b8dfb Cloth: Componentize forces
This separates cloth stiffness and damping forces into tension,
compression, and shearing components, allowing more control over the
cloth behaviour.

This also adds a bending model selector (although the new bending model
itself is not implemented in this commit). This is because some of the
features implemented here only make sense within the new bending model,
while the old model is kept for compatibility.

This commit makes non-breaking changes, and thus maintains full
compatibility with existing simulations.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D3655
2018-08-31 16:33:59 +02:00
Dalai Felinto
ec3357e03a Multi-Objects: VIEW3D_OT_snap_selected_to_cursor by Habib Gahbiche
Objects in edit mode now behave as if they were joined.

Changes from reviewer (Dalai Felinto): code style (tabs, spaces, ...), missing MEM_freeN(objects);

https://developer.blender.org/D3648
2018-08-31 11:06:28 -03:00
d9b9a46aa3 Python: Enable MASS unit in FloatProperty
MASS unit was already implemented for the C api. Only making sure it is
accessible in the python api. Also added 'CAMERA' to the documentation as a valid option.
2018-08-31 15:00:38 +02:00
Dalai Felinto
6c87958dac Fix Text Boxes not drawing
I'm using a different shading group for the active text box and the others.
This way I can assign different colors to them.

The alternative would be to create a new `shgroup_dynlines_dashed_flat_color`,
but I find this overkill for such a simple use case.
2018-08-31 09:53:44 -03:00
df62deb0a7 Remove CCGDM from PBVH
The statement that PBVH needs to keep track of CCGDM is wrong, PBVH itself
does not care about CCGDM at all, and it's weird for it to carry on this
beast so others can access.

Even more, nobody will actually caring about CCGDM itself, all the usages
were checking whether there is CCGDM or not. This is as good as simply
checking PBVH type.

Tested with an original report T53551 and everything is still stable.
2018-08-31 14:06:26 +02:00
d7c58cd8f7 Fix broken decorate buttong dragging after recent changes. 2018-08-31 13:35:07 +02:00
3f2090f401 Merge branch 'master' into blender2.8 2018-08-31 13:00:19 +02:00
671c54f692 Fix T56618: crash in release builds when GHOST asserts.
WITH_ASSERT_ABORT was not disabled for release builds. In most cases asserts
are disabled in release builds, but not always.

This also changes the buildbot to use blender_release.cmake instead of
blender_full.cmake, the only effective difference should be WITH_ASSERT_ABORT.
2018-08-31 12:43:39 +02:00
9492522db5 Fix T56618: crash when typing certain characters on Linux. 2018-08-31 12:43:39 +02:00
f18de82cd4 Merge branch 'master' into blender2.8 2018-08-31 12:30:19 +02:00
e51f51d55d Cycles: Cleanup, use explicit comparison with NULL 2018-08-31 12:28:12 +02:00
8ee76535da Fix T56626: Cycles ambient occlusion only local : crash
Was caused by missing NULL pointer check in BVH8.
2018-08-31 12:14:36 +02:00
ca73883e19 Cleanup: Remove unused field 2018-08-31 09:54:35 +02:00
ac9e1e692c Merge branch 'master' into blender2.8 2018-08-31 14:53:34 +10:00
976f14fbcf PyAPI: replace checks for invalid input w/ assert
Was returning -1 as a bool argument,
in this case the caller needs to ensure non-null args.
2018-08-31 14:51:59 +10:00
b1ccb6ad25 Tool System: support tool description for tips
When the description isn't set, the operators is used instead.
2018-08-31 14:37:10 +10:00
39ee0f01e3 Merge branch 'master' into blender2.8 2018-08-31 14:25:42 +10:00
98800aa4e0 C/Python API: Add PyC_RunString_AsIntPtr
Utility to get an int or pointer from a Python expression.
2018-08-31 14:21:32 +10:00
7c6136b35c Merge branch 'master' into blender2.8 2018-08-31 13:40:10 +10:00
18d135d05c Cleanup: rename WM_keymap_find -> WM_keymap_ensure 2018-08-31 13:36:46 +10:00
e3c110e72e Fix T56619: Transform crash w/ curve deform 2018-08-31 11:15:09 +10:00
Dalai Felinto
f436e0acab Cleanup: GPU_BATCH_DISCARD_ARRAY_SAFE (deduplicate existing code) 2018-08-30 17:49:05 -03:00
Dalai Felinto
7527f2317a Fix Font object: text selection and cursor not updating 2018-08-30 17:49:05 -03:00
Dalai Felinto
7874f5e5a1 Silence Grease Pencil warning 2018-08-30 17:49:05 -03:00
ebed5323e0 GP: Change icon identfier for shaderFx
This commit complements commit d2ad256326
2018-08-30 19:22:24 +02:00
bb531da566 UI: remove context path from tool settings tab in properties editor. 2018-08-30 17:56:54 +02:00
d2ad256326 UI: add dedicated icon IDs for decorators, tool settings, shaderfx, overlays.
The preset and decorator icons were updated to be monochrome and draw in the
same color as text. Other icons are unchanged, having them as separate icon IDs
prepares for an artist to make them.
2018-08-30 17:56:54 +02:00
af21053087 Merge branch 'master' into blender2.8 2018-08-30 17:40:06 +02:00
94ea566b5a Cycles: Cleanup, whitespace after keyword 2018-08-30 17:34:11 +02:00
b491577cb7 Cleanup: Improve comments 2018-08-30 16:44:52 +02:00
a9664fa666 GP: Fix unreported surface missing strokes
When drawing in surface mode if the stroke z-depth was not valid, the stroke was created, but it was not visible because location was something illogical.

Now, if the z-depth cannot be calculated, the stroke is calculated as it was done in other modes.
2018-08-30 16:42:52 +02:00
9f78f471d7 Workspaces: switch object mode when switching workspaces.
In the workspace properties a mode can now be configured that is
automatically enabled when switching to the workspace.

This is a test to validate how well it works. The weak point is
that if you don't have an appropriate object already select it will
not switch modes.

See T56475.
2018-08-30 16:10:03 +02:00
df8a7ec3a8 Fix fox strict flags: Avoid sign cast of strlen() result 2018-08-30 14:14:18 +02:00
cdcd648547 Merge branch 'master' into blender2.8 2018-08-30 14:09:58 +02:00
caa12b17e2 Buildbot: Correction to previous commit 2018-08-30 14:09:14 +02:00
9dbef08621 Buildbot: Attempt to fix glibc-2.19 compilation
It is likely to be retired, but for until then lets ensure it works.
2018-08-30 14:07:48 +02:00
caa7f749ed Merge branch 'master' into blender2.8 2018-08-30 13:59:34 +02:00
9b937c8404 Outliner: support dragging multiple collections, same as objects. 2018-08-30 13:59:17 +02:00
961881495f GP: Undo previous Subdivide edit operator and reformat code
The previous commit reusing the subdivide modifier code was not taking in account the selected points, so the subdivide was wrong.
2018-08-30 13:45:12 +02:00
8c3d2e549c Cycles: Fix detection of CPU brand string on 32 bit platforms
The assembler template was backing up and restoring ebx, which is
fair enough. However, this did not prevent compiler for putting
result variables to ebx. This was causing data corruption.

In order to prevent this easiest solution is to list ebx in clobbers
for the assembly.
2018-08-30 12:52:27 +02:00
41d1af9a11 UI: check prop-separate before adding black decorator
This caused the blank icon to be added to menus (ndof menu for eg).
2018-08-30 20:50:06 +10:00
5e66791b86 Cleanup: warnings 2018-08-30 20:48:00 +10:00
49041e5611 Fix T56612: crash in Cycles viewport render update, after recent changes.
BVH8 refitting code had a bug.
2018-08-30 12:46:46 +02:00
9a646b6a20 GP: New Armature modifier and tools to handle weights
This commit adds a new armature modifier for grease pencil. The deformations are done reusing the mesh deform routines.

There is also a new operator in weight paint mode to help the artist to generate weights base on armatures. This operator is required because 2D animation workflow is not equal to meshes when parent an object to armatures.

In the drawing engine has been added the option to handle the Fade object parameter used in armatures to see the strokes while move the bones.

When rename bones, all related data of grease pencil is renamed too. This not only affect new armature code, but also layers parented and hook modifiers.

Thanks @aligorith for his review and help.
2018-08-30 12:23:08 +02:00
22dc248f14 Fix T56610: crash saving images with python API. 2018-08-30 12:19:27 +02:00
a1b38a635e Cleanup: license header formatting. 2018-08-30 12:09:47 +02:00
9d00b0f796 Cleanup: Remove line introduced by error in previous commit 2018-08-30 11:18:04 +02:00
f2d8241b23 GP: Add weights while drawing strokes
Now it's possible to add the weight of the current selected vertex group to any new stroke created.

This is very handy when add drawings after the weight paint was done and it will be required with Armatures.
2018-08-30 11:11:47 +02:00
0845b1c8c8 GP: Improve Subdivide and Simplify
Now the weights are managed in the operators.

The subdivide operator and modifier code have been replaced with a shared function.

Some cleanup also.
2018-08-30 11:11:47 +02:00
4939769cd6 Build environment: Tweak to harvasting script
The idea is to make find_package() to succeed without any
extra tips given. For this, we need header files to be
harvasted.
2018-08-30 11:03:25 +02:00
3071d67c3a UI: fix glitch redrawing after redo panel collapse 2018-08-30 19:00:37 +10:00
edef141d0b GP: Add small offset to stroke over surface.
This small offset helps to keep the stroke over the surface and avoid the stoke is "inside" the face of the surface.

We could add this as a parameter in the UI, but after doing a lot of test, the valid values are very limited and don't worth the change, so a hardcoded value works fine.
2018-08-30 10:17:48 +02:00
5c0fb95d04 Buildbot: Get rid of OpenJPEG 2 hack
Also clarified some options and decisions.
2018-08-30 10:00:23 +02:00
1fdde7892d CMake: Automatically detect OpenJPEG 2 libraries
There is chance that on a system with both versions installed this
*might* cause some issues. Such system will be pain to support out
of the box anyway.

This change allows to use precompiled libraries without extra
modifications in the config.
2018-08-30 09:55:40 +02:00
e74d7d6f81 3D View: option to always show center in face mode
This matches 2.7x behavior
2018-08-30 16:21:03 +10:00
7dd24ba6e8 3D View: use thicker edges when in edge-mode
Without this there is no visual differentiation between face/edge mode.
2018-08-30 15:54:23 +10:00
84cc111e8b 3D View: scale edit-mesh drawing by pixel size 2018-08-30 14:28:50 +10:00
2093b79ee7 Cleanup: inline icon conditional 2018-08-30 13:47:27 +10:00
e9c2477a84 UI: show workspace panel last & use a parent panel 2018-08-30 13:30:16 +10:00
8ace389fc4 UI: move workspace panels to tool settings
While this isn't the most logical place, there are very few workspace
options and they don't need to be in such a prominent location.
2018-08-30 13:06:03 +10:00
a4a9f4b3d1 Transform: fix redundant gizmo constraint axis
Setting the constraint caused the redo to show
redundant XYZ constraints UI.
2018-08-30 09:17:12 +10:00
9a66905b08 UI: use property split for mesh options 2018-08-30 09:05:48 +10:00
add923f98a UI: add active tool panel to tool settings 2018-08-30 09:00:39 +10:00
6fa7fa6671 MSVC: Set the warning C4189 from level 4 to level 3
This is a useful warning and there is an equivalent used in `GNUC` and `clang` compilers.

Reviewed on IRC by @brecht and @LazyDodo
2018-08-29 13:59:04 -03:00
3a87641aa8 Fix Freestyle build error after recent merge. 2018-08-29 18:54:04 +02:00
75b781fe8d Correction to previous commit
Should not include ABI.
2018-08-29 18:37:49 +02:00
fd352cf8f6 Buildbot: Tweak configuration to actually ve successful in chroot 2018-08-29 18:32:27 +02:00
7a6911a10c Buildbot: Make configuration to pass config state
- Foe some reason CMake's platform and processor are not intialized there.

- Need to set variables in cache, otherwise they are not visible in the
  actual CMake files.
2018-08-29 17:57:30 +02:00
89186595de Cleanup: add file doxy comments 2018-08-30 01:56:08 +10:00
0efecba957 Merge branch 'master' into blender2.8 2018-08-30 01:38:16 +10:00
39eb051616 Cleanup: indentation 2018-08-30 01:31:20 +10:00
21105e1b1f Cleanup: use simple early exit for common case
Caused MSVC warning, may as well do simple check.
2018-08-30 01:19:44 +10:00
cc5d55fad4 Merge branch 'master' into blender2.8 2018-08-30 01:05:46 +10:00
76a9752be2 Cleanup: trailing space 2018-08-30 01:05:13 +10:00
927cf918fa Cleanup: trailing space 2018-08-30 01:02:44 +10:00
2c0f22f49c Cleanup: correct header guard 2018-08-30 01:02:26 +10:00
fd2615fd9b Merge branch 'master' into blender2.8 2018-08-29 16:42:32 +02:00
ddf8c49736 Fix Cycles CUDA build after recent changes. 2018-08-29 16:35:21 +02:00
8864dde5bb Cleanup: remove unused build environment patches. 2018-08-29 16:32:07 +02:00
a7f5418caa Cleanup: consistent includes. 2018-08-29 16:32:07 +02:00
c3a6b18537 Buildbot: Some inital work to support newer chroot environment 2018-08-29 16:29:25 +02:00
0d085790d1 Python / Cleanup: rename INFO_MT to TOPBAR_MT/VIEW3D_MT to reflect actual location. 2018-08-29 16:25:50 +02:00
42f7767dab Cleanup: rename files from group to collection to match contents. 2018-08-29 16:25:50 +02:00
2385fda448 CMake: Allow specifying custom LIBDIR on Unix
Works similar to how maxOS deals with this.
2018-08-29 16:15:54 +02:00
31278eb4bc Merge branch 'master' into blender2.8 2018-08-29 16:09:59 +02:00
e81c352746 Tool System: hide paint options for non brush tools 2018-08-29 23:58:44 +10:00
b2c707747d CMake: Comply with include path reported by FindOpenGL.cmake
The script clearly states:

  This makes the presumption that you are include al.h like
  #include "al.h"
  and not
  #include <AL/al.h>
  The reason for this is that the latter is not entirely portable.
  Windows/Creative Labs does not by default put their headers in AL/ and
  OS X uses the convention <OpenAL/al.h>.

This commit makes default precompiled OpenAL to be properly detected
and also removes hack on MacOS which was finding the OpenAL package but
then was overwriting include directory.

Note, that new audaspace in 2.8 is using expected #include <al.h>.
2018-08-29 15:08:28 +02:00
987b3abeb4 CMake: Make sure zlib folder comes first for precompiled Linux libraries
Without this find_package(ZLIB) will find ZLib from OpenCollada folder,
which has older ABI and is not what was used to link PNG against.
2018-08-29 15:05:03 +02:00
73f2056052 Cycles: Add BVH8 and packeted triangle intersection
This is an initial implementation of BVH8 optimization structure
and packated triangle intersection. The aim is to get faster ray
to scene intersection checks.

    Scene                BVH4      BVH8
barbershop_interior    10:24.94   10:10.74
bmw27                  02:41.25   02:38.83
classroom              08:16.49   07:56.15
fishy_cat              04:24.56   04:17.29
koro                   06:03.06   06:01.45
pavillon_barcelona     09:21.26   09:02.98
victor                 23:39.65   22:53.71

As memory goes, peak usage raises by about 4.7% in a complex
scenes.

Note that BVH8 is disabled when using OSL, this is because OSL
kernel does not get per-microarchitecture optimizations and
hence always considers BVH3 is used.

Original BVH8 patch from Anton Gavrikov.
Batched triangles intersection from Victoria Zhislina.
Extra work and tests and fixes from Maxym Dmytrychenko.
2018-08-29 15:03:09 +02:00
5269a3c1af Tool System: tool to extrude along normals 2018-08-29 23:00:57 +10:00
66f8a4c07e Build environment: Fix compilation of boost on Linux 32bit 2018-08-29 14:11:32 +02:00
efab903107 Missed last commit 2018-08-29 18:43:32 +10:00
1858689afb Cleanup: rename manipulator -> gizmo 2018-08-29 18:40:32 +10:00
William Reynish
1bc9f60e5b Icons: update to r62135
- Added icon for To Sphere
- Added icon for Shear
- Added icons for adding mesh objects
- Added icon for Curve Draw
- Add Curve Extrude to Cursor icon
- Tweak Curve Draw icon
- Simplified Hair Cut icon. Was hard to read
- Tweaks to Hair Puff and Smooth icons
- Added icon for Extrude Along Normals
- Updated Extrude Individual icon to become clearer and more consistent
  with "Extrude Along Normals". Now it's easy to see the difference.
- Rip Edge and Rip Region icon tweaks

Note, many icons are regenerated in this commit which
weren't intended to be changed, in some cases this looks to be caused
by material color. Generating again doesn't modify so it
shouldn't be changing every time in future.
2018-08-29 18:35:39 +10:00
54a13da1b1 Tool System: only show select tool w/ paint mask 2018-08-29 16:26:50 +10:00
a81290ddeb UI: disable brush popover in particle mode
This currently duplicates the same settings.
2018-08-29 15:51:02 +10:00
b72e81bfd0 UI: refactor particle panel/topbar logic
Similar logic for panel & topbar, use same checks.
2018-08-29 15:46:36 +10:00
bd5df281e5 UI: use icons for sculpt mode toolbar
Re-order some enums so plus is always first.
2018-08-29 15:28:56 +10:00
f21d6c3187 Tool System: add curve extrude 2018-08-29 15:14:41 +10:00
6778eb89ea Tool System: show radius for circle select 2018-08-29 15:04:05 +10:00
0493635085 Fix T56517: 2D gizmo hotspot fails
Regression from 80c9cd13da
2018-08-29 14:49:42 +10:00
46fc3f39c5 Weight Paint: use black for unselected vertices
Contrast for selected vertices mode wasn't very strong.
2018-08-29 12:22:33 +10:00
12562f1c76 UI: disable decorators when not used 2018-08-29 11:42:07 +10:00
c489c8481f Keymap: check modal keymap item poll function
Fixes T56591: Vertex/Edge slide C-Key fails
2018-08-29 11:31:49 +10:00
ab2b6134c9 Tool System: make armature extrude use drag event
Extrude tool was calling click-extrude.
2018-08-29 11:11:11 +10:00
871b7ba892 Merge branch 'master' into blender2.8 2018-08-28 19:15:08 +02:00
9fd0060c0f Build environment: Ensure Python is using static ffi
Surely, need to compile ffi first :)

Good news are: Python seems static enough now!
2018-08-28 18:55:00 +02:00
c70eb30240 Build environment: Make sure Python is linkign against static Zlib
There is system-wide libz development package installed by default,
needed for some other dependencies. This patch ensures Python will
use our own self-compiled Zlib.
2018-08-28 18:29:13 +02:00
Roel Koster
55263c8a4c Fix some UI script errors after recent keyword changes.
Differential Revision: https://developer.blender.org/D3654
2018-08-28 18:09:22 +02:00
5155c51844 Fix T56529: Viewport ColorChage with Overlay "Fade 3D Objects" 2018-08-28 16:21:35 +02:00
Dalai Felinto
2e9a0e1254 Fix space text script - keyboard for labels
I guess multi-line ui elements were not covered in the cleanup scripts.
2018-08-28 10:17:58 -03:00
44df1ced6d RNA: make mesh add methods use required arg 'count' 2018-08-28 22:35:09 +10:00
590a6b5269 Cleanup: pep8 2018-08-28 21:01:22 +10:00
e20ed59037 Fix T56530, T56523: collection visiblity toggling wrong after recent changes. 2018-08-28 12:49:36 +02:00
0023060893 Cleanup: compiler warnings. 2018-08-28 12:49:36 +02:00
12622ce2f7 Cleanup: remove debug code. 2018-08-28 12:49:36 +02:00
William Reynish
c1503cd447 Tool System: use release_confirm for gpencil
Also rename some grease pencil tools.
2018-08-28 20:43:34 +10:00
William Reynish
95cbb70cf7 Tool System: add shear and to-sphere tools 2018-08-28 20:41:48 +10:00
19c65cd6e2 Build environment: Enable bzip2, lzma and sqlite for Python on Linux 2018-08-28 12:17:52 +02:00
f0c4d92533 3D View: split object/pose box & lasso select
Also fix error in lasso select with multiple pose objects.
2018-08-28 19:53:36 +10:00
91bfb168fe 3D View: split object/pose border select
No functional change, duplicate function for easy diffing.

Changes coming next.
2018-08-28 19:36:04 +10:00
71007dc1d6 GP: Use custom api to get material 2018-08-28 08:18:09 +02:00
9a9b1e9884 GP: Revert replace custom function by standard API
Using custom api breaks material at object level
2018-08-28 08:18:09 +02:00
039b11f349 PyRNA: all optional args now must be keyword args
In some cases the RNA API should be updated to make arguments use the
'required' flag, instead of adjusting Python scripts.

See T47811
2018-08-28 13:55:11 +10:00
5bf42ce022 RNA: use required args for internal popup end API 2018-08-28 13:50:11 +10:00
a6cc53876f RNA: make template_list list_id a required arg
Prepare for keyword only args.
2018-08-28 13:42:30 +10:00
e1ec93ce75 UI: use keyword arguments
Prepare for keyword only args.
2018-08-28 13:41:47 +10:00
268cdb503f Cycles: use fields for property definitions 2018-08-28 13:16:04 +10:00
d3a72033f6 RNA: UILayout.split(..) 'percentage' to 'factor'
Misleading name since it's between 0..1.

Use as a keyword argument to prepare for keyword only args.

Also document that leaving unset has special behavior.
2018-08-28 12:50:11 +10:00
e9fb2feb2e UI: text keyword argument to label
Prepare for keyword only args
2018-08-28 12:34:51 +10:00
5e8a030a08 cmake: adjustments required for lib-upgrade on windows. 2018-08-27 19:38:31 -06:00
6dd394bf02 build_environment: llvm only copy lib files for the debug build. 2018-08-27 19:38:31 -06:00
60b24f2415 Cleanup: indentation 2018-08-28 11:01:29 +10:00
b14360507e Cleanup: warnings 2018-08-28 10:53:35 +10:00
9195b5b3b1 GP: Replace custom function by standard API
Replace BKE_gpencil_get_material_index by BKE_object_material_slot_find_index
2018-08-27 23:16:02 +02:00
35c1baef27 Fix T56577: Crash when using Grease Pencil Fill Brush
If the brush had assigned a color not present in the object material slots, the fill crashed.

Now, the material is added to the object slot before using it.
2018-08-27 23:04:58 +02:00
0bdabaa3f6 transform_snap_object: Add a small offset to the clip plane
This prioritizes the vertex and edge snap over raycast.
2018-08-27 16:00:20 -03:00
5e5f2ead43 Fix T56557: wrong hash in Windows buildbot builds. 2018-08-27 19:58:10 +02:00
53457351b5 Build Environment: fix Windows Alembic build.
Ideally we should remove this difference between platforms, but for now
just do the simple fix.
2018-08-27 19:07:14 +02:00
072540688a Build environment: Enable SSL for Python on Linux
This involved getting SSL compiled from sources first, ensuring
it is a static library placement independent code. Configuration
is based on what Debian is using. CFlags required to have own
configuration file, which i didn't find a better place that next
to the corresponding CMake file.

It is OpenSSL btw.

It is set to Python via --with-openssl= configuration argument.
This works fine in a clean chroot, but having libssl-dev installed
might make Python to prefer system wide library, This was worked
around by using libssl_pic.a name for the library and modifying
setup.py. Would be cool to ensure system wide libraries are not
a problem, but official release builder is safe against this,
since it will catch possible non-static dependencies.

There is also a new map file which shadows bunch of Python
symbols. Without this Python's shared libraries might bring
conflicting symbols to Blender namespace at runtime.

Hopefully this doesn't break other platforms.
2018-08-27 18:14:42 +02:00
4b89bf88c7 Revert "DRW: Remove unecessary GL calls"
This reverts commit f8c857ad72.
2018-08-27 18:02:48 +02:00
5238456adc DNA: Deprecate gridview 2018-08-27 12:16:34 -03:00
44f04b5f53 Draw Manager: Remove unused function
Signed-off-by: fclem
2018-08-27 12:10:31 -03:00
ffbe5985c6 Fix T56547: Single column properties not aligned 2018-08-28 01:06:26 +10:00
c7a96651df Fix unreported: the gridview is no longer computed, so the snapping functions have to use the actual grid scale. 2018-08-27 11:40:48 -03:00
9de320d882 GP: New operator to copy layers between objects
The operator allows to copy a complete layer with all frames or only active frame to a new object.

Can be found in edit specials menu (W key) or in Layers specials menu (last button near layer list).
2018-08-27 16:31:03 +02:00
1e6a5eb087 Implement BMesh Operator string enumerators and docs generation.
Partial implementation of T56496 for review.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3635
2018-08-27 16:15:54 +02:00
f693e2c644 Build environment: Fix for C placement independent code
Need to pass -fPIC to C code as well.
Without this blosc is not being properly placement independent.
2018-08-27 15:48:39 +02:00
04075ed744 Build Environment: fix alembic, openvdb, ffmpeg, osl build on Linux. 2018-08-27 14:15:03 +02:00
09e1e2b8ce Fix assert displaying UV's of faceless meshes 2018-08-27 17:33:06 +10:00
4498fbeb2e Handle multi-hidden-layers when converting groups to collections.
That is kind of mandatory with complex rigged-character groups, with
hundreds of helper objects, and a few useful ones being hidden on
specific layers (like e.g. the main rig...).

It is especially critical point with static override, which won't allow
to move objects between collections and such (that would be a nightmare
to implement and handle).

Note that this is rather basic implementation, we could go further and
move all objects in all layers they are 'active', but that would
probably be overkill.

Reviewers: brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D3649
2018-08-27 09:20:06 +02:00
8b009e258c BMesh: improvements/fixes to select side of active
- Add orientation option (defaults to local, as 2.7x does)
  can optionally use global, cursor, view... etc.
- Fix typo which caused select flush to fail.
- Fix for instanced objects (was only checking one instance).
- Only tag for changes if a change is made.
- Skip meshes with all vertices selected.
2018-08-27 17:09:15 +10:00
34c97a1b00 Cleanup: rename 'vindex' to 'def_nr'
Name hinted 'vertex index', where it's the index of the vertex group.
2018-08-27 16:05:57 +10:00
21c75bc7c5 GP: replace custom API w/ BKE_deform API 2018-08-27 14:20:40 +10:00
21589dcbe0 Fix grease pencil weight invert
Was always using first group.
2018-08-27 14:19:08 +10:00
William Reynish
b61ab69025 Icons: update to rBL62101
- Updated icons for Annotation
- Updated Sculpt Mode icons once again, with a flat base.
  Makes them more readable
- Updated Hair tools icons
- Updated Armature Edit mode icons
- Updated Grease Pencil icons
2018-08-27 11:56:36 +10:00
d06e340d3d Cleanup: warning, use const args 2018-08-27 11:46:28 +10:00
f8c857ad72 DRW: Remove unecessary GL calls 2018-08-26 23:54:47 +02:00
Colby Klein
31c99c0c4e Fix pen tablet stuck on Windows for some non-Wacom tablets.
Differential Revision: https://developer.blender.org/D3573
2018-08-26 23:19:31 +02:00
6ee5e6a333 Cleanup: remove double ; 2018-08-26 17:25:17 +02:00
1948681440 GP: Reduce weight paint data memory footprint
Before, the weight data array was created always, but now only is added when a weight value is assigned.

This change was suggested by algorithm, and both agreed it was good idea.
2018-08-26 16:40:06 +02:00
85aafba04c Static override: add constraint targets as overrideable! 2018-08-26 15:49:03 +02:00
daebdcace0 Fix conversion from 2.7x groups to new 2.8 collections - hidden layers.
You cannot immediately add parent's library to newly generated hidden
child collection, since it would allow to get several of those hidden
collections with same name/library. That is strictly forbidden!

So rather loop again on collections after all hidden ones have been
generated, and assign children's library from parent one then.
2018-08-26 15:49:03 +02:00
a7b853a037 Cycles: change default emission color to 1 1 1. 2018-08-26 13:48:24 +02:00
3ee0ce27fa Cleanup: style 2018-08-26 20:34:33 +10:00
03fd1da3ee Cleanup: trailing space 2018-08-26 20:20:35 +10:00
56ec606413 Cleanup: style 2018-08-26 19:57:19 +10:00
82f771b169 DNA: don't deprecate gridview, it's still used 2018-08-26 19:47:47 +10:00
920dff35dc build_environment: fix building openvdb on win32 2018-08-25 19:40:44 -06:00
182da56cd9 build_environment: fix build-flags on windows.
build all object files with /bigobj since multiple of the dependencies go over the limit on x86
2018-08-25 19:40:07 -06:00
0339964ea8 build_environment: cleanup harvest on windows 2018-08-25 19:38:47 -06:00
3311e29b72 build_environment: ffmpeg support x86 builds on windows. 2018-08-25 19:37:30 -06:00
b6edf860fe build_environment: mingw32 fix repeated unpack of gcc tarball 2018-08-25 19:37:11 -06:00
3f1606cb7c build_environment: osl work around shutdown issues.
there is an issue with objects destructing in a non deterministic way during process shutdown, temporary work around this until osl has a fix in place.
2018-08-25 19:35:45 -06:00
b30d103cf6 Cloth: Fix mistake in big matrix multiplication
Only the upper triangle of the block matrix is stored, thus when
executing operations on the lower triangle, each block must be
transposed. This transposition was not ocurring in the matrix-vector
multiplication function, which is fixed by this commit.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D3619
2018-08-25 22:13:19 +02:00
94efc651d4 Cycles Denoiser: Allocate a single temporary buffer for the entire denoising process
With small tiles, the repeated allocations on GPUs can actually slow down the denoising quite a lot.
Allocating the buffer just once reduces rendertime for the default cube with 16x16 tiles and denoising on a mobile 1050 from 22.7sec to 14.0sec.
2018-08-25 12:23:52 -07:00
60a5ba265c Cycles: Add Denoising Clean to the debugging denoising passes 2018-08-25 09:32:29 -07:00
1a7837596c GP: Select color in Brush or in Properties
After some artist feedback the material selection was not clear.

Now, the material can be selected in the top bar or in the properties panel.

1) If the material is selected in properties panel, all Brushes except pinned will be assigned to this material.

2) If the material is selected in the brush, the properties panel is updated to set the active material.

Added a new Pin icon to keep locked the material to one brush
2018-08-25 00:04:40 +02:00
6901712734 Transform: Use grid_scale to configure the incremental snapping.
`gridview` is no longer being set and also does not match the new grid's drawing.
2018-08-24 18:04:36 -03:00
7815276b93 Cleanup: Remove debug printf 2018-08-24 18:00:10 +02:00
Dalai Felinto
21661d1681 Fix MESH_OT_shortest_path_pick
It was working only for REDO.

The reason was that we were not tagging our beloved
new multi-threaded depedency graph.
2018-08-24 12:16:37 -03:00
3b2438192b GP: Fix unreported error drawing polygons
As the polygon drawing is handled using a buffer that is converted to stroke inmediately, the drawing engine was not drawing the buffer stroke because it was empty, and the stoke was not visible becaus eit was in fast drawing mode.

Now there is a special flag to indicate the polygon mode is enabled and force the drawing engine to draw strokes and disable fast drawing.
2018-08-24 17:05:01 +02:00
d162be6246 Multires: Fix wrong apply deform results when multires has sculpt already 2018-08-24 17:00:32 +02:00
0ba3a1a686 Sculpt: Optimize Mask Overlay drawing
* Remove support for diffuse color in the pbvh buffers.
* Upload raw data to GPU.
* Only draw nodes that have mask data when drawing the overlay.

This should fix T56466
2018-08-24 16:46:59 +02:00
Dalai Felinto
c899f21800 Multi-Objects: MESH_OT_select_axis
Now that this operator is working properly (in world space axis), it can
be ported for multi object support.

The issue of only running on redo is still present though, to be investigated
later.
2018-08-24 11:45:43 -03:00
Dalai Felinto
ce34f9348f MESH_OT_select_axis: Make it work with world axis, not local ones
Not, I tried using `dist_signed_squared_to_plane_v3` but profiling showed that
it is 50% slower than using regular `mul_v3_m4v3` for the verts.

I managed to get this number closer when manually inlining all the functions
called by `dist_signed_squared_to_plane_v3`. But still `mul_v3_m4v3` was better
and it makes the code simpler to understand.

Also I'm changing the default mode to positive, no idea why it was negative as
default in the first place.

Last but not least, the operator only works well on redo. This was a problem
before, not introduced by this patch.
2018-08-24 11:33:59 -03:00
Dalai Felinto
00ab0b0399 MESH_OT_select_axis: cleanup (use enum instead of hardcoded values) 2018-08-24 11:17:00 -03:00
edbe334ae9 GP: Add arrange strokes to edit specials menu 2018-08-24 15:47:25 +02:00
658a9c6cf5 Cycles: Cleanup, style
I wouldn't mind changing style to have space after keyword, but there was
no official code style change proposed.
2018-08-24 14:36:18 +02:00
e92e90c30e Cycles: Fix wrong looking voronoi of second 2nd closest
Was only happening for release builds made with GCC-8. Probably some
optimization strtegy was confused by uninitialized variable.
2018-08-24 12:29:13 +02:00
9b41ad288a Remove annotations lock to axis function
The lock to axis is only used by grease pencil object and can produce weird results in annotations.

This lock to axis function was kept by error when the annotation code was splitted from general grease pencil code.
2018-08-24 11:28:15 +02:00
c75e74b456 Depsgraph: Fix wrong detection of invisible objects
Was happenign for following cases:

- Deep hierarchy of non-restircted collections, which has grand-grand
  parent restricted.

- Collections which are constructed from invisible object.
2018-08-24 10:59:54 +02:00
6e3569d9f4 Depsgraph: Escape underscore in time stats chart 2018-08-24 10:59:54 +02:00
b8c9df6f21 Compositor: Added Weighted Standard Curve evaluation
Available in RGB Curve node in the compositor and as modifier in the
sequencer. I reshuffled the values of the enum. But a the first commit
is just 1 day old I think that the order is more important than the file
compatibility.
2018-08-24 10:04:33 +02:00
f029aefe3e Merge branch 'master' into blender2.8 2018-08-24 12:39:36 +10:00
9abc2dfa49 Fix T56491: Undo crash while preview jobs run
While the crash is in 2.8, it's possible undo operates on data
which isn't only owned by the current scene (any object for eg).

Thanks to @mont29 for suggesting the fix.
2018-08-24 12:38:11 +10:00
6a5bc88abf Merge branch 'master' into blender2.8 2018-08-24 12:17:33 +10:00
b2d32d7fa4 UI: always align item w/ label 2018-08-24 12:16:38 +10:00
7fa42b3e51 Fix T56511: UILayout.prop_search misaligned
Add padding when used with property decorations.
2018-08-24 12:11:24 +10:00
bae8ab3188 UI: remove hack to align search properties 2018-08-24 11:55:49 +10:00
5bd731b673 Merge branch 'master' into blender2.8 2018-08-24 11:54:12 +10:00
7ec1a56a41 RNA: avoid redundant property lookups in UI API 2018-08-24 11:44:28 +10:00
0cf12dfc14 Cleanup: indentation, style 2018-08-24 10:32:57 +10:00
1c63a3a100 UI: re-arrange some items in context menu
* Move Add to Quick Favorites before Assign Shortcut, as it is more often
that we add items to favorites, than changing shortcuts.

* Move Header menu last. In some cases the Online Manual for that item
would appear after the header menu.

* No icon for "Remove from Quick Favorites", matches Remove Shortcut
2018-08-24 01:38:08 +02:00
cf64a83edc UI: Fix area border thickness over top and bottom bar with glScissors 2018-08-23 23:02:45 +02:00
19fe267823 Hide Grease Pencil ornaments if overlay setting is disabled 2018-08-23 22:48:05 +02:00
bd7e14f48c Cleanup: remove unused code 2018-08-23 22:34:25 +02:00
34b3d6e2f8 UI: Optimize the area border drawing
It is was not really a bottleneck but it was triggering my OCD when 1/3rd
of the drawcalls in a normal scene were basically only caused by this.
2018-08-23 22:29:45 +02:00
fb7fc3be19 Wireframe: Add support for sculpt mode
Now wireframe does update in sculpt mode using the sculpt mesh VBOs.

The only thing that does not work is simplified wireframe (the wireframe
slider) when the mesh is shaded flat. In this case all edges are shown.
2018-08-23 22:29:45 +02:00
13ac92d057 Fix T55507: Crash due to GPencil brush icon management, when there is no active object. 2018-08-23 21:56:11 +02:00
4cde92303f Fix T56455: [2.8] Crash when projecting skinwrap curve/path.
Shrinkwrap is not only a Mesh modifier...
2018-08-23 21:49:14 +02:00
a6b65c75cd Fix T56360: metaball viewport checkbox crash.
Do same as for other geometry types to compute bbox, instead of blindly
returning NULL `ob->bb`...
2018-08-23 21:40:43 +02:00
8ec74106f8 Fix single column UI: grey out B-Bone properties when not a B-Bone.
There was a mistake when the UI was converted to the new layout style.
2018-08-23 22:37:30 +03:00
34ebf6f82c Workspaces: move delete to right click menu, instead of X on tab.
These are not intended to be closed as often as e.g. browser tabs, they are
intended to be more persistent and accidental closing should be avoided.
2018-08-23 20:02:08 +02:00
1de3ae7e42 UI: rename Grease Pencil panels in toolbar to Annotation.
To match the panels in the N key sidebar.
2018-08-23 19:05:42 +02:00
Dalai Felinto
7fa77cd31d Multi-Objects: MESH_OT_loop_select 2018-08-23 12:52:10 -03:00
William Reynish
4d28cfc707 UI: Subpanels to Cycles Samples for Branched Path Tracing 2018-08-23 17:29:05 +02:00
William Reynish
c11997ccfc UI: Physics panel minor adjustments
Flow panel had a wrong name when the checkmark was used in the header, fixed alignment in softbody panel & fixed wrong active state for Cloth Pin.
2018-08-23 17:21:55 +02:00
23c03bf0cc UI: Dark XYZ characters in the navigation gizmo
Much easier to read against the usually brighter axes colors.
2018-08-23 17:15:51 +02:00
f97d61c4bd Depsgraph: Bring back visibility checks based on collection restrict flags
The title says it all actually, the idea is to speedup the following case:

- Visible duplicator of a restricted collection (reported as T56512),

One of the questionable change is that none of the view layer bases is
ignored now. This ensures corresponding objects will have copy-on-write
component evaluated, making it possible to access those pointers. The
evaluation of those objects is skipped.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3641
2018-08-23 16:40:35 +02:00
a9ecfc9653 Fix T56347: Driven values not supported in node groups.
Need to rebuild dependency graph when we add or remove nodes from a tree...
2018-08-23 15:20:41 +02:00
Dalai Felinto
613523d5f5 Rename: *_batch_cache_dirty > *_batch_cache_dirty_tag 2018-08-23 10:20:16 -03:00
Dalai Felinto
25c918196c Fix T56500: Origin to geometry crashes on armature
Reviewers: sergey

https://developer.blender.org/D3639
2018-08-23 10:20:16 -03:00
William Reynish
2dafc39d56 Icons: new icons for sculpt border hide/mask 2018-08-23 23:06:24 +10:00
09895cae48 Merge branch 'master' into blender2.8 2018-08-23 14:56:42 +02:00
c5206e5d2f Fix T56506: Different behaviour of Bounds Clamp with positive and negative axis.
Small typo on minus sign position... ;)
2018-08-23 14:55:40 +02:00
f894db794f 3D Grid: Fix grid not showing in camera view 2018-08-23 13:56:39 +02:00
745123024d 3D Grid: Fix axes color blending 2018-08-23 13:56:39 +02:00
55f122264c 3D Grid: Fix grid passing through objects too much
For this we need to add a bias depending on the viewing angle.
But increasing the hardness of the test make float precision issues in
the mesh transformation more prominent (actual geometry is far below the
surface). So to solve this issue we use a more subdivided grid mesh
8x8 quads instead of 1 triangle.
2018-08-23 13:56:39 +02:00
0cbbcac23e Icons: clamp material color from 0..1
Warn about out of range colors too.
2018-08-23 21:40:30 +10:00
7f8014f918 Revert "Icons: avoid error with colors out of 0-255 range"
This reverts commit 6e7da7616b.
2018-08-23 21:36:51 +10:00
73f90b2505 Fix annotate tool in the 3D view
We can't share tools between space-types since they contain keymaps
that store the space type.
2018-08-23 20:25:25 +10:00
32f3ecf701 Cleanup: use staticmethod when class isn't used 2018-08-23 20:16:50 +10:00
48f7fe4829 UI: rename "Ruler" to "Measure" 2018-08-23 19:50:05 +10:00
a619ad3f30 Add Torus: default generate UV's to true 2018-08-23 19:50:05 +10:00
4de7c0c310 Compositor: Film-like curve
Film-like curves for the RGB Curve node (Compositor) and Curve Modifier
(Sequencer)

Film-like curves originated from Adobe.
"It’s an RGB curve where the tone curve is applied on the largest and smallest value, and then the middle value is adapted to keep a constant hue as defined by RGB-HSL/HSV. In terms of look and saturation increase it’s very similar to a pure RGB curve, more so than a HSL-L curve or HSV-V curve, but some color shift problems are avoided."

Other tools like Natron, Krita and RawTherapee have implemented this curve tone.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

Tags: #compositing, #video_sequencer

Differential Revision: https://developer.blender.org/D3638
2018-08-23 11:39:11 +02:00
01973290a9 Fix T56498: Segment fault when change parameter of one operator after undo.
You cannot store ID (or any other data) pointers accross undo’s/redo’s, those
are reading .blend file and hence invalidating all pointers!

Not that happy with this fix, code is rather convoluted and not elegant
at all, but cannot think of a better solution, so will do for now.

Also found and fixed another 'str ghash used for int keys' case...
2018-08-23 08:46:07 +02:00
faafe6e6bc Add helper to BKE_library to generate unique string key for an ID.
Basically just concatenates ID's name (including its IDtype code) and
that library's name, if any. This must give unique string in a given
Main database, suitable for GHash keys e.g.
2018-08-23 08:46:07 +02:00
922ca68e17 Cleanup: trailing space 2018-08-23 16:22:32 +10:00
b35b10e1af Tool System: Popup toolbar keymap improvements
- Add support for key_modifiers, so grease pencil gets "D".

- Assign number keys for unmapped items

  This means all tools get keyboard access,
  use number/numpad to avoid confusion with other keymap items
  which directly activate the tool.
2018-08-23 16:18:09 +10:00
4e6a82d847 Cleanup: use static functions 2018-08-23 16:18:09 +10:00
36148f20ec Fix: Silence compiler warnings about size_t's in printf 2018-08-23 17:07:39 +12:00
0e09bfa059 Depsgraph: Added note that the filtering function should NOT be called on a filtered graph 2018-08-23 17:07:39 +12:00
3fa4e52657 Motion Path Calcs: Use filtered depsgraph by default
Use debug_value = -1 to disable the use of the filtered depsgraph.
It's still useful to have this for benchmarking + until we're
confident the filtering works safely.
2018-08-23 17:07:39 +12:00
4cbb75935b Code Cleanup 2018-08-23 17:07:38 +12:00
8ee06f50c0 Motion Path Calcs: Minor optimisation tweaks
* Don't print on every frame evaluated. This was only needed
  earlier to track the progress (and why things were taking so
  long - answer, it was the Scene COW issue). Saves 50-100 ms

* Remove the extra calculation of the scene after evaluating
  motion paths. This shouldn't be needed now with COW.
  Saves about 20-30 ms
2018-08-23 17:07:38 +12:00
dcefce5eae Fix memory leak - the temporary depsgraph instance was not getting freed after use 2018-08-23 17:07:38 +12:00
18c7dfa8dc Cleanup: Remove the conditional ID node removal stuff, copied from clear_id_nodes()
This was just randomly leaving all the Particle datablocks in the
filtered graph (and causing and extra/excess pass over the ID's
to get run). Unless we actually need those specially kept for
some reason later, it's better to leave those out for now.
2018-08-23 17:07:38 +12:00
bd801e7a68 Faster Motion Path calculations using Depsgraph Filtering
This commit makes the motion path calculations use the
new Depsgraph Filtering API to obtain a more streamlined
copy of the full scene dependency graph, allowing for
faster calculations (as less data needs to be evaluated
for each frame being baked).

For example, in 01_020_A.anim.blend from the Spring production
files, the time needed to calculate paths on several bones
on Autumn went from  39.84 seconds (!) down to 9.90 seconds!

Currently, this works by just replacing the depsgraph instance
passed to the motion path calculation function. This filtered
instance contains just the ID's needed to evaluate the graph
to evaluate a specified target (i.e. the Object owning the pose).

Notes:
* By default, the filtering is not performed unless debug mode 555
  is activated. Having a debug switch here allows comparing
  performance and disabling it should thing it start crashing.

* It is necessary to pass in the original Scene instance (not the
  COW one owned by the filtered depsgraph), otherwise changing the
  current frame had no effect, due to the COW flushing from original
  Scene to the new Scene overwriting the CFRA changes we make.

* The code here still needs cleaning up to debugging instrumentation, etc.
  and also to optimise further (e.g. caching the filtered depsgraph
  for faster updates when animating on existing paths, or fine-tuning
  the exact set of nodes needed).  I'm just committing this first,
  since this was the quickly hacked-together test code I've been using
  to check that this is all working.

* Further improvements could also be made to the time needed to
  build the full graph instance (about 3.3 sec), by allowing partial
  builds (e.g. by making a filtering proxy/wrapper around existing builders)
2018-08-23 17:07:38 +12:00
0e44cf5d78 Cleanup: Disable some of the extra debug prints that were slowing things down 2018-08-23 17:07:38 +12:00
e01a9c5eee Motion Path Calculations: Don't pass scene into motionpaths_calc_bake_targets()
It's not needed, and actually precludes us from considering parallel
evaluation in future.
2018-08-23 17:07:38 +12:00
2f2ab13b5f Depsgraph Filtering: Fix ID node filtering problems
* COW data hasn't been expanded yet when we try to filter the graph
  (you need to have tagged + evaluated it for this data to exist),
  so all the offending nodes would just get left in

* Added more debug prints to verify whether the id_nodes vector is
  getting cleared correctly
2018-08-23 17:07:38 +12:00
e5e42b7782 Depsgraph Filtering: WIP more debugging prints 2018-08-23 17:07:38 +12:00
6bbf6712bb Depsgraph Filtering: Remove opnodes from entry tags too 2018-08-23 17:07:38 +12:00
6ec933886c Depsgraph: Fix filtering-related crashes
* Simplified operation-relation deletion. Now we collect the relations
  to delete into a vector, then iterate through that, thus solving issues
  with iterator invalidation (+ aborts arising from that)

* DEG_foreach_ancestor_ID() was assuming that all dependencies were
  OperationDepsNodes, when in fact, some could be TimeSource nodes
2018-08-23 17:07:38 +12:00
9a0ef0933d Depsgraph: Print simple stats after filtering graph, to quickly verify if anything happened 2018-08-23 17:07:37 +12:00
be77eeae46 Depsgraph: First draft of graph filtering API implementation
When this works correctly, we should be able to feed in an existing
depsgraph instance, and get out a "filtered" copy of it that contains
only the subset of nodes needed to evaluate what we're interested in.

The current implementation only filters on ID blocks/nodes,
and starts by building a full new depsgraph instance first.
I'd originally intended to do it per operation instead, copying
over individual nodes as appropriate to have the smallest and least
memory intensive graph possible. However, I ended up running into
into problems with function binding + COW arguments, hence the
current slow solution.
2018-08-23 17:07:37 +12:00
9e47709089 Typo fixes 2018-08-23 17:07:37 +12:00
3fc755e938 Tool System: Sculpt border hide/mask tools 2018-08-23 12:56:02 +10:00
b3ac3d13a2 Cycles: Add option for building CUDA kernels sequentially
Building the CUDA kernels takes quite a bit of memory, and when building all of
them the combined usage can be too much on some systems (especially VMs).

Therefore, this patch adds an option to force the build system to build them
sequentially by making each build step depend on the previous kernel.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3623
2018-08-22 19:54:59 -07:00
99e6c41373 Tool System: support non paint tools in paint mode
This is needed so non-paint-brush tools can be used in paint modes.
2018-08-23 12:47:32 +10:00
5203ebbaad Tool System: remove cursor tool from paint modes 2018-08-23 12:12:11 +10:00
890623f886 Object Mode: Add back spot cone display 2018-08-22 19:49:32 +02:00
477b4559ec Paint Overlay: Fix blending of the brush overlay 2018-08-22 19:49:32 +02:00
07d0f2eb01 UI: Minor label tweaks to operators context menu
* Add Shortcut -> Assign Shortcut

* Add to Favorites Menu -> Add to Quick Favorites
To match the menu name and be more general for when the Quick Favorites
are accessible in places other than just menus (like panels).

Add blank icon to Remove Shortcut so it aligns with Change Shortcut
which is usually the item on top of it in the menu.
2018-08-22 18:54:13 +02:00
e17164aca3 Cleanup, unused variable 2018-08-22 17:45:56 +02:00
686480269b MSVS 2017 Bug - Subdiv Mesh
Apparently, struct initialization can not be empty,

Reviewers: sergey

Reviewed By: sergey

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3636
2018-08-22 17:02:41 +02:00
cdaf5a1083 Multires: Bring back operator to reshape from object
Limited to mesh type of source, not sure it ever worked for non-meshes.
While it's possible to support reshape from any object, the actual brain
of operation would need to be recoded to go away from requirement of
vertex indices matching in source and destination.
2018-08-22 16:59:00 +02:00
564a378bd1 Multires: Remove another unused argument from reshape function 2018-08-22 16:59:00 +02:00
b28a74746b UI: Show development entries in context menu when Dev. Extras is enabled 2018-08-22 16:29:49 +02:00
6a681981e4 Multires: Fix reshape when active level is lower than the total one 2018-08-22 16:07:57 +02:00
9dd279cbdf Multires: Remove unused function argument 2018-08-22 16:07:57 +02:00
dade2b7548 Python: Cleanup Noise Module
Implements the changes detailed in T56281

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3590
2018-08-22 15:34:10 +02:00
644fe7c90c DRW: Fix wrong framebuffer bound after background pass 2018-08-22 15:23:03 +02:00
f4f97d1c7f Overlay: Fix wrong framebuffer bound. 2018-08-22 15:23:03 +02:00
fae127cd26 Multires: Fix reshape of corner vertices
Was only reshaping corner vertex of a single ptex face.
2018-08-22 15:21:19 +02:00
Dalai Felinto
dc00c330c5 Improvement to MESH_OT_shortest_path_pick behaviour
Select a vertex/edge/face if there was nothing previously selected
(if the click hit something, of course).
2018-08-22 09:59:56 -03:00
Dalai Felinto
c32cc3e43e Multi-Objects: MESH_OT_shortest_path_pick
This fully works as "expected", however it seems strange when
there is no selected vertex in the non-active object.

In 2.7x if you join two monkeys, select a vertex in one of them and
try to use this operator in the other it will select the lonely newly
selected vertex.

If you split both monkeys and do this in 2.8 while multi-editing them
you won't get nothing when trying to ctrl+RMB any vertex in the monkey
object that has nothing selected yet.

I propose to have this addressed in an upcoming patch where we always
select a vertex if no vertex was previously selected.
2018-08-22 09:59:56 -03:00
4abb060edf Icons: missing from last commit 2018-08-22 22:30:31 +10:00
Dalai Felinto
491e1ad225 Fix building without OPENSUBDIV
Although we have a stub system there, we were not linking the library.
2018-08-22 09:10:32 -03:00
William Reynish
8e15eaa699 Icons: updated icons
Use simplified design.
2018-08-22 22:10:31 +10:00
ddc09790d8 DRW: Fix T56418 and T56474 in a more robust way 2018-08-22 13:51:03 +02:00
d67c86d42a Revert "Fix T56418: Changing to Solid View crashes Blender"
This reverts commit 1e26345a89.
2018-08-22 13:51:03 +02:00
fdce78c936 Armature: Fix outline jitter in orthographic mode 2018-08-22 13:51:03 +02:00
9d65be6b42 GPU: Fix issue with multiple Geometry node. 2018-08-22 13:51:02 +02:00
4d09129ffb Fix T56470: unfreed shader in edit mode 2018-08-22 13:51:02 +02:00
6489243332 DRW: Fix background image display
This make the workbench draw everything in the background routine just like
eevee. This is because the workbench uses floating point buffers too and
rendering background to this buffer makes it incorrect without proper
color management.

This could be improved because in xray the background is not blended but
dithered as it's drawn after the main pass.
2018-08-22 13:51:02 +02:00
bb639ccc47 GPUMaterial: Geometry Node: Add support for parametric output
This supports meshes and hairs too. Matches cycles output.

This adds barycentric coords to the GPUBuiltin enum which will also be used
for the wireframe node.
2018-08-22 13:51:02 +02:00
118251a2a8 GP: Add OPTYPE_USE_EVAL_DATA flag in paste to avoid undo crash 2018-08-22 13:44:17 +02:00
f64ec4ac84 UI: Move UV menu to the header.
UV Unwrapping is too important to keep it under a sub-menu.
2018-08-22 13:32:22 +02:00
9f6cde53cf Fix bevel crash T56287, when face strength goes to 1. 2018-08-22 07:08:42 -04:00
9e11b8e249 Multires: implement reshape operation
The one which is used by applying deformation modifiers on the multires.
2018-08-22 10:21:45 +02:00
6b6c27694e Subsurf: Implement foreach traversal for subdivsion topology
This makes it more generic process to perform actions which
depend on ptex face + (u, v) and on subdivided vertex index.

Currently it is still just a subdivision calculation process,
but same foreach callbacks can easily be used to propagate
displacement from known vertex locations back to displacement
grids.
2018-08-22 10:21:45 +02:00
7f9381d99d Tool System: expose correct UV for vert/edge slide 2018-08-22 17:53:03 +10:00
17eade61ef Tool System: bevel now confirms on release 2018-08-22 17:43:49 +10:00
d31932b6d7 Tool System: options for bevel tool 2018-08-22 17:38:45 +10:00
9f72a450a2 Cleanup: free keymap status when not used 2018-08-22 17:09:41 +10:00
Dalai Felinto
f9eb2f29fe Multi-Object-Editing: bisect support 2018-08-22 16:35:00 +10:00
583fb8c140 Cleanup: RNA naming 2018-08-22 15:43:28 +10:00
cb410429cc Merge branch 'master' into blender2.8 2018-08-22 15:27:03 +10:00
53527ac10f Cleanup: use EDBM prefix 2018-08-22 15:23:28 +10:00
d9de8c469b BMesh: loop-cut, display deformed coordinates
Previously this used derived mesh, now use evaluated data.
2018-08-22 15:15:21 +10:00
f047224458 UI: move brush appearance inside overlay panel 2018-08-22 14:37:05 +10:00
cf038bcb15 Tool System: loop cut, confirm on release
When accessed as a tool it felt awkward to click twice to execute.
2018-08-22 14:22:57 +10:00
f6778ea63a Tool System: add cuts & correct UV's options 2018-08-22 14:04:37 +10:00
7eaf00bfb0 Cleanup: style 2018-08-22 10:10:12 +10:00
e8e89c135f Transform: factor out matrix multiply w/ snapping 2018-08-22 09:45:11 +10:00
a63e5d2058 UI: use display popover for image space
Also menu corrections and move scopes to sidebar.

D3625 by @lijenstina w/ minor edits
2018-08-22 09:21:33 +10:00
95aa672e2f GP: Reduce list of modifiers affected by recalc 2018-08-21 22:05:54 +02:00
7fda7fb750 GP: Force Fill triangulation data recalc
Add a general parameter to force the recalc of the triangulation data because some modifiers could change the geometry and the filling triangles would not be right.

Now, the parameter is visible in UI panel because this option reduces FPS, but maybe in the future we can keep always ON and remove the parameter.
2018-08-21 19:46:29 +02:00
596c3368f4 Merge branch 'master' into blender2.8 2018-08-21 19:08:23 +02:00
34029fc71a UI: disable new text hinting from D3201 by default for now.
This changes the text hinting setting to be an enum with options
Auto / None / Slight / Full. The default is Auto which currently disables
hinting.

The hinting was tested with a new FreeType version, but this is not what
is used on the buildbots an official release environment, and the fonts
look quite bad because of that. Once FreeType has been upgraded we can
change the default.

Even then the results are not ideal, perhaps due to missing subpixel
positioning and linear color blending support in BLF.
2018-08-21 19:07:04 +02:00
794836c8f1 GP: Recalc fill triangulation in sculpt mode
In some extreme modifications the fill triangulation cannot be right, so need a refresh.

This is done only for sculpt brushes that can change the geometry.
2018-08-21 18:50:03 +02:00
abc4beb245 build_environment: cleanup for osl harvesting on windows. 2018-08-21 10:49:41 -06:00
df6cd591f8 Fix a few unintended changes with new default startup.blend. 2018-08-21 18:39:44 +02:00
f1f3360696 Fix T56472: maximizing editors does not preserve top/status bar hiding. 2018-08-21 17:53:47 +02:00
Dalai Felinto
5200f6a2d7 Fix crash in edbm_shortest_path_pick_ex 2018-08-21 12:13:53 -03:00
Dalai Felinto
e9182a0f5d Fixup for Setup Tracking Scene
Issues introduced on: 17c245e294
(own error for the records).
2018-08-21 11:54:54 -03:00
Dalai Felinto
17c245e294 Fix T56413: Setup Tracking Scene not working in 2.8
Patch by Sebastian Koenig and me, with review and suggestions by Sergey Sharybin.

https://developer.blender.org/D3626
2018-08-21 11:31:59 -03:00
Dalai Felinto
91ff41bbda Motion Tracking: Script cleanup 2018-08-21 11:31:59 -03:00
da30b2d9f0 GP: Set default active layer when create stroke object 2018-08-21 15:57:17 +02:00
Dalai Felinto
68a719f1ea Multi-Objects: MESH_OT_dupli_extrude_cursor
Supporting the ctrl+click operator for multiple objects.
When no vertex is selected we only add a new vertex for the active object.

I'm using all the selected vertices to calculate the center of transformation
regardless of the object they come from. This way we have the same effect if the
meshes are joined together or kept as individual objects.

Thanks Campbell Barton for reviewing the patch.
2018-08-21 10:21:32 -03:00
6e7da7616b Icons: avoid error with colors out of 0-255 range 2018-08-21 22:44:58 +10:00
dbcc96334a Fix wrong default properties editor tabs in default workspaces.
Remove most of the defaults versioning code now that there is a
startup.blend with those changes included.
2018-08-21 14:00:33 +02:00
Kenneth Perry
5dd64b3c88 Python API: expose missing LAYER_MEMBER property type registration.
Differential Revision: https://developer.blender.org/D3628
2018-08-21 13:03:25 +02:00
21f09060f8 Cleanup: comment naming which will be changed 2018-08-21 20:52:41 +10:00
8926aa6f67 Merge branch 'master' into blender2.8 2018-08-21 20:28:28 +10:00
45721499b3 Correct recent makefile OSX check 2018-08-21 20:27:36 +10:00
15acbbdc1e Merge branch 'master' into blender2.8 2018-08-21 19:25:49 +10:00
122ef17ab2 GNUmakefile: correct blender binary for macOS 2018-08-21 19:20:01 +10:00
acc4507f1b Workbench: Support XRay rendering in OpenGL
OpenGL rendering only implemented the deferred renderer. This commit
will add the forward renderer. The forward renderer is used when XRay
mode is enabled
2018-08-21 11:00:46 +02:00
79ecfc99fd Tool System: loopcut preview & activate on click
The loop cut tool now works as expected for the tool-system,
where hovering previews the loop and clicking activates.

This uses a new gizmo type to pre-select the edge.
2018-08-21 19:05:07 +10:00
f7162d214e BMesh: split out edgering preview into own API
Needed for alternate tool system access.
2018-08-21 18:59:29 +10:00
7170ff429f Cleanup: trailing space 2018-08-21 17:18:42 +10:00
797274d256 Merge branch 'master' into blender2.8 2018-08-21 17:05:40 +10:00
0734541bc4 Cleanup: trailing space 2018-08-21 17:01:56 +10:00
f189ad1f4b Cleanup: rename gizmo access functions
Add float in API names since we may want access to other types.
2018-08-21 17:01:14 +10:00
4f06c7c838 Fix T56457: Crash when selecting Grease Pencil objects
Thanks to Charlie Jolly (@charlie) for the backtrace
2018-08-21 17:05:27 +12:00
2a5f319465 Depsgraph: Add query methods to identify all the ID's that a given datablock depends on
This commit adds a new method, DEG_foreach_ancestor_ID()
to accompany the existing DEG_foreach_descendent_ID().

It can be used to help print/collect all the ID's that
a given ID block depends on (i.e. all the datablocks that
need to be evaluated before the datablock of interest can
be evaluated)
2018-08-21 16:52:10 +12:00
351d13194d Cleanup: Fix variable shadowing 2018-08-21 16:52:10 +12:00
a7dcad2f8f Cleanup: Fix typos 2018-08-21 16:52:10 +12:00
Dalai Felinto
b4d23818c8 Remove MESH_OT_drop_named_image
This was never ported to work with Cycles, so it is basically useless in 2.8.
It can always be brought back in the future.
2018-08-20 20:58:20 -03:00
Dalai Felinto
753be0a2a5 Multi-Objects: MESH_OT_colors_reverse 2018-08-20 20:58:20 -03:00
3c5365556a Fix missing color management in Cycles viewport on macOS.
The half float extension is not supported on macOS, rather it's simply
part of OpenGL core so we don't need to check.
2018-08-21 00:38:54 +02:00
Dalai Felinto
53dfb4895c Fix relationship lines selectable 2018-08-20 14:20:25 -03:00
Dalai Felinto
bfdaa9a979 Object constraint lines viewport drawing
The core logic of this implementation comes from the drawobject.c from 2.7x.
I'm using `ts.colorGridAxisZ` for its color because of the legacy code:

```
UI_GetThemeColor3ubv(TH_GRID, col1);
UI_make_axis_color(col1, col2, 'Z');
glColor3ubv(col2);
```

There is nothing stopping us from adding this to the theme though, as it should
have been the case to start with.
2018-08-20 14:07:40 -03:00
6cd3a67e36 Workspaces: remove separate workspaces.blend config file.
This is quite confusing in the current UI, with both startup.blend and
workspaces.blend containing a list of workspaces. In practice you'd usually
want to save workspaces to both files.

The downside of having a single file may be that you then can't disable
certain workspaces by default, but we could add a setting for that.
2018-08-20 16:23:22 +02:00
444934632a Workspaces: add new default workspaces in startup.blend. 2018-08-20 16:23:22 +02:00
c9abb0fe26 Workspaces: replace bundled workspace.blend with embedded startup.blend.
We want these to have the same workspaces in both, so there is no reason
to have two files that are identical.
2018-08-20 16:23:22 +02:00
f1ab36d154 Fix outliner crash loading some .blend files without treestore. 2018-08-20 16:23:22 +02:00
e243f366c6 Fix system workspaces.blend not being found on some systems. 2018-08-20 16:23:22 +02:00
9600b23eaa Viewport: add default set of HDRI images.
These are taken from HDRI Haven (https://hdrihaven.com). Many thanks to
Greg Zaal for creating and releasing them under a CC0 license!

The HDRIs are intended to be used in the Lookdev display mode. With
1K resolution and compression they are not intended for final renders,
but it keeps the file size small and the difference is not noticeable
for lighting.

Command used for compression:
oiiotool %s --ch R,G,B -d float --compression dwab:300 -o output/%s
2018-08-20 16:23:22 +02:00
1c7119a336 Wrokbench: Add support for maximum drawtype OB_TEXTURE 2018-08-20 16:21:44 +02:00
7ffcce8607 Fix Cycles AO pass not working for shadow catcher objects. 2018-08-20 16:09:17 +02:00
47d43c5a00 Bone Display: fix flickering issue with BBones in ortho view 2018-08-20 15:47:22 +02:00
939a5cb6ee Image Editor: Add active tool button for Annotations (WIP - Event handling not working)
This reuses the tool defines for the 3D view. However, for some reason,
the events don't seem to be getting fired off here, like the tool system
is getting ignored here completely.

FIXME: Resolve the event handling issues
2018-08-21 01:22:02 +12:00
31a1c2b7d2 Object Mode: Add back support for the object "Maximum draw type" option 2018-08-20 13:19:17 +02:00
William Reynish
70e10d6207 UI: Small adjustments to Smoke properties layout 2018-08-20 11:16:48 +02:00
52d75d5127 Overlay: Add support for per object wirefram options
This patch has a known bug on AMD + mesa because of the drivers. I will
send a bug report to mesa.
2018-08-20 10:46:11 +02:00
d2e70455cf Merge branch 'master' into blender2.8 2018-08-20 17:53:53 +10:00
3ef1aeb15e Fix: Theme colors for datablock channels were missing for the NLA in the new default theme 2018-08-20 18:26:46 +12:00
6f2735b2bf Motion Paths UI: "Update from Scene Range" operator
Make it easier to update the frame range for motion paths from
the Scene's current frame range (render or preview range)
2018-08-20 16:12:37 +12:00
f52e31a46d Fix BMesh edge_bisect, edge_percent being ignored
Also fix float/int/bool access methods
2018-08-20 13:38:10 +10:00
76ea32d192 Cleanup: unused warning 2018-08-20 11:29:23 +10:00
143511b961 Merge branch 'master' into blender2.8 2018-08-20 11:27:49 +10:00
98efcdb1a0 Cleanup: trailing space 2018-08-20 11:24:14 +10:00
537bf6af0c RNA: Spline.calc_length() utility function
D1810 by @Matpi w/ edits
2018-08-20 11:23:40 +10:00
2349273ade build_environment: fix build issues with alembic
-read all headers from openexr not ilmbase
-add missing iexmath lib
-turn binaries back on, the blender unit tests require them.
2018-08-19 17:47:16 -06:00
b831accc01 Workbench: hide background option for OpenGL render
When OpenGL renderer is selected the option for background colors are
displayed, but ignored. For now we hide this option as it makes no sense
to have a viewport color option without viewport or render a 'final'
with a theme color.
2018-08-19 20:25:36 +02:00
b6b6eab6ae build_environment: windows harvest cleanup.
remove the commands that have already moved to the individual cmake files.
2018-08-19 11:44:46 -06:00
31b1d2ce73 build_environment: opencolorio buildfixes for windows.
copy the debug libs to the right place.
2018-08-19 11:44:46 -06:00
66dd954cab build_environment: openexr windows buildfix.
with the namespaces disabled the postfix also changed.
2018-08-19 11:44:46 -06:00
ae84db1d5d build_environment: buildfixes for boost
Disable hardcoded 64 bit build.
2018-08-19 11:44:46 -06:00
3c3e6d756c build_environment: build fixes for openimageio.
disable testtex due to parameter alignment issues
2018-08-19 11:44:46 -06:00
78f526087b build_environment: windows environment
get 32 bit and 64 bit compilers on the same gcc version.
2018-08-19 11:44:46 -06:00
897351fa52 build_environment: python windows build fixes
fix hardcoded ssl dll names.
2018-08-19 11:44:46 -06:00
0a08ad8636 build_environment: opensubdiv windows build fixes.
only build cuda on 64 bit, since 32 bit is no longer supported by nvcc
2018-08-19 11:44:46 -06:00
f4c9bdb022 build_environment: opennvdb windows build fixes.
disable openexr namespaces on windows due to linker errors with it.
link pthreads due to dependency though blosc
2018-08-19 11:44:46 -06:00
8309f8ee34 build_environment: openexr disable namespaces on windows.
Things do not end up in the right namespaces quite yet, and cause linker errors with other projects using the library.
2018-08-19 11:44:46 -06:00
8f4d772bf9 build_environment: blosc build fixes.
blosc embedded a copy of zlib/pthreads causing duplicate symbol linker errors. pthreads was windows specific, but zlib may apply to other platforms as well.
2018-08-19 11:44:46 -06:00
c2c4420f89 Fix T56450: Crash with bevel modifier.
POinters shall always be explicitely handled in modifier copying code,
as well as reading code! Runtime ones shall just be NULL-ed.
2018-08-19 16:57:53 +02:00
b1cb79d312 UI: rename 'Apron' to 'Click Anywhere' 2018-08-19 15:20:21 +10:00
20b30b6bee GP: Reduce updates of material previews
If there is a update in progress, don't update again.
2018-08-18 16:24:18 +02:00
353e691ff9 DRW: Fix crash in defered compilation 2018-08-18 12:58:15 +02:00
9f25b2f278 Merge branch 'master' into blender2.8 2018-08-18 19:18:55 +10:00
4d71579d3b Arrrg, fix for previous commit :/ 2018-08-18 10:25:00 +02:00
27ccba0270 Fix T56439: Crash removing Rigid Body World.
Need to rebuild the graph when we add or remove rigidbody world!
2018-08-18 10:21:33 +02:00
f86a60bc62 Static Override: make hidden & co flags of object overridable. 2018-08-18 10:21:33 +02:00
37acf4722d Static Override: link newly overridden collection to scene.
This avoids getting all overridden objects from said collection
instantiated in master collection, totally untidy!

Note that there is still an issue when 'active' object (i.e. the
armature usually) is in hidden sub-collection, since you have to make
that whole hidden collection visible again to see it.

We'll need to support moving objects into overridden collections am
afraid, arg. :(
2018-08-18 10:21:33 +02:00
4c22343271 Warn when app-template isn't found 2018-08-18 14:10:07 +10:00
506d8448cc WM: app-template command line override
Without this, there was no simple way to have
launchers for different app-templates.

Also allows force-disabling the app-template stored in the preferences.
2018-08-18 14:10:07 +10:00
db8ca0f17a cmake: fix typo in else() 2018-08-17 14:14:26 -06:00
a069d3dc8c UI: save statusbar/topbar collapsed state per screen.
This can now also be set from the Window menu in addition to dragging.
2018-08-17 20:16:19 +02:00
7f9a1d2f3b Fix GPU_viewport size asserts in some cases.
Now always tag for redraw when region size is changed instead of relying on
a redraw tag having been done elsewhere.
2018-08-17 20:16:07 +02:00
0a5f706136 cmake/ctest: output test binaries to debug/release folders on windows.
debug/release builds were writing the binaries to the same folder
2018-08-17 10:04:55 -06:00
2a00bea7b4 build_environment: Various tweaks needed for windows debug libs. 2018-08-17 09:20:40 -06:00
6cad7984c6 Fix missing shader compilation progress bar. 2018-08-17 15:55:21 +02:00
aff7609aa5 build_environment: fix mistaken commit in openexr. 2018-08-17 06:30:27 -06:00
fa70826167 Fix more image editor Python errors after switching workspaces. 2018-08-17 14:17:06 +02:00
ba60e5d41b GP: Increase stats file size
For big files, the size of the field for number of points  was not enough
2018-08-17 13:49:59 +02:00
8b79a150f8 Workbench: Fix buggy shadow
Was caused by shadow bbox not being updated.
2018-08-17 13:04:26 +02:00
f031e8d3ac Object Mode: Add back the extra object axes drawing option 2018-08-17 13:04:26 +02:00
435f308eed Object Mode: Use same empty (arrow) drawing as the bone axes display 2018-08-17 13:04:26 +02:00
7d720cc655 Merge branch 'master' into blender2.8 2018-08-17 13:00:52 +02:00
9f0f8aabe2 Fix error with image editor toolsystem when switching to some workspaces. 2018-08-17 13:00:31 +02:00
c9d5d311ec Cleanup: fix harmless compiler warnings. 2018-08-17 13:00:31 +02:00
d33456e5ec Build Environment: fixes for Linux after recent updates. 2018-08-17 12:42:13 +02:00
894a216252 Fix engine.camera_model_matrix() not working in the Python API. 2018-08-17 12:28:27 +02:00
Vuk Gardašević
502aabb9d0 Physics Rigid Body: Use Single Column and Grid Flow layout
(and Rigid Body Constraint)

See D3613
2018-08-17 12:05:35 +02:00
Vuk Gardašević
b19b708728 Physics Soft Body: Use Single Column and Grid Flow layout
See D3612
2018-08-17 12:04:35 +02:00
Vuk Gardašević
2a3758f305 Physics Dynamic Paint: Use Grid Flow, sub-panels layout
See D3611
2018-08-17 12:03:54 +02:00
Vuk Gardašević
eccc047f70 Physics Force Field and Collision: Use Single Column and Grid Flow layout
See D3609
2018-08-17 12:02:52 +02:00
Vuk Gardašević
3b4d520cd7 Physics Common: Use Single Column and Grid Flow layout
See D3605
2018-08-17 12:01:26 +02:00
Vuk Gardašević
62b2675147 Physics Smoke: Use Single Column and Grid Flow layout
See D3567
2018-08-17 11:59:33 +02:00
Vuk Gardašević
00bb15512f Physics Fluid: Use Single Column and Grid Flow layout 2018-08-17 11:57:24 +02:00
a452e5e5e3 GP: Fix fast drawing error
During the modifications of the drawing engine, this was changed by error.
2018-08-17 11:09:08 +02:00
a9b82d5d79 Multires: Fix wrong creation of multires mesh
Should use evaluated object to query deformed mesh from.
2018-08-17 10:55:51 +02:00
4b0b91aee0 build_environment: small fix for building ocio on windows. 2018-08-16 17:42:37 -06:00
1aed77caca build_environment: osl 1.9.9
does no longer seem to bundle pugixml, so that's a new dependency.
2018-08-16 17:42:37 -06:00
7fed3f1b19 build environment: fix opencollada build on macOS 2018-08-17 01:24:05 +03:00
77e1942e0e Armature: Add ghosting support (old x-ray) 2018-08-16 23:58:29 +02:00
4711e0ee26 Non-Meshes: Add ghosting support (old x-ray) 2018-08-16 23:58:29 +02:00
1e26345a89 Fix T56418: Changing to Solid View crashes Blender
Everything seems to behave like it should when drawdata is alloced
on instances.
2018-08-16 23:58:29 +02:00
7d29c9a16b Overlay: Fix crash when ghosting is enabled without wireframe 2018-08-16 23:58:29 +02:00
a01dec2d9c Cleanup: Remove unused uniform and UBO. 2018-08-16 23:58:24 +02:00
d96715fe5c Fix T55722 : Blender 2.8 crashes on startup on old Nvidia cards 2018-08-16 23:57:59 +02:00
c761153f64 Overlays: Support for wireframes and edit mode overlay on xray objects 2018-08-16 23:57:59 +02:00
32e57fe4e7 GPUFramebuffer: Fix wrong stencil clearing 2018-08-16 23:57:59 +02:00
11c845e334 build_environment: openimageio 1.8.13 2018-08-16 13:43:46 -06:00
7772ba766d build_environment_windows: fix missing x64 ssl libs and debug build. 2018-08-16 09:07:32 -06:00
88011ddba9 build_environment: python packages update.
idna 2.7
chardet 3.0.4
urllib3 1.23
certifi 2018.8.13
requests 2.19.1
2018-08-16 09:07:32 -06:00
42b7fb0fd3 Build Environment: fix OpenVDB 5.1 build on Linux. 2018-08-16 16:21:26 +02:00
231d54e79b Build Environment: fix for IlmBase lib names without version on Linux. 2018-08-16 16:21:26 +02:00
d63c181887 Correct error in docstring 2018-08-17 00:07:00 +10:00
f689c821f0 Documentation: fixes for building w/ 2.8
Note, bpy.app.icons needs to be supported eventually.
2018-08-17 00:02:36 +10:00
5236793d35 Build Environment: cleanup OpenColorIO duplicated and unused flags. 2018-08-16 15:51:08 +02:00
d1be651c9e Merge branch 'master' into blender2.8 2018-08-16 15:49:33 +02:00
7a7c579dd9 Fix T56404: Shape keys of the curves with multiple splines go haywire in edit mode.
Very dummy mistake (someone forgot to increment one of the variables in
one of the loops in that spaghetti nightmare that is nurbs shapekey
code), took half an age to spot it... :/
2018-08-16 15:49:00 +02:00
da25dfa870 Merge branch 'master' into blender2.8 2018-08-16 15:22:34 +02:00
1e70655169 build_environment: Fix compilation of FFmpeg and OpenColorIO on Linux 2018-08-16 15:18:02 +02:00
e19439a169 Cleanup: Use dedicated function to copy mesh during evaluation process
It is rather fully annoying to have same sets of obscure flags all over.
2018-08-16 14:42:06 +02:00
50cb9b52bb Multires: Implement function to get mesh at multires position of stack 2018-08-16 14:42:06 +02:00
642c6d2fc9 Multires: Cleanup, naming and bool type 2018-08-16 14:42:06 +02:00
c58de2f632 UI: add redo panel to clip editor 2018-08-16 20:23:32 +10:00
59670e999a GP: Add new presets for materials
This allow create prests without import materials and include a requested predefined settings for Stroke only, Fill only and Stroke and Fill.
2018-08-16 11:24:45 +02:00
02e9dba07b Static Override: fix part of the issues with new Collections.
Still a lot to work here, those are much more complicated to handle than
old Groups. :(
2018-08-16 11:06:21 +02:00
3c8e4e4180 Cursor Tool: add transform orientation type
Support using the current transform orientation when placing the cursor.

See: T55036
2018-08-16 16:15:16 +10:00
8d1a7f3773 build_environment: openvdb 5.1.0 2018-08-15 20:48:19 -06:00
70bcb0c01c 3D View: tweaks to navigation gizmo
- Only show axis backdrop when hovering.
- Move closer to the screen corner.
2018-08-16 12:47:24 +10:00
9a72342c6e UI: move region toggle closer to the screen edge
Reduces 3d view navigation widget overlap.
2018-08-16 12:43:30 +10:00
4e41a44400 UI: show +/- icons for fill/deep 2018-08-16 12:15:04 +10:00
8efd7be41c UI: hide redo panel for move up/down operators 2018-08-16 08:42:36 +10:00
Dalai Felinto
a495df6b3b Camera Background: don't show "Not Set" when using Camera Clip 2018-08-15 19:26:05 -03:00
Dalai Felinto
d3160f350d Camera Reconstruction: Fix sorted scripts
* 3D Markers to Mesh
* Link Empty to Track
* Set as Background

Note, the "Setup Tracking Scene" was not addressed. Pending for this script is:
* Update world for EEVEE settings
* Adjust the layer code to use collections
* Remove broken world API
2018-08-15 19:26:05 -03:00
Dalai Felinto
461b3c817e Camera Reconstruction: Camera Path
The only difference from 2.7x is that we were using glLineWidth(2.0) before,
which is not supported reliably in the latest OpenGL.

Big thanks to Clément Foucault for helping with this, on the design as well as
debugging the implementation.

For the records, I'm creating and destroying batches for the path geometry at
every draw. The pipeline is as follows:

 1. Create GPUBatch with all the points
 2. Create new shgroup with simple shader
 3. Add call with the gpubatch
 4. Save it in a linked list in stl->g_data
 5. Free it after all drawing is done
2018-08-15 19:26:05 -03:00
Dalai Felinto
248c049b70 Camera Reconstruction: Draw solid spheres
If in SOLID "mode", and x-ray, draw the empty spheres still.
2018-08-15 19:25:53 -03:00
c4022da617 Merge branch 'master' into blender2.8 2018-08-16 08:18:52 +10:00
8e927ee938 Cleanup: unused arg 2018-08-16 08:18:25 +10:00
d5c5a1518d Correct flag use in recent object select change
Confusingly it worked, but was wrong.
2018-08-16 08:17:26 +10:00
eebc292b42 Cleanup: rename transform UI values
See: T54858
2018-08-16 08:02:36 +10:00
8661563156 Cleanup: Silent compiler warnings 2018-08-15 22:53:57 +02:00
08f5986d21 GP: Revert previous commit for fixing compiler error
The function must be static. The error was the definition in header file must be removed. This error was not detected by Microsoft compiler but Linux compiler fails.
2018-08-15 22:11:44 +02:00
Dalai Felinto
ea43e4a060 Fix build after GreasePencil commit 2018-08-15 16:11:18 -03:00
f634d4a8a6 build_environment: opencolorio 1.1.0
-Moved from dynamic link to static on windows
-gained lcms/tinyxml/yamlcpp deps, since we need a little more control over the build flags than the build-in options will provide.
2018-08-15 12:32:34 -06:00
814df6e4d3 GP: Add multiframe support to clean loose operator 2018-08-15 20:27:59 +02:00
d7fcb68d11 GP: New clean loose points operator
This operator clean any stroke below a defined number of points. This is used because sometimes when use eraser some points keep missing.

Also some changes in the UI menu.
2018-08-15 20:27:59 +02:00
8e8d93eb86 GP: Redesign logic of drawing engine for object instance support
The initial design assumed that there was only one object for each unique name, but that was not the case when instances were created.

Now, instances are supported and speed has been greatly improved when repetitions are used.

As a result of this change, the option to create objects has been removed in the Instances modifier. This option was strange and was also against Blender's design rules, since a modifier should never create objects. The old functionality of the modifier can be achieved with instances.

Also, several memory leakage problems that were not previously detected have been eliminated, and especially in the grid and in the drawing process

Onion Skin is not supported in multi-user datablocks.  Support this, makes incompatible with instances. We need find a solution in the long term, but now it's better keep disabled and make instances work. Anyway, the new instances makes unnecessary to use muli-user datablocks.
2018-08-15 20:27:59 +02:00
bb84f7ff5f Fix image editor not vertically centering images with region overlap. 2018-08-15 19:24:00 +02:00
82e59d4c18 Cleanup: remove unused R_ORTHO / R_PANORAMA flags. 2018-08-15 18:40:56 +02:00
0b5b543b7c Fix pose mode border deselect not working after recent changes. 2018-08-15 17:44:50 +02:00
38e08ec66b Fix T56012: brush stencil overlay draws in the wrong location. 2018-08-15 17:16:21 +02:00
9bac3ffd3f Cleanup: stop using DerivedMesh in mesh cache modifier. 2018-08-15 16:21:43 +02:00
b262fba5e3 Fix T55587: bugs with popovers in collapsed menus, like the timeline header. 2018-08-15 16:00:40 +02:00
1d067868c0 UI: tweak drawing of header status text for transparent headers. 2018-08-15 16:00:40 +02:00
913b8396d9 Multires: Initial groundwork to hook up displacement to new Subdiv object
Adds a displacement support for OpenSubdiov based subsurf object implemented
as a callback which gives vector displacement in object space. Currently is
implemented to calculate displacement based on myltires displacement grids,
but we can support things in the future if needed.

Submitting to review to see if there is something obviously wrong in the
direction (old multires code was sharing same displacement code to both
calculate final displaced mesh and reshape an existing one, which is rather
confusing and probably can be done more cleanly?).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3604
2018-08-15 15:40:08 +02:00
Dalai Felinto
5a89dfe06b Clip Reconstruction: Cleanup - use const for selection synchronize
In order to avoid the discard qualifier warning I had to change a few extra
things.
2018-08-15 10:06:11 -03:00
Dalai Felinto
ad7cb02404 Skip bundle names when drawing selection pass 2018-08-15 10:06:11 -03:00
6fb06d0cd8 Fix border select operations in object mode 2018-08-15 22:56:53 +10:00
09b3566b5e UI: correct selection operation names 2018-08-15 22:56:53 +10:00
Dalai Felinto
5d15e68743 Fix viewport selection of markers not updating in all editors
This includes selections both in the clip editor as the viewport.
The selection is implemented as a synchronization function called from the eval
selection update node in depsgraph.
2018-08-15 09:46:33 -03:00
Dalai Felinto
7907dfc400 Motion Tracking Reconstruction Viewport Drawing (T51544)
* Draw bundle names.
* Draw bundle shapes (but spheres).
* Draw custom colors for bundles.
* Support selecting bundles.
* Object bundles also fully tested.

Missing from this commit:
* Camera path.
* Spheres are not drawn as solid.
* Blue dashed line from camera to tracker objects.
2018-08-15 09:45:25 -03:00
41ca20e031 Subdiv: Cleanup, dead code 2018-08-15 11:38:13 +02:00
4e1f310b8d Subdiv: Fix memory leak interpolating CD_MDISP
Can not copy data without freeing the previous storage.
2018-08-15 11:28:00 +02:00
3c9c6507ac UI: adjust names for select operations 2018-08-15 16:12:39 +10:00
f7c1716b6c Merge branch 'master' into blender2.8
Fixes enum-flags having no text w/ property-split
2018-08-15 15:56:20 +10:00
c3e3ccd42c Cleanup: set expand variable for all enum-flags
No functional change, needed for fix in 2.8x
2018-08-15 15:54:27 +10:00
054af691c0 Icons: regenerate from 'icons_geom.blend'
Regenerating all to remove zero area triangles.

Previously icons included files not committed to lib/.
This is the output of 'make icons_geom' for svn rev: 62081.
2018-08-15 13:27:21 +10:00
4f1c1bbe7a Icons: geometry now checks quantized area
Previously back-facing normal was checked which isn't ideal
because a triangle that starts out zero-area may become
visible once it's coordinates are quantized.
2018-08-15 13:18:47 +10:00
Stefan Werner
a9700e7ad2 Fix T56359: Unitialized variable in Cycles OpenCL could cause crashes. 2018-08-14 22:51:53 +02:00
4a3348cfe0 GPUShader: Remove some of the unused shaders
keeping GPU_SHADER_SMOKE until other occurences are removed.
2018-08-14 21:46:13 +02:00
4fcca6a0ab GHOST: Make win32 errors more readable on some drivers 2018-08-14 21:38:13 +02:00
cb65542d2c DRW: Fix incorrect default stencil value 2018-08-14 21:38:13 +02:00
485b8d41be Workbench: Add support for the xray object option
Xray object can be see through other objects. They cast shadows as well
but cannot receive then.
2018-08-14 21:38:13 +02:00
a5d72bac8e Fix (unreported): misuse of GL Context when creating new window and/or rendering. 2018-08-14 16:10:35 -03:00
Dalai Felinto
b2966b70fe EEVEE: Volumes - get current frame from depsgraph
The value from scene is not up to date at all times.
2018-08-14 16:07:52 -03:00
Dalai Felinto
37f6a26e74 Fix viewport background video/clip not updating on playback
CFRA should be avoided, it is not the depsgraph current frame, it is only
updated on cow flush.
2018-08-14 16:07:52 -03:00
Dalai Felinto
6ca48a523a Fix gpu building after cleanup
Broken since: a3c9f4de70
2018-08-14 16:07:19 -03:00
e6af1e4478 Cleanup: remove unused theme color functions using legacy GL. 2018-08-14 20:03:08 +02:00
a3c9f4de70 Cleanup: remove unused basic shader, we use many specialized shaders now. 2018-08-14 19:57:58 +02:00
26812a185f Fix masks not drawing with draw type set to dashed. 2018-08-14 19:57:58 +02:00
1024161f80 Fix uneven column widths in user preferences interface and editing. 2018-08-14 19:28:20 +02:00
fdb4062294 Cleanup: unused variables 2018-08-15 01:52:39 +10:00
e88e80a6a0 3D View boarder/lasso select tool options
Add tool options to control how select operates (add/sub/set/and/xor).

Note: edit mode armature select still needs to support all options,
this is complicated by how it handles partial end-point selection.
2018-08-15 01:48:55 +10:00
d92d310b15 Fix T55719: crash with sculpt dyntopo and constant detail resolution sampling. 2018-08-14 16:37:57 +02:00
e61599b638 Merge remote-tracking branch 'origin/master' into blender2.8 2018-08-14 08:00:49 -06:00
5d034351de make.bat: fix ninja support.
only worked with a fresh build folder.
2018-08-14 07:59:08 -06:00
f19d99c10d Merge branch 'master' into blender2.8 2018-08-14 15:41:11 +02:00
cab013bc5d Fix use of uninitialized variable in some cases, in recent bugfix. 2018-08-14 15:27:49 +02:00
Dalai Felinto
cc9255f8a8 Sync rna_access rna property update cow check with depsgraph
This is a manual synchronization. If we need to re-use the same util in both
areas it would be welcomed as well. For now this at least get things back to a
working state.
2018-08-14 10:15:23 -03:00
d648501e28 BMesh: define suptype for bevel normals.out
Not doing this broke doc building.
2018-08-14 22:26:19 +10:00
3730839958 Correct error in py doc generation 2018-08-14 22:18:46 +10:00
1b53838548 Merge branch 'master' into blender2.8 2018-08-14 14:10:47 +02:00
6eb5b418ee Fix T56363: Blender crash when deleting a curve object.
Conversion code could leave object with inconsistent material data
compared to its new obdata.

Ideally, various conversion code would handle that properly, conserving
materials when possible, but for now at least ensure we get valid
result!
2018-08-14 14:06:42 +02:00
932251caea Fix object copying not ensuring validity of material arrays.
Related to T56363, this is not fixing the root of the bug, but ID
copying should always be a good occasion to ensure sanity of our data
(and error checking is always better than a crash!).
2018-08-14 14:06:42 +02:00
1f78e86070 Fix modifier operators not working from Python API as before.
The poll function required the modifier to be in the context, but these
operators also accept a "modifier" string property as well.
2018-08-14 13:25:08 +02:00
5e696fdcd6 Multires: Begin hooking it up to the new subdiv code
Currently behaves same as subsurf, support of displacement is the
next task in the line to tackle!
2018-08-14 12:17:47 +02:00
d7ae76fa35 More helpful tooltip when trying to apply constructive modifiers on curves
Suggested by user aa311
2018-08-14 12:06:13 +02:00
02dbe3b0c7 Multires: Synchronize settings with Subsurf modifier
Currently no functional changes, just exposes all settings which we need
for OpenSubdiv, similar to what Subsurf modifier is doing already.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3602
2018-08-14 12:02:21 +02:00
e25fdb6a79 Splash: sorting and cleanup
* http -> https
* Release Logs -> Release Notes
* Match number of items on both sides by adding a separator
* Remove Python API Reference link since it's already under Help
when Developer Extras is enabled.
2018-08-14 11:59:48 +02:00
ccc8d2ab42 Merge branch 'master' into blender2.8 2018-08-14 17:41:19 +10:00
644e2b3ffd Cleanup: missed const change in recent merge 2018-08-14 17:41:01 +10:00
73234a9122 Cleanup: vpaint face select de-selected twice 2018-08-14 17:37:59 +10:00
7ed6de3951 Merge branch 'master' into blender2.8 2018-08-14 17:12:41 +10:00
2044ee00c2 Correct vpaint vertex circle select
Would run validate when not needed.
2018-08-14 17:02:57 +10:00
8203e70709 build_environment: opencollada 1.6.63 2018-08-13 20:45:38 -06:00
12acf1e4f8 Cleanup: Update some links to new wiki 2018-08-13 21:55:30 -04:00
0e7dd01944 PyDoc: remove old undocumented message 2018-08-13 21:43:51 -04:00
1f3eb3088f build_environment: sdl 2.0.8 2018-08-13 19:19:42 -06:00
fee32abee9 build_environment: opensubdiv 3.3.3 with PR975 + TBB 2018_U5 2018-08-13 19:08:28 -06:00
e040cfe15a PyDoc: Remove "API" from version 2018-08-13 20:53:45 -04:00
44871e0e0f Pydoc: Switch theme to sphinx_rtd_theme 2018-08-13 20:51:36 -04:00
0a93685dcc PyDoc: Add missing application icons link 2018-08-13 20:51:36 -04:00
721321bf9e Cleanup: copy paste error in tooltip 2018-08-13 20:51:35 -04:00
34c09bc21e PyDoc: Various fixes to generation process 2018-08-13 20:51:34 -04:00
a3cc1fcaf3 PyAPI Docs: Fix syntax error 2018-08-13 20:51:34 -04:00
57e6359920 PyDoc: Remove hack to rename main doc from 'contents' to 'index' 2018-08-13 20:51:33 -04:00
7d8477e019 PyAPI: Docs: Remove old Blender.org theme
This also makes the generator script only allow one theme.
Having this be an argument does not make sense, just over complicating 
things.
2018-08-13 20:51:32 -04:00
d062c86ed0 PyDoc: Use captions for section headers 2018-08-13 20:51:31 -04:00
d0acfba937 PyAPI Docs: Move change log link to top with info docs 2018-08-13 20:51:31 -04:00
27be340616 PyAPI Docs: Remove large note about changing modules
These are stable now. We may want another note about
new 2.8 modules
2018-08-13 20:51:30 -04:00
bee348a388 PyAPI Docs: Remove BGE related documenation 2018-08-13 20:51:30 -04:00
6218cd3261 PyAPI Docs: Fix Space in URL Name 2018-08-13 20:51:29 -04:00
1bbddc8a1e Merge branch 'master' into blender2.8 2018-08-14 10:45:00 +10:00
b993e8a17a Cleanup: use boolean argument 2018-08-14 10:42:04 +10:00
3036a9a46c Merge branch 'master' into blender2.8 2018-08-14 10:17:35 +10:00
c29c426925 Cleanup: use braces w/ particle loop macros 2018-08-14 10:14:05 +10:00
5e8dbafb5b Merge branch 'master' into blender2.8 2018-08-14 10:08:34 +10:00
efdc0959b1 Merge branch 'master' into blender2.8 2018-08-14 10:02:05 +10:00
98f4a8eedf Cleanup: style 2018-08-14 10:00:37 +10:00
04067a54c0 GPUShader: Fix previous "old Nvidia" fix commit
Note to myself, next time, better check the fix before pushing it.

GL_ARB_texture_gather is defined if there is support for the extension
not only when the extension is enabled. Do this check ourself with
GPU_ARB_texture_gather define.

Original fix 822de6e9e1
2018-08-13 23:09:48 +02:00
53ed270523 Fix T56298: Rendering glitch when bones are in stick mode in ortho view 2018-08-13 23:01:18 +02:00
efd44f8480 Cleanup: GPU codegen: remove most of legacy code
A lot of code in codegen was used by previous GLSL system.
Now most of it is not used due to all the things being written from scratch
in 2.8 and we can clean most of it.

As a side not this make the system a bit less flexible (no support for
cubemaps, preview image, etc...) but can be extended again.
2018-08-13 23:01:18 +02:00
77b39bbaa0 Cleanup: Rename GPU_* functions to make more sense
* Remove GPU_link_changed which is unused.
* Remove all GPU link function that are not used anymore.
* GPU_uniform_buffer is now GPU_uniform.
* GPU_texture_ramp is now GPU_color_band.
* GPU_uniform is now GPU_constant.
2018-08-13 23:01:18 +02:00
822de6e9e1 Fix T55802 shader compile bug with texture gather on old Nvidia card
The extension GL_ARB_texture_gather is reported to be supported and does
not trigger an error when enabled but the textureGater functions are not
defined.

Workaround is to disable the use of this extension on such systems.
2018-08-13 23:01:18 +02:00
e24cd10245 build_environment: Remove lapack 2018-08-13 14:56:49 -06:00
518ce887ad build_environment: iconv 1.15 2018-08-13 14:45:27 -06:00
4e03f9cbc2 build_environment: fftw 3.3.8 2018-08-13 13:21:36 -06:00
4a10ba2174 build_environment: openexr support debug build. 2018-08-13 12:37:12 -06:00
2aa26de378 Use full transformation of B-Bone segments in Copy Transforms.
Currently constraints can only read the location along the
spline. This obviously limits opportunities for complex bone
interactions in rigs.

This patch exposes access to rotation and scale as well in
Copy Transforms. However, due to the way how things work,
this data cannot be smoothly interpolated, and abruptly
changes when switching to the next segment.

Reviewers: aligorith

Differential Revision: https://developer.blender.org/D3545
2018-08-13 20:37:53 +03:00
f749c3cbb9 build_environment: alembic 1.7.8 2018-08-13 11:36:23 -06:00
47af343b61 Implement multiplicative Copy Scale and make it the new default.
Scale is a multiplicative quantity, so adding it doesn't make sense.
However, for backward compatibility reasons, and in case somebody
actually desires the old additive behavior, the old way remains as
an option.

Without this change the only way to properly combine scale is via
parenting or the complicated Transformation constraint.

The new mode is turned on by a flag for file compatibility, but the
RNA option is reversed so that the new behavior feels more default.

Reviewers: aligorith

Differential Revision: https://developer.blender.org/D3558
2018-08-13 19:57:15 +03:00
a5aeca4a64 Fix dependency graph for constraints depending on B-Bone shape.
Some constraints have an option to take the final bezier shape of
the target B-Bone into account. This shape usually depends on two
other bones in addition to the target itself, so the graph should
include the relevant dependencies.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D3591
2018-08-13 19:02:49 +03:00
ff6bd57873 Merge branch 'master' into blender2.8 2018-08-13 17:49:19 +02:00
bc675d90d0 Fix T55745: Pick Shortest Path tool, inconsistent selection.
To get consistent, user-expected results here, we need to 'fake'
starting immediately after a 'skip' block (such that we start with a
full block of selected elements).

Same issue affected vertices and edges selection of course, did not
check the other usages of WM_operator_properties_checker_interval_test()
though.
2018-08-13 17:48:36 +02:00
887d6cb1ee build_environment: fix windows ilmbase/openexr support.
seems like the openexr 2.3.0 release tarball has broken cmake support, latest from git works
we'll have to revisit this once they get a new release out.
2018-08-13 09:27:57 -06:00
0e8bd6ba8a Version update to 2.80 Alpha 2, new splash from Hero open movie. 2018-08-13 16:53:16 +02:00
5c61be777f Subsurf: Introduce quality option
For users it defines how accurate vertex positions are in terms
of limit surface (as in, how close the vertices locations to the
condition when they are calculated for an infinitely subdivided
mesh).

This affects things like:

- Irregular vertices (joint of 3 or more edges)
- Crease

Keep quality value low for performance.

NOTE: Going higher does not necessarily mean real improvement
in quality, ideal case might be reached well before maximum
quality of 10. Quality of 3 is a good starting point.

Internally quality is translated directly to adaptive subdivision
level.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3599
2018-08-13 16:04:06 +02:00
4fc2a43e52 build_environment: ffmpeg 4.0.2
with
lame 3.100
ogg 1.3.3
vorbis 1.3.6
flac 1.3.2
vpx 1.7.0
x264 20180811
xvidcore 1.3.5
faad 2.8.8
2018-08-13 07:57:29 -06:00
aac5458fa5 Fix bevel problem for vertex-only cube corners.
Was introduced by code from gsoc branch that does better job
on cube corners, but shouldn't have applied to vertex-only case.
2018-08-13 09:25:16 -04:00
349d67be28 build_environment: update ilmbase and openexr to 2.3.0 2018-08-13 16:12:30 +03:00
Dalai Felinto
cead9abe07 Depsgraph: Build node and relations for movieclip ID for its nodes
Otherwise we get asserts when opening files with the Move Distortion node.
2018-08-13 10:11:27 -03:00
b7784c0cd2 Merge branch 'master' into blender2.8 2018-08-13 13:49:48 +02:00
798a83e35f Cleanup: avoid too close namings, prone to typo mistakes! 2018-08-13 13:47:06 +02:00
0aefef7f8f Fix T56224: Blender2.8 will force a quit when trying to open a scene containing clip track created by blender 2.79.
Beautiful example of typo going unoticed and firing back up in totally
unexpected place years later. Guess nobody actually duplicated a Clip
data-block before! :P

Most likely own fault, during refactor of ID copying code.
2018-08-13 13:43:35 +02:00
8656081561 Depsgraph: Remove obscure code which was only needed for old OSD implementation 2018-08-13 13:10:10 +02:00
3ee6b940df Subsurf: Remove OpenSubdiv options from modifier
There are following reasons to do so:

- The plan is to replace it with some sort of object or viewport option,
  so we can apply OpenSubdiv subdivisions on top of modifier stack and
  keep modifier stack purely CPU side.

  This will solve issues when adding some relation in scene will force
  modifier to be evaluated on CPU.

- With new upcoming OpenSubdiv based CPU modifier implementation we can
  cache topology similar to what GPU side was doing, which will already
  be reasonably faster.

- OpenSubdiv GPU does not work since the OpenGL version bump, and is
  to be rewritten with all the adaptive refine options kept in mind.

Since OpenSubdiv GPU was already broken and was only causing object
to become invisible, there is no reason to keep having that option in
the modifier.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3598
2018-08-13 13:10:00 +02:00
e6827ad9a6 Fix T56290: Segfault when loading file - OpenSubdiv
Filled missing callbacks to converter.
2018-08-13 12:51:34 +02:00
517f58be3c Subsurf: Make uv boundaries easily extendible
This replaces old single toggle option to subdivide UVs with
an enum which can have more options. The usecase for this is
to be compatible with other software. But we also might choose
different subdivision type as default in the future.

DNA and underlying code supports all possible options, but
only the ones which are compatible with old subdivision code
are currently exposes.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3575
2018-08-13 12:37:46 +02:00
f8a499b596 OpenSubdiv: Add stub implementation of C-API
C-API is way smaller than the rest of the code which uses it.
So better to conditionally compile stub implementation than
to keep adding ifdef everywhere.
2018-08-13 12:37:18 +02:00
33fbc4fbea OpenSubdiv: Fix typo in crease comparison 2018-08-13 12:37:00 +02:00
d3250593d0 Merge branch 'master' into blender2.8 2018-08-13 11:58:24 +02:00
844b40b0c1 Fix T56344: Crash when used Twist for Emitter type of Particles System.
That effect is NOP with emitter particles anyway...
2018-08-13 11:57:18 +02:00
4710af81a4 Cleanup: Description should not end with a fullstop 2018-08-13 11:45:55 +02:00
4b6fa4d897 PyAPI: update scripts for matrix multiply operator
Operators:
- add torus
- align objects
- bake physics
- make dupli faces
- smart project

Templates:
- 3D view ray cast

Other:
- Methods for bones/edit-bones
2018-08-12 15:22:58 +10:00
444a0202d4 Gizmo: add blank gizmo definition
Missed from 98c304e865 by accident.
2018-08-12 13:17:10 +10:00
9d59851ca3 build_environment: blosc 1.14.4 2018-08-11 15:34:11 -06:00
9267d29bfb build_environment: zlib move harvesting to zlib.cmake 2018-08-11 15:13:39 -06:00
a4c3a87635 build_environment:openal 1.18.2 2018-08-11 14:44:50 -06:00
0596af141e build_environment: zlib 1.2.11 2018-08-11 14:44:50 -06:00
b4b8d3ab0e Cleanup: Fix wrong formatting
For unknown reasons, visual studio unformat a section of the code.
2018-08-11 20:54:13 +02:00
bece863ecb Merge branch 'master' into blender2.8 2018-08-11 15:39:47 +02:00
91acff1320 Fix T56293: Particle Instance Modifier Axis Buttons UX.
Those axis buttons indeed affect instances orientation even when Create
Along Path is not defined...
2018-08-11 15:35:22 +02:00
1f33075ef0 deplibs: disable functions that can be found on 10.13 sdk but aren't available on 10.9 target 2018-08-11 13:59:13 +03:00
f22d8ee94c Cleanup: Remove debug print 2018-08-11 10:03:06 +02:00
92b12d914f Cleanup GP instance: Remove element 0 because is duplicated 2018-08-11 09:59:44 +02:00
544bd49e63 deplibs: python use pkg-config from homebrew for ssl + xz 2018-08-11 01:45:46 +03:00
eae4539bdd deplibs: get freetype tar.gz rather than zip to get unix line endings 2018-08-10 23:31:27 +03:00
92f3671fe0 deplibs: let cmake do normal install on webp 2018-08-10 21:17:45 +03:00
7daf62950b build_environment: python 3.7.0 + numpy 1.15.0 2018-08-10 10:37:15 -06:00
d7b5e2fa72 Outliner: use generic WM drag and drop system for collections.
* Drag and drop between multiple outliners now works.
* Dragging the icon and text now give the same results.
* Fixes various crashes.
2018-08-10 17:54:00 +02:00
4375e7ff0b WM: internal changes to support dragging multiple IDs.
To be used by the outliner.
2018-08-10 17:53:00 +02:00
86c363a027 WM: pass on wmDrag to drop operators, so they can get the data directly.
Currently drop operators work mostly by specifying the name of the datablock.
However there can be datablocks with the same name in different libraries, so
this gives wrong results in some cases.

Currently only outliner drop operators have been updated to use this mechanism.
2018-08-10 17:53:00 +02:00
74016d73db WM: drag and drop poll functions can now specify a custom tooltip. 2018-08-10 17:53:00 +02:00
9e83283f73 Cleanup: decouple outliner tree element icon retrieving from drawing. 2018-08-10 17:53:00 +02:00
367ada71a0 Cleanup: move most outliner drag & drop code into one file. 2018-08-10 17:53:00 +02:00
92217a81b5 update image libraries, D3005 with few mods 2018-08-10 18:50:15 +03:00
d0e083a60d build_environment: remove unneeded boost patch on windows. 2018-08-10 09:13:48 -06:00
71bd30d8c0 Submodule commit generated by git tool
This commit des not change nothing only is required by visual studio git tool
2018-08-10 17:00:48 +02:00
d9fc59c37c Cleanup: Remove unused param 2018-08-10 17:00:48 +02:00
7673867360 GPUMaterial: Fix color ramp node with constant interpolation
Color ramp with constant interpolation must bypass texture filtering and
use nearest neighboor sampling in order to appear correctly sharp.

This patch use a GLSL hack to use nearest sampling on thoses particular
color band.
2018-08-10 16:16:35 +02:00
2cbffc8e40 Eevee: Fix assert with object volume rendering 2018-08-10 16:16:35 +02:00
bf6a22ed6f GPUMaterial: Group all colorband texture together
This lower the use of texture samplers slots and let users use more real
textures in their shaders.

This patch also make the ramp texture 16 bit floating point. Meaning you
can now use value greater than one in your color ramps.

With the limit of 128 colorband per shader (a color band being either a
color ramp, a wavelength node or a curve node (and maybe wavelength node in
the future)).

Only drawback with the current implementation is that it does not remove
colorband from pruned GPUNodes but it shouldn't really matter in practice.

This should fix T56010
2018-08-10 16:16:35 +02:00
c9bd61b372 UI: Fix nodelink not touching inputs when noodle_curving is 0 2018-08-10 16:16:35 +02:00
c70350c68f GP: Set instance maximum value to something more logic 2018-08-10 15:57:45 +02:00
e2f006949f build_environment: update freetype to 2.9.1 2018-08-10 07:48:27 -06:00
aa5a96430e Python: Add support for @ infix operator matrix multiplication
This differential revision implements the code for T56276

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3587
2018-08-10 15:18:00 +02:00
693ecdf7d3 Fix build error due to missing file from commit 98c304e865.
Proper contents still needs to be added, this just makes things build.
2018-08-10 14:39:01 +02:00
69d710187d Fix unreported assert error when change instance modifier
Doing very fast change in the number of instances soemtimes get an error of duplicate ghash entry.
2018-08-10 13:14:13 +02:00
98c304e865 Gizmo: add option to catch all mouse clicks
This was previously default behavior, now it's default.
2018-08-10 21:04:06 +10:00
e18a2c4ed7 Gizmo: support for 2D selection checks for 3D gizmos
This means 3D manipulators can use their own logic
for checking if the cursor intersects.
2018-08-10 17:32:40 +10:00
c19ddcc975 libs: boost 1.68 2018-08-10 03:08:18 +03:00
3daf5cc1ce Gizmo: 2d select now takes region coords
Was taking an event, when only the region coords are needed.
2018-08-10 08:14:22 +10:00
eb7b450c0c Cleanup: style 2018-08-10 08:14:22 +10:00
569e3640ef build_environment: move llvm/clang to ninja on windows. 2018-08-09 12:53:39 -06:00
1ee93dc670 Quiet warnings in bmesh_bevel.c. 2018-08-09 14:43:52 -04:00
da42fa8c97 Merge branch 'master' into blender2.8 2018-08-09 18:11:13 +02:00
1282be0f82 update llvm + clang to 6.0.1 and add openmp for macOS 2018-08-09 17:57:12 +03:00
5b6dde2293 Eevee: Fix assert with subsurface bsdf 2018-08-09 16:46:03 +02:00
ddc2796e4d Eevee: Principled BSDF: Add support for the sheen parameter
This is a rough (but fast) approximation that still match cycles reference
in common case.

In practice, it's just adding more of the diffuse light computed for the
diffuse contribution.
2018-08-09 16:46:03 +02:00
2b41b208c7 Merge branch 'soc-2018-bevel' into blender2.8 2018-08-09 19:52:07 +05:30
85cac2221c Fix T56279: Grease Pencil transformations show a help line with wrong origin
As grease pencil use multiedit frames instead of multiobject edit, this fix solves the issue.

In the future maybe will need modifications if we add multiobject support, but we need a solution now.
2018-08-09 16:14:29 +02:00
b70f85f2aa Merge branch 'master' into blender2.8 2018-08-09 16:03:09 +02:00
e20a0798dc Cycles: Append compute units for RX Vega card names
Makes it more clear whether compute device is Vega 56 or Vega 64.
2018-08-09 15:51:23 +02:00
01feb5d6cc Cycles: Report more details about OpenCL devices 2018-08-09 15:51:23 +02:00
a241286859 Cycles: Util, add to_string() with some helper
Currently unused, but will allow to convert unknown
argument type to a string for reporting and such.
2018-08-09 15:51:23 +02:00
fea5f26ea5 Fix trivial error in call 2018-08-09 18:56:46 +05:30
42c2066d08 Fixed custom shading not updating in Edit Mode 2018-08-09 18:38:07 +05:30
2e10c658f4 GP: Add option to select color affected in modifiers
Now it's possible to define if the Tint, Hue and OPacity modifier affect the stroke color, fill color or both.
2018-08-09 13:43:21 +02:00
f284821bf7 GP: Undo incorrect modification in previous commit 2018-08-09 13:39:35 +02:00
0de50a98e3 Fix T56239: creating material crashes with OpenGL render engine selected. 2018-08-09 12:04:00 +02:00
bf2d0782bc Merge branch 'master' into blender2.8 2018-08-09 08:20:06 +10:00
3aee3bbac7 Math Lib: varied size vector multiply
Needed for Python mathutils elementwise multiply.
2018-08-09 08:14:38 +10:00
c009b09f12 Eevee: Fix Clearcoat intensity 2018-08-08 21:27:33 +02:00
b8fc6317c7 Eevee: Remove per material SSS toggle
This is because we can now optimize the use of SSS on shaders based on
socket input values.
2018-08-08 21:27:33 +02:00
cac43e1765 Eevee: Use "constant folding" for the principle shader
This is more like a static optimisation when some parameters are set to 1.0
or 0.0. In theses case we use a more optimized version of the node.

This also revisit the transmission parameter behaviour to make it closer to
cycles.
2018-08-08 21:27:26 +02:00
26d46d00cf GPUMaterial: Fix Material appear broken when using sliders to tweak props
This was likely caused by some sort of race condition where the drawing
thread would request the state of the shader before the shader has been
compiled.
2018-08-08 21:26:49 +02:00
82352565b7 Eevee: Remove some of the non-necessary uniforms
The remaining ones are from the attributes linear/srgb switches and from
nodes that should be pruned before running their _gpu function.
2018-08-08 21:26:49 +02:00
05c0992c9b GP: Fix modifiers Tint, Opacity and Hue and create materials to Opacity
Thanks to Charlie Jolly (mistajolly@gmail.com) for his patch D3586 that added create materials to opacity modifier.

I had to do some more changes to get all running.
2018-08-08 20:40:11 +02:00
a2726e80d1 Merge branch 'master' into blender2.8 2018-08-08 20:31:08 +02:00
440ef4235f OpenJPEG: support building against both 1.5 and 2.3.
Patch porting to OpenJPEG 2.3 is by Campbell.

Once all platforms are upgraded we can remove the code for 1.5, and upgrade
or remove the openjpeg version from extern/. This intermediate step makes it
possible for platform maintainers to upgrade to 2.3 without breaking other
platforms.
2018-08-08 20:27:16 +02:00
0bfb215bbc Build: fix ffmpeg using system crystalhd library. 2018-08-08 20:27:16 +02:00
aaac963dfa UI: move grease pencil entry in add menu.
The first group of object types is renderable geometry which this belongs
to more than the second group, which are unrenderable utility objects.
2018-08-08 20:22:40 +02:00
74f4eb419c Cleanup: remove leftover game player code. 2018-08-08 20:18:54 +02:00
e2e854d751 WeightVG modifiers: cleanup. 2018-08-08 20:13:17 +02:00
c2d363b118 Fix T55818: Dynamically modified influence vertex group not working in modifier stack.
Now that we are using meshes, we need to assign back potential new
vgroup cdlayer to mesh->dvert pointer...
2018-08-08 20:08:36 +02:00
211ad6bf9a GP: Fix memory leak in draw engine for buffer strokes
This memory leak was undetected during a long time, but with new memory checking is visible.

The problem was the stroke buffer batch was realocating new batches without free the memory.
2018-08-08 19:48:57 +02:00
5c4fd52612 Fix T56220: Adding Grease Object crashes if link Material is set to Object 2018-08-08 16:56:56 +02:00
78a6fa1a72 Cleanup: Move some duplicate code to new function 2018-08-08 13:37:56 +02:00
aa41c86636 Cleanup: trailing space 2018-08-08 20:45:43 +10:00
08e49c034b GP: Fix unreported segment fault with some old files
In some corner situations for old files, the weights array could not be initialized properly.
2018-08-08 12:19:20 +02:00
6a07818e8f Cleanup unused arg warning. 2018-08-08 11:57:35 +02:00
7a6d7d056b Fix T56273: User count assert on re-saving a particular file.
new background image/clip of Camera ID was totally wrong, down the old,
broken 'way it used to be' instead of using new, more generic system.

Those ID pointers were not even added to library_query.c file, shame! xD
2018-08-08 11:56:41 +02:00
3e0bf69bfd GP: Change to make the temp name unique
The previous commit could fail if some corner situations. This new temp name must be unique always.
2018-08-08 11:48:18 +02:00
bc63d6f39a Fix T55095: Undo crash w/ linked library data 2018-08-08 19:16:43 +10:00
106e73da82 Fix T56270: Crash when save a grease pencil file with instance modifier.
The error was related to duplicate names in the internal hash used to order instances in z-depth.
2018-08-08 11:11:18 +02:00
65b31a4c9c GP: Check render status before use it. 2018-08-08 11:11:18 +02:00
b74612e034 Fix T56251: Outliner crash on selecting nested.
We need a valid tree here, undo step will make it invalid...
2018-08-08 10:57:40 +02:00
e4b68befa2 Merge branch 'master' into blender2.8 2018-08-08 17:56:56 +10:00
697d4b227e Ghost/X11: correct function signature 2018-08-08 17:54:41 +10:00
451203c58d Merge branch 'master' into blender2.8 2018-08-08 17:13:43 +10:00
b496bf022b Fix T54584: Crash w/ image undo
Using accumulation undo type (eg painting)
as the first undo step, broke code which adds an initial memfile undo.
2018-08-08 17:12:44 +10:00
bbaedad632 Minor tweak to last commit 2018-08-08 16:02:45 +10:00
ff74292138 3D View: hide object centers in paint modes
Match 2.7x behavior
2018-08-08 15:53:02 +10:00
e8e812fb1d UI: only show vertex select w/ weight paint mode
Was being used for vertex paint where it's not supported.
2018-08-08 15:33:11 +10:00
b6dba5caac Vertex Paint: use original mesh data
This is already done in weight paint mode,
avoids a mesh refresh on selection changes.
2018-08-08 15:17:30 +10:00
cb15854bf9 Fix missing uniform for vert/weight/texture paint
Entering any of these modes would assert immediately.
2018-08-08 15:08:50 +10:00
0cd2eb11ee UV: stitch multi-object support
D3561 by @Al
2018-08-08 14:07:49 +10:00
c252a7c37a UI: don't show pie menu w/ no active object
Addresses T56272
2018-08-08 13:30:27 +10:00
81e99bdc75 Merge branch 'master' into blender2.8 2018-08-08 13:14:07 +10:00
bb8497fd5d Cleanup: correct header guard
Header guard was duplicated before renaming.
2018-08-08 13:11:57 +10:00
e71470e316 Merge branch 'master' into blender2.8 2018-08-08 11:53:22 +10:00
f86c965d7f Cleanup: use conforming header guard 2018-08-08 11:49:51 +10:00
441177b1c7 Merge branch 'master' into blender2.8 2018-08-08 11:33:42 +10:00
d07d3e0987 Cleanup: indentation 2018-08-08 11:31:28 +10:00
6fbd210b91 Merge branch 'master' into blender2.8 2018-08-08 11:05:08 +10:00
931a279f44 Cleanup: use static variables 2018-08-08 11:00:57 +10:00
cb58658f41 Cleanup: style 2018-08-08 10:59:50 +10:00
5f71093bb6 Cleanup: Fix stupid duplication 2018-08-07 22:26:54 +02:00
d2f709b179 Fix memory leak in previous commit 2018-08-07 22:22:03 +02:00
3884b86927 Fix T56266: Second try to fix material problems 2018-08-07 22:13:23 +02:00
95e490889d macOS GHOST: use non-deprecated functions for coordinates 2018-08-07 21:53:02 +03:00
8a035612ee Fix T56266: Grease Pencil Tint and Color modifier error when apply
The material created was not right when apply the modifiers.

These errors were related to the material modification from old palette system before the merge and for any reason this code was not changed in the right way.

Also changed the "Create Colors" to "Create Materials" to keep UI names aligned.
2018-08-07 20:10:20 +02:00
035d827b5b Cleanup: Tag only objects of the scene collections
In previous commit the bmain loop updated all GP objects, but must tag only scene collection objects.
2018-08-07 16:42:20 +02:00
030297209f Fix T54799: NDOF events not dispatched on windows.
Caused by commit rB785e8a636a29
2018-08-07 11:41:55 -03:00
4c712fd17e Fix T56263: Crash when sculpting a GP object with animation
This is a limitation of the current operator design.

I have added a test to be sure the operator is not initializated while play animations to avoid segment fault.

In the future, we can enable this option again, but it will need a operator redesign.
2018-08-07 14:15:41 +02:00
d04e8f41ae Cleanup GP: Change playing field to boolean 2018-08-07 13:56:30 +02:00
b274a01e58 Fix T56261: Grease Pencil simplify options get segment fault
The depsgraph was not updated as expected with the function used and the cache was not set as dirty.
2018-08-07 13:36:47 +02:00
ac2cdb21e6 Fix T56252: Selectable Bases includes hidden objects 2018-08-07 13:22:07 +10:00
f707984743 Fix T56258: Solidify assert w/ empty mesh 2018-08-07 12:58:08 +10:00
3d083f376b Fix T56255: Crash w/ collection access from Python 2018-08-07 12:45:01 +10:00
faf43ff9ad macOS Deps: use xcode 10.13 sdk 2018-08-06 22:55:25 +03:00
563e17091d GP: Add Simplify Shader FX option
This option was missing when old VFX modifers were backported as Shader FX.
2018-08-06 17:01:47 +02:00
d07a408a40 GP: Fix Front z-depth display precision
The zdepth 0 was clipped and need 0.000001
2018-08-06 16:11:53 +02:00
4c4aa65adb PyAPI: Make skin modifier roots settable
This make the root flag writable using the Python API, using the
generic skin vertex flag setter function.

Reviewed By: Campbell Barton

Differential Revision: http://developer.blender.org/D3583
2018-08-06 12:11:35 +02:00
d890ad37a8 Fix horrible invalid mesh freeing in weightvg modifiers.
Comes from rB7661f8a65b. Found while checking on T55818, but not solving
that issue of course.
2018-08-06 11:49:42 +02:00
e680a9d80d Cleanup LIB_ID_COPY_ flags a bit, add missing comment. 2018-08-06 11:49:42 +02:00
c085d9b1be Merge branch 'master' into blender2.8 2018-08-06 17:13:27 +10:00
907413ca65 Fix T55012: Corruption editing screen keymap 2018-08-06 17:08:39 +10:00
f7b1fec463 Cleanup: unused vars 2018-08-06 12:53:31 +10:00
14d9aeacce Cleanup: line length 2018-08-06 12:53:05 +10:00
53c56b2b5f Fix T54915: Usercount of active action increases when editing things with COW enabled.
Just pass along the 'no user refcount' flag to animdata copy function.
2018-08-05 18:50:01 +02:00
75e34b9002 GP: Add python api to create brush settings for grease pencil 2018-08-05 16:19:24 +02:00
2333717bb8 Merge branch 'master' into blender2.8 2018-08-05 12:15:13 +02:00
5261cd233c Fix Cycles crash rendering mix of instanced and non-instanced volumes. 2018-08-05 12:05:10 +02:00
6d0835eca7 GP: Fix NULL pointer when preview is not ready
The preview cannot be ready when create a material with python
2018-08-05 11:07:47 +02:00
9a8541d029 Minor fix unused var compiler warning. 2018-08-05 09:19:15 +02:00
c41ce58fde Fix indentation, spacing and added comments 2018-08-05 08:39:20 +05:30
710d2def65 Initialized normal data in BevMod 2018-08-04 23:38:12 +05:30
435d731c6f Added some comments to bevel_harden_normals for bev tool 2018-08-04 23:36:00 +05:30
e5e9578881 Added comments to functionality in main bevel code 2018-08-04 23:20:53 +05:30
cc30793a76 Added comments to seam and sharp len, removed unused var 2018-08-04 22:38:54 +05:30
7db1db72bb Fixed hnmode not being passed with bevel tool 2018-08-04 22:32:28 +05:30
997b35f57a Added comments on hn_mode, BMOps on bevel 2018-08-04 22:31:53 +05:30
e8748e5ae7 Fixed comment formatting in editmesh.c 2018-08-04 22:11:57 +05:30
86f6c15809 Removed redundant comment in BMesh 2018-08-04 22:11:11 +05:30
ccf794dfc4 GP: Fix stupid mistake in mirror modifier
The object can be NULL. This was a line used in debug that it was not removed.

Also removed an old function not used.

Thanks to Charlie Jolly for catching this error.
2018-08-04 15:59:57 +02:00
4edae3cc2d Merge branch 'master' into blender2.8 2018-08-04 13:43:10 +02:00
a56ec3dfe3 Fix T56222: Bevel Modifier bug (uninitialized value). 2018-08-04 13:40:38 +02:00
27ffd37c15 Fix GP mirror modifier axis 2018-08-04 09:49:15 +02:00
1ae77fe9c1 Grease Pencil: Set Lock Axis default to Y axis 2018-08-03 21:06:49 +02:00
5470565527 Cleanup: Fix comment 2018-08-03 17:41:20 +02:00
f2a8e55fc5 New grease pencil primitive STROKE
This creates a simple stroke with several colors to have a basic structure to start drawing.
2018-08-03 17:37:21 +02:00
7288d4d8c4 Replace wrong aasign material flag to BKE_MAT_ASSIGN_USERPREF 2018-08-03 16:37:07 +02:00
fe8dcffd79 GPUShader: Fix warning in release build. 2018-08-03 14:34:05 +02:00
5d4b981bc2 Add missing single user management for grease pencil materials 2018-08-03 13:41:56 +02:00
e1a6861987 Bugfix: audaspace cmake variables need to be cached. 2018-08-03 10:59:10 +02:00
5fd3d1fda4 Fix T56217: Segment Fault when using the Fill Brush on Blank GP Object
The error was in any GP object without layers.

Also added a check to avoid paint in a locked layer.
2018-08-03 10:28:39 +02:00
6c8cc91f81 Fix T56180: Grease Pencil edit mode select menu crash.
Note that there are most certainly many other operators that’d need that
same flag... Don’t have time to hunt them down currently, will just fix
as issues are found, for now.
2018-08-03 10:25:06 +02:00
56fd63e1ad Fix T55791: blender 2.8 crash on redoing 'snap to cursor' with Offset option ON.
Many snap_to operators need a fully evaluated depsgraph to run
properly...
2018-08-03 10:17:00 +02:00
cd5ee24656 Operators: add a new flag stating that operator needs access to evaluated data.
For now, that flag is only used in redo code, since after undo step
depsgraph is totally empty... We *may* want to add at least an assert in
op calling code too, though?
2018-08-03 10:15:34 +02:00
b5a1e3d471 Depsgraph: add helper to ensure a given scene/view_layer graph is up-to-date.
Since that call make the graph active, it should only be used in active
editing context aware code (i.e. essentially, operators).
2018-08-03 10:13:33 +02:00
f55863acd4 DRW: Augment Debug messages 2018-08-03 09:49:31 +02:00
fa0f938b11 Eevee: Fix assert with hair drawing
This remove unused clip_block when not needed and the useless ubo bind that
were put there for the sake of not crashing.
2018-08-03 09:49:31 +02:00
3eab49dd36 Icons: add particle brush icons 2018-08-03 11:43:50 +10:00
2a8413a0dd Eevee: Don't show probe display when not using scene lighting
The display is broken otherwise.
2018-08-02 21:12:08 +02:00
9887b32e73 Eevee: Fix missing UBO bind. 2018-08-02 20:52:07 +02:00
836db3aee8 Add Assign Material option to Special menu (W key)
Also some renames and cleanups.
2018-08-02 19:35:29 +02:00
45751065c0 Add list of color to Assign color operator
It's more clear for user to see the name of the color
2018-08-02 19:21:23 +02:00
acdb136dce DRW: Add UBO binding checking routine. 2018-08-02 18:33:49 +02:00
e7adf1dfb0 Cleanup: Fix compilation warnings. 2018-08-02 18:33:49 +02:00
bd7ab6b989 DRW: Cleanup: Fix header naming. 2018-08-02 18:33:49 +02:00
8f6ff3adfa GPUShader: Add name for debugging & identifying shaders. 2018-08-02 18:33:49 +02:00
3578212e46 Eevee: Fix missing UBO binds.
Some of them are unecessary and should be removed from the shader instead.

But for now we need a quick fix for the crashes happening on some platforms.

See T55475.
2018-08-02 18:33:49 +02:00
ce551ada92 Fix missing type for material arry
This function was called by RNA Api and had grease pencil object type missing.
2018-08-02 18:03:01 +02:00
909556aa26 Fix wrong RNA Api parameter definition 2018-08-02 17:45:32 +02:00
9914c05bd7 Depsgraph: fix some DEG queries crashing with new, empty graph.
Calling code is responsible to check on NULL pointers here, or ensure
is does have a fully built and evaluated depsgraph, but this should
never crash in DEG queries themselves.
2018-08-02 17:17:04 +02:00
771973869d Fix assert in UI string trimming code when we have 'protected' right part. 2018-08-02 16:39:15 +02:00
777e1b9654 UI: Move thickness before frame lock in Annotation Panel
The thickness is more important and must be below list of annotation layers.
2018-08-02 16:22:53 +02:00
75d0830dc0 Cleanup: use dictionary for icon lookup 2018-08-02 22:28:48 +10:00
f36855f0fd UI: show all particle brush settings in topbar
Also show particle brush in tool-properties panel.
2018-08-02 22:10:38 +10:00
35a5fccf77 UI: show particle radius & strength in topbar 2018-08-02 21:28:07 +10:00
200212079d Subsurf: Better crease which represents sharp edges
Enabled infinite sharp patches for topology refiner and evaluator,
which allows to have sharp edge at first subdivision level.

Also tweaked crease export from Blender to OpenSubdiv to have more
artistic control over the whole 0..1 range.
2018-08-02 12:24:55 +02:00
3a93314753 Tool System: initial particle system support 2018-08-02 19:27:26 +10:00
d79df6c0bc Tool System: sync changes from changes to brushes
Changing a brush now updates the tool.
2018-08-02 18:18:53 +10:00
d3c387d605 Merge branch 'master' into blender2.8 2018-08-02 17:52:22 +10:00
cb6d7cb0b2 RNA: make particle enum public 2018-08-02 17:49:03 +10:00
503866c681 Fix T56199: Crash on Annotation in (VSE) Image Preview
In some cases (e.g. using old userpref settings/keymaps)
it was possible to trigger a crash when the wrong GP/Annotation
operators were triggered in the wrong contexts (e.g. using
the old GPENCIL_OT_paint in annotation-only contexts like
all the 2D editors).

This commit resolves several issues that were caused by sloppy
code-churn + features that had been hacked on.
2018-08-02 16:35:43 +12:00
0fdd058991 Dev Tooling: Instrument motion path calculation operator (for bones) to collect timing data
This will be useful for checking on the progress of our optimisation
efforts, and to generate some nice stats for later.
2018-08-02 15:04:58 +12:00
8a0760eba2 Armature Panel Tweaks - Motion Paths/Ghosting
Since most animators find Motion Paths more useful than Armature Ghosting:
* Move Motion Paths before Ghosting settings (less scrolling)
* Collapse Ghosting panel by default
* Open Motion Paths panel by default instead
2018-08-02 15:04:47 +12:00
ab49b7d739 UI: Slightly larger action zone for corner resizing
Pretty minor, from 0.6 to 0.8, but the improvement is noticeable
especially when using a stylus, without overlapping too much with
the buttons and dropdowns in headers.
2018-08-02 01:26:58 +02:00
a4623bdfed UI: Group similar Grease Pencil brush settings 2018-08-02 00:52:54 +02:00
872c5d2763 UI: Remove OpenGL Render operators from Render menu
Rendering OpenGL/Preview is accessible from each editor.
Render settings are accessible from the Film menu when in OpenGL/Preview engine.
It wasn't always predictable especially with Workspaces without or with many viewports.

Also reordering of items, renaming and removal of superfluous icons.
2018-08-02 00:52:54 +02:00
918288138d Cleanup: warnings, trailing space 2018-08-02 08:26:57 +10:00
504454ee5e GPUMaterial: Normal Map Node: Make default inputs interactives 2018-08-01 22:08:36 +02:00
48e661e05d GPUMaterial: Fix assert when shader failed to compile. 2018-08-01 22:08:36 +02:00
e8dd5e5cc6 GPUMaterial: Make Mapping node use UBO storage
This means tweaking parameter is now interactive and does not need to
recompile the shaders.
2018-08-01 22:08:36 +02:00
ad64cb6344 GPUMaterial: Make Localize tree live longer
This is in order to reference the localized node->storage when populating
the UBO data.
2018-08-01 22:08:36 +02:00
4510f30026 GPUMaterial: Fix nearest sampling
texelFetch return vec4(0.0) if the target pixel is outside the texture
rect. So we mimic the default repeate mode that we have for linear
interpolation.

Fix T56156 Mapping-Node doesn't work
2018-08-01 22:08:36 +02:00
c6f55fb0db GPUUniformBuffer: Fix bad memcpy error catched by asan
We need to copy the size of the gputype not the padded type.
2018-08-01 22:08:36 +02:00
e50a3dd4c4 Fix T56197: Cycles OpenCL build error after recent changes. 2018-08-01 19:44:32 +02:00
86270b60db Subsurf: Evaluate all UV layers
Before that it was only first UV layer which was properly evaluated,
the rest were ignored. Now all layers are being properly handled.
2018-08-01 18:43:03 +02:00
5b3b0ed54f Subsurf: Add API to provide vertex sharpness
Currently unused, added for the future and API completeness.
2018-08-01 18:42:59 +02:00
4fe14d6a26 Subsurf: Support subdivision of mesh with just loose elements 2018-08-01 18:42:59 +02:00
63058490a3 Subsurf: Cleanup, remove unused mappings and topology queries 2018-08-01 18:42:59 +02:00
ec4ba68730 Subsurf: Fix/workaround crashes and failures with non-manifold geometry
The idea is simple: do not provide full topology to OpenSubdiv, leave
edges creation to OpenSubdiv itself. This solves issues with non-manifold
meshes which were known to fail, including the ones from T52059.

On a positive side we can simplify our side of converter, keeping code
shorter.

it is still possible that we'll need to ensure all loops has same
winding, but that is less things to worry about.
2018-08-01 18:42:59 +02:00
ebbeddd2f4 Subsurf: Use edge sharpness directly from converter
Seems it's behaving correct now, surely more tests needed, but
this is required for now to move forward.
2018-08-01 18:42:59 +02:00
08e6bccdf4 Subsurf: Support subdivision of loose elements
Applies to vertices and edges. Biggest annoyance here is that OpenSubdiv's
topology converter expects that there is no loose geometry, otherwise it
is getting confused.

For now solution is to create some sort of mapping from real Mesh vertex
and edge index to a non-loose-index. Now the annoying part is that this
is an extra step to calculate before we can compare topology, meaning FPS
will not be as great as if we knew for sure that topology didn't change.

Loose edges subdivision is different from what it used to be with old
subdivision code, but probably nice feature now is that endpoints of loose
edges are stay at the coarse vertex locations. This allows to have things
like plane with hair strands, without need to duplicate edge vertices at
endpoints.

All this required some re-work of topology refiner creation, which is now
only passing edges and vertices which are adjacent to face. This is how
topology refiner is supposed to be used, and this is how its validator
also works. Vertices which are adjacent to loose edges are marked as
infinite sharp. This seems to be good-enough approximation for now. In the
future we might tweaks things a bit and push such vertices in average
direction of loose edges, to match old subdivision code closer.
2018-08-01 18:42:59 +02:00
9e2f678ba2 Fix mistake in atomic bitmap
Internally values are stored as 32bit integers, no idea why i thought
they were 8 bit.
2018-08-01 18:42:59 +02:00
63dc52c66e Subsurf: Cleanup, remove dead code 2018-08-01 18:42:59 +02:00
110abebe1d Fix missing poll function for flip_matcap operator (see T56183). 2018-08-01 17:28:30 +02:00
be5ccb9ce8 Merge branch 'master' into blender2.8 2018-08-01 16:13:13 +02:00
9336aef4eb Fix T56195: Typo in BLI_array_utils.h. 2018-08-01 16:12:36 +02:00
c48eb52164 Fix Cycles headless render failing, after grease pencil merge.
Now it should at least succeed when there are no grease pencil objects.
2018-08-01 14:47:02 +02:00
cc004fd13c Some more minor typo fixes in comments. 2018-08-01 14:37:24 +02:00
9a43ebdd5b Fix more merge stupid leftover, and some build warnings. 2018-08-01 14:29:36 +02:00
ef8ab3b4c2 Fix issues after last 2.8 merge. 2018-08-01 14:21:45 +02:00
936d1cef6e Merge branch 'blender2.8' into soc-2018-bevel
Conflicts:
	release/scripts/addons
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
	source/blender/editors/space_outliner/outliner_draw.c
2018-08-01 14:16:41 +02:00
ddd62f1b10 Cleanup: Remove ToDo comment 2018-08-01 11:21:37 +02:00
20e5fc4d32 Fix context problem when render in background mode
Bug reported by Sergey.
2018-08-01 10:58:10 +02:00
af79ac944d Cleanup: Replace "Move Color" to "Assign Material" 2018-08-01 10:39:16 +02:00
c06bed25c7 Fix T56187: Crash using cursor tool in Edit/Sculpt and Weight Paint mode
The transform tried to calculate the multiframe falloff, but there was not any stroke to do that.
2018-08-01 10:17:05 +02:00
3f5d3aa057 Merge branch 'master' into blender2.8 2018-08-01 16:39:34 +10:00
583b2f9a3d Cleanup: remove unused array member 2018-08-01 16:38:57 +10:00
d6d29f9854 UI: add 3D view check for grease pencil tool 2018-08-01 16:04:21 +10:00
5f55bbf3d0 RNA: add space_type to tool 2018-08-01 16:02:20 +10:00
e665e012e9 UI: correct grease pencil placement text 2018-08-01 12:24:32 +10:00
f4a06b390b Keymap: use Q key for quick menu in gpencil mode
Note, the keys for changing line display are now more obscure
(Shift-Q, Shift-Alt-Q), and might be changed.
2018-08-01 12:19:46 +10:00
0f449541d2 Merge branch 'master' into blender2.8 2018-08-01 09:01:29 +10:00
6a39d72558 Cleanup: declare vars or make static 2018-08-01 08:57:31 +10:00
29937dce8f Merge branch 'master' into blender2.8
Move 'View3D.flag3' options into 'gp_flag'.
2018-08-01 08:42:00 +10:00
e8d58080df DNA: remove View3D.flag3
Having 'flag, flag2, flag3' is getting out of hand especially
when we support increasing the size of types.

Make flag2 into an int.

Note, this looses the 'show world' option,
but it's not such an important setting.
2018-08-01 08:08:59 +10:00
7b72be0134 Fix T56181: Annotations hide proportionnal editing UI buttons 2018-07-31 22:27:24 +02:00
3667a5402e KnifeTool: Use GPUBatch API instead of IMM to fix buffer overflow issue
This also include a small optimisation (remove of a double loop and half of
the memory allocation for hit points)

This should fix T55946 Crash using knife tool on mesh with large number of
vertices.

Tried with a 500K vert suzanne and it seems fine.
2018-07-31 20:10:14 +02:00
d5724bfaa7 Revert "Gitignore: Ignore diffs in all subdirs"
This is an issue for some file in the extern dir

This reverts commit d940a081a9.
2018-07-31 13:03:48 -04:00
d940a081a9 Gitignore: Ignore diffs in all subdirs 2018-07-31 12:53:37 -04:00
6ba70d5996 Fix crash when rendering viewport within another area
This also Fix T55574 Crash on sequencer preview
2018-07-31 18:21:23 +02:00
7e0eb0d071 GPUFrameBuffer: Put active framebuffer in GPUContext
instead of being ThreadLocal and leading to incorrect usage.

We still enforce no framebuffer when changing context. We can lift this
restriction later.
2018-07-31 18:21:23 +02:00
3ecba657bb GPU: Replace malloc/calloc/realloc/free with MEM_* counterpart 2018-07-31 18:21:23 +02:00
9b817bc168 Fix set_pixel overflow in fill brush
The value of the index was above the size of image
2018-07-31 17:03:12 +02:00
4684375bd4 Fix: Motion Paths were still visible after clearing them
After clearing motion paths from objects, those objects needed to be
tagged for copy on write so that the copied data (i.e. viewport)
recieve the changes (i.e. removed paths)

Reported by Hjalti
2018-08-01 02:18:54 +12:00
d803b4e43b UI: Grease Pencil Simplify tweaks
Single-column layout and tweaks to tooltips.
2018-07-31 16:14:13 +02:00
d41f448b3b Change Brush smooth factor to 0.1 by default
The old values were too high.
2018-07-31 16:04:57 +02:00
ff1ca80f01 Set overlay default values 2018-07-31 15:57:11 +02:00
a3893ed03e Enable ghost onion skin by default
This option was changed by error when implement annotations.
2018-07-31 15:39:49 +02:00
ebca6f5f20 Fix grease pencil line toggle
Replace with generic context toggle operator.
2018-07-31 23:39:01 +10:00
475e9003c0 Fix T55718: Blender 2.8 crashes when converting to Curve from Mesh.
We only want to care about runtime.mesh_orig if… data is indeed a Mesh! ;)
2018-07-31 15:33:47 +02:00
ddd44315b8 UI: Grease Pencil Onion Skin minor tweaks
Avoid double label for same properties in single-column.
Onion Skinning: Group custom colors together, and frame before/after together.

Small changes to tooltips.
2018-07-31 15:13:13 +02:00
1b0c1c551a UI: remove grease pencil settings from topbar
Top bar is only for settings that apply to the next action
not a way to change existing data.

If each stroke could have a different color this would work as expected,
however it was adjusting the current layer color.
2018-07-31 23:02:18 +10:00
2dbb1e9f0e Fix cmake external library build for blosc/freetype on some systems. 2018-07-31 14:39:42 +02:00
e5a1bf0b10 UI: Metadata panel tweaks
Rename "Seq. Strip" to Strip Name, "Sequence Strip" to Use Strip Metadata.
Plus re-arrange of properties and separators for sections.

Thanks @fsiddi for the feedback.
2018-07-31 14:31:40 +02:00
29f13476f0 Fix (unreported) wrong logic in gpencil UI code. 2018-07-31 13:42:03 +02:00
c1185f3d0d Cleanup: pep8, windows line endings 2018-07-31 21:31:04 +10:00
c7e1d067a5 Merge branch 'master' into blender2.8 2018-07-31 21:27:51 +10:00
bb7b1cc884 Fix T56170: Fake dependency cycle in new depsgraph + interleaved armature update + proxy
Make proxy copy result more atomic operation.
2018-07-31 13:24:57 +02:00
7a91ae1103 Fix memory leak in DRW_cache_gpencil_axes_get
The Batch was created using old function without  GPU_BATCH_OWNS_VBO and the batch was not removed from memory
2018-07-31 13:22:41 +02:00
8dcddbc091 UI: Annotations tool color setting in toolbar 2018-07-31 13:08:30 +02:00
a3085190f8 Fix building w/ FreeBSD
fileno could be a macro which can't take a void pointer.
2018-07-31 20:52:36 +10:00
d58dd3de3d UI: Annotations panel tweak
"New Note" and "New" datablock do the same, only show one.
Minor code comments cleanup.
2018-07-31 12:46:58 +02:00
31fcd40efd Cleanup: use static variables 2018-07-31 20:45:43 +10:00
f945303877 Cleanup: Fix weird comparisons 2018-07-31 12:44:01 +02:00
0b85bb847c Cleanup: Remove overflow array element 2018-07-31 12:38:44 +02:00
20d525eb8b Fix assert when load file with shading enabled
Credits for this fix goes to Clément Foucault.
2018-07-31 12:37:58 +02:00
bf72d510d4 UI: Collapse Annotations panel by default 2018-07-31 12:26:15 +02:00
f06884b18a Cleanup: style, duplicate includes 2018-07-31 20:11:55 +10:00
b2193e020b Fix crash opening .blend files with palettes.
Palettes were incorrectly set as having animation data.
2018-07-31 11:48:03 +02:00
d273f3ff71 Cleanup: fix compiler warnings. 2018-07-31 11:48:03 +02:00
1fd27c2332 Respect ID user count when creating pose on object copy
This solves wrong user counter of custom shape when duplicating bone
few times and then undoing all the duplications.
2018-07-31 11:39:22 +02:00
75f1fb6d86 Depsgraph: Fix crash on undo of new bone added
Pose is not brought up to date for until exit of edit mode,
so can not use.
2018-07-31 11:39:22 +02:00
ad5b611953 Cleanup: style 2018-07-31 19:21:04 +10:00
a823f58dfd Subsurf: Disable oprtion for now
Committed by accident, is too early for this yet.
2018-07-31 11:17:51 +02:00
f6300030e0 Cleanup: trailing space 2018-07-31 19:07:56 +10:00
66da2f537a New Grease Pencil object for 2D animation
This commit merge the full development done in greasepencil-object branch and include mainly the following features.

- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.

You can get more info here:

https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/

This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.

Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-31 10:50:43 +02:00
27496cc46b Merge branch 'master' into blender2.8 2018-07-31 18:43:37 +10:00
36389444b0 Fix Shape Key retime starting at frame 10
D3571 by @alm
2018-07-31 18:42:22 +10:00
fe6e751e69 Workbench: Correct ifndef after recent changes
Usage of matcap image uniform had different ifdef than definition
of that uniform. Assuming the usage was correct, and the definition
needed an update.

Prevents shader from compilation failure and from aborts in debug
builds.
2018-07-31 10:25:54 +02:00
51c38b5d49 Subsurf: Rework in a way that patches boundaries are merged together
The idea is to create vertices along the coarse edges once, without
splitting coarse edges on separate ptex faces. This requires some
indexing magic, vertices within a patch are no longer sequential.

Not sure how to make it nicer without such a black magic looking
calculations (which are basically boiling down to mimicking order
of verts/edges creation).

In the current offsets calculation loose verts and edges are not
properly taken into account, but those are causing topology refiner
to fail anyway, so it needs a bit deeper change.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3570
2018-07-31 09:24:30 +02:00
5300ba0ba5 Merge branch 'master' into blender2.8 2018-07-31 17:03:28 +10:00
21f61cbe73 BLF: replace global aa pref w/ monochrome flag
Now disabling anti-aliasing doesn't impact sequencer, render stamp etc.
2018-07-31 16:57:05 +10:00
b51dcb6f07 Fix crash w/ missing matcaps
Building w/o EXR caused this.
2018-07-31 16:44:35 +10:00
65344a6d19 Merge branch 'master' into blender2.8 2018-07-31 16:24:12 +10:00
18888b7b0c UI: use text hinting (now user preference)
D3201 by @ambient w/ edits not to impact fonts used for rendering
(only change display for UI text).
2018-07-31 16:19:00 +10:00
52c23021c4 UI: consistent names for edit-mode overlay 2018-07-31 12:59:48 +10:00
0c955ed6ea Fix T56155: Header shows in popover context menu 2018-07-31 10:45:35 +10:00
56754226de Merge branch 'master' into blender2.8 2018-07-31 10:42:19 +10:00
1195a4a040 UI: add check for any kind of popup
Fixes T56155 when merging into 2.8
2018-07-31 10:38:01 +10:00
06e9d1683b Fix build error in new build after recent merge. 2018-07-30 23:01:20 +02:00
c86b5fa820 Viewport: use Filmic without scene exposure/gamma/curves for workbench.
This ignores the scene color managment view settings for solid mode and
lookdev when not using scene lights and world. The scene settings are
intended for tweaking renders and should not affect studio lighting and
matcaps.

There may be cases where a simple sRGB transform is better than Filmic
and we could add configuration for this. Not sure if it really matters
and it may be better if we just assume matcaps and studiolights are all
created for one view transform.

Differential Revision: https://developer.blender.org/D3569
2018-07-30 18:51:15 +02:00
2e2e7aff7c Merge branch 'master' into blender2.8 2018-07-30 18:44:18 +02:00
cc397b918f UI: make horizontal wheel scroll in 2D view match vertical scroll speed. 2018-07-30 18:35:50 +02:00
f08f6c1ade Clean Keyframes operator tweaks
By popular demand, the CLean Keyframes operator will now
leave handles and other interpolation settings untouched.

Previously, it would recreate the keyframes from scratch,
keeping only the frame + value, under the assumption that
the handle information was "bad" (i.e. the source of bumps
and roughness, due to bad hand tweaking). However, since
most animators use this on hand-keyed animation instead of
motion-capture data, this assumption didn't hold, and was
actually overly destructive - wiping out lots of hand-adjusted
curve data.
2018-07-31 03:48:57 +12:00
dee31f2cb0 Minor cleanup. 2018-07-30 17:42:54 +02:00
885cc4cf9a Build: require C11/C++11 for all operating systems in master.
This is in preparation of upgrading our library dependencies, some of which
need C++11. We already use C++11 in blender2.8 and for Windows and macOS, so
this just affects Linux.

On many distributions this will not require any changes, on some
install_deps.sh will need to be run again to rebuild libraries.

Differential Revision: https://developer.blender.org/D3568
2018-07-30 17:12:24 +02:00
d28248595b Silencing a bunch of compiler warnings
Most of these were mismatched const qualifiers
2018-07-31 03:04:32 +12:00
a3b6ae9fb9 Cleanup/Refactor: Move CurveCache runtime data into Object.runtime struct.
Also, fix missing cleanup of Object.runtime when copying Object
datablocks!
2018-07-30 16:58:44 +02:00
6d6deeb700 Workbench: Use FXAA instead of TAA when viewport is animated.
Fix T55996 "Playback in "Active Editor Only" doesn't work"
2018-07-30 16:48:51 +02:00
Stefan Werner
b59d85b5a5 Cycles: Fixed OpenCL build. sqr(float4) is available on CUDA and CPU, but not on OpenCL. 2018-07-30 15:42:00 +02:00
27567a6c76 Fix T56020: Crash while opening .blend file made with older version.
We need a NULL workspace check here, in some cases we get a SRTemp
screen even though it's not tagged as temp...
2018-07-30 15:01:48 +02:00
4473427d81 UI: Hide labels from MatCaps
They were added as placeholder to show something until they lazy-load.
But since the load is fast and it's hard to fit the text, and their name
is displayed already in the tooltip, we can do without for now.

In the future when we have insta-tooltips we should make them use this.
2018-07-30 14:50:44 +02:00
bfaf41663a Motion Path: Don't blit MSAA buffer if there is no motion paths 2018-07-30 14:18:55 +02:00
6c6ecdd230 Armature: Fix bone always transparent when enabling MSAA 2018-07-30 14:18:55 +02:00
5a05683da1 Motion Path: Fix motion path when MSAA is enabled 2018-07-30 14:18:55 +02:00
0f97718c10 DRW: Add option to only resolve framebuffer colors without depth test 2018-07-30 14:18:55 +02:00
d65df10216 DRW: Add DRW_shgroup_is_empty and DRW_pass_is_empty 2018-07-30 14:18:55 +02:00
6a493e4430 Viewport: add new default set of matcaps.
These were made by the community and curated by Pablo and William.
Thanks to everyone who contributed!
https://devtalk.blender.org/t/call-for-content-matcaps/737

Command used for compression:
oiiotool %s --ch R,G,B -d half --compression dwab -o output/%s
2018-07-30 13:54:46 +02:00
d01319df76 Shape keys: change default interpolation for absolute shape keys to linear. 2018-07-30 13:54:32 +02:00
bd49a76568 Fix T56121 and maybe others: DST.gpu_context was being created in the wrong DST.gl_context.
In addition to the crash in the selection of bones, this was responsible for other problems such as wrong hair and disappearing objects.
2018-07-30 08:49:27 -03:00
914e4d1212 Fix T56152: Rotate crash w/ individual origins 2018-07-30 20:53:34 +10:00
1d596e29df Merge branch 'master' into blender2.8 2018-07-30 16:51:39 +10:00
c8b6e3d777 Sequencer: move text & color into own category
Add 'Generate' menu, these aren't effects from a user perspective.

D3546 by @rudolf.ortner
2018-07-30 16:46:55 +10:00
f77f819854 Merge branch 'master' into blender2.8 2018-07-30 16:41:28 +10:00
ff6c6f18c1 Cleanup: id-property creation
D3473 by @JacquesLucke
2018-07-30 16:36:07 +10:00
dd38a71277 Merge branch 'master' into blender2.8 2018-07-30 16:26:29 +10:00
f4379f8b91 Use Ctrl Snap to seconds w/ play-head drag
D3056 by @alourenco
2018-07-30 16:16:44 +10:00
f8f4feefb8 Cleanup: trailing space 2018-07-30 15:40:09 +10:00
5f693d7442 Merge branch 'master' into blender2.8 2018-07-30 15:39:12 +10:00
9c960557a7 Cleanup: trailing space 2018-07-30 15:38:39 +10:00
6f1514d22d CMake: omit superfluous Up-to-date messages
Causes a lot of noise when building the install target.
2018-07-30 15:22:09 +10:00
40ad0de002 UI: Custom FPS not showing properly if editor is narrow 2018-07-29 22:56:33 +02:00
5672d92311 Merge remote-tracking branch 'origin/master' into blender2.8 2018-07-29 11:27:01 -06:00
83227de828 make.bat : fix msvc 2017 detection.
when 2017 was not found, it did not properly bail out of the rest of the detection process unless verbose mode was used.
2018-07-29 11:24:49 -06:00
66a00b64c5 Merge branch 'master' into blender2.8 2018-07-29 12:12:36 +10:00
018c9af446 Fix T56120: bad property access (from 2.8)
Thanks to @brita_ for the fix.
2018-07-29 12:09:00 +10:00
8f01623ef3 UI: correct RNA property 2018-07-29 11:54:41 +10:00
f50fa4c5d6 Fix T56120: Crash on "Install Matcap, World or Camera HDRI"
Code was trying to hide properties by name that may not exist.
Check if it was actually found and add 'files' to the filter,
since it is what WM_OT_studio_lights_install uses.
2018-07-28 22:58:33 +02:00
Stefan Werner
b747524144 Cycles: speed up mesh volume bounds construction.
Patch by Stefan, with minor tweaks by Brecht.
2018-07-28 19:23:35 +02:00
decd924116 Fix outliner icon row with counters not correct for nested collections. 2018-07-28 17:48:06 +02:00
bcefb202a2 Cycles: Save a few instructions in area light sampling
Just basic algebra - because all vectors have the same z coordinate, a lot of terms end up cancelling out.

Not exactly a massive improvement, but it's measurable with Branched PT and a high sample count on the lamp.

Reviewers: brecht, sergey

Reviewed By: brecht

Subscribers: swerner

Differential Revision: https://developer.blender.org/D3540
2018-07-27 23:42:50 +02:00
4875958083 Cleanup: Remove occurances of GPULamp 2018-07-27 18:12:02 +02:00
bdbc6fafc0 GPUTexture: Fix wrong texture size check 2018-07-27 17:51:26 +02:00
5c9754c3aa Eevee: Fix assert when baking lightprobes.
The GPU context was freed before all framebuffer attached to it were
deleted.

Fix T56117
2018-07-27 17:35:21 +02:00
31657fef40 Merge branch 'master' into blender2.8 2018-07-27 17:21:43 +02:00
af2a801731 Subsurf: Correction to origindex
Only enforce origindex to NONE for a generated geometry. For the rest
of geometry rely on CustomData_copy() to set it to the proper value.

This will ensure origindex is set correct for cases when there is an
array modifier prior to subsurf.
2018-07-27 17:21:31 +02:00
84d47e3685 Cycles: Initial implementation of detailed statistics
Gathers information about object geometry and textures. Very basic at
this moment, but need to start somewhere.

Things which needs to be included still:

- "Runtime" information, like BVH. While it is not directly controllable
  by artists, it's still important to know.

- Device array sizes. Again, not under artists control, but is added to
  the overall size.

- Memory peak at different synchronization stages.

At this point it simply prints info to the stdout after F12 is done,
need better control over that too.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3566
2018-07-27 17:19:54 +02:00
709b36e43b Cycles: Add utility function to query graph node size in bytes 2018-07-27 17:19:54 +02:00
60499ff25d GHOST: Fix SDL backend.
We use a hidden window for each offscreen context we need.

On X11 (linux) it does not show any other windows in the OS task bar
but it might be the case on other operating systems (untested).
2018-07-27 16:28:44 +02:00
70966af513 Workbench: option to change background
Replaced the draw world option with a shading.background_type enum.
Where the user can select Theme, World or a Custom color.

World and theme colors do not always work in workbench. We needed to
have an option what the user could control locally (per viewport).
Especially when using linked data.

I removed the world background drawing from the draw_manager. It was never used as EEVEE and Workbench both override the logic.

Not 100% sure about the naming of Theme, World, Viewport.
In other parts of blender's codebase World is sometimes called Scene.
Will stick to the names that describes its location best.

{F3990139}

Reviewers: fclem, campbellbarton

Reviewed By: fclem

Subscribers: venomgfx

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3551
2018-07-27 15:28:15 +02:00
d6ff778780 Fix crash enabling disabled collection containing curves.
Fixes T55948, T56016, T55926, T55947.

Differential Revision: https://developer.blender.org/D3564
2018-07-27 14:17:37 +02:00
0d20207771 Fix GPU build error after recent commit. 2018-07-27 14:17:37 +02:00
6a05c14a8a DRW: Fix Race condition in defered compilation 2018-07-27 13:57:46 +02:00
141e94f87f Fix T55888: Eevee: crash when shadow cube size is > 512px
Note that this was only reported to happen on AMD GPU + windows.
2018-07-27 13:56:07 +02:00
bd6d0b94bc Fix T55744: Assertion failure using the Knife angle constraint option 2018-07-27 12:16:05 +02:00
c6a4b469e3 RNA: Set default for Camera properties
Change the default clipend value to match the viewport (1000.0f)
2018-07-27 12:16:05 +02:00
5f5fd4c143 UI: Fix error in camera property panel 2018-07-27 12:16:05 +02:00
9a080d2ea6 Fix T56092: command line arguments after -- beginning with -h don't work. 2018-07-27 11:35:38 +02:00
67e690f5fc Cycles: Cleanup, indentation 2018-07-27 11:19:29 +02:00
75c47542d7 Cycles: Cleanup, indentation 2018-07-27 11:09:10 +02:00
b517b31085 Cycles: Cleanup, spelling 2018-07-27 10:30:10 +02:00
fcea94489c Cycles: Cleanup, indentation 2018-07-27 10:28:28 +02:00
46b85d195c Cycles: Cleanup, line length 2018-07-27 10:28:06 +02:00
ca359461a8 Cycles: Cleanup, move functions outside of class methods
There is no reason or justification to have helper functions as
class methods: they do not depend on anything in the class itself.

There are probably more cases like that.
2018-07-27 10:24:03 +02:00
de80b928a3 Cycles: Cleanup, remove unused function 2018-07-27 10:22:45 +02:00
e977fe985f Cycles: Cleanup in image manager, switch statement instead of if-else
Allows to catch enumerator values which are missing from being handled.

Also use `const char*`, no need to construct string just to throw it away.
2018-07-27 10:18:13 +02:00
0093212be9 Merge branch 'master' into blender2.8 2018-07-27 17:41:58 +10:00
fe8d8aa27e Fix Vector.project crash w/ >4 length vectors 2018-07-27 17:41:20 +10:00
2032e4ec9e Merge branch 'master' into blender2.8 2018-07-27 17:09:38 +10:00
3e2dfc6db8 Fix T55991: Python ignores scene switch argument 2018-07-27 16:49:41 +10:00
98c8094e3a Correct arguments for callback 2018-07-27 16:41:18 +10:00
b8ab2a84d3 Merge branch 'master' into blender2.8 2018-07-27 11:01:01 +10:00
71564debf9 Fix T56074: Remove doubles creates holes
Own regression when moving remove-doubles to kd-tree
(seems to happen only in rare cases).
2018-07-27 10:55:30 +10:00
cf080657a1 UI: Tooltip tweaks for Display Mode
Keep UI -> Keep User Interface, and don't use the word UI again in the tooltip.
2018-07-27 02:13:52 +02:00
7d768fc855 UI: Help menu minor tweaks
Show "Operators Cheatsheet" and Python API link only when developers extra is enabled.
Fix URL for User Communities, Developer Community and Release Notes (which 404s
now just like the wiki anyway since the page for 2.80 is being made).
2018-07-27 02:02:11 +02:00
cb42850ef2 Fix assert in snapEditMesh. 2018-07-26 13:48:26 -03:00
d6e769d32e Cycles: Add reflection fix to Bump and Normal Map nodes
While changing the shading normal is a great way to add additional detail to a model, there are some problems with it.
One of them is that at grazing angles and/or strong changes to the normal, the reflected ray can end up pointing into the actual geometry, which results in a black spot.

This patch helps avoid this by automatically reducing the strength of the bump/normal map if the reflected direction would end up too shallow or inside the geometry.

Differential Revision: https://developer.blender.org/D2574
2018-07-26 17:00:31 +02:00
1c41dbb079 Fix compiling after ui cleanups 2018-07-26 14:21:15 +02:00
Vuk Gardašević
bc6e6a758f UI: Use Single Column and Grid Flow layout for Physics Cloth
See D3559
2018-07-26 12:33:31 +02:00
4d83759f6a Cleanup: unused args 2018-07-26 19:52:12 +10:00
William Reynish
2499ee64a1 UI: Single column layout and sub-panels for Rigid Body Physics panels 2018-07-26 11:39:29 +02:00
1f809f34c1 Merge branch 'master' into blender2.8 2018-07-26 18:39:57 +10:00
ab67c6e46b WM: replace UI draw callbacks w/ property poll
Custom drawing functions were used just to control property display.
Move to poll function.
2018-07-26 17:35:33 +10:00
e91bdb10e9 Merge branch 'master' into blender2.8 2018-07-26 15:51:29 +10:00
44370a307c UI: hide transform constraints when not used 2018-07-26 15:44:27 +10:00
0dd3b200b0 Cleanup: remove redundant flag
Caller can pass this flag if necessary.
2018-07-26 14:58:36 +10:00
9257357c3f Merge branch 'master' into blender2.8 2018-07-26 14:49:52 +10:00
629403fb51 WM: remove duplicate ui-list functions
Missed when moving into own file.

Caused issues on MSVC, not GCC.
2018-07-26 14:47:48 +10:00
2e12114f3b Merge branch 'master' into blender2.8 2018-07-26 14:45:14 +10:00
e6c5490323 UI: hide proportional transform options
Adds property poll function to transform.
2018-07-26 11:53:58 +10:00
dbd79c097c WM: Add operator property poll callback
This allows operators to filter out properties from the
auto-generated draw functions.

Some custom draw functions can move to using this.
2018-07-26 11:53:53 +10:00
2df27fa6cf Cleanup: Use const argument 2018-07-26 11:20:03 +10:00
1882dfc47c UI: More opaque type icons in the Outliner
Also always draw the counter of elements-per-type with a dark background
regardless of the active status. It being white when active affects
readability since the icon background itself is already highlighted.

Thanks devtalk forum for feedback.
2018-07-26 02:42:20 +02:00
9c0dea213e Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/rigidbody.c
2018-07-25 21:12:04 +02:00
29d1db9ed6 Fix T55964: Direction not normalized in isect_ray_aabb_v3_simple()?
RNA API Object.ray_cast would not normalize direction vector before
doing first quick bbox intersection test, while using its returned
distance value. This could lead to wrong exclusion of object.
Thanks to @codemanx for finding that issue.
2018-07-25 21:05:44 +02:00
5ba4d059c0 Fix (unreported) potential div-by-zero in ray/bbox intersection BLI code.
Also added note that direction parameter should be normalized vector
in case one intend to use returned distance values.
2018-07-25 21:04:28 +02:00
8c9e6c5986 Fix crash Cycles rendering with --debug-value 256. 2018-07-25 19:15:48 +02:00
9a40690242 Fix for holdout / indirect only with collection instances. 2018-07-25 18:30:26 +02:00
bd326d0d1f UI: Sort panels in mesh context
Also collapse by default the less frequented Face Maps and Normals
2018-07-25 16:48:10 +02:00
885cda65c9 Cycles: add per layer collection indirectly on setting.
In the outliner, right click > view layer > set indirect only. This is
like clearing camera ray visibility on objects in the collection, and is
temporary until we have more general dynamic overrides.
2018-07-25 16:45:46 +02:00
William Reynish
e6e8ee2922 UI: Single column and subpanels for Particles Physics Fluids and Boids 2018-07-25 16:12:04 +02:00
b0077992d2 Cycles: add per layer collection mask/holdout support.
In the outliner, right click > view layer > set holdout. This is
temporary until we have more general dynamic overrides, but helps
Spring production for now.
2018-07-25 15:59:54 +02:00
41130ecf16 Cleanup: mark missing Cycles view layer override features with TODO. 2018-07-25 15:59:54 +02:00
William Reynish
5d0a3d3c9c UI: Dynamic Paint single column and sub panels 2018-07-25 15:57:30 +02:00
421017d24a UI: Node Editor Properties single column
Color and Properties panels as sub-panels of Node. Collapse Node properties
by default, since they are already in the node itself and in material properties.
2018-07-25 15:04:28 +02:00
5f1ead6395 Fix T55895: VSE crash while moving a strip
Glitch from multi-edit project. ;)
2018-07-25 14:53:11 +02:00
Vuk Gardašević
4183e62d1b UI: Texture Properties Layout and Cleanup
Initial work on single column layout, flow and organization of
the texture properties. More work needs to be done in the C templates
for image textures.

See D3557
2018-07-25 14:01:22 +02:00
f3524fe759 UI: Minor tweaks to nodes
Match roundness with widget defaults and collapse triangle size with panel's.
Interaction is the same, just an aesthetic tweak.
2018-07-25 12:53:15 +02:00
ee9d375045 UI: Add "New" and "Open..." to the File Context Menu
Puts both operators at easy reach with the left hand since the
shortcuts for these are somewhat cumbersome (Ctrl+O/Ctrl+N)
2018-07-25 11:57:25 +02:00
509d87230a Fix missing particle use count object names with disabled particles. 2018-07-25 11:51:49 +02:00
2e112f5914 Keymap: Use 1..4 to change UV select modes
Support for sync selection switching which keys apply.
2018-07-25 11:02:12 +10:00
d8514482fe WM: keymap utility to set enum from a key range 2018-07-25 11:00:03 +10:00
bd608d9aff Fix mistake in fix for T55798 2018-07-25 09:23:07 +10:00
fdd4b03f33 Correction on the last commit. 2018-07-24 19:45:03 -03:00
4f85982c6f Fix base->flag and base->flag_legacy: The flags of the Transform operator are being added to the bases of the not evaluated view_layer.
But I'm not sure if the flags `BA_WAS_SEL`,` BASE_SELECTED` and `BA_SNAP_FIX_DEPS_FIASCO`(lol XD) should be added to the bases of the not evaluated `view_layer`. This needs to be discussed.
2018-07-24 19:34:49 -03:00
decb724572 Fix T55798: Crash when snapping objects with data recalculated by modifiers.
Although the default behavior is for these objects to be ignored during the snap operation, this should not crash.
2018-07-24 19:13:28 -03:00
a76198cb23 RNA: Remove Unused dof.is_hq_supported and dof.use_high_quality
It's not necessary anymore since we assume it's always high quality.
2018-07-24 18:05:30 +02:00
cfaea24117 Fix T55754: DOF with new Camera is not working
Was due to non initialized gpu_dof.ratio
2018-07-24 18:05:30 +02:00
45addee39e Fix presets not working after Python refactoring. 2018-07-24 17:31:36 +02:00
c924f6f53f Workbench: Fix missing geometry on Iris 640/630 GPUs
For some reason 32c5972653 broke display of
solid meshes in workbench.

After some investigation, it seems that the vertex coordinate output is
degenerated even if the input is correct and the matrix too.

Removing dead code seems to fix the problem. So maybe the GLSL preprocessor
is not doing what it should?
2018-07-24 16:51:01 +02:00
7f7e51161f Fix T56079: crash with startup.blend saved in sculpt/paint modes.
This reverts commit 81a93df6d2, it is not safe
to handle initialization for startup.blend differently. Instead fix the root
issue of the preview icon data structures not being initialized in time.
2018-07-24 12:43:21 +02:00
293c15ec0c Fix T56081: crash with make static override and linked collection. 2018-07-24 12:02:24 +02:00
882ccd924b Fix T55721: crashes with collections panel in object properties. 2018-07-24 11:38:12 +02:00
c4803759a2 Fix T55245: undo with multiple windows and view layers not working correct. 2018-07-24 11:27:05 +02:00
31c49493d1 Fix incorrect active object setting in scripts. 2018-07-24 11:27:05 +02:00
9284c051d6 Fix incorrect object visibility test in baking. 2018-07-24 11:27:05 +02:00
1b415e4456 Motion paths: default to bone head instead of tail location.
This puts the motion path in the same location as the transform gizmo,
which is less confusing especially if you have a custom bone shape where
the tail is not visible.
2018-07-24 11:27:05 +02:00
ec640510a8 Fix T55958: allow the user to select between spring and spring2.
The old springs with damping 1.0 operate in a special way that
is more similar to plastic deformation than a spring. Some users
rely on that, so let the user choose which implementation to use.
This also restores full backward compatibility with 2.79.

Reviewers: sergof

Differential Revision: https://developer.blender.org/D3544
2018-07-24 10:10:48 +03:00
77fd0499e4 Merge branch 'master' into blender2.8 2018-07-24 15:35:01 +10:00
4d978cc2e4 Cleanup: changes from 2.8 2018-07-24 13:59:35 +10:00
b466c09c30 Subsurf: Fix wrong vertices index in vertex data interpolation 2018-07-23 19:14:36 +02:00
f6eccd367c Subsurf: Subdivide polygons to the same resolution
Previously it was ptex faces which were subdividing to the same
resolution. This was looking like more details for non-quad faces,
but was also causing discontinuity in the edge where quad touches
non-quad polygon.

Now ptex faces which are coming from non-quad faces are subdivided
at a half of resolution, matching old behavior and solving
discontinuity problem.
2018-07-23 19:14:36 +02:00
a50e23ba79 Fix compilation issue after merge. 2018-07-23 18:56:24 +02:00
c28a37b5d1 UI: Fix flicker in File Browser header
Move running jobs to the beginning of the row.

Thanks @sergey for reporting
2018-07-23 18:41:20 +02:00
7d6776ba2d Fix missing header include in previous master merge. 2018-07-23 18:37:29 +02:00
adbccae4b4 Merge branch 'master' into blender2.8
Note: Moved doversion of VSE strips uniquename to 2.8 versionning area,
and raised accordingly current file subversion, since that bug also
affected previous 2.8 .blend files...

Conflicts:
	source/blender/blenkernel/BKE_blender_version.h
2018-07-23 17:52:52 +02:00
8876e3aae2 Fix assert when loading file with multiple windows opened
... or when loading a file when having more windows opened than the file
itself.
2018-07-23 17:44:34 +02:00
87090abb95 Eevee: Remove Colored volumetric option.
This option is not necessary as it uses as much memory as the mono-chromatic
transmistance.
2018-07-23 17:44:34 +02:00
bb98e83b99 Fix T55668: Volume Keyframe on Cut-ted Metastrip.
We actually still had cases of Meta strip duplication resulting in
non-unique strip names. Quiet surprising this went unoticed for so long. :(

Fixed that bug, and think it was last one (at least, no other case of
SEQ_DUPE_UNIQUE_NAME usage should be broken, I think...), and raised
subversion and updated doversion to run uniquename check on strips on
all previous fileversions.

Note: will have to do that again when merging in 2.8...
2018-07-23 17:42:55 +02:00
17c3110ae5 Fix large font drawing blurriness in a better way.
GPU_LINEAR is there for shadow font blurring, the real issue was lack of
rounding for the batch offset.
2018-07-23 16:16:39 +02:00
59286ddcf8 transform_snap_object: Better bvhtree creation management for editing multiple objects.
- Use the object referenced in `BMEditMesh` as the `ghash` key to save the bvhtrees in cache;
- Create a boundbox around edit_mesh to test the snap before creating bvhtree;
- Save the `edit_mesh`s bvhtree in the mesh bvh_cache;

This is a part of the D3504.
2018-07-23 11:04:58 -03:00
1333ceca04 Merge branch 'master' into blender2.8 2018-07-23 14:23:21 +02:00
Milan Jaros
01f5601fe5 Fix build for Intel compiler with C++11. 2018-07-23 14:21:43 +02:00
5a05aff73a UI: more descriptive tooltip 2018-07-23 13:16:04 +02:00
66fde2d0b5 Fix T55634: Particle Viewport Display affects render visibilty
Changed code to follow master behavior closer: ignore draw-as checks
when particles are evaluating for rendering.
2018-07-23 12:53:46 +02:00
d7b472c198 Fix wrong view layer rendered from command line
The issue was caused by Render Single Layer option enabled, which is
very handy for artists work, so they can hit F12 and see view layer
they are currently working in a final rendered state. This saves a lot
of time since all the "non-interesting" objects are ignored for such
iterations.

However, for the render farm we need to render view layers which are
explicitly set for render, and ignore active view layer.

Reasonable solution seems to be to ignore the Render Single Layer
option when rendering from the command line. It is really something
more like UI behavior option.
2018-07-23 11:54:41 +02:00
f0dd7dd4c0 Mark view layer renderability and scene single layer render as non-animatable
We can not support animation of those flags reliably in the pipeline, so just
mark them as non-animatable.
2018-07-23 11:54:41 +02:00
96abec41cc Cleanup: comments and UI descriptions for cursor snapping 2018-07-23 11:37:03 +02:00
d432a239ad Outliner Keymap: E key to Exclude collections from View Layer
Alt+E to include.
2018-07-23 11:20:31 +02:00
cdce3b71df Merge remote-tracking branch 'origin/master' into blender2.8 2018-07-22 16:03:46 -06:00
7232b0cbe5 make.bat : fix typo
pointed out by anchpop on irc.
2018-07-22 16:02:28 -06:00
f07140940c Eevee: Principled: Fix Subsurface input behaviour
Match Cycles behaviour of scalling the SSS radius and don't interpolate
between diffuse and SSS result.
2018-07-21 18:15:31 +02:00
4e6bcd10e5 Merge branch 'blender2.8' into soc-2018-bevel 2018-07-21 19:29:15 +05:30
e361e9e99c Render Preview: Fix ID freeing in wrong function 2018-07-21 14:16:29 +02:00
a1689fb091 Eevee: Fix wrong SSR reprojection when switching orthographic view
We just reset the temporal sampling and avoid using the previous frame
for SSR at all.
2018-07-20 22:43:30 +02:00
3005c2e2be Eevee: LightProbes: Fix RNA defaults and remove unused data_draw_size 2018-07-20 22:22:30 +02:00
eae9228a4d Eevee: Lamps: Fix RNA defaults and change defaults for contact shadows 2018-07-20 22:21:44 +02:00
33c4ffdf46 Render Preview: Fix memory leak 2018-07-20 21:31:36 +02:00
a987daa18d Render Preview: Fix problem with multi size icon preview
The id was free after each size.
We now only free after the job has finished.
2018-07-20 20:36:14 +02:00
4609205a3f GPUMaterial: Cleanup unused headers 2018-07-20 20:06:39 +02:00
28fa79219d GPUMaterial: Texture Node: Add support for Cubic filtering
Like in cycles it's a bit more slower than linear but it's smoother.

Works for all projection type.
2018-07-20 19:17:15 +02:00
26b6b5871e GPUMaterial: Texture Node: support for nearest (closest) filtering method
Add placeholder for cubic and smart filtering for now.
2018-07-20 19:16:48 +02:00
e7d8908f14 GPUMaterial: Optimize and fix blending in box mapping
Blending was done in srgb space and was not matching cycles.

Optimized by using less branches and more vector operations.
2018-07-20 19:16:48 +02:00
a6f750dd41 Fix T54455, T56053, T55564: Cycles OpenCL build error after recent changes. 2018-07-20 19:10:45 +02:00
9ad5eafe46 Fix incorrect magnification filter for text texture.
Barely any visible difference, except when drawing big custom text
with the Python API.
2018-07-20 17:40:46 +02:00
b3b4b9fb8c Fix WITH_HEADLESS build. 2018-07-20 15:25:47 +02:00
72cbf966fb Depsgraph: Fix missing relation from proxy_form's ID properties
Hopefully this will fix issue with camera rig where camera properties
(like, near/far clip) are driven by custom properties from bones, and
those bones are actually belong to proxied armature.
2018-07-20 15:15:12 +02:00
4a79b46b9c Fix build error with release + debug info build. 2018-07-20 13:35:08 +02:00
244b825ccd Fix assert for Image & Brush icon preview 2018-07-20 12:54:57 +02:00
a185bf3b85 Workbench: Add backface culling support 2018-07-20 12:41:54 +02:00
61c00802d0 Basic Draw Engine: Cleanup unused code.
This engine is only used for selection and draw depth so no need for
anything else.

Also add backface culling support to selection.
2018-07-20 12:41:54 +02:00
ecfb74833d Merge branch 'master' into blender2.8 2018-07-20 12:13:58 +02:00
710a059549 Cleanup: Move 'WAVEFORM_LOADING' of sounds from flags to tags.
This is purely runtime data, so move it to new tags. ;)
2018-07-20 12:11:34 +02:00
f48e81e720 Fix T55414: waveforms are reprocessed when undoing
Add new tag to bSound (runtime flags), and make read code to set a 'no
reload waveform' new tag, since it uses a mapping to get existing
waveform in undo case...
2018-07-20 12:01:38 +02:00
2de283615f Make draw_armature() abort in case pose is not up-to-date.
Previously it was calling `BKE_pose_rebuild()`, such thing shall never
be called from drawing code! Hopefully this now works as expected and
that horrible hack is not needed anymore.
2018-07-20 10:22:06 +02:00
c205de0203 Fix T55973: [2.8] Crash when 'apply pose as rest pose' when bone scale is 0,0,0.
`BKE_pose_rebuild()` should (ideally) always trigger a rebuild of the
depsgraph, since it can add or remove posechannels.

This function now takes a Main parameter to ensure that related
depsgraphes are tagged as dirty (kept it optional, for some corner cases).

We should also probably double-check calls to that function, think in
theory it should only be called from depsgraph itself? But for now...
2018-07-20 10:22:06 +02:00
8a42b3909f Subsurf: Add basic statistics to help benchmarking 2018-07-20 09:28:02 +02:00
94722121e5 Fix MSVC compilation error in a less hacky way 2018-07-19 17:20:48 +02:00
44c7a7cf8b Fix compilation error with MSVC 2018-07-19 17:18:19 +02:00
0bf8096501 Resolve the opposite vector ambiguity in Damped Track constraint.
Damped Track by specification attempts to arrive at the desired
direction via the shortest rotation. However with opposite vectors
there are infinitely many valid 180 degree rotations. Currently
it gives up and does nothing.

I think that it would be more reasonable to resolve the ambiguity
arbitrarily, so that Damped Track won't have a weird dead zone.
To make it more predictable I use a local axis.

In addition, the singularity area vicinity has some floating
point precision problems that result in significant jitter.
This applies workarounds for two causes of instability.

Differential Revision: https://developer.blender.org/D3530
2018-07-19 17:58:27 +03:00
ca0ecf4c08 Fix crash with previews of non-IDs, like pose library thumbnails. 2018-07-19 16:31:15 +02:00
5037dd8abd GPU: Add GC to FBOs and UBOs and centralize all GCs
GPUFrameBuffers were being free when no context was attached or in the
wrong gl context. This make sure this does not happen again.

You can now safely free any gl resource from any thread (well as long as
it's not used anymore!).
2018-07-19 16:13:15 +02:00
b6b185691f Code cleanup and fixes 2018-07-19 19:27:45 +05:30
3882d0943b Subsurf: Fix wrong edge original index 2018-07-19 11:23:59 +02:00
64bbfaf421 Subsurf: Set original index for high-poly vertices 2018-07-19 11:23:59 +02:00
9df1e54079 Cleanup: style 2018-07-19 16:06:37 +10:00
34a45c54e0 Merge remote-tracking branch 'origin/master' into blender2.8 2018-07-18 20:02:16 -06:00
51f14cfa43 make.bat : restore msvc2015 support.
broke when i removed the 2013 support.
2018-07-18 20:00:34 -06:00
20191980f4 Cycles: increase volume stack to support 32 overlapping volumes.
This increases stack memory usage some, and ideally we'd support a dynamic
size. But this is quite difficult on the GPU and hopefully 32 is enough even
for very complex cases.
2018-07-18 22:58:52 +02:00
e81dc0b7bc Fix E key in Python console not working after recent changes. 2018-07-18 22:23:29 +02:00
c05a8460a6 Icon/Render Preview: Fix Race condition with BKE_*_localize
When editing a Material the depsgraph can throw away the evaluated ID
before the preview job localized the said ID.

To fix this we localize the ID from the main thread.

Also fix WM_OT_previews_ensure crashing because of no depsgraph.
2018-07-18 19:30:34 +02:00
057b4a6acf Fix/workaround T56019: memory leak with preview renders.
I would not expect the order of registration to matter, and ideally we want
to order the engines in the UI menu differently, but this helps for now.
2018-07-18 18:46:40 +02:00
9d514a4e6f Cleanup: remove debug comment. 2018-07-18 18:11:59 +02:00
2604f281b7 Cycles: Fix missing nested particle systems when instanced multiple times
Was only visible when doing command line, since it was happening due to
cache-free policy which was aimed to bring memory usage down.

The issue is that if object with particle system is used as a nested
duplicator multiple times, it will only generate children first time,
and after that its caches are freed. After that duplication system
can not generate any instances, since the path cache is lost.

Now we delay caches free to after all objects are synchronized, which
ensures all instances are generated.

This will increase a memory peak a bit during object synchronization
time, but overall it shouldn't be that bad, since memory footprint
after synchronization will stay the same as before this change.

The ultimate thing to do here would be to drop the whole dependency
graph away, but this will require:

- API on engine side, to inform it to drop the dependency graph.
- Changes in Cycles report system to NOT use evaluated scene to get
  scene name (evaluated scene will be gone with dependency graph).
2018-07-18 16:09:19 +02:00
5fd677c83c Subsurf: Add subdivision code which uses new module
The code is ifdef-ed for now, since there is more work needed
to be done before we can officially switch to it.

Uses new subdiv module.
2018-07-18 15:42:49 +02:00
433bb9bbcb Subsurf: Begin new subdivision surface module
The idea is to use this as a replacement of old CCG, now it is
based on OpenSubdiv. The goal is to reduce any possible overhead
which was happening with OpenSubdiv used by CCG.

Currently implemented/supported:

- Creation from mesh, including topology on OpenSubdiv side,
  its refinement.

- Evaluation of limit point, first order derivatives, normal,
  and face-varying data for individual coarse position.

- Evaluation of whole patches.

  Currently not optimized, uses evaluation of individual coarse
  positions.

- Creation of Mesh from subdiv, with all geometry being real:
  all mvert, medge, mloop, and mpoly.

  This includes custom data interpolation, but all faces currently
  are getting separated (they are converted to ptex patches, which
  we need to weld back together).

Still need to support lighter weights grids and such, but this
is already a required part to have subsurf working in the middle
of modifier stack.

Annoying part is ifdef all over the place, to keep it compilable
when OpenSubdiv is disabled. More cleaner approach would be to
have stub API for OpenSubdiv, so everything gets ifdef-ed in a
much fewer places.
2018-07-18 15:42:49 +02:00
c64262a05a OpenSubdiv: Add API to evaluate face-varying data
There are move changes along the line to keep everything
working from from C.
2018-07-18 15:42:49 +02:00
428743a9b0 Cleanup: style for GPU module 2018-07-18 23:10:31 +10:00
f882df9e0f GPU: Fix build error on Mac and Windows. 2018-07-18 14:58:56 +02:00
3d67819a17 Merge branch 'master' into blender2.8 2018-07-18 14:13:16 +02:00
257d072317 3D View: show 3D axis-letter when pointing away
While only the positive axis is shown,
account for an exception when axis aligned.
2018-07-18 22:08:10 +10:00
L. E. Segovia
5078b9d2d0 Cycles: add Principled Hair BSDF.
This is a physically-based, easy-to-use shader for rendering hair and fur,
with controls for melanin, roughness and randomization.

Based on the paper "A Practical and Controllable Hair and Fur Model for
Production Path Tracing".

Implemented by Leonardo E. Segovia and Lukas Stockner, part of Google
Summer of Code 2018.
2018-07-18 13:59:06 +02:00
566b319335 Cleanup: Cryptomatte node style tweaks. 2018-07-18 13:59:06 +02:00
Stefan Werner
bdda0964e0 Compositor: Cryptomatte compositing node.
This patch adds a new matte node that implements the Cryptomatte specification.
It also incluces a custom eye dropper that works outside of a color picker.
Cryptomatte export for the Cycles render engine will be in a separate patch.

Reviewers: brecht

Reviewed By: brecht

Subscribers: brecht

Tags: #compositing

Differential Revision: https://developer.blender.org/D3531
2018-07-18 13:03:34 +02:00
8cd7828792 GWN: Port to GPU module: Replace GWN prefix by GPU 2018-07-18 11:49:15 +02:00
247ad2034d GWN: Port to GPU module: Move files to GPU
This does not include all the struct and type renaming. Only files were
renamed.

gwn_batch.c/h was fusioned with GPU_batch.c/h
gwn_immediate.c/h was fusioned with GPU_immediate.c/h
gwn_imm_util.c/h was fusioned with GPU_immediate_util.c/h
2018-07-18 00:17:57 +02:00
6329629bb9 GWN: Port to GPU module: codestyle & licence 2018-07-18 00:17:57 +02:00
a28fd8fee2 Merge remote-tracking branch 'origin/master' into blender2.8 2018-07-17 14:46:22 -06:00
41045478ab make.bat: remove msvc2013 support. 2018-07-17 14:44:47 -06:00
644fadf2f0 Render: add "OpenGL" render engine.
This is intended for quick renders for previsualization, animation previews
or sequencer previews. It provides the same settings as found in the 3D view
Shading popover in solid display mode, but in the scene render properties.

The "Workbench" engine was removed, and this name no longer appears in the
user interface, it's purely an internal name. We might come up with a better
name for this OpenGL engine still, but it's good to be consistent with the
OpenGL Render operator name since this has a similar purpose.
2018-07-17 16:46:09 +02:00
43ac0f38d7 Fix weld incoherent normals with weld operation 2018-07-17 18:57:22 +05:30
7b3a18f0aa Cleanup: moving shading type into View3DShading.
So all shading settings are in this struct and can be reused in the OpenGL
render engine.
2018-07-17 14:59:07 +02:00
f8e2dba7fe UI: move specular light settings to Lights tab in user preferences. 2018-07-17 14:59:07 +02:00
117a5c0ac7 Fix Python error removing studio lights in user preferences. 2018-07-17 14:59:07 +02:00
6d8e36b723 Fix inconsistent shade smooth naming in object and edit mode. 2018-07-17 14:59:07 +02:00
7c8e6048b3 Merge branch 'master' into blender2.8 2018-07-17 13:58:26 +02:00
efe94793c0 Fix T56003: Opening image files as movies in VSE crashes.
metadata loading code was assuming all videos in Blender were from
FFMPEG... added empty place-holders for other types too, we probably
could load some metadata from pictures or AVI files too!
2018-07-17 13:55:43 +02:00
8d53b72b81 World: Added 'Viewport Display' panel
The Properties->World tab had no Viewport Display panel. The world color
itself was hidden when the 'use_node_tree' was enabled.

Also renamed the World.horizon_color to World.color as it has nothing to
do with the color of the horizon (old BI feature)
2018-07-17 12:39:03 +02:00
Vuk Gardašević
84d4037363 UI: Single-column and flow layout for Scene properties
See D3532
2018-07-17 12:17:42 +02:00
Vuk Gardašević
273482749e UI: Minor fixes to separators on menus
Closes D3547
2018-07-17 11:59:24 +02:00
7dcc7bd5ee Object Mode: Add back object bound display 2018-07-17 11:36:21 +02:00
dc3b3d9453 UI: Lamp -> Light for the object type visibility operators
Spotted in a live stream by Emilton Mendoza, thanks!
2018-07-17 00:45:56 +02:00
b85be88655 Fix (IRC-reported) wrong usercount handling of deprecated IPO datablocks.
versionning code would unref those twice... Reported by @ßergey on IRC, thanks!
2018-07-16 22:29:26 +02:00
d5f048f883 Eevee: Add debug visual for Cascaded Shadow Maps 2018-07-16 20:08:09 +02:00
db374d6658 DRWDebug: Add new debug functions for spheres and matrices. 2018-07-16 20:08:09 +02:00
1f69ffd35b Eevee: Fix Cascaded Shadow Maps glitches
There was an issue that caused the cascaded shadow map to appear glitchy
when the lamp was not at the origin.
2018-07-16 20:08:09 +02:00
44a9c39229 Workbench: Fix use of uninitialized memory. 2018-07-16 20:08:09 +02:00
eef6e1cca1 StudioLight: Fix codestyle 2018-07-16 20:08:09 +02:00
7a693626d6 Smoke: Port display to Workbench + object mode
This does not fix the smokesim. It only port the drawing method.

The Object mode engine is in charge of rendering the velocity debugging.

Things left to do:
- Flame rendering.
- Color Ramp coloring of volume data.
- View facing slicing (for now it's only doing sampling starting from the
  volume bounds which gives a squarish look)
- Add option to enable dithering (currently on by default.
2018-07-16 20:08:09 +02:00
43593e846b Matcap: Fix missing pixel on preview icons 2018-07-16 20:08:09 +02:00
5852420023 Merge branch 'master' into blender2.8 2018-07-16 17:34:10 +02:00
e6af8758c8 Ghost: Fix memory leak happening with keyboard mapping access
So far only noticed system de-initialization doesn't perform full
object free. So rather harmless but yet stupid.
2018-07-16 17:32:57 +02:00
dc123ac9e5 Merge branch 'master' into blender2.8 2018-07-16 16:18:43 +02:00
1e1c858cf1 Cleanup: Remove obscure flag which was only used for read in subsurf code
Some sort of rudiment from many years ago, is never set by 2.5x code.
2018-07-16 16:15:57 +02:00
3465013bb7 Merge branch 'master' into blender2.8 2018-07-16 15:58:39 +02:00
72d1fb9934 Cleanup: Use const qualifier for UV vertex map 2018-07-16 15:58:12 +02:00
88c2193d16 Merge branch 'master' into blender2.8 2018-07-16 15:48:13 +02:00
20f3cbfb78 Cleanup: More clear naming in UV vertex/element mappings
Also use unsigned short for loop index within a polygon for UV vertex
mapping, which matches UV element mapping.
2018-07-16 15:44:43 +02:00
77d70c7f1d Merge branch 'master' into blender2.8 2018-07-16 15:16:00 +02:00
43f0af734e Fix T55944: fbx export error with smoothing face
ddee0931b8 added PROP_RAW_BOOLEAN case for foreach_set, but missed
foreach_get

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3534
2018-07-16 15:03:21 +02:00
96b4e43e8d Fix T55527: creating a Quaternion without args should result in identity
quaternion

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3487
2018-07-16 15:03:21 +02:00
de2f1c64fe Merge branch 'master' into blender2.8 2018-07-16 14:36:59 +02:00
80795ff897 Buildbot: update for new VS2017 buildbot worker name. 2018-07-16 14:34:24 +02:00
e142339162 Fix compilation with older OpenSubdiv libraries
Only fixes compilation error, the functionality will be limited.

Currently we don't care that much, since all the work is done in
the branch anyway.

Later on when we'll know which fixes we need to apply on top of
latest OpenSubdiv library we will call a library upgrade.
2018-07-16 12:55:39 +02:00
775c4eb903 OpenSubdiv: Remove one more unused file 2018-07-16 12:34:19 +02:00
d3674587b2 OpenSubdiv: Remove unused file 2018-07-16 12:33:32 +02:00
010e24a95c OpenSubdiv: Remove UV coordinates from converter
Converter only defines topology, not coordinates or (face)varying data.
2018-07-16 11:12:02 +02:00
d920382046 OpenSubdiv: Re-work C-API integration
Main goal is to make API simpler to follow (at least ion terms what
is defined/declared where, as opposite of handful big headers which
includes all the declarations), and also avoid a big set of long and
obscure functions.

Now C-API files are split into smaller ones, following OpenSubdiv
behavior more closely, and also function pointers in structures
used a lot more, which shortens functions names,

UV integration part in GL Mesh is mainly stripped away, it needs
to be done differently. On a related topic, UV coordinates API in
converter needs to be removed as well, we do not need coordinates,
only island connectivity information there.

Additional changes:

- Varying interpolation in evaluator API are temporarily disabled,
  need to extend API somewhere (probably, evaluator's API) to inform
  layout information of vertex data (whether it contains varying
  data, width, stride and such).

- Evaluator now can interpolate face-varying data.
  Only works for adaptive refiner, since some issues in OpenSubdiv
  itself.

Planned changes:

- Remove uv coordinates from TopologyConverter.
- Support evaluation of patches (as opposite to individual coordinates
  as it happens currently).
- Support more flexible layout of varying and face-varying data.
  It is stupid to assume varying is 3 floats and face-varying 2 floats.
- Support of second order derivatives.
- Everything else what i'm missing in this list.
2018-07-16 09:52:37 +02:00
ab9bd557ad Cleanup: doxy comments 2018-07-15 20:34:24 +02:00
b29b73a67e Gizmo: update Python templates 2018-07-15 19:51:11 +02:00
edbb2d2279 Fix Cycles incorrect resize and CMYK conversion of uint16/half images. 2018-07-15 18:38:09 +02:00
57ab7daa2a GPU_matrix: use Blender's naming conventions
Thanks to @sergey for review
2018-07-15 15:34:13 +02:00
b457cae397 Cleanup: use variable names based on term gizmo 2018-07-15 14:35:33 +02:00
b5451a642f 3D View: New view gizmo design
Simplify the default navigation gizmo.

See: T54723
2018-07-15 11:32:34 +02:00
e00f0686f7 Cleanup: style, doxy file 2018-07-15 10:53:34 +02:00
09431033e9 Cleanup: split GPU_batch
Split out presets and utilities for creating batches.
These functions are quite specialized and not related to typical usage.
2018-07-15 10:51:49 +02:00
52ebbeedc9 UI: Default theme minor tweaks
Darker color for group nodes and minor adjustments
2018-07-15 04:44:45 +02:00
f8537a5d0d UI: Camera Display panel rename to Viewport Display
Matches all other panels with Viewport properties
2018-07-15 02:35:33 +02:00
d2b28a8bf1 UI: Use icon for Material Link
Communicates the same by giving more room to the Material datablock name
2018-07-15 01:22:33 +02:00
b6a97baa0e UI: Use full width for ID blocks in World, Light, Camera, Texture
Also close Preview panel for lights by default and move World custom props last
2018-07-15 01:22:33 +02:00
680994643c Merge branch 'master' into blender2.8 2018-07-15 00:54:12 +02:00
83a4e1aaf9 Cycles: add voronoi features and distance settings from Blender.
Features to get the 2nd, 3rd, 4th closest point instead of the closest, and
various distance metrics. No viewport/Eevee support yet.

Patch by Michel Anders, Charlie Jolly and Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D3503
2018-07-15 00:45:42 +02:00
92a6b0ad6f UI: Hide Preview panel by default on Material properties
And move Custom Properties panel last
2018-07-15 00:13:35 +02:00
4697604331 Cleanup: use float3 SSE instead of ssef for voronoi texture. 2018-07-14 23:58:20 +02:00
fdcd9103cc WM: rename manipulator to gizmo in the toolbar 2018-07-14 23:58:07 +02:00
89299f6620 WM: rename manipulator to gizmo in Python API 2018-07-14 23:55:54 +02:00
5ebebcfbff WM: rename manipulator to gizmo internally 2018-07-14 23:49:00 +02:00
cd16004132 WM: rename files, manipulator -> gizmo
Edit doxy files and header guards only.
2018-07-14 23:16:34 +02:00
fc7c934cfc UI: rename manipulator to gizmo
This is a common, short, distinctive term often used for this purpose.

Changes to internal API's still needed.
2018-07-14 22:29:35 +02:00
5a716701e8 GPU_batch: fix error w/ interior line removal
Caused glitch w/ navigation icons showing inner lines.
2018-07-14 15:59:47 +02:00
bb2c47a329 Keymap: reduce right shift in 2.7x keymap 2018-07-14 11:46:18 +02:00
f9aab3b091 Keymap: reduce right shift in generated keymaps 2018-07-14 11:46:16 +02:00
9dbee5ccc2 Merge branch 'master' into blender2.8 2018-07-14 10:27:07 +02:00
ceba8e28b7 Rename operator property from last commit
Restore operator had same option named differently.
2018-07-14 10:20:27 +02:00
50e3cd0bb3 Keymap: option to export all keymaps
Useful to store a snapshot of the current keymap state
so changes to the default keymap are ignored.

Also useful for testing keymap export works properly.
2018-07-14 10:15:46 +02:00
0f340a1fa2 Cleanup: f-string use 2018-07-14 09:32:52 +02:00
9d1ad27fdc Merge branch 'master' into blender2.8 2018-07-14 09:31:52 +02:00
43973410f3 Cleanup: use f-string for addon_utils 2018-07-14 09:30:59 +02:00
7d73ba904e Cleanup: minor change for f-string use 2018-07-14 09:30:50 +02:00
9ca8f40790 Keymap: remove double space in tool-keymap 2018-07-14 09:02:36 +02:00
19a55b5a00 UI: More descriptive tooltip 2018-07-14 01:37:01 +02:00
5d6d565792 VSE: Add image strips with alpha over as blend type 2018-07-14 00:12:28 +02:00
cb22dd6f5d UI: Capital letters for property 2018-07-14 00:12:28 +02:00
d9e79b0756 Add include missing in release builds 2018-07-13 20:22:20 +02:00
bc12c6f542 UI: Align Lighting sub-panel of the Shading popover
This better aligns the matcap/hdri browser, rotation/background sliders and
preferences/flip matcap button.

The remaining sub-panels are not perfeclty aligned yet, once the sub-panels
separation is more prominent (and they can be collapsed) we can align those.

Thanks devtalk forum for feedback!
2018-07-13 20:12:06 +02:00
cca87ccc75 UI: remove space/region from popover args
Instead use global panel-type list.
2018-07-13 19:16:35 +02:00
af0fc66049 WM: register global list of panel types
Allows simple lookups for popovers.
2018-07-13 19:15:13 +02:00
6845306c68 Correct recent menu split
Somehow duplicate API didn't error when linking.
2018-07-13 18:56:59 +02:00
4ca2983096 Fix missing panels in texture properties with image texture. 2018-07-13 18:21:58 +02:00
cfe2c3213f Fix T55965: shrinkwrap modifier apply not working. 2018-07-13 18:21:58 +02:00
23ca12ec47 Viewport: don't show look dev shader balls by default.
We will show these in the shading workspace by default, but for most new
3D viewports that you open these are not needed.
2018-07-13 18:21:58 +02:00
dc00d66c89 UI: only show API defined custom properties when Developer Extras is on.
These are intended to behave just like any other builting property, so
no to always show them in the Custom Properties panels for regular users.
2018-07-13 18:21:58 +02:00
5e2804a40b Merge branch 'master' into blender2.8 2018-07-13 18:20:10 +02:00
87535dd73d Makefile: add note about environment vars 2018-07-13 18:16:05 +02:00
135b7f5c6a Merge branch 'master' into blender2.8 2018-07-13 18:04:41 +02:00
a6ec402f5a Remove invalid assert 2018-07-13 17:59:26 +02:00
7774ad7dd3 UI: Wider Dyntopo popover to fit all settings
Suggested by kostex_mb on IRC
2018-07-13 17:58:31 +02:00
5eaa8bf02d Fix bad assert on redo 2018-07-13 17:37:00 +02:00
4705682151 Merge branch 'master' into blender2.8 2018-07-13 12:52:10 +02:00
f6367ecfb6 Cleanup: operator type API, header 2018-07-13 12:47:04 +02:00
2ead3f0765 Merge branch 'master' into blender2.8 2018-07-13 12:38:46 +02:00
c7c7bfae75 Merge branch 'master' into blender2.8 2018-07-13 12:22:21 +02:00
8ff3f7f601 Cleanup: move WM type registration into own files
Type registration is mostly boiler plate logic,
which can be separated from other API's.
2018-07-13 12:20:42 +02:00
30bffb5a3a Nodes: add sqrt, ceil, floor and fract to math nodes.
This works for Cycles, Eevee, texture nodes and compositing. It helps to
reduce the number of math nodes required in various node setups.

Differential Revision: https://developer.blender.org/D3537
2018-07-13 11:00:10 +02:00
399cbd3b6b UI: show popover shortcuts in tooltip 2018-07-13 10:57:25 +02:00
ef423d9876 Merge branch 'master' into blender2.8 2018-07-13 10:52:40 +02:00
f4213c1408 Cleanup: id-property API use
Also clarify comments.
2018-07-13 10:51:49 +02:00
80a983ae5e Merge branch 'master' into blender2.8 2018-07-13 10:31:30 +02:00
252ebf6bfd Cleanup: split keymap lookups into own functions
More will be added in 2.8, keep this manageable.
2018-07-13 10:30:18 +02:00
f27449d117 Fix T55920: viewport "navigate" shows on transform 2018-07-13 10:00:36 +02:00
b2d8f83444 Keymap: run search by its key in tools popup
The button & key are displayed here, so its best if the shortcut works.
2018-07-13 09:18:46 +02:00
06b9f000e5 Merge branch 'master' into blender2.8 2018-07-13 09:05:55 +02:00
8c957468bc Keymap: dope-sheet hotkey to change falloff 2018-07-13 09:05:41 +02:00
8f884c22f1 Keymap: dope-sheet hotkey to change falloff 2018-07-13 08:59:19 +02:00
8a429b03e1 Cleanup: style 2018-07-13 08:42:34 +02:00
a855a763c2 Merge branch 'master' into blender2.8 2018-07-13 08:40:17 +02:00
fb5597540d Cleanup: right shift arguments 2018-07-13 08:36:10 +02:00
a81d0108fc Cleanup: rename snap enum 2018-07-13 08:18:18 +02:00
6d3ff55e1c Correct error mixing fraction/screen snap
Thanks @mano-wii for pointing out
2018-07-13 08:14:16 +02:00
6f8a141fad Merge branch 'master' into blender2.8 2018-07-12 21:43:51 +02:00
e77d2b4e3f Cleanup: remove legacy mesh save support
This was used for saving files for Blender 2.6x.
2018-07-12 21:35:57 +02:00
10c1f3fbfe Fixed shading errors with normals and added proper weighting
to harden normals to make it consistent with wn modifier
2018-07-12 23:30:29 +05:30
0c41d61008 WM: snap to fractions when resizing areas
Snap to fractions in 1/(2,3,4,8),

Nice for less arbitrary layouts.
2018-07-12 16:55:16 +02:00
5aff20dfd5 UI: add toggle fullscreen to window context menu 2018-07-12 15:25:05 +02:00
415018778c PyAPI: show line, not call-stack for field warning
Was too noisy and hard to tell warnings from exceptions.
2018-07-12 15:22:55 +02:00
69b7ae8397 Merge branch 'master' into blender2.8 2018-07-12 14:46:48 +02:00
753a600e35 PyAPI: add undo redo handlers
Useful so Python can clean up before/after undo steps.
2018-07-12 14:43:35 +02:00
c21488df5a Fix T55945: Outliner crash
crashed when using filtering and no item was found ('Blender File' mode)

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3535
2018-07-12 13:37:29 +02:00
9a5fb0209e Fix T55949: increase color management exposure hard range. 2018-07-12 11:47:19 +02:00
98c215f4db Keymap: add 3D view snap popup
The key was available for other spaces,
removed because it conflicted with changes
which have since been reverted.
2018-07-12 11:46:16 +02:00
5cdfb74dd8 Keymap: add utility function for panel popups 2018-07-12 11:43:37 +02:00
f4d4047d80 Merge branch 'master' into blender2.8 2018-07-12 11:20:48 +02:00
d75b8e5f01 Cleanup: header guards 2018-07-12 11:19:22 +02:00
e387a4e768 Cleanup: style, duplicate header 2018-07-12 11:16:22 +02:00
a2929edf28 Merge branch 'master' into blender2.8 2018-07-12 11:10:25 +02:00
0108ce1fe5 Cleanup: pep8, cycles 2018-07-12 11:03:13 +02:00
75d69eab69 Minor cleanup to last commit
No need to make attr-lists with the current layout logic.
2018-07-12 10:54:53 +02:00
77928c2a09 UI: Group geometry in object visibility popover
Makes it easy to quickly hide all non-geometry.
2018-07-12 10:51:00 +02:00
864a4cf64b Keymap: Modifiers to control mesh elem switching
Shift/Ctrl control extend/expand when number keys are used
to switch modes.
2018-07-12 10:37:20 +02:00
21b6983b9d UI: minor edits to overlay popover
- Rename "Viewport Info" to "Text Info".
  Name was too vague, nearly everything is information,
  this currently only controls overlay text.

- Swap text-info & 3D-cursor, making 3D-cursor less prominent.
2018-07-12 10:14:19 +02:00
963da9ff6e UI: 4-state icon for view visibility popover
This is a quick way to see if some of the object types in the
scene are hidden or unselected.

Icon design may change.
2018-07-12 09:39:41 +02:00
66087fe127 Merge branch 'master' into blender2.8 2018-07-12 09:15:06 +02:00
b328a59373 Icons: support setting blender, inkscape commands 2018-07-12 09:14:13 +02:00
55354d734e Merge branch 'master' into blender2.8 2018-07-12 08:31:19 +02:00
1db47a2ccd Fix PyRNA class registration w/ Python 3.7
In Python3.7 this now raises an error.
2018-07-12 08:30:39 +02:00
d28d202fd1 PyAPI: remove bpy.utils.register_module
Remove bpy.utils.register_module() & logic tracked RNA classes.
2018-07-11 23:13:37 +02:00
09aa799e53 PyAPI: Use annotations for RNA definitions
- Logical use of fields since they define type information.
- Avoids using ordered-dict metaclass.

Properties using regular assignments will print a warning and load,
however the order is undefined.
2018-07-11 22:18:09 +02:00
b843753ad5 Buildbot: initial configuration for Visual Studio 2017. 2018-07-11 21:38:00 +02:00
e3c85aaca7 Manipulator: expose use_select_background via RNA 2018-07-11 20:23:34 +02:00
4880b71d54 UI: Flip Overlays/Shading position
This brings the Object Visibility dropdown closer to overlays which
also controls visibility of elements int he viewport, so it makes more
sense there. Also placing the Overlays settings closer to the viewport.
2018-07-11 20:10:27 +02:00
75149b429f Added support for beveling curves 2018-07-11 22:36:44 +05:30
4b57bb0387 UI: overlay, remove redundant 'object' term 2018-07-11 19:01:10 +02:00
c643f02b07 UI: Fix Seams button drawing differently 2018-07-11 19:01:01 +02:00
4e9d039ef7 3D View: option not to draw center dots
While this is a fairly obscure option,
it means it's possible to disable all overlays except for any
overlays the users wants to see.
2018-07-11 18:55:54 +02:00
9bf1868eae UI: Rename Bone Select to Fade Geometry in Overlay popover
Part of design: T55863
2018-07-11 18:54:42 +02:00
960784e719 UI: Overlay panel fix for display_all 2018-07-11 18:46:08 +02:00
4299f62114 UI: Re-arrange Overlay popover for Mesh Edit Mode
Sub-panels for shading, measurement, normals, freestyle and developer.
Less-used sub-panels will be collapsed by default once their implementation
is complete (fixing spacing between sub-panels, adding the triangle to collapse, etc).

Also added missing check for overlays on/off on existing sub-panels.
2018-07-11 18:41:38 +02:00
ccfc66edec UI: Add missing Viewport Info to Overlay popover 2018-07-11 18:41:38 +02:00
78988e175a Fix T55915 DOF Number of blades wrong logic
Thanks @kostex for the fix.
2018-07-11 18:33:35 +02:00
5db8f6d189 Edit Mesh: Fix missing loose edges if vertex is at local origin 2018-07-11 18:20:25 +02:00
b90646dc0e Transform Manipulator: fix scale handle selection
The scale handles couldn't be accessed when rotation was enabled and
they pointed away from the view.
2018-07-11 18:09:19 +02:00
8bab591758 UI: overlay panel minor tweak
Move face-orientation to less prominent location since its
more of a debugging option.
2018-07-11 17:22:57 +02:00
cbfe522bb3 Fix manipulator hiding cursor
Manipulator highlight, then transform would hide the mouse cursor.
2018-07-11 17:18:44 +02:00
ad03a06d3c Eevee: LightCache: Fix autobake starting when it should not 2018-07-11 16:54:20 +02:00
b1c2f4d468 Numeric Input: preference to default to advanced 2018-07-11 16:32:27 +02:00
7552972de0 UI: Remove duplicate Viewport Display panel from Scene properties
The Shadow and SSAO settings here are accessible from the Shading popover.
2018-07-11 16:07:40 +02:00
0ae440eba5 UI: Overlay popover - Wireframe slider style same as in shading popover
Avoids having to switch between two icons, which was misaligned anyway.
2018-07-11 16:07:40 +02:00
05b6b5d234 UI: Re-arrange Shading popover
* Unify X-Ray/Shadow toggle and factor, using the whole width gives you finer control
* Shadow settings next to intensity slider
* Cavity settings next to Ridge/Valley sliders
* Collapse Cavity settings when not used
* Make MatCap preview and browser dialog smaller. MatCaps are added by the user
so she is already familiar with how they look. No need to preview them that big
while browsing. To see the MatCaps in detail we have the User Preferences/Asset Manager.

Having popovers inside popovers triggers some minor glitches that will be addressed later.
(e.g. they open on mouse over and the popover arrow is not aligned)
2018-07-11 16:07:40 +02:00
4116435e2b Fix T55914: Blender 2.8 Crashes when increasing the repeat count for a track in NLA
Logical mistake in repeated strips drawing code.
2018-07-11 15:51:34 +02:00
ddedf6124e Revert removal of fake editing for numeric input
Revert changes from 785159e6e4
but keep 'ifdef'.

@mont29 maintains this area and prefers to keep existing logic.
Note that there was misunderstanding that '*' was intended only
to be a backup key for '=' for keyboards which require holding a
modifier.
2018-07-11 15:25:02 +02:00
42fa889e46 Merge branch 'master' into blender2.8 2018-07-11 14:56:13 +02:00
08274433e1 Fix T55912: saving Viewer Node image error.
Images from viewer node needs the lock parameter...
2018-07-11 14:32:43 +02:00
59b4c67536 Minor cleanup to logic in BKE's imbuf releasing code. 2018-07-11 14:32:06 +02:00
117fd02477 UI: correct panel default-closed 2018-07-11 14:04:17 +02:00
7f77ee70f1 UI: minor tweaks to overlay panel
Position 'outline selected' more prominently,
gives more useful behavior when dragging over the left column.
2018-07-11 13:58:10 +02:00
55d44a3b6b UI: Move Object Type Visibility next to shading/overlay settings
Group Object Type Visibility with the viewport settings in the header.

The eye icon is a placeholder. A new icon is needed to better communicate
the user at a glance if all (or none) object types are enabled, or why certain types
are not visible/selectable in the viewport.

Part of design: T55863
2018-07-11 13:24:13 +02:00
160959152e UI: 3D Viewport Header - swap position of shading/snapping settings
When tweaking the shading/overlays settings through the popovers,
these get on the way of the content in the viewport. Making it hard to
see the result of our changes.

Unfortunately this breaks consistency with other headers where the snapping
tools are aligned to the right, but the benefits outweigh the costs.
2018-07-11 13:24:13 +02:00
78fc4b592a UI: Re-arrange Overlays popover
Organize content in categories/sub-panels.

The result is a more organized but slightly taller popover.
Once sub-panels are implemented code-wise, the alignment issues
(like panel label) and extra space between the content and panels
headers will be reduced. Together with the ability to have certain
less-used popovers collapsed by default, this will make the
popover more compact.

Part of design: T55863
2018-07-11 13:24:13 +02:00
e3cbff606c Keymap: update 2.7x map 2018-07-11 13:13:07 +02:00
e461d01657 Cleanup: remove redundant operator 2018-07-11 13:07:30 +02:00
1d83fe82bc Cleanup: simplify RNA names 2018-07-11 13:02:22 +02:00
ef30fa3739 Fix crash in combing after changing scene property 2018-07-11 12:55:22 +02:00
c37ca43720 OpenSubdiv: Changes in C-API
- Made OpenSubdiv_GLMesh private
  Previously, it was still accessible via C-API from C++ code.

- Don't implicitly refine evaluator when updating coarse positions,
  now there is an explicit call to do this.

  Allows to first apply all changes to the coarse mesh and then
  refine once.

- Added coarse positions update from a continuous buffer with given
  starts offset and stride.

  Allows to update coarse positions directly from MVert array.

- Refiner is no longer freed when CPU evaluator is created.
  Allows to re-use refiner for multiple purposes.
2018-07-11 12:55:22 +02:00
3eab8156d3 UI: don't change scrollbar size on mouse move, only fade.
It's not necessary to do both, and trying to hit a target that changes
size is annoying.
2018-07-11 12:35:44 +02:00
fdc0f4ad90 Fix Use Nodes not working for Cycles lights. 2018-07-11 12:34:51 +02:00
ff39cbdc86 3D View: any view axis also showing grid
Setting accidentally impacted in ortho view.
2018-07-11 11:59:11 +02:00
11cd9b0541 Merge branch 'master' into blender2.8 2018-07-11 11:44:04 +02:00
2b963ecb81 Cleanup: duplicate versioning block 2018-07-11 11:39:58 +02:00
ccc9f476ca Fix empty-images not using selection color 2018-07-11 11:02:03 +02:00
c17611af95 Manipulator: changes for overlay options
There are now 3 categories in the overlay popover:

- Navigation
- Active (camera, lamp... etc)
- Tool (manipulator)

The user preference for mini axis now controls if the mini axis
displays minimal or a full-interactive widget.

Part of design: T55863
2018-07-11 10:49:18 +02:00
64d40c82c3 Revert "Transform: default constraint to user orientation"
This reverts commit 8121010310.

After user feedback this has the downside of having no predictable
way of transforming in global space.

Since toggling between global/user is reversed when global is
the user axis.
2018-07-11 10:26:49 +02:00
ed66388c87 Merge branch 'master' into blender2.8 2018-07-11 10:23:54 +02:00
0ed54cf9ba Depsgraph: Fix face dependency cycle when bone uses id property from self 2018-07-11 10:19:56 +02:00
17bc056726 UI: Default theme - minor tweaks to console colors closer to text editor's 2018-07-11 01:21:38 +02:00
44ee942440 UI: Default theme roundness consistency for toggles 2018-07-10 20:26:18 +02:00
0953e8af98 UI: Single-column for object type visibility 2018-07-10 20:25:50 +02:00
962f89d487 Changed default strength in harden 2018-07-10 22:21:28 +05:30
8a3366a494 3D View: option to hide object overlays
This hides extra wires and details you may want to disable,
name may be changed.
2018-07-10 18:31:52 +02:00
245d0d6bb7 UI: Textures - Move Colors panel below texture-specific panels 2018-07-10 18:22:22 +02:00
debfbdc279 UI: Single-column and sub-panels for Image Texture properties 2018-07-10 18:22:22 +02:00
a6ea38d345 Cleanup: remove unused interlace code after removal of fields. 2018-07-10 17:58:08 +02:00
7f5e4a819c GHOST/Windows: don't prefer swap copy method.
This is no longer needed with the new offscreen draw method, so use whatever
is default and hopefully fastest. Fixes console warnings in some setups that
don't have swap copy.
2018-07-10 17:48:48 +02:00
77964b2efb Fix Cycles standalone build issue with OpenColorIO. 2018-07-10 17:48:48 +02:00
2574ee3d38 Image: remove fields option for image sequences
Remove support for loading interlaced image sequences because
its less common now to record interlaced video,
the option to de-interlace video on load remains.
2018-07-10 17:31:13 +02:00
c10ece49ba Fix for recent numeric input checks 2018-07-10 17:11:01 +02:00
e6dccb4b01 Fix T55826, fix T55804: crash after copying scene with linked objects. 2018-07-10 16:30:17 +02:00
dd7a727910 Fix accidentally removed particle function in GLSL, still not supported though. 2018-07-10 16:30:17 +02:00
0a04314d06 Fix popovers showing unnecessary titles. 2018-07-10 16:30:17 +02:00
1a43e08187 Eevee: LightCache: Initial Implementation
This separate probe rendering from viewport rendering, making possible to
run the baking in another thread (non blocking and faster).

The baked lighting is saved in the blend file. Nothing needs to be
recomputed on load.

There is a few missing bits / bugs:
- Cache cannot be saved to disk as a separate file, it is saved in the DNA
  for now making file larger and memory usage higher.
- Auto update only cubemaps does update the grids (bug).
- Probes cannot be updated individually (considered as dynamic).
- Light Cache cannot be (re)generated during render.
2018-07-10 15:31:34 +02:00
97f90d48a0 Object Mode: Change Lightprobe display. 2018-07-10 15:31:34 +02:00
c90a0d5dda DRW: Add new features from lightcache branch
- Change gl_context_mutex to a ticket mutex ensuring interactivity even
  when rendering.
- Add DRW_custom_pipeline for using DRW outside of the viewport and render
  pipeline.
- DRW_opengl_render_context_*** and DRW_gawain_render_context_*** to use
  with DRW_custom_pipeline.
- Add possibility to bypass deferred compilation on demand (not User
  demand).
- Add union to access DRWMatrixState members more easily.
2018-07-10 15:31:34 +02:00
873d7f7e14 DrawData: Change drawdata to a generic struct shared accross ID types
This makes tagging much more generic and make the world updates more in
line with the new tagging system (Depsgraph).
2018-07-10 15:31:34 +02:00
dfd192ce41 GPUTexture: Refactor of texture creation & new feature
- Texture creation now requires explicit data type.
- GPU_texture_add_mipmap enable explicit mipmap upload.
- GPU_texture_get_mipmap_size can be used to get the size of a mipmap level
  of an existing GPUTexture
- GPU_texture_read let you read back data from a gpu texture.
2018-07-10 15:31:34 +02:00
785159e6e4 Numeric Input: remove fake-editing option
Numeric input allowed mix of editing and hotkeys which were interpreted
as modifiers instead of using as numeric input.

This meant entering '1.0*3' needed to be typed as '1.0**3'
('*' to activate, and again to multiply).

Pressing '/' gave the reciprocal of the current number
which could be useful.

Test removing this feature, so only full numeric input is supported.
2018-07-10 15:11:48 +02:00
15ef4638b3 Merge branch 'master' into blender2.8 2018-07-10 14:45:08 +02:00
d0920fba16 OpenSubdiv: Fix wrong topology refiner cast 2018-07-10 14:40:51 +02:00
c17cb50ae2 OpenSubdiv: Make more flexible C-API to specify FVar interpolation 2018-07-10 14:40:45 +02:00
b23404d701 3D View: overlay option to show bones
Allows drawing motion paths without the bones.
2018-07-10 14:10:12 +02:00
39b1842335 Fix T55882: crash closing user preferences window in some cases. 2018-07-10 12:33:18 +02:00
e4ce5fd8d2 Modifiers: Use bool for boolean flag in isDisabled 2018-07-10 12:14:33 +02:00
25619443bb Ocean Modifier: prevent crashing on 'Apply Modifier' button
The 'Apply Modifier' button calls the modifier code on the original
object instead of an evaluated copy, which doesn't have an initialised
Ocean *.
2018-07-10 12:00:58 +02:00
0c8452ad99 Ocean Modifier: removed duplicated code
Some code was copied with 'keep in sync with xxx' comments added to it.
2018-07-10 12:00:58 +02:00
de55ae56ae Ocean Modifier: refactored the delayed-refresh approach
The approach of setting 'refresh' flags on the modifier, and performing
the associated actions when the modifier is being evaluated, is a bad
one. Instead, we use the separation of the original and the evaluated
copy to 'refresh' certain things (because they simply aren't set at all
on the original). Other actions are now done directly with BKE_ocean_xxx
functions on the original data, intead of during evaluation.
2018-07-10 12:00:58 +02:00
b9bef10d19 Ported mesh_create_derived_view() to mesh_create_eval_final_view() 2018-07-10 12:00:58 +02:00
6807b4318f Ocean Modifier: ported from DerivedMesh to Mesh 2018-07-10 12:00:58 +02:00
445f1d82a1 Added comment for DEG_TAG_PSYS_xxx and PSYS_RECALC_xxx relation 2018-07-10 12:00:58 +02:00
726e868889 3D View: allow border zoom from camera 2018-07-10 11:50:27 +02:00
97f2f211ed Fix T55772: Crashes opening a file
Bad handling of some weird 'temp' screens in 2.8 doversion.
2018-07-10 11:42:57 +02:00
c236c80de4 Fix T55884: shader node linked menu showing incompatible nodes. 2018-07-10 11:41:03 +02:00
427e5ef342 Merge branch 'master' into blender2.8 2018-07-10 11:27:48 +02:00
80373bc4d2 CMake: Disable OpenAL and JACK when AUDASPACE is disabled
Previously CMake was raising a fatal error, which wasn't too helpful.

There is still some fatal messages about Audaspace and Game Engine,
but the latter one is on it's EOL and is removed in Blender 2.8.
2018-07-10 11:25:47 +02:00
0bfc06b7b7 Merge branch 'master' into blender2.8 2018-07-10 11:23:10 +02:00
cec8ca6619 Missing from last commit 2018-07-10 11:02:07 +02:00
f70fbad166 Keymap: update 2.7x map
Remove Shift-B, operator option is removed.
2018-07-10 11:00:43 +02:00
719629f2aa GHOST: Fix memory leak in X11 DPI query
The X resource database is to be explicitly destroyed. This fixes 46 bytes
leak per every window DPI query (which happens a lot on window move/resize
and even on areas resize).

Unfortunately, this does not fully fix the leak since the known leak:

  https://bugs.freedesktop.org/show_bug.cgi?id=94604
2018-07-10 10:59:06 +02:00
358e1181b5 Keymap: remove Shift-B in camera view
We already have Ctrl-B for setting the border,
no need for two keys to do the same thing.
2018-07-10 10:58:20 +02:00
04570e9120 Fix T55484: Border zoom fails in Edit-Mode 2018-07-10 10:29:24 +02:00
1b55943888 UI: add colon to prefs headings 2018-07-10 09:56:57 +02:00
10b976d2eb Fix 3D cursor update
Changing the values for the 3D cursor wasn't updating.
2018-07-10 09:37:39 +02:00
9536f920e3 Cleanup: style 2018-07-10 09:29:30 +02:00
96bae0f882 Fix T55879: Crash setting render presets
Any RNA using 'rna_SceneCamera_update' crashed when set from Python.
2018-07-10 09:03:00 +02:00
ab14da272d Reverted T55880 fix by accident 2018-07-10 08:34:19 +02:00
3a07b2124b Fix T55877: Crash snapping non-edit-mesh to grid 2018-07-10 08:24:05 +02:00
2386436520 Fix T55880: Crash dragging file into image editor
Caused by b4ccec6742
2018-07-10 08:17:20 +02:00
fc20fa2908 Merge branch 'master' into blender2.8 2018-07-10 07:42:16 +02:00
f9107eae6a Keymap: minor changes for keymap display 2018-07-10 07:41:49 +02:00
521f188af6 Fix workspace not freeing tool properties 2018-07-10 07:10:28 +02:00
8121010310 Transform: default constraint to user orientation
Previously global was always used before the current orientation,
the order is now reversed, which assumes the user wants to first
use the value they set, with the global secondary.
2018-07-10 06:58:43 +02:00
8a816fd3bc Merge branch 'master' into blender2.8 2018-07-10 06:53:12 +02:00
f51c6efbc1 Fix transform plane constraint orientation cycle
Regression since 2.79b release
2018-07-10 06:51:25 +02:00
1112f49a14 UI: Cleanup - Remove Show Panel Header and Background
A toggle for this is no longer required now that both header and background
colors are RGBA (disabling Show Header is the same setting the alpha to 0).

Thanks Brecht for reviewing!
2018-07-10 00:47:08 +02:00
8373544df3 Fix T55776: crash with multiple windows and reload new.
There were a number of cases where immActivate() and immDeactivate() could
get out of sync, causing crashes due to using a freed mutex lock. Refactor
the code now to hopefully avoid this always.
2018-07-09 23:57:19 +02:00
845899d373 UI: tweak image menu layout to match file menu more. 2018-07-09 23:31:44 +02:00
07e368cb5f UI: hide status bar constraints when not used 2018-07-09 18:25:47 +02:00
13741792ab Fixed artifacts in bevel with high profile and segments 2018-07-09 21:55:08 +05:30
881cc17ffa UI: hide status bar items when 2018-07-09 18:14:41 +02:00
113b053d5b WM: add utility function to refresh status bar 2018-07-09 18:14:41 +02:00
12d4ebcaa3 Merge branch 'master' into blender2.8 2018-07-09 17:57:37 +02:00
8c528a4f0a Cleanup: use const transform args 2018-07-09 17:57:05 +02:00
5a56e4997f Depsgraph: Fix non-working drivers after recent relations change 2018-07-09 17:42:36 +02:00
cf9f0b35be UI: add search to popup toolbar
Add for convenience only.
2018-07-09 17:37:15 +02:00
be8855a2ef UI: move visibility panel into the side bar 2018-07-09 17:00:09 +02:00
0e6abf414f Keymap: use Shift-AccentGrave for fly/walk mode 2018-07-09 16:44:26 +02:00
edeb9e5b01 Fix T55868: duplicating collection instances fails sometimes. 2018-07-09 15:37:36 +02:00
e8bc8bf618 UI: Minor tweaks to default theme
Based on feedback from the 'User Feedback' devtalk forum

* More opaque panels for the viewport
* Darker state colors
* Current frame color consistency for MCE
2018-07-09 15:36:37 +02:00
edb78d528b Keymap: Remove AccentGrave for each
Use only F3 for search since this is a common enough key
and it turns out having AccentGrave access on non US layouts is
too unreliable.
2018-07-09 14:55:31 +02:00
d37929c85b Depsgraph: Force modifier stack update when mesh is copied
Modifier stack might reference arrays from mesh, so if any of sub-data
pointer changed, modifier stack is to be re-evaluated.
2018-07-09 14:42:56 +02:00
f84956738b Depsgraph: Forbid flush from copy-on-write operations down the road
Old behavior: tagging ID with DEG_TAG_COPY_ON_WRITE will do copy-on-write
(as requested), but will also flush changes to all operations with depends
on it. This means, for example, tagging object for copy-on-write will force
its modifier stack to be evaluated.

This was needed in the earlier days of copy-on-write when things were not
well defined and when lots of areas were not doing proper tagging.

New behavior: tagging ID with DEG_TAG_COPY_ON_WRITE will only ensure copy
of the dadatblock is up to date, without flushing updates to any dependencies.

This means following things:

- We can update parts of ID without invoking heavy computation of other
  parts of same ID. For example, tagging object for COPY_ON_WRITE update
  on mode change will not force modifiers stack to update.

- If some dependent datablock is dependent on pointers which are invalidated
  by copy-on-write (like, evaluated mesh referencing custom data layers from
  original mesh), this will either require explicit tag or explicit relation
  in the dependency graph.

  Currently can not find a faulty case since tagging of mesh happens with
  either 0 (which means, everything) or with GEOMETRY, which also forces
  all dependent modifier stacks to be re-evaluated.

This fixes missing PBVH when going into sculpt mode (sculpt mode toggle
was tagging object for COPY_ON_WRITE update, which was forcing modifier
stack to be updated, which was freeing PBVH.

Some other operations might also become faster with this change.
2018-07-09 14:42:56 +02:00
bf02c4ba00 Keymap: Add back Shift-R 'repeat last'
This may be used often in a workflow, so keep the key.
2018-07-09 14:08:25 +02:00
53c24bf97c Keymap: macos only operator search key: Cmd-F
Add Cmd-F for apple because it's not easily available on some systems.
2018-07-09 14:06:51 +02:00
a724963640 Fix object mode menu crashing w/o active object 2018-07-09 13:39:12 +02:00
ce885edfee UI: Remove 1 pixel gap between panel header and background 2018-07-09 12:57:51 +02:00
b24232ff34 Keymap: Remove modal keymaps from blender_27x
Hard coded keys have been removed from transform.
Since these keymaps will likely remain unchanged,
remove them to avoid maintenance overhead.
2018-07-09 08:55:06 +02:00
d2923d7d62 UI: hide redundant transform keymap items 2018-07-09 08:41:51 +02:00
32396b3164 WM: support for filtering modal keymap items
Modal keymap display often shows items which aren't used,
add a poll funciton to hide these from the status bar.
2018-07-09 08:39:09 +02:00
ac8aff2b28 Merge branch 'master' into blender2.8 2018-07-09 07:42:46 +02:00
6793aebad2 Cleanup: remove 'Orientation' from keymap item name
It's constraint not an orientation,
in transform context it can be inferred.
2018-07-09 07:39:26 +02:00
4c5541feef Merge branch 'master' into blender2.8 2018-07-09 07:30:58 +02:00
70e2824126 Keymap: remove some hard coded transform events
Also re-order for display purposes
2018-07-09 07:29:12 +02:00
fb81446f56 Merge branch 'master' into blender2.8 2018-07-09 06:41:21 +02:00
9856dd9fec Cleanup: right shift 2018-07-09 06:38:07 +02:00
4ab37b3225 3D View: select exclude w/ ob-center enabled 2018-07-09 06:29:48 +02:00
aed82dafff Icons: support for drawing event icons
Use for drawing modal operator header keys.
2018-07-08 22:17:42 +02:00
907dd3d34a Fix crash in lamp preview render
Missing NULL check in object type filtering.
2018-07-08 21:15:39 +02:00
73d2d75eed Cleanup: rename 'ct' to 'len' for editors 2018-07-08 13:19:10 +02:00
9fb9125184 Cleanup: rename 'ct' to 'len' for gpu 2018-07-08 13:14:49 +02:00
804205babe Cleanup: rename 'ct' to 'len' for gawain 2018-07-08 13:05:41 +02:00
392ed710d6 Cleanup: rename 'ct' to 'len' for size vars 2018-07-08 12:50:00 +02:00
6d72d3c862 Cleanup: abbreviate unsigned types (editors, wm) 2018-07-08 12:49:36 +02:00
9d43ed521c Cleanup: abbreviate unsigned types (draw manager) 2018-07-08 12:49:03 +02:00
b5811bccf8 Correct recent keymap change, writing all keymaps 2018-07-07 20:03:30 +02:00
8467a7a351 Keymap: store 2.7x map as data instead of running code 2018-07-07 19:53:05 +02:00
f7bce99e4d Keymap: support for reading/writing keymaps as data
Instead of running code to create a keymap, store them as data.
This allows for keymaps to share content as well as running
transformations at load time.
2018-07-07 19:53:02 +02:00
5480de3fca Fix scale in Apply Pose As Rest Pose for bendy bones.
Scale is multiplicative, and adding it up causes the bone to bloat.
2018-07-07 15:10:41 +03:00
1f539cd7ef Merge branch 'master' into blender2.8 2018-07-07 11:32:40 +02:00
97cd8bfae1 Cleanup: isinstance can take multiple types 2018-07-07 11:29:57 +02:00
0f1000ce0b Cleanup: pep8, style 2018-07-07 09:02:34 +02:00
80a31d30a4 Merge branch 'master' into blender2.8 2018-07-07 08:53:00 +02:00
4b373ed086 Cleanup: pep8 2018-07-07 08:48:35 +02:00
252207cc7a Cleanup: redundant poll checks 2018-07-07 08:36:17 +02:00
a6340a5068 Viewport: in Lookdev shading, disable scene lights and world by default.
Now we light with just a user defined HDRI by default, which is useful
for material setup and texture painting and lighting without having to
set up any scene lights.

Previously it would use the scene world without lights by default, which
in some files is just black.
2018-07-06 20:22:03 +02:00
aed09d4329 Cleanup: remove unused shader node compatibility flag.
No longer needed after Blender Internal removal and Eevee replacing the
Cycles GLSL shading nodes.
2018-07-06 20:22:03 +02:00
74fd17e9d7 UI/Python: rename Lamps to Lights, to follow more standard terminology.
Internally it's still mostly named lamps, though some modules like Cycles
were already calling them lights.
2018-07-06 20:06:09 +02:00
4ac048f4e4 Merge branch 'master' into blender2.8 2018-07-06 19:34:41 +02:00
Julian Eisel
29b8adec61 UI: Add extra padding to menus to draw sub-menu triangles in
Shortcut strings would be offset to the left to make space for the triangles,
breaking the alignment with other shortcut strings. Now this alignment is kept
by making menus slightly wider if there's a sub-menu triangle visible, making
room for the triangle.
2018-07-06 19:33:13 +02:00
Julian Eisel
2a199f5093 UI: Use flat triangle drawing for indicating submenus
Left the RIGHTARROW_THIN icon in, even though it's not used in C code anymore.
However add-ons may do (e.g. Amaranth does).
2018-07-06 19:33:13 +02:00
b94222b090 PyDrivers: update bytecode check for Python3.6 2018-07-06 19:31:00 +02:00
d360eced65 UI: Single-column for 3D Cursor panel in 3D View 2018-07-06 18:29:57 +02:00
Vuk Gardašević
4674cffe29 UI: 3D View, View panel: single-column, flow and subpanel
See D3525
2018-07-06 18:23:15 +02:00
a48b52d546 3D View: support object type visibility/selection
Trying to have a single option for this is too likely to be
insufficient in some cases.

Instead, support object type visibility & selectability per view-port.
2018-07-06 17:53:40 +02:00
63f3e1ac7c Merge branch 'master' into blender2.8 2018-07-06 17:16:23 +02:00
22150eb409 Animation player: Ensure new frames are displayed while dragging mouse
Thanks Campbell for review!
2018-07-06 17:15:40 +02:00
49af17beb8 Fix T55796: Motion Paths are not being drawn as overlay
Remove depth testing flags from motion path pass drawing,
so that they always appear to draw in "x-ray" style on top
of everything, making it easier for animators to see what
they're doing.
2018-07-07 02:53:34 +12:00
4e4e88f02b UI: Default theme unification
More unification of colors and roundness.

Also use accent color as current_frame indicator.
2018-07-06 16:15:34 +02:00
7ea26cc9c5 Keymap: update 2.7x 2018-07-06 14:50:04 +02:00
15f4aa182f Depsgraph: Relations builder should not tag ID in all depsgraphs 2018-07-06 14:46:35 +02:00
571e773fbe Keymap: outliner now uses A/Alt-A for selection 2018-07-06 14:45:30 +02:00
79dabc537e Merge branch 'master' into blender2.8 2018-07-06 14:41:52 +02:00
3527857cdc Cleanup: use outliner_flag_* name prefix 2018-07-06 14:40:13 +02:00
b0c32818ba UI: small layout fixes for RMB context menus. 2018-07-06 14:32:25 +02:00
9fc79a4033 UI: disable broken horizontal properties editor alignment. 2018-07-06 14:19:11 +02:00
3da1207b48 UI: draw search popups with menu background, instead of box.
Otherwise these are not visible well with the new dark theme.
2018-07-06 14:19:11 +02:00
a364150c14 Fix crash with properties editor pinning. 2018-07-06 14:19:11 +02:00
02f903d099 Fix layout issue with enum property separators. 2018-07-06 14:19:11 +02:00
2aba2de92b Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/screen/screen_edit.c
2018-07-06 14:03:51 +02:00
843d5d707d Merge remote-tracking branch 'origin/master' into blender2.8 2018-07-06 13:53:35 +02:00
81a93df6d2 Fix crash when startup file has an image in it
This fixes an issue introduced in d192d72312.
When starting up, the UI hasn't been fully initialised yet, and calling
wm_event_do_depsgraph() can trigger icon updates when the startup file
contains an image, causing a segfault due to a not-yet-initialised ghash
for the icons.
2018-07-06 13:52:35 +02:00
0987c11c76 fix c++ comment style in 3cc2a9b934 2018-07-06 13:15:44 +02:00
12ce0cfb21 Ocean Modifier: removed unused refresh flags
The flags were set and cleared correctly, but nothing was actually reading
them.
2018-07-06 12:50:04 +02:00
7691040166 Ocean Modifier: removed the MOD_OCEAN_REFRESH_ADD flag
The flag was only used in readfile.c, and resulted in a delayed call to
BKE_ocean_add(); this call is now immediately made instead as it's not
very expensive.
2018-07-06 12:46:58 +02:00
ccef83b2fb Merge branch 'master' into blender2.8
Conflicts:
source/blender/editors/screen/screen_edit.c
2018-07-06 12:30:48 +02:00
dd5c25fab2 Remove print left in by accident 2018-07-06 12:10:30 +02:00
3cc2a9b934 Fix T55581: kill running (render) jobs when deleting a scene
also fixed passing WM_JOB_TYPE_ANY to WM_jobs_kill_type()

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3498
2018-07-06 11:58:13 +02:00
Stefan Werner
df30b50f2f Cycles: Enabled half precision textures for OpenCL devices that support the cl_khr_fp16 extension. 2018-07-06 11:42:34 +02:00
3e0920c61a Fix view pie menu 2018-07-06 11:17:50 +02:00
6379c7bd47 Addons: silence warnings instead of disabling 2018-07-06 11:03:24 +02:00
174a3348ab Addons: svg has been updated 2018-07-06 10:23:08 +02:00
Stefan Werner
d20d2bcb7f Cycles: Fixed OpenCL kernel build, it threw a compiler error. 2018-07-06 10:21:25 +02:00
de777ad9e6 Merge branch 'master' into blender2.8 2018-07-06 10:18:52 +02:00
1daa20ad9f Cleanup: strip trailing space for cycles 2018-07-06 10:17:58 +02:00
6d38d82437 Cycles: missed when renaming updated RNA 2018-07-06 10:16:28 +02:00
aff8b02394 Merge branch 'master' into 28 2018-07-06 10:10:47 +02:00
62fbb7d4a1 Empty Object: Center images by default 2018-07-06 10:05:37 +02:00
ed2204933a Fix typo in empty image drawing 2018-07-06 10:01:05 +02:00
27e0d6cbd0 Fix image drag and drop
- Dropping now creates empty images w/o holding Ctrl.
- Dropping background images works when cursor over camera.
2018-07-06 09:10:07 +02:00
3314d0bcb6 Disable addons which haven't been updated
Gave noisy warnings on startup.
2018-07-06 08:04:28 +02:00
5b3545f99f Merge branch 'master' into blender2.8 2018-07-06 07:56:08 +02:00
d56b90705e BKE_addons: utility to remove by name 2018-07-06 07:55:29 +02:00
288bcb2593 Further tweaks to drawing of non-selected graph editor keyframes
The previous commit only solves the problem when using the default
theme using factory settings. For previously saved themes, there could
still be problems, as the alpha values were still 0.

This commit improves the logic here so that while keyframe points on
unselected F-Curves will still get faded out (to not stick out too much
from the curves they live on), but the effect will not be as pronounced
(i.e. the points will stay visible all the time).
2018-07-06 15:38:25 +12:00
a71c2deac5 Fix T55777: Non-selected keys in Graph Editor are invisible
Restore theem setting default for Graph Editor's vertex,
with default alpha set to 1.0. The alpha value here needs
to be non-zero, as the alpha values currently get used
when drawing verts.
2018-07-06 15:15:45 +12:00
88a6aab8bb Fix T55775: Crash when select keyframe on object channels in Timeline editor 2018-07-06 15:01:28 +12:00
08ae597d63 Cleanup: flag checks 2018-07-05 22:56:18 +02:00
f5d096798c Merge branch 'master' into blender2.8 2018-07-05 22:50:07 +02:00
52655f5161 Cleanup: flag checks 2018-07-05 22:49:42 +02:00
8dff538989 Merge branch 'master' into blender2.8 2018-07-05 22:46:04 +02:00
0e2915b292 RNA: correct callback type
Missed when changing callbacks from int to bool type.
2018-07-05 22:25:34 +02:00
45fdf41be8 RNA: use is_dirty prefix for checking updates
Common convention for read-only update checks
2018-07-05 21:49:36 +02:00
a3f5d4cb14 Keymap: Make Ctrl-Tab toggles pose mode
Showing a pie menu is redundant since tab is already
mapped to edit mode.

Bypass the menu for pose mode toggle.
2018-07-05 21:28:25 +02:00
72e04f9890 Draw Manager: simplify object mask usage
Remove flag defines, use object types directly.
2018-07-05 20:43:50 +02:00
e5ca319f9d Cleanup: minor changes to last commit, #2 2018-07-05 19:49:05 +02:00
7112e96e0f Cleanup: minor changes to last commit 2018-07-05 19:41:38 +02:00
1bf5cc57bd Keymap: convenience Alt-MMB view switching
Allows to quickly set the view axis for advanced users,
Requested by @hjalti
2018-07-05 19:31:10 +02:00
f2de8a190f 3D View: support setting the relative axis
This sets the closest view axis, as if the current view is 'front'.

Useful to switch to the nearest left/right/top/bottom.
2018-07-05 19:31:10 +02:00
a883f0fd54 UI: add separators in properties editor header tabs. 2018-07-05 19:27:50 +02:00
dbdafe1209 Shaders: add target setting to material output node.
This makes it possible to have a single shading nodetree that contains
separate Cycles and Eevee shaders. By default the target is set to All
so shaders are shared.
2018-07-05 18:43:48 +02:00
5bd57aaa05 Viewport: tweak Z key shading toggle.
* Z now goes to solid mode when in lookdev or rendered mode.
* Alt-Z was broken after removal of texture mode, now toggles lookdev mode.
* Simplify code by turning it into a single operator.
2018-07-05 17:51:58 +02:00
d8223468fe GPU: avoid unnecessary multiple nodetree localize and output finding. 2018-07-05 17:51:58 +02:00
c974a35953 Cleanup: indentation 2018-07-05 17:08:16 +02:00
997b73c1db 3D View: split view-numpad into two operators
Naming operator based on keys it used was strange,
split into view-axis and view-camera.
2018-07-05 17:08:13 +02:00
404bacc639 Refactored into a single option
Technical all options are still there for finetuning.
2018-07-05 16:57:22 +02:00
35f8198c9d Refactor: SHOW->HIDE
HIDE needs less code also in the future, RNA still uses SHOW.
2018-07-05 16:57:22 +02:00
4dfcc6c25a Overlay: enable/disable drawing of specific object types.
This patch will allow users to customize what object types will be drawn by the object mode overlay.
It supports: Empties, Lamps, Cameras, Speakers, Armatures and Lightprobes.

It currently does not support Physics objects due to the overlap it has with other objects types.

Also be aware that in pose mode the armature is drawn, but not by the object mode overlay

Reviewers: campbellbarton

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3524
2018-07-05 16:57:22 +02:00
5db711fdd9 Depsgraph: Preserve engine data when doing object copy on write update 2018-07-05 16:56:47 +02:00
ec98d8cc9e Cleanup: Undefined function declarations 2018-07-05 16:56:47 +02:00
d192d72312 Ensure dependency graph exists before initializing editors
Will help entering sculpt mode on file load by making it possible
to fully initialize sculpt session. The goal is to make sure PBVH
exists since the very beginning of file open (missing PBVH is a
reason why object is not visible before first stroke).

This is not enough yet to fully solve the issue, since entering
sculpt mode tags object for Copy-on-Write update, which frees
PBVH.
2018-07-05 16:56:47 +02:00
c1678a3723 Revert "Overlay: enable/disable drawing of specific object types."
This reverts commit f7ec70895c.
2018-07-05 16:51:49 +02:00
f7ec70895c Overlay: enable/disable drawing of specific object types.
Added a option to the overlay popover that controls the visibility of
non-renderable objects like lamps, cameras, speakers, armatures, curves
empties and force fields.

After discussion we went for a single option with more detailed check in
the object_mode draw engine.

Differential Revision: https://developer.blender.org/D3524
2018-07-05 16:46:06 +02:00
Stefan Werner
4d00e95ee3 Cycles: Adding native support for UINT16 textures.
Textures in 16 bit integer format are sometimes used for displacement, bump and normal maps and can be exported by tools like Substance Painter. Without this patch, Cycles would promote those textures to single precision floating point, causing them to take up twice as much memory as needed.

Reviewers: #cycles, brecht, sergey

Reviewed By: #cycles, brecht, sergey

Subscribers: sergey, dingto, #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D3523
2018-07-05 13:53:34 +02:00
a4328a4b70 Cleanup: warning 2018-07-05 12:32:31 +02:00
d13fb7a7c4 Sculpt: Fix disappearing object on undo
Tagging object for copy on write will ruin its PBVH.

Since sculpting is an "original" domain, we only need to
update draw batches to update.
2018-07-05 12:32:06 +02:00
397d088611 UI: show modal operator keymaps in the status bar
This is work in progress, transform keymap especially
needs some filtering on it's keymap.
2018-07-05 12:27:15 +02:00
1517fa4309 Fix build w/o fluidsim 2018-07-05 12:27:15 +02:00
03ef9f3214 Fluidsim: fixed memory leak 2018-07-05 12:22:55 +02:00
f4ce6d02cd Fluidsim: ported from DerivedMesh to Mesh
Also removed a bunch of unnecessary #include statements from fluidsim.c.
2018-07-05 11:30:38 +02:00
99a6d616e8 Ported CDDM_apply_vert_normals from DM to Mesh 2018-07-05 11:30:38 +02:00
edd59aa2be Revert "Keymap: use Shift-Space for auto-complete"
This reverts commit 30680b8d51.

Conflicts with typing in capitals.
2018-07-05 08:28:42 +02:00
30680b8d51 Keymap: use Shift-Space for auto-complete
Resolve conflict w/ maximized area.
2018-07-05 08:16:22 +02:00
49b86bcfec Merge branch 'master' into blender2.8 2018-07-05 07:54:47 +02:00
cd17b32583 Cleanup: pep8 2018-07-05 07:53:21 +02:00
53c63db2ee Fix issue with closing child windows in recent changes. 2018-07-04 19:33:15 +02:00
535fec0661 Workspaces: change behavior when window layout for workspace is missing.
When switching the workspace in a window that does not yet have a layout
for the newly active workspace, we now duplicate the layout from the
previously active workspace. Previously it duplicated the layout from
the first window in the newly active workspace.
2018-07-04 18:40:33 +02:00
c43443d530 Workspaces: store view layer per main window, instead of per workspace.
It was a bit odd that the scene was stored per window but not the view
layer. The reasoning was that you would use different view layers for
different tasks. This is still possible, but it's more predictable to
switch them both explicitly, and with child window support manually
syncing the view layers between multiple windows is no longer needed
as often.
2018-07-04 18:40:33 +02:00
4e2228525f Workspaces: add main and child windows.
* Main windows show a topbar and statusbar, and select a workspace and
  scene. They are created with Window > New Main Window.

* Child windows do not show a topbar or statusbar. These follow the
  workspace and scene of their parent main window. Created with Window >
  New Window or View > Duplicate Area into New Window.

* The purpose of this change is to support multi monitor setups where you
  just want to put more editors on the other monitors. Without multiple
  topbars and statusbars, working within a single workspace and scene.
  Creating multiple main windows is intended to be a concious choice to
  do different tasks in different workspaces and scenes.

* Note these changes do not currently affect how the operating system
  treats the windows.

* When changing the workspace, the layout in all child windows changes.
  This makes sense if we consider child windows to be just a way to
  extend the main window across more monitors. In some case it may be
  useful to keep the same layout though, we can add an option for this
  depending on user feedback.
2018-07-04 18:40:33 +02:00
2bef8ca1b8 Cleanup: pass window to listeners, instead of screen + workspace. 2018-07-04 18:40:33 +02:00
5a1aa5b935 Keymap: movie-clip center frame, match graph view 2018-07-04 18:37:27 +02:00
54fba73812 Keymap: proportional edit keys 2018-07-04 18:25:21 +02:00
59415598e4 Fix Pose Mode selection overlay breaking other overlay.
Fix T55758
2018-07-04 18:14:12 +02:00
a8b5658437 UI: Node Link Menu to use same colors as regular menus
Node link menus (like shader settings in Material properties) used a slightly
brighter variant of the menu widget. Making it hard to style and match the rest.

Make it use widget_menuiconbut, which is just the menu widget with an icon and no arrows.

Thanks Brecht for the help!
2018-07-04 18:00:12 +02:00
1df1514d31 Kemap: mirror, flip changes from T55162 2018-07-04 17:48:09 +02:00
7e0ceb2ff6 Keymap: outliner changes from T55162 2018-07-04 17:26:16 +02:00
46d8aa6d94 UI: Default theme tweaks for Node editor 2018-07-04 17:24:20 +02:00
49fdf0b946 Keymap: Resolve inconsistencies, T55162 2018-07-04 17:10:41 +02:00
7c47b338c0 Depsgraph: Don't force copy-on-write when shading changes
Shading is supposed to be dealing with draw manager batch cached
thingamajigs, but was causing full object update.

This was causing both flickering in sculpt mode (PBVH was removed,
why it was SOMETIMES restored before draw is a mystery), and was
also causing things to be really slow.
2018-07-04 16:44:44 +02:00
56ace4b209 Depsgraph: Log entry operations which are directly modified and tagged 2018-07-04 16:44:44 +02:00
4bbbfdb26a UI: Default Theme: editor tabs more prominent
Workaround for now until all editors tabs share the dedicated Tab theme
settings under User Interface (which the top bar is currently using).

Thanks SimonStorl-Schulke from devtalk forum for feedback.
2018-07-04 16:33:50 +02:00
03ff3aebc4 Weight Paint: draw from original mesh
Selection changes weren't showing.
2018-07-04 16:27:23 +02:00
c767523727 Eevee: Fix incorrect padding in octahedral mapping
This fixes T54439
2018-07-04 15:58:21 +02:00
a232b4926f UI: Default theme tweaks to animation channels 2018-07-04 15:39:46 +02:00
f03079eff0 UI: Fix channels using editor header color as background
Channels were using TH_HEADER which is usually gray and unrelated to channels list.
Use sub channel color instead (light blue in the default theme).
2018-07-04 15:39:46 +02:00
1545657d7a Cleanup: remove unused zbuf member 2018-07-04 15:36:42 +02:00
fd341dd6f7 Added copyData flag to ocean modifier 2018-07-04 15:15:08 +02:00
d663ec48c0 Fluid Sim: Removed unused PointCache pointer
The only uses were setting it to NULL and asserting it is NULL.
2018-07-04 15:10:45 +02:00
175fe29e58 Cloth simulation: share point cache between CoW copies of objects 2018-07-04 14:54:16 +02:00
60b9d413db Pass copy flag to modifier copyData function
This will allow modifiers to decide whether to copy or share caches between
ModifierData copies.
2018-07-04 14:52:14 +02:00
c960804747 Cycles Denoising: Pass tile buffers to every OpenCL kernel to conform to standard and get rid of set_tile_info 2018-07-04 14:38:03 +02:00
f1525cf534 Cycles Denoising: Correctly handle target buffer in tile unmapping and move device swap logic to the device_memory 2018-07-04 14:37:55 +02:00
9db8bdbc65 Cycles Denoising: Cleanup: Rename tiles to tile_info 2018-07-04 14:37:24 +02:00
97a0d6fcc7 Cycles Denoising: Refactor denoiser tile handling
This deduplicates the calls for tile (un)mapping and allows to have a target buffer that is different from the source buffer (needed for baking and animation denoising).
2018-07-04 14:36:01 +02:00
b10c64bd2f Cycles Denoising: Split main function into logical steps 2018-07-04 14:35:05 +02:00
88b297da99 Keymap: resolve group/un-group inconsistencies
Apply grouping changes proposed in T55162

- Ctrl-G to make a group.
- Ctrl-Alt-G to ungroup.
2018-07-04 14:00:21 +02:00
7d355008bf Fix NLA transform crash 2018-07-04 13:54:22 +02:00
8aa1ef2675 Keymap: Add back Ctrl-M for mirror 2018-07-04 13:46:07 +02:00
72e090a3cf Keymap: Remove pie menu from tab-key
Based on discussion with @eyecandy & @venomgfx,
we agreed that Tab drag/click, is too easy to accidentally press
while moving the cursor.
It's also not typical to activate the operator on release which
introduces a small lag switching edit-mode.

This is a shame since in some ways its a nice way to re-use the key,
overall it just feels a little too unpredictable for such an important
action.

This commit makes the following changes.

- Tab: toggles edit-mode.
- Ctrl-Tab: opens pie menu.
- Ctrl-AccentGrave: toggles manipulator.

Note, while AccentGrave isn't always available
this shortcut is not essential.
2018-07-04 13:04:11 +02:00
8da2e97ec3 UI: Default theme use color for value slider item
Matches Flatty Light
2018-07-04 12:54:08 +02:00
67f4e9783b UI: Fix node triangle always using selected color
Now uses the text color instead.

Thanks to devtalk community for spotting this.
2018-07-04 12:54:08 +02:00
f9660a78ea Keymap: use add key instead of verify
Caused Xkey to be added but not delete key.
2018-07-04 12:49:23 +02:00
b575c50753 CMake: Add missing header file to list of sources 2018-07-04 12:10:02 +02:00
769c57b38a SoftBody: share point cache between CoW copies
This is the same approach as 98a0bcd425
applied to soft body simulation. In short, CoW copies share the point cache,
and treat it as read-only except when the depsgraph is active.
2018-07-04 11:33:27 +02:00
9e4d667c2c SoftBody: refactored sbFree()
This prevents having to wrap each call to sbFree() in an if(ob->soft)
condition and assign ob->soft = NULL after calling.

Furthermore, passing `Object *` allows us to change freeing behaviour
depending on whether the object is an evaluated copy or an original (not
done in this commit yet).
2018-07-04 11:22:57 +02:00
75b5ff6698 Softbody: unified copy functions
This unifies two almost-identical functions at the expense of having to
add one single 'flag' value at one call.

This makes copy_softbody() aware of the source/dest objects, allowing it
to make a distinction between doing depsgraph evaluation copies and real
object copies. This will be used in an upcoming commit to ensure that
the pointcache is shared between CoW copies, similar to the current
approach for rigidbody simulation.
2018-07-04 11:22:32 +02:00
13ec4be594 Fix T55750: Crash on moving sequencer strip
Custom-data free callback was freeing transform data too.
2018-07-04 10:31:31 +02:00
405c6c077f UI: Adjust width of Pivot, Shading and Transform Orientations popovers 2018-07-04 02:23:52 +02:00
969111f9b5 Cleanup: pep8 2018-07-03 22:35:37 +02:00
b360c9d7f9 cleanup of extend edge data and fixed minor errors 2018-07-04 00:04:03 +05:30
46bdbc6c78 UI: adjust popover width for overlays & toolbar 2018-07-03 19:55:51 +02:00
9e5002aded UI: optional ui-unit-width for popovers
Some popovers don't fit well with the default width,
allow panels to adjust as needed.
2018-07-03 19:55:01 +02:00
16878072a4 T55441: Pop-over large arrow offset when wide 2018-07-03 19:40:21 +02:00
bb9355e703 View3D: Remove v3d->zbuf
This is because depth test is set before drawing anything now. There is no
case where we want to draw without depth test that is not selection and
this case is not handle by v3d->zbuf anymore.

UI assume depth test is off by default. The DRWManager assume it's on.

This should fix T55623.
2018-07-03 19:22:15 +02:00
79152371c3 UI: add tool properties contexts
Currently unused, create for add-ons to populate.
2018-07-03 18:45:45 +02:00
81a23d1f2d Tool System: add operator for introspection
In some cases we want associate use an operator for a tool
for introspection, so we can for eg, automatically
use the same binding for in the popup toolbar.

Space-G/R/S for transform now work as accelerator keys again.

Also Space-E for extrude.
2018-07-03 18:38:08 +02:00
1c699d75a0 Fixed bugs in normal shading continuity and added support
to have corner vertices of a vmesh to have same normal as reconstructed
face in harden
2018-07-03 21:51:01 +05:30
51acd54760 Fix tool-system error running in background mode 2018-07-03 18:02:16 +02:00
00db85ea81 Theme: use alpha for lamp wire
Needed for showing helper line to plane.
2018-07-03 17:46:23 +02:00
3da9d36554 Fix T55709: Pose Library - Add New Pose crashes 2018-07-03 16:50:17 +02:00
f14680b1be UI: Default theme, more tweaks
Also make the selected list items not as bright, boxes darker and
adjustments for contrast and accessibility.
2018-07-03 16:43:06 +02:00
4632e4fde4 Keymap: Use easily accessible key for animation
Based on animator feedback, this key is accessed many times a day.
Swap Shift-Space /w Ctrl-Space (full-screen area).
2018-07-03 16:37:15 +02:00
cde6bbfea1 Keymap: update 2.7x map 2018-07-03 16:34:12 +02:00
48d7cf680e Keymap: Select/De-Select support for anim-editors
Also update menu items, adding select/de-select.
2018-07-03 16:28:59 +02:00
69e512243c Cleanup: Remove unused variable 2018-07-03 15:39:32 +02:00
14b0510d21 Edit Mesh Overlay: Fix floating point instability artifacts
This was visible when vertices were very close to the near clip plane.
2018-07-03 15:39:31 +02:00
1c5b375390 UI: Default theme update for contrast
Selected color is now .9 alpha so keyed/animated/driven statuses
show through when widget is active. Assign color for overriden state.

Also fix progress bar not visible.
2018-07-03 15:36:33 +02:00
190d1b2f7a Fixed merge errors 2018-07-03 19:01:20 +05:30
fbafa4352b Keymap: Select/De-Select now use A, Alt-A
There are still some keys to update because
some operators only support toggle.
2018-07-03 15:10:12 +02:00
c0c0eb7e7e Fix typo in transform orientations. 2018-07-03 14:52:34 +02:00
33a5cde313 Keymap: Adjust animate and manipulator toggle keys
Make room for Alt-A to be used for de-select.
Discussed with artists in studio & @venomgfx,

- Use Ctrl-Space for animation.
- Use Ctrl-Tab to toggle manipulator.
- Remove mirror transform binding.
2018-07-03 14:51:53 +02:00
76d7186d61 UI: use new transform orientation when created. 2018-07-03 14:24:22 +02:00
03ca4a57c7 Cleanup: move snap/pivot/orientation popovers to proper file. 2018-07-03 14:24:22 +02:00
a2ce6af2f5 Correct tool rename
Needed to update manipulator too.
2018-07-03 14:20:05 +02:00
952ae70109 Cleanup: unused function 2018-07-03 13:53:52 +02:00
c118b852b7 Tool System: move transform into a top-level tool
Also rename move to grab.
2018-07-03 13:52:04 +02:00
967b84534a Workbench: Fix wrong shading shadoow direction. 2018-07-03 13:36:04 +02:00
e30f25ba22 GHOST: Fix assert and rebind previous ogl context. 2018-07-03 13:36:04 +02:00
433e3db8d8 Revert "GHOST: Delay opengl context initialization"
This reverts commit 128926a41b.
2018-07-03 13:36:04 +02:00
6c9fe9cd8c Revert "GHOST: WGL: Delay context initialization for offscreen contexts."
This reverts commit 800c3c5ca5.

# Conflicts:
#	intern/ghost/intern/GHOST_ContextWGL.cpp
2018-07-03 13:36:04 +02:00
d78bcf9055 Revert "GHOST: Fix uninitialized var"
This reverts commit 27b6734022.
2018-07-03 13:36:04 +02:00
7a8403dbb0 Revert "GHOST: Fix uninitialized values."
This reverts commit aca403c819.
2018-07-03 13:36:04 +02:00
c50e1216a6 Fix dimmed shortcut key display issues in toolbar menu and color picker.
Draw with alpha * 0.5 instead of using item them color, this doesn't work
well in the toolbar menu and highlighted menu items otherwise.
2018-07-03 13:08:25 +02:00
48c93640d2 Cleanup: fix compiler warning. 2018-07-03 13:08:25 +02:00
b868e58d9b Sculpt: Fix wrong object used for crazy space calculation
Was applying modifiers twice, when it should not have.

Is expected to solve mesh corruption when in sculpt mode.
2018-07-03 12:53:29 +02:00
6d0e172fef Sculpt: Cleanup, spelling 2018-07-03 12:49:57 +02:00
268bcb8027 Sculpt: Fix ghosting artifacts when sculpting in workbench engine 2018-07-03 12:29:49 +02:00
cf2096cfd9 Nodes: add new image button to image nodes. 2018-07-03 12:25:50 +02:00
72a051f957 Cleanup: remove generation context from image new operator. 2018-07-03 12:19:16 +02:00
b4ccec6742 Fix ID buttons not working in popover menus. 2018-07-03 12:16:30 +02:00
a94d582a40 Sculpt: Fix possible race condition with undo nodes
it is possible that two threads will request same undo node, only one
of them will initialize the node. The issue is that initialization is
happening outside of a lock, which was making one thread to use non-
initialized node.

If this change is ever a bottleneck, make a lock inside of node.
2018-07-03 11:06:29 +02:00
a9211e808c UI: hide empty status mouse button when dragging 2018-07-03 10:30:13 +02:00
4bc11b72e5 Workbench: CleanUp whitespaces 2018-07-03 10:25:07 +02:00
6016abc1a3 Workbench: Fix texture drawing
Somehow not sure when the test for textures was performed on an
uninitialized variable resulting in never showing the textures at all
2018-07-03 09:54:25 +02:00
8dc18b54ad Workbench: Fix ghosting and crash in X-Ray mode
When playing animations the anti-aliasing was not reset, resulting in
ghosts from previous frames to be drawn. Also when playing animations
and switching to X-Ray mode for the first time would most likely
result in a write to uninitialized memory.
2018-07-03 09:29:04 +02:00
39678442e1 Cleanup: typos 2018-07-03 09:22:02 +02:00
d7982f71e9 Keymap: remove 'Screen Editing' from 2.7x map
Uses action-zones which aren't currently working in keymap presets.
2018-07-03 09:04:44 +02:00
1ff5cc8c1a addons: disable addons with versions below 2.8 2018-07-03 07:59:08 +02:00
7a0750016e Merge branch 'master' into blender2.8 2018-07-03 07:23:15 +02:00
eb7286bfd2 Python: Print file:line when editing UI source 2018-07-03 07:22:26 +02:00
105192e5a2 Cleanup: pep8 2018-07-03 07:13:27 +02:00
646f8bdb48 Cleanup: pep8 2018-07-03 07:12:24 +02:00
00fc1d70a7 Merge branch 'master' into blender2.8 2018-07-03 06:58:34 +02:00
8c15d612a5 Cleanup: pep8 2018-07-03 06:55:02 +02:00
b66aa0b0a6 Cleanup: pep8 2018-07-03 06:48:44 +02:00
e856eb7e8b UI: don't change the theme area when setting theme 2018-07-03 05:57:27 +02:00
Julian Eisel
be5482ba2f UI: Dim color of shortcut label in menus and toolbar
The shortcut labels now use the "Item" theme color. Its contrast for hovered
items is a bit low, but not too bad.

Note that this also changes the color of the little toolbar triangle to be grey
(the same color we use for the keymap label). IMHO that looks better though.
This doesn't update any themes other than the default one.

Part of T54711.
2018-07-03 00:54:46 +02:00
98d2055089 Fix ugly half alignment in timeline header. 2018-07-02 20:25:59 +02:00
5b5e23cec3 Splash: add "Alpha" text and link to the development fund. 2018-07-02 20:08:43 +02:00
Macelaru Tiberiu
2203b041e1 Sculpting: add Manual detail mode for dynamic topology.
In this mode mesh detail does not change on each stroke, but only when
using flood fill.

Differential Revision: https://developer.blender.org/D3515
2018-07-02 20:08:42 +02:00
8c7ddf944e Theme: use highlight from flatty light
Also make text & number editing use same colors.
2018-07-02 20:08:15 +02:00
6fce49ab08 Theme: desaturate colors
Having everything tinted gives isn't good for color perception.
2018-07-02 20:08:15 +02:00
31e43d021f Merge branch 'blender2.8' into soc-2018-bevel 2018-07-02 23:31:19 +05:30
368a64fe04 Refactored bevel normal editing functionality. 2018-07-02 22:55:33 +05:30
31c9bd35bc Workbench: Fix use of uninitialized memory. 2018-07-02 19:21:01 +02:00
dc87648970 UI: Fix Properties with consecutive icons enabled in dropdown menus
It was using ICON_UNLOCKED when the property was true.

This affected the use_lock_interface properties now displayed in the Render
menu.
2018-07-02 19:14:06 +02:00
e35f9f0408 Merge branch 'master' into blender2.8 2018-07-02 18:55:24 +02:00
dbe1b07e05 Cleanup: right shift 2018-07-02 18:45:26 +02:00
Vuk Gardašević
12603826ea UI: Transform Orientations panel as popover
Functionality fits in the Transform Orientations, no need for a dedicated
panel in the viewport sidebar.

See D3511
2018-07-02 18:44:05 +02:00
9f80429ab6 Cleanup: use _f, _i suffix for GPU state API 2018-07-02 18:27:05 +02:00
c2814f5b28 Merge branch 'master' into blender2.8 2018-07-02 18:18:16 +02:00
74ace41160 Minor cleanup and fixed normal updating erasing entire mesh 2018-07-02 21:47:15 +05:30
0c25881c39 Cleanup of fix_normal_shading
Fixed the edge crease that was present and also made significant
performance improvements.
2018-07-29 19:52:23 +05:30
73c577d46a Painting: fix uninitialized variable use 2018-07-02 18:16:37 +02:00
William Reynish
ac8b641b77 Outliner: remove view menu, move more into RMB context menu and filter popover. 2018-07-02 17:40:20 +02:00
ae6872e26f UI: update status bar mouse icons, draw in text color. 2018-07-02 17:40:20 +02:00
5d77216ef7 Cleanup: remove unused icon code after OpenGL upgrade. 2018-07-02 17:40:20 +02:00
861cf1d131 Fix modal keymap breaking exporter
We could support quotes in keymap names, for now don't write them.
2018-07-02 17:37:15 +02:00
94bc1a40b4 Fix sculpt key bindings 2018-07-02 17:33:34 +02:00
778b272552 Theme: use black for object wire
Would too easily loose contrast with shaded objects.

See: T55673
2018-07-02 17:09:45 +02:00
adc8569deb Error in theme color cleanup #2 2018-07-02 17:04:17 +02:00
Julian Eisel
bea364fe2a Fix: Global area edges couldn't call right click menu to join/split
Operators ignored edges along the screen-layout bounds. They should've ignored
those along window bounds instead.

Although the global areas can not be joined/split, the adjacent areas can. So
the menu should still be shown.
Had to change the return value of area joining operator, so that an error report
can show up when trying to join over a global area edge. Think this is fine to
do, but you never know with such stuff.

Preferably we'd gray out the "Join Area" item in the menu when clicking on the
edge of a global area. Unfotunately the operator uses coordinates passed as
operator properties to find the right edge/areas, which we cannot access from
the poll callback.
2018-07-02 16:56:54 +02:00
878b09562c Error in last commit 2018-07-02 16:52:08 +02:00
f4f85b9db7 Cleanup: remove redundant theme colors
Remove unused colors (colors which RNA has no access to).
2018-07-02 16:34:47 +02:00
ecc0945117 UI: show favourites from properties-space in the 3D view
This allows settings to be toggled in the 3D view.
2018-07-02 15:57:12 +02:00
5fd2ea58a6 UI: Header consistency
Snap before proportional editing, pivot after
2018-07-02 15:53:56 +02:00
41a7225794 UI: align header menus to space them closely 2018-07-02 15:47:00 +02:00
4d05dd880a Keymap: reinstate Ctrl-L key
Linking based on selection may be done often, so adding back.
2018-07-02 15:27:19 +02:00
e5767eaad1 Cycles: Fix missing curve hair when building with GCC-8 in release mode
Reshuffle cast intrinsics to make XOR to operate on __m128i rather
than on __m128.

Hopefully this does not affect performance.
2018-07-02 15:16:14 +02:00
8e0cfcfc90 Keymap: add back macos preferences shortcut
Would like to avoid OS-keys, but apparently this is expected on OSX.
2018-07-02 15:15:27 +02:00
f2124c5624 UI: revert 3D menu alignment
This caused collapsed menu to draw in a row,
will look into alternate way to avoid menus taking too much room.
2018-07-02 15:02:45 +02:00
6a323d196f UI: Header consistency for 3D Viewport
Alignment/snapping/proportional edit to the right like in all other editors,
keeping the center for the shading/overlay settings.
2018-07-02 14:54:20 +02:00
69e437ba22 UI: Header consistency for Text editor 2018-07-02 14:54:20 +02:00
79c8f5ac0d UI: Header consistency for Squencer 2018-07-02 14:54:20 +02:00
ea57345adb UI: Header consistency for Node editor
Also move use_insert_offset to the View menu as it is not toggled that often
to take space in the header.
2018-07-02 14:54:20 +02:00
fd6d149347 UI: Header consistency for UV/Image editor 2018-07-02 14:54:20 +02:00
5b7f0d36f3 UI: Header consistency for animation editors 2018-07-02 14:54:20 +02:00
cec11c86e5 UI: File Browser header consistency
Move "Recursion" and "Display Size" to a new View menu.

Thanks Campbell for helping with wonky menus.
2018-07-02 14:54:20 +02:00
34678388f3 Outliner: add outliner wide RMB context menu.
All right click menus in the outliner now include OUTLINER_MT_context.
2018-07-02 14:52:22 +02:00
b3098c30a6 UI: add workspace cycling menu items 2018-07-02 14:30:28 +02:00
20046defd7 UI: update mouse icons in status bar. 2018-07-02 13:46:09 +02:00
2e15ee0dcf Keymap: add back X-Key for delete
This is needed as part of modeling work-flow, so keep it accessible.
2018-07-02 13:00:43 +02:00
3b0148d2aa Keymap: use Page Up/Down for workspace switching
These are common keys for changing tabs,
leaving tab free to be used for tools/mode switching.
2018-07-02 12:49:45 +02:00
06994e954b UI: add screen split to window context menu 2018-07-02 12:46:51 +02:00
ec22327a5f Merge branch 'master' into blender2.8 2018-07-02 12:43:36 +02:00
c6416ae653 Screen: support splitting from floating menu 2018-07-02 12:40:17 +02:00
b076b3853c Merge branch 'master' into blender2.8 2018-07-02 12:03:56 +02:00
b88e51dd55 Cleanup: use bool for poll functions 2018-07-02 11:51:31 +02:00
ad5a20efce Commit D3494 : Compiled shader lookup fix
Authored by Pavel Rudko (PavelRudko) on Thu, Jun 21, 10:41 AM.

Original description:

I've encounterd into a problem with blender 2.8.
See the example screenshot (scene, shader setup). For some materials it's not enough to calculate hash based on fragment code and defines. In some cases attribute names may change. And if we change uv set name, for example, vertex shader is not recompiled, and another attribute name inside it is used.
2018-07-02 11:05:48 +02:00
bfbfb1c47e Correct f-string in own recent changes 2018-07-02 09:18:38 +02:00
bf7c815169 Fix T55675: Crash internal animation player 2018-07-01 21:07:18 +02:00
37994e0af2 Merge branch 'master' into blender2.8 2018-07-01 20:15:21 +02:00
26c5a1c301 Cleanup: right shift in interface code 2018-07-01 20:12:07 +02:00
192e5d65a7 Keymap: add generally useful popups to F-Keys 1..4
This allows key bindings: link/append and user-preferences
to be accessed via keys - without having to assign keys to each action.

- F1: Context sensitive help.
- F2: File Context Menu.
- F3: Search.
- F4: Window Context Menu.

Other keys F5..10, remain free,
ideally they can be kept for user actions.
2018-07-01 17:51:31 +02:00
71e65daf5c Fix T55687: compile error when not using c++11. 2018-07-01 16:48:19 +02:00
9c5203c98f Fix T55626, fix T55106: Cycles motion blur + persistent images bug. 2018-07-01 16:32:35 +02:00
36a9436d80 Merge branch 'master' into blender2.8 2018-07-01 16:22:06 +02:00
ddee0931b8 RNA: use bool for boolean RNA types
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
2018-07-01 15:57:59 +02:00
3ec6f2172d Cleanup: reduce variable scope 2018-07-01 10:32:47 +02:00
fadad17c58 Cleanup: avoid calloc when immediately overwritten 2018-07-01 10:26:37 +02:00
bc95c7a3ea Cleanup: remove num argument prefix 2018-07-01 09:23:51 +02:00
1c0aa4e396 Cleanup: RNA naming 2018-07-01 09:13:04 +02:00
b4998548ab Cleanup: use '_len' suffix for line stipple 2018-07-01 08:42:16 +02:00
ab6e23ffbb 3D View: use 3px dashed relationship line
Seems this was accidentally doubled from 2.7x?
2018-07-01 08:36:22 +02:00
0d31ab362e Revert "Experimental Tweak: Only show relationship lines between objects when either the parent/child object is selected"
This reverts commit 9129319647.

This meant users needed to select everything to see relationship lines,
this isn't always easy since objects can have limit-selection set.

This could be made into an enum option if it's important.
2018-07-01 08:28:12 +02:00
24979ccb65 UI: set default theme outline alpha
The outline wasn't being set causing it not to draw.
2018-07-01 08:04:39 +02:00
9daf6b12a6 Merge branch 'master' into blender2.8 2018-07-01 07:24:46 +02:00
9738de820a Cleanup: use f-string 2018-06-30 22:02:41 +02:00
6a13b6324b UI: support check-boxes in quick menu
Could support other RNA types,
however menus don't work well in this case.
2018-06-30 21:08:48 +02:00
7d48a342d6 Merge branch 'master' into blender2.8 2018-06-30 18:06:20 +02:00
bea62c5c1a Cleanup: split out context member query 2018-06-30 18:05:01 +02:00
62fcf34a41 RNA: check for 3D view overlay/shading
Use to calculate paths for the info window.
2018-06-30 17:43:14 +02:00
Severin
b08fa7a6d9 UI: Support status-bar hiding
Just like the top-bar, the status-bar can now be hidden/collapsed by dragging
its edge. We display a small line with the editor outline color then, so there
is something that can be dragged up to un-collapse the area again.
This collapsed state is not written to files yet.
2018-06-30 17:01:03 +02:00
eb47ac4569 UI: correct menu label comparison 2018-06-30 16:00:18 +02:00
Severin
7f4ce6c62b Fix corrupt screen when splitting areas after collapsing top-bar 2018-06-30 15:41:04 +02:00
b35aa659d1 DNA: rename operator idname 2018-06-30 14:17:13 +02:00
eb63b32dee Merge branch 'master' into blender2.8 2018-06-30 13:52:04 +02:00
bdc1108e8c Cleanup: remove unused context arg to menu 2018-06-30 12:31:53 +02:00
41176cd3d8 UI: support adding menu's to favourites 2018-06-30 12:08:08 +02:00
62ff53ff19 UI: move queries into interface_query.c 2018-06-30 10:58:56 +02:00
b89307acfd Merge branch 'master' into blender2.8 2018-06-30 10:56:12 +02:00
a42fd3de5d UI: Add 'interface_query.c'
Interface files are increasingly mixing up too much functionality,
add a file only to handle queries.

More functions can be moved/added here.
2018-06-30 10:49:04 +02:00
ea6fef9385 Merge branch 'master' into blender2.8 2018-06-30 10:32:55 +02:00
b26e9f0000 Cleanup: rename bmesh_queries -> bmesh_query
Other files with the same purpose already used 'query'.
2018-06-30 10:32:21 +02:00
16a8f35df1 Keymap: 2.7x, use fractions 2018-06-30 10:20:16 +02:00
d15bff5e96 Keymap: 2.7x uses spacebar for search. 2018-06-30 10:06:30 +02:00
ba1f292b32 UI: add operator search to edit-menu
While this is most useful to access from an active-region,
it's not discoverable without a menu entry.
2018-06-30 10:04:08 +02:00
25b7bdb6a9 Merge branch 'master' into blender2.8 2018-06-30 09:29:38 +02:00
5c0d8bcdc7 Cleanup: use f-string 2018-06-30 09:25:23 +02:00
Severin
1f1c2d8ce8 Cleanup: Move area geometry management into an own file
Area geometry management is quite complex and not easy to get into. We should
gradualy build an API that abstracts away this complexity.
2018-06-30 01:56:07 +02:00
Severin
a55b00b53b Fix a number of small errors in area coordinate handling
For example collapsing the lower part of the topbar with 2x interface scale
would hide the top-bar header region. There were also more asserts when changing
window size and moving area edges afterwards (same assert as in T55298).
Fixes are similar to e626998a26.

With all the recent fixes I've done, area geometry handling should be stable
again. Let's hope I'm right :)
2018-06-30 00:42:19 +02:00
Severin
48ad67ef82 Cleanup: Add/use function to get area width/height from area vertices
This used to be rather cryptic and it was easy to forget the `+ 1` which in fact
is needed to get the correct width/height, see e626998a26. This should
also fix some minor off-by-one errors.
2018-06-29 21:29:06 +02:00
728e92422e Fix T54524: keyframe and driver colors not showing in shape key list.
This reverts commit 357b72e0a7 which caused
the issue, we need a better fix for that cosmetic issue from T50862. For
now displaying keyframes and drivers is the more important one.
2018-06-29 21:23:13 +02:00
Severin
ac2e10d47b Fix memory leak when using scroll-bars 2018-06-29 20:57:43 +02:00
Severin
9b6aed845a Cleanup: Remove unused argument in recursive function 2018-06-29 20:35:32 +02:00
0c94528829 Cleanup: naming in MOD_utils. 2018-06-29 19:02:19 +02:00
3bc21bc5f7 Cleanup: Moar DM busting, mostly cleaning up MOD_utils. 2018-06-29 18:58:13 +02:00
3aa61499d0 Fix unnecessary empty space in shading popover. 2018-06-29 17:58:58 +02:00
ccacf3ae3c Cycles: change AO node default to 16 samples and only local off. 2018-06-29 15:43:55 +02:00
ccca2c0164 Workbench: Spherical Harmonics tests
Added a compile directive in order to test SH4 in stead of SH2Win.
For now I disabled SH4, it is a bit more clear, but has a small
performance impact. Will check later for a better approach
2018-06-29 14:59:30 +02:00
5ba87cf22e Cleanup: remove another bunch of DM usages, includes etc. 2018-06-29 14:57:02 +02:00
a59df21ad8 Fix T55645: broken particle Use Count option for instancing objects.
There is now a manual refresh button on the panel to update the list
of objects in case it changes, and it also gets refreshed when changing
the collection or toggling the use count option.

This is a bit more manual but the previous code of refreshing the
list while evaluating the depsgraph was unreliable.

This also fixes it to take properly take into account visibility, and
to work with linked collections for which index writing was missing.
2018-06-29 14:53:02 +02:00
ece72c9ec0 Keymap: re-enable object apply transform 2018-06-29 14:12:52 +02:00
dcdde6bedb Keymap: minimal default keymap
Use 2.7x keymap preset for full keymap.

Use define to allow further adjustments.

See T55666.
2018-06-29 12:58:59 +02:00
2223d63c58 Refactor static override code to pass Main around.
Access to main database is actually rarely needed, but some custom
'apply' functions do need it (like Collections' overriding of objects or
children collections).
2018-06-29 12:48:12 +02:00
3733be8731 Cleanup: nuke G.main from BKE's particle_system.c 2018-06-29 12:48:12 +02:00
3eff6f7a5e Cleanup: some moar DM kicking, in armature edit code. 2018-06-29 12:48:12 +02:00
04f8929271 Workbench: Transparent textures
Worknemch now supports transparent textures.
As the main engine is a deferred shading only a cutoff is supported
(draw or don't draw this pixel)
2018-06-29 12:05:23 +02:00
15ebe30bc5 Workbench: remove runtime warnings
Added feature check when uploading material uniforms
2018-06-29 09:59:37 +02:00
3169160a97 Workbench: TAA optimalization
First frame of the TAA is just a regular copy of the previous buffer. so
we write directly to the final buffer and skip the taa shader. We do
init the history buffer via blit so it will be initialized for the other
iterations.
2018-06-29 09:26:58 +02:00
18d87e79e9 Merge branch 'master' into blender2.8 2018-06-29 09:25:40 +02:00
b372766816 Cleanup: trailing newlines 2018-06-29 09:23:51 +02:00
3325487530 Keymap: 2.7x macos-only additions 2018-06-29 09:19:47 +02:00
f44c9b0c93 Keymap: add 2.7x keymap
This is the keymap from 929c78e33c
before the 2.8x keymap diverged from 2.7x.

All non-modal maps have been included.
2018-06-29 09:19:40 +02:00
899d100dd4 Workbench: Use less GPU memory
When AA was enabled a new buffer was created. As the composite pass is
already done, we can reuse earlier buffers.

For the deferred rendering we reuse the color_buffer_tx and for the
forward rendering we reuse the transparect_accum_tx.
2018-06-29 08:42:56 +02:00
d34b0faa65 Workbench: Removed MaterialData UBO
Most of the times the materials differ due to the object_id. This was an
overhead and resulted in instabilities on Intel graphical cards. This
commit will revert the Material Data UBO and replace it with normal
uniform.
2018-06-29 08:27:14 +02:00
9bd0c63382 Merge branch 'master' into blender2.8 2018-06-29 08:05:38 +02:00
af36dd4664 Cleanup: trailing newlines 2018-06-29 08:02:49 +02:00
Severin
be983295ea Fix: Moving area edge could corrupt screen in very specific case
Caused by ca8f787349. This issue is in master actually. Fixing it there
would cause conflicts so won't do that unless needed ;)

Steps to recreate were:
* Split properties editor into two (default startup.blend)
* Move both properties editors to the bottom, so only their headers are visible
* Move the upper edge of the upper properties editor up and down
Although it doesn't happen everytime, you may see the edge between the timeline
and the 3D view move, while the region drawing doesn't update.

What happened is area edge snapping allowed to snap the edge outside of window
bounds (we snap to a 4px grid by default), which screen_vertices_scale
interpreted as window scaling and thus run area size updates.
2018-06-29 02:23:59 +02:00
4d39da1060 Merge branch 'master' into blender2.8 2018-06-28 23:57:00 +02:00
46dceefc35 WM: Remove Screen Cast
This feature is better handled by specialized tools.
2018-06-28 23:40:51 +02:00
Severin
4d1c5f1ec5 Change earlier fix to work with hiDPI
Referring to ca8f787349. Thought in this case the simple `+ 1` would be
correct, but we need to make the same pixel adjustment as we do in other places.
2018-06-28 21:07:30 +02:00
Severin
c7954df96c Fix: Moving area edge could make areas overlap status-bar
Simply moving the properties editor of the default startup.blend all the way to
the bottom could trigger this. Calculating limits for area edge moving would use
screen bounds instead of entire window bounds (screen + global bars).

Added assert that should help debugging further issues like this.
2018-06-28 20:54:33 +02:00
Severin
ca8f787349 Fix T55298: Failing assert when splitting areas vertically
There are more related glitches for which I have fixes. Will test them some more
and push in a followup commit.
2018-06-28 19:51:39 +02:00
William Reynish
a71d53cb15 UI: move UV selection options to left
This is consistent with the 3D view.
2018-06-28 18:31:23 +02:00
dbbea2fc22 Fix: build error with msvc
introduced by rBd2757d149bf2d9ac604da6fb7f4742ee77e68d2d
2018-06-28 09:07:10 -06:00
aacd15e8a9 Overlay: Make overlay engine rebder on top of paint modes.
This puts the wireframe on top of the weight in weight paint mode,
sculpt mode ...

Wireframe should be colored differently if the object is in paint mode
but it's not there yet.
2018-06-28 16:12:24 +02:00
8caedc27d9 Correct mistake checking version 2018-06-28 16:01:18 +02:00
e65d7665f1 Removed most calls to modifier_deformVerts_DM_deprecated()
None of those calls actually passed a DerivedMesh.
2018-06-28 16:01:02 +02:00
Cédric Paille
aa6247a385 Alembic: speed up export of packed UV islands.
Differential Revision: https://developer.blender.org/D3510
2018-06-28 15:46:05 +02:00
d2757d149b Make stdout unbuffered
Unbuffered stdout makes stdout and stderr better synchronised, and helps
when stepping through code in a debugger (prints are immediately
visible). We don't output much to stdout anyway, so this isn't likely to
cause any performance issues.
2018-06-28 15:32:19 +02:00
747843516f Draw relationship lines for rigid body constraints 2018-06-28 15:32:19 +02:00
2b4c7600b7 Workbench: Anti-aliasing refactor
- TAA is also enabled for Forward rendering
- Uses less GPU memory (removed one history buffer)
- TAA is done after the color management
- consolidated the aa code between forward and deferred rendering
(workbench_effects_aa.c)
2018-06-28 14:39:15 +02:00
daa47e5e80 Workbench: Removed unused code in cavity shader 2018-06-28 14:39:15 +02:00
d2745986c8 Static Override: add support to override items (objects/sub-collections) in Collection IDs.
Was kind of a PITA to get working, but simple tests seem to pass well...
2018-06-28 14:28:31 +02:00
3c37354c97 Static Override: fix diffing logic for ietms ID pointers case.
I.e. we can now use REPLACE operation directly on items of an RNA
collection, when those items are ID pointers.

Again, mandatory to support new Collection's objects/children override.
2018-06-28 14:28:31 +02:00
e35d956860 Static Override: RNA apply code: pass extra 'item_ptr' to apply callbacks.
This is unused currently, but is mandatory for incomming support to
Collections objects and children items override support.
2018-06-28 14:28:31 +02:00
4626ca47b9 Prevented depsgraph errors when RigidBody Constraint is incomplete 2018-06-28 14:20:11 +02:00
7ad0e8300d Fixed AttributeError when there is no object selected 2018-06-28 14:20:11 +02:00
98a0bcd425 Prevent copying too much in the Rigid Body simulation
To prevent the pointcache from being copied-on-write too (and requiring
copying back), the cache is now shared between the original and
evaluated scenes. Reading from the cache is always allowed; running the
sim and writing to the cache is only allowed when the depsgraph is
active.

Some pointers have moved from RigidBodyWorld (RBO) to
RigidBodyWorldShared (RBOS). writefile.c copies some pointers back from
RBOS to RBO so that the file can still be opened on older Blenders
without crashing on a segfault.

The RigidBodyWorldShared struct is written to the blend file, because it
refers to the PointCache ID block.

The RigidObjectShared struct is runtime-only, and thus not saved to the
blend file.

An RNA getter-function is used to hide the new 'shared' pointer. As a
result the Python API hasn't changed.

Reviewed by: campbellbarton

Differential Revision: https://developer.blender.org/D3508
2018-06-28 14:20:11 +02:00
9b050b736b Fix assert to due missing GPU blend mode. 2018-06-28 13:46:30 +02:00
89e0d9848a UI: keep some operator text in headers.
Key shortcuts and explanation about how to use the tool should go to the
status bar, but other info can in the header so it's near where the user
is working. This distinction has not been made yet for all operators.
2018-06-28 13:04:28 +02:00
af9fcb6a33 Give RigidBodyWorld constraints collection a fake user
This prevents it from disappearing when the blend file is saved.
2018-06-28 12:31:44 +02:00
2928590431 Remove flatty_dark_blueberry (now default) 2018-06-28 12:28:49 +02:00
d2851b78f0 Manipulator: regression from removing keymaps
Keymaps were used to check which tool was active.
2018-06-28 12:26:33 +02:00
fddfc416ef RNA path: add way to get both valid ptr/prop pair, and final item ptr.
This will be much useful in some cases, at least in override area it is
needed (avoids searching again for the overriden item in a collection).
2018-06-28 11:58:15 +02:00
f827ab1d0c Correct bad merge 2018-06-28 11:29:35 +02:00
de30c47513 Merge branch 'master' into blender2.8 2018-06-28 11:10:09 +02:00
f22ef1706d Fix T55662: Crash on text autocomplete
Regression from undo system upgrade.
2018-06-28 11:09:09 +02:00
3f74a5c5fd Proper fix for RNA path evaluation of collection items.
Following RNA pointer way - only return evaluated item if asked for.
2018-06-28 11:06:31 +02:00
33306cabbe RNA_access: path parsing: fix broken code for collections.
When RNA path was for a collection item, we'd falsly get NULL final
property (and wrong final RNA pointer too).

Own stupid mistake in some previous commit, iirc.
2018-06-28 11:06:31 +02:00
0bf33a1e33 Cleanup: Nuke DM out of particle edit code.
Note that this commit also fixes serious memory leaks, temp Mesh
generated out of Main from the DM were never freed here!
2018-06-28 11:06:31 +02:00
d125e777b3 Cleanup: remove some DM from editor's Object vgroup code. 2018-06-28 11:06:31 +02:00
ed0ca7258e Cleanup: more DM include removal, use BAREMESH cddata mask in constraint code. 2018-06-28 11:06:31 +02:00
Dalai Felinto
c1aaa6b24b Fix material preview for EEVEE/Cycles
The preview files had all the other collections excluded from the view layer.
Although this fix the problem, it probably means we ignored some existing
2.8 files in recent changes. Which is likely fine anyways given that 2.8 is
experimental.
2018-06-28 11:05:14 +02:00
54beb7b433 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-06-28 11:00:26 +02:00
f3065ed365 Merge branch 'master' into blender2.8 2018-06-28 10:50:04 +02:00
274bde23fb CMake: enable WITH_ASSERT_ABORT by default
Assert from BLI_assert by default in debug builds
(instead of just printing a warning).

Some developers ignored this, causing errors for others.
Better debug builds cause hard error so code isn't ignored.

Disabling is still useful when bisecting or testing outdated code.
2018-06-28 10:48:06 +02:00
d5a8c0c414 UI: use two dot ellipses
Use less space for sign used when we don't have enough.
2018-06-28 10:45:39 +02:00
071ec6b397 Workbench: Fix crash editing in texture modes without uv layer
When meshes has no uv layer, but has a texture assigned there was a uv
layer allocated which was corrupt. When no uv layer is available now
there won't be a vbo created. This might impact performance as the draw
cache does not cache this result.
2018-06-28 10:40:19 +02:00
f09480b212 Hair drawing: respect the amount of layers.
Current implementation works with at most of 3 layers, but was not
checked during hair drawing leading to reading from uninitialized
memory.

This commit limits it to the number of layers that is used during
compilation of blender.
2018-06-28 10:40:19 +02:00
3f2bde5a39 Workbench: Materials Texture hash
only hash the texture if it exists. Really minor improvement
2018-06-28 10:40:19 +02:00
b01392e9ac Tools: disable fallback drag action for transform
Based on animator feedback, accidentally not clicking on the manipulator
handle had unpredictable behavior.

This functionality will be moved into the manipulator and made optional
(add an invisible fallback manipulator).
2018-06-28 10:34:41 +02:00
20880d8744 Workbench: Fix Texture drawing
textures were not always drawn as the material did not always include
the image in the hash. Not sure if this will solve all cases, but it
definitely works better with this change.
2018-06-28 09:20:46 +02:00
53e191e0a5 Merge branch 'master' into blender2.8 2018-06-28 08:50:11 +02:00
8777b33699 Fix missing blend mode in recent OpenGL refactor 2018-06-28 08:49:30 +02:00
597122d72b Cleanup: use f-strings 2018-06-28 08:43:58 +02:00
d8d245917d Cleanup: pep8 2018-06-28 08:27:03 +02:00
a18a6a1441 gl cleanup: fix wrong cast in bf_editor_transform 2018-06-27 22:47:25 -06:00
8e02106d0d GLRefactor: partially remove gl calls from source/blender/editors.
This translates the gl calls to the new GPU_ wrappers from D3501.

Given it's tedious and repetitive work, this patch does as much as it can with search + replace, the remainder of the gl calls will need to be manually dealt with on a case by case basis.

This fixes 13 of the 28 failing editors when building without opengl.

For the list of substitutions see D3502

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3502
2018-06-27 19:07:23 -06:00
William Reynish
fe258fd445 UI: Center ID Blocks in Dopesheet Editor
Also move use_multi_word_filter to the View menu instead of next to every
search field, as it can be very slow in big scenes.
2018-06-28 00:49:17 +02:00
William Reynish
7a8c49ef91 UI: Center ID Blocks in Clip Editor
See T55635
2018-06-28 00:33:52 +02:00
William Reynish
ed8fca8782 UI: Center ID Blocks in Image Editor
See T55635
2018-06-28 00:33:10 +02:00
William Reynish
9f4b7bed29 UI: Center ID Blocks in Video Sequencer
Also remove Use Preview Range and Lock Frame buttons from the header
they belong to the Timeline editor now.

See T55635
2018-06-28 00:32:05 +02:00
William Reynish
3e1b755ead UI: Center ID Blocks in Node Editor
See T55635
2018-06-28 00:30:47 +02:00
William Reynish
252d1d8e22 UI: Center ID Blocks in Text Editor
See T55635
2018-06-28 00:29:04 +02:00
a009f2659f UI: keep statusbar keymap icons in same position, if there is enough space. 2018-06-28 00:13:58 +02:00
8b2297847f Merge branch 'master' into blender2.8 2018-06-28 00:13:52 +02:00
9536f67e7e Fix Cycles tests build on macOS. 2018-06-28 00:11:01 +02:00
35bfc8c748 Merge branch 'master' into blender2.8 2018-06-27 23:01:19 +02:00
b633d760a2 Cleanup: style 2018-06-27 22:32:52 +02:00
31f0c9182e Cleanup: style 2018-06-27 22:29:59 +02:00
William Reynish
609805eed3 UI: shorten labels to avoid clipping 2018-06-27 22:12:50 +02:00
cf7ff47e3e Remove empty gradient definitions in new theme
MSVC doesn't support
2018-06-27 22:12:50 +02:00
31137f772b Remove empty gradient definitions in new theme
MSVC doesn't support
2018-06-27 20:21:23 +02:00
d3b814e9ec UI: tweak status bar layout to make it less jumpy.
Keymap on the left, messages and jobs in the middle, stats on the right.
2018-06-27 19:48:54 +02:00
0e304ca8f5 UI: some renaming for more clear/consistent cursor keymaps in status bar.
There's much more work to be done here, this is just fixing some obvious ones.
2018-06-27 19:04:04 +02:00
3504b27c50 Patch to fix shading continuity.
Added it as extension to harden. Tried out different methods to fix normals,
Though as with width and segments changes shape, orientation of new polys
a non-smooth method of fix was not possible. Current method aggregates
vertex normals into a smooth fan without affecting edge shading.
Still need to fix the crease at new vertex edges
2018-06-27 20:19:15 +05:30
f55f2db6bd Fix T55644: Multires ignores render subdivision when simplified
We did not tell proper render/viewport context to subsurf derived mesh
created for multires.
2018-06-27 16:35:06 +02:00
08b105654d Depsgraph: Move time dependency to animation of action
This way we guarantee that animation component on the datablock will
totally wait for action to be fully evaluated before attempting to
evaluate f-curves.

Fixes T55642: Inconsistent result on animated DoF file
2018-06-27 16:35:06 +02:00
3766b93853 Depsgraph: Add missing relation to pose init
Pose init initializes inversed object matrix, which means it does
need to have proper object transform.
2018-06-27 16:35:06 +02:00
05bcb2d5f5 Depsgraph: Fix missing relation from action to animation when it's shared 2018-06-27 16:35:06 +02:00
c3594f6469 UI: remove layout choosing menu from new window operator.
The handling of multiple window layouts within a workspace is intended to
be automatic now, this was a leftover from an earlier design.
2018-06-27 16:08:52 +02:00
fad585d6f4 UI: user fewer icons in File and Render menus.
Having an icon for nearly every menu entry can make it harder to scan.
2018-06-27 16:08:52 +02:00
eda770f884 Theme: set default theme 'Flatty Dark Blueberry'
The theme is now stored in generated C code,
which can be extracted from existing user preferences.

This theme can then be used for version patching themes
instead of duplicating values

Note that theme versioning has been removed,
since minor changes from now on won't apply well on top of 2.7x theme.

Theme colors from interface_widgets.c have been removed too.
2018-06-27 16:03:43 +02:00
66298a99e3 Theme: add 2.7x theme
Prepare for new default
2018-06-27 15:32:34 +02:00
3df82335dd Theme: Tweaks to console/text in Flatty Dark Blueberry 2018-06-27 15:04:37 +02:00
310796214f Workbench: Use different samples in AO per TAA iteration
Per iteration a different AO samples are used, so the final result is
less distorted. Will improve the quality of the image a lot when the
cavity option is turned on.
2018-06-27 14:36:01 +02:00
William Reynish
d48600fddc UI: Single-column layout for Lamp panel 2018-06-27 14:23:17 +02:00
20b8e1d8f1 Workbench: Added a quality slider for the viewport
Currently only attached to the Anti Aliasing of the solid mode of the
viewport. But eventually we could add other options here. Quality
setting can be found in the System tab of the userpref.

The slider goes from No Antialiasing (0.0 - 0.1) to FXAA (0.1 - 0.25) to
TAA8 (0.25 - 0.6) to TAA16 (0.6 - 0.8) to TAA32 (0.8 - 1.0)
2018-06-27 12:59:01 +02:00
cf2dcd57c0 Theme: Further polishing and unifying on Flatty Dark Blueberry
With feedback from @campbellbarton for better contrast in edit mode.
2018-06-27 12:20:25 +02:00
Dalai Felinto
a5ba97e58c mesh_navmesh.c removal
This was added back by mistake in a wrong merge
f1bc899146.
2018-06-27 11:40:30 +02:00
65128cde51 Cleanup: remove BKE's modifiers_bmesh.c, other DM removal/cleanup in BMesh code. 2018-06-27 10:59:52 +02:00
e878f1d00d Cleanup: nuke DM out of constraint code. 2018-06-27 10:37:57 +02:00
9c7a561883 Cleanup: remove some more DM usages... 2018-06-27 10:37:57 +02:00
c3544df207 CMake: fix linking blendont 2018-06-27 08:49:45 +02:00
6f2c9ea3e1 bf_gpu: Add GPU_state module.
This has wrappers for the most common gl* functions in the codebase, and is in preparation for D3502

Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D3501
2018-06-26 15:17:31 -06:00
a61480c271 Merge branch 'master' into blender2.8 2018-06-26 22:56:39 +02:00
532c8ac583 Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02:00
a3cd57ea8c Fix scrollbar operator showing in status bar cursor keymap. 2018-06-26 19:49:25 +02:00
e0b28306df Fix status bar wrong cursor keymap using wrong region in some cases. 2018-06-26 19:48:24 +02:00
df02675e21 UI: move modal operator text from headers to status bar.
Python API is context.workspace.status_text_set()
2018-06-26 19:45:55 +02:00
ecb56eac57 UI: Add/Update bad tooltips
Part of T51061
2018-06-26 12:29:11 -04:00
c817a89e73 Workbench: Wrong ENUM value for SINGLE color
Had to be "SINGLE", but was "SOLID" resulting in not showing the single
color option in the shader popover
2018-06-26 18:19:53 +02:00
6b0670951f Workbench: TAA quick fix for AMD cards
Seems to be that mix(a, b, 1.0) will not give you b. on nvidia this is
not a problem as a was initialized with 0.0, but on AMD it can be any
floating point number, resulting that mix(inf, b, 1.0) was still more to
inf than to b.
2018-06-26 18:14:19 +02:00
b4c01aca30 Merge branch 'master' into blender2.8 2018-06-26 17:42:33 +02:00
d5a42bce38 RigidBody: use runtime.mesh_orig instead of DEG_get_original_object 2018-06-26 17:39:17 +02:00
599e979d90 Fix bug in DNA_struct_elem_find when checking the first field
find_elem(olddata=NULL) doesn't work reliably for existence checks; it will
return NULL both when the field is found at offset 0 and when it is not
found at all.
2018-06-26 17:35:21 +02:00
0954085e1e Fix missing object/collection hiding icons on undo. 2018-06-26 17:17:05 +02:00
e69e62a90a UI: decrease status bar height. 2018-06-26 17:15:43 +02:00
cf8a059769 Workbench: Tempural Anti Aliasing
- FXAA is now also done in the workbench_forward engine.
- User can enable TAA8 in the userpref by setting their max
viewport AA to TAA8. FXAA will still be used when navigating
2018-06-26 16:35:47 +02:00
Dalai Felinto
c07f2bc891 Fix T55628: Crash when creating new material slots
We need to update the geometry when resizing the object material slots.
2018-06-26 16:00:04 +02:00
Vuk Gardašević
43d27095a3 UI: Make Mesh shading menu consistent with the other menus 2018-06-26 14:29:21 +02:00
William Reynish
25caedc4ba UI: Tweaks to Cycles Bake panel
-Correctly aligns bake options in the column
-Updated Metadata panel with right-aligned checkboxes for consistency
2018-06-26 14:17:02 +02:00
c1459a1e7f Fix T55630: update issue between Object and TexPaint modes.
Need to flush mesh DEG COW here, for some reason...
2018-06-26 12:36:38 +02:00
cdd915e9e9 UI: status bar cursor keymap display
Show mouse button actions in status bar, based on context,
modifiers and active tool.

See: T54861
2018-06-26 12:18:54 +02:00
4adf19e80b Icons: mouse buttons & drag
Monochrome icons from jendryzch
2018-06-26 12:15:39 +02:00
e17285a381 Tweak: Try to make the purpose of the collection/search fields clearer
Note: The labels in this panel are still WIP. There are probably clearer
names for some of these, including maybe even omitting some.
2018-06-26 21:44:14 +12:00
c0a8a29ae6 AnimEditors: Remove the toggles to enable name/collection-based filtering
Now the name/collection filters run when there's some text,
and don't run when the box is empty, thus reducing an extra
step that was needed before these options could be used.
2018-06-26 21:44:14 +12:00
5f545dbde8 AnimEditors UI: Move less frequently used filtering options to a "Filters" popovers
This commit is an experiment in using popovers as a place to house some
of the filtering options for animation editors, in line with what's taking
place in the Outliner with the filtering popover there too.

Right now, the most frequently used/changed options are still available
on the headers (i.e. the "Only Selected"/"Hidden"/search fields), while
everything else (i.e. the per-datablock filters, which were already hidden
behind a collapsed-toggle button before) now live in the popover.
2018-06-26 21:44:14 +12:00
c795505a2c Cleanup: dyntopo sculpt draw update: use same BM_face_as_array_vert_tri for indexbuf generation.
It's cleaner, and actually assert that BMFace is a triangle. Same code
as when generating vertexbuf for flat shading!
2018-06-26 11:43:17 +02:00
dad4703ec5 Fix T55320: Sculpt Mode with dyntopo and smooth shading drawing bug.
We have to discard the batch in smooth case, because we are modifying
the index buffer (flat shading don't need it, only changes vertex buffer
on redraw, which is safe).

Many thanks to @fclem for his help on debuging/understanding what was
wrong here!
2018-06-26 11:43:17 +02:00
42fde5d32b Fix memory leak when duplicating particles 2018-06-26 11:31:28 +02:00
a9ab0c1a7c Depsgraph: Tag relations for update when particle dupli-collection changes 2018-06-26 11:27:41 +02:00
Dalai Felinto
d6ac293bd4 Cleanup: comment 2018-06-26 11:07:29 +02:00
cfb50463be Free crash when freeing object caches from duplicator 2018-06-26 10:53:05 +02:00
Stefan Werner
73eb1bfd55 Revert "Turned off clang warnings in third party includes."
This reverts commit d53093953f.
2018-06-26 10:26:56 +02:00
ea339dc62c Merge branch 'master' into blender2.8 2018-06-26 09:34:13 +02:00
df237b964b PyAPI: add ImBuf.copy
DD348 by @kilon w/ edits.
2018-06-26 09:31:57 +02:00
a69f985f40 PyAPI: move deep-copy args check to py_capi_utils 2018-06-26 09:31:57 +02:00
e6825946d0 Cleanup: style, pep8 2018-06-26 08:45:13 +02:00
29182dd570 Cleanup: style 2018-06-26 08:35:35 +02:00
87f598fd3f Cycles: Fix wrong row count for World MIS CDF calculation 2018-06-26 05:35:30 +02:00
Stefan Werner
d53093953f Turned off clang warnings in third party includes.
The latest clang compiler (at least the one in Xcode 9.4.1) warns about the register keyword and macro expansions using defined().
Since these warnings come from third party code, we can't address them directly in Blender. Silencing them via #pramgas will
at least keep the warnings during a build down to the ones that are relevant to Blender code.
2018-06-25 23:02:01 +02:00
4aee554345 Fix crash with files saved with missing render slots. 2018-06-25 20:29:51 +02:00
9e88892f8f UI: Use background color for reports
At the moment it's using a hardcoded gray color that conflicts with
themes using gray for the header text. Instead use a slightly brighter
background color to make it stand, yet still use a theme setting.
2018-06-25 18:57:51 +02:00
25a223c3bd Draw: Use more proper particles index lookup 2018-06-25 18:22:27 +02:00
540b99bd28 Cycles: Free evaluated meshed when we are done with object 2018-06-25 17:28:46 +02:00
7cd86cd1fe Cycles: Fix memory leak with session
We didn't check for sync object being already allocated.
In fact, we simply need to use proper function to free
session.
2018-06-25 17:28:46 +02:00
c2110213ca Physics: update softbody and dynamic paint to get colliders from depsgraph.
Because looping over the scene is unsafe and slow.
2018-06-25 17:15:07 +02:00
2c9b32949b Cleanup: refactor depsgraph physics API functions. 2018-06-25 17:15:07 +02:00
William Reynish
26251282e0 UI: Single-column layout for Force Fields and Particles
Force Fields and Falloff are now simpler and more compact
by removing unnecesary labels (there was a text label just for one option)

Particle Force Fields Falloff is now a sub-panel of each effector type,
rather than just as a section with label.
2018-06-25 17:04:40 +02:00
William Reynish
51e077c5c0 UI: Single-column layout for View Layer, passes and World 2018-06-25 17:02:50 +02:00
William Reynish
153195da22 UI: Single-column layout for Texture Color 2018-06-25 17:01:54 +02:00
William Reynish
5ddba52029 UI: Single-column layout for Shape Keys and Geometry Data 2018-06-25 17:00:00 +02:00
eefe878660 Fix T55360: marker-based Camera switch focal length bug.
Scene was missing DEG tag update when its camera was changed based on
active 'camera marker'.
2018-06-25 16:21:24 +02:00
476b4c415c Fix T55493: Sculpting on smooth shaded bug.
Undo was not tagging PBVH to update normals too...
2018-06-25 14:15:08 +02:00
38d6e82d1a Fix use of non-evaluated collision and effector objects.
Only enabled objects in the view layer should be used, while temporarily
hidden objects should still have an effect.
2018-06-25 14:11:55 +02:00
817bf582c2 Cleanup: rename object base flags to be more clear. 2018-06-25 14:09:17 +02:00
a99dcab148 Depsgraph: cache collision relations, for performance and stability.
Same reasoning as effector relations in earlier commit.
2018-06-25 13:35:41 +02:00
5b3ff9f7d8 Cleanup: Move colorband handling from DM to mesh_runtime universe. 2018-06-25 13:04:24 +02:00
e10eb5bcb8 UI: In user preferences group Developers Extra and Python Tooltips
Move Navigation Manipulator toggle next to Mini Axis as they are related
(and in the future merged into one pulldown) and rename Manipulator
to "Transform Manipulator" to make it clear they're different kinds
of manipulators. Also move to the first column next to other viewport settings.
2018-06-25 12:58:28 +02:00
e97237892c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/sculpt_paint/paint_image.c
	source/blender/editors/space_view3d/view3d_draw.c
	source/blender/editors/space_view3d/view3d_view.c
	source/blender/gpu/GPU_draw.h
	source/blender/gpu/GPU_material.h
	source/blender/gpu/intern/gpu_draw.c
	source/blender/gpu/intern/gpu_material.c
	source/blender/makesrna/intern/rna_userdef.c
	source/blender/windowmanager/intern/wm_files_link.c
	source/blender/windowmanager/intern/wm_init_exit.c
	source/creator/creator_args.c
	source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
	source/gameengine/Ketsji/KX_PythonInit.cpp
	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
2018-06-25 12:50:32 +02:00
cdee53edfc Cycles: Cleanup, indentation 2018-06-25 12:39:44 +02:00
8a7f317666 Cleanup: Nuke most of G.main from GPU code. 2018-06-25 12:32:48 +02:00
Dalai Felinto
0145daa09b Outliner: Make search always work
This was a flag in early 2.8 to allow users to hide the entire search prop.
Now since we want it fully expanded at all times, it makes no more sense.
2018-06-25 12:15:12 +02:00
861b0ec417 UI: Right align check-box for extra text space
See: T54951
2018-06-25 12:06:51 +02:00
29c1069244 Cleanup: code style 2018-06-25 12:06:51 +02:00
f33cb522dd Cleanup: Few more validation of G_MAIN usages... 2018-06-25 12:02:20 +02:00
7a4d5b78ea Depsgraph: Add missing nodes and relations for speaker 2018-06-25 11:54:12 +02:00
c448c0a67f RigidBody: Replaced 'if' with 'switch' 2018-06-25 11:24:55 +02:00
eb56ca3119 Rigid body: compute looptris on original mesh instead of CoW copy 2018-06-25 11:20:06 +02:00
Dalai Felinto
1099ac1ed9 Silence warning for release builds 2018-06-25 11:02:19 +02:00
e8a1b4d645 Change bitmap to GHash in bevel_harden_normals_mode 2018-06-25 13:47:46 +05:30
d864332085 Merge branch 'master' into blender2.8 2018-06-25 09:48:10 +02:00
b09387c388 Add back header needed win32 2018-06-25 09:46:03 +02:00
d32e4ca701 Merge branch 'master' into blender2.8 2018-06-25 07:43:51 +02:00
f3b9fa5393 CMake: correct remove_strict_cxx_flags_file
Was still using C-flags.
2018-06-25 07:30:00 +02:00
a5b7f1ef53 UI: internal changes to user-menu storage
- Use per context menu lists to support menu editing.
- Support for different kinds of menu items since this may be needed
  in the future. Only use operator types for now.
2018-06-24 20:06:30 +02:00
a59d7374ea Nuke DM out of collada code.
Also, now use out-of-main temp copy of mesh for export, and fixed a
potential memleak (return without freeing temp copy of mesh, tsst).
2018-06-24 18:40:52 +02:00
d0856d1d54 Fix most of 'disappearing' first letter in right-aligned labels.
BLF' blf_font_width_to_strlen() could easily generate strings with up to
nearly two pixels length over requested limit!

Note that the fiddling between floats and ints values make things really
confusing here... :/

There is still a few limit cases where, even though computed str length
is now always below reauested limit, we still get first letter
disappearing, no idea why currently.
2018-06-24 17:51:13 +02:00
6454319033 Lamps: Make default size more usable
This way the area light shapes are more visible (and usable) by default.

Changes were discussed with @venomgfx
2018-06-24 15:03:10 +02:00
a9bc880cf8 Object Mode: Add Shape visual for spot and point lamps
Since Eevee and Cycles both use lamp size for point lamps, displaying
the shape is now more relevant than before.
2018-06-24 15:03:10 +02:00
574c716f2d Cycles: change AO node color default to 1.0. 2018-06-24 12:24:30 +02:00
8f85cf033c Merge branch 'master' into blender2.8 2018-06-24 11:08:14 +02:00
e61bbc00b7 Cleanup: move UI context menus into own file 2018-06-24 10:43:09 +02:00
a3cb9c8238 Wireframe Overlay: Add back the per edge hiding
This method is a bit more optimized than the very first one
because it does not rely on the adjacent faces properties.

That said it's still a bit slower than the per vertex method.
2018-06-24 00:01:02 +02:00
12bd80fefd Eevee: Fix wrong depth test in main shading pass. 2018-06-23 21:26:21 +02:00
acb94b6c78 Typo in last commit 2018-06-23 20:57:09 +02:00
85c1e61375 UI: Add user defined context menu
- Add/Remove from RMB context menu.
- Stored in user preferences.
- Access from Q key.

See T55027.
2018-06-23 20:52:47 +02:00
2fa231a86b Ghost: Fix F12 render on windows.
createOffscreenContext left the new context bound to the calling thread
causing a race condition with the background thread doing the actual
rendering. see T55555 for a more detailed description of the problem.

this patch changes the behavior of createOffscreenContext to restore the
context to the calling context.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D3499
2018-06-23 11:37:35 -06:00
4ddb03ba79 Keymap: Add F3 key back for search
Keeping tilder, adding back F3 since some platforms
still don't have hardware scan-codes for tilder key on non-US keyboards.
2018-06-23 16:25:29 +02:00
6328214ec8 Manipulator: fix issue refreshing transform tool
Changing manipulator types failed.
2018-06-23 15:02:27 +02:00
43872124f7 Merge branch 'master' into blender2.8 2018-06-23 10:46:09 +02:00
f8a3636374 UI: alternate fix for empty context menu
block and layout could be NULL and checking this everywhere
wasn't practical.

Instead of lazy initializing, add UI_popup_menu_end_or_cancel
which cancels empty popup menus.
2018-06-23 10:31:10 +02:00
0511cded25 UI: naming of cursor options 2018-06-23 09:46:18 +02:00
575c71b670 Blenfont: Fix texture not being initialized in recent refactor.
Caused some gpus to have issues with the font shadows.

thanks @fclem for helping tracking this one down.
2018-06-22 14:35:32 -06:00
1757b38179 Added UI for harden normals and normal control in bevel modifier 2018-06-23 01:46:42 +05:30
0f66fe5732 Fix normal shading continuity for in-plane bevels 2018-06-22 23:22:44 +05:30
2d7606daa5 Missed last commit 2018-06-22 19:25:38 +02:00
a997b5d17b Tool System: transform can now toggle loc/rot/scale 2018-06-22 19:23:27 +02:00
cc4dc2dce2 Depsgraph: cache effector relations, for performance and stability.
To find all effectors in the scene, we need to loop over all objects.
Doing this during depsgraph evaluation caused crashes because not all
objects are guaranteed to be evaluated yet.

To fix this, we now cache the relations as part of the dependency graph
build. As a bonus this also makes evaluation faster for big scenes,
since looping over all objects for each particle system is slow.

Fixes T55156.
2018-06-22 17:57:22 +02:00
79615c5adb Cleanup: nuke (nearly) all remaining usages of DM from RNA.
Only case remaining is a nasty ccgdm/opensubdiv update case, TBD once
subsurf case is addressed.
2018-06-22 17:55:48 +02:00
122e0105e2 Port DM_debug stuf to BKE_mesh_runtime. 2018-06-22 17:55:48 +02:00
8286cc8cd4 Fix crash reading toolsettings 2018-06-22 17:22:06 +02:00
bf0dc7ee19 Cleanup: use standard BKE_object_free_derived_caches in BKE_mesh_to_curve.
...Instead of doing own dirty/risky version of the same thing!
2018-06-22 16:59:38 +02:00
b1e86ff385 Cleanup: misc DrivedMesh stuff. 2018-06-22 16:59:38 +02:00
befd87ac62 StudioLights: API
- get spherical harmonics coefficients
2018-06-22 16:23:30 +02:00
6bfc961424 Cleanup: Moar DM busting from editor code area. 2018-06-22 16:10:29 +02:00
ccbe3bdd08 Cleanup: nuke another DM usage in paint code. 2018-06-22 16:03:16 +02:00
f51661fb66 Cleanup: useless BKE_cdderivedmesh includes... 2018-06-22 15:52:14 +02:00
c850fcc2c0 Modifiers: port shapekey modifier, some cleanup. 2018-06-22 15:45:46 +02:00
97c99fb034 Modifiers: port UV_unwarp from DM to Mesh.
Pretty trivial...
2018-06-22 15:32:41 +02:00
48e70ab848 Add depth and orientation options to 3D cursor tool 2018-06-22 15:23:56 +02:00
3c828c29b3 Cleanup: unused value 2018-06-22 15:23:56 +02:00
888fb065a4 Modifiers: Remove remaining parts of md->scene 2018-06-22 15:12:03 +02:00
a7ca8fe1dd Modifiers: Remove lots of usages of md->scene 2018-06-22 15:12:03 +02:00
7a4b784909 Subsurf: Move away from using scene from modifier data 2018-06-22 15:12:03 +02:00
fffe34531d Cloth: Move away from scene stored in cloth modifier data 2018-06-22 15:12:03 +02:00
c2fa82e7a4 Multires: Move away from using scene from modifier data 2018-06-22 15:12:03 +02:00
dfca352294 StudioLight: Better API
In stead of a single refresh function that re-init the whole system. The
API now supports adding and removing. Which will be much faster and less
flickering of missing icons when adding/removing lights
2018-06-22 14:49:49 +02:00
f4d6e66b25 Merge branch 'master' into blender2.8 2018-06-22 14:42:25 +02:00
6cd0484de8 CMake: Make language explicit for per-file strict flags removal 2018-06-22 14:40:00 +02:00
ec27776d8e CMake: Cleanup, add_cc_flag -> add_c_flag 2018-06-22 14:29:13 +02:00
38247fc80b CMake: Cleanup, rename CC_REMOVE_STRICT_FLAGS to C_REMOVE_STRICT_FLAGS 2018-06-22 14:25:42 +02:00
0d7e758c91 CMake: Tweaks to removal of strict flags
Silences the following strict flags from external libraries:

- -Wclass-memaccess
- -Wswitch
- -Wtype-limits
- -Wint-in-bool-context

Needed to tweak macro a bit, since the old logic was wrong:
we can not use CXX flags for C compiler, need way more strict
separation between what goes where.
2018-06-22 14:25:42 +02:00
6528310543 Cleanup: move cursor rotation into own function 2018-06-22 13:59:56 +02:00
Dalai Felinto
f4f6e5b665 Outliner: Aggregate ID types and object types together with numbers
We draw small numbers over the icon of multiple objects of the same type.
Also, we make all inlined elements to be non-clickabled.

For modifiers we still do it the old way. In this case it is more important
to see the order then the ammount.

Reviewers: brecht, campbellbarton
Subscribers: billreynish, venomgfx

Design task and mockup: T54707
Differential Revision: https://developer.blender.org/D3497
2018-06-22 13:57:04 +02:00
42344adcd4 Update theme Flatty Dark Blueberry 2018-06-22 13:45:36 +02:00
0b9cd0c88d Merge branch 'master' into blender2.8 2018-06-22 12:58:29 +02:00
a5f046f449 Cleanup: rename 3D cursor calculation vars 2018-06-22 12:55:15 +02:00
88158e4116 Cleanup: 2.8-new G.main in RNA code.
Again, essentially validating them, and adding assert check if needed.
2018-06-22 12:50:26 +02:00
646412004b Merge branch 'master' into blender2.8
Conflicts:
	source/blender/makesrna/intern/rna_image.c
	source/blender/makesrna/intern/rna_object.c
	source/blender/makesrna/intern/rna_object_force.c
	source/blender/makesrna/intern/rna_screen.c
	source/blender/makesrna/intern/rna_sculpt_paint.c
	source/blender/makesrna/intern/rna_space.c
	source/blender/python/bmesh/bmesh_py_types.c
	source/blender/python/generic/bpy_internal_import.h
	source/blender/python/intern/bpy_rna_anim.c
	source/blender/python/intern/gpu_offscreen.c
2018-06-22 12:46:16 +02:00
b6b7c83dd8 StudioLight: Only apply windowing when SH level is 2
It does not make much sense for the other levels
2018-06-22 12:37:03 +02:00
2fe528424d Cleanup: remove last G.main from RNA.
Again, we cannot actually get rid of G_MAIN global access here, so in
most case just 'marked' them as valid, and added assert checks to ensure
we do only work with IDs in G_MAIN in those cases.
2018-06-22 12:35:41 +02:00
0427eca2a6 StudioLight: remove caches when removing studiolight
Cache files were not deleted and when uploading a new file with the same
name resulted in using the old cache file.
2018-06-22 12:31:20 +02:00
e402c36388 Studiolight: Spherical Harmonics Windowing
Apply Windowing on the Spherical Harmonics result. This would lead to
better results.
2018-06-22 12:31:19 +02:00
101fd7ec06 Tweak new BKE_id_is_in_global_main to accept NULL pointer (and consider them as valid). 2018-06-22 12:26:45 +02:00
bcdec63570 Fix harmless use of unintialized memory
Still nbice to avoid such access to keep valgrind output more sane.
2018-06-22 12:08:18 +02:00
e6e2e9c246 Cleanup, spelling 2018-06-22 12:08:18 +02:00
9921e10583 Math: Set matrix to zero when inversion fails
Avoids usage of uninitialized memory when inversion fails.

That uninitialized memory can cause object to become visible when
it is supposed not to or other artifacts like that.

Longer term solution would be to check every instance of invert_m#
function and to explicit fallback when needed (possibly, using
extra utility functions).
2018-06-22 12:08:18 +02:00
cbf5c738d6 Cleanup: get rid of last G.main's in bpy area.
Essentially 'validating' them as G_MAIN, and adding some asserts in
dubious places, that handled IDs are actually in G_MAIN.
2018-06-22 11:37:47 +02:00
1870a1adc7 BKE_library: Add func to check an ID is actually in G_MAIN database. 2018-06-22 11:37:08 +02:00
f3501a00e2 PaintMode: Full Shading Boolean => Slider
There was a Full Shading bool that was shared across the WP, VP and TP
modes. This commit makes some changes:

- Replace the bool with a factor. This gives the user more control on
the visibility.
- Also draw it on top of the Material and Rendered mode so the user can
control what he needs. In certain cases you don't want to see the final
rendered material, but the actual texture.
- Removed the skipping of objects when in paint modes. As now the paint
modes are blended.
2018-06-22 10:43:03 +02:00
c517778a8b Cleanup: style 2018-06-22 08:18:02 +02:00
61bed8768d Cleanup: suppress assert in recent GPU refactor 2018-06-22 08:11:17 +02:00
2e80279a75 Fix T55547: "Fit camera to selected" fails 2018-06-22 07:55:49 +02:00
84ae0fe3a5 GLRefactor: Refactor bf_blenfont to use GPUTexture instead of raw GL calls and types.
In an effort to centralize all opengl calls in the codebase, this patch replaces
the raw opengl calls in bf_blenfont with GPUTexture so it's no longer depended
on opengl headers.

reviewer: Brecht

Differential Revision: https://developer.blender.org/D3483
2018-06-21 18:36:05 -06:00
a0dce6810d Edit Mode: Bevel Op: Offset Soft Max to 100
This is consistent with the modifier
2018-06-21 13:46:11 -04:00
4f83fd4cf8 Merge branch 'master' into blender2.8 2018-06-21 19:29:22 +02:00
68f4a4641e Fix T55568: second click event ignored 2018-06-21 19:26:21 +02:00
51f6b25afd Revert "Fix T55568: second click event ignored"
This reverts commit 52aa963f0e.

Fixed for keyboards, broke mouse buttons.
2018-06-21 19:24:53 +02:00
c111eb0e99 Cleanup: get rid of dual DM/Mesh versions of mirror topology code.
Easy to switch to only use (evaluated) mesh instead!
2018-06-21 19:05:10 +02:00
d6eac9d787 Cleanup: ED_mesh_pick_vert: DM -> me_eval. 2018-06-21 18:38:37 +02:00
31d916210c Cleanup: remove DM from 'join as shape' operator.
Also deduplicated the 'mesh as shapekey' code, we had kind of two funcs
doing the same thing here...
2018-06-21 18:26:12 +02:00
6046d9f715 Fix own error making outliner rename not emboss 2018-06-21 18:15:17 +02:00
6427141f7b Modifiers: Stop using md->scene in isDisabled() callback
This is first commit in series of changes to get rid of md->scene.
2018-06-21 18:04:05 +02:00
991d4f1c6b Fix incorrect use of G.is_rendering for particles in some places. 2018-06-21 17:08:42 +02:00
318ad705ad Cleanup: nuke useless BKE_DerivedMesh.h includes. 2018-06-21 16:45:54 +02:00
78653cfb8c Merge branch 'master' into blender2.8 2018-06-21 16:43:39 +02:00
84dbf949d7 UI: don't show empty button context menu 2018-06-21 16:37:19 +02:00
c45a3b80e2 Fix T55555: Crash when select material properties
This error is only in Windows and Mac when select in properties the material tab.

This commit revert dc856be839 Preview: Add own opengl context to render preview images.
2018-06-21 16:11:29 +02:00
b350edc207 Depsgraph: Add missing relation from proxy group
Transform evaluation does depend on that matrix, but relation was never
in dependency graph. It was not even in the old dependency graph, which
makes me wonder how this thing worked reliably to begin with.

Should fix flickering issue in the render farm.
2018-06-21 15:57:24 +02:00
a0f1bd8ed1 Depsgraph: Re-hook duplicgroup relation to final transform operation
Transform evaluation doesn't not depend on objects which are being duplicated,
so should not be any regressions here.

The whole relation should probably be gone as it's kind of rooting back to
legacy times, but that would need more clear research and investigation and
regression testing.
2018-06-21 15:57:24 +02:00
ad42c358f8 Depsgraph: Walk into dupli_group object
That will help with cases when dupli_group object is not linked
directly to the scene.
2018-06-21 15:57:24 +02:00
b80cce2053 Cleanup: names: data transfer/mesh remap: dm -> me/mesh.
That area is now officially purged from the Devil.. errr... DerivedMesh!
2018-06-21 15:33:10 +02:00
ef90a8e12c Cleanup: data transfer: get rid of dual destination mesh.
Not needed anymore, we only actually need to know wether it's orig mesh
or eval one in a few places...
2018-06-21 15:33:10 +02:00
1859215576 Cleanup: some potentially critical changes in data transfer.
Removing that stuff should be valid with new depsgraph/modifiers stack
evaluation system... BUT it might not be, so rather have those in
separate own well-isolated commit.
2018-06-21 15:33:10 +02:00
fffff5a993 Cleanup: nuke DM out of data transfer code.
This was actually rather hairy, this code is huge and complicated, easy
to make mistakes...

Good thing is, it will allow for significant simplification and more
(name) cleanup in following commits ;)
2018-06-21 15:33:10 +02:00
cd6cb55ff3 Fix Cycles incorrect versioning for automatic sample world resolution. 2018-06-21 15:28:59 +02:00
4904eadc0f Fix T55525: "Only Keyframes from Selected Channels" option in Timeline was being ignored
I was originally going to just expose the filtering options fo the timeline
too (via popover), to provide full access to the filtering options here too.
However, investigating further, that would've caused problems when trying to
use the Next/Prev Keyframe operators in other editors (see comment in code).
For now, the simpler solution is to just sync the scene-level flag (used for
this option) back to the dopesheet settings (used for generating the summary
channel used for displaying keyframes), to buy some time to investigate more
carefully.
2018-06-22 01:26:06 +12:00
526392ab16 Workbench: Remove warning
When in forward rendering and Object outline was disabled every render
call created one console warning (uniform objectId not found)

this commit removes this warning
2018-06-21 15:17:05 +02:00
8534ce9384 Revert "Objects: when active object gets hidden, make it inactive."
This reverts commit fec97ec949, it's useful to be able to edit object
properties for hidden objects. The issue with mode locking that this
was meant to solve will be handled in another way.
2018-06-21 15:04:33 +02:00
c054a1a848 Merge branch 'master' into blender2.8 2018-06-21 15:02:38 +02:00
d5552a6d4b T55570: Moved Texture drawtype as to shading popover
the use of the texture drawtype is limited. so who should we have it
this prominent on the screen. By adding it as a shading.color_type
option we should save some screenspace.
2018-06-21 14:58:00 +02:00
a4f08297ed UI: preference for developer extras
Currently only used for "Edit Source" feature.
2018-06-21 14:54:21 +02:00
52aa963f0e Fix T55568: second click event ignored
Double-click handling caused the second click to be ignored
for keymaps that only handle click.
2018-06-21 14:04:43 +02:00
3584810fdd Python/BLF: add blf.color(r, g, b, a) method.
This is needed now that glColor() no longer works.
2018-06-21 13:37:02 +02:00
8d1ea6a767 Fix T55573: Mode rotate on local axis crashes 2018-06-21 12:53:58 +02:00
William Reynish
244cb8410e UI: Single column for Rigid Body World 2018-06-21 12:41:01 +02:00
a283333cd8 Fix Cycles CUDA render errors with CUDA 9.2.
Work around what might be a compiler bug.
2018-06-21 12:32:32 +02:00
d6313f47af Fix T55564: Cycles OpenCL build error on some scenes. 2018-06-21 11:46:52 +02:00
9b91e727be Merge branch 'master' into blender2.8 2018-06-21 11:10:37 +02:00
b681461c84 Fix T55568: second click event ignored
Double-click handling caused the second click to be ignored
for keymaps that only handle click.
2018-06-21 11:07:52 +02:00
66263905ae Merge branch 'master' into blender2.8 2018-06-21 10:32:16 +02:00
f1bc9331b1 Fix T55491: Double click fail in menu popups 2018-06-21 10:07:18 +02:00
3995b33a42 WM: don't make LMB a special case for double click 2018-06-21 09:49:30 +02:00
00d52376f7 CodeStyle: Comments 2018-06-21 09:22:34 +02:00
e60d4d6a0c Code cleanup: Added newline 2018-06-21 09:05:31 +02:00
54c4a107b1 Missed warning is previous commit 2018-06-21 09:04:03 +02:00
032c741214 Studiolight: Calculation of irradiance buffer
The calculation of the irradiance buffer was slow. Now it is only
calculated when it is being used (background_alpha > 0.0)
this solves the freeze when switching to LookDev mode.

Also changed the default calculation to use the Spherical Harmonics
calculation. This is able to generate the irradiance buffer fast, but is
less accurate. As the irradiance buffer is only used for visual
guidance speed is more important than accuracy.

Added compile directive to switch between the implementations.
(see STUDIOLIGHT_IRRADIANCE_METHOD)

Disabled caching the irradiance buffer when
STUDIOLIGHT_IRRADIANCE_METHOD_SPHERICAL_HARMONICS is used as it is not
needed.
2018-06-21 09:02:12 +02:00
636a690eb1 Fix: Ensure that summary channel is enabled when creating timeline 2018-06-21 17:56:11 +12:00
b081436d1c Graph Editor: Changing the display mode to "Drivers" mode now runs the Drivers-Editor UI setup code
This is a step towards being able to just choose the "Drivers Editor"
from the editor selector, and have everything displayed, ready to use.

Currently there are a few problems to resolve still:
1) This update callback doesn't run when changing the mode via the
   editors selector in the UI. (Note: This problem also affects the
   Timeline vs Dopesheet, causing a lot of initialisation work to be
   skipped)

2) There's some missing redraw/refresh here to cause the properties
   region to actually show. You need to resize the window for that to
   happen now.
2018-06-21 17:15:45 +12:00
876c73c9af Cleanup: Move logic for initialising a new Drivers editor into its own function
This shouldn't really be part of the windowmanager code. Pulling it out
now, so that we can reuse in RNA when switching display modes,
(and perhaps other places later)
2018-06-21 16:58:14 +12:00
3777918e5c Remove debug prints 2018-06-21 16:08:52 +12:00
417856dae5 Fix: Incorrect submodes being set in Dopesheet/Action Editor when changing modes
This commit fixes a number of problematic corner cases when switching between
editors after 2b5050a4cd

The root cause of these issues was that mode_prev was not being set in
many cases, resulting in mode changes to the Timeline and back (via other
editors) causing Dopesheet Editors to reset back to "Action Editor" mode.

1) Creating new Dopesheet Editors (e.g. change the default 3D view to
   a Dopesheet editor) would default to displaying the "Action Editor",
   since mode/mode_prev == 0 represents the "Action Editor" (for backwards
   compatability reasons), while mode == 3 is for the "Dopesheet"

2) If you set the Dopesheet Editor to another mode (e.g. "Grease Pencil" mode),
   change to another editor (e.g. Shaders), then come back, the mode would
   get reset to "Action Editor".
2018-06-21 16:07:47 +12:00
ed428b2c04 UI: Use Collection icon for New Collection in Outliner
Also temporarily bring back the toggle to search, since it's off by default.
2018-06-21 01:01:02 +02:00
f3bd5da7fc UI: button to create new collection in the Outliner
Expose search like in 2.7, we could make it pop on Ctrl+F to save space if needed.
Align Filter and the less used View menu to the right.

Based on mockups and feedback session with William
2018-06-21 00:37:57 +02:00
0b7edf105d UI: Icons for Outliner display modes
We need a better icon for Orphan Data
2018-06-21 00:32:56 +02:00
4cfc54a5cb UI: adjust menu triangle
Was not centered for single icon buttons.
2018-06-20 21:34:27 +02:00
8d00d6d0bf UI: rename "NLA Editor" -> "Nonlinear Animation"
See: T54744
2018-06-20 20:16:47 +02:00
2b5050a4cd UI: expose Timeline as a space type
See: T54744
2018-06-20 20:11:41 +02:00
c73a6b0d42 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-20 22:29:44 +05:30
6991b477d7 UI: expose Driver as a space type
See: T54744
2018-06-20 18:46:48 +02:00
Dalai Felinto
2e66e5faca Silence warning in greasepencil-object branch
We don't have warnings in 2.8 because of include order.
But headers shouldn't depend on that for warnings, really.
2018-06-20 18:44:17 +02:00
7d3589e660 Cleanup: pep8, single quotes for enums 2018-06-20 18:22:52 +02:00
40e1e8ebed Despgraph: don't tag for transform/geometry update on relations rebuild.
This should already be happening elsewhere and was causing depsgraph
rebuild to be slower than it should.
2018-06-20 18:12:48 +02:00
e1dff01e29 Depsgraph: add some missing depsgraph tags when relations change. 2018-06-20 18:12:48 +02:00
0d0d8935a5 Fix outliner mixed collection/object visibility drag toggle not working. 2018-06-20 18:12:48 +02:00
73d0a3f142 Fix hide object operator to do nothing if no object is selected. 2018-06-20 18:12:48 +02:00
82dc5f91e8 UI: Style locks in Object Transform panel 2018-06-20 17:01:40 +02:00
54a0247f59 Cleanup: whitespace 2018-06-20 16:42:19 +02:00
William Reynish
b998ccefee UI: Single column, flow and sub-panel for collision physics 2018-06-20 16:34:27 +02:00
ab9e2dccd3 Cleanup: follow naming conventions
Using panels for presets printed warnings for classes named as menus.
2018-06-20 16:32:31 +02:00
1ccd70b7c1 Icons: update generation script 2018-06-20 16:15:58 +02:00
William Reynish
00fd2b57d1 UI: Single column layout for Force Fields 2018-06-20 16:11:18 +02:00
William Reynish
a8e132768a UI: Dynamic Paint panels into sub-panels 2018-06-20 16:11:18 +02:00
a3428131b6 Studiolight: Spherical harmonics
Compile time option to reduce the level of the SH
2018-06-20 16:08:11 +02:00
3414a16705 Merge branch 'master' into blender2.8 2018-06-20 16:01:30 +02:00
d312dbea2d Cleanup: naming (make it clear vars are squared) 2018-06-20 15:58:46 +02:00
e6609deba2 Merge branch 'master' into blender2.8 2018-06-20 15:50:54 +02:00
12e926781a Merge branch 'master' into blender2.8 2018-06-20 15:40:14 +02:00
372754c164 Screen: split ED_area_actionzone_find_xy
Add ED_area_actionzone_refresh_xy which can tag redraw
find no longer changes changes to the action zone.
2018-06-20 15:34:20 +02:00
5cad6afac6 Cleanup: rename is_in_area_actionzone 2018-06-20 15:34:20 +02:00
daaf315bf2 Cleanup: quiet warning 2018-06-20 15:34:20 +02:00
3df5625ae7 Cleanup: remove some useless Derivedmesh struct declarations. 2018-06-20 15:17:35 +02:00
b13585e782 Cleanup: remove last DM usages from datatransfer code. 2018-06-20 15:17:35 +02:00
0fb1093b14 Studiolight: fixed diffuse lighting
- Orientation of the cubemap were not conform cycles and eevee
- one side of the cubemap was flipped, so one side was overlit and the
other side was to dark.
2018-06-20 15:00:23 +02:00
c6ab911744 Merge branch 'master' into blender2.8 2018-06-20 14:16:22 +02:00
984a78e763 Fix crash opening some files, after recent changes. 2018-06-20 13:42:23 +02:00
4234cddda9 Objects: support for hiding all objects in a collection.
In the outliner there are now icons for it, Ctrl+Click isolates a
single collections.

In the 3D view, Ctrl+H key opens a menu that is more or less the
equivalent of the old layer buttons in the header. Regular Click isolates
the collection, Shift+Click toggle the collection visibility. Pressing
number keys and letters works in this menu, which can help for quickly
selecting a specific collection.

Shortcuts for quick switching by just pressing 1/2/3/.. keys are available
again. The order can be confusing with nested collections, but that seems
unavoidable. The first numbers control the top level collections, and then
sub collections if numbers are left.

Remaining design issues:

* The 3D view menu needs to be improved: support for sub collections,
  staying open on shift+click, access from the 3D view header somewhere,
  shortcut key display.
* Currently collection hiding just controls per-object hiding, we plan
  to separate this state still so alt+H doesn't affect collection hiding.
2018-06-20 13:04:51 +02:00
5e968a996a Objects: restore per object restrict view/render/select.
Note this is now separate from H key hiding, and meant for more persistent
ways to define which objects are relevant to the viewport or render.

This avoids some cases where you'd have to create collection specifically
to hide objects for viewport/render.
2018-06-20 12:35:25 +02:00
0619f960c2 Objects: restore H key per object hiding.
H hides selected objects, Shift+H hides unselected objects, and Alt+H
reveals hidden objects.

This hiding state is distinct from restrict viewport and render, and
meant for temporarily hiding objects without affecting more persistent
collection hiding.

Object hiding is per view-layer, same as selection. It affects the
viewport and any preview renders in there, but not final renders.

In the outliner, different icons are now used for temporary hiding, and
restrict viewport and render. Hidden objects are greyed out.

Remaining design issues:

* For lamps we probably still want to keep their effect on the scene,
  currently they are fully disabled by hiding. Arguably mesh lights or
  even objects being reflected or casting shadows are not that different
  but perhaps the special lamp exception from local view should remain.
* We need a feature still to disabled this hiding for specific viewports,
  for render or animation preview where you want to see the entire scene
  while working in another view.
* We need a new icon for restrict viewport, for now it uses a grid similar
  to the 2.4 icon.
* Hiding objects does not preserve selection state as it did in 2.7,
  it's probably convenient to support this again?
2018-06-20 12:35:25 +02:00
c17ba4a903 T55550: Workbench Shadows are incorrect in first draw cycle
Shadows uses the old location for light_direction. Maybe a merge
conflict.
2018-06-20 12:29:09 +02:00
fd48e685c3 Cleanup: remove some G.main from BKE's node.c
Validate some cases using G_MAIN instead (I don't think we want to work
on any other Main than G.main one when registering/unregistering nodes
etc.).

And when freeing, all ID not in Main shall now be tagged accordingly, so
we *should* not need to do that stupi search over all ntrees in G.main
to check wether we have to free it ourself or not!
2018-06-20 12:27:26 +02:00
84c2ef0eaf UI: Use chevrons for number sliders, pulldowns and popovers
In the future popovers/pulldowns should have different indicators

Patch by William Reynish and Clement Foucault
2018-06-20 12:24:24 +02:00
20788e1747 Cleanup: moar G.main removal.
Nice trick from blender2.8, we now can get active scene from active
window of windowmanager!
2018-06-20 11:53:30 +02:00
edb80a801d Fix crash activating the HUD w/o an active region 2018-06-20 11:43:10 +02:00
8b673fc75f Cleanup: get rid of last non-thread-safe BLI_frand random generator func. 2018-06-20 11:30:25 +02:00
d97ee0b06a Cleanup: get rid of last BLI_frand usage. 2018-06-20 11:30:25 +02:00
1b2a2e0862 Cleanup: use new BKE_mesh_iterator foreach_mapped helpers in WPaint gradient code. 2018-06-20 11:30:25 +02:00
f58fa57b83 UI: fix "Edit Source" operator 2018-06-20 11:13:07 +02:00
6d21450a61 Revert "UI: fix "Edit Source" operator"
This reverts commit 109dbab593.

Accidental changes applied
2018-06-20 11:12:18 +02:00
109dbab593 UI: fix "Edit Source" operator 2018-06-20 11:10:08 +02:00
b661a4d663 Merge branch 'master' into blender2.8 2018-06-20 11:09:07 +02:00
8763a8fd4b Particle edit: Fix missing hair in edit mode for new particle systems
Need to get away from thosae update flags in original datablocks.
2018-06-20 11:05:52 +02:00
d4519f54b3 UI: only show "Edit Translations" when addon used 2018-06-20 10:45:03 +02:00
570f3e6719 Object Mode: enable mode locking by default
This is meant to be default behavior for 2.8, see T55246
2018-06-20 10:18:53 +02:00
df2d05b203 Outliner: add object mode switching to RMB menu 2018-06-20 10:14:04 +02:00
9f9756ec35 Cleanup: strip space 2018-06-20 10:14:04 +02:00
8b9712faeb Fix T55540 Add foreachMappedXXX equivalent API for evaluated meshes 2018-06-20 10:03:50 +02:00
e3052ecb0d Studiolight: removed raise condition
Happened when deleting many studiolights at the same time when the
previews were still beging calculated in the background.

Added a free function callback that is filled when the preview is being
generated. This free function will then kill the preview job

This patch also removes icons that are not valid anymore so the user
cannot accidentally render an icon where the studiolight is invalid.

In the end we should use a add/remove function in the studiolight as
currently icons are recalculated too much.
2018-06-20 09:29:40 +02:00
91c0f17a47 Missed last commit 2018-06-20 07:27:35 +02:00
dc13e0d7dc Cleanup: default emboss=off for outliner buttons
Also use use braces for code blocks and reduce right-shift.
2018-06-20 07:14:19 +02:00
d44c40d91c Cleanup: some more valid G.main usages moved to G_MAIN. 2018-06-19 19:30:47 +02:00
9c20de8998 Merge branch 'master' into blender2.8 2018-06-19 19:25:44 +02:00
0a8af46707 Final cleanup of G.mains in render area. 2018-06-19 19:25:06 +02:00
29d7358ff6 UI: fix ctrl wheel while over the opposite side 2018-06-19 19:22:23 +02:00
63f31e466a Cleanup: names of WPaint gradient data structs.
Those actually never had anything to do with DM... Just used WP prefix
instead!
2018-06-19 19:15:11 +02:00
cc3c91c27f Cleanup: remove DerivedMesh from WPaint Gradient tool code.
Name cleanup to follow.
2018-06-19 19:15:11 +02:00
db0563e995 Fix re-entrant calls in some cases of mesh_evaluated generation.
`mesh_get_eval_final` and friends could call `mesh_build_data`, which in
paint/sculpt mode would call `BKE_sculpt_update_mesh_elements` which
would call `mesh_get_eval_final`... ugly!
2018-06-19 19:15:11 +02:00
85f717fcda UI: tweak sequencer color space position, it's not related to display device. 2018-06-19 19:14:42 +02:00
44611ab860 UI: fix Ctrl-Wheel to change button values 2018-06-19 18:36:30 +02:00
1292aae5c0 Correction to previous commit.
There is no guarantee that given ob pointer is not also an evaluated one
here...
2018-06-19 18:29:40 +02:00
5372da0121 ModStack: Fix broken object_get_datamask helper.
Would compare evaluated ob pointer to original one...

Found while investigating some errors in incomming cleanup, but this was
probably generating lost of other issues in some cases...
2018-06-19 18:25:30 +02:00
5b227c420b Fix animation player drawing wrong size 2018-06-19 18:03:08 +02:00
61af6b83e6 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/sculpt_paint/paint_image_proj.c
2018-06-19 16:49:54 +02:00
750a78be9c 3D View: improve selection locking
Locked selection would still occlude with objects which could not be
selected.
2018-06-19 16:43:01 +02:00
0116c95d4c Studiolight: Temp Mutex issue
This is a temp fix for a better system.
Currently the studiolights can be referenced by a WM_job and being freed
via the API. This can happen when removing a studiolight via the
interface.

As the studiolight has no relation with the job, it is hard to detect if
it is still being used. I tried with a Mutex and a Thread Queue but they
were failing.

So the current temp fix is to keep the studiolights in memory until you
close blender. This Must be fixed ASAP! I added this fix so normal cases
can workish.
2018-06-19 16:37:23 +02:00
Stefan Werner
9ff135d85d Cycles: Fixed crash when the camera was inside 16 volumes or more. It still won't render those volumes correctly, but at least the crash is addressed. 2018-06-19 16:35:18 +02:00
b5893b1ba3 Fix (unreported) passing CDLayer 'ID' instead of bitflag to a cdlayer mask!
Probably harmless, since I bet CD_ORIGINDEX is nearly always generated,
but still...
2018-06-19 16:25:24 +02:00
a7e66d89d0 Merge branch 'master' into blender2.8 2018-06-19 16:21:35 +02:00
86c1cad1cf Fix missing render slots bugs after recent changes. 2018-06-19 16:19:49 +02:00
7c3ecbf040 Correct rigidbody stub 2018-06-19 16:18:23 +02:00
1c6ca9dc90 Fix animation player 2018-06-19 16:13:23 +02:00
e49f6bb208 UI: Smoke panels as sub-panels
Remove suffix from name since they are sub-panels now.

Display Settings -> Viewport Display, and two sub-panels as well for less used settings.
2018-06-19 16:01:35 +02:00
dd752476b9 Added face strength in bevel modifier
The selected face strength (Weak/Medium/High) can be used by the WN Modifier
to determine influence of current face in
2018-06-19 19:27:08 +05:30
fbae373db5 Cleanup: remove ref to dm in names in projpaint struct. 2018-06-19 15:55:45 +02:00
650bc17c1e Remove derivedmesh from 3DView texture/projection paint.
Pretty straightforward changes. Name cleanup to follow in a separated
commit.
2018-06-19 15:55:45 +02:00
34d9e9837a UI: Fluid physics panels as sub-panels
Also remove suffix from name since they are sub-panels now.
2018-06-19 15:48:21 +02:00
a2b79a21e1 UI: Soft Body panels as sub-panels
Also remove suffix from name since they are sub-panels now.
2018-06-19 15:48:21 +02:00
71b25e75c3 UI: Rigid body panels as sub-panels
Also remove suffix from name since they are sub-panels now.
2018-06-19 15:48:21 +02:00
96e6fd3b60 Remove rigid body from rbw->group when deleting
I moved some code from ED_rigidbody_object_remove() to
BKE_rigidbody_remove_object(), so that calling the latter doesn't leave
the object in rbw->group (causing a crash later on when rebuilding the
depsgraph).
2018-06-19 15:40:25 +02:00
ab1beb9744 UI: Cloth panels as sub-panels
Also remove Cloth suffix from name since they are sub-panels now.
2018-06-19 15:33:38 +02:00
d8f9ec1547 Particles: Support changing modifiers during particle edit mode
The idea is to only use pointers to particles in original object when
creating an edit structure. The derived mesh we get from evaluated
object.

The rest of the commit is just keeping pointers in sync.
2018-06-19 15:28:33 +02:00
95306a4d19 Particles: Use utility function to copy particles 2018-06-19 15:28:33 +02:00
aa3f0b0998 Particles: Add utility function to copy particles from one system to another 2018-06-19 15:28:33 +02:00
92c519ff17 Blender Version Bump
Without this, render slots aren't added.
2018-06-19 14:50:39 +02:00
ce0a87a208 Revert: EditMode Inactive edge drawing
Did it manually as there was some refactoring done that has value
2018-06-19 14:32:52 +02:00
92823275af Fixed rigid body simulation randomly stopping
This was caused by a floating point comparison using ==, instead of using
compare_ff_relative().
2018-06-19 14:22:48 +02:00
4b5f3690bb Missed warning in previous commit 2018-06-19 14:07:21 +02:00
1b972a38fe Lookdev: Renamed RNA
studiolight_background => studiolight_background_alpha
Removed "Show" from the label
2018-06-19 14:04:51 +02:00
de748bbedf Studiolight: Background Generation of icons 2018-06-19 14:04:51 +02:00
c564d847ef Show cached frames in timeline at correct height
The line was covered by the horizontal scrollbar instead of drawn above
it.
2018-06-19 11:49:56 +02:00
8f922b30b0 RigidBodyWorld: copy ptcache from evaluated scene back to original scene
This makes it possible to perform re-evaluation of the scene without
having to re-run the simulation.

The CoW → Orig copy is only performed when the depsgraph is active, so
as to not influence the current scene while rendering in the background.

Alternatively, we could have the CoW copy share the cache with the
original to prevent too much copying of cache data. This will be faster,
but I'm not sure whether we can reliably check the DEG_is_active()
status at CoW copy creation time.
2018-06-19 11:49:56 +02:00
668f39519c Fix T55528: Cycles AO node should default to 1 if radius is 0. 2018-06-19 11:45:05 +02:00
caaf4e5a37 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/sculpt_paint/paint_image_proj.c
2018-06-19 10:52:01 +02:00
b09a8203e9 Cleanup DM generation code for ProjPaint.
Two branches were actually doing essentially the same thing here, no
need to artificially complicate things. ;)
2018-06-19 10:48:37 +02:00
64a2f98062 Fix (unreported) unauthorized relesing of derived_final DM in paint projection code.
NEVER free yourself DM returned by mesh_get_derived_final(), it's always
to one assigned to ob->derived_final!
2018-06-19 10:43:54 +02:00
816817011f Cleanup: rename mode -> object.mode in Py UI
Keep 'mode' only for 'context.mode'.
2018-06-19 09:25:05 +02:00
9025841a0a Error in last commit 2018-06-19 09:20:38 +02:00
2d2db18f0b UI: move object-mode lock out of the 3D header
Avoid obscure options here.
Move to the edit menu, although this may be temporary.
2018-06-19 09:14:31 +02:00
65b3c7b72c Studiolight: Add SH2 cache
- the result of the SH2-coeffiecients are stored in a bin file (3*9
floats). As the file is a local file we do not care about the
architecture.
- solved issue that also for internal lights the irradiance file were
stored. We don't want that as it could be in a not accessible location
2018-06-19 09:06:35 +02:00
7a3e037dc0 Merge branch 'master' into blender2.8 2018-06-19 08:56:45 +02:00
751189e9d6 Vertex Paint: set sculpt object mode immediately
SculptSession.mode_type wasn't initialized until painting,
making it unreliable for checks in other parts of the code.

Also remove unnecessary initialization,
matching sculpt mode more closely.
2018-06-19 08:50:35 +02:00
bd3fe54b0d Merge branch 'master' into blender2.8 2018-06-19 08:15:03 +02:00
f0c6f5ee77 editorconfig: correct C/C++ using space 2018-06-19 07:48:12 +02:00
8c77c36539 Ghost: Fix offline OGL render on windows.
rBe0c088f8fb5a introduced offline rendering support on windows, sadly it was trying to use the desktop window for getting a context, which given SetPixelFormat can only be called once for any given HDC was an unfortunate choice.

This patch uses a temporary hidden window for getting the opengl context.

Reviewers: mano-wii

Differential Revision: https://developer.blender.org/D3481
2018-06-18 18:10:45 -06:00
30c383fd35 Merge remote-tracking branch 'origin/master' into blender2.8 2018-06-18 13:40:39 -06:00
38b72fb64b make.bat: Fix msvc-2017 detection.
D3485 by @manung

Differential Revision: https://developer.blender.org/D3485
2018-06-18 13:39:12 -06:00
643370b10f Cleanup: code-style 2018-06-18 20:58:08 +02:00
0d8b92267d Object Mode: make mode locking optional
Design from T55246 is kept while allowing 2.7x behavior.
2018-06-18 20:43:26 +02:00
9fb5924446 Fix a very nasty and sneaky bug in lib remap / static override code.
Not sure why remap call for static override reference ID pointer was put
there, probably a mistake during some merge back in the days...

But this ended up with self_id of libquery data struct still being set
to previous ID pointer, which could randomly generate crap like falsly
reporting indirect data and such, leading to lost reference datablock at
writefile time...
2018-06-18 20:20:55 +02:00
176bbe3466 Merge branch 'master' into blender2.8 2018-06-18 18:55:12 +02:00
ab59f9e65d editorconfig: add rst 2018-06-18 18:53:49 +02:00
594bcf934e Cleanup: use DEG tag flags, instead of old OB ones.
Having those two in parallel is ratehr confusing... :/
2018-06-18 18:43:21 +02:00
4efe8fc806 Fix crash when making static override of an object from a collection.
Since we free collection caches when we remap one of their objects, we
also need to tell depsgraph to flush this into the COWs of that
collection, otherwise things like draw code can access freed memory...
2018-06-18 18:43:21 +02:00
e92d61797b 3D View: don't show manipulators when overlay is disabled 2018-06-18 18:33:02 +02:00
f0245a18d1 Merge branch 'master' into blender2.8 2018-06-18 18:22:06 +02:00
b7b7468bef editorconfig: add line length, glsl 2018-06-18 18:21:35 +02:00
b2fa20f6c9 Merge branch 'master' into blender2.8 2018-06-18 18:12:04 +02:00
ce7c87fbda Add .editorconfig file
This is a fairly well supported file-type configuration
for indentation and trailing space stripping.

See editorconfig.org for details.
2018-06-18 18:09:45 +02:00
f828355cd6 Avoid assert on startup 2018-06-18 17:39:51 +02:00
d7122825ec Cleanup: redundant greater than 2018-06-18 17:39:50 +02:00
bea779fd78 Particle: Add missing field initializaiton 2018-06-18 16:01:29 +02:00
762dec21f6 UI: decorators hid non-array buttons
Error in last commit.
2018-06-18 15:50:21 +02:00
7356cec0c6 Studiolights: Radiance icons were inverted. 2018-06-18 15:45:55 +02:00
7747d4cecf Workbench: increased Quality of the diffuse lighting model
- implemented Spherical Harmonics L2 for diffuse shading.

TODO: caching the precalculated harmonics so it won't take soo long to
open the popover
2018-06-18 15:32:53 +02:00
fec97ec949 Objects: when active object gets hidden, make it inactive. 2018-06-18 15:20:06 +02:00
7c836ac30a Cleanup: simplify some view layer code. 2018-06-18 15:20:06 +02:00
0365079676 Particles: Remove obsolete code for child particles in edit mode 2018-06-18 15:14:03 +02:00
55623368b4 UI: decorators weren't showing icon-only buttons 2018-06-18 15:11:10 +02:00
de4c81c153 Fix merge error in bpy_driver.c 2018-06-18 15:09:55 +02:00
c655c65987 UI: No decorators on render engine picker 2018-06-18 12:41:39 +02:00
324e10e76a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/makesrna/intern/rna_space.c
2018-06-18 12:32:12 +02:00
579631819f Fix T55503: File browser filter not working correctly.
There were two issues here, introduced by rB66aa4af836:
* Forgot to change length of some filter_glob var deep in filebrowser code.
* Truncating filter_glob in general can be dangerous, generating
unexpected patterns.

Last point was the root of the issue here, truncating to 63 chars string
left last group as 'match everything' `*` pattern.

To fix that to some extent, added a new BLI_path_extension_glob_validate
helper to BLI_path_util, which ensures we do not have last
wildcards-only group in our pattern, when there are more than one group.
2018-06-18 12:26:47 +02:00
5e47f365e1 UI: Start UIList with 2 rows for materials/particles
There is room for it anyway because of the 3 buttons on the right.
2018-06-18 12:21:17 +02:00
d5ec62a0c3 Multires: Remove unused function
It uses derived mesh, and relies on scene stored in modifier data.
So port is needed anyway.
2018-06-18 11:14:00 +02:00
4330027895 Depsgraph: Cleamup, reduce indentation level 2018-06-18 10:23:03 +02:00
35c02c08b8 3D View: support outline overlay option 2018-06-18 09:23:25 +02:00
04e2a5cef4 Refactor: Put ViewportAA as UserPref
By default users want AA in the viewport. For slower systems you want to
be able to turn it off. As in the future we would also like to support
TAA in the viewport we introduced it as a Max Viewport AA settings.

Also removed the drawoption to enable/disable AA per viewport
When rendering the AA is always turned on.
2018-06-18 08:54:08 +02:00
79546a4eb6 ShadingMenu: Splitted in SubPanels 2018-06-18 08:54:08 +02:00
b2f0803b5b Fix T55511: Decorator drag makes many undo steps
Each keyframe made a separate undo step.
2018-06-18 08:25:05 +02:00
af51ec3214 Cleanup: indentation 2018-06-18 08:10:23 +02:00
0d45074768 Cleanup: whitespace 2018-06-18 08:08:08 +02:00
a794da5200 Fix T55517: Property-split fails w/ expanded enum 2018-06-18 08:05:46 +02:00
05b99b763e UI: disable decorators for render output 2018-06-18 07:38:06 +02:00
9d57b5aa44 Merge branch 'master' into blender2.8 2018-06-18 07:34:31 +02:00
b66ae8259e RNA: disable animation for file output options 2018-06-18 07:31:21 +02:00
05dc109553 Merge branch 'master' into blender2.8 2018-06-17 20:37:10 +02:00
86e20a2e63 Cleanup: trailing space cmake, make.bat 2018-06-17 20:18:09 +02:00
e7a68ef843 Cleanup: trailing space in CMake files 2018-06-17 20:15:24 +02:00
195879a50d Edit Mesh: Fix buggy occlusion when in xray mode.
This mimics the behaviour of the old wireframe mode. When in Xray mode,
don't use the limit selection to visible option.

Also hide the option if Xray is enabled.
2018-06-17 20:11:37 +02:00
2ceff8bd63 Python: Allow untrusted py-drivers to run limited expressions
Limit to a restricted set of built-ins, as well as the math module.
Also restrict of op-codes, disallowing imports and attribute access.

This allows most math expressions to run
without any performance cost once the initial check is done.

See: D1862 for details.
2018-06-17 20:01:05 +02:00
06a1a66a9b Merge branch 'master' into blender2.8 2018-06-17 17:10:19 +02:00
a24b4e6090 Cleanup: trailing space for remaining source/ 2018-06-17 17:06:28 +02:00
76c2203f9c Cleanup: trailing space for blenloader 2018-06-17 17:06:07 +02:00
6fc8a74886 Cleanup: trailing space for blenkernel 2018-06-17 17:05:51 +02:00
a262ea8c47 Cleanup: trailing space for compositor 2018-06-17 17:05:29 +02:00
410880552b Cleanup: trailing space for freestyle 2018-06-17 17:05:14 +02:00
e74bd46ede Cleanup: trailing space for imbuf module 2018-06-17 17:04:54 +02:00
1eed46c788 Cleanup: trailing space for modifiers 2018-06-17 17:04:27 +02:00
78fbd146f3 Cleanup: trailing space for DNA headers 2018-06-17 17:04:09 +02:00
4be752a93c Cleanup: trailing space in source/gameengine/ 2018-06-17 17:03:10 +02:00
61d27db359 Merge branch 'master' into blender2.8 2018-06-17 16:36:30 +02:00
5513da65b2 Cleanup: trailing space for BLI 2018-06-17 16:32:54 +02:00
f19ecdeec6 Cleanup: remove unused BLI_rebase_path 2018-06-17 16:26:47 +02:00
56173e512c Merge branch 'master' into blender2.8 2018-06-17 16:18:15 +02:00
a0a1fc8938 Cleanup: BLI path extension API
Use BLI_path_extension_* prefix.
2018-06-17 16:13:24 +02:00
6855d537e3 Merge branch 'master' into blender2.8 2018-06-17 15:52:32 +02:00
6453814ec0 BLI_path: add string size debug define
Off by default, only for debugging.
2018-06-17 15:35:00 +02:00
c7ae7ccfb8 Driver: trailing zeros from expression 2018-06-17 14:50:42 +02:00
547e962bf6 3D View: 3D Cursor was not restoring GL state
Caused camera frame to be double width.
2018-06-17 14:43:31 +02:00
446a646551 UI: hide decorators in panels w/o animated buttons 2018-06-17 12:38:28 +02:00
529669fde7 Edit Mesh: tweak active face edge width
This rewinds a change from own commit e3d88b021c
The only took edge overlay into account (crease, seam.. etc)
Currently active-face also uses this width.

While the difference is subtle,
this makes the active-face stand out more clearly.
2018-06-17 12:31:01 +02:00
d53d78ac45 UI: correct decorator buttons 'enabled' flag 2018-06-17 12:15:32 +02:00
e960920f2f UI: decorator color button assert
Also set 'all' argument based on the RNA-index
(even though it worked, better set to correct value).
2018-06-17 12:15:32 +02:00
ab20901c9e Cleanup: codestyle 2018-06-17 12:03:22 +02:00
43ce201125 Merge branch 'master' into blender2.8 2018-06-17 11:57:49 +02:00
42103a3eb8 CMake: add missing headers 2018-06-17 11:56:20 +02:00
2f1e34cfcc Cleanup: use clamp_* from BLI_math (replace macro) 2018-06-17 11:50:56 +02:00
75188552a1 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-06-16 21:49:40 -06:00
0a08c5cd36 Fix : Build error with uchar in intern_gawain.
error introduced by  D3483, intern_gawain has no access to bli_systypes.h
2018-06-16 21:49:11 -06:00
fe98124a98 Custom Hdri: Use same AntiAliasing as Matcaps 2018-06-16 23:28:39 +02:00
b503dd7747 StudioLights: Fix preview icon.
Use same antialiasing method as the matcaps and fix the normal computation.
2018-06-16 23:28:39 +02:00
48adf90367 Matcap: Make matcap preview the same size as the other StudioLights 2018-06-16 23:28:39 +02:00
224daf55ac Matcaps: Add AntiAlias alpha mask to icon preview. 2018-06-16 23:28:39 +02:00
0332d338ea Studio Light: Fix typo 2018-06-16 23:28:39 +02:00
4a2c58e077 Outlines: Don't draw Xray mode outlines in material or render mode 2018-06-16 23:28:39 +02:00
45591cc0df GLRefactor: Remove all GL types from gawains public headers.
In preparation for possible alternative back-ends, the dependency on glew.h needs to be confined to as few libraries as possible. This patch removes all gl types from the public gawain headers.

It'll need some more refactoring later on, but for now this will suffice.

Reviewer: brecht, fclem

Differential Revision: https://developer.blender.org/D3482
2018-06-16 12:44:20 -06:00
c90d348e04 Merge remote-tracking branch 'origin/master' into blender2.8 2018-06-16 12:30:56 -06:00
36e82b7759 make.bat: Fix make showhashes not working.
broke in recent refactor.
2018-06-16 12:29:38 -06:00
c21499ba4a UI: show decorator icon for static-override 2018-06-16 18:27:04 +02:00
3b7f630a54 Merge branch 'master' into blender2.8 2018-06-16 18:02:50 +02:00
dc1c820b2b Cleanup: remove BLI_frand from GreasePencil code. 2018-06-16 18:02:23 +02:00
0a8e6b48c4 Correct assert in recent changes 2018-06-16 17:31:37 +02:00
3cf239ccfa UI: support dragging to key-frame 2018-06-16 16:29:05 +02:00
d8c2c63c00 UI: Add property decorator buttons
When use_property_split is enabled, this template adds
buttons to set keyframes, (Alternative to showing color).

See: T54951
2018-06-16 16:28:42 +02:00
ace8ad861d Fix T55427: Removing Vertex Group used by Data Transfer Modifier results in crash.
Only fixing crash, proper handling (a.k.a remapping) of all
possible cases here, for all possible data layers, is rather involved...
2018-06-16 16:22:00 +02:00
8f2acda7d7 Merge branch 'master' into blender2.8 2018-06-16 16:16:53 +02:00
35c71aed25 UI: refactor drag-toggle for other button types 2018-06-16 16:04:26 +02:00
ce80e00a7c Edit Mesh: Simplify the overlay shader.
Remove all the clip cases and just pass the vertices screen position to the
fragment shader.

This does put a bit more pressure on the fragment shader but it seems to be
faster than before. And it simplify the code a lot.

It seems to fix some long standing issue on some intel GPU.
2018-06-16 15:49:16 +02:00
d45d094378 Edit Mode: Fix bad display of edges when limit selection mode is Off. 2018-06-16 15:49:16 +02:00
73abca1da0 UI: minor changes from 2.8
- Option to skip multi-data edits.
- Open hold buttons on drag.
- Utility function to set default value.
2018-06-16 15:44:13 +02:00
5600296c9d Merge branch 'master' into blender2.8 2018-06-16 15:28:57 +02:00
b955747875 Cycles Cleanup: Remove unneccessary color management call 2018-06-16 13:47:49 +02:00
9d876960e8 This option limits visibility of the glew.h header to just bf_gpu and intern_gawain
this is to highlight areas in the code that still directly do opengl calls or use
opengl types.

This is in preparation for supporting alternative rendering back-ends.

Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D3304
2018-06-15 20:17:16 -06:00
01f576e87b Merge branch 'master' into blender2.8
The Eevee AO node supports the new Normal socket, but ignores Distance,
Samples, Inside and Only Local settings.
2018-06-15 23:16:49 +02:00
799779d432 Cycles: change Ambient Occlusion shader to output colors.
This means the shader can now be used for procedural texturing. New
settings on the node are Samples, Inside, Local Only and Distance.

Original patch by Lukas with further changes by Brecht.

Differential Revision: https://developer.blender.org/D3479
2018-06-15 22:16:06 +02:00
469408de72 UI: fix redundant scrolling in the redo panel 2018-06-15 21:05:49 +02:00
0ff87e3a60 Cleanup: code style 2018-06-15 20:55:37 +02:00
e3d88b021c Edit Mesh: tweak vertex size & edge width
- Vertex size now matches the theme setting.
- Edge width is closer to a single pixel line.
- Face dot was scaled up to be drawn as a circle,
  but is currently a square.
2018-06-15 20:11:35 +02:00
2291ce9f1f Merge branch 'master' into blender2.8 2018-06-15 19:12:44 +02:00
2b9edbc98b WM: suppress drag events if motion is handled 2018-06-15 19:09:43 +02:00
ecc57e7524 Merge branch 'master' into blender2.8 2018-06-15 17:43:18 +02:00
d645b1a78a Cleanup: some more G.main removal.
We are really starting to scratch the last bits here...
2018-06-15 17:42:17 +02:00
9c629b06bf Workbench OpenGL render: always render alpha on 1.0
Old implementation rendered alpha to 0.0 for background, but only during
deferred rendering. We should attach this to an DNA setting and also let
the forward shading respect this. But for now this is a better default
2018-06-15 17:42:11 +02:00
49915e3241 Cleanup: validate G.main's in creator code.
Using G_MAIN here is valid!
2018-06-15 17:36:44 +02:00
3e4bf31327 Cleanup: G.main removal from 2.8-only code. 2018-06-15 17:33:24 +02:00
5b6ae0523e Merge branch 'master' into blender2.8 2018-06-15 17:25:41 +02:00
ca2be6912d Hair editing: Use original object's particles for drawing
This allows to rely on brush to update children positions,
and avoid tag of object. Makes it way faster to comb with
children enabled.
2018-06-15 17:23:49 +02:00
5ac7068c5f Hair editing: Multi-thread various parts
Currently focused on making parts which are a bottleneck for Spring,
to make things fast as possible. There are surely lots of places
where threading is not currently done, but we can keep doing this,
maybe even with help from the community :)
2018-06-15 17:23:49 +02:00
acdbf71578 Hair editing: Only tag Copy-on-Write when children are enabled
Without children we only need to update batch cache. This way
we don't re-evaluate the whole modifier stack just to perform
child particles redistribution.
2018-06-15 17:23:49 +02:00
da9b1b14ed Cleanup: some more G.main removal/validation... 2018-06-15 17:21:07 +02:00
ed3d693cb1 Dependency graph fixes for RigidBodyWorld
- rbw->group added to the depsgraph.
- Mesh evaluation added when necessary.
- Prevent of double-free by freeing the scene before objects.
2018-06-15 17:15:42 +02:00
43d22d80e7 Keymap: use click event for tab-key
Checking release events would toggle edit-mode during alt-tab
cycling on X11.

Now both press and release events are needed.
2018-06-15 17:10:40 +02:00
d148514821 Workbench: Disable AA when doing opengl render.
- OpenGL uses linear space and has its own AA. So we don't calculate
when doing opengl rendering.
2018-06-15 16:50:34 +02:00
23b3901057 Merge branch 'master' into blender2.8 2018-06-15 16:32:31 +02:00
2e25a48b05 Fix more Cycles CUDA errors after recent changes. 2018-06-15 16:28:09 +02:00
Dalai Felinto
badb700161 Fix T55443: Manipulators not refreshing 2018-06-15 15:45:21 +02:00
0b8c2eed75 Merge branch 'master' into blender28 2018-06-15 15:42:42 +02:00
8166d0affd Cleanup: warning 2018-06-15 15:42:31 +02:00
e552247489 MeshEditMode: refactor
- added a lib for shaded functions
- decreased active face inner size
2018-06-15 15:37:13 +02:00
Dalai Felinto
86a2f4a34a Fix crash with x-ray and redo panel
Code was assuming any area with region data was the main one.
This is no longer the case.
2018-06-15 15:01:28 +02:00
b84fad2ba3 Fix T55490, intersect two triangles fails.
Need to use the 'use_partial_connect' option in island connect,
so changed signatures of various functions to pass that into and
then down from BM_mesh_intersect (making true for intersect, false
for boolean).
Then fix bm_face_split_edgenet_partial_connect to work when
input edges are not necessarily wire, but at least not in the
face they are being connected in. That caused generalization
of core BM_vert_separate_hflag_wire (which is only used in
this one place in all Blender).
2018-06-15 08:48:45 -04:00
84c91a87a9 Converted Rigid Body from DerivedMesh to Mesh 2018-06-15 14:33:11 +02:00
5073ee0bb2 Workbench: FXAA
- do the FXAA pass after the color management. Be aware that during
rendering this is still being done in linear space
2018-06-15 14:05:49 +02:00
0276abbcf7 Workbench: FXAA
FXAA implementation in the deferred renderpass of the workbench.
Can be enabled per 3dview. Eventually this will also be a user setting
as it is more a system/performance setting than a scene setting.
2018-06-15 13:02:16 +02:00
15c340293f T55486: use GPU_R11F_G11F_B10F for target of Xray compo 2018-06-15 13:02:15 +02:00
64bfa4b300 T55486: use GPU_R11F_G11F_B10F for Matcaps 2018-06-15 13:02:15 +02:00
b7338463a7 Tool System: workaround click conflicting w/ add brush 2018-06-15 12:29:30 +02:00
995a1815f5 Fix T55408: Double transforms on parents/children.
object.base_flag was not synced back from evaluated ID to original one.
Similar thing as copying back to original transform matrix, avoids
having to get data from evaluated one in lots of cases.
2018-06-15 12:17:26 +02:00
76bc8669a0 Merge branch 'master' into blender2.8 2018-06-15 10:44:33 +02:00
284e0ea756 Fix (unreported) Text Editor: scrollbar exiting early
caused by recent clickdrag changes
2018-06-15 10:27:30 +02:00
8148d549bb Fix Cycles CUDA error after recent changes. 2018-06-15 10:26:28 +02:00
3a2a10e3a6 Merge branch 'master' into blender2.8 2018-06-15 10:25:41 +02:00
cbc7ee28d7 WM: 2.8 screen compatibility
Without these minor changes loading files from 2.8 will crash.

Manually applied edits from 26786a2b87
2018-06-15 10:24:53 +02:00
7c16739c75 Fix mouse input overwriting transform redo values
Redo trackball rotate and edge slide weren't working.

Caused by re-ordering of initialization 47de0321bf
2018-06-15 08:48:53 +02:00
e2c87c7e94 Cleanup: unused var 2018-06-15 08:03:19 +02:00
27de412ca8 Merge remote-tracking branch 'origin/master' into blender2.8 2018-06-14 22:54:42 +02:00
525be2f579 Image: Refactor render slots to a dynamic list
Previously, render slots were hardcoded to a fixed amount.

With this change, render slots now are stored in a list. Therefore, users can add and/or remove as many slots as they want.

Credit to brecht for the UI part.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3474
2018-06-14 22:46:30 +02:00
51f1ed8221 Cleanup: style 2018-06-14 22:44:53 +02:00
928d31d94a WM: fix redo region setting the context 2018-06-14 22:32:01 +02:00
26786a2b87 WM: add support for temporary region data 2018-06-14 22:27:58 +02:00
3ee606621c Cycles: Query XYZ to/from Scene Linear conversion from OCIO instead of assuming sRGB
I've limited it to just the RGB<->XYZ stuff for now, correct image handling is the next step.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3478
2018-06-14 22:21:37 +02:00
064e701472 Cycles: Connect value inputs to Strength instead of Color when inserting an Emission node
Same result, but saves an additional ConvertNode.
2018-06-14 22:16:42 +02:00
716e138a1b Cycles: Automatically detect HDRI resolution by default and use non-square sampling map
The automatic mode checks all Enviroment Texture nodes and picks the largest image's resolution.
If there are no Enviroment Textures, it just uses the old default.

Also, the sampling map now isn't limited to square shapes. The automatic detection uses the exact image size,
the manual UI option now halves the value to get the height.

A default aspect ratio of 2:1 makes sense since this is what most HDRIs use.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3477
2018-06-14 22:07:07 +02:00
1adfabc8c6 WM: revert part of Top-Bar inclusion
This removes OperatorRepeatContextHandle, from 5f6c45498c
since we now only have redo in the area an operator is executed in.

These values could be invalid and crashed in some cases.
2018-06-14 21:58:11 +02:00
7afa59e37a Edit Mesh: Fix blending function of edges
This fix the ugly (usually) dark outline that was around selected edges.
2018-06-14 21:45:16 +02:00
dc25e69c2d Fix motion paths not updating correctly for bones in some cases.
Sometimes the evaluated pose channel pointers can change during depsgraph
evaluation, so we can't store them ahead of time. The object pointer
should be ok since evaluated ID memory is reused.
2018-06-14 20:58:14 +02:00
2e09b277d5 Revert "GHOST: GLX: Remove XInitThreads"
This reverts commit 7529690df3.

I tried to put manually add threading protection to GHOST around
Xlib calls but that did not fix the crashes. So reverting that
for now despite the performance implication on some system.
2018-06-14 18:17:28 +02:00
dc856be839 Preview: Add own opengl context to render preview images. 2018-06-14 18:17:28 +02:00
a8e8808d58 Give RigidBodyWorld collection a fake user
This prevents it from disappearing when the blend file is saved.
2018-06-14 17:35:46 +02:00
8dc883052c UI: redo panel would still start zoomed in at times 2018-06-14 16:48:31 +02:00
59bb5d3a89 Cleanup: some remaining G.main's in COllada in 2.8... 2018-06-14 16:43:11 +02:00
a03fb42841 Workbench: Code cleanup: Double assignment 2018-06-14 16:28:16 +02:00
b9c9b87fa6 Cleanup: remove BLI_frand ugly global random generator usage from compositor. 2018-06-14 16:25:39 +02:00
3a36cbdfde Transform: Suppress assert w/ vertex paint 2018-06-14 16:14:51 +02:00
00eeb05f4c Depsgraph: Make certain components NOT tag copy-on-write when they are tagged
Currently done for mesh batch cache update, and for base flags sync.
Those components do not need anything from original object, and hence
can skip CoW tag and have faster update after them used.
2018-06-14 16:04:09 +02:00
42d8872014 Depsgraph: Use dedicated ocmponent for object's base flags flush 2018-06-14 16:04:09 +02:00
87b2444270 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/AnimationExporter.cpp
	source/blender/collada/AnimationExporter.h
	source/blender/collada/ArmatureImporter.cpp
	source/blender/collada/ArmatureImporter.h
	source/blender/collada/ControllerExporter.cpp
	source/blender/collada/ControllerExporter.h
	source/blender/collada/DocumentExporter.cpp
	source/blender/collada/DocumentImporter.cpp
	source/blender/collada/GeometryExporter.cpp
	source/blender/collada/GeometryExporter.h
	source/blender/collada/MeshImporter.cpp
	source/blender/collada/MeshImporter.h
	source/blender/collada/SkinInfo.cpp
	source/blender/collada/SkinInfo.h
	source/blender/collada/collada_utils.cpp
	source/blender/collada/collada_utils.h
2018-06-14 15:55:51 +02:00
0626de2033 GPU: consistenly use mipmap on/off in all draw modes.
This is important for good texture paint performance.
2018-06-14 15:50:22 +02:00
14db989e73 Cleanup: remove legacy GPU pass binding code. 2018-06-14 15:46:43 +02:00
39142103d9 T55479: Tag for update when active texture changes 2018-06-14 15:30:06 +02:00
fd19069999 Cleanup: remove last G.main's from Collada code. 2018-06-14 15:15:51 +02:00
277d901274 T55456 EditMeshMode
- see the face selection color when face is active
- test different masks for active face, finally chosen for no mask at
all.
2018-06-14 14:18:52 +02:00
158930228d Improved two tooltips
Tooltips shouldn't just repeat the information from the label.
2018-06-14 13:55:24 +02:00
f4dc4bd275 Fix crash on startup in after recent G.main changes. 2018-06-14 13:45:15 +02:00
3eba5c0079 Cleanup: remove last G.main's in WM code of 2.8.
Again, just validating ther usage and using G_MAIN instead.
2018-06-14 12:42:30 +02:00
4bf751be70 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/modifiers/intern/MOD_normal_edit.c
	source/blender/windowmanager/intern/wm_files.c
2018-06-14 12:39:52 +02:00
66407e15cb Cleanup: Remove last G.main's from WM code.
Was mostly validating valid usages of G.main -> G_MAIN actually.
2018-06-14 12:34:13 +02:00
a671aa922a Workbench: Material colors + settings during sculpting 2018-06-14 12:12:27 +02:00
d64cd6f7ee Move call to drw_state_ensure_not_reused() inside the region locked by DST.gl_context_mutex.
Currently with a debug build there is a race condition where the mutex is released before the DST structure is reset to 0xFF, meaning when multiple threads are using the DRWManager it can get cleared when the main thread is using it, causing crashes.

Reviewers: fclem, brecht

Reviewed By: fclem

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3476
2018-06-14 12:03:40 +02:00
17b029d80e T55406: Flip Matcap
- Icon represent the flipped matcap in the shading menu
- Added template_icon to display any icon in scale.
2018-06-14 11:44:36 +02:00
0eb3246713 Fix T55470: Add option to not fix polygons' winding to Edit Normals modifier.
this is actually adding option to add buggy behavior, but.. NPR often
expects buggy behaviors, and its one of the main targets for normal editing.
So think it's reasonable to add that option (disabled by default of
course).

Note that am not really happy with UI, but:
* Not sure where to put it, it's kind of own self-contained area option.
* Don't to make it too much visible, using this should be the exception!
2018-06-14 11:41:12 +02:00
fecec7dd68 3D View: Show view-aligned rotation manipulators 2018-06-14 11:37:47 +02:00
f35572ae9e Cleanup: style 2018-06-14 11:37:47 +02:00
62f594ca7b UI: Make spacers align blocks on area divisions
This solves the problem of blocks jumping around when changing modes and
center them to the area (in case of only 2 spacers).
Which is (in my own opinion) more aestetically pleasing.
2018-06-14 11:29:44 +02:00
7449dc8d13 3D View: Tweak transform plane manipulator fading
The threshold to fade out and hide was too small.
2018-06-14 10:39:36 +02:00
4ee97c9a1c WM: increase hot-spot of 3D manipulators
Larger hot-spot was disabled for performance,
however without this - clicking on them is too difficult.
2018-06-14 09:55:58 +02:00
ba2c10c1f7 3D View: increase size of view aligned rotation
Minor changes based on user feedback.

- View aligned rotation manipulator overlapped too often
  with axis aligned widgets. Increase size (matching 2.79)
- Offset arrow-heads when combining rotate & translate,
  don't draw the stem since it overlaps with scale.
2018-06-14 09:46:11 +02:00
22ac20a705 WM: option not to draw arrow manipulator stem 2018-06-14 09:25:55 +02:00
eeca206e76 Cleanup: rename arrow manipulator 'draw_options'
Rename to 'transform' since this controls interaction.
2018-06-14 09:17:03 +02:00
b839d67f3e UI: correct HUD zoom resetting 2018-06-14 08:30:46 +02:00
2f3e890b94 DRW: Fix crash caused by hair transform feedback
Seem to be cause by the lack of proper FBO bound.
2018-06-13 22:20:48 +02:00
8d2309f94f 3D View: make navigation buttons smaller
Keep orbit large, other buttons are now closer to other icons buttons.
2018-06-13 21:00:05 +02:00
711a50c5ea Merge branch 'master' into blender2.8
This includes making Eevee match Cycles behavior of inserting an emission
node when linking colors to closures.
2018-06-13 19:26:52 +02:00
4d58fac1b4 Fix undo group to use human readable name, since this shows in the UI. 2018-06-13 18:39:30 +02:00
3102833962 Fix undo of transform after frame change undoing too much.
For grouped undo we should not skip the undo push, rather replace the
previous undo push. This way undo goes back to the state after the last
operation in the group.
2018-06-13 18:39:30 +02:00
90e6323ed8 Cycles: auto insert emission node when linking color to closure.
This is convenient for previewing the output of a node, and we agreed
to support this behavior in both Eevee and Cycles.
2018-06-13 18:39:30 +02:00
e5880eb1ff Fix exception in superellipse where precision_reached is used
with proper initialization
2018-06-13 21:56:15 +05:30
a3c630aebb Merge branch 'master' into blender2.8 2018-06-13 18:25:23 +02:00
2922131971 Corrected bevel of vertex by using profiles for curve of bevel 2018-06-13 21:53:15 +05:30
57cd52a4ab WM: check release event for particle edit mode
Caused by drag event.
2018-06-13 18:23:09 +02:00
2e23385c35 T55456: EditDrawMode
reorganized shader compilation
2018-06-13 16:47:38 +02:00
645c918825 T55456: EditDrawMode
use darker defaults for not active selection mode elements
2018-06-13 16:47:38 +02:00
4943739b89 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/mesh/editmesh_utils.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-13 16:42:56 +02:00
b8015ece51 Revert "T55456: EditDrawMode"
This reverts commit da6ed54569.
2018-06-13 16:34:20 +02:00
f61c30f804 Cleanup: get rid of last G.main in BMesh code. 2018-06-13 16:29:12 +02:00
cd0a4836d4 Cleanup: unused var 2018-06-13 16:17:07 +02:00
9c65227061 Tag object/scene for selection update from operators
Before that depsgraph tagging was done from inside notifier listener in
viewport. This had the following issues:

- If there are no viewports, selection tag was not done. Causing possible
  issues when object becomes visible.

- Required special trickery to detect which data to tag for update.

- Was causing crash when transforming/selecting markers in clip editor.
  This is because selecting marker needed to poke viewport to redraw, since
  selected bundles will be displayed differently in viewport.
2018-06-13 16:07:55 +02:00
Dalai Felinto
c1e503e89a Silence false positive warning on boolean modifier 2018-06-13 16:04:31 +02:00
1bcf9217eb Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_pointcache.h
	source/blender/blenkernel/intern/object.c
	source/blender/blenkernel/intern/pointcache.c
	source/blender/editors/include/ED_particle.h
	source/blender/editors/physics/particle_edit.c
	source/blender/editors/physics/particle_edit_undo.c
	source/blender/editors/physics/particle_object.c
	source/blender/editors/physics/physics_intern.h
	source/blender/editors/physics/physics_pointcache.c
	source/blender/editors/space_time/space_time.c
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/space_view3d/view3d_edit.c
	source/blender/editors/transform/transform_conversions.c
	source/blender/editors/transform/transform_generics.c
	source/blender/editors/transform/transform_manipulator.c
	source/blender/makesrna/intern/rna_object.c
	source/blender/makesrna/intern/rna_object_force.c
	source/blender/makesrna/intern/rna_sculpt_paint.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-13 15:36:24 +02:00
7a10cfe7fe UI: preset popover buttons in panel headers.
Moves the preset into a menu for the panel header, so it can be changed
without opening the panel and takes up less space. Two remaining issues:

* For long lists the add new preset button can be scrolled off screen.
* We should support showing the name of the chosen preset in the panel
  header, but the current preset system does not support detecting which
  preset is used.

Differential Revision: https://developer.blender.org/D3366
2018-06-13 15:22:34 +02:00
Dalai Felinto
1664ccb675 Fix flexible spacer distance
Introduced on 0bce173bc7.
2018-06-13 15:17:56 +02:00
Dalai Felinto
8f8205584d UI: Make NLA header consistent with dopesheet 2018-06-13 15:07:25 +02:00
1a6b2650fa Cleanup: double quotes for non-enum strings 2018-06-13 15:06:58 +02:00
eed9458c22 UI: center align 3D view header snap, pivot etc 2018-06-13 15:04:13 +02:00
Dalai Felinto
6b6c86d1f7 UI: Fix clip editor double text-less icon situation 2018-06-13 15:04:07 +02:00
5ff1d845ea Cleanup: moar ugly G.main removal...
Note that due to RNA get/setters issue, that one may actually add some
G.main usages to the total... But at least it's not hidden anymore in a
very low-level, dark corner of BKE pointcache code!
2018-06-13 14:28:05 +02:00
da6ed54569 T55456: EditDrawMode
- removed the dithering from the active face
2018-06-13 14:21:38 +02:00
57fe9767f4 Merge branch 'master' into blender2.8 2018-06-13 14:19:57 +02:00
f7083b00ee Cleanup: tool settings access 2018-06-13 14:12:21 +02:00
2002fe27d9 Fix T55467: nodes cant be resized after recent clickdrag change 2018-06-13 14:03:46 +02:00
Dalai Felinto
64ecd3d2e7 Set minimum blender version as 2.80
Technically we probably need to do for the current subversion (17).
But the entirely 2.80 series is known to be experimental.

The most important part is to notify people that if they open the 2.80
file in master it will loose data.
2018-06-13 13:01:16 +02:00
710f1f2232 UI: add back pivot point
Was accidentally removed after recent changes.
2018-06-13 12:55:57 +02:00
23c24cead5 T55456: EditMode Drawing
- Hide facedots, except when in V3D_ZBUF_SELECT mode
`use_occluded_geometry`
- Different theme (wire_inactive) when not in edge selection mode
2018-06-13 12:38:53 +02:00
c0926d536f Manipulator: Skip redundant transform updates
Partially address T55458
2018-06-13 11:59:48 +02:00
ca7a93953a Error in recent popover width 2018-06-13 11:57:52 +02:00
0bce173bc7 UI: remove empty space at the end of headers, tweak start/end spacing. 2018-06-13 11:43:10 +02:00
dcf70dc181 Fix 3D view header panning not working with region overlap. 2018-06-13 11:43:09 +02:00
e4ab04b8bb Fix pop-over buttons always getting space for icon 2018-06-13 11:22:15 +02:00
2a5d4d7573 Merge branch 'master' into blender2.8 2018-06-13 11:11:23 +02:00
5788f24337 Cleanup: swapped X/Y UI_UNIT 2018-06-13 11:10:55 +02:00
1a79c6d360 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/blendfile.c
	source/blender/blenkernel/intern/node.c
	source/blender/blenkernel/intern/particle.c
2018-06-13 11:02:48 +02:00
67e8c1e1c7 Cleanup: remove more G.main from BKE area. 2018-06-13 10:57:10 +02:00
f234adf65c UI: adjust view navigation layout
Button layout now matches T54723.
2018-06-13 10:57:09 +02:00
edd0522e8f UI: HUD now follows region theming 2018-06-13 09:50:41 +02:00
64aadc7c7d Depsgraph: Avoid use of 0 tag flag on build finish
Use all the explicit tagging. Solves characters being in T-pose after
opening specific scene files.
2018-06-13 09:49:14 +02:00
813a538a57 UI: show HUD when region overlap is disabled 2018-06-13 09:27:40 +02:00
0ab8f9c74a UI: fix hud panel refresh glitch 2018-06-13 09:21:09 +02:00
679eefae74 UI: shorten proportional edit name
Didn't fit in panel.
2018-06-13 09:16:26 +02:00
a03eadaec8 UI: redo panel layout tweaks
- Don't use compact layout (enum titles were hidden).
- Split-properties to use less vertical space.
- Make panel wider, half width when collapsed.
2018-06-13 08:26:16 +02:00
fc0b21ff73 Fix region expanding on refresh 2018-06-13 00:30:16 +02:00
0c0811829f UI: adjust header alignment
- User preferences header at the bottom.
- Action header at the top.

Now all editors accessible from the menu have their header at the top,
default layout for the timeline remains at the bottom.
2018-06-12 22:59:15 +02:00
958d24ae0f UI: Name N-Key toggle to Sidebar 2018-06-12 22:57:03 +02:00
77879ac038 Fix T55376: instanced collection render visibility ignored.
For physics simulation it's still fuzzy though, but this needs bigger
design for how it works with view layers and visibility.
2018-06-12 22:36:43 +02:00
6700c02e53 WM: don't show redo hud when unsupported 2018-06-12 22:33:58 +02:00
98e0bd90f4 WM: hide internal operator settings
These are set in the interface and aren't useful to show to users.

Other minor changes

- Rename 'Ruler/Protractor' -> 'Ruler'
- Rename Subdivide 'Quad/Tri Mode' -> 'Create N-Gons' (and invert).
2018-06-12 22:00:22 +02:00
94e0abda75 UI: move auto-merge option to mesh options panel
This can be used even w/o snap.
2018-06-12 21:16:50 +02:00
81f24dd781 UI: re-arrange object mode and 3D view buttons
After some consideration we're moving 3D view settings
that impact the 3D view back.

See T55386 for details.
2018-06-12 21:10:31 +02:00
18cc8809c3 Fix T55457: Crash after merge faces 2018-06-12 20:43:46 +02:00
e65d20e7dc Cleanup: add ED_region_panels_layout
Only had the '_ex' (extended) version.
2018-06-12 18:39:18 +02:00
9b9b943e0c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_anim.h
	source/blender/blenkernel/intern/anim.c
	source/blender/blenkernel/intern/scene.c
	source/blender/editors/armature/pose_edit.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/armature/pose_utils.c
	source/blender/editors/include/ED_armature.h
	source/blender/editors/object/object_edit.c
	source/blender/editors/transform/transform_conversions.c
2018-06-12 18:26:50 +02:00
2788202417 Cleanup: moar G.main removal from BKE area. 2018-06-12 17:57:24 +02:00
f27ecd56ef Cleanup: BKE_scene_free should not have to worry about cleaning its usages.
This is supposed to be handled by calling code! Henceforce, no need to
call BKE_sequencer_clear_scene_in_allseqs() here, and... no need for
that ugly G.main case. ;)
2018-06-12 17:46:16 +02:00
a76cfe2c22 Cleanup: no need for extra HUD type check now 2018-06-12 17:38:04 +02:00
031416c559 Merge branch 'master' into blender2.8 2018-06-12 17:36:24 +02:00
b00d840359 WM: remove sloppy region type access
Avoid accidentally operating on the wrong region type.
2018-06-12 17:34:44 +02:00
760e79d809 WM: rename BKE_regiontype_from_id
This returns the first as a fallback, causing confusing usage.
Renamed and added a version of the function that doesn't.
2018-06-12 17:26:38 +02:00
e8dd4cd9ca Cleanup: warning, spaces 2018-06-12 17:20:12 +02:00
2af7c38682 Cleanup: get rid of global RNG usage in paint stroke code. 2018-06-12 17:13:47 +02:00
376bc88dc0 Fix leak of manipulator tooltip timers.
This was causing performance degradation over time in posing, as the
manipulator recomputes the center locations for every event.

Ref T55442.
2018-06-12 17:07:18 +02:00
3801736b89 Depsgraph: remove object tagging hack for render.
With copy-on-write it should now all be evaluated correctly in render
resolution, without needing to switch the original data resoluton.
2018-06-12 17:07:18 +02:00
a9cfd8c910 Cleanup: get rid of global RNG usage in transform code. 2018-06-12 17:00:31 +02:00
8826a00482 WM: HUD was disappearing on redo 2018-06-12 16:59:37 +02:00
97cac69739 Fix redo panels being added to non-hud regions 2018-06-12 16:55:00 +02:00
2a3e7fe656 UI: improve HUD ensure/clear logic
Running operators w/o redo now clears the HUD immediately.
2018-06-12 16:50:27 +02:00
deb3d73eea Particle: Use loclaized RNG for physics simulation
Avoids threading conflicts between multiple particle systems being simulated.
2018-06-12 16:37:40 +02:00
7d36408b82 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/include/ED_view3d.h
	source/blender/editors/space_view3d/view3d_draw.c
	source/blender/python/intern/gpu_offscreen.c
2018-06-12 16:29:07 +02:00
866127d9f2 StudioLight: Use texel size as input size
Bettter light distribution for diffuse shading
2018-06-12 16:18:50 +02:00
ec4ce908db Fix T55452: Crash on saving with visible particle system.
Missing Main pointer in recent refactor/cleanup of G.main usages...
2018-06-12 16:17:05 +02:00
b236400ff5 Math: Remove unused functions which are not safe for threading
All areas are toy use "local" number generator, in order to keep
behavior predictable and threadable. This is what BLI_rng_() API
is for.

There are still lots of usages of BLI_frand(), which are to be
ported to BLI_rng_get_float(). but that is somewhat involved.

For the time being, remove unsafe API, so new areas have zero
chance using it.
2018-06-12 15:51:43 +02:00
6231a077ac Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_group.h
	source/blender/blenkernel/BKE_object.h
	source/blender/blenkernel/intern/group.c
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenkernel/intern/object.c
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/object/object_group.c
	source/blender/editors/object/object_relations.c
	source/blender/editors/physics/rigidbody_constraint.c
	source/blender/editors/physics/rigidbody_object.c
	source/blender/makesrna/intern/rna_group.c
2018-06-12 15:41:32 +02:00
1b5e3e1c01 Use evaluated objects in Alembic unit tests
This at least makes sure the tests don't fail any more. Possibly there
should be more evaluation happening there.
2018-06-12 15:39:54 +02:00
39e050af40 Fix T55409: Can't animated keyframed material node value after moving keyframe on timeline
Completely ignore animation for legacy zero update tag.

If one needs animation to be evaluated, tag with proper update tag, stop relying
on direct assignment of adt->>recalc with zero update tag for DEG.

This commit might cause missing updates when needed, those needs to be looked
into once they happen.
2018-06-12 15:39:11 +02:00
8204261ede Particle: Remove global RNG usage from distribution 2018-06-12 15:38:29 +02:00
53a9cde038 Particle: Use local RNG during initialization 2018-06-12 15:38:29 +02:00
46cb64917d Render: Remove global RNG usage
We shouldn't be using BI textures anyway. But in any case, adding noise
texture to compositor is doing proper seed updates already, so probably
was already ported to a proper RNG usage.
2018-06-12 15:38:29 +02:00
b6b1e0f56c T55454: removal of clay engine
The ClayEngine was introduced to test the blender2.8 architecture during
development. As currently we have the wanted features implemented with
matcaps we are going to remove the clay engine as it was never intended
to be an official releasable engine

Note: The test cases are never run. But when enabled will be skipped as
they were implemented over the Clay Engine
2018-06-12 15:32:31 +02:00
d72ddb81ae Studiolight: add rim lighting to the default light setup 2018-06-12 15:17:01 +02:00
a6585fa4b1 Cleanup: moar removal of G.main in BKE area... 2018-06-12 15:16:45 +02:00
1d8279fd8d Alembic: made bl_alembic_import_test.py run again
Two tests are still failing, but at least the API changes in 2.8 have been
applied now.
2018-06-12 15:10:15 +02:00
d617a6c85b Cleanup/simplify G.main usages.
Using G.main only to get main bled filepath, or built-in fonts, is OK.
So now using the 'valid' G_MAIN macro here instead.
2018-06-12 15:03:51 +02:00
4bfc7b9e7d Fix crahs using ndof 2018-06-12 14:50:57 +02:00
18ae64858b Cleanup: Indentation 2018-06-12 14:43:40 +02:00
c2abb6d3fc Particles: Use local RNG
Currently only obvious cases, but is already a progress.
2018-06-12 14:30:50 +02:00
49b39ea851 Duplication: Use local RNG
Makes generation safe for threading.
2018-06-12 14:30:50 +02:00
cb409bb219 Add utility function to help debugging concurrent usage of global RNG
Checks are disabled by default, but we need to make them enabled by
porting all required areas, or by removing API which uses global RNG.
2018-06-12 14:30:50 +02:00
3b2e19cb4c Depsgraph: Ensure modifiers evaluation doesn't happen on top evaluated mesh 2018-06-12 14:30:50 +02:00
c279592123 Depsgraph: Don't update derived mesh for particles on render
Render depsgraph is evaluated from scratch, so it should not be needed
to do such a call.

This also prevents modifier stack from being evaluated on top of already
evaluated mesh
2018-06-12 14:30:50 +02:00
0d817e68ef Depsgraph: Add debug option to invalidate data tagged for update
See comment for INVALIDATE_ON_FLUSH.
2018-06-12 14:30:50 +02:00
3263e5e881 Depsgraph: Set temp object to invalid state as soon as it becomes inaccessible 2018-06-12 14:30:50 +02:00
abdea5754e Depsgraph: Cleanup, wrap private functions to an anonymous namespace 2018-06-12 14:30:50 +02:00
43eebdfebd Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/DocumentImporter.cpp
	source/blender/editors/include/ED_object.h
	source/blender/editors/object/object_modifier.c
2018-06-12 12:58:31 +02:00
be57cf9b2a Cleanup: remove moar G.main from BKE area. 2018-06-12 12:53:27 +02:00
c98b2e74df Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_relations.c
2018-06-12 12:38:54 +02:00
5508b572ea Cleanup: remove some G.main from ED's animsys.
The easy ones - there some much, much trickier to tackle there...
2018-06-12 12:28:14 +02:00
fdd26faa49 LookDev: Move lookdev balls when menu switches 2018-06-12 12:24:05 +02:00
ab0daa1866 Studiolight: Disabled irradiance icons 2018-06-12 11:53:34 +02:00
8cca1abcb1 Studiolight: Bumped the radiance buffer to RGBA16F
Fixes issue reported at
https://devtalk.blender.org/t/lookdev-ibl-result/890/3
2018-06-12 11:51:04 +02:00
e1f24a8615 Studiolight: cache irradiance buffer 2018-06-12 11:51:04 +02:00
75bcb70c60 Cleanup: remove some G.main from BKE area. 2018-06-12 11:21:54 +02:00
d2e691b91a UI: fix crash with HUD panel size
There can be no panels in the region.
2018-06-12 11:18:52 +02:00
6d152c5997 UI: remove redo popover from topbar
See: T55039
2018-06-12 10:52:27 +02:00
7bf4023689 Fix T55448: Typo in Cycles CUDA debug output
Reviewers: sergey, lukasstockner97

Reviewed By: lukasstockner97

Tags: #cycles, #bf_blender

Differential Revision: https://developer.blender.org/D3472
2018-06-12 10:45:32 +02:00
4bf331c0fc UI: Initial persistent floating redo panel
This is the first step to moving redo out of the top-bar, see: T55039

- Support for floating panels in the ScrArea has been added.
- A new region type RGN_TYPE_HUD is used for floating settings input.
- Only one HUD should be visible at a time.
- Currently HUD regions are only visible
  for 3D view and image space types.
- There are currently some remaining glitches with hide/show
  that need further investigation.
2018-06-12 10:42:49 +02:00
3937e8fbc3 UI: non editable template_icon_views are rendered as label
This is also a way to render an large preview icon without the selection
control. This is used by the studiolights in the userprefs that only
displays the preview of the light.
2018-06-12 08:45:38 +02:00
a2027c6587 UI: replace ui_draw_search_back w/ general code
Useful for drawing any kind of region-background.
2018-06-12 08:14:13 +02:00
35da1afa09 Cleanup: remove unused context args 2018-06-12 07:59:27 +02:00
1dc93f90a0 Cleanup: remove image->bindcode, always wrap in GPUTexture.
This simplifies code, and will hopefully make UDIM usage of GPUTexture
a little easier.
2018-06-11 23:24:04 +02:00
1d111cd046 Revert "Cleanup: remove image->bindcode, always wrap in GPUTexture."
This reverts commit 8242a5bc85. This isn't
quite ready to use yet.
2018-06-11 22:35:09 +02:00
8242a5bc85 Cleanup: remove image->bindcode, always wrap in GPUTexture. 2018-06-11 22:30:59 +02:00
0054dff67e Fix part of T55439: don't add indirectly linked objects to the scene on link. 2018-06-11 21:51:21 +02:00
3816502b7c Drivers: ensure Python expressions are cached with copy-on-write.
Store the compiled expressions on the original driver.

Ref T55442.
2018-06-11 21:34:21 +02:00
2bbe0c4ef4 Cleanup: fix compiler warnings. 2018-06-11 21:21:41 +02:00
76c7c66b02 Fix accidental addons submodule change in previous commit. 2018-06-11 21:13:02 +02:00
Edmund Kapusniak
c08716d3ee Fix crash with OpenGL rendering in multiple threads on macOS.
On macOS we must always go through BLI_thread_local_get/set().

Differential Revision: https://developer.blender.org/D3470
2018-06-11 21:10:24 +02:00
9520fc0ff7 Pose: optimize pose rebuild for copy-on-write.
Ref T55442.
2018-06-11 20:48:18 +02:00
691471fe22 Cleanup: add simplified panel callbacks 2018-06-11 19:31:56 +02:00
d4b4504260 Improve/partially fix overriding of Object material pointers.
Basic workflow shall now work, still lots to do in the UI (ID template
needs some love to reflect overriden status ;) ).
2018-06-11 19:29:15 +02:00
b5f67bfd83 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-11 21:24:51 +05:30
c31bc465ea Revert previous commit and do proper fix for missing typeinfo in nodes. 2018-06-11 17:39:39 +02:00
1255129932 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-11 21:03:07 +05:30
7529690df3 GHOST: GLX: Remove XInitThreads
This was needed because we were sharing opengl contexts across multiple
threads. With the recent refactor this should be no longer needed.
2018-06-11 17:23:06 +02:00
faf7453b45 Fix crash in loading/applying static overrides of some nodal material.
No real idea why node's typeinfo is NULL here... but think we do not
care much in that case, so just adding some NULL checks for now.
2018-06-11 17:12:47 +02:00
aca403c819 GHOST: Fix uninitialized values. 2018-06-11 17:07:52 +02:00
4ffd153dbf Fix crash when doing Sculpt->Edit->Sculpt switch.
We actually get fully rid of BKE_object_free_derived_mesh_caches usages,
now always using BKE_object_free_derived_caches (bad name, btw, should
be 'evaluated_caches ;) )...
2018-06-11 18:58:21 +02:00
3df809958b WM: use layout/draw callbacks for buttons space 2018-06-11 18:39:46 +02:00
3e1f83a1dc WM: split panel drawing into layout and draw
This matches changes made to the header.
2018-06-11 18:39:46 +02:00
1f1ca74476 Outlines: Make Xray outlines 2px thick instead of 3px 2018-06-11 18:04:00 +02:00
638590078c Outlines: Make outlines in xray mode not occluded.
This is visually too distracting (flickering). Until we have a better
solution, just disable occlusion fading.
2018-06-11 18:04:00 +02:00
05111d79d0 Cleanup: remove unused DAG_EVAL_PREVIEW mode. 2018-06-11 17:06:28 +02:00
2abb156b9f Cleanup: remove object.is_visible.
Depsgraph already iterates over visible objects, and since this was only
valid for objects evaluated with the depsgraph it was confusing.
2018-06-11 17:06:28 +02:00
73b9531dcf Fix incorrect object selection test in outliner and rigid body. 2018-06-11 17:06:28 +02:00
0461f45e5e Fix T55436: crash with point density and shader tweaking.
With copy-on-write we can no longer assumes the point density data is
available after Cycles synchronization with Blender data is done. So
force it to be loaded earlier, even if it's not great for interactivity.
2018-06-11 17:06:28 +02:00
84692844a3 Fix merge error in 908b696, removed files were accidentally added back. 2018-06-11 17:06:28 +02:00
27b6734022 GHOST: Fix uninitialized var
Was causing crash on startup.
2018-06-11 17:04:59 +02:00
a753c6e11a UI: split left/right header buttons
- Added flexible separators to
  Clip, Graph, Dopesheet, Image, Node, Timeline, 3D View.
- Added graying out for Proportional Editing
  menus to avoid popping when right-aligned.
- Slightly re-arranged some controls,
  so they can be on correct side of the separators.

Patch by @billreynish
2018-06-11 17:01:10 +02:00
17ee4836ab Fix: Remove UI_BLOCK_MOVEMOUSE_QUIT from popovers
This was causing driver editing popovers to just keep disappearing
whenever you accidentally moved the mouse away, making the popovers
there nearly useless.

After testing with the other popovers we have in other places, I don't
really see why we needed this flag enabled in the first place. You can
still switch between popovers in the topbar by mousing over the others,
and if you want to dismiss without clicking to escape, you can go over a
standard menu instead OR just move back towards the button that spawned it.

Let's just test this out for a while and see how it goes. Maybe we don't
need a more invasive solution here...
2018-06-12 02:49:12 +12:00
204c167c72 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_mesh.h
	source/blender/blenkernel/intern/mesh_convert.c
	source/blender/editors/interface/interface_eyedropper_color.c
	source/blender/editors/object/object_add.c
	source/blender/editors/space_image/image_ops.c
	source/blender/makesrna/intern/rna_image.c
	source/blender/windowmanager/intern/wm_draw.c
2018-06-11 16:02:46 +02:00
9e439197ed Workbench: API Changes
- merged matcap and studioLight api
2018-06-11 15:54:24 +02:00
78a8d3685b Cleanup: remove moar ugly G.main usages...
BKE_image was an ugly nest, could fix all but the ones from compositor,
so moved ugly G.main there, at least we know where the Evil is that way ;)
2018-06-11 15:40:37 +02:00
Dalai Felinto
9b39a5142f Fix T55440: Pose Mode Crash 2018-06-11 15:29:13 +02:00
800c3c5ca5 GHOST: WGL: Delay context initialization for offscreen contexts.
Same as 128926a41b but for windows.
2018-06-11 13:06:54 +02:00
b763c34e80 Cycles: Cleanup, silence strict compiler warning
There is one legit place in the code where memcpy was used as an
optimization trick. Was needed for older version of GCC, but now
it should be re-evaluated and checked if it still helps to have
that trick.

In other places it's somewhat lazy programming to zero out all
object members. That is absolutely unsafe, at the moment when
less trivial class is used as a member in that object things
will break.

Other cases were using memcpy into an object which comes from
an external library. We don't control that object, and we can
not guarantee it will always be safe for such memory tricks
and debugging bugs caused by such low level access is far fun.

Ideally we need to use more proper C++, but needs to be done with
big care, including benchmarks of each change, For now do
annoying but simple cast to void*.
2018-06-11 13:02:10 +02:00
a6e582164f Libmv: Cleanup, make strict compiler more happy
In C++ it is not really safe to memcpy objects, and newer GCC will warn
about this. However, we don't use our vector for unsafe-to-memcpy objects,
so just explicitly silence that warning.
2018-06-11 13:02:10 +02:00
5ad7bda45f Render: Fix build problem with missing GL/glew.h 2018-06-11 13:00:21 +02:00
Dalai Felinto
070830c62d Fix separator element for headers with multiple directions 2018-06-11 14:54:04 +02:00
Dalai Felinto
d90fc119c2 UI: Separator spacer
This support layout.separator_spacer() to be used by headers as a way to
dynamically separate the ui buttons.

Right now no UI file is changed, though we can use this right away in the
timeline, and shortly after in the viewport header (moving settings from
the topbar to it).

Original design by William Reynish.

Review: Campbell Barton
D3468
2018-06-11 14:46:35 +02:00
74051111eb Merge branch 'master' into blender2.8 2018-06-11 14:44:03 +02:00
160cb9a284 Merge branch 'master' into blender2.8
Conflicts:
	intern/cycles/blender/blender_object.cpp
	source/blender/alembic/intern/abc_exporter.cc
	source/blender/alembic/intern/abc_mball.cc
	source/blender/alembic/intern/abc_mball.h
	source/blender/blenkernel/BKE_anim.h
	source/blender/blenkernel/BKE_displist.h
	source/blender/blenkernel/BKE_dynamicpaint.h
	source/blender/blenkernel/BKE_group.h
	source/blender/blenkernel/BKE_mball.h
	source/blender/blenkernel/BKE_mball_tessellate.h
	source/blender/blenkernel/BKE_object.h
	source/blender/blenkernel/BKE_scene.h
	source/blender/blenkernel/intern/anim.c
	source/blender/blenkernel/intern/depsgraph.c
	source/blender/blenkernel/intern/displist.c
	source/blender/blenkernel/intern/dynamicpaint.c
	source/blender/blenkernel/intern/group.c
	source/blender/blenkernel/intern/mball.c
	source/blender/blenkernel/intern/mball_tessellate.c
	source/blender/blenkernel/intern/mesh_convert.c
	source/blender/blenkernel/intern/object.c
	source/blender/blenkernel/intern/object_dupli.c
	source/blender/blenkernel/intern/object_update.c
	source/blender/blenkernel/intern/pointcache.c
	source/blender/blenkernel/intern/scene.c
	source/blender/blenkernel/intern/smoke.c
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
	source/blender/editors/include/ED_object.h
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_edit.c
	source/blender/editors/object/object_modifier.c
	source/blender/editors/physics/dynamicpaint_ops.c
	source/blender/editors/sculpt_paint/paint_vertex.c
	source/blender/editors/sculpt_paint/sculpt_uv.c
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/space_view3d/view3d_draw.c
	source/blender/editors/transform/transform_conversions.c
	source/blender/editors/transform/transform_snap_object.c
	source/blender/editors/util/ed_util.c
	source/blender/gpu/intern/gpu_material.c
	source/blender/makesrna/intern/rna_meta.c
	source/blender/makesrna/intern/rna_object_api.c
	source/blender/modifiers/intern/MOD_dynamicpaint.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-11 14:39:38 +02:00
b7bf8b3757 Render: Create a separate gl context for rendering.
This should take care of all the threading stability issues some people
are reporting.
2018-06-11 13:55:02 +02:00
128926a41b GHOST: Delay opengl context initialization
This way they can be init in their owner thread. Contexts should not be
shared accross threads. Once you make a context active on a thread it is
owned by the thread.

This commit only have the GLX backend updated but should not break orther
platform.
2018-06-11 13:55:02 +02:00
1463ec6896 DRW: Rename ogl_context to gl_context
We might not use opengl forever :)
2018-06-11 13:55:02 +02:00
228ba8475a DRW: Add cache reset.
This is a temporary solution to the use of the shared cache.

Ideally this cache should be per gl drawing context.
2018-06-11 13:55:02 +02:00
0ec2e7ad53 Shading: Change icon of userpreference in Shading popover 2018-06-11 12:48:01 +02:00
d0956e9cb3 Cleanup: Moar G.main removal of Hell.
This commit actually adds some G.main... but at much, much higher level
than the ones it removes, so should still be better ;)
2018-06-11 12:15:14 +02:00
8055ed2741 Cleanup: remove some G.main usages... 2018-06-11 12:15:14 +02:00
a67cc72232 MetaBall support for Workbench + EEVEE
Note: Metaballs only support the first material slot. Splicing it per
material would create empty Batches. In order to overcome this we set
the batch for other materials to NULL. We added extra checks in EEVEE
and Workbench to not draw when the geom is NULL.
2018-06-11 11:52:41 +02:00
5aa8d981ec Workbench: Flipping MatCaps for forward shading 2018-06-11 11:52:41 +02:00
f2e60b53a7 Fix pchan head/tail original values not being set 2018-06-11 11:37:22 +02:00
13d238729b Fix bad level stubs 2018-06-11 11:36:22 +02:00
Dalai Felinto
df72101631 Revert unintended changes to depsgraph
This partially reverts f8d7df6f16.
I committed this bit by mistake.
2018-06-11 11:33:09 +02:00
4ac87d58eb Merge branch 'master' into blender2.8 2018-06-11 11:06:43 +02:00
28c34ae7e2 Cleanup: Use BLI_strncpy
It has behavior which we expect, and silences strict compiler warning.
2018-06-11 11:06:15 +02:00
4d339f56fe Fix T55278: Lightmap Pack > New Image broken when active object is None
thanx bblanimation (Christopher Gearhart) for spotting the issue and
providing the fix!

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3449
2018-06-11 11:02:07 +02:00
b6be8c0394 Merge branch 'master' into blender2.8 2018-06-11 10:46:33 +02:00
9e8bd3a072 path_util: avoid overflow w/ strtoll use
Also style cleanup.
2018-06-11 10:46:02 +02:00
ca36364a6a 3D View: move screen overlays to the top
- Frame & object name now top left.
- Axis now top right (when view navigation disabled).

This is needed so we can use the lower area for redo popup, see T55386.
2018-06-11 10:37:56 +02:00
91958436fb Merge branch 'master' into blender2.8 2018-06-11 10:28:36 +02:00
1d8d4e03f5 Fix PyConsole: Drag events finished early in modal text selection 2018-06-11 10:18:51 +02:00
0ec6196ae3 Merge branch 'master' into blender2.8 2018-06-11 10:03:42 +02:00
7ac0272b77 Fix T55140: opened image doesn't show up in movie clip editor
atoi usage in BLI_stringdec could overflow, use strtoll instead and
check
valid range with INT_MIN and INT_MAX

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3452
2018-06-11 09:57:16 +02:00
05e7802a97 WIP: Add driver eyedropper operator button beside the "add input" button
This doesn't work currently. Needs more investigation why.
2018-06-11 19:43:28 +12:00
21c24c0423 Drivers UI: Introduce more whitespace, to make the sections clearer 2018-06-11 19:43:28 +12:00
5843de3251 Merge branch 'master' into blender2.8 2018-06-11 09:34:04 +02:00
7c10ed7e72 Cleanup: Remove the "all" parameter from "ANIM_OT_driver_button_edit"
This won't ever be used for this operator, as the "edit" operator should
only ever be used for dealign with a single driver - the one under the
cursor.
2018-06-11 19:27:53 +12:00
3122366b28 Overlays: Reserve space for a "Onion Skins" overlay
While we probably won't be getting a general purpose "Onion Skinning"
overlay anytime soon for meshes, etc. (at least not before the
depsgraph stabilises, and we also get geometry caching working),
for the Grease Pencil integration at least, it makes sense to move
GP objects to using a more general/future-proof solution, instead
of continuing to use a special/dedicated button in the header.

Currently the UI part of this is commented out. Also, the GP branch
doesn't need to move to this pre-merge. But, since 2.8 changes move
fast, it's better to reserve the space now to have it next to motionpaths,
than introduce it later.
2018-06-11 19:15:05 +12:00
4d67655348 Drivers UI: Don't show the Copy/Paste driver dvars buttons in the popovers
The copy/paste driver variables buttons currently only work when used in the
Graph Editor as they rely on being able to have the "active F-Curve" context
info that's only present in the Graph Editor (in Drivers Editor mode).
Instead of having them constantly greyed out in the popover, it's easier
to just hide them for now. Besides, this is probably more of an "advanced"
feature that we don't need to expose in the simple UI.
2018-06-11 19:15:05 +12:00
474a145d78 Fix T55349: crash adding paint slot when object is on hidden layer
use better poll and get ob with 'ED_object_active_context' (instead of
'CTX_data_active_object')

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3467
2018-06-11 09:12:29 +02:00
d7373f6c49 Cleanup: warnings 2018-06-11 09:03:39 +02:00
1ff28c2650 Drivers UI Fix: Use uiLayoutSetContextFromBut() so that operators will work in the panel
This fixes the problem where the "Show in Drivers Editor" button would
not actually select and highlight the driver under the mouse.

(TODO: The channels still aren't getting selected properly in the
channels list, but at least the properties show correctly)
2018-06-11 18:55:29 +12:00
0c6410ec0c Added ability to harden normals.
Uses 2 different params: mode and strength. There are still some
hiccups with how 2.8 interacts with normals. Will resolve as
support gets better
2018-06-11 11:58:26 +05:30
9ab26bec27 Driver Workflow (T55145): Tweak to default expression used for new drivers created from UI
Previously, newly created drivers were set to "Scripted Expression"
mode and had their 'expression' field set to the pre-driver value of the
property, so that adding a driver didn't cause the property to immediately
lose its old value (and potentially causing havok in the scene).
However, this had the unintended consequence of making the driver setup
workflow more cumbersome, as you first had to replace that value with
the name of the driver variable before your driver would work.

This commit works around this issue by trying to combine the best of both
worlds (quite literally):  Now, the driver expression for drivers created
using Ctrl-D will be "var + <old value>".

Thus, in the simplest case, the driver will do something as soon as you fill
out the driver variable settings (e.g. just filling out the Target Object field
will do it), meaning you get your drivers working faster. Of course, it may now
be necessary to edit out the old-value, and/or it might be a bit more confusing
what/why it's there for newbies. However, the improved ease of setup, and/or
a more tangible example of how an expression may be constructed outweigh the
downsides IMO.
2018-06-11 17:44:08 +12:00
4605e57b0f Drivers Workflow (T55145): Improvements to "Add Driver" workflow
This commit implements a new behaviour for the "Add Driver" functionality
(invoked from the RMB menu on a property, or by pressing Ctrl-D).

Instead of spawning a context menu asking you to pick the way
you want to create a driver, it will now just create a driver on the
property under the mouse and then show the "Edit Drivers" popover so
that you can immediately start editing the properties of this driver.
This way, the whole process is more visual and feels less blocking /
constrained, with less upfront decisions needed immediately.

Notes:
* The new behaviour is equivalent to choosing the "Manually Create (Single)"
  and then doing a "Edit Driver" on the property
* Renamed the old "ANIM_OT_driver_button_add" operator to
  "ANIM_OT_driver_button_add_menu". It will probably go away
  in the near future, but it's better to keep it around for a
  while longer still until the new workflow settles down.
2018-06-11 17:35:13 +12:00
f1e3e50294 Sub-panels for Cycles Depth of Field 2018-06-10 21:27:43 +02:00
865acd9247 Sub-panel for camera DoF for EEVEE 2018-06-10 21:06:49 +02:00
5290882bd5 Workbench: Xray: Fix hairs with matcaps. 2018-06-10 20:28:04 +02:00
20b0194cd3 Workbench: Xray: Make dithered depth dependant on alpha.
The range is 0.25 to 0.75 opacity when the Xray opacity is between 0.0 to 1.0.

This is to avoid loosing completely the sense of occlusion when having no
other solid drawing than the wireframe and loosing the transparency when
xray alpha is at 1.0.

Also replace Bayer (checkerboard) method by interlieved gradient noise to
minimize the chance to loose an occluded line completely.

Other noise function could be tested in the future.
2018-06-10 20:06:26 +02:00
542462d35c Workbench: Xray: Add selected/active non-occluded outlines
This Fix the problem when multiple objects are selected and one of them
occlude the others. You cannot see clearly what is selected.

With this option, selection is more clear when Xray mode is enabled.
2018-06-10 20:06:26 +02:00
e321fc4a7c Workbench: Xray: Make nearest surfaces more clear
By using equation 7 from the paper, we make the surfaces nearest to the
viewpoint appear more "opaque". This gives better sense of ordering than
the previous weighting function that was really not doing anything.
2018-06-10 20:06:26 +02:00
15862e1990 Workbench: Xray: Lower hairs opacity
Since hairs are very likely to owerflow the weight buffer, we divide their
alpha value by 3.

This might become a particle system setting if needed.
2018-06-10 20:06:26 +02:00
95894421cb Workbench: Xray: Optimize and fix implementation.
There was a method explained in the Weighted Blended Order-Independent
Transparency paper to support hardware that does not support per render
target blending function.

So now only 2 geometry passes are required instead of 3 (one being the
outline/depth fill pass).

This also fix how the blending is done. There was some premult confusion
in the implementation.
2018-06-10 20:06:26 +02:00
b23d5132a9 UI: Add redo last to edit-menu 2018-06-10 17:15:40 +02:00
9129319647 Experimental Tweak: Only show relationship lines between objects when either the parent/child object is selected
As in Pose Mode, the idea here it to try to reduce viewport complexity
without requiring users to turn off the overlay completely all the time.
For example, a background prop (e.g. a tree with a tyre hanging off it,
or a branch with hand-placed leaves) won't be cluttering the viewport with
its relationship lines all the time, when you're trying to do something else.

When you really do need to see these lines, you can still select the object
in question, and you'll see the lines for which objects are its children
or what its parent is. And to see all lines, you can still always select all
objects.
2018-06-11 02:49:38 +12:00
ca16c74e87 Viewport: "Show Relationship Lines" overlay toggle is now respected by Object Mode & Armatures (Edit/Pose) 2018-06-11 02:49:38 +12:00
937e4fb49a UI: change toolbar icon size from 38 -> 32 2018-06-10 16:42:19 +02:00
a978654977 UI: use property split for UV mask panel 2018-06-10 16:29:55 +02:00
4d1193feb3 UI: correct jitter button 2018-06-10 16:08:19 +02:00
87a71f36fc UI: use split property for tool settings
Patch by @billreynish w/ edits
2018-06-10 15:58:39 +02:00
c10f1379cd UI: remove tab use in the tool-settings 2018-06-10 15:40:02 +02:00
e5a0cf730a UI: use two columns for the overlay popover
Also use sub-panels.

Patch by @billreynish w/ edits.
2018-06-10 15:24:04 +02:00
afa45fb858 UI: Use flow layout for object properties context
Mainly as a proof of concept and test to use in other contexts.
2018-06-10 13:56:28 +02:00
a68bed06f6 Merge branch 'master' into blender2.8 2018-06-10 12:11:16 +02:00
d0a16772ad WM: add macros to check mouse button/gesture/wheel
Use to check click/drag,
fixes issue with mouse wheel triggering pie menu.
2018-06-10 12:08:09 +02:00
8314be7c89 Fix T55423: GLSL compilation error Flat + XRay 2018-06-10 11:51:07 +02:00
a52152c59f Merge branch 'master' into blender2.8 2018-06-10 08:21:50 +02:00
ae01df5779 Cleanup: trailing space in CMake files 2018-06-10 08:19:03 +02:00
dd67d703a7 Workbench: Fix material compilation. 2018-06-09 21:11:03 +02:00
147eef9741 Eevee: Improve compilation time (reduce branching).
This patch reduce the branching in the lamp loop, improving compilation time
noticeably (2372ms to 1785ms for the default shader).

This should not change the appearance of the shader.

Performance impact is negligeable.
2018-06-09 21:11:03 +02:00
45a5ddb57b Merge branch 'master' into blender2.8 2018-06-09 18:58:14 +02:00
2e14b7fb97 RNA: remove Layout.introspect
This was added as an experiment to extract information for docs
but this was never all that useful for its intended purpose.
2018-06-09 18:55:51 +02:00
419a813938 Merge branch 'master' into blender2.8 2018-06-09 18:48:11 +02:00
83cb34ccd1 Cleanup: unused functions 2018-06-09 18:47:39 +02:00
726ed7244e UI: always show popover subpanel header text 2018-06-09 18:15:08 +02:00
2ae404252d UI: fix popover subpanel header display 2018-06-09 18:03:22 +02:00
7fdde7fd86 UI: use draw_header function for popover buttons
Add 'is_popover' for panel draw functions to check if they're in a popup.
This puts dyntopo toggle next to the popover.
2018-06-09 17:38:32 +02:00
ec8a20fec0 Add new GridFlow layout.
This mimics the 'spreadsheet' behavior. Columns and/or rows can have
equal sizes, or adapt to their content - but always in a grid way (i.e.
all items in a same column will always have same available width, and
all items in a same row will always have same available height).
Also, you can fill (order) the grid in a row- or column-major way.

Not used anywhere for now.

Differential: https://developer.blender.org/D2395
2018-06-09 16:54:26 +02:00
5159ce640f Cleanup: style 2018-06-09 16:39:40 +02:00
70f8eaf1b7 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/space_view3d/drawobject.c
2018-06-09 15:18:21 +02:00
638de72277 Cleanup: remove some G.main usages. 2018-06-09 15:17:04 +02:00
2ca8230f67 Merge branch 'master' into blender2.8 2018-06-09 14:43:01 +02:00
fb565ddb68 Cleanup: trailing space in RNA 2018-06-09 14:40:09 +02:00
56a47e58f4 Cleanup: style 2018-06-09 14:30:32 +02:00
09ce794dc8 UI: initial support for parent panels in popovers
Currently this just includes the panels, no support for collapsing yet.
2018-06-09 14:21:39 +02:00
8f40af6dcd RNA: revert object mode re-order
This was done so numbered shortcuts made sense.
Now order matches master.
2018-06-09 12:57:15 +02:00
964c5421df Merge branch 'master' into blender2.8 2018-06-09 12:56:37 +02:00
9bcced83ee GHOST/X11: Print the keycode w/ debug enabled 2018-06-09 12:53:39 +02:00
3bbef95747 Workbench: Fix xray normal not being normalized. 2018-06-09 12:44:56 +02:00
337aab59e9 Workbench: Matcaps: Fix matcap under perspective.
This fixes the problem that matcaps have when using a very larg FOV in
perspective view.

This was because it was stupidly using the normal direction which can not
aligned with the view vector under perspective.

So to workaround this problem we don't use the normal as is, but compute
how much it's facing the camera.

This changes how matcaps looks in perspective because they now always use
the full range of the matcap (which is expected).
2018-06-09 12:44:56 +02:00
a1b42b79b3 Workbench: Fix incident vector calculation.
This fixes specular in perspective view.
2018-06-09 12:44:56 +02:00
7ce81484f8 Merge branch 'master' into blender2.8 2018-06-09 12:06:33 +02:00
6f4c7f1f01 GHOST/X11: Correct non-latin kb workaround case
Harmless since this is always enabled,
only do this for easier troubleshooting when disabling the define.
2018-06-09 12:04:07 +02:00
b492a0e767 Merge branch 'master' into blender2.8 2018-06-09 11:27:22 +02:00
f3427cbc98 GHOST/X11: support accessing physical keycodes
This means we can check keys such as tilde in a generic way.
2018-06-09 11:23:41 +02:00
03f0ecca93 GHOST/X11: Map unknown us.intl key to accentgrave 2018-06-09 09:10:04 +02:00
86660aa294 Layout for materials closer to single column 2018-06-08 23:56:39 +02:00
dd2e187344 Audaspace: add support for latest ffmpeg. 2018-06-08 23:11:16 +02:00
528dc6440b Merge branch 'master' into blender2.8 2018-06-08 22:19:39 +02:00
5165d62931 WM: correct recent change to click/drag detection
fb1915d870 - caused click/drag events not to be detected.

Now check a key is a mouse or keyboard event.
2018-06-08 22:17:21 +02:00
d1ab958fd4 Merge branch 'master' into 28 2018-06-08 19:03:37 +02:00
4f2eac3b39 WM: fix panel drag event handling 2018-06-08 19:03:29 +02:00
bf77efb684 WM: fix node link & background drag 2018-06-08 19:03:29 +02:00
1857823839 WM: fix panel drag event handling 2018-06-08 18:58:41 +02:00
2dc7555522 WM: fix node link & background drag 2018-06-08 18:55:47 +02:00
Dalai Felinto
f8d7df6f16 Depsgraph: Remove no longer needed nodetree values copying on eval
Note: Depsgraph still calls the nodetree eval function that doesn't
nothing in turn. We can remove it, but it is harmless though.
2018-06-08 17:52:49 +02:00
f2fd5987d0 UI: clear properties color when empty 2018-06-08 17:30:00 +02:00
3e86bb2d0b Sculpt/Paint: move PBVH building to use evaluated mesh instead of deprecated Derivedmesh.
Pretty straightforward changes, merely mimicking dm-related code,
which was already essentially using either Mesh or BMesh data to
build the PBVH...

Note that we "lose" the subsurf (a.k.a. grid) PBVH case here, but that
one was already dead code in current blender2.8, since final dm is
always a cddm built from evaluated mesh.

Proper fix is pending new code for subsurf/multires area.
2018-06-08 17:23:25 +02:00
1ce55693f5 UI: remove tools space type, use properties context
We've decieded to use tools context in properties editor.
2018-06-08 16:35:05 +02:00
Dalai Felinto
9d59d20957 DRW: Fix animated material not refreshing
This introduces a garbage collection system similar to gpu_texture.
2018-06-08 16:29:33 +02:00
0417f205f5 Fix crash with wertex and weight modes
Similar to recent sculpt mode.
2018-06-08 16:24:07 +02:00
Dalai Felinto
f638ad61b8 Rename: GPU_material_get_uniform_buffer > GPU_material_uniform_buffer_get 2018-06-08 16:20:34 +02:00
Dalai Felinto
856a79e1fb Rename: GPU_texture_orphans 2018-06-08 16:20:34 +02:00
cbbf8bbbb4 Workbench: XFlip Matcap per 3D View
Note: Icons are not yet updated.
2018-06-08 16:13:49 +02:00
Julian Eisel
fc85096dc8 Fix T55387: Render fullscreen from top menu crashes Blender
Would try to use data from global area for the newly created fullscreen area.
This should not happen, so instead of a global area use first area from layout.
2018-06-08 15:59:34 +02:00
4df45e18dc Alembic: replaced BLI_assert() with comment why the assert is wrong
The comment also hints at what should be fixed, instead.
2018-06-08 15:51:49 +02:00
249a41bc7c Alembic: slight clarifications 2018-06-08 15:51:49 +02:00
ba31c4d684 Alembic export: get evaluated object when exporting shape 2018-06-08 15:51:49 +02:00
2a771cbc58 Alembic: Moved a BLI_assert
The assert should only be triggered when assigning a pointer, and not
simply when checking the pointer.
2018-06-08 15:51:49 +02:00
335e030753 mesh_get_eval_final() should check ob->runtime.mesh_eval
It has nothing to do with ob->derivedFinal, which it checked before.
2018-06-08 15:51:49 +02:00
934b9e80d0 Add check in BKE_pbvh_apply_vertCos that number of deforming cos matches number of pbvh vertices.
This shall help catching issues in future.
2018-06-08 15:43:57 +02:00
06357b23a2 Fix T55404: Auto key with only-available doesn't work 2018-06-08 15:43:04 +02:00
9f2447cbd8 Code cleanup 2018-06-08 15:35:25 +02:00
70b3fb3781 Workbench: Custom StudioLight UI 2018-06-08 15:34:46 +02:00
6739bb195e Merge branch 'master' into blender2.8 2018-06-08 15:22:28 +02:00
540e85d567 GHOST/X11: Map unknown es,dk keys to accentgrave 2018-06-08 15:21:20 +02:00
0dd9a9e66a Alembic: fixed MSVC incompatibility 2018-06-08 15:09:10 +02:00
f504306671 Workbench: Default specular settings when no materials are used 2018-06-08 15:07:30 +02:00
97e7d9f90b Merge branch 'master' into blender2.8 2018-06-08 14:57:17 +02:00
d97df0d0e6 Cleanup: unused var, trailing space 2018-06-08 14:56:09 +02:00
4127aeb7a5 GHOST/X11: Map unknown de,fr keys to accentgrave
This still uses the correct string when typing text,
it just allows the key to be used in keymaps.

We should eventually add scan-code support.
2018-06-08 14:53:03 +02:00
e36ecb8a66 Alembic unit tests: fixed compiler errors
This doesn't mean the code is correct, but at least it builds.
2018-06-08 14:48:50 +02:00
94aa4d1657 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_sequencer.h
	source/blender/blenkernel/intern/sequencer.c
	source/blender/editors/curve/editcurve_paint.c
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/gpencil/gpencil_paint.c
	source/blender/editors/gpencil/gpencil_utils.c
	source/blender/editors/include/ED_object.h
	source/blender/editors/include/ED_view3d.h
	source/blender/editors/interface/interface_eyedropper_depth.c
	source/blender/editors/render/render_opengl.c
	source/blender/editors/sculpt_paint/paint_image_proj.c
	source/blender/editors/sculpt_paint/sculpt.c
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/space_view3d/view3d_draw.c
	source/blender/editors/space_view3d/view3d_edit.c
	source/blender/editors/space_view3d/view3d_intern.h
	source/blender/editors/space_view3d/view3d_select.c
	source/blender/editors/space_view3d/view3d_utils.c
	source/blender/editors/transform/transform_conversions.c
	source/blender/editors/transform/transform_snap.c
	source/blender/python/intern/gpu_offscreen.c
	source/blender/windowmanager/intern/wm_files.c
2018-06-08 14:38:57 +02:00
ae3e59fb61 Fix T55380: Crash when getting out of EditMode in some cases
Derived meshes are to be dead, so soon this code will be removed as well.
2018-06-08 14:38:01 +02:00
aff6cc9cf1 Workbench: Lights user pref 2018-06-08 14:30:32 +02:00
fb1915d870 Prevent wheel causing spurious click/drag events 2018-06-08 14:09:45 +02:00
33437719c1 Alembic import: fixed memory management for CoW copies of CacheFile blocks
When a CacheFile datablock is copied to an in-main datablock, it means that
the new copy should be independent of the old copy. In this case certain
properties are reset/duplicated. When it is copied to a no-main datablock,
we assume this is a copy-on-write copy that's used for evaluating things,
in which case the handle and object paths are referenced instead of
reset/ duplicated. This prevents us from re-opening the Alembic file every
time a new CoW copy is made.

The same approach is taken when freeing data (only when an in-main datablock
is freed do we actually free the data).
2018-06-08 13:52:53 +02:00
0c7fc3a961 Alembic import: assign cache_file handle to original datablock 2018-06-08 13:52:53 +02:00
7b6af843c2 Cleanup: getting rid of G.main.
Sometimes one needs a *lot* of changes for a single G.main... :/
2018-06-08 12:17:22 +02:00
c5904574cb Fix T55391: Anim render only shows scene state at current frame (no animation) 2018-06-08 12:12:52 +02:00
3926ec6aa1 Studiolight: Segment when using float based matcaps 2018-06-08 12:11:05 +02:00
1f1e26f1ab Depsgraph: Fix missing relations when camera has drivers 2018-06-08 12:04:53 +02:00
d38c7db5e1 Depsgraph: Cleanup, make conditions more clear and less indented 2018-06-08 11:57:16 +02:00
4017b48331 Depsgraph: Don't optimize out collections used by duplication system
This makes evaluated objects to point to a non-evaluated collection,
which is already really bad. What is even more worse, objects in those
collections are not evaluated either.

Proper solution would be to implement visibility flag for nodes, which
will be set to 0 for transform/geometry components, but which will be
1 for copy-on-write components.

This way we will guarantee consistency of dependency graph.

For now this change is good enough and unlocks production.

Fixes T55375: Crash when changing visibility of instanced collection
Fixes T55357: Particle geometry crash
2018-06-08 11:57:16 +02:00
378e42e119 Depsgraph: Cleanup, indentation 2018-06-08 11:57:16 +02:00
9600c7cb05 Depsgraph: Cleanup, make conditions more clear and less indented 2018-06-08 11:57:16 +02:00
691282e571 Alembic export: create render-evaluated depsgraph for exporting
Previously the context depsgraph was used, which (most likely) uses
viewport evaluation instead of render evaluation.
2018-06-08 11:53:03 +02:00
55606dbdbc CMake: disable WITH_COMPILER_ASAN for CMAKE_BUILD_TYPE Release 2018-06-08 11:45:53 +02:00
346a1d445e Cleanup: redundant check 2018-06-08 11:28:42 +02:00
0297274720 Merge branch 'master' into blender2.8 2018-06-08 10:54:51 +02:00
dff8a7db73 Fix regression in grease pencil drawing
Drag events finished drawing early.
2018-06-08 10:52:49 +02:00
b3c8ffcb3e Workbench: UI for custom studio lights/matcaps
- all known image types are supported
- BpyAPI for studiolights added
- added open user pref operator in shading menu
- possible to add multiple files in a single run

For now refreshing studio lights will free all studiolights and reinit
the whole mechanism. This can be improved by only freeing deleted, reset
updated and add new custom studiolights.

details to show currently only shows the path we perhaps want to add
other information also
2018-06-08 10:41:24 +02:00
4d16d00154 Keymap: continued testing/development (search key)
Use Accent/Grave for search, to be more convenient than F-Keys.

This sets F3 back to what it was before.
2018-06-08 10:07:41 +02:00
3d681108bf Merge branch 'master' into blender2.8 2018-06-08 08:50:13 +02:00
20367898fe Fix T55301: Transform confirm on release fails w/ MMB 2018-06-08 08:48:21 +02:00
e3fe8ce00b WM: backport event/keymap type util from 2.8 2018-06-08 08:46:31 +02:00
908b6960c0 Merge branch 'master' into blender2.8 2018-06-08 08:10:35 +02:00
a25c11fd8d Cleanup: trailing space
Remove from blender/nodes, collada, blenfont & render.
2018-06-08 08:07:48 +02:00
d352a0adc5 Merge branch 'master' into blender2.8 2018-06-08 08:02:50 +02:00
009c38df53 Fix recently added drag events closing menus 2018-06-08 08:01:43 +02:00
8b5ce6e843 Transform: fix non-3D view editmode assert 2018-06-08 06:31:40 +02:00
30cd35a37b Keymap: continued testing/development
After testing in the studio and extending the event system for
drag events, we've agreed on adjustments to the new keymap,
see: T55162

- Tab: Edit-mode toggle.
- Tab + Cursor Drag: mode switching pie menu.
- Accent/Grave: for 3D view pie menu.
- F3: Search
- 1..3, Shift-1..3: Edit mesh vertex/edge/face toggle.

Other minor changes were made, however they aren't part of the design.

- Ctrl-Shift-S: Image editor Save-As (was F3)
- Ctrl-Alt-R: Repeat history (was F3)
2018-06-07 20:46:12 +02:00
cfc4805455 Merge branch 'master' into blender2.8 2018-06-07 20:41:10 +02:00
8f49299134 WM: fix drag events applying after release 2018-06-07 20:39:17 +02:00
cfc1ddeff7 GHOST/X11: Xinput/XIM support caused double key-up
All keyboard events were sending double key events (including modifiers)
when xinput was enabled with gnome (causing much confusion!).

I cant test if XIM works,
but this isn't useful to send double events, so disabling for now.
2018-06-07 20:35:06 +02:00
Dalai Felinto
18e316bcb9 Uniform Buffer Objects: Simplification refactor
Since we are only creating this and never updating, there is no need for
the original approach with the individual data to be updated.

Note we only populate the GPU data when binding the UBO, so we can in the
future easily create the UBOs in a separate thread than the main drawing one.

Also at the moment animated materials are not working. To fix that we need
to free/tag for free the GPUMaterials in BKE_material_eval.
2018-06-07 20:34:00 +02:00
Dalai Felinto
57da454872 Uniform Buffer Object: No more dirty tagging calls/check 2018-06-07 19:42:03 +02:00
Dalai Felinto
1962ae69b1 Rename GPU_material_create_uniform_buffer > GPU_material_uniform_buffer_create 2018-06-07 19:40:47 +02:00
Dalai Felinto
56f2293a51 GLSL: No need to extract the UBO dynamic inputs 2018-06-07 19:40:08 +02:00
Dalai Felinto
e5bc37eb5e Don't tag UBO as dirty anymore otherwise it still crashes on render 2018-06-07 19:19:39 +02:00
Dalai Felinto
d17094b256 BKE_world_eval: cleanup 2018-06-07 19:16:26 +02:00
Dalai Felinto
85e2871382 No more need to tag sss as dirty for EEVEE
And for the records, this shoudn't have been added to the
GPU_material_uniform_buffer_tag_dirty function since they are unrelated.
2018-06-07 19:13:23 +02:00
d32b59fc18 Remove more printfs .... 2018-06-07 19:06:56 +02:00
630019d5f8 Alembic export: use depsgraph to get evaluated mesh/object 2018-06-07 19:01:45 +02:00
28817c82f1 Alembic export: no need to check particle's mesh_final on export
Hair writing is still not working properly, though, but at least now
samples are written at all.
2018-06-07 19:01:45 +02:00
9a873d0ab2 Alembic import: don't crash Blender when reading invalid samples 2018-06-07 19:01:45 +02:00
5852c66125 Alembic hair writer: avoid double-free 2018-06-07 19:01:45 +02:00
20d3ce57d0 Alembic export: cleaned up multiply-passed depsgraph & scene
Those can now solely be found in the ExportSettings object.
2018-06-07 19:01:45 +02:00
ef7b7efd11 Eevee: Fix hair not rendering. 2018-06-07 18:58:13 +02:00
3b556a477d Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/sculpt_paint/paint_vertex.c
	source/blender/editors/sculpt_paint/sculpt.c
	source/blender/editors/sculpt_paint/sculpt_undo.c
2018-06-07 18:45:45 +02:00
5593baea1b Remove printfs
... it's getting late here.
2018-06-07 18:44:37 +02:00
0859492c75 Fix crash cause by SSS referencing Material Nodetree data. 2018-06-07 18:43:43 +02:00
a3773dcc4f Fix memleak with GPUhairs. 2018-06-07 18:43:10 +02:00
80dcb2ced8 Cleanup: typo, and 0 -> false for booleans. 2018-06-07 18:36:16 +02:00
00233f5f78 Wireframe: Fix edges or non manifold meshes not showing.
This will show the associated edges to the vertices but that's the only
workaround I can think of right now.
2018-06-07 18:01:36 +02:00
f9ca750bdf Wireframe: Change / Optimize the limited wireframe visibility option.
This make the limited wireframe not a performance problem anymore.

However, this does change the number of edges displayed as the threshold
is now computed per vertex instead of per edges.

For this reason we extended (internaly) the range of the slider so that the
users can hide more edge.
2018-06-07 18:01:36 +02:00
3823287179 Merge branch 'master' into blender2.8 2018-06-07 17:08:55 +02:00
d274c64d22 WM: add support for drag events
This allows for a single key to be mapped to both release and drag,
useful for pie menus to share a key with a different action.
2018-06-07 17:06:01 +02:00
8dc33a81b0 Merge branch 'master' into blender2.8 2018-06-07 16:53:31 +02:00
df4525d1d9 Fix key repeat events resetting the click timer 2018-06-07 16:52:40 +02:00
f0815b1322 Merge branch 'master' into blender2.8 2018-06-07 16:45:34 +02:00
863e395ad8 Cleanup: trailing space for windowmanager 2018-06-07 16:43:52 +02:00
fcc5d7c29e Draw: Fix crash when tryign to get procedural textures with modifier disabled
Maybe disabled modifier check should be done higher in the call hierarchy.
2018-06-07 16:40:15 +02:00
64e0ab6a00 Merge branch 'master' into blender2.8 2018-06-07 16:32:40 +02:00
86aaa3efba Fix T55126: COW problem: there is an active object even if unselectable 2018-06-07 16:31:10 +02:00
e19686a35a WM: check for release instead of not pressed
Makes reasoning about events more predictable.
2018-06-07 16:19:59 +02:00
819ad49d29 Cleanup: typo. 2018-06-07 16:02:55 +02:00
1e4722eeab Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/transform/transform_generics.c
2018-06-07 15:41:57 +02:00
8a2db3ed21 Fix crash due to missing init of new bAnimContext bmain member in transform code.
From own previous G.main-busting commit.
2018-06-07 15:38:31 +02:00
d9d3e7778c Fix sculpt mode undo (COW update needed) 2018-06-07 15:15:54 +02:00
a3f520170c Merge branch 'master' into blender2.8 2018-06-07 14:58:57 +02:00
6242940639 Fix double free in dyntopo-sculpt mode undo 2018-06-07 14:54:09 +02:00
a16d835f7b Wireframe: Frustum cull them. 2018-06-07 14:50:01 +02:00
8366c3ecd8 Depsgraph: Ensure collections are up to date after modifications
Before that copied collection in copy-on-write were running out
of sync with original ones. This was causing crash with the
following scenario:

- Delete some objects from scene
- Add particle system to an object
- Change particle mode to Hair

Thanks Dalai for debug session! Pair programming ftw!
2018-06-07 14:41:29 +02:00
30ec94561c Depsgraph: Use more proper relations for scene relation 2018-06-07 14:41:29 +02:00
da8d33e2e3 Merge branch 'master' into blender2.8 2018-06-07 13:41:32 +02:00
5330f1c5d1 Fix sculpt assert on initialization 2018-06-07 13:39:49 +02:00
c63f804222 Armature: Fix flickering outline on planar custom bones. 2018-06-07 13:38:17 +02:00
508e34d0bf Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/animation/anim_deps.c
	source/blender/editors/animation/keyframing.c
	source/blender/editors/animation/keyingsets.c
	source/blender/editors/armature/pose_edit.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/gpencil/gpencil_convert.c
	source/blender/editors/include/ED_anim_api.h
	source/blender/editors/include/ED_keyframing.h
	source/blender/editors/interface/interface_anim.c
	source/blender/editors/space_action/action_edit.c
	source/blender/editors/space_graph/graph_edit.c
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/editors/transform/transform_conversions.c
	source/blender/makesrna/intern/rna_armature.c
	source/blender/makesrna/intern/rna_pose.c
	source/blender/python/intern/bpy_rna_anim.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
	source/gameengine/Converter/KX_BlenderSceneConverter.cpp
2018-06-07 13:04:16 +02:00
4e014727f6 Armature: Fix missing loose edges on custom bone shapes. 2018-06-07 12:58:23 +02:00
Dalai Felinto
3126f85d26 Fix T55062: Depsgraph: Crash with COW with EEVEE viewport
We now remove the shader for every update.

So at the moment the whole point of UBO (Uniform Buffer Objects) is that they
are more efficient than individual uniforms.

Next steps is a harmless refactor to stopping UBO from referring to original
data in the UBO, and simply copying it.

It would also be interesting to make the final shader more granular as far as
the library and required functions are concerned. Even if this doesn't impact
performance, it should give us smaller easy to debug shaders
(a simple shader now has > 5k lines!).

If performance for animated values is measureable slower after this commit we
can port the shader creation CPU side to the depsgraph - localizing the tree,
hashing, lookup, ...

Additionally we can stick to update the UBO when the material changes but not
its topology. This is very trick because of localized trees. So we will only
re-visit this if profiling hints at any benefit from it.
2018-06-07 12:56:34 +02:00
b3a7a75a26 Cleanup: remove moar G.main usages.
Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)
2018-06-07 12:48:29 +02:00
d1474371fa Fixed deadlock on viewlayer update when there are drivers
When calling the bpy.ops.poselib.apply_pose() operator from Python, Blender
would deadlock when the rig has drivers.

Similar BPy_{BEGIN,END}_ALLOW_THREADS calls were already in place in the
rna_Scene_update_tagged() function.
2018-06-07 12:37:55 +02:00
a867e63dd6 Rename "Viewport Display SSAO" sub-panel name to Screen Space Ambient Occlusion
Since it is already a sub-panel of Viewport Display anyway
2018-06-07 12:08:40 +02:00
cdbda1c3d8 GPUPass: Refactor gpupass caching system to allow fast gpumaterial creation.
This is part of the work needed to refactor the material parameters update.

Now the gpupass cache is polled before adding the gpumaterial to the
deferred compilation queue.

We store gpupasses in a single linked list grouped based on their hashes.
This is not the most efficient way but it can be improved upon later.
2018-06-07 12:02:42 +02:00
366ac88d68 Merge branch 'master' into blender2.8 2018-06-07 12:01:09 +02:00
16017178b2 Revert "Cycles: Cleanup: Don't use return on function returning void"
Not sure why exactly it is called a cleanup, the code was much more clear
and robust against possible missing return statements which are MANDATORY.

Missing return statement will:

- Cause two different BVH traversals to be run.

  Not is happening currently, but if more BVH layouts are added, it will
  become a problem.

- It is already causing assert() statements to fail, since functions are
  no longer returning when they are supposed to.

If there is any measurable reason to keep this change, let me know.
Otherwise just stick to reliable/tested/robust code.

This reverts commit ba65f7093b.
2018-06-07 11:57:57 +02:00
a54235e0c6 Particle mode: Support children drawing
The issue is that children drawing is done by object mode,
which operates with data from evaluated context. But that
data needs edit mode's cache to be properly updated first.
2018-06-07 11:31:56 +02:00
613faa0987 Draw: Don't take cache existence into account for draw type 2018-06-07 11:31:56 +02:00
72cfd5134b Draw: Use proper continue when psys is disabled 2018-06-07 11:31:56 +02:00
1aa89d9a1c Particle edit: Simplify code by benefiting from single edit context
Makes ADD brush to work.

At some point children particles draw got broken, children are not
visible for until first stroke is done. Still looking into it.
2018-06-07 11:31:56 +02:00
df0253be33 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/ArmatureExporter.cpp
	source/blender/collada/ArmatureExporter.h
	source/blender/collada/DocumentExporter.cpp
	source/blender/collada/DocumentExporter.h
	source/blender/collada/SceneExporter.cpp
	source/blender/collada/SceneExporter.h
	source/blender/collada/collada.cpp
	source/blender/collada/collada.h
	source/blender/editors/armature/armature_edit.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/include/ED_armature.h
	source/blender/editors/include/ED_object.h
	source/blender/editors/include/ED_screen.h
	source/blender/editors/io/io_collada.c
	source/blender/editors/object/object_transform.c
	source/blender/editors/screen/screen_edit.c
	source/blender/editors/screen/screen_ops.c
	source/blender/windowmanager/intern/wm.c
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_window.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-07 11:23:26 +02:00
54f9cd5283 Cleanup: Nuke moar G.main usages... 2018-06-07 11:11:46 +02:00
e27759152a Minor comment on possible TODO while validating paint ops for CoW... 2018-06-07 10:59:21 +02:00
e43065596b Alembic export: CoW/Depsgraph fixes 2018-06-07 10:48:52 +02:00
d88314ee5b Alembic export: port DerivedMesh → Mesh 2018-06-07 10:48:52 +02:00
5b0f96f97c Alembic import: port DerivedMesh → Mesh 2018-06-07 10:48:52 +02:00
f447411a82 Bone selection: user control contrast
Experiment: let the user be in control of the alpha channel as some rigs
are hard too see during bone selection. Especially rigs that were
designed for 2.79 wireframe mode.
2018-06-07 09:26:06 +02:00
7fb216d800 Workbench: respect the duplication visibility flag 2018-06-07 09:26:06 +02:00
2d2f23de10 Fix T55348: Renaming a marker can't cancel
Regression in a14005c070
2018-06-07 08:54:47 +02:00
a60d4f33c6 Merge branch 'master' into blender2.8 2018-06-07 08:15:11 +02:00
409cfba1a3 Python API: Initial 'imbuf' API
Support only basic operations new/load/write & resize.

Add now so we can extend as needed & more easily accept patches.
2018-06-07 08:00:13 +02:00
ba80d8440f Cleanup: style 2018-06-06 22:17:06 +02:00
1c4b04f1fd Merge branch 'master' into blender2.8 2018-06-06 19:52:20 +02:00
0e68751b8a Fix BLI_ASSERT_UNIT macro w/ non-finite numbers 2018-06-06 19:49:27 +02:00
70b705b5fe UI: NLA: Influence should be a factor (RNA) 2018-06-06 12:09:13 -04:00
4165a57a66 Fix broken auto-keying after copy/paste of poses.
That bug was also likely affecting other cases - basically it was making
auto-keying always key from evaluated ('visual') values, never base,
data values... Added a flag, in some cases we do want evaluated values
here, obviously.
2018-06-06 17:19:13 +02:00
Dalai Felinto
f818ff411a Cycles: use viewport duplicator visibility on preview 2018-06-06 16:44:51 +02:00
Dalai Felinto
04dfca5b9d Depsgraph: Expose (evaluation) mode in rna 2018-06-06 16:44:51 +02:00
Dalai Felinto
4e213d4216 Depsgraph iterator: Remove explicit mode
We can get the mode from the depsgraph itself.
2018-06-06 16:44:51 +02:00
Dalai Felinto
9a0506ea18 Fix T55350: Cycles: instanced hair with hidden emitter is invisible when rendering 2018-06-06 16:44:07 +02:00
36000e6da3 Cleanup: unused function 2018-06-06 16:36:00 +02:00
c44acc7fb8 Fix view_layer update function
This was no longer working, now this works the same way as
scene.update(), only it applied to the current view layer.

Caused crash running alembic export from Python.
2018-06-06 16:33:34 +02:00
0ee4785675 Cleanup: get rid of just-added G.main usage.
Was just added to ease merging of master, proper code now!
2018-06-06 16:32:09 +02:00
bb7202495a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/ArmatureExporter.cpp
	source/blender/collada/ArmatureExporter.h
	source/blender/collada/DocumentExporter.cpp
	source/blender/collada/DocumentExporter.h
	source/blender/collada/SceneExporter.cpp
	source/blender/collada/SceneExporter.h
	source/blender/collada/collada.cpp
	source/blender/collada/collada.h
	source/blender/editors/armature/armature_edit.c
	source/blender/editors/armature/editarmature_retarget.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/include/ED_armature.h
	source/blender/editors/include/ED_object.h
	source/blender/editors/include/ED_screen.h
	source/blender/editors/io/io_collada.c
	source/blender/editors/object/object_transform.c
	source/blender/editors/screen/screen_edit.c
	source/blender/editors/screen/screen_ops.c
	source/blender/windowmanager/intern/wm.c
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_window.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-06 16:25:28 +02:00
19d651ca9a View3DShading popover: Naming + alignment 2018-06-06 16:17:07 +02:00
d706101559 Depsgraph: remove legacy code for dupli group updates.
This caused crashes in some cases, and should be fully handled by
the depsgraph now.
2018-06-06 16:00:25 +02:00
bb09556be5 UI: sub panel titles draw smaller and indented. 2018-06-06 16:00:25 +02:00
f55f418867 Fix incorrect double checked lock in collection object cache. 2018-06-06 16:00:25 +02:00
f884ba02a2 Merge branch 'master' into blender2.8 2018-06-06 15:58:18 +02:00
de702a4803 Alembic export: only free duplilists when not NULL 2018-06-06 15:54:03 +02:00
48e871ab1d Cleanup: Nuke moar G.main usages... 2018-06-06 15:50:24 +02:00
fcf720a135 View3D: Shading Popup
- layout so cavity options are better visible
- fixed issues showing wrong options in Material mode
- added labels + seperators
2018-06-06 15:44:00 +02:00
89042f576e LookDev: When HDRI could not be reloaded we should switch to world
Thanks for reporting sergey!
2018-06-06 15:26:09 +02:00
7fee5f5643 Fix object-dupli selection w/ COW 2018-06-06 15:24:27 +02:00
f1fd5ed74f T55333 Workbench: Cavity Shader
A cavity shader based on SSAO. Works on all workbench deferred passes.

Per 3d viewport the cavity shader options can be set as different
shading needed different options. Some global options are in the
Viewport Display of the scene like num samples and distance.

Experimental: Naming of Ridges and Valleys
2018-06-06 14:51:18 +02:00
4a52531a11 Alembic: Fix double-free of mutex
The mutex was shared between CoW copies of the CacheFile datablock, and
as a result also freed multiple times. It is now only freed when the
original datablock is freed; the CoW copies share the same mutex.
2018-06-06 14:38:17 +02:00
4c4fa3d49b Fix double-free of custom data
This causes a temporary spike in memory usage when creating a copy; the
entire copy will be removed anyway when DerivedMesh is removed.
2018-06-06 14:38:17 +02:00
3b8ae85e3d Move Time Remapping into a sub-panel 2018-06-06 14:28:35 +02:00
a8ae68aa5c Fix crash when file is saved in particle edit mode
Depsgraph is not available on file load yet.
2018-06-06 14:13:46 +02:00
2088bb0d49 UI: add particle brush to topbar 2018-06-06 14:06:45 +02:00
b58e5d4f2c Particle edit: Fix missing hair with new oarticle system added 2018-06-06 13:54:39 +02:00
1295e85de0 Particle edit: Fix crash when trying to edit particles without cache
Particles in EMITTER mode needs to have cache.
2018-06-06 13:54:39 +02:00
528cdf9b50 Fix update issue in VPaint mode.
Need to flush the changes through DEG CoW, otherwise drawing code would
not see them in some cases...
2018-06-06 12:42:01 +02:00
e3324c3a8e Depsgraph: Silence relations builder errors
Were caused by depsgraph trying to create relations between objects
which are coming from restricted collection.
2018-06-06 12:36:52 +02:00
22370929fe Depsgraph: Expand object data datablocks for drivers
Drivers can reference object data datablock directly, and if there
was no object in the scene with that datablock, blender will crash.
2018-06-06 12:36:52 +02:00
7810c60fe3 Depsgraph: Handle key->object relations from object builder 2018-06-06 12:36:51 +02:00
695747aad1 Depsgraph: Object data separation, armature 2018-06-06 12:36:51 +02:00
5a14af62d0 Depsgraph: Object data separation, geometry 2018-06-06 12:36:51 +02:00
82ec06cbfa Depsgraph: Object data separation, camera 2018-06-06 12:36:51 +02:00
ca7de1ff22 Depsgraph: Object data separation, lamp 2018-06-06 12:36:51 +02:00
1a0cb28ae2 Depsgraph: Object data separation, light probes
This is a beginning of series of commits which will clearly separate
building IDs which are used as object data from object building.

The goal is to be able to always build whatever ID. Required to make
driver targets to work reliably with copy-on-write concept.
2018-06-06 12:36:51 +02:00
180e8f8bfb Depsgraph: Remove confusing metaball logic
DATA datablock must evaluation must never depend on object it is
used for. If there is something what depends on an object, it must
be done on object level.

At least the actual callback was empty.
2018-06-06 12:36:51 +02:00
9f255db4fe Wireframe: Fix do_version. 2018-06-06 12:32:30 +02:00
7a76223f1f Ensure BKE_mesh_new_nomain_from_template() always has valid mxxx pointers
When the source mesh doesn't have the primary layers (CD_VERT for vdata,
etc.) the returned mesh also didn't have those layers, even when non-zero
elements were requested (for example requesting 4 vertices would still
result in mvert = NULL).
2018-06-06 12:27:25 +02:00
8a0e6a3143 Consolidated custom data layer initialisation
Code shared between BKE_mesh_new_nomain() and
BKE_mesh_new_nomain_from_template() is now in separate functions, instead
of copy-pasted.
2018-06-06 12:27:25 +02:00
5e180ebffc Set mesh->totface in nomain-mesh creation
The totxxx fields should match the number of elements in their respective
custom data layers.
2018-06-06 12:27:25 +02:00
c4ce4034e6 Fix T55344: linked collection instance has user count 0. 2018-06-06 11:22:17 +02:00
3e87c039ba UI: tweak for Cycles panels. 2018-06-06 11:22:17 +02:00
1d86bdf16b Cleanup: fix compiler warning. 2018-06-06 11:22:17 +02:00
03b8e4f608 Fix importing temporary screens
Apparently Blender 2.79 could save temporary screens; those should not be
converted to workspaces.
2018-06-06 11:13:11 +02:00
23db3a5ade Renamed BKE_nomain_mesh_xxx → BKE_mesh_nomain_xxx
This maintains the `BKE_mesh_` prefix for the mesh-related BKE functions.
2018-06-06 10:30:24 +02:00
783d31c3a3 DerivedMesh deprecation: Removed some functions in displist.c
Those functions were using DerivedMesh but are not called from anywhere.
As a result, they cannot be tested after porting DerivedMesh to Mesh.
2018-06-06 10:11:31 +02:00
abccde4d68 DerivedMesh deprecation: marked no-longer-in-use function
Functions that are no longer in use can be marked as such, so that later
we can easily remove them.
2018-06-06 10:11:31 +02:00
5f543915e8 Modifiers: ported curve_calc_modifiers_post() internals from DerivedMesh → Mesh
The function still returns a DerivedMesh, but internally it uses Mesh
now.
2018-06-06 10:11:31 +02:00
274453ef73 Error in recent popover keep_open option 2018-06-06 09:43:03 +02:00
a9f9236670 Merge branch 'master' into blender2.8 2018-06-06 09:39:35 +02:00
bfbd85e9d6 Fix error using freed bmain
Regression in 481cdb08ed
2018-06-06 09:36:50 +02:00
ab375079df Cleanup: rename WITH -> USE for internal defines 2018-06-06 09:29:54 +02:00
6ff89166a8 Cleanup: USE_UI_* prefix for UI defines
Otherwise there is no quick way to see where this comes from.
2018-06-06 09:27:23 +02:00
52502ad0a4 UI: WM_OT_call_panel option to keep popovers open 2018-06-06 09:24:51 +02:00
14251d4615 Workbench: Speed up fo scene with many duplis
The ObjectID pass was generating per material per dupli a specific
number for the outline what results in a GPU context switch. In spring scene
01-050 a scene with many trees (duplis) generated 28000 GPU materials.

Now only new materials are created when objectid pass is enabled. Also
added a hard limit to the number of objects for the objectid pass (255)
Basically the outline between objects will not be drawn, but it will be
very hard to detect them also.

Also fixed for XRay mode.
2018-06-06 08:50:12 +02:00
1889eec918 UI: use regular size icons for toolbar popup
Test this since the popup feels disruptive/flashing when its too large
when set smaller it looks closer to a menu w/ key-accelerators which is
the intention in this case.

It's also more likely the active tool can be placed under the cursor.
2018-06-06 08:32:25 +02:00
c1a880bc5e Fix object selection w/ COW 2018-06-06 08:20:05 +02:00
3c9e2e82fa Cleanup: style 2018-06-05 21:32:49 +02:00
851829c1fb Eevee: Improve load time.
Only generate shadow store shaders on demand and create a simpler shader
for small blur radius.
2018-06-05 21:02:57 +02:00
18a8bb5c16 Fix compilation error due to different params
in freeCustomNormalArray declaration and definition
2018-06-05 23:21:08 +05:30
e394a78b4c Fix compilation issue due to last commit. 2018-06-05 19:49:12 +02:00
d5ce40a5ed Wireframe: Add slider to hide edges from coplanar faces
The default behaviour is to show the same amount of edges as 2.7.
The slider makes it possible to show all edges or even less.
2018-06-05 19:35:36 +02:00
713027b832 make.bat : move all experimental options to their own section in the help. 2018-06-05 11:29:03 -06:00
983811607d make.bat : bring the help up to date with recent additions to the build script. 2018-06-05 10:40:14 -06:00
cd58ce85c2 make.bat : check for existence of ninja before using it. 2018-06-05 10:39:39 -06:00
5e44324b79 make.bat: change the way the vs buildtools are detected.
The recent change also used the buildtools instead of the regular compiler, you now have to explicitly state what you want to use :

2017 - the standard msvc compiler
2017pre - the msvc compiler from the preview installation
2017b - the msvc compiler from the buildtools installation
2018-06-05 10:38:48 -06:00
7ff07ddd01 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/windowmanager/intern/wm_files.c
2018-06-05 17:56:18 +02:00
1628a6858e Fix crash in owmn previous commit. 2018-06-05 17:54:53 +02:00
f0d9dbae0d Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/blendfile.c
	source/blender/blenloader/intern/readfile.h
	source/blender/blenloader/intern/versioning_250.c
	source/blender/blenloader/intern/versioning_260.c
	source/blender/blenloader/intern/versioning_270.c
	source/blender/blenloader/intern/versioning_legacy.c
	source/blender/editors/render/render_shading.c
	source/blender/makesrna/intern/rna_movieclip.c
	source/blender/render/intern/source/pipeline.c
	source/blender/render/intern/source/voxeldata.c
2018-06-05 17:02:50 +02:00
ce6db959c7 Moved function declarations from BKE_DerivedMesh.h to BKE_mesh_runtime.h
The function definitions still reside in DerivedMesh.c. Once we're done
porting all the DerivedMesh use to Mesh, we'll move the still-relevant
functions to mesh_runtime.c. This move is now cumbersome due to shared
statically-declared utility functions in DerivedMesh.c
2018-06-05 16:59:25 +02:00
a9ed50514c Moved function declarations from BKE_mesh.h → BKE_mesh_runtime.h 2018-06-05 16:59:18 +02:00
7436fb2ef1 Merge branch 'master' into 28 2018-06-05 16:36:13 +02:00
481cdb08ed Cleanup: use new accessors to blendfile path (Main.name). 2018-06-05 16:33:46 +02:00
1d97e948d2 Cleanup: add hleper functions to get filepath from Main.
This helps making things clearer and cleaner. Func returning filepath of
G.main is separate, so that we can easily track its usages, and
hopefully deprecate it at some point. Though that usage of G.main is
likely the less evil one, you nearly always want current blendfile path
in those cases anyway.
2018-06-05 16:33:46 +02:00
c68429bc03 Cleanup: pep8
Use 'autopep8 --ignore E721,E722' on our UI code, only minor changes.
2018-06-05 16:32:11 +02:00
d94df18550 Cleanup: doxy grouping for mesh runtime API 2018-06-05 15:55:16 +02:00
7a612c3799 LookDev: Fix crash when no world 2018-06-05 15:49:54 +02:00
60aee3943f UI: move 3D view display options into popover
- Moved Mesh Display, Mesh Analysis & Motion Tracking
  display panels to Overlays.
- Removed Item panel from sidebar (buttons available elsewhere).

Patch by @billreynish w/ edits
2018-06-05 15:35:57 +02:00
d860d23e1a make.bat: cache the vcredist directory.
When run from make.bat the environment is setup correctly and the VCToolsRedistDir environment variable exists, on later invocations of cmake this may no longer be the case and a warning was emitted about the missing runtime. we can't rely on InstallRequiredSystemLibraries.cmake here since it uses the compiler version to figure out the correct location and it doesn't know how to deal with clang.
2018-06-05 07:25:37 -06:00
2cc6e06bdb Error in last commit 2018-06-05 15:21:04 +02:00
b6d920bbd5 Depsgraph: Fix bug with broken tweak of animated node tree settings
With single editing context we can have expected and correct evaluation order
of animation and material update.
2018-06-05 15:11:34 +02:00
2891fb645b 3D View: disable manipulators & text w/o overlay
Manipulators which aren't explicitly activated via tools are now hidden.

Tool manipulators are kept because it doesn't make sense to interact
with a tool with hidden manipulators.
2018-06-05 14:54:52 +02:00
24bd483ee1 Object Modes: Flush COW on mode switching
Caused glitch w/ sculpt mode not updating.
2018-06-05 12:48:25 +02:00
09f780c1b0 Preserve unkeyed changes on undo and file open
This partially reverts 5975d6581c.

With single editing context it is more predictable what is unkeyed change is.
2018-06-05 12:35:19 +02:00
6d7327f607 Cleanup: simplify studiolight/matcap enum code, remove limit. 2018-06-05 12:23:55 +02:00
0d47a4d2fe T55291: Matcaps were reset when loading file 2018-06-05 12:21:41 +02:00
df1d319a79 Static Override: Fix order of operations issue in material slots.
*Really* not happy with that kind of constraint, but no choice for
now...
2018-06-05 12:08:18 +02:00
856d36e4b8 Static Override: progresses towards full support for material slots.
Material slots are a real pain to get working, due to all the black
magic they do to hide object vs. obdata storage of the material...

Currently hitting an order problem - we need to always set 'link' (to
object or obdata) property of the slot first, before we set its
material... *super-sigh*
2018-06-05 12:08:18 +02:00
cb42ad8c75 Fix compilation error after recent matcap changes 2018-06-05 12:02:08 +02:00
cd8613c6e7 Fix T55319: Keyframing issues
The issue was that keyframing from menu would tag object for animation
update, which was making object to loose unkeyed changes.
2018-06-05 11:56:46 +02:00
342dd5a771 Workbench: remove the soft limit for the xray_alpha 2018-06-05 11:45:22 +02:00
a3815f8777 Workbench: Matcaps T55291
- users can use their own matcaps
.config/blender/2.80/datafiles/studiolights/matcap/ folder
- upto 100 matcaps can be loaded
- color of the matcap is influenced by the color of the material/single
color etc. To show the plain matcap use single color at 1.0
- chosing a matcap is at lighting level (flat/studio/matcap)
- matcap only possible in solid mode
- also works for X-Ray mode

As the old matcaps are still in used by the clay engine I didn't remove
it yet.
2018-06-05 11:38:33 +02:00
ade710500d UI: set cursor line width 2018-06-05 11:37:30 +02:00
f1a3b68e76 Transform: avoid assert in wpaint mode 2018-06-05 11:31:17 +02:00
b9db470636 Fix stupid mistake in previous commit. 2018-06-05 11:22:43 +02:00
0be9d8db65 RNA/Override: Move override-related property flags to own variable.
We are already running out of available flags in main, generic int, and
everytime I work on static override I find new special cases that will
need new specific propflag, so...
2018-06-05 11:11:43 +02:00
99dd3b0156 Baby step towards making overridable materials for objects.
Naughty Collections RNACollection of objects is still to be tamed, but
for individual objects should work now....
2018-06-05 11:11:42 +02:00
5d628c519b Transform: improve pose trans/rot/scale guessing
Switching the mode was being done per object,
where it should first check all pose bones from all objects.

This also removes code that changes the transform mode
from within the counting function.
This was only needed on transform initialization.
2018-06-05 11:04:12 +02:00
0941b8b672 Missing from last commit 2018-06-05 10:13:55 +02:00
83db7a0070 Transform: revert use of evaluated objects
This is no longer needed.
2018-06-05 09:48:38 +02:00
1df228a416 UI: context menu for other editor types
D3458 by @billreynish w/ edits.

- Context menu for dope-sheet, graph, image & node editors.
- Add type to contenxt menu header.
- Access with W-Key.
- Change UV-editor weld key binding to Shift-W.
2018-06-05 09:18:00 +02:00
80d86f303a UI: support property split for 'prop_search' 2018-06-05 08:56:14 +02:00
88b46a6ce9 make.bat : Fix clang+asan msbuild project generation 2018-06-04 22:35:57 -06:00
Dalai Felinto
17e9870221 DRW: Fix crashes with instanced data
Problem introduced on 101c277e3d.
2018-06-04 19:17:29 +02:00
6fee105943 Cleanup: correct menu name 2018-06-04 19:09:52 +02:00
da53c3f020 Merge branch 'master' into blender2.8 2018-06-04 18:50:14 +02:00
58e8c71cbd Cleanup: strip ghost trailing space 2018-06-04 18:47:57 +02:00
f6740993f7 Cleanup: strip tests trailing space 2018-06-04 18:47:31 +02:00
c8af234f85 Fix T55325: Revert "Always get a reference point when snapping with the projected elements option enabled."
This reverts commit 0864a4c1ea.

That way it's best for retopology.
2018-06-04 13:33:19 -03:00
84becb870f Merge branch 'master' into blender2.8 2018-06-04 17:58:07 +02:00
747534af00 Particle System: move data creation into RNA update
Relying on evaluation to initialize data causes issues w/ 2.8.
2018-06-04 17:55:19 +02:00
William Reynish
2b4d2de253 UI: more subpanels for Cycles and Eevee. 2018-06-04 17:36:03 +02:00
ce5e9b599c Fix Python UI error with Eevee and hemi lamps. 2018-06-04 17:36:02 +02:00
784a3ccf79 Fix hang rendering with motion blur. 2018-06-04 17:36:02 +02:00
101c277e3d Workbench: Shadows: Fix cap being clipped by far plane.
This was the last remaining problem with shadow volumes (that I know of).

Only extrude until we hit the far plane.
2018-06-04 17:33:34 +02:00
349d416949 Tool System: refresh tools after undo 2018-06-04 16:41:03 +02:00
18e8350cd1 Cleanup: Hopefully more clear name 2018-06-04 16:22:36 +02:00
bda0175984 DRW: Fix leak from the wireframe drawing. 2018-06-04 16:04:18 +02:00
570804882d Wireframe: Lower line thickness and front color blending. 2018-06-04 16:04:18 +02:00
4b5670ac11 Cleanup: redundant headers 2018-06-04 16:03:52 +02:00
3b4c7a8c9b Weight paint: Use helper function to get original mesh
Makes it one line to get needed mesh, no code duplication. And can easily
update asserts and tighten the nuts.
2018-06-04 15:49:11 +02:00
0e8edbbc01 Add utility functions to get different "levels" of evaluated/original mesh 2018-06-04 15:48:37 +02:00
2b22a61152 Depsgraph: Only store original mesh pointer for mesh object 2018-06-04 15:24:41 +02:00
52f9023fbf Fix weight paint crash
The PBVH was referencing runtime custom data which was freed on refresh.
2018-06-04 15:18:48 +02:00
07f0046203 Fix crash when making objects to share same mesh
Make it more reliable and predictable way of getting pointer to
an original mesh which came from copy-on-write engine.

Related change: made it (hopefully) more clear name for flags.
2018-06-04 15:17:16 +02:00
1dc31f5b98 GPU: Fix missing case of new radeon on xorg.
This was causing issue with shader compilation.
2018-06-04 15:15:00 +02:00
e47e60a9b9 Workbench: Shadows: Fix the remaining fail case.
Non-manifold geom was producing inverted result when the camera was inside
the shadow volume.

When rendering non manifold geometry with the depth fail method, we need to
emit the cap as if it was the same geometry with a virtual thickness.

Another way to view it is to imagine having a set of non-manifold geometry
all facing the light.

So for every tri we emit a front cap oriented toward the light and the
back cap pointing away from it (whatever the actual orientation of the tri).

Extrusion pass stay the same as the depth pass method (double the increment
if it's a manifold edge).
2018-06-04 15:15:00 +02:00
736a84ec66 Cleanup: Use proper type for original ID pointer
Helps debugging, no need to cast in a debugger.
2018-06-04 14:14:14 +02:00
William Reynish
acb5bbf9b2 UI: use subpanels for Cycles, render, scene, object, particle, curves. 2018-06-04 13:44:23 +02:00
a46ced5076 Fix missing collection instance motion blur settings. 2018-06-04 13:41:27 +02:00
f430f14df4 Merge branch 'master' into blender2.8 2018-06-04 12:48:03 +02:00
7277f8973b Fix T55260: load Text File with Python from GUI Button results in 0 User
Let's just always ensure user_one when loading text from operator...
2018-06-04 12:46:59 +02:00
c2ff37455e Fix selecting bones
Own error w/ recent USE_OBJECT_MODE_STRICT
2018-06-04 12:39:10 +02:00
2903146826 Added UI support for seams and sharp edges and cleanup 2018-06-04 15:13:54 +05:30
95011f6d48 Merge branch 'master' into blender2.8 2018-06-04 09:39:04 +02:00
44505b38df Cleanup: strip trailing space in editors 2018-06-04 09:31:30 +02:00
0911acb5cf Merge branch 'master' into blender2.8 2018-06-04 09:11:45 +02:00
6654e109df Cleanup: strip trailing space in GPU module 2018-06-04 09:09:12 +02:00
5b64301834 Merge branch 'master' into blender2.8 2018-06-04 09:06:14 +02:00
2d3d76693a Cleanup: newlines at EOF for Python modules 2018-06-04 08:54:40 +02:00
7719c11006 Cleanup: strip trailing space in Python module 2018-06-04 08:54:40 +02:00
854db8951b Cleanup: strip trailing space in bmesh module 2018-06-04 08:49:47 +02:00
ba65f7093b Cycles: Cleanup: Don't use return on function returning void 2018-06-04 00:07:17 +02:00
f6743fcaa4 UI: use subpanel for particle emission source, as an example. 2018-06-03 21:36:12 +02:00
d7c2b78822 UI: add subpanel support.
In the Python API, any panel becomes a subpanel by setting bl_parent_id
to the name of the parent panel. These subpanels can contain advanced or
less commonly used settings.
2018-06-03 21:30:35 +02:00
79c0ac7c78 Added support for extending sharp edges with bevel 2018-06-03 22:50:35 +05:30
9b01e7bc27 UI: move Cycles device to Performance panel. 2018-06-03 19:01:18 +02:00
81dbf08eb4 Merge branch 'master' into blender2.8 2018-06-03 17:09:07 +02:00
38eb91c848 Cleanup: correct variable name, doxy sections 2018-06-03 17:06:13 +02:00
25ff7a4f2a DRW: Hair: Add additionnal subdivision smoothing support.
Only use catmull-rom interpolation for now. It's smoother and does not
exhibit artifacts.
2018-06-03 16:45:03 +02:00
06dd89b0ca GPUTexture: Fix memleak in orphaned texture management. 2018-06-03 16:45:03 +02:00
e657a4af13 Merge branch 'master' into blender2.8 2018-06-03 15:20:11 +02:00
4c4eb1ce20 Workbench: Fix memleaks. 2018-06-03 15:26:53 +02:00
d0f7ab27a8 Wireframe: Optimization for intel GPUs.
Intel GPU take more advantage of the geometry shader than other vendors.

Using a simple geom shader approach in this case is more performant.
2018-06-03 15:26:37 +02:00
335b193336 Cleanup: add argument names to screen callbacks 2018-06-03 15:11:31 +02:00
778a19a13a DRW: Fix hair disapearing if emitter is culled. 2018-06-03 12:36:03 +02:00
32c5972653 Workbench: Rework hair support.
Now hairs are shaded properly in workbench and support texturing.

I also added a 10% random normal direction per hair to have a bit more
variation in the shading. This is hardcoded for now.
2018-06-03 12:36:03 +02:00
38bf3b8d23 Merge branch 'master' into blender2.8 2018-06-03 11:24:57 +02:00
6221180963 Cleanup: remove blockscale & handler
Replace with link_flag, currently unused,
needed for dynamic space types which is planned.
2018-06-03 11:12:50 +02:00
18a4553838 Edit menu: add Repeat Last and Repeat History 2018-06-02 23:13:03 +02:00
815b1f24fa build_environment: support for msvc2017 and newer cmake.
-expanded build_deps.cmd with 2017 support, it can't locate msvc2017 so needs to be run from developer prompt.
-Newer cmake was unhappy with openal's cmakelists.txt
-collada has warning as error on and errored out on new msvc2017 warnings.
2018-06-02 13:59:56 -06:00
04d9316cf3 UI: use single column layout for particles
Also minor changes to other panels.

Patch by @billreynish
2018-06-02 21:52:52 +02:00
c55e90da4c Cleanup: -Wswitch warning 2018-06-02 21:38:31 +02:00
2ef695fabf build_environment: fix paths in osl.diff 2018-06-02 13:18:22 -06:00
6c6c4da718 GPU: Fix texture being freed in threads without ogl context bound.
This is a dirty fix. A bit more cleaner approach would be to check if a
context is bound and delay the deletion only in this case.
Also we may want to do this orphan deletion at some other places than
wm_window_swap_buffers.
2018-06-02 21:16:40 +02:00
bc6358a580 DRW: Add uniform name recording in debug mode. 2018-06-02 21:16:40 +02:00
f25e459f8f DRW: Make the Procedural hair update part of the drawmanager.
Instead of relying on the engine integration which is redundant.
2018-06-02 21:16:40 +02:00
98e4d548a1 Eevee: Hair: Make SSR works with hairs. 2018-06-02 21:16:40 +02:00
119423b252 Eevee: Cleanup unused Ghash 2018-06-02 21:16:40 +02:00
8ace49dedc Eevee: Add shadow support for hairs. 2018-06-02 21:16:40 +02:00
1de73fc6c3 Eevee: Hair: Make hairs visible even if the show emitter option is disabled. 2018-06-02 21:16:40 +02:00
08a2c5f224 Eevee: Add support for hair random property.
Do note that it does not match cycles implementation.

Also we could precompute the hash per strand before rendering but that would
suggest it's not per engine specific.

If we make the random value internal to blender then it won't be a matter
because other renderers will have access to the same value.
2018-06-02 21:16:40 +02:00
4430bd3644 Eevee: CodeStyle: Fix naming and confusion about the hairs vectors. 2018-06-02 21:16:40 +02:00
Dalai Felinto
0736460dfb Merge remote-tracking branch 'origin/master' into blender2.8 2018-06-02 20:34:25 +02:00
Dalai Felinto
fec317de8d --debug-gpu-shader: Dump GLSL shaders to disk
This is really convenient for development. Either for profiling the
generated shaders or to check if the generated code is correct.

It writes the shaders to the temporary blender session folder.

(ported over from blender2.8)
2018-06-02 20:29:27 +02:00
6de656b4f2 transform_snap_object: Do not use occlusion test when X-Ray is enabled. 2018-06-02 13:11:51 -03:00
58efa7d686 Fix inaccuracy of SCREEN_OT_area_split when snap to midpoint and adjacent.
By default when moving a edge of the screen it always snaps to an invisible grid with unit of 4 pixels.
This was also affecting the snap to the midpoint and adjacent.
The solution was to make the snap to areagrid optional and use values of `origmin` and `origsize` that match the transformations in screen_edit.c.
2018-06-02 12:19:49 -03:00
0de0cee9a2 Fix crash running in background mode 2018-06-02 14:53:07 +02:00
9cd2e4fa3f Cleanup: quiet warnings w/o Python 2018-06-02 13:10:27 +02:00
b608133075 Fix crash if no tool is set 2018-06-02 13:10:15 +02:00
a08a8aa928 Merge branch 'master' into blender2.8 2018-06-02 13:09:12 +02:00
c140f11946 Cleanup: warning 2018-06-02 11:58:01 +02:00
Dalai Felinto
bb8770b976 Fix UI for camera data
The fix bit is the split.

But since we are using col.separator() left and right we need this as well.
I still don't think the separators are the way to go, yet may as well be
consistent with the current design in place, thus the extra separator here too.
2018-06-02 11:22:44 +02:00
8433ed76b2 UI: re-order navigate manipulator
Looked as if size applied to navigation too.
2018-06-01 22:37:27 +02:00
d18cd768bb UI: use single column properties for object data
patch by @billreynish w/ minor edits
2018-06-01 19:26:07 +02:00
bfe1d0e0dc Merge branch 'master' into blender2.8 2018-06-01 18:26:42 +02:00
75fc1c3507 Cleanup: trailing whitespace (comment blocks)
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-06-01 18:19:39 +02:00
297bf7235b Cleanup: whitespace 2018-06-01 18:10:43 +02:00
2f5704486d Added ability to apply seams to all middle edges
between the 2 marked edges. currently does not make changes to material
or sharpness of edges
2018-06-01 21:18:26 +05:30
c0dd355926 Modifiers: ported applying modifier from DerivedMesh → Mesh 2018-06-01 17:35:26 +02:00
4fccb8a023 Boolean modifier: fixed crash when applying the modifier 2018-06-01 17:35:26 +02:00
e44743736f Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/io/io_collada.c
	source/blender/editors/object/object_bake.c
	source/blender/editors/object/object_edit.c
	source/blender/editors/render/render_internal.c
	source/blender/makesrna/intern/rna_object_api.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-01 17:26:36 +02:00
e4a727626e X-Ray: Added a slider for the alpha
- will not render when set to 0.0 for speed reasons. so when user sets
transparency to hide everything the bigger passes will be skipped.
2018-06-01 17:15:35 +02:00
56dc2bf0c5 Workbench: Updated the internal light to have a bit of back lighting 2018-06-01 17:15:35 +02:00
9e09900a30 Fix wrong colors for workbench World Background option. 2018-06-01 17:14:06 +02:00
William Reynish
15e5dbc2c3 UI: tweaks to viewport shading and overlay panel layouts. 2018-06-01 17:14:06 +02:00
0706b410bd UI: use same "Viewport Display" name for scene/object/material panels. 2018-06-01 17:14:06 +02:00
eef18d39cb Fix broken set collection offset from cursor operator. 2018-06-01 17:14:06 +02:00
051e186d5c Cleanup: some more G.main removal from editor code. 2018-06-01 17:08:38 +02:00
b3be71e07a Mesh Batch Cache: Fix memory leak. 2018-06-01 17:07:45 +02:00
72a360827b T54991: Restore support for Motion Path drawing in 2.8
This commit restores support for Motion Path drawing in 2.8 (as it wasn't ported over
to the new draw engines earlier, and the existing space_view3d/drawanimviz.c code was
removed during the Blender Internal removal).

Notes:
* Motion Paths are now implemented as an overlay (enabled by default).
  Therefore, you can turn all of them on/off from the "Overlays" popover

* By and large, we have kept the same draw style as was used in 2.7
  Further changes can happen later following further design work.

* One change from 2.7 is that thicker lines are used by default (2px vs 1px)


Todo's:
* There are some bad-level calls introduced here (i.e. the actgroup_to_keylist() stuff).
  These were introduced to optimise drawing performance (by avoiding full keyframes -> keylist
  conversion step on each drawcall). Instead, this has been moved to the calculation step
  (in blenkernel).  Soon, there will be some cleanups/improvements with those functions,
  so until then, we'll keep the bad level calls.


Credits:
* Clément Foucault (fclem) - Draw Engine magic + Shader Conversion/Optimisation
* Joshua Leung (Aligorith) - COW fixes, UI integration, etc.


Revision History:
See "tmp-b28-motionpath_drawing" branch (rBa12ab5b2ef49ccacae091ccb54d72de0d63f990d)
2018-06-01 16:38:21 +02:00
44a8070db3 Cleanup: fix incorrect contributor information. 2018-06-01 15:47:00 +02:00
06c4106d03 Fix for fix, indentation was accidental 2018-06-01 15:42:00 +02:00
75b2729488 Fix missing braces 2018-06-01 15:37:53 +02:00
50afc430fd Update Flatty themes with the new pulldown background and minor tweaks. 2018-06-01 15:32:46 +02:00
Vuk Gardašević
27881e9948 Fix Add menu issue when there are no collections to instance
Differential Revision: https://developer.blender.org/D3453
2018-06-01 15:27:18 +02:00
13ca63d2ad Draw background on pulldown widgets if the header is transparent.
Since the viewport header now supports transparency, text on pulldowns
can be hard to read if their color matches the viewport content.

Background is drawn using the 'inner' theme color, that was unused until now.
2018-06-01 15:11:38 +02:00
3b05034935 Fix broken logic in make static override operators for Collections.
Was pretty sure I already fixed that some weeks ago... but look like it
was not committed or somehow lost...
2018-06-01 14:31:29 +02:00
ddf2a58282 Mesh: Replace DM for mesh w/ wpaint vertex picking 2018-06-01 14:29:22 +02:00
82b8fd8eaf UI: don't show XYZ text w/ direction buttons 2018-06-01 14:10:43 +02:00
32c12d057f Cleanup: rename vars 2018-06-01 14:01:46 +02:00
be8016908d Mesh: Replace DM for mesh -> curve conversion 2018-06-01 14:01:44 +02:00
4faf9bfbe9 Mesh versions of DerivedMesh access API calls
Add mesh_get_eval_final & mesh_get_eval_deform

Note: these will eventually need to be renamed & moved into BKE.
2018-06-01 13:58:53 +02:00
b85d5b6d52 Cleanup: quiet warning, don't set unused alpha 2018-06-01 13:58:53 +02:00
83a41ccd0a LookDev: make sure lookdev balls are still visible after 'N' 2018-06-01 12:52:10 +02:00
cfdadc7d61 Edit Mode: Fix Edit Object renderability with multi objects edit. 2018-06-01 12:28:32 +02:00
4eb47c303d Fix: raytrace_mirror does not exist anymore
Eevee default material settings were not showing.
2018-06-01 12:14:08 +02:00
0c18024a8d Fix error 2018-06-01 12:04:24 +02:00
c771bbc27e Code cleanup: Compiler warning 2018-06-01 12:01:31 +02:00
01c75c3765 Math: optimizations for 4x4x matrix inverse, multiplications.
In some heavy rigs matrix inverse can be 10% of computation time. This
reduces it to 2% by using Eigen's optimized 4x4 matrix inverse and SSE
matrix multiplication.
2018-06-01 12:00:11 +02:00
719e782f2c Modifiers: tiny optimizations for mesh deform, lattice, kdop. 2018-06-01 12:00:11 +02:00
bcbee4b9a3 Fix missing animation updates when the proxy object is not visible.
The relation was inverted here, for a long time already. The reason is
unclear and in principle it should work fine in the right direction.
2018-06-01 12:00:11 +02:00
1bc801e020 Fix use of uninitialized value in depsgraph. 2018-06-01 12:00:11 +02:00
14c55a5828 Cleanup: long lines 2018-06-01 11:59:15 +02:00
Dalai Felinto
e35dab0fec Fix building for workbench in windows (BLI_INLINE) 2018-06-01 11:55:50 +02:00
0bddf5315f Fix T55282: Modifiers: Removed unnecessary object evaluation 2018-06-01 11:50:53 +02:00
8f24d404fe Removed old mention of CDDerivedMesh 2018-06-01 11:50:53 +02:00
e614a8290c Fix/Workaround T55272: Sculpt/VPaint removes mesh 2018-06-01 11:49:10 +02:00
e8142ad7dc Cleanup: quiet warnings 2018-06-01 11:49:10 +02:00
4683091369 Object Mode: Display loose edges if overlays are enables.
This fix T55280 Loose edges not visible in object mode
2018-06-01 11:36:01 +02:00
d5a359b1d4 Fix: overlays are reset when selection is being performed
/me hits myself in the head. In selection code the flags were not tested
but set directly.
2018-06-01 11:31:30 +02:00
c450966e95 Workbench: Material specific settings for the specular
- Uses the roughness setting of the basic eevee material
- renamed gloss_mir to roughness
- set default of roughness to 0.25
- renamed ray_mirror to metallic
- cleaned up material rna (BI mirror struct)
- use BLINN phong model
- normalize incoming/outgoing specular light
- when using camera oriented studiolight, the SolidLight will be used
for specular highlights
- EXPERIMENT: when in world oriented studiolight only the shadow direction will be used.
- change the settings of the internal light to make scenes more
readable
2018-06-01 11:01:55 +02:00
3b2d3a3cd1 Fix crash switching sculpt/vpaint -> edit mode 2018-06-01 10:34:00 +02:00
7bdc67f5f3 Fix broken 'make single user' operator UI.
Texture option was removed, since BI engine removal...
2018-06-01 10:27:27 +02:00
fe09aa602a 3D View: hide orbit navigation in camera view
Typically for camera views it's nicer not to overlay large widgets,
only include the button to exit camera view.
2018-06-01 10:17:07 +02:00
c338ac9454 Modifiers: ported Soft Body DerivedMesh → Mesh
The simulation doesn't seem to update properly yet.
2018-06-01 10:04:46 +02:00
3cefb27830 Partial Revert of COW/Camera manipulator changes
d64fbe9456 3e26b84397
2018-06-01 09:48:40 +02:00
266fc1c1ff Revert "COW Fix: Lamp manipulators"
This reverts commit 33e45658eb.

No longer needed.
2018-06-01 09:25:24 +02:00
5736157b5e 3D View: respect text option for edit-mode info 2018-06-01 09:22:08 +02:00
a6395cebb7 Error in last commit 2018-06-01 08:31:32 +02:00
c87cfcc8de 3D View: make text overlay optional 2018-06-01 08:26:55 +02:00
63785a889c 3D View: support world background color 2018-06-01 08:16:24 +02:00
35efa1d3d3 Add 'Toggle Header' to header context menu.
Also disable collapsing the header by dragging it up/down. This prevents
accidentally hiding the header when resizing areas.
2018-06-01 02:55:16 +02:00
Dalai Felinto
a63b55f642 Cycles UI: Show pause button only when in rendered mode 2018-05-31 23:58:49 +02:00
Dalai Felinto
a4bb1a5881 Fix render engine info region when overlap and header on bottom
Note there is some talk about changing the position of this (which would be strange in the image editor by the way,
since there we use the bottom for the result of the current pixel when dragging the mouse).

However first I wanted to fix this regardless.
2018-05-31 23:58:48 +02:00
995fa1f4c0 UI: new tool properties space type
This currently shows panels that were in the 2.79 3D view toolbar
which are now popovers.

In some cases it's useful for these to stay open.
This commit adds a space type to do this.

Note this is currently empty in object mode.
2018-05-31 21:45:26 +02:00
14dee6d7a5 UI: support drawing panels from multiple contexts 2018-05-31 21:42:02 +02:00
7c75c2db4f Add Asan support for clang on windows.
This will currently only work for the RelWithDebInfo configuration since asan
does not support the debug crt. for source line information in the reports,
you need a copy of llvm-symbolizer in the blender folder or set the
ASAN_SYMBOLIZER_PATH environment variable to point to it. Currently (as of
6.0.0) llvm-symbolizer does not ship with the binary clang/llvm distribution.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3446
2018-05-31 11:50:30 -06:00
Dalai Felinto
e51cbce646 Cleanup: Fix indentation 2018-05-31 19:19:27 +02:00
bf4ce5755f Overlay: Add Wireframe overlay.
This overlay is showing mesh topology. It is usable with transparency
even if the mesh order can mess up with the expected result (some object
more prominent than others).

Edge thickness and alpha values are hardcoded for now but can easily be
added to theme or object settings.
2018-05-31 19:09:20 +02:00
712885c30e DRW: Add wireframe buffer texture generation for wireframe drawing.
Only OB_MESH is supported for now.

Creates a simple index buffer with negative indices if the edges is not a
real edge.

Also create the buffer texture representation of this buffer along with the
pos_in_order buffer texture.
2018-05-31 19:09:20 +02:00
f43e3d0b6b DRW: Fix DRW_shgroup_call_procedural_* vertex count. 2018-05-31 19:09:20 +02:00
494470ba23 GPUTexture: Expose GPU_texture_create_buffer and add GL_R32I support. 2018-05-31 19:09:20 +02:00
8789490f96 LoopTri: Fix example code.
For real guys! Test your example code!
2018-05-31 19:09:20 +02:00
71c904433c DRW: Fix stick bones memory leak. 2018-05-31 19:09:20 +02:00
2feed9bdef Fix Collada building... 2018-05-31 18:37:33 +02:00
f71efafe8f Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/sculpt_paint/paint_image.c
	source/blender/editors/space_image/image_edit.c
	source/blender/editors/space_image/image_ops.c
	source/blender/makesrna/intern/rna_material.c
	source/blender/makesrna/intern/rna_sculpt_paint.c
	source/blender/makesrna/intern/rna_space.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-05-31 18:35:14 +02:00
cfea9c261c Cleanup: Remove G.main from some editor files. 2018-05-31 18:23:20 +02:00
df22cd9ce1 Depsgraph: Fixes to prevent object duplicate to jump
This includes:

- Skip OB_RECALC_TIME tag from object duplicate operator
  not sure why it is needed: even if original object was
  animated, duplicating it will copy evaluated values.

- Don't tag whole ID for update when updating it after
  relations rebuilt. Use the same trickery to detect
  whether animation is to be re-evaluated or not as is
  done for update flag=0.

- Don't tag datablocks which are expanded for update
  of copy-on-write.

- Avoid flush along relation from copy-on-write
  operation in action. This will not invalidate any
  pointers in the copied datablock since we don't
  reference anything in the action.
2018-05-31 18:07:55 +02:00
3352dd3a3f Depsgraph: Remove unused flags
They are no longer needed after the active depsgraph concept is here.
2018-05-31 18:07:55 +02:00
126e6c8e1d Transform: Read all data from original objects
This is now guaranteed to be in sync with evaluated state for an active
dependency graph.

Solves issue with duplicating animated object.
2018-05-31 18:07:55 +02:00
59a516913e Depsgraph: Copy evaluated data to original datablock
Only do it for active dependency graph.

Currently covers animation, drivers, object and pose channel matricies.
2018-05-31 18:07:55 +02:00
b5b1f9d11c Depsgraph: Consider depsgraphs used by workspace as active
Will cause some bad behavior when object is shared across multiple
visible view layers with different overrides. Accept it for now,
and possibly force single view layer later.
2018-05-31 18:07:55 +02:00
7a4b0ff358 Depsgraph: Begin concept of active dependency graph
When active dependency graph is evaluated, it will apply animation,
drivers and scalar evaluation data (such as object matrix) to an
original datablock. This way operators and tools can easily read
data from original datablock.

This will simplify porting them to copy-on-write, and solve issues
when some operator will allocate new datablock based on original one,
and will want to read data from it.
2018-05-31 18:07:55 +02:00
d4daf9c00d Depsgraph: Forbid update flush to go from copy-on-write to animation 2018-05-31 18:07:55 +02:00
cd702db338 Animation: Pass dependency graph to animation system
This way we allow animation system to make decisions based on which
context dependency graph is coming from, and whether it belongs to
an active edit window or not.
2018-05-31 18:07:55 +02:00
48ea2131aa Sequencer: Make dependency graph part of sequencer context
Currently unused, but will be needed soon to deal with active edit
window context.
2018-05-31 18:07:55 +02:00
cb614107d3 UI: fix own error switching fake space types 2018-05-31 18:00:17 +02:00
5a82aee9e6 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/alembic/intern/abc_exporter.cc
	source/blender/blenkernel/BKE_mball.h
	source/blender/blenkernel/intern/depsgraph.c
	source/blender/blenkernel/intern/mball.c
	source/blender/editors/object/object_add.c
	source/blender/render/intern/source/convertblender.c
2018-05-31 16:57:39 +02:00
8d53e8cd02 UI: hide user preferences from space menu
See T54744
2018-05-31 16:46:24 +02:00
da11e33b26 Cleanup: remove G.main from BKE mball code. 2018-05-31 16:44:05 +02:00
361b3eb88e Cleanup: warning 2018-05-31 16:36:24 +02:00
eb1feb9f4a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_select.c
	source/blender/editors/space_outliner/outliner_edit.c
2018-05-31 16:21:47 +02:00
0b396bc15b Minor tweaks to labels 2018-05-31 16:05:47 +02:00
16100f8261 Cleanup: get rid of last G.main usages in BKE library code. 2018-05-31 16:04:04 +02:00
b809340960 Merge branch 'master' into blender2.8
Conflicts:
	intern/cycles/blender/blender_curves.cpp
	source/blender/blenkernel/BKE_particle.h
	source/blender/blenkernel/intern/modifier.c
	source/blender/blenkernel/intern/object_update.c
	source/blender/blenkernel/intern/particle_system.c
	source/blender/editors/object/object_modifier.c
	source/blender/editors/physics/physics_fluid.c
	source/blender/makesrna/intern/rna_particle.c
	source/blender/modifiers/intern/MOD_particlesystem.c
2018-05-31 15:37:15 +02:00
b53d358261 Cleanup: remove G.main from BKE modifier. 2018-05-31 15:24:30 +02:00
3248ac5e83 Cleanup: Remove unused variable 2018-05-31 15:02:12 +02:00
Dalai Felinto
25e5ec245c Support Move / Link to collection in the outliner as well 2018-05-31 14:52:05 +02:00
Dalai Felinto
d0af8edcd1 Outliner: Expose collections editors poll in ED_outliner.h 2018-05-31 14:52:05 +02:00
Dalai Felinto
eaad4caa56 Link to Collection - Add shortcut (Shift + M) 2018-05-31 14:52:05 +02:00
54e92bbd29 Fix: View All in Action Editor zoomed in far enough to enter "crazy mode" with a single keyframe
Now, when there's just a single keyframe, pressing HomeKey will instead
just center the view instead of trying to do "frame range" + margin.
2018-05-31 14:51:28 +02:00
4e96bff938 Update CoW when adding/removing pose in pose library 2018-05-31 13:53:40 +02:00
f56a9fbad5 Depsgraph: Remove the "disable-copy-on-write" option completely
After discussion with Sergey and Dalai, we have decided to remove
this option completely. We're getting to the point where it is almost
impossible to really use 2.8 without COW, and keeping the old option
running ends up diverting dev resources away towards tracking down
and fixing problems with a parallel system that will be going away.
2018-05-31 13:43:00 +02:00
9b4e56c091 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_camera.h
	source/blender/blenkernel/BKE_dynamicpaint.h
	source/blender/blenkernel/BKE_object.h
	source/blender/blenkernel/intern/camera.c
	source/blender/blenkernel/intern/dynamicpaint.c
	source/blender/blenkernel/intern/object.c
	source/blender/blenkernel/intern/smoke.c
	source/blender/editors/object/object_transform.c
	source/blender/editors/physics/dynamicpaint_ops.c
	source/blender/editors/space_view3d/view3d_edit.c
	source/blender/editors/space_view3d/view3d_view.c
	source/blender/modifiers/intern/MOD_dynamicpaint.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-05-31 12:57:24 +02:00
d41bf6b8e8 Edit last commit
Better check if the property is set in case others want to use this
property w/o SKIP_SAVE set.
2018-05-31 12:54:44 +02:00
46508430f8 Fix tool-system re-using last space type
Even though the regression is somehow caused by 03a80facfc
this value shouldn't be reused so apply an unrelated fix.
2018-05-31 12:51:47 +02:00
28369f725c Cleanup: remove G.main from BKE object
Had to add some G.main to modifiers, but in 2.8 we do not need that
anymore, so it's not that bad! ;)
2018-05-31 12:27:47 +02:00
23e375a281 Revert "Tag COW when applying pose from pose library"
This reverts commit 24b03729ae5ba4561ace8cbfb2d56cdbde781589; committed
too soon.
2018-05-31 12:00:18 +02:00
24b03729ae Tag COW when applying pose from pose library
Related to T55232
2018-05-31 11:59:04 +02:00
9948e26e14 Fix depsgrah copying and evaluating hidden collections. 2018-05-31 11:43:29 +02:00
1e6108e972 OpenColorIO: cache multiple shaders instead of just one.
Fixes constant shader and texture rebuilding when doing animation playback
with multiple editors that use different view transforms.
2018-05-31 11:21:19 +02:00
46cfa605c3 Cleanup: Reduce indentation level 2018-05-31 11:17:57 +02:00
9084c57a65 Mark edges that can have seams in Bevel.
Works by going clockwise from first edgehalf in BevVert and marking seam length
each time it encounters a pair of edges with seams
2018-05-31 14:42:50 +05:30
17f458ff32 Merge branch 'master' into blender2.8 2018-05-31 11:08:02 +02:00
24d1829243 Cleanup: nuke G.main out of BKE PackedFile code. 2018-05-31 11:07:14 +02:00
fcfe1963a6 Fix depsgraph copying and evaluating hidden objects. 2018-05-31 10:37:13 +02:00
5cbad89637 Cleanup: unused defines 2018-05-31 10:15:48 +02:00
12ab59a2d6 Merge branch 'master' into blender2.8 2018-05-31 10:03:15 +02:00
84a9647f22 Cleanup: use doxy sections for space types
Also use struct names in enum/define comments.
2018-05-31 09:49:58 +02:00
d9324b61d5 Cleanup: return types in stubs 2018-05-31 09:49:44 +02:00
e4afccf388 Depsgraph: optimization of driver evaluation with many drivers. 2018-05-31 09:46:21 +02:00
e910765ad0 WM: Use tool-system for setting brushes
This sets the tool instead of the brush, with cycling support.
2018-05-31 09:04:15 +02:00
81bf9a41e1 Tool System: Utility to set the tool by name
Wrapper for the Python operator.
2018-05-31 09:02:43 +02:00
Hristo Gueorguiev
6c0705009e Fix OpenCL compilation error - BPT without SSS. 2018-05-31 00:08:56 +02:00
fbd614f1fa Workbench: Highlights
Made the highlights darker (using the defaults of blender 2.7
- sharpness = 50
- spec color = 0.025 (I bumped it to 0.1)
- added a log2 to the frontal camera light to reveal more details of the
mesh
2018-05-30 22:19:10 +02:00
16d3f4db4c Tool System: optionally cycle tools in a group
Add the ability for key bindings to set a tool-group,
which cycles to the next tool when the tool is already active.
2018-05-30 22:17:37 +02:00
264a4a8f97 RNA: add tool index access
Needed for changing the active tool from Python.
2018-05-30 22:16:13 +02:00
84e5c981dc UI: toolbars now redraw on tool change 2018-05-30 22:16:13 +02:00
f5f25b843e Removed Object color from workbench. Added Highlights to FLAT shading. 2018-05-30 20:34:29 +02:00
eb0fcd4574 Generic Viewport Panel for Materials
Is enabled for all render engines as workbench will be rendering
SOLID/Texture modes and uses these settings.
2018-05-30 19:57:51 +02:00
1f693aefca Cleanup: style/whitespace
Also use 'uint'.
2018-05-30 19:49:33 +02:00
61fc9fcffa Cleanup: redundant check 2018-05-30 19:49:33 +02:00
0b6603d9b6 Fix selection randomly failing with border render.
We no longer user scissor for 3D viewport drawing, and some selection
code assumed it still. This also cleans up unnecessary scissor test
switching, we only have it temporarily enabled now.
2018-05-30 19:34:12 +02:00
c0f42a7526 make.bat: fix support for building with just the build tools installed. 2018-05-30 11:11:35 -06:00
c86437cc83 Fix Cycles UI script error with denoising. 2018-05-30 18:22:00 +02:00
cce16df10f Fix Cycles viewport render stuck with curve objects.
We should solve this better by making the depsgraph convert all curves to
meshes, for now ensure we don't to depsgraph tags during export.
2018-05-30 18:17:49 +02:00
17ce968c59 Depsgraph API: renaming, more granular update information.
* depsgraph.ids: all evaluated datablocks in the depsgraph
* depsgraph.objects: all evaluated objects in the depsgraph
* depsgraph.object_instances: all object instances to display or render
* depsgraph.updates: list of updates to datablocks
2018-05-30 18:17:49 +02:00
08862b8246 Render API: rename some API functions back to earlier names.
Their purpose is the same, no reason to break API compatibility here.
2018-05-30 18:17:49 +02:00
85ce4d957c UI: use split property layout for some panels
Object, render, scene properties now use split-property layout,
also cycles interface.

Patch by @billreynish w/ minor edits.
2018-05-30 18:00:11 +02:00
9fabe3ef53 Cleanup: quiet warning 2018-05-30 17:38:07 +02:00
efd0333a9c UI: fix property split w/ color buttons & empty text 2018-05-30 17:29:20 +02:00
1272936773 Tweak for previous commit: Just group all bone properties under the bone name
After more testing, I realised that bendy bone properties should also be grouped,
but probably all other per-bone settings too. Now, just group all of them, since
it's easier for everyone this way.
2018-05-30 17:05:37 +02:00
7661f8a65b Modifiers: Bring back custom data referencing logic
Brings dependency graph evaluation time to similar time than 2.79
for file reported in T55228.
2018-05-30 17:00:47 +02:00
41fac4fa76 Modifiers: Make input of modifier stack referencing copied CD layers
The idea is to allow modifier stack to reference custom data layers
from copied version of mesh datablock.
2018-05-30 17:00:47 +02:00
25d4d43491 Modifiers: Restore duplication of referenced layers
Was no reason to remove those calls, it was always a plan to bring
referenced layers back eventually.
2018-05-30 17:00:47 +02:00
cdfa517760 Insert Keyframe: Change default behaviour for how F-Curves get grouped
For many years, animators have been complaining about how keyframing a (transform)
property directly would leave them ungrouped, while keyframing them using a Keying Set
would put them into a group based on the name of the keyingset.

This commit attempts to improve (unify + make consistent) the default behaviour:
* All object transforms now get added to an "Object Transforms" group,
  regardless of whether they were added individually via buttons or keyingset
* All bone transforms now get added to a group corresponding to the name of the bone
  instead of only the ones added via keyingset
2018-05-30 16:46:12 +02:00
23b455a891 Cleanup: Reuse existing scene pointer 2018-05-30 16:46:11 +02:00
92e3b3839b Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/space_outliner/outliner_intern.h
2018-05-30 16:32:49 +02:00
10a2562bc5 Fix missing movieclip ID type in allowed ones for Outliner... 2018-05-30 16:14:55 +02:00
f1f1c32849 Object Modes: don't de-select others when activating 2018-05-30 15:51:49 +02:00
Dalai Felinto
5b8fe8324b Fix render info not working with overlap regions 2018-05-30 15:45:40 +02:00
38957c1838 Object Modes: stay in object mode when setting active
When activating an object from the 3D view or outliner,
keep the newly selected object in object mode.
2018-05-30 15:33:05 +02:00
5954a5c465 Object Modes: pose support for generic mode exit 2018-05-30 15:33:05 +02:00
375c1eab65 Cleanup: RNA naming, use highlight as suffux
This is whats done already elsewhere.
2018-05-30 15:33:05 +02:00
d0d2fc9819 Cleanup: whitespace 2018-05-30 15:26:57 +02:00
30fb455977 Initial 'fix' for Sculpt & COW - shallow copy sculpt data into COWed object.
Still a lot to fix here, right now you can get sculpt drawing updating
when you come from Edit mode, not from Object mode... Go figure...
2018-05-30 15:15:35 +02:00
35a6d9ec55 ID copy: Add flag which allows custom data to reference original datablock 2018-05-30 15:07:59 +02:00
acaf46db0e Workbench: Specular Highlights
Added specular highlights for:
 - Solid studio shading
 - Texture studio shading
2018-05-30 14:42:07 +02:00
29f9a19708 Modifier stack: Avoid roundtrip from mesh to DM back to mesh
Saves quite a bit of CPU ticks per mesh update, giving measurable
speedup for file from T55228.

Memory usage goes up a it, most likely due to evaluated mesh having
more custom data layers than corresponding DM does.
2018-05-30 14:29:05 +02:00
da16cb1511 Eevee: Keep track on whether orco was allocated or not
If it's coming from vertex data, we must not free that pointer.
2018-05-30 14:29:05 +02:00
f03953ae06 Object Mode: Add Texture space visualization. 2018-05-30 14:27:40 +02:00
ccb7f1d4f1 Fix T55256: Animation Noise modifier does not update on value change
Animation needs tagging in depsgraph (for animation refresh), instead of only
tagging AnimData->recalc
2018-05-30 14:22:25 +02:00
26f42a1928 Fix: Toggling "mute" toggle in animation editors didn't work with copy-on-write
Tested on Autumn run cycle by muting master bone animation - when working, the
dog should run forwards when the master bone animation is being muted.
2018-05-30 14:22:25 +02:00
5c17dbd991 Fix missing Cycles 3D viewport updates when editing materials, lamps.
This introduces a new depsgraph API for getting updated datablocks,
rather than getting it from bpy.data.

* depsgraph.ids_updated gives a list of all datablocks in the depsgraph
  which have been updated.
* depsgraph.id_type_updated('TYPE') is true if any datablock of the given
  type has been added, removed or modified.

More API updates are coming to properly handle multiple depsgraphs and
finer update granularity, but this should make Cycles work again.
2018-05-30 14:07:23 +02:00
8ed723745e Fix unnecessary Cycles render updates when selecting objects. 2018-05-30 14:07:22 +02:00
292125bfd3 Fix broken meshdeform modifier after recent cleanup. 2018-05-30 14:02:28 +02:00
9c2db1455f Keymap: group paint modes, reorder enum
Menu now matches the keymap.
2018-05-30 13:47:24 +02:00
eb24c9a1e1 Keymap: Pose/Weight-Paint modes now co-exist
Use the same key for pose & weight paint mode (instead of texture paint)

This makes more sense since pose/weight paint modes
are often used in combination.
2018-05-30 12:56:38 +02:00
03ec3a6141 Cleanup: remove '.' 2018-05-30 12:56:38 +02:00
48ceeead10 DRW: Instance Data: Replace with static allocation that can be referenced.
This mean you can store data used for drawing inside the object engine
data.

Also fixes T55243 Crash in ASAN debug builds due to use-after-free memory in draw code - instances issue?
2018-05-30 12:25:20 +02:00
10c0bba28e Eevee: Hair: Fix hair strip view Position. 2018-05-30 12:25:20 +02:00
7e8fd563c6 DRW: Add compile option to disable deferred compilation.
This maybe usefull for debugging.
2018-05-30 12:25:20 +02:00
93de6ca2db DRW: Instance selection id: use Batch buffers instead of DRWInstanceData
This is motivated by the refactor of DRWInstanceData to be actual non
contiguous mempools.
2018-05-30 12:25:20 +02:00
0488b728eb Eevee: Add support for the Hair info node.
Only the random output is not supported for the moment.
2018-05-30 12:25:20 +02:00
10f6450ef2 Eevee: Add support for new Hair geometry system.
This now can shade actual poly strips that mimics cylinders.
This makes hair coverage exact compared to the line method and result in
smoother fading hair.

This does make the sampling a bit more exact but needs more samples to
converge properly.
2018-05-30 12:25:20 +02:00
501c0b1df8 GPUMaterial: Add support for hair vertex color, uvs and orco. 2018-05-30 12:25:20 +02:00
328f8dc21c DRW: Add new GPU hair system.
This new system use transform feedback to compute subdivided hair points
position. For now no smoothing is done between input points.

This new system decouple the strands data (uv, mcol) with the points
position, requiring less update work if only simulation is running.

In the future, we can have compute shader do the work of the feedback
transform pass since it's really what it's meant to. Also we could generate
the child particles during this pass, releasing some CPU time.

draw_hair.c has been created to handle all of the Shading group creations
as well as subdivision shaders.

We store one final batch per settings combination because multiple viewport
or render could use the same particle system with a different subdivision
count or hair shape type.
2018-05-30 12:25:20 +02:00
2faef3473c Cycles: Use new internal hair shape properties.
The do_version actually copy the existing custom properties to the internal
ones, because theses properties are straight port from cycles.
2018-05-30 12:25:20 +02:00
e0e3038b1e Hair Particles: DNA: Add properties for new GPU hairs.
Hair Particles shape properties are ported from cycles. Thoses properties
have the same defaults and have a do_version of their own. Cycles will use
theses properties instead of its custom ones.

Some realtime engine specific settings are also added to scene->r because
it's much easier to control as global values.

Bumping Version number so cycles can do its own do_version on top of the
default settings.
2018-05-30 12:25:20 +02:00
ec6da3d72e DRW: Add new per drawcall option to bypass culling. 2018-05-30 12:25:20 +02:00
201952aed2 GPUTexture: Add support for GL_RGBA16 texture format. 2018-05-30 12:25:20 +02:00
3bc0cb08b8 DRW: Add DRW_CALL_PROCEDURAL DRWCall type.
This mimics the behaviour of DRW_shgroup_empty_tri_batch_create and will
replace it eventually.

The advantage is that it's compatible with transform feedback.
2018-05-30 12:25:20 +02:00
7b9a0ed8c4 BLI: Utils: Add Macro that compute the number of digits in integers type.
Usefull if you want to create char chains to contains hashes of a certain
type.
2018-05-30 12:25:20 +02:00
08d325805f Keymap: add back sculpt keys
Shouldn't have been removed in recent keymap edits.
2018-05-30 12:18:26 +02:00
72f4ac99c7 Cleanup/fix wrong modifiers targets handling in COW context.
Modifiers stack only get COW/evaluated IDs, so no need to go auery again
DEG for those. Further more, now unified handling of EditBMesh case (was
done on case-by-case basis in a few modifiers, not all for some reason).

We are still missing the ability to get final and cage deformed meshes
when in Edit mode though, this is to be defined/implemented in depsgraph.
2018-05-30 12:04:06 +02:00
e55c1a9b5a Depsgraph: Add TODO about backing up evaluated state of ID 2018-05-30 12:02:32 +02:00
edc1e65809 Add deformed evaluated mesh to object
This is a first step to have correspondence of legacy derivedDeform
within a new formulation. Only base ground for now to support file
reading, copy-on-write remapping and such.
2018-05-30 11:49:45 +02:00
6afa0a7a50 Fix T55253: Camera lens can't be edited after keyframing it
Bring back animation channel exception for tag flag=0.
2018-05-30 11:26:19 +02:00
9abbf73d3f Cleanup: Wrap object runtime eval members into own struct 2018-05-30 11:11:03 +02:00
a01244cade Outliner: support toggling non-active edit/pose mode objects
Support switching non-active objects in/out of a mode from the outliner.

- This allows users to change which objects are in a mode w/o
  having to exit the mode and change seleciton.
- Changing the mode of the active object applies to all other objects.
- By convention setting a mode selects, removing de-selects,
  this is done for convenience so switching to a mode from object mode
  maintains the set of objects in the current mode.

See: T55246
2018-05-30 10:29:41 +02:00
47a8d3b880 UI: Show outliner icon highlight w/ non-active edit-mode objects 2018-05-30 10:29:41 +02:00
e054b7f251 BKE_object: Add BKE_object_data_is_in_editmode 2018-05-30 10:29:41 +02:00
01f9e13c30 Cleanup: use 'e' prefix for enum types 2018-05-30 10:29:41 +02:00
d709705203 Cleanup: Naming, match policy with rest of copy-on-write design 2018-05-30 10:24:54 +02:00
301a27187c Cleanup: More typed allocation type enum usage
Majority of the code is EOL, but still handy for debug purposes.
2018-05-30 10:22:28 +02:00
b54cc68365 Cleanup: Use typed allocation type enum in custom data API 2018-05-30 10:20:22 +02:00
0ed2e254bb Use enum for custom data allocation type
Allows to easily see human readable value in debugger.
2018-05-30 10:17:09 +02:00
cb22caa8c7 Merge branch 'master' into blender2.8 2018-05-30 08:49:34 +02:00
18c12803bd Edit Mode: add success return value
Also remove fix for T6614, since BKE_object_obdata_is_libdata
no longer checks proxy.
2018-05-30 08:41:06 +02:00
0e0502cbdf Merge branch 'master' into blender2.8 2018-05-30 07:34:22 +02:00
2c03d6a12b DNA: add OB_DATA_SUPPORT_EDITMODE macro 2018-05-30 07:31:35 +02:00
9992079d59 EEVEE: LookDev, reset camera settings 2018-05-29 22:02:36 +02:00
36e6d44c90 Fix last commit. 2018-05-29 15:58:56 -03:00
00dc1c08aa Fix T55223: Crash when changing lattice resolution. 2018-05-29 15:39:44 -03:00
f8908f0d43 Correct last commit
Left unneeded code in space_context_cycle_invoke
2018-05-29 18:18:36 +02:00
e9cd2fb23b Keymap: partially implement changes from T55162
- Use Tab key for search.
- Number keys switch modes.
- The number of the current mode can open a submode menu
  (currently only works for edit-mode)
- Ctrl-Tab, Ctrl-Shift-Tab - cycle workspaces.
2018-05-29 17:52:27 +02:00
929c78e33c EEVEE: LookDev blurred background 2018-05-29 17:50:51 +02:00
Dalai Felinto
08b8fa0863 Cleanup 2018-05-29 17:33:14 +02:00
Dalai Felinto
85d845ef98 Fix crash when moving object parented to a curve
Note, we can probably remove scene from BKE_object_where_is_calc
and force to always use it from depsgraph.
2018-05-29 17:33:07 +02:00
Dalai Felinto
5eda9732b3 Use the correct time to evaluate object in BKE_object_where_is_calc functions 2018-05-29 17:05:32 +02:00
Dalai Felinto
e2bac484e0 Use correct time for curve parent evaluation
Time should alwaus come from depsgraph, not scene.
2018-05-29 17:05:32 +02:00
36e9ed98e7 StudioLight: Calculate Specular irradiance 2018-05-29 16:29:11 +02:00
f98c838b71 EEVEE: LookDev reversed the background fadeout 2018-05-29 16:22:53 +02:00
d5889f57ae EEVEE: LookDev fadeout to the world horizon color 2018-05-29 16:22:53 +02:00
8f670dd855 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_material.h
	source/blender/blenkernel/BKE_mesh.h
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenkernel/intern/material.c
	source/blender/editors/object/object_relations.c
	source/blender/editors/render/render_preview.c
	source/blender/makesrna/intern/rna_object.c
2018-05-29 16:02:53 +02:00
f7af08b5fe Cleanup: Get rid of G.main in BKE_material.
Note that in some cases, this only moves the G.main case to somne other
places - in particular, RNA getters/setters are becoming annoying here...
2018-05-29 15:49:21 +02:00
9d037153f7 Object Modes: disable mode switching on selection
See T55246
2018-05-29 15:47:08 +02:00
44b99d1052 For 2.8, bring back debug mode indices display. 2018-05-29 09:31:00 -04:00
43584f4a41 Missed own last commit 2018-05-29 15:17:34 +02:00
Dalai Felinto
bc54823376 Fix T55244: Parenting object(s) to curve crashes blender
There is a chance parts of Blender call BKE_object_workob_calc_parent
with ob->parent objects that are outside the depsgraph.

This we can tackle later since these are corner cases anyways,
and this fix fixes all parenting operators in Blender.
2018-05-29 15:11:20 +02:00
8b24f45e6b Object Modes: only use selection for mode switch
Selection is no longer needed for an object to be considered in a mode.

Part of T55246 design task, fixes T55187
2018-05-29 14:21:18 +02:00
03b0495d04 Fix: Only change transform mode from translation to rotation/scale when no valid bones were found in an armature
This commit fixes a problem the Spring team were having in the shot files 01_030/050 with
the camera rig, where when you tried grabbing/translating the bones of the camera rig,
they would only keep rotating/scaling instead.

The reason for this is that with the multi-object editing support added into the transform
system, this code would now get run for all the other objects that were being included
in Pose Mode, even if no bones from those armatures were selected. Since no valid translatable
bones were found in those other armatures, the transform mode would get reset upon
encountering one of those other bones.
2018-05-29 12:27:04 +02:00
756b70c6c3 UI: Expand space sub-types into the menu
Initial support for expanding editors, see: T54744
2018-05-29 12:15:26 +02:00
d4ac65d003 Cleanup: use same 'depsgraph' name everywhere outside of DEG space.
'graph' is waaaayyyyy too generic name outside of DEG context, and
better try to use same name everywhere!
2018-05-29 12:07:48 +02:00
643259415d EEVEE: LookDev fade out background option 2018-05-29 12:06:48 +02:00
a0b08e7b66 EEVEE: LookDev use_scene_light draw option
Scene lights are rendered when
 - v3d is not available
 - or shading type is other then OB_MATERIAL
 - or shading type is OB_MATERIAL and use_scene_light is true
2018-05-29 11:01:25 +02:00
2bb4977c4a Fix T55203: Particle hair weights are not preserved 2018-05-29 10:36:19 +02:00
77e32e8819 EEVEE: LookDev overlays enabling
The mirror ball and diffuse ball are only rendered when overlays are
turned on and the lookdev overlay is turned on.
2018-05-29 09:08:32 +02:00
842245ac55 Merge branch 'blender2.8' into soc-2018-bevel 2018-05-29 11:10:54 +05:30
c72a204001 make.bat : fix release build not getting the right settings. 2018-05-28 21:50:59 -06:00
6946c41340 Merge remote-tracking branch 'origin/master' into blender2.8 2018-05-28 20:07:51 -06:00
d6a4b23f8b make.bat : improve error message while detecting the msvc runtime when using clang 2018-05-28 20:07:24 -06:00
3ad9a94c9d Merge remote-tracking branch 'origin/master' into blender2.8 2018-05-28 19:57:50 -06:00
9450792bf2 make.bat : add support for building with ninja and clang together. 2018-05-28 19:56:17 -06:00
4e5d5b3a9e COW operators: Fix VIEW3D_OT_view_all cursor not updating with shift+c center cursor
This differential fixes a bug for resetting view (shift+c).
Bug description: When 3D cursor is placed randomly somewhere, and shift+c is pressed,
the cursor is not shown to reset at world center.

Reviewers: sergey, aligorith, brita_

Reviewed By: brita_

Subscribers: brita_

Differential Revision: https://developer.blender.org/D3423
2018-05-28 23:45:22 +02:00
eb2491363a Cleanup: fix some harmless compiler warnings. 2018-05-28 23:27:40 +02:00
359469a39a Fix T55204: proxy object disappearing randomly.
The problem was a missing depsgraph relation between the transforms of
the object and its proxy, it was only there for the pose.
2018-05-28 23:24:16 +02:00
9b1a15d8f8 Fix assert in workbench drawing, instance data not big enough. 2018-05-28 23:19:57 +02:00
3c1483cf1e COW operators: Fix drag and dropping of color properties 2018-05-28 23:07:23 +02:00
5d1a172783 Merge remote-tracking branch 'origin/master' into blender2.8 2018-05-28 14:35:59 -06:00
81060ff6b2 Windows: Add support for building with clang.
This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming

Things to note:

1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)

2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)

victor_cpu
	msvc:3099.51
	clang:2796.43

pavillon_barcelona_cpu
	msvc:1872.05
	clang:1827.72

koro_cpu
	msvc:1097.58
	clang:1006.51

fishy_cat_cpu
	msvc:815.37
	clang:722.2

classroom_cpu
	msvc:1705.39
	clang:1575.43

bmw27_cpu
	msvc:552.38
	clang:561.53

barbershop_interior_cpu
	msvc:2134.93
	clang:1922.33

3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.

4) X64 only currently, X86 builds but crashes on startup.

5) Tested with llvm/clang 6.0.0

6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration

7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.

8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.

9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3304
2018-05-28 14:34:47 -06:00
Dalai Felinto
66577c8732 Rename EEVEE visibility group > collection
I think we should rename the DNA as well, and break the 0.01 files using this feature.
But I will leave this decision to Clement.
2018-05-28 21:27:00 +02:00
cf60939a59 Ugly Hacky Fix: Clear Loc/Rot/Scale + Autokey now works for bones
This is a hacky fix so that animators can use this tool again with autokey enabled
(which they do all the time). The issue here is that the tool writes the new (0)
values to the original data, but insertkey now reads from evaluated data (so that
keying interpolated values works). However, the cleared values do not get re-evaluated
or flushed before insertkey gets to it (via auto keying), meaning that the wrong values
get keyed.

There may be better solutions for this, but for now, this is the simplest fix that
I can get working.
2018-05-28 20:25:03 +02:00
69d3a08557 EEVEE: lookdev default materials 2018-05-28 19:35:08 +02:00
e63fbc992d Fix T55231: Setting bone.select from RNA didn't tag for copy on write
This was causing problems with addons such as the Selection Sets addon used
in studio by the animators.
2018-05-28 18:52:04 +02:00
e9cf3b5347 CoW: Skip pointers that are used in Lattice edit mode. 2018-05-28 13:47:05 -03:00
46d7c55b17 Cleanup: Fix typo: updata -> update 2018-05-28 13:47:04 -03:00
f8d0447dfb CoW: Skip used pointers in MetaBall edit mode. 2018-05-28 13:47:04 -03:00
f36315dd34 CoW: Skip pointers used in Text edit mode. 2018-05-28 13:47:03 -03:00
98d4d4ce58 Tool System: workaround psys cursor conflict
This needs to be solved properly, for now add cursor-click tool
which can co-exist w/ particle paint.
2018-05-28 18:16:01 +02:00
42d6b8efc0 RNA: re-enable property notifiers
While these will be removed eventually,
it makes tracking down COW buts a hassle.
2018-05-28 18:16:01 +02:00
d2f8b48f01 Depsgraph: preserve memory caches for particles when creating Copy-on-Write
Solves issue with particle memory cache ignored.

Thanks Bastien for review!
2018-05-28 18:06:45 +02:00
2f56bf3535 Workbench: Fix uninitialized variable usage. 2018-05-28 12:27:50 -03:00
272ca5772d EEVEE: LookDev storage list wrongly used 2018-05-28 17:18:58 +02:00
9b6a30d2cb Fix T55226: outliner glitch with item open/close, after recent optimization. 2018-05-28 17:10:00 +02:00
765fd29d68 EEvEE: LookDev 2018-05-28 17:07:39 +02:00
ce5fa2deca Fix: Action/Graph editor UI's didn't update when channel properties were changed
More MessageBus-related silliness to resolve issue with toggling visibility/mute/locking
status of F-Curves/Groups/etc., as well as other things like modifying active keyframe's
values, or changing properties of F-Modifiers.

I've now ended up just whitelisting in the region subscribers all the animation-related
structs in RNA. But still, that may not be enough to deal with potential issues later
with the property sliders (shown per channel, optionally), which can come from anywhere.

(Spring bug)
2018-05-28 16:54:45 +02:00
1d320f10ac UI: Option to layout properties in two columns
Needed for proposed alternate layout, see T54951.
2018-05-28 16:49:30 +02:00
4045730d58 Fix missing animation curves update when tweaking f-curves
Action is an own datablock, meaning, changes to f-curves needs
to copy those changes to all evaluated versions of action datablock.
2018-05-28 16:45:28 +02:00
e673be1ebc Merge branch 'master' into blender2.8 2018-05-28 15:25:41 +02:00
dc0eed178a Fix Cycles + OSL build error, pass main to node editing functions. 2018-05-28 00:04:14 +02:00
95c5d1193f Merge branch 'master' into blender2.8 2018-05-27 21:10:43 +02:00
fd2c48726f UI: center align number buttons w/o text
This makes supporting split properties and text possible, see T54951
2018-05-27 21:08:50 +02:00
9c8da50106 Slightly blue tinted variation of the upcoming Flatty Dark theme.
It's been requested for a while now and with the upcoming
default dark theme this is a good companion variation.
2018-05-27 19:06:25 +02:00
e7010a05be Merge branch 'master' into blender2.8
Conflicts:
	source/blender/makesrna/intern/rna_object_api.c
	source/blender/makesrna/intern/rna_scene.c
	source/blender/makesrna/intern/rna_scene_api.c
2018-05-27 18:52:28 +02:00
38cb29d67e Cleanup: Nuke most of remaining evil G.main from RNA.
The few ones in getters/setters we cannot remove as easily, for now we
can live with those I think...
2018-05-27 18:46:39 +02:00
1863883a24 Merge branch 'master' into blender2.8 2018-05-27 17:26:59 +02:00
edce44d693 Cycles: Fix problems in the IES loader when rendering with no file selected 2018-05-27 17:16:15 +02:00
47f2b3b80d Merge branch 'master' into blender2.8 2018-05-27 12:54:21 +02:00
56254a42e0 UI: replace BLI_strncpy w/ memcpy
Size is already checked.
2018-05-27 12:50:03 +02:00
4ca4e64d25 Grid: Do not go over objects in front/side ortho views.
Fixes T55190 Grid displayed on top of objects in orthographic view
2018-05-27 11:26:17 +02:00
9a74b60367 Merge branch 'master' into blender2.8 2018-05-27 11:06:29 +02:00
474971f3d8 Cleanup: unused var 2018-05-27 11:06:11 +02:00
bc3727a943 Recently added IES conflicts w/ EEVEE 2018-05-27 11:01:46 +02:00
198be6f37b Grid: Fix T51813: Opaque grid on OSX. 2018-05-27 10:50:39 +02:00
06cb460cd7 3D View: minor change to NDOF view orbit
This change is needed for 2.8, where the NULL check isn't a reliable way
of testing if dynamic offset is needed.
2018-05-27 10:34:01 +02:00
12a9e9ae33 Fix restrict error in BLI_str_format_byte_unit
Don't use sprintf to append a string to it's self.

Also correct BLI_str_rstrip_float_zero's return value.
2018-05-27 10:28:04 +02:00
7a0699db34 make.bat : Fix builtime.txt being written in the wrong folder. 2018-05-26 19:20:07 -06:00
48155c210a Cycles: Add Support for IES files as textures for light strength
This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources.
The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp.

Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried.
Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file.

The user interface of the node is similar to the script node, the user can either select an internal Text or load a file.
Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot.

The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light,
rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport.

Reviewers: #cycles, dingto, sergey, brecht

Reviewed By: #cycles, dingto, brecht

Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey

Differential Revision: https://developer.blender.org/D1543
2018-05-27 01:24:57 +02:00
aefc793a81 Workbench: Shadow: Refine camera in shadow test.
Test if all nearplane points are not in front of the shadow BBox.
2018-05-27 00:15:47 +02:00
60ddea7758 Workbench: Shadows: Add frustum check and camera occlusion test.
If the object is manifold and the camera is in the shadow side, we can
use the depth fail method to fix the inverted shadow glitch.

Unfortunately this does not really work for non-manifold.

Implementation details:
We try to be as efficient as we can, we precompute camera near plane
projected into 2D shadow space so we can test for intersection with the
shadow boundbox easily.

As the intersection test is done in 2D it's pretty fast.
Unfortunately, this means the shadow bounds are all aligned to the same
space and are not the smallest bound we could extract.
2018-05-26 23:31:17 +02:00
975828e23a Armature: Fix warning. 2018-05-26 23:24:11 +02:00
8df99a5d8a DRW: Add new DRW_debug API.
This new API aim to provide simple function that can be called by the draw
engines during any phase of the draw pipeline. All calls are saved and
issued after all engines have finished rendering.

This removes the need of setuping special passes and shading groups for some
simple debug drawing.
2018-05-26 23:24:11 +02:00
c883f09fa8 Workbench: Codestyle 2018-05-26 23:24:11 +02:00
975eac0b07 Workbench: Shadow: Add shader variant for manifold case.
Totally Manifold objects only require a single increment/decrement of the
stencil value. This result in less geometry generated and less overdraw.
2018-05-26 23:21:33 +02:00
0c9974c8cd Workbench: Shadow: Use depth fail method for manifold objects.
Since this method have no failure case for manifold objects, use it.
2018-05-26 23:01:30 +02:00
ef502854fe Threads: add spinlock hit for hyperthreading processors on Windows.
Suggested by Percy Ross Tiglao.
2018-05-26 22:35:30 +02:00
44935fdfa3 Armature: Make Custom bone have the same appearance as other bones.
I had to correct some errors in the winding order of the normal bones.
2018-05-26 22:28:52 +02:00
2241a61aab Armature: Fix missing bone edges in object mode. 2018-05-26 22:28:52 +02:00
6b38fa8cab Armature: Modify Shape outline shader to use Line adjacency instead of tri.
This is much faster and simpler. This is also to make it compatible with
custom bone shape in the future.
2018-05-26 22:28:52 +02:00
581b021a1f Cleanup: unused defines 2018-05-26 13:15:55 +02:00
c9c95ed25f Cleanup: unused defines 2018-05-26 13:12:00 +02:00
75355ef426 RNA: correct naming w/ last cleanup 2018-05-26 13:06:40 +02:00
0d559a6730 RNA: follow boolean naming conventions 2018-05-26 11:54:25 +02:00
6ebcf98943 Cleanup: whitespace, long lines, duplicate include 2018-05-26 11:05:23 +02:00
3e3f6754b4 Cleanup: rename RNA property to match UI 2018-05-26 09:51:21 +02:00
33e45658eb COW Fix: Lamp manipulators 2018-05-26 09:45:58 +02:00
c9db7ceff2 make.bat: Add support for building with ninja.
ninja is an alternative to msbuild designed for fast rebuilds. However there is no IDE support, builds only from the command line.

Comparison between msbuild and ninja for a full build, build time in seconds.

Full Clean Build
msbuild     867.5
Ninja       801.2
Difference  -66.3 (-7.6%)

Minor Change
msbuild      43.0
Ninja        14.9
Difference  -28.1 (-64.4%)

No Changes
msbuild      23.0
Ninja         6.1
Difference  -16.9 (-73.5%)
2018-05-25 21:46:42 -06:00
bae880dc9e make.bat/cleanup: removed stray echo in make.bat 2018-05-25 17:59:07 -06:00
857e4e04d8 make.bat: refactor make.bat
make.bat was starting to become hard to maintain, this refactors it into separate batch files for each stage of the process.

-Improved detection of msvc2013/2015
-Improved failure handling.
-Added check for working msbuild and C++ compiler
-Added verbose switch to ease trouble shooting.
-Added Check if svn/cmake/git are in the path before using them
-Display the build configuration before asking to download the libraries
-Offer an option to recover an interrupted checkout of the libraries.
-Automatically check out sub-modules in-case they are missing.
2018-05-25 17:57:13 -06:00
64ee6f4e9f Fix error when snapping with occlusion.
Face normal may be facing the wrong side.
2018-05-25 18:43:38 -03:00
c9f7a3b32a Fix T55207, fix T55208: hair not positioned correctly after subsurf.
The problem was that the particle system modifier was reading ob->derivedDeform
during modifier stack evaluation. Due to the mesh -> DM conversion this was no
longer set leading to wrong results.

In fact we don't really need the deformed mesh, just the original mesh topology
for face/poly index remapping. So the solution is to use that instead.
2018-05-25 23:20:20 +02:00
4dee702332 Add number and memory size formatting throughout the UI
This commit adds number formatting (thousands separator) to the baking panel. It also adds a new function to format memory sizes (KB/GB/etc) and applies it to the baking panel and scene stats. The new function is unit tested.

Reviewers: Severin
Tags: #user_interface
Differential Revision: https://developer.blender.org/D1248
2018-05-25 22:41:49 +02:00
Dalai Felinto
768706c6a5 Fix eevee render settings not working
This was no longer working since 15c2801aac.
2018-05-25 19:51:18 +02:00
a3a069f493 Tool System: cursor tool now transforms on drag 2018-05-25 19:43:23 +02:00
5d2d36b068 Applied soc-2017-normal-tools 2018-05-25 22:24:24 +05:30
9dca74f0e5 [windows/make.bat] use a more reliable way of locating visual studio 2017.
The registry hack we were using wasn't very reliable, the recommended way to locating visual studio is using vswhere (15.2 and up), using it also allows to switch between the regular and pre-release versions.
2018-05-25 10:24:01 -06:00
562cf573d3 Multi-Object-Mode: EditMesh UV snap to cursor
D3422 by @Al
2018-05-25 17:28:37 +02:00
1bf2a7709f Timeline: Move Keying settings from sidebar to header as popover
Having them on the sidebar means we have to expand the editor every time.
2018-05-25 17:02:56 +02:00
8a73ea7af2 Use menu back theme colors for popover 2018-05-25 17:02:56 +02:00
988a14aa14 COW Fix: Transforming animated objects would jump when starting transforms
Just as with my earlier fix for bones (0492e56fec),
here we're reading evaluated object values into the "i" versions of each transform
property, and using the original/non-evaluated data for the pointers.

XXX:
What's not clear though is what we should be doing with the "BKE_object_where_is_calc()"
calls here. They currently use ob, but that probably shouldn't happen... and ob_eval
should in theory have a more up-to-date version of what it would need to evaluate!
2018-05-25 16:36:04 +02:00
51926de7f0 UI: popover now only centers on active button once 2018-05-25 16:31:52 +02:00
c0f9f69c7e Fix T55200: dragging object into hidden collection does not hide it. 2018-05-25 16:08:59 +02:00
5901c1ca42 UI: fix event handling direction
Correct arrow key direction in popovers,
also de-duplicate menu callback,
2018-05-25 15:47:12 +02:00
dd22080b9a Fix: X-Axis Mirror option was missing from the Pose Options popover
Although it's mostly a rigging option, sometimes it's useful to have it when posing.
2018-05-25 15:34:25 +02:00
572a9619b9 Remove DerivedMesh: paint_utils.c; Cow-ify PAINT_OT_sample_color
DM was only using it for color sampling in the 3Dview. Now it's properly
using COW evaluated versions of object and mesh instead.
2018-05-25 15:24:30 +02:00
40638e1970 Fix T55062: crash with workspace scene relations.
List of relations was saved with wrong struct type.
2018-05-25 15:06:40 +02:00
657fedbbee Style: use extra space for aligning parameters in a function. 2018-05-25 10:03:25 -03:00
8510472198 Cleanup: Change remaining BKE_scene_frame_get() in constraint.c to use DEG_get_ctime() 2018-05-25 14:49:11 +02:00
14b51b3974 Fix T55197: Dopesheet filtering settings were not triggering refresh anymore due to messagebus crap 2018-05-25 14:43:48 +02:00
Julian Eisel
dc26ef081b Fix T55198: Preferences Keybindings Crash
Operator sanitize function would be called for non operator props. Mistake from
88eafe078a.
2018-05-25 14:04:48 +02:00
45e7d609ce Fix outliner showing objects in collections instances.
It didn't do this before for groups, and while it could be useful this leads
to terrible performance when there are many instances.
2018-05-25 13:48:29 +02:00
2cc53227ab Outliner: optimize lookup of unused tree elements. 2018-05-25 13:48:29 +02:00
b11a1d5da2 UI: support for a popup panel which stays open 2018-05-25 12:55:22 +02:00
e9908134e8 UI: Move UI_paneltype_draw into layout code
No functional changes, needed for persistent popovers.
2018-05-25 12:55:22 +02:00
Dalai Felinto
fbc65c6b28 Fix T55165: Driving camera lens with property behaves unexpectedly
Differential Revision: https://developer.blender.org/D3438
2018-05-25 12:48:33 +02:00
8a78a53e3b Keymap: place cursor on press
Needed for tablet users.
2018-05-25 12:46:52 +02:00
d8a6c1d316 Cleanup/simplification for BKE_modifier_get_evaluated_mesh_from_object
* Added BKE_object_get_evaluated_mesh, which can also be used outside of
Modifier context.
* BKE_modifier_get_evaluated_mesh_from_object is now a dummy wrapper
around BKE_object_get_evaluated_mesh, we do not need anything special
anymore for RENDER quality option, since this is supposed to be handled
at depsgraph level... Maybe we can get rid of it at some point, but kind
of like the idea of keeping it for now, sounds more consitent.
2018-05-25 12:27:54 +02:00
ba6abd83b0 Cleanup: do not make functions for the pleasure of having functions... 2018-05-25 11:39:02 +02:00
f243390bd6 Cleanup: minor details in BKE paint code related to palettes.
* Always use BKE_id_new, unless you have a very good reason to use
lower-level code!
* Prefer to pass actual ID user pointer to functions like id_us_plus & co,
rather than 'floating' ID pointer, when possible. It makes it more clear
who is the user we increase count for!
2018-05-25 11:32:47 +02:00
03a80facfc Fix T55183, fix T55174: crashes with workspace / view layer relation.
Don't store pointers to ViewLayer in the workspace, only names. Add specific
relation type since the generic mechanism makes the code hard to follow.
Integrate with pointer restore for undo and library remapping code to avoid
data going out of sync.

Also add relation automatically if there doesn't exists one yet in
BKE_workspace_view_layer_get, because in general it's really hard to ensure
it will exist when making arbitrary scene changes.

Differential Revision: https://developer.blender.org/D3432
2018-05-25 11:16:58 +02:00
08da2826e0 Merge branch 'master' into blender2.8 2018-05-25 10:52:53 +02:00
9812943931 WM: check modal handlers for keymap lookups
Keep in sync with 2.8x
2018-05-25 10:51:05 +02:00
e31b8303ed UI: fix assert
Replace hard-coded button size check with UI_UNIT_X.

Caused icon-only buttons to have strings assigned based on UI-scale.
2018-05-25 10:45:48 +02:00
230943be2d Fix 3D Cursor w/ interface scale 2018-05-25 10:07:28 +02:00
ef22d2e8ad Merge branch 'master' into blender2.8 2018-05-25 10:04:25 +02:00
d02335a195 3D View: add pixelsize function w/o UI scale 2018-05-25 10:00:51 +02:00
2a6e4f7157 Cleanup: style 2018-05-25 09:45:04 +02:00
a79252d8c7 Keymap: use Ctrl-Shift-Space for fullscreen area
Closer to Shift-Space, less awkward to access.
2018-05-25 09:20:37 +02:00
f04cadd83e UI: Move Split into Mesh Menu
This doesn't just apply to faces.
2018-05-25 08:31:26 +02:00
bc9b202e65 Fix split only checking selected faces 2018-05-25 08:31:26 +02:00
51b2622814 UI: move copy/paste into the object menu
We already have per mode copy/paste in mode specific menus.
2018-05-25 08:20:19 +02:00
b611cecf4e UI: Specials menu update
- Name "Context Menu".
- Make it more context sensitive.
- Remove some more obscure items.

Patch from @billreynish
2018-05-25 08:20:19 +02:00
1be4eba27b Fix crash when entering the curve edit mode. 2018-05-24 19:22:35 -03:00
a0dbaf1d9d ED_transform_snap_object: remove unused bmain parameter in context creation. 2018-05-24 19:09:01 -03:00
302fea6b61 Change defaults
- Vertex/Edge Slide: Correct UV's = ON
- Extrude Along Normals: Even Thickness = ON
- Laplacian Smooth: Lambda Factor = 1.0
- UV/Image Editor: Normalized Coordinates = ON
- Render Image: Dithering = 1
- Image Sequence Auto Refresh = ON

See T54943
2018-05-24 21:33:39 +02:00
5e1021f78f 3D View: remove temporary edge-select hack
This caused a glitch with COW, where forcing edge selection
caused the evaluated scene to enable this afterwards.

Now pass the selection mode as an argument to the draw function.
2018-05-24 20:38:17 +02:00
c72b576aab Fix crash with snap and project to self.
Apparently the original `edit_btmesh` is being freed and the new one has to be referenced
2018-05-24 15:35:20 -03:00
357199375b Correct own last commit 2018-05-24 19:36:38 +02:00
5a431be629 Multi-Object-Editing: MESH_OT_shortest_path_select
Note from revisor: Edit the error message to match the original one.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3351
2018-05-24 19:34:22 +02:00
d209fa6e35 Fix T55184: Edge-loop select fails w/ vert/face modes 2018-05-24 19:31:07 +02:00
0983d97ab9 Fix T55186: Circle and Lasso select were not working on Pose Bones
These needed to be using the COW evaluated data, instead of the raw bone
positions.

All other datatypes still need converting to work with this though.
2018-05-24 19:13:15 +02:00
5e2f9c5c67 Cycles: Cleanup: Remove duplicated atan2f definition for OpenCL
Turns out that atan2f was already defined for OpenCL.
2018-05-24 19:08:06 +02:00
5db7f2c1ee Flatty Light
Add new Status Bar settings and minor tweaks to axis colors inspired by Andy's changes to the theme.
2018-05-24 18:50:02 +02:00
b4a8b81399 Cycles Denoising: Don't use atomics in the accumulation kernel on CPUs
The GPU kernel needs to use atomics for accumulation since all offsets are processed in
parallel, but on CPUs that's not the case, so we can disable them there for a considerable speedup.
2018-05-24 18:44:56 +02:00
b04b933acf UI: use icons in render menu 2018-05-24 18:43:16 +02:00
bef08e63d7 Keymap: remove Ctrl-Up/Down to toggle full-area
This is already accessible via Shift-Space which can be accessed
easily with one hand.
2018-05-24 18:39:05 +02:00
0864a4c1ea Always get a reference point when snapping with the projected elements option enabled. 2018-05-24 13:37:48 -03:00
8ea4539542 UI: View menu area operators now in submenu 2018-05-24 18:35:19 +02:00
f7c75e8bd7 COW Fix: Border selecting bones on rigs broke
Annoyingly, this was working as recently as yesterday...
2018-05-24 18:17:52 +02:00
12b261be41 UI: disable view context w/ OpenGL anim render
The 3D view menu can GL render from a single view
2018-05-24 18:16:06 +02:00
1cf17b257d UI: remove render panel, move operators to menu 2018-05-24 18:10:57 +02:00
132cda3925 Revert "UI: remove 'Render' top level menu"
This reverts commit 10e43c0aef.

After discussion, it's useful to have render menu
for more obscure render options.
2018-05-24 18:10:57 +02:00
7a88a7742b Drivers UI (Part of T55145) - WIP first steps towards getting a floating driver settings panel
This commit adds a new menu entry - "Edit Driver" - the RMB menu that
will show a popover panel displaying the settings for the driver you
activated the menu item on. This shows the popover panel defined in
yesterday's commit (GRAPH_PT_drivers_popover).

It is possible to edit the driver settings from this panel now.
However, do be warned that the functionality presented is highly
WIP still. There are some unresolved issues, such as:
 - The popover disappears too easily on any mouse movements/clicks
   on anything, making the panel less useful right now than it should.

 - The layout still needs refining. Currently the layout that's there
   is a bit of a placeholder until we can play around with it a bit
   more to see/feel what feels good/right or what is too much.

 - The "Open Drivers Editor" on the bottom of the panel doesn't work.
   There are some tricky context tricky things that need to happen here
   to make that case work, since the operator button won't have the necessary
   context info.
2018-05-24 18:10:21 +02:00
b2ee8e1cba Fix typo in editmesh edge delete 2018-05-24 17:49:44 +02:00
72f4bdf604 UI: add top-level 'Edit' menu
Use this for undo/redo, copy/paste & preferences.
2018-05-24 16:48:28 +02:00
6862762685 Cycles/Compositor: Add arctan2 operation to the Math node
The Math node currently has the normal atan() function, but for
actual angles this is fairly useless without additional nodes to handle the signs.

Since the node has two inputs anyways, it only makes sense to add an arctan2 option.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3430
2018-05-24 16:46:02 +02:00
d638ad3b20 Merge branch 'master' into blender2.8 2018-05-24 16:44:26 +02:00
5505ba8d47 Cycles/Eevee: Implement disk and ellipse shapes for area lamps
The implementation is pretty straightforward.

In Cycles, sampling the shapes is currently done w.r.t. area instead of solid angle.

There is a paper on solid angle sampling for disks [1], but the described algorithm is based on
simply sampling the enclosing square and rejecting samples outside of the disk, which is not exactly
great for Cycles' RNG (we'd need to setup a LCG for the repeated sampling) and for GPU divergence.

Even worse, the algorithm is only defined for disks. For ellipses, the basic idea still works, but a
way to analytically calculate the solid angle is required. This is technically possible [2], but the
calculation is extremely complex and still requires a lookup table for the Heuman Lambda function.

Therefore, I've decided to not implement that for now, we could still look into it later on.

In Eevee, the code uses the existing ltc_evaluate_disk to implement the lighting calculations.

[1]: "Solid Angle Sampling of Disk and Cylinder Lights"
[2]: "Analytical solution for the solid angle subtended at any point by an ellipse via a point source radiation vector potential"

Reviewers: sergey, brecht, fclem

Differential Revision: https://developer.blender.org/D3171
2018-05-24 16:43:47 +02:00
Dalai Felinto
e8c8ff4f86 Fix all modifiers that depended on BKE_modifier_get_evaluated_mesh_from_object
This fix applying the following modifiers:
* Boolean (working already)
* Array
* Mesh Deform
* Surface Deform
* Vertex Weight Proximity

This function was to return evaluated mesh. So it should get the evaluated
object at all times. So in this case it makes more sense to simply pass the
depsgraph (or in this case the ModifierEvalContext that contains both the
depsgraph and the flag.

Solution discussed with Bastien Montagne.
2018-05-24 16:43:21 +02:00
8d9faf840b 3D View: remove poll 3D view for copy/paste
These operators only need selected objects.
2018-05-24 16:40:33 +02:00
10e43c0aef UI: remove 'Render' top level menu
- Toggle render window is in the window menu.
- OpenGL render settings in the 3D View menu.
- Playback animation in the render panel.
2018-05-24 16:20:56 +02:00
58fadb379a Correct last commit 2018-05-24 16:09:20 +02:00
ad9278fdad UI: re-arrange 3D view menus
- Adjusted order and names for better consistency.
- Group add/edit/delete into menu sections.
- Move UV/Vertex color into 'Face Data' menu, matching 'Edge Data'.
- De-duplicate items between vertex/edge/face menu.
- Remove undo/redo menu (to be moved into 'Edit' menu).
- Remove Auto-Merge & Proportional Editing
  (already available from the 3D view).

Patch from @billreynish w/ edits
2018-05-24 16:00:11 +02:00
Dalai Felinto
ec809d0cbf Fix boolean modifier when objects have transformations
Follow up for 9406a1f195.
2018-05-24 15:56:50 +02:00
44bab06960 Fix: Name of selected object/bone + current frame in 3D view didn't take region overlap (for headers-on-bottom) into account 2018-05-24 15:43:46 +02:00
Dalai Felinto
9406a1f195 Fix cannot apply boolean modifier 2018-05-24 15:26:31 +02:00
d64fbe9456 Partial Fix for T55165: Camera manipulator was not updating when the focal length ("lens") parameter was changed directly 2018-05-24 15:26:19 +02:00
0d768cca65 Fix T55177: pose-mode manipulator placement w/ COW 2018-05-24 15:22:15 +02:00
40dfb3eed6 Oops... should rebuild before committing 2018-05-24 15:10:12 +02:00
72039cd7cc Multi Pose: Selecting a bone in one armature doesn't deselect bones in the other armatures
This was actually due to missing COW flushing of pose data on the "other"
objects (only the active object was getting tagged for updates).
2018-05-24 15:05:17 +02:00
c788bd0211 Fix: Several pose select operators were not in fact working with COW
The following operators are fixed in this commit
* POSE_OT_select_linked
* POSE_OT_select_grouped
* POSE_OT_select_mirror
2018-05-24 15:05:17 +02:00
fe820eba92 Cleanup: Some minor tweaks to code 2018-05-24 15:05:17 +02:00
dfb959b6c3 Fix missing ID pointers expansion for ID itself in readfile code.
Was breaking static override chaining (static override of a linked
datablock that is already a static override in it original lib file).

Dummy mistake, thanks to @dfelinto for finding the bug.
2018-05-24 14:56:39 +02:00
b4106ed170 Fix T55175: outliner "Show Active" not working. 2018-05-24 14:48:23 +02:00
39aea50155 Fix T55178: Cursor fails to restore on cancel
574c0fe38f caused complications
restoring the cursor.

Use WM_cursor_modal_set/restore which is intended for operator use,
calling ED_region_cursor_set after an operator runs isn't reliable.
2018-05-24 14:23:32 +02:00
Dalai Felinto
c1361d2651 Depsgraph: tag depsgraph for copy-on-write flush when RNA changes
Fixes bug with changes to properties not being flushed to the COW data.
It fixes T55144.

This is the part of rBb4b745b72064 that is required although slow.
Which was partially addressed but the rest of the commit, which in
turn broke things. So for now let's get RNA to flush slow cow, and
deal with the consequences.
2018-05-24 12:17:55 +02:00
cb3c9cba49 Fix T55171: crash with undo and linked collections.
Collections created in library file versioning need to be set as coming
from the library, otherwise they get freed on undo.
2018-05-24 12:02:56 +02:00
8766ab7526 Fix Lamps, Empties, Cameras and Speakers not using theme colors 2018-05-24 12:01:25 +02:00
b2a2983d14 Slightly smaller triangle collapse icon on panels 2018-05-24 11:23:00 +02:00
70a3b7e70c Fix T55170 and T55167: Crash adding new curve
We do the same solution as we have for mesh_evaluated.
2018-05-24 10:38:39 +02:00
Julian Eisel
2d05f91bea UI: Add theming support for the status-bar
For now not bumping subversion, even though I technically should. We can do if
needed, but would like to avoid bumping it every few days...
2018-05-24 10:26:22 +02:00
3820237ddb Workbench: in editmode the toggle xray option will be disabled
Z-Key was already taken by show hidden wires
2018-05-24 10:23:03 +02:00
7762522ecd Workbench: define to enable/disable revealage buffer. 2018-05-24 09:28:29 +02:00
e561eef3ff Workbench: Revealage buffer 2018-05-24 09:28:29 +02:00
a709e8d6bb Correct last commit 2018-05-24 09:27:13 +02:00
5df8a6eb94 Correct fix for view center
The view layers active object was not being copied.
2018-05-24 09:08:36 +02:00
153c7746ab Revert "Fix COW view center for pose mode"
This reverts commit 485990e4aa.
2018-05-24 09:08:36 +02:00
d7824de8e4 Merge branch 'master' into blender2.8 2018-05-24 09:03:07 +02:00
1318660b04 Fix T55034: Setting duplication group for multiple selected items only
affects one item

UI editing multiple selected items missed the case of PROP_POINTER
properties

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3373
2018-05-24 09:02:17 +02:00
569a5e0d7c Merge branch 'master' into blender2.8 2018-05-24 08:48:40 +02:00
3e9b592b08 Fix Extend property of Lasso select tool in Mask editor not working
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3361
2018-05-24 08:41:13 +02:00
54f2e58452 Fix T54336: Extend property of Lasso select tool in Node editor does not
work

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3360
2018-05-24 08:34:31 +02:00
5ee965eea5 Merge branch 'master' into blender2.8 2018-05-24 08:27:01 +02:00
d78894eb3e Fix T54336: Extend property of Lasso select tool in Node editor does not
work
2018-05-24 08:21:13 +02:00
176e18436c Fix T55137: Compilation failing on non-x86-64 architectures
Some conversion helper functions were (most likely by accident) contained
inside an ifdef for SSE2 support, so on e.g. ARM they would be undefined
and therefore cause compilation to fail.
2018-05-24 01:41:18 +02:00
Julian Eisel
6f20fcd598 UI: Global "Status-bar" Area (WIP)
* Add horizontal bar at bottom of all non-temp windows, similar to the Top-bar.
* Status-bar is hidden in UI-less fullscreen mode
* Current contents are preliminary and based on T54861:
** Left: Current file-path if needed. "(Modified)" note if file was changed.
** Center: Scene statistics (like in 2.7 Info Editor).
** Right: Progress-bars and reports
* Internally managed as own "STATUSBAR" editor-type (hidden in UI).
* Like with the Top-bar, Status-bar data and SDNA writing is disabled.
* Most changes in low-level screen/area code are to support layout bounds that differ from window bounds.

Design task: T54861
Main changes approved by @brecht.
2018-05-23 22:38:25 +02:00
7b58073dc0 Fix INFO_MT_surface_add
It was a copy of `INFO_MT_curve_add` (I'm sure it was not intentional).
2018-05-23 17:27:10 -03:00
67598d39b4 Revert "Depsgraph: refresh RNA that doesn't need a full rebuild"
This reverts commit b4b745b720.

This was causing a problem in 01_025_A.anim.blend from the Spring
production files, where selecting one of Autumn's bones would
result in character jumping back to the origin.
2018-05-23 20:30:17 +02:00
6955add502 Fix T55166: crash joining areas
Caused by own commit 6e40b2de7a,

Tested w/o this call and can't find any errors so commenting the call.
2018-05-23 20:25:55 +02:00
Dalai Felinto
401e975c61 Fix curve not updating when scaling Bevel Object
Note the relationship we need is from the geometry/object to the curve data,
not the curve object.

Related to T55167, though when copy-on-write is enabled, we still get a crash.
2018-05-23 20:05:17 +02:00
933a083587 UI: popup panel operator, as we have for menus 2018-05-23 19:48:28 +02:00
b642b510e1 Fix T55168: missing updates when switching particle system type. 2018-05-23 18:59:26 +02:00
b6725d3cbf Fix wrong object user count on duplicate. 2018-05-23 18:53:37 +02:00
e2a827c848 Fix crash loading without UI, after recent changes. 2018-05-23 18:32:04 +02:00
3fb38d664b Fix T55163: visibility not updated for instanced collections. 2018-05-23 18:32:04 +02:00
342d94c375 Fix compiler error: Stupid const vs non const 2018-05-23 18:29:52 +02:00
7e7680e33b Drivers UI (Part of T55145) - WIP work to prepare a panel we can shove into a popover
HINT: It's called GRAPH_PT_drivers_popover right now
2018-05-23 18:18:58 +02:00
84c3b175f6 Fix typo in header 2018-05-23 17:13:41 +02:00
485990e4aa Fix COW view center for pose mode 2018-05-23 16:45:07 +02:00
0cc2666605 Fix last usages of Scene.r.cfra in modifiers code.
Note that some modifiers-related code in BKE still uses that...
2018-05-23 16:37:36 +02:00
9cb2b9b523 Drivers UI (Part of T55145) - Show datablock that driven property belongs to instead of only the property
Otherwise, it's not clear where things are coming from.

FIXME: The icons for datablocks may not always be correct. It uses the
innermost struct's icon instead of the datablock's icon - e.g. Bone
vs Object/Armature. But, that may make more sense for users?
2018-05-23 16:32:46 +02:00
d185f5be09 Drivers UI (Part of T55145) - Refactor existing UI code to allow it to be reused
The idea is that we may be able to just take this code and put it into a
new popover panel that gets displayed when called from the UI. This should
at least work well for a first pass test of what we want this UI to look like.
2018-05-23 16:32:46 +02:00
d1e8d8f40f Drivers UI: Add the "Update Dependencies" logic into the callbacks that should be run on every button press
In theory, this should mean that we can get rid of the "Update Dependencies"
button. In practice, there may still be cases where it's still needed
(as somehow, it did end up being needed in the past, even though the RNA
calls should in theory be doing everything needed already).
2018-05-23 16:32:46 +02:00
a3ad55b346 Drivers UI: Get rid of dedicated button to remove active driver
There are multiple other ways to do it. Leaving this here just made it
easy (and dangerous) to accidentally remove the driver, and was causing
other problems with other layouts.
2018-05-23 16:32:46 +02:00
57b47ebb28 Drivers UI Cleanup (Part of T55145)
* Remove "Show Debug Info" option. Everyone has it turned on all the time,
  since it's just useful to have
* Make the "Remove Driver" button less prominent. It doesn't happen that much,
  so it shouldn't take up as much room
* Make "expressions" textbox wider (i.e. taking up the whole column width)
  by separating the label and textbox on separate lines.
* Rename "Add Variable" button to make it clearer to users what "variables"
  may be (i.e. they serve as a way to specify Inputs, just like adding a
  "Source Data" node in a nodetree)
* Regroup buttons
2018-05-23 16:32:46 +02:00
83ed0df1c2 Cleanup: Remove unused code 2018-05-23 16:32:46 +02:00
Dalai Felinto
ccabb26082 OpenGL: documentation for the builtin GPU shaders
This is intended to help developers to know how and when to use each shader.
There are plenty of undocumented shaders, but it's a matter of filling them in.

The script I used to quickly find the related shaders for a const is: P700

Original patch: D2318
2018-05-23 16:02:53 +02:00
4a2213dc9a Fix modifiers not using depsgraph time for texture evaluation.
Texture animation seems to be broken anyway currently, but at leat
modifier side it should now be OK.
2018-05-23 15:55:13 +02:00
a455e35343 UI: move vertex/edge/face into header
These are frequently accessed,
so use the newly freed space to make them more prominent.
2018-05-23 15:41:04 +02:00
Dalai Felinto
1ecfe42d37 Remove DEG_TAG_COPY_ON_WRITE tag on rna update for scene.render
This is no longer needed since rBb4b745b72064.
2018-05-23 15:34:48 +02:00
b4b745b720 Depsgraph: refresh RNA that doesn't need a full rebuild
Fixes bug with changes to properties not being flushed to the COW data.
2018-05-23 15:26:50 +02:00
6afccf6348 Workbench: Checkboard pattern for supporting objects 2018-05-23 15:22:51 +02:00
1c572b7412 Fix T55161: outliner Blender File with filter showing irrelevant libraries. 2018-05-23 14:43:24 +02:00
c44ccbc518 Cleanup: fix some weak assumptions in bone renaming code. 2018-05-23 14:23:29 +02:00
e71b12048c WM: add back Ctrl-Space to toggle full area 2018-05-23 14:11:39 +02:00
b4b569feeb Cleanup: rename idname -> name
This isn't for ID's
2018-05-23 14:11:39 +02:00
c0ac479134 Cleanup: shadow variable warning 2018-05-23 14:11:39 +02:00
7c5e174871 Fix T55160: crash renaming view layer. 2018-05-23 13:52:51 +02:00
37b947c7ef Cleanup: remove debug print. 2018-05-23 13:30:36 +02:00
07dee0f79c Fix missing autosmooth in Cycles after copy-on-write changes. 2018-05-23 13:25:06 +02:00
b20449cc08 Cycles/Render API: changes for better copy-on-write support.
Mainly just passing the depsgraph and evaluated scene and camera, instead of
the original one. Patch by Sergey, further modifications by Brecht.
2018-05-23 13:21:02 +02:00
d59b74adb3 Fix T53481: Linked scene crashes on load 2018-05-23 12:51:48 +02:00
858e8f453d Workbench: When in see through mode, only render depth of active object
in EDIT MODE
2018-05-23 12:30:42 +02:00
Julian Eisel
909d548d56 Fix T55072: Top bar disappears when loading factory settings (causing ASAN crash) 2018-05-23 12:06:38 +02:00
5667822876 Cycles: convert pointdensity from DerivedMesh to COW Mesh.
Fixes hang in regression tests.
2018-05-23 11:28:26 +02:00
8dc564096f Workbench: Renamed Object Outline to Outline.
So it fits in the pop-over
2018-05-23 10:57:50 +02:00
8d92873230 Workbench: See through
Unmultiplied the final color during compositing. Same as the revealage
buffer would do
Also use the DRW_STATE_ADDITION_FULL as it is aware of premultiplied
colors
2018-05-23 10:54:22 +02:00
e92baab348 Merge branch 'master' into blender2.8 2018-05-23 10:51:11 +02:00
d886e32270 Cleanup: strip trailing space from interface files 2018-05-23 10:48:50 +02:00
37b5c52f11 Workspace: remove deprecated view layer
Was removed in 2.80.4, this was not default and unsupported for linking.
2018-05-23 09:37:33 +02:00
8ac8ef8ec7 Workbench: Studiolights merge error? 2018-05-23 08:55:14 +02:00
44f78c95be Cleanup: move toolsystem into own include
Many files using the window manager don't access the tool-system.

This avoids rebuilding many files when the tool-system changes.
2018-05-23 08:23:16 +02:00
f5f66d4901 Workbench: Fixed Memory Leak 2018-05-23 08:20:25 +02:00
17aef80207 Multi-Object-Mode: EditCurve Subdivide
D3382 by @dgriffin91
2018-05-23 07:41:58 +02:00
647232f7f1 Multi-Object-Mode: EditCurve Select Linked
D3409 by @dgriffin91
2018-05-23 07:34:10 +02:00
504cbc1954 Merge branch 'master' into blender2.8 2018-05-23 07:30:50 +02:00
103a31f712 Fix incorrect size in aligned lockfree realloc
Thanks to @alikendarfen for finding.
2018-05-23 07:24:57 +02:00
062ee07b7f Fix some Cycles modifier stack issues with copy-on-write.
There's still many problems, but this avoids modifiers being applied twice,
subsurf render levels not being respected and hair render crashing.
2018-05-22 20:01:15 +02:00
78a26f28aa Fix own error using handler after freeing
Was introduced in e7895bac07
Only certain actions caused this, reported as T55155
2018-05-22 19:35:48 +02:00
e6c27b4dab Fix T55071: Brush preview fails 2018-05-22 19:23:06 +02:00
8aebcf8b7d Fix crash in modifier stack after recent changes. 2018-05-22 19:10:30 +02:00
2fb9a50a4f Fix T55146: hair + subsurf modifier not positioning hair correctly.
ORIGSPACE data was not being preserved correctly through subsurf.
2018-05-22 18:43:20 +02:00
c080c096ce Fix crash when HDR images are missing 2018-05-22 18:36:36 +02:00
6e8d4bcd01 Fix T55153: missing updates when changing simplify settings.
This line should not have been removed.
2018-05-22 18:17:28 +02:00
3ada840e65 blenderplayer: add stubs 2018-05-22 17:56:56 +02:00
3c44c67e96 Removed no-longer-required workaround for doubly-deformed meshes 2018-05-22 17:38:27 +02:00
66d18d93c4 Merge branch 'master' into blender2.8 2018-05-22 17:24:32 +02:00
76ece90d4a Fix T55093: Bisect + fill crash 2018-05-22 17:23:25 +02:00
f5d911f8b0 Modifiers: ported Cloth DerivedMesh → Mesh
The modifier is still quite slow; this could be due to caches being written
to a CoW datablock instead of the original one. More investigation is
needed.
2018-05-22 17:11:30 +02:00
e89fa4c85b Cloth Modifier: get time from depsgraph instead of scene 2018-05-22 17:08:57 +02:00
6953c57d2c Fix T55149: missing mesh custom data after modifier stack, after recent changes. 2018-05-22 17:07:59 +02:00
1b164cf81e Workbench: SeeThrough
added a fresnel effect

TODO: solve memory leak
2018-05-22 16:59:43 +02:00
8644eef5c3 COw operators: Fix VIEW3D_OT_snap_selected_to_grid 2018-05-22 16:44:34 +02:00
397665dea3 Fix: Deselecting bones using box select didn't work
Logic here was a bit broken.
1) We need to send updates even when deselecting bones, not only when we
   actually end up select then.
2) Also, when bones are locked for "selectability", they should not be able
   to be deselected.
2018-05-22 16:44:13 +02:00
6573af5211 Drivers Editor UI Tweaks (Part of T55145)
To bring the UI more in line with the proposed design in T54653 for the "Add Drivers"
popup panel (NOTE: this is separate from the "Drivers Editor", in previous commit!),
this commit adds a new panel - "Driven Property" to the Drivers Editor UI.

This basically duplicates the "Active F-Curve" panel (with less options)
to make it easier to see at a glance which property the Drivers Editor is
showing you.
2018-05-22 16:44:13 +02:00
c685c19df9 Drivers UI (Part of T55145): Add "Show Drivers Editor" entry to RMB menus
This commit adds an operator, "Show Drivers Editor", to the RMB menu when
clicking on properties.

As per T54653, this will open a new Graph Editor instance in a new/separate
window (much like how the User Preferences show up in a popup window now),
and will configure all the relevant panels so that you can see and edit the
driver settings immediately without doing a lot of the view configuration steps
that were previously needed.

When doing so on a property that is driven, the driver/fcurve for that property
will be made active in the editor, ready for you to start editing its settings
without having to hunt it down again first.
2018-05-22 16:44:13 +02:00
6f127b22e6 UI Tweak: Make User Preferences window slightly taller, to better fit the contents 2018-05-22 16:44:13 +02:00
6781fac42e Cleanup: warning 2018-05-22 16:12:41 +02:00
ab19609233 Fix T55069: 3D widget misses pivot-point refresh 2018-05-22 16:11:39 +02:00
53d1ec95ea Fix outliner incomplete collections right click menu in Blender File. 2018-05-22 15:49:50 +02:00
96a7ed8a15 Tool System: store operator properties in the tool
This replaces last-used property use which wasn't reliable since
properties were not considered 'set' - causing them to be ignored.
2018-05-22 15:31:06 +02:00
298f8042ef Cleanup: warning 2018-05-22 15:31:06 +02:00
cc9513d944 Fix outliner crashes when dragging elements in some cases.
Avoid rebuilding outliner tree in more cases, also helps performance.
2018-05-22 15:09:21 +02:00
d97471ddf7 Workbench: Fixed memory leak
ImBuf radiance buffers were freed incorrectly
2018-05-22 15:05:11 +02:00
dfe088c5d9 Workbench: SeeThrough draw option
Option to see through all meshes (transparency)

Works for OB_SOLID and OB_TEXTURED. Does not work for
V3D_SHADING_SHADOW.

TODO: Fresnel effect
2018-05-22 14:55:50 +02:00
ff19b527e8 Workbench: Calculate irradiance using radiance buffers 2018-05-22 14:55:50 +02:00
c7df618263 3D Cursor: Clip if behind near plane. 2018-05-22 14:33:07 +02:00
bc46034752 Cleanup: fix compiler warnings. 2018-05-22 14:17:52 +02:00
0d2aa1a7bb Cleanup: make group/collection versioning a bit more clear. 2018-05-22 14:17:51 +02:00
f99197fb2d Transform: Support mixed snap in 3d View.
Allows more than one snap mode to be enabled. So different combinations are possible.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: Christopher_Anderssarian, duarteframos

Tags: #bf_blender_2.8

Differential Revision: D3400
2018-05-22 08:58:56 -03:00
47b9d7494e Experimental Armature Drawing Tweak for Relationship Lines
Only show hierarchy relationship lines when bone or its parent is selected.
This cuts down the clutter visible in general when relationship lines are
enabled (currently they can't be disabled), which should make it more useful
to keep them on (e.g. constraint lines/hints can still be drawn this way).
2018-05-22 13:39:01 +02:00
e12df10120 COW Operators: Fix VIEW3D_OT_snap_cursor_to _active _selected _center and _grid
Reviewers: sergey, aligorith

Differential Revision: https://developer.blender.org/D3414
2018-05-22 12:20:59 +02:00
7f714fdbb2 Depsgraph: Enable copy on write by default
As was decided at today's dev kickoff, we're now moving to having
Copy-on-Write enabled by default, as 2.8 is barely functional with
it off.

To run Blender *without* COW (e.g. for testing), use:
--disable-copy-on-write
2018-05-22 12:00:23 +02:00
9fc5a0c95e Fix area tool getting out of sync w/ active tool 2018-05-22 09:41:41 +02:00
0c1676f388 WM: call keymap callback from manipulators
Not currently needed, add to avoid confusion later on.
2018-05-22 09:27:02 +02:00
6974afba82 WM: use keymap poll for manipulators 2018-05-22 09:22:20 +02:00
bb45381bc2 Merge branch 'master' into blender2.8 2018-05-22 08:49:24 +02:00
28c20fc393 Memory allocator: use lockfree calls internally
Was already used in some areas.
2018-05-22 08:45:47 +02:00
4e14437cb0 Multi-Object-Mode: EditCurve Select Random
D3405 by @dgriffin91
2018-05-22 08:25:05 +02:00
c7903f17a2 Fix memory leak in armature delete 2018-05-22 08:20:19 +02:00
ee1327a84c Multi-Object-Mode: EditLattice Select All
D3164 by @ranjian0
2018-05-22 08:11:13 +02:00
99f994e7ed Fix crash drawing edit-lattice
Edit-mode was never using batch cache.
2018-05-22 08:10:36 +02:00
17778ddeb7 Cleanup: naming
Use 'ob' prefix for objects, 'eval' suffix for evaluated data.
2018-05-22 07:48:12 +02:00
ac476375b1 Cleanup: style, whitespace 2018-05-22 07:39:16 +02:00
67cf4cb5ec Cleanup: replace MEM_SAFE_FREE -> MEM_freeN
No need to check for NULL in this case.
2018-05-22 07:28:14 +02:00
feabab6a9e Fix compilation with ndof code. 2018-05-21 21:18:12 +02:00
612364181a Static Override: Fix drivers' ID target overridability.
You need the whole chain of pointers... This was breaking static
overrides of any rig basically.

Note that this kills performances again (adding several hundreds of
thousands more stuff on a blendrig...), need a better way to handle RNA
override walking.
2018-05-21 21:14:54 +02:00
161ab6109e COW Operators: Fix VIEW3D_OT_ rotate move zoom dolly orbit roll pan smoothview and the ndof versions
Fixes camera view locking, camera related transitions and movements with the active object as pivot point
Note there can still be problems if the active object is not selectable
2018-05-21 20:33:12 +02:00
9f66d00287 CMake: only include licences for enabled libs 2018-05-21 18:41:59 +02:00
13d2df32c7 Fix broken draw code from last Thursday commit.
Seriously... Not all edges have faces!!!!!!!!

Quick fix to make it possible to load/use customshaped bones again, not
100% sure it is correct, but... At least it does not crash anymore!
2018-05-21 18:00:50 +02:00
f0fda91a55 Merge branch 'master' into blender2.8 2018-05-21 17:27:38 +02:00
20bafbd550 Cleanup: unused vars 2018-05-21 17:27:21 +02:00
605e184167 Cleanup: use const for transform internal API 2018-05-21 17:24:14 +02:00
08ba057eef Fix misuse of the use_occlusion_test parameter. 2018-05-21 11:17:19 -03:00
f14e4510ac Transform Snap: Fix normal in the wrong space. 2018-05-21 11:05:34 -03:00
575437ac90 3D View: fix scale of 3D cursor crosshair
Interface scale was applied twice.
2018-05-21 14:51:10 +02:00
fbe73d1f31 UI: fix error for tools w/o a keymap 2018-05-21 13:08:44 +02:00
3b1b625ead UI: use spacebar for toolbar
- This allows quick, consistent toolbar access
  w/o conflicting w/ the keymap.
  Where pressing space before a key activates that operator as a tool
  instead of running immediately.
- Search can still be accessed by pressing spacebar again.
- When there is no toolbar for a space, operator search still opens.
2018-05-21 12:46:26 +02:00
3102821c9c Revert "Fix/workaround RNA build error in C++ API."
This reverts commit 9f2ae547c0.

Args were reordered.
2018-05-21 12:38:52 +02:00
bdc3335016 Merge branch 'master' into blender2.8 2018-05-21 12:37:54 +02:00
882daeffc5 RNA: support for PARM_OUTPUT & PARM_RNAPTR 2018-05-21 12:34:11 +02:00
21777533fb Merge branch 'master' into blender2.8 2018-05-21 12:26:36 +02:00
6d8aa85051 Fix too much memory usage for Cycles attribute map.
Thanks to Thomas Krebs for identifying the problem and solution.
2018-05-21 11:14:59 +02:00
9f2ae547c0 Fix/workaround RNA build error in C++ API.
It seems output parameter needs to be the last one.
2018-05-21 11:13:56 +02:00
0e9605f44d Merge branch 'master' into blender2.8 2018-05-21 10:54:51 +02:00
4198c18f15 Cleanup: correct variable names 2018-05-21 10:53:50 +02:00
698dbd6500 UI: generate dynamic keymap for popup toolbar
Set keys for tools based on the current keymap.

This keeps consistency between tools immediate execution.
2018-05-21 10:46:27 +02:00
351c6d4346 Merge branch 'master' into blender2.8 2018-05-21 10:40:09 +02:00
12a60265cd WM: utility to find a keymap item from an operator
Also RNA access to WM_keyconfig_update,
needed when generating dynamic keymaps used in menus immediately after.
2018-05-21 10:35:44 +02:00
94fd828d75 Error in last commit 2018-05-21 08:22:08 +02:00
768a152883 UI: proof of concept keymap for the popup toolbar 2018-05-20 22:39:19 +02:00
e7895bac07 UI: support for custom keymaps for popovers 2018-05-20 22:39:14 +02:00
46514cf865 COW Operators: Fix VIEW3D_OT_view_all and camera mode of VIEW3D_OT_viewnumpad
Reviewers: sergey, aligorith

Maniphest Tasks: T54829

Differential Revision: https://developer.blender.org/D3314
2018-05-20 20:05:26 +02:00
8e0953eb49 COW Operators: Fix VIEW3D_OT_view_lock_to_active
Reviewers: aligorith, sergey

Maniphest Tasks: T54829

Differential Revision: https://developer.blender.org/D3365
2018-05-20 19:48:58 +02:00
d3def53be5 Workbench: Shadow: Add support for completly manifold geom.
If a mesh is known to be manifold, then it's not necessary to increment the
stencil buffer 2 times anymore. But we still need to account properly for
degenerate triangles.

In this case, only generate a quad if the tri is facing the lamp. If there
is a degenerate loop, the other edge will either cancel the increment (if
it is also facing the light) or not produce a quad (if not facing).

This will always give the correct count.
2018-05-20 19:17:11 +02:00
4bbb1d4e5e DRW: Rename some DRW_STATE_* for more consistency. 2018-05-20 19:17:11 +02:00
7a28dea1e1 Workbench: Shadow: Add Depth Fail method
Also add new debug visualisation.

Depth fail method is not used for the moment but has nice benefits. It will
be used efficiently in the future.
2018-05-20 19:14:22 +02:00
2c6106247b Workbench: Precompute light direction in object space.
Avoid 2 matrix multiplication in the shader.
2018-05-20 19:14:22 +02:00
ef90d46700 Workbench: Shadow: Add geometry instancing extension.
This give a very slight perf boost. (2ms gain over 67ms total in my test)
2018-05-20 19:14:22 +02:00
24cc976d55 Workbench: Shadows: Fix corner case with degenerate triangles.
Seems that degenerate tris are somewhat widely used in modeling. So we need
to fix this. Test the edges in the geom shader since the adjacency info is
only dependant on topology, not actual vertex placement.

This fixes most of the remaining noise issues. Only a few artifacts appear
on really weird models. So if you want to get rid of the artifacts, fix
your model!
2018-05-20 19:14:22 +02:00
687f09a8ad Workbench: Optimize Shadows.
This makes the shadows ~10 times faster in the general case.

This only create extrusion geometry on the outline edges. Also we increment
or decrement the stencil buffer by 2 for each manifold edge and only by 1
for non manifold. This make the algorithm robust yet less heavy than creating
one prism for each triangles.
2018-05-20 19:14:22 +02:00
883cb58355 GWN: Add Line Adjacency primitive support. 2018-05-20 19:14:22 +02:00
4308602d6a Fix: crash when rotating the view in pose mode 2018-05-20 17:44:50 +02:00
8cb6ede2bf UI: locate popover w/ active item under cursor
Use when popover has no parent, useful for accessing the toolbar.
2018-05-20 09:58:46 +02:00
7959617fb6 Cleanup: line length 2018-05-20 09:04:18 +02:00
12eb29fe35 Cleanup: whitespace, duplicate includes 2018-05-20 08:52:56 +02:00
96a3a62861 Hacky Fix: Changing frames by setting Scene.frame_current directly didn't update rigs in 3D viewport
Operators did not suffer from this problem as they were still just using notifiers
directly. The "proper" fix is to use the new message bus system. But, we've
got enough problems dealing with COW already as it is now... moving on.
2018-05-19 20:18:45 +02:00
0492e56fec Fix: When trying to transform animated bones, they would jump to and use random old values
The transform code needed to use data from the "_eval" copy of the posebone
instead of the main-db version, otherwise the initial/reset value would be
wrong, causing the jumping.
2018-05-19 19:54:47 +02:00
aca892832a Add back temporary exception for pose bones in DEG_get_evaluated_rna_pointer()
Without the exception, adding new poses to pose libraries took several seconds
with only <= 4 bones selected. While we may still need this for other cases too,
since bones are such a common use case, it makes sense to provide some level
of optimisation for them.
2018-05-19 19:54:47 +02:00
006b8e6092 Cleanup: Remove temporary debugging code 2018-05-19 19:54:47 +02:00
4a0dea88bf WIP: Improved implementation of DEG_get_evaluated_rna_pointer()
This now works by getting the RNA Path from the given PointerRNA to go from the
ID block to the data it points to, then uses this path to find the new data
relative to the COW ID.

Note: This currently still has all the debug prints left in - As can be seen,
I was testing this against the earlier PoseBone hack/special case. We may still
need to bring such special cases back in future, since looking up RNA Paths
like this can be slow.
2018-05-19 19:54:47 +02:00
6ba28ff8b1 WIP COW Fix: Insert keyframe operators/api now queries depsgraph for evaluated data
When using copy on write, insert keyframe operators were reading from old
bmain data instead of COW data. This meant that inserting keyframes would
often read old/stale data, resulting in invalid keyframes getting created
(e.g. from last transform operation, instead of actual current state).

This commit makes it so that keyframing operators will ask depsgraph for
the evaluated copy of the data, so that it can read values from that. It
introduces a new function - `DEG_get_evaluated_rna_pointer()`, which when
working correctly/fully, should work just like the other `DEG_get_evaluated_*()`
functions, except it lets you pass in an RNA Pointer.

However, currently, this is only done for Pose Bones (as a dirty hack, since this
is an important/pivotal requirement for production) and/or datablock
properties directly (since we can just use the DEG_get_evaluated_id() directly).
on the datablock.

Committing to a branch for now as this all needs more testing. More work to come
later at a more sane time of day!
2018-05-19 19:54:47 +02:00
06737a8258 UI: popover-once (click-drag for single actions)
Experimental support for using popovers like menus,
use this when the user hold the mouse down
(previously this did nothing).

This means turning frequently accessed menu items into
popovers doesn't add more clicks to the existing use case.
2018-05-19 19:16:47 +02:00
e65643b9a3 Cleanup: style
No need to use text keyword arg for labels
2018-05-19 16:25:40 +02:00
7cbf5db248 UI: don't disable snap popover in topbar
Snap settings still apply when transforming (holding Ctrl)

Also no need to prevent proportional edit menu from opening,
showing inactive is enough.
2018-05-19 16:23:54 +02:00
d3c89f50a0 UI: Use popover for toolbar popup operator
- Currently the popup closes immediately, could be made configurable.
- Support exiting popups when their submenu's are accessed.
2018-05-19 10:25:52 +02:00
671797e22e Correct last commit 2018-05-18 23:14:56 +02:00
ddebf1ea3b UI: Add menu to show the toolbar
For people who prefer to keep the toolbar hidden,
expose as a menu (currently Shift-Space).
2018-05-18 22:28:59 +02:00
e785048ef3 Fix snap with occlusion. 2018-05-18 17:26:22 -03:00
4df99bd601 Ruler: Fix mixed snap. 2018-05-18 17:12:20 -03:00
a0b03d3fb2 Tool System: use classmethod for drawing
Allows the toolbar to be included in a popup.
2018-05-18 21:18:33 +02:00
e7d2a4718d Fix popover args when called from Python 2018-05-18 21:00:16 +02:00
1fd11dd3ba Cleanup: comments, use negate_mat3_m4 2018-05-18 19:56:34 +02:00
ffaf55be94 Cycles/Eevee tests: add compare.html to see difference between the engines. 2018-05-18 18:08:01 +02:00
de7635f607 Fix: Use DEG_get_ctime() for rigidbody sims instead of BKE_scene_frame_get()
There are still probably other massive problems to solve (i.e. which copies
of data cache/sim gets written/read from for COW eval) that need to be solved
before we can get the sims actually running though.
2018-05-18 18:04:35 +02:00
30673ff325 Fix crash when collection view layer cannot be found 2018-05-18 17:56:17 +02:00
f9547ab313 Fix tools not being initialized on startup 2018-05-18 17:36:11 +02:00
c2d5411cbf Fix manipulator removal
The flag could be left set, removing the manipulator type again.
2018-05-18 17:36:11 +02:00
6a782ed767 Eevee: add regression tests.
This adds Eevee render tests using the Cycles files. Currently it must
be enabled by setting WITH_OPENGL_RENDER_TESTS=ON. Once we have reference
images we can enable it by default.

Some of the Cycles and Eevee tests are also currently broken due to
modifier and particle changes.

Differential Revision: https://developer.blender.org/D3182
2018-05-18 17:11:24 +02:00
00071d78bc Merge branch 'master' into blender2.8 2018-05-18 17:11:19 +02:00
29595334f0 COW Fix: POSE_OT_armature_apply (Apply Pose as Rest Pose) now works with COW 2018-05-18 17:07:46 +02:00
d712dd2f19 Cycles tests: move to render/ folder, to share with Eevee. 2018-05-18 16:46:48 +02:00
2d6bfb5b63 Transform: Improve the hierarchy in the choice of snapped elements in the mixed snap.
To snap to small edges in 3d_view is no longer obfuscated by vertices if then is also enabled.
2018-05-18 11:40:32 -03:00
a3070474e2 Clear the ParticleSettings pointer to prevent doubly-freeing it
Not happy with the approach, as it adds to nested_id_hack_discard_pointers(),
but at least it fixes a crash.
2018-05-18 16:29:16 +02:00
db2c966e2c Cleanup: remove unused function. 2018-05-18 10:55:51 -03:00
6776a55464 Fix crash rendering files with Python errors in background mode. 2018-05-18 15:50:08 +02:00
d7ba8611e2 Fix crash with shape keys and modifier stack, after recent changes. 2018-05-18 15:50:08 +02:00
6a64556ba1 Merge branch 'master' into blender2.8 2018-05-18 15:31:53 +02:00
47949fd764 Eevee: Codestyle fix. 2018-05-18 15:33:04 +02:00
83c2febaee Eevee: SSS: Fix compilation errors.
Fix T55114
2018-05-18 15:31:07 +02:00
e077285745 CMake: Add WITH_COMPILER_ASAN option
This supports easy toggling of Address Sanitizer.
2018-05-18 15:22:16 +02:00
4d19f24ba7 Cleanup: remove deprecated definitions 2018-05-18 15:22:16 +02:00
6e48afeb23 Merge branch 'master' into blender2.8 2018-05-18 14:59:38 +02:00
5e7a21a5f5 Fix T55115: crash when iterating SmokeDomainSettings color_grid property
through python
2018-05-18 14:34:27 +02:00
1cc4ab481e Fix crash drawing polygon curves 2018-05-18 14:23:53 +02:00
b167bc2f00 Merge branch 'master' into blender2.8 2018-05-18 13:45:48 +02:00
cb50c288d4 Add missing header 2018-05-18 13:43:41 +02:00
17bd5c9d4b Collections and groups unification
OVERVIEW

* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
  which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
  and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
  for each. For many workflows one view layer can be used, these are more of an
  advanced feature now.

OUTLINER

* The outliner now has a "View Layer" display mode instead of "Collections",
  which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
  These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
  can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
  text gives different results, we'll unify this later.

LINKING AND OVERRIDES

* Collections can now be linked into the scene without creating an instance,
  with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
  but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
  into collections with overrides directly in the scene.

PERFORMANCE

* We tried to make performance not worse than before and improve it in some
  cases. The main thing that's still a bit slower is multiple scenes, we have to
  change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
  updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
  lookups internally and in API functions like visible_get().

VERSIONING

* Compatibility with 2.7 files should be improved due to the new visibility
  controls. Of course users may not want to set up their scenes differently
  now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
  files. There's a few things which are know to be not quite compatible, like
  nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
  #ifdef so it can be removed at the end of the release cycle.

KNOWN ISSUES

* The G-key group operators in the 3D viewport were left mostly as is, they
  need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
  still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
  be done later, we'll have to see how important this is as all objects within
  the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.

Differential Revision: https://developer.blender.org/D3383

https://code.blender.org/2018/05/collections-and-groups/
2018-05-18 13:34:24 +02:00
70aec3732d Fix crash running in background mode, after recent changes. 2018-05-18 13:23:14 +02:00
fbcdd07c98 Cleanup: move unneeded struct out of DNA.
The real reason is that there is a conflict between Carbon header defining
a "Collection" struct, and this works around it.
2018-05-18 12:58:24 +02:00
b6a2dbbec2 Tool System: set cursors for draw & transform 2018-05-18 11:57:56 +02:00
17852b079c Tool System: support for tool cursors 2018-05-18 11:44:28 +02:00
6e40b2de7a Fix operator execution resetting the cursor
Area and region are NULL in the context if the operator finishes.
2018-05-18 11:42:58 +02:00
1cf0930e89 Fix manipulator resetting the cursor 2018-05-18 11:42:37 +02:00
2451a1951e Merge branch 'master' into blender2.8 2018-05-18 11:02:39 +02:00
278e3f7d5f Logging: add --show-log-backtrace
Useful in debug builds to see a functions callers.
2018-05-18 11:00:47 +02:00
987d1df571 Tool System: store the active tool in ScrArea
Without this we need to have the context to get the
(space_type, mode) args for an active tool lookup.

For event handling & poll its more convenient to have direct access.
2018-05-18 09:40:52 +02:00
8faa594413 Cleanup: unused DNA 2018-05-18 08:14:36 +02:00
f7e7769260 Cleanup: use '_Runtime' suffix
Allows for more easily finding runtime versions of any struct.
2018-05-18 08:02:32 +02:00
8b9db543fd Tool System: add cursor (currently unused) 2018-05-18 07:58:37 +02:00
bffa9b8012 Cleanup: remove tool definition access function
No longer needed since names not values are compared
when checking if a tool is active.
2018-05-18 07:24:17 +02:00
96fba1e101 Color: Assume Rec 709 in remaining comp nodes
Part of T54798
2018-05-17 17:20:32 -04:00
3af4a46a18 Tool System: tools now initialize on startup 2018-05-17 22:03:34 +02:00
50e3af8899 RNA: quiet warning
Harmless but annoying.
2018-05-17 20:35:46 +02:00
b0c8d35142 Tool System: use context mode
Was using object mode in the workspace API which isn't
useful for accessing tools.
2018-05-17 20:28:14 +02:00
486ff7e52c Merge branch 'master' into blender2.8 2018-05-17 19:55:27 +02:00
54a9136569 RNA: move enums to rna_rna.c
Needed for use in rna non runtime code.
2018-05-17 19:54:35 +02:00
0e0d99161a RNA: move enums to rna_rna.c
Needed for use in rna non runtime code.
2018-05-17 19:10:45 +02:00
b290048257 makesrna: error check from 2.8 2018-05-17 19:05:46 +02:00
b46c707ec2 Fix UV shadow drawing 2018-05-17 18:44:03 +02:00
cadbfa590a Static Override/RNA diffing: Use a nasty macro to factorize a bit the code.
This piece of code remains annoyingly verbose, but at least now we do
not have anymore twice the same logic duplicated between single array
element handling, and non-array properties.
2018-05-17 17:10:35 +02:00
170dd30881 Multi-Object-Mode: EditCuve Select All
D3381 by @dgriffin91
2018-05-17 17:09:02 +02:00
3b6a0f5fe0 Modifiers: ported Surface DerivedMesh → Mesh 2018-05-17 16:21:13 +02:00
edf6676a77 Tool System: per space/mode tool support
This patch adds support for:

- Per space-type tools (3D view and edit).
- Per mode tools (object, edit, weight-paint .. etc).

The top-bar shows the last activated tools options, this is a design
issue with using a global topbar to show per-space settings.

See D3395
2018-05-17 15:57:33 +02:00
20cc14e2b7 Cleanup: warning 2018-05-17 15:51:36 +02:00
9edc64e255 Tag scene & objects for COW update after physics settings changed via RNA 2018-05-17 15:48:23 +02:00
a2438373b3 Modifiers: ported Collision DerivedMesh → Mesh 2018-05-17 15:28:51 +02:00
c48a3afb16 Collision Modifier: get time from depsgraph instead of scene 2018-05-17 15:28:51 +02:00
Dalai Felinto
0ef23786fe EEVEE: Fix Motion Blur for copy-on-write
Get current frame from depsgraph, not scene.
2018-05-17 15:25:43 +02:00
2e635b6500 Outliner: add ID type filter option for Blender File and Orphaned Data. 2018-05-17 14:27:59 +02:00
75321a3d24 Outliner: move filter menu to the left in header. 2018-05-17 14:27:58 +02:00
6d706dc8c7 Outliner: in Blender File, use upper case names and icons. 2018-05-17 14:27:58 +02:00
1f3143fcc7 Outliner: rename Data-Blocks to Data API, to make clear it's low level stuff. 2018-05-17 14:27:58 +02:00
773a60d8f8 Modifiers: ported Particle Instance DerivedMesh → Mesh 2018-05-17 13:45:47 +02:00
ca1f1043d3 Particle System: fixed dupliobject drawing by getting time from depsgraph 2018-05-17 11:42:24 +02:00
12e523d12c Fix menu navigation and modal tools affecting the active region.
We updated the active region during redraw to fix missing updates on
file load, restrict it more now to avoid unwanted updates.
2018-05-17 11:17:45 +02:00
35a298db52 Armature: Fix non working Wireframe option on bones. 2018-05-17 11:11:53 +02:00
ba4d215139 T55090: Proxy bones were not selectable
- Implemented custom selection in pose mode overriding the rest. This
selection mode is only done for bone selection right now
2018-05-17 08:54:40 +02:00
41cba97f47 Cleanup: Use ED_view3d_win_to_ray_ex to get the ray and remove unused parameter. 2018-05-16 23:04:28 -03:00
efe3042368 Transform: Use isect_ray_seg_v3 instead dist_squared_ray_to_seg_v3 in the function that tests the snap on edges. 2018-05-16 22:04:41 -03:00
4b18858660 BLI_math_geom: Separate the isect_ray_seg_v3 from dist_squared_ray_to_seg_v3. 2018-05-16 21:36:41 -03:00
d038f4651e Transform: Fix bugs for the latest changes to the snap system. 2018-05-16 21:32:52 -03:00
Dalai Felinto
07b03ff74d EEVEE Scene: Set all variable as overridable 2018-05-16 23:13:28 +02:00
Dalai Felinto
83e35b682c Remove ViewLayer settings - cleanup 2/2 2018-05-16 23:13:28 +02:00
Dalai Felinto
e51bf11b15 Remove ViewLayer settings - cleanup 1/2 2018-05-16 23:13:28 +02:00
Dalai Felinto
09e419fa8d Move Clay properties into scene
Per collection overrides are gone now.
2018-05-16 23:13:28 +02:00
Dalai Felinto
15c2801aac Move EEVEE properties into scene
We handle doversion for the scene properties, but not for the
view layer overrides.

Overrides will be implemented in a different way via dynamic overrides.
For now this data is completely lost.
2018-05-16 23:13:28 +02:00
Dalai Felinto
d8dca3c3b0 Layer unittest: Disable the override tests
They are failing for some time now, and they will be obsolete soon anyways.
2018-05-16 23:13:28 +02:00
b4648ee379 Cleanup: BKE_bvhuitls: Use a struct rather than re-create each member of it. 2018-05-16 15:26:33 -03:00
91d3a5c1f7 Fix crash when duplicating an object type mesh with raycast operation enabled. 2018-05-16 14:28:28 -03:00
f6601e2deb Tool System: pass space type when setting tool
Internal change only, needed because object mode is now in top-bar.
2018-05-16 19:04:29 +02:00
9abb4b555a Cleanup: unused vars 2018-05-16 19:04:29 +02:00
527c9af48f Static overrides: reduce the amount of instantiated objects when overriding a group.
For now, do not override/instantiate objects used as boneshapes.

Note that this is a rather poor/dirty hack, it seems Spring char groups
still have a lot of other (unused???) shape objects.

Ideally lib groups should be designed more cleanly for the new Static
Override system, putting only really usable objects into 'main' group,
and placing the others in sub-groups, helpers groups, or so...
2018-05-16 19:01:04 +02:00
5ed702dc9c Armature: Fix T55068: Wireframe bones with custom shapes not working in object mode 2018-05-16 18:46:35 +02:00
1b4916054e Armature: Cleanup: Remove unused function and use less silly wire drawing. 2018-05-16 18:46:35 +02:00
f785fb299a Particle edit: Use proper modifier to get evaluated derived mesh from 2018-05-16 17:45:48 +02:00
df963a47fb Particle edit: Fix disappearing child particles when toggling edit mode
Going to object edit mode and back to particle edit mode used to loose all
children from being displayed.
2018-05-16 17:45:48 +02:00
5308e31e41 Fix memleak with meshes having IDProps in modifier stack evaluation.
*Always* use BKE_library API to handle IDs allocation and freeing,
unless you have a very, very, very good reason not to do so - and
perfectly know what you are doing.
2018-05-16 17:35:54 +02:00
48645e55e1 Fix again bloody locked proxy bones...
No idea why that was working this morning, now we do not get CoW tag
anymore (which kind of makes sense since it's set *after* copying
happens...), so just resorting to using the NO_MAIN flag instead.
2018-05-16 17:25:20 +02:00
34c98e3d41 Eevee: Fix missing Ambient Occlusion node in add node menu. 2018-05-16 16:58:32 +02:00
bcfe075f89 Armature: Fix T55070: Bones relationship lines are offsetted
Was missing object matrix multiplication.
2018-05-16 16:58:32 +02:00
a25856f2a8 GPUShader/DRW: Add Transform Feedback support.
This is a usefull feature that can be used to do a lot of precomputation on
the GPU instead of the CPU.

Implementation is simple and only covers the most usefull case.

How to use:
- Create shader with transform feedback.
- Create a pass with DRW_STATE_TRANS_FEEDBACK.
- Create a target Gwn_VertBuf (make sure it's big enough).
- Create a shading group with DRW_shgroup_transform_feedback_create().
- Add your draw calls to the shading group.
- Render your pass normaly.

Current limitation:
- Only one output buffer.
- Cannot pause/resume tfb rendering to interleave with normal drawcalls.
- Cannot get the number of verts drawn.
2018-05-16 16:58:32 +02:00
a3f4c72ec9 Eevee: Add support for Ambient Occlusion node. 2018-05-16 16:58:32 +02:00
c332e6e0d6 Eevee: Change normal buffer texture format for more precision.
This means more accurate SSR with less faceted artifacts.
2018-05-16 16:58:32 +02:00
f1a5fd90ba Shader Node Editor: Add Closure to RGB convertion node.
Patch D3205 by Kanzaki Wataru

Only implemented in Eevee for now. Collapse a closure to RGBA so we can
do NPR stuff on the resulting color.

Use an emission shader to convert the color back to a closure.

Doing this will break PBR and will kill any SSR and SSS effects the shader
the shader rely on. That said screen space refraction and ambient occlusion
are supported due to the way they are implemented.
2018-05-16 16:58:32 +02:00
e862bcd6c8 Workbench: World based studio lighting
Disabled shadows for now as the calculation of the light direction is
still to bogus.
2018-05-16 16:43:10 +02:00
def1c3eb4b Particle System: ported most DerivedMesh → Mesh
There are a few places where DerivedMesh is still used, most notably
when calling the (not yet ported) cloth simulation. There is also still
the use of Object.derivedDeform and Object.derivedFinal. Those places are
marked with a TODO.

Some functions in the editors module were copied to accept Mesh. Those
already had 'mesh' in the name; the copies are suffixed with '__real_mesh'
for easy renaming later when the DM-based functionality is removed.
2018-05-16 16:31:38 +02:00
76b5e38a76 Mesh: Set deformed_only=1 when copied mesh is from main library 2018-05-16 16:13:13 +02:00
739c3e8102 Particle System: use DEG to get current time in psys_get_particle_state() 2018-05-16 16:09:52 +02:00
eacf63c96f Particle System: Pass correct particle index when drawing
Passing the wrong index caused the particles to stop being shown when the
first particle dies.
2018-05-16 16:09:52 +02:00
1b2ba24749 fix build error in last commit. 2018-05-16 11:02:54 -03:00
f0c0d11ea2 Fix T55076: Hack around to break correct behavior of 2.8 and get back broken-used-as-feature one from 2.7.
Locked bones of proxies should not be editable, at all. But lack of
update from linked rest pose in 2.7 allows to pose and animate locked
bones (not to pose them without animation though, or you'd lose your
pose on next file save & reload).

this is used by artists to always lock all their bones in a rig, so that
proxies fully update when lib rig is modified...

For now, restore that broken behavior in 2.8 by not updating proxies
against lib armature in CoW context (makes sense anyway, we are
currently doing a lot of useless thing when copying data for depsgraph
evaluation!).
2018-05-16 15:47:50 +02:00
2ba0951e52 Snap system: Adds support to Clip Planes and uses a clip plane to simulate occlusion
This patch adds support for clip_planes (ie ignore what is behind a face)...

The idea is to first execute a raycast to get the polygon to which the mouse cursor points.
Then a snap test is done on the vertices or edges of the polygon.
Then with the normal and location obtained in raycast a new clip_plane is created and the snap over the whole scene is processed ignoring the elements behind the clip_plane.

Here 2 gif of how the previous patch would work on blender2.79:

{F497176}

{F497177}

Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Subscribers: bliblubli

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D2527
2018-05-16 10:32:54 -03:00
6a4ba9133c Fix T55097: Mesh Deformation modifier is ignoring Vgroup option 2018-05-16 15:19:10 +02:00
Dalai Felinto
b0cfd7a9b8 Fix T55082: Add Paint Slots for texture painting not working
We changed how this work since the BI removal. But since this operator
was moved to the topbar its poll function was returning false.
2018-05-16 15:02:33 +02:00
2e4c1346bd Popover for snapping settings
See T55038
2018-05-16 14:23:46 +02:00
d9e04cb594 Multi-Object-Mode: EditMesh Tool Bevel (MESH_OT_bevel)
Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3352
2018-05-16 14:05:57 +02:00
7fd44e2498 Reverted copying mesh->runtime.deformed_only in CDDM_from_mesh_ex
Doing that copy is the right thing, but only if the mesh has its own
deformed_only flag set correctly. This isn't generally the case, so
keeping dm->deformedOnly = 1 is better.
2018-05-16 13:06:57 +02:00
1bb9ccf887 Multi-Object-Editing: MESH_OT_faces_select_linked_flat
Reviewers: dfelinto

Maniphest Tasks: T54643

Differential Revision: https://developer.blender.org/D3372
2018-05-16 13:04:09 +02:00
d095eea19c Silence warning about functions having no prototype 2018-05-16 06:45:54 -04:00
dbe4189dcd Save 'deform_only' flag in Mesh.runtime
This flag is copied when converting between DM and Mesh.

This flag is set to true in get_mesh(), to mimick the behaviour of
CDDM_from_mesh_ex. This is necessary for the particle system to work
correctly.
2018-05-16 12:41:48 +02:00
46aec45b2a Multi-Object-Editing: intersect boolean (MESH_OT_intersect_boolean)
Reviewers: dfelinto (changed test from totvert to totfacesel before committing)

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3306
2018-05-16 12:29:05 +02:00
Dalai Felinto
807afedf6c Fix check for MESH_OT_intersect 2018-05-16 12:26:32 +02:00
dffd37877d Multi-Object-Editing: intersect (MESH_OT_intersect)
Reviewers: dfelinto

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3307
2018-05-16 12:17:20 +02:00
f7c37c8344 Modifiers: Port mesh_calc_modifiers from DerivedMesh to Mesh
This ports the main modifier eval loop.

A few things haven't been ported yet: tessface and shapekey related code. As
far as I can tell, shapekey code was never entered into.

https://developer.blender.org/D3342
2018-05-16 06:07:50 -04:00
c43dbc2bc2 Add modifier_deformVerts_ensure_normals, modifier_applyModifier_ensure_normals
Same as `modwrap_deformVerts` and `modwrap_applyModifier` but for `Mesh`.
2018-05-16 06:07:50 -04:00
fee50f830d Add BKE_mesh_is_valid
Non modifying version of `BKE_mesh_validate`, mirrors `DM_is_valid` more
closely. Will be used in port of `mesh_calc_modifiers`
from `DerivedMesh` to `Mesh`.
2018-05-16 06:07:50 -04:00
9bcddeca7a Popover for Pivot Point in top bar
From T55038
2018-05-16 12:03:53 +02:00
b6a822d726 Multi-Object-Editing: Weld Edges into Faces(MESH_OT_face_split_by_edges)
Reviewers: dfelinto

Maniphest Tasks: T54643

Differential Revision: https://developer.blender.org/D3308
2018-05-16 11:54:33 +02:00
a6e804eaee Particle system: get current time from depsgraph
This makes the particle animation work again!
2018-05-16 10:50:49 +02:00
ca8e9c881f Workbench: Read studiolights from USER + SYSTEM datafiles 2018-05-16 09:14:20 +02:00
d0b62ce041 Fix navigate widget w/ region overlap 2018-05-16 08:46:40 +02:00
b79fea28e3 Fix visible region overlap calculation
Existing code didn't account for top/bottom overlap.
2018-05-16 08:32:02 +02:00
0a8d6bd893 Transform: Snap: Make sure if bmesh arrays need to be recalculated. 2018-05-15 16:15:14 -03:00
9619a90da1 Scene raycast: The return index should indicate the polygon instead of the looptri.
This was the default behavior and could break some addon since looptri is almost useless for the current python API.
2018-05-15 15:38:17 -03:00
599bf05c56 Merge branch 'master' into blender2.8 2018-05-15 19:53:34 +02:00
bf0d16e30e Workbench: send right event after shadow_shift changes 2018-05-15 19:47:29 +02:00
7a69c59b35 Revert "BLI_kdopbvh: Reference clip_planes callback to find nearest projected."
This reverts commit 717dd4cecd.

It was causing problems in the protactor ruler.
I'll think of a better solution.
2018-05-15 14:37:45 -03:00
4461be1b72 Fix T55032: Redo w/ file saved in edit-mode failed
It's important edit-mode has a step stored for redo to work,
file load now ensures this in a generic way.
2018-05-15 19:37:06 +02:00
50c29e2391 Cleanup: pass the use_depth parameter to the SnapObjectParams struct in the ED_transform_snap_object_project_view3d_mixed. 2018-05-15 14:32:30 -03:00
717dd4cecd BLI_kdopbvh: Reference clip_planes callback to find nearest projected.
Clip_planes are an important parameter to be used in callbacks.
2018-05-15 14:14:25 -03:00
a2dd6fa58b COW Fix: VIEW3D_OT_select_lasso now works for Pose Bones. Other modes untested. 2018-05-15 19:13:25 +02:00
439ccd27e6 BLI_math: Added isect_point_planes_v3_negated function. 2018-05-15 14:10:41 -03:00
ca028f1387 Fix POST_OT_hide/reveal
Apparently they weren't actually working, despite seemingly working
when tested earlier. Argh!
2018-05-15 19:08:00 +02:00
747326ed25 Fix: POSE_OT_visual_transform_apply now works with Copy on Write 2018-05-15 18:39:24 +02:00
c3282cb746 COW Fix: Muting constraints or changing influence did not properly refresh
We need to manually do a copy on write tag here, or else nothing will happen
2018-05-15 18:39:24 +02:00
53c6d3399a Remove G.main usage 2018-05-15 18:39:24 +02:00
Dalai Felinto
9439df1ab8 Copy on write: VIEW3D_OT_clear_render_border + rna 2018-05-15 18:19:08 +02:00
Dalai Felinto
4f8b6428bc Copy on write: VIEW3D_OT_render_border
Drawing is using the original scene (which shouldn't), but regardless
this force tagging to work.
2018-05-15 18:03:10 +02:00
3d1f5cb9a2 Cleanup: Pass Snap Object Params * params to iter_snap_objects.
And remove unnecessary `defaulf:` labels.
2018-05-15 12:44:37 -03:00
92d4fbf5cc Fix Cycles and viewport outline mismatch due to changed sensor size. 2018-05-15 17:32:38 +02:00
13b2ba4fdd Fix Cycles motion blur not working with CoW disabled.
Not so important but convenient for testing, and makes the Cycles tests
pass again for now.
2018-05-15 17:32:38 +02:00
8c44e182f0 Fix mistake in recent outliner rebuild change. 2018-05-15 17:32:38 +02:00
77d6c09ddd Merge branch 'master' into blender2.8 2018-05-15 17:31:26 +02:00
91504ed26e Fix assert using '//' on an unsaved file
Annoying for debug builds.
2018-05-15 17:27:36 +02:00
fda05127db Particle edit: Fix generation of KD tree for emitters
Fixes crahs using puff brush with copy-on-write.
2018-05-15 17:20:02 +02:00
5d879c5d42 particle edit: Fix crash when using without copy-on-write 2018-05-15 17:20:02 +02:00
83155cce5b Particles: Fix uninitialized child orco passed to modifiers
Wrong cleanup done in 51b796ff15.
2018-05-15 17:20:02 +02:00
2d0efe2e78 Particle edit: Need to check DONE flag from evaluated psys 2018-05-15 17:20:02 +02:00
a104c41759 Particle edit: Support children particles display with copy on write 2018-05-15 17:20:02 +02:00
ed0901b47e Depsgraph: Forbid flush across scene->geometry operations
This relations is only to force geometry evaluation to happen
after scene's CoW is done. it was never meant to update geometry
when scene is being tagged.
2018-05-15 17:20:02 +02:00
f43d33d3a4 Depsgraph: Keep track of original particle system
Allows to have quicker lookup in particle edit mode.
2018-05-15 17:20:02 +02:00
4f5bcc30d3 Particle edit: Add missing looking tag in cut brush 2018-05-15 17:20:02 +02:00
e57ba1daf5 Particle edit: Allow children to be visible in edit mode
Follows tool settings, tested without copy-on-write.

Enabling copy-on-write still needs verification and likely some fixing.
2018-05-15 17:20:02 +02:00
f4fd1f1f4b Particle edit: Move cache update to particle batch cache implementation
The idea is to allow "regular" strands to update edit cache and hence
get the final update strands.
2018-05-15 17:20:02 +02:00
e83cee73eb Draw manager: Pass object to hair batch cache
Currently unused, but is required for an upcoming work.
2018-05-15 17:20:02 +02:00
fe01430f74 Particle edit: Make check to work within copy-on-write concept
Not fully optimal, we can probably store pointer to original psys
similar to ID's orig_id.
2018-05-15 17:20:02 +02:00
e5560e8d56 Particle edit: Edit path invalidate should trigger particle system path re-cache
Don't try to bend existing design, just follow it. It's not nice, but is
working. Just bring it back, then repeal and replace system as a whole,
making sure every bit is working according to a design.

Such quick patches only trying to make local sense of a system, defeating
it's design.
2018-05-15 17:20:02 +02:00
c5f469da5e Particle edit: Restore weird-looking conditions in evaluation
They might be looking weird, but they match conditions when children particles
are to be re-calculated for particle edit.
2018-05-15 17:20:02 +02:00
aa312621dc Particle edit: Re-cache edit path if it's NULL
This is what old particle drawing code was doing.
2018-05-15 17:20:02 +02:00
979c48fd66 Particle edit: Decouple caches for regular and edit strands
Makes it possible to have children strands to be visible during combing.
Actual implementation still needs work though.
2018-05-15 17:20:02 +02:00
361bc2bc50 Particle edit: Make visibility check to be per-particle system
This way we can see other particle systems while combing another one.
2018-05-15 17:20:02 +02:00
f25be56bc7 Particle edit: Use proper batch cache flag
Also tag batch for invalidation when using cut brush.
2018-05-15 17:20:02 +02:00
06e9048ade Particle edit: Tag for updates when changing tool settings related on edit mode 2018-05-15 17:20:02 +02:00
7cbb85675a Particle edit: Fix missing hair edit after toggling edit mode 2018-05-15 17:20:02 +02:00
e0b0f7afa0 Fix hair edit mode after recent fix for DEG sued from draw code 2018-05-15 17:20:02 +02:00
b6e3430417 Modifiers on Lattices now work
Tested with Hook and Armature modifiers. Requires CoW to be enabled.
2018-05-15 17:16:23 +02:00
87cd4de3ba Workbench: Renamed Overlap to Outline
Outline is reserved for the Overlap Overlay
2018-05-15 17:03:59 +02:00
a95d417db0 Fix broken PoseMode editing when CoW is enabled.
We need to get data from evaluated object/posechannel too, then...
2018-05-15 16:30:02 +02:00
10fe8ec68f Fix T55078: Assert statement 2018-05-15 16:20:34 +02:00
bcf6cc1f6b Change startup defaults
- Default Lamp increased strength (10x stronger)
- 3D View & Camera Lens = 50mm
- Camera film size = 36x24mm Full Frame
- Render Size Percentage = 100%
- Render Display = New Window
- Scene Units = Metric
- Color Management View = Filmic
- Workbench Object Overlap = ON
- Headers on top for all editors, except the Timeline at the bottom
- Default Properties tab = Object Properties
- Generate UV's = ON

See T47064
2018-05-15 16:14:16 +02:00
197af58baa Workbench: Cleaner Shadow edges own shadow 2018-05-15 15:40:12 +02:00
4d5b7696cb Change preference defaults
- Python tooltips: OFF
- Auto Perspective: ON
- Navigation Manipulator: ON
- Region Overlap: ON

See T47064
2018-05-15 14:32:13 +02:00
13dfa72f26 Add icon placeholders for all the armature ops that got recently added in the toolbar
The icon designers still need to create these, but it's better to have placeholders
so they remember to do it.
2018-05-15 13:50:52 +02:00
c6bceffc4f Fix crash linking/appending from old files in some cases.
Temporary main would not have a lock, which caused crashing when adding
datablocks.
2018-05-15 13:23:01 +02:00
3f20105622 Fix random crashes in the outliner, especially with bigger scenes.
The outliner can redraw quicker without rebuilding the tree, for example when
just moving the mouse and highlighting different items. The way this worked is
that the outliner would be tagged to avoid rebuilding, however if another
operation that does require rebuilding happens in the meantime we could go out
of sync and crash.
2018-05-15 13:02:44 +02:00
8021ac986a Pose Toolbar: Added Breakdowner/Push/Relax as separate tools
Currently all are stacked together, but perhaps if we don't get any other
tools in the meantime, it would make sense to have them separate.

Notes:
* No icons for now...
* There are some 2.8 bugs with the underlying operators (notably multi object)
2018-05-15 12:40:50 +02:00
95e7559bb6 Edit Armature Toolbar: Added some tools for "Shrink Fatten" (Alt-S) type bone transform tools
For fun, I tried adding some more edit armature tools to the toolbar to
check how this is all working. Icons are missing currently, but it's a
nice test.
2018-05-15 12:08:09 +02:00
b3d4f99d48 Fix bone-size crash
Own regression from multi-object transform.
2018-05-15 11:36:39 +02:00
e0903e20a7 Merge branch 'master' into blender2.8 2018-05-15 11:14:33 +02:00
3eb9cc69f2 Cleanup: last spacetype enum name 2018-05-15 11:12:49 +02:00
f1bc899146 Merge branch 'master' into blender2.8 2018-05-15 10:25:49 +02:00
9636cab009 Undo System: remove nested edit-mode undo calls
Regression in recent undo system changes,
This caused T55048.

When each mode had its own undo stack it was important
to initialize it when entering edit-mode.
2018-05-15 10:10:48 +02:00
55b241d32a Fix texture space transform crash
Own regression from multi-object transform.
2018-05-15 09:25:16 +02:00
0fb80cebec Fix T55061: Shadows were not updated during sclupting. 2018-05-15 09:13:47 +02:00
52cb62d502 Merge branch 'master' into blender2.8 2018-05-15 09:08:48 +02:00
ae8225ba6d Fix BMesh bisect not flagging dirty indices 2018-05-15 09:04:12 +02:00
ce27d11595 Workbench: Enable Textures in Edit Mesh Mode
Constructed UV out of BMesh data layers.
2018-05-15 08:58:25 +02:00
04fa65e356 Cleanup: Use switch statement to test the object type in snap functions. 2018-05-14 19:18:26 -03:00
c3b061278e EditMesh: updated extrude manipulator
Now plus icons are used to add,
arrows are used to adjust existing extrusions.
2018-05-14 23:21:59 +02:00
b2b8e1444a Manipulator: outline & helpline options for button 2018-05-14 23:18:36 +02:00
bac9c2dc7d Manipulator: utility to get matrix w/o offset 2018-05-14 23:15:44 +02:00
e159ec8bc1 Cleanup: compiler warnings, use const 2018-05-14 23:12:51 +02:00
bf7c46cae0 Transform: Use the new BLI_bvhtree_find_nearest_projected function to snap. 2018-05-14 16:08:17 -03:00
8cbf402eb6 New function for BLI_kdopbvh: BLI_bvhtree_find_nearest_projected.
This patch does not make any difference for a user's POV. But it is a step for adding the occlusion test for snapping functions.
This new function finds the node(aabb) whose projection is closest to a screen coordinate.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3180
2018-05-14 16:01:36 -03:00
70a60061e5 Fix crash opening 01_015_A.lighting.blend - DL_INDEX3 displist have a single normal, not one per vertex! 2018-05-14 17:41:11 +02:00
Dalai Felinto
7cb2d55bd4 View 3D: Use Z Key for "geometry occlusion" toggle
Note: The header doesn't update until you mouse hover it.
2018-05-14 17:19:10 +02:00
627a783784 Fix error in MESH_OT_edge_face_add changes
Context sensitive create also needs to check selected vertices.

Also correct indentation.
2018-05-14 16:35:51 +02:00
b0f61ea6db Fix error moving pivot
Missed updating keymap RNA paths.
2018-05-14 16:25:47 +02:00
Dalai Felinto
b1dae7bd6f Fix UI failing for vertex paint 2018-05-14 16:11:05 +02:00
Dalai Felinto
fc7316fb54 Multi-Objects: MESH_OT_vert_connect_path by Falk David
With a few changes:
* Use space after if.
* Skip for loop when no selected vertices.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3349
2018-05-14 15:56:26 +02:00
Dalai Felinto
de2d642c84 Multi-Objects: MESH_OT_edge_face_add by Guy Boicey
With changes by Dalai Felinto:
* Indentation
* Skip for loop when no vert/edge are selected

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3233
2018-05-14 15:47:51 +02:00
2b09062def COW Fix: The "layers used" display for armatures did not update after bones were moved between layers
Previously, the "layers_used" value was getting updated by the drawing code.
However, when using copy on write, the drawing code gets evaluated copies of
the armature data instead of the original data, so any updates here fail to
get flushed to the original data, hence the lack of updates in the UI.

Fixed by moving the calculation to RNA when setting bone layers, as it should
have been done originally. (The one downside to this is if we set individual
layer memberships one by one - this could be slower as the recalc would have to
happen each time this changes).
2018-05-14 15:42:57 +02:00
788488b1aa Fix: With no bones selected, move bones to layer operator would display garbage layer set
Was using uninitialised memory
2018-05-14 15:42:57 +02:00
2bf4654052 Fix: POSE_OT_select_constraint_target now works with copy on write 2018-05-14 15:42:57 +02:00
Dalai Felinto
b1d016bc12 MESH_OT_select_mirror: Only report when something to report
Inspired by D3299.
2018-05-14 15:26:29 +02:00
Dalai Felinto
90c9458b2f Multi- Objects: MESH_OT_select_face_by_sides by Rainer Trummer
Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3301
2018-05-14 15:23:22 +02:00
Dalai Felinto
4043e4b820 Multi-Object: MESH_OT_vert_connect_concave by Guy Boicey
Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3255
2018-05-14 14:56:40 +02:00
9e4709e9a5 Manipulator: fix 2D icon buttons in the 3D view 2018-05-14 14:47:52 +02:00
e5b53fb28c Some cleanup in modifiers' mesh copying. 2018-05-14 14:34:00 +02:00
eabfd031fa Fix T55031: add explicit copy flag to force deep-copying shapekey datablock with 'parent' one.
Chose to change defaut behavior (0-flag one) here, for sake of
consistency. Default behavior of simple BKE_id_copy() remains unchanged
though.
2018-05-14 14:25:13 +02:00
63c2397171 T54643-Multi-Object EditMesh: MESH_OT_select_nth
With changes by Dalai Felinto:
* Move WM_operator.* outside for loop.
* Update error message to handle Mesh and Meshes.
* Skip main functionality when no vert/edge/face is selected.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3371
2018-05-14 14:07:10 +02:00
e33016c77e UI Tweaks in 3D View
* Move Shading modes out of the popover
* Move Show Overlays out of the popover
* Test moving the Mode to the topbar again
* Move submode (select vertex, edge, face) to the topbar
* Remove icon from show_manipulator toggle
2018-05-14 14:00:37 +02:00
Dalai Felinto
3ebe389605 Multi-Object: MESH_OT_select_mirror 2018-05-14 13:47:53 +02:00
bf73628978 Fix extrude adjustment on normal axis 2018-05-14 13:45:34 +02:00
80ccad07cc Fix: Skip missing COW tagging on changing armature layers via RNA
Was causing problems on Spring rig while trying to show/hide armature layers
2018-05-14 13:42:30 +02:00
5205a0f671 Fix incorrect matrix stack push/pop 2018-05-14 13:29:17 +02:00
Dalai Felinto
b942106c73 Multi-Object: MESH_OT_vert_connect_nonplanar by Aeden McClain
With indentation fixes by Dalai Felinto.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3312
2018-05-14 13:04:01 +02:00
Dalai Felinto
016ba0f38b Multi-Objects: VIEW3D_OT_snap_selected_to_gri by Leon Eckardtd
With changes by Dalai Felinto (skip for loop when no vert/edgeface selected).

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3302
2018-05-14 12:52:52 +02:00
261d78a2c6 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-14 12:44:05 +02:00
0cfe9f95df Fix extrude manipulator update w/ view orientation 2018-05-14 12:26:40 +02:00
Dalai Felinto
e1cee0ac71 Multi-Object: MESH_OT_convex_hull by Lucas Boutrot
Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3223
2018-05-14 12:20:15 +02:00
51341dafc3 Workbench: Named background rendering 2018-05-14 12:07:58 +02:00
6a0d7f9e41 Workbench: Render studio hdr name in selection 2018-05-14 10:32:52 +02:00
258c5f2c0f Particle edit: Avoid depsgraph tag from draw code
Some of the function was intended to be used form drawing as well,
for until that is changed in design we can not use dependency graph
tags form it.
2018-05-14 10:16:41 +02:00
783bb4e1cd Revert "Tag update when using particle edit brushes"
This reverts commit 5dba0b68f8.

Old code was supposed to use this function from draw, and we must never
poke depsgraph from drawing.
2018-05-14 10:16:41 +02:00
50bab7eb8a Workbench: Studio light better diffuse sampling
Increased steps of diffuse sampling for narrow hightlights
2018-05-14 10:04:34 +02:00
95869f5838 Workbench: Support HDR files as HDRI studio lighting
support Radiance HDR files for studio lighting.
Fix crash when studiolight folder does not exist.
2018-05-14 09:56:32 +02:00
379c3e46d5 UV: multi-object project bounds
D3368 by @Al with own edits.
2018-05-14 09:15:43 +02:00
f78ba4bcfe Merge branch 'master' into blender2.8 2018-05-14 09:01:11 +02:00
43ee4d5d7c Cleanup: quiet GCC -Wtype-limits
While the warning can normally be disabled, we don't have have as much
control of warnings when macros are used.
2018-05-14 09:00:42 +02:00
66f0c10f84 Merge branch 'master' into blender2.8 2018-05-14 08:41:15 +02:00
c1d737eb95 BLI_utildefines: re-ordering array delete macro 2018-05-14 08:38:53 +02:00
a0c564f86a Eevee: Hair: Disable SSR for hairs.
SSR does not work with hair strands. Basically, the rays are too much
random to ever converge properly and just result in a soup of self
inter reflections.

So forcing it to not produce any SSR. Could potentially save some bandwidth
by not rendering hair to the SSR buffers.
2018-05-14 00:18:00 +02:00
2c1396b6cb Eevee: Hair: Fix normal distribution of previous commit.
Now it starts to look correct!
2018-05-13 23:12:45 +02:00
0c1c69d8df Eevee: Hair: Remove old hack and replace by new hack.
This is a hack to properly shade wire hairs. Use stochastic sampling and
let TAA solve the noise.

At least it's way more correct than the previous hack.
2018-05-13 22:44:57 +02:00
402442997a GPUTexture: Add Texture Buffer support.
This is needed by opensubdiv and can be helpfull in a lot of other cases.
2018-05-13 22:44:57 +02:00
ddf308b04a EditMesh: Use tweak for extrude tool
Could too easily click to extrude without any offset.
2018-05-13 21:19:22 +02:00
dc4f94783d EditMesh: show XYZ axis for extrude
Always show normal axis since this is the most used,
even when another orientation is selected.
2018-05-13 21:15:56 +02:00
e0a4624acd Eevee: Fix lamp defaulting to no specular.
Was missing a default value.
2018-05-13 21:07:40 +02:00
913bba5038 Fix missing path callback for new Object.display struct. 2018-05-13 19:06:37 +02:00
3767c01269 Fix issue w/ recent tool name use
Use the context space type, not the workspace.
Broke setting tools for the first time.
2018-05-13 18:39:15 +02:00
d21043ba83 Icons: updated transform icons 2018-05-13 18:33:01 +02:00
c40c2b5ab7 UI: fix popovers not properly working with scroll arrows for long menus. 2018-05-13 18:24:13 +02:00
680bdef12a Build deps: avoid ffmpeg external crystalhd library dependency. 2018-05-13 18:24:13 +02:00
64245e735c Icons: fix z-sorting
Was depth sorting per mesh.
2018-05-13 17:10:20 +02:00
Julian Eisel
a23995f42a Fix/workaround crash when appending workspace in edit mode
Linking/appending in edit mode currently isn't supported. For workspaces it
should probably be, but we can look into supporting this later.

For now gray out buttons in "Add Workspace" menu while in edit mode.
2018-05-13 16:49:05 +02:00
Julian Eisel
5717612f7c Fix invisible scroll-bars after file read
Own mistake from 51efeb6834.
2018-05-13 16:39:59 +02:00
5bad5f996f Icons: optionally use material color
The RGB node is used if it exists,
this is multiplied by the vertex color.
2018-05-13 16:24:38 +02:00
Nick Milios
94a62853ae Fix build error with Visual Studio / Windows.
Differential Revision: https://developer.blender.org/D3363
2018-05-13 15:51:42 +02:00
a8e8e08bc6 Revert "UI: geometry-icon alpha blend over existing colors"
This reverts commit 9606d28d40.

Caused issue w/ overlapping triangles,
since this isn't overly important reverting.
2018-05-13 15:39:10 +02:00
9606d28d40 UI: geometry-icon alpha blend over existing colors
Useful to mix pre-defined material colors.
2018-05-13 15:14:26 +02:00
7a2e271e54 Fix compiler warnings. 2018-05-13 14:48:55 +02:00
3469e623d3 UI/Python: layout API support for setting button emboss style. 2018-05-13 13:44:49 +02:00
343c2e94f5 Cleanup: deduplicate layout item initialization. 2018-05-13 12:48:51 +02:00
1ec48f8042 Tool System: Support set w/ space-type argument 2018-05-13 11:49:21 +02:00
06a786f12d UI: show toolbar shortcuts
When toobar text is expanded, show shortcuts
(normally confined to menus).
2018-05-13 10:27:44 +02:00
e7ee9cfd9e Tool System: tools are now set by name
This avoids having to store the tool definition in the operator
properties (on redraw).

Now just set the name, note this means we can't show the keymap in the
tool-tip anymore. This will eventually be shown in the status bar.
2018-05-13 10:01:56 +02:00
e1772dac70 WM: utility to create tool keybindings 2018-05-13 09:34:22 +02:00
cee39da318 WM: Operator to set the tool by name
Needed to bind keys to tools (T55036).
2018-05-13 09:03:37 +02:00
03281c080c Cleanup: indentation 2018-05-13 08:32:47 +02:00
0414b0a0be Cleanup: add function to get class from space type 2018-05-13 08:13:13 +02:00
ece3634497 Cleanup: call toolsystem static methods directly
Note, may move these static methods into their own module.
2018-05-13 08:07:17 +02:00
03e14bfeb6 Versioning: default scene to mean center pivot 2018-05-13 07:29:46 +02:00
9d677212ee Transform: fix regression in bound-box calculation
Error in multi-object merge.
2018-05-13 07:20:35 +02:00
59c6487e93 Merge branch 'master' into blender2.8 2018-05-13 06:56:51 +02:00
b99d064e91 Cleanup: trailing space 2018-05-13 06:44:03 +02:00
7a56d31af3 Fix 3D view axis align flag
Missed from recent pivot-point move to scene.
2018-05-13 06:38:43 +02:00
6c6a394373 Cleanup: Remove unused member. 2018-05-12 23:39:36 -03:00
9c212399c6 BKE_bvhutils: allow caching NULL bvh_trees.
This prevents zero-leafs bvhtrees from being recalculated multiple times.
2018-05-12 19:43:36 -03:00
0d9f77d954 transform_snap_object: perf: Check the distance of the bound_box of objects of type armature and curve first.
And remove unused variables.
2018-05-12 19:39:21 -03:00
375c6a7967 Cleanup: transform_snap_object: Remove unused variables and reuse the precalc used to test the distance to the projected bound_box. 2018-05-12 19:10:23 -03:00
5be0dfe086 Eevee: Fix Dof shader compilation. 2018-05-12 23:28:55 +02:00
d25ec499d8 Eevee: Depht Of Field: Merge Scatter passes together.
This means only one texture to draw to and only one sprite per pixel.

The texture is twice as large and near and far planes are side by side.

The sprite choose the biggest coc to expand to and is redirected to the
area (layer) it belongs to.

The fragment shader discard every pixel that does not belong to the correct
layer.
2018-05-12 23:28:55 +02:00
2dc5a84fad Eevee: Depth of field: Code style fixes. 2018-05-12 23:28:55 +02:00
f9cfb221d6 Eevee: Depth of field: Smooth out bokeh shape.
Due to the scatter operation being done at half resolution, undersampling
is visible at bokeh shape edges (because of the hard cut).

This commit adds a smoothing function to minimize the problem.

Also optimize the bokeh shape parametrization by precomputing a lot of
constants.
2018-05-12 23:28:55 +02:00
74a08cf128 Eevee: Depth of field: Change final blending.
This new blending allows background to fill the gaps left by forground
objects. However this has a drawback, background objects that should be
partially occluded in this case can be seen through the blurred objects.

This does not fix the problem of blurred foreground over sharp background.

Also cleanup code to be simpler and remove unused geometry shader.
2018-05-12 23:28:55 +02:00
894639f9a5 Cleanup: BLI_math: Simplify dist_squared_to_projected_aabb functions. 2018-05-12 18:18:32 -03:00
f897d95372 EditMBall: multi-object select random
D3356 by @Quetzal
2018-05-12 22:16:09 +02:00
1422c0650c UI: move pivot to the topbar
Pivot variables are now stored in scene toolsettings.
2018-05-12 22:04:45 +02:00
e0a561be1f UI: move snap & pet options into the topbar
See: T55038
2018-05-12 19:13:38 +02:00
67dda3611f UI: use icons for orientation types
See: T55038
2018-05-12 19:02:38 +02:00
817bb5d40d Remove unused function: BKE_bvhtree_from_mesh_looptri. 2018-05-12 12:05:54 -03:00
7c1171c246 Replace BKE_bvhtree_from_mesh_looptri with BKE_bvhtree_from_mesh_get.
Must have had a conflict in commit rB82d59c6588d7 when merging branchs.
2018-05-12 11:53:27 -03:00
7e74916562 UI: move GL render to view menu
This was taking valuable header room for a rarely used operator.
2018-05-12 15:02:13 +02:00
90b2e4ce28 UI: move orientation to the topbar
Move manipulator toggle to overlay popover.
2018-05-12 14:56:07 +02:00
b4010005de UI: move general mode options to right of topbar 2018-05-12 14:43:29 +02:00
570455fb83 EditMode: multi-object inset
D3305 by @jfmichaud31
2018-05-12 11:01:32 +02:00
d1b969a0cd EditMode: multi-object UV cube project
D3346 by @Cykyrios
2018-05-12 10:09:37 +02:00
ea43130504 EditMode: multi-object UV cylinder project
D3345 by @Cykyrios
2018-05-12 09:59:25 +02:00
c35af3b056 EditMode: multi-object UV sphere project
D3344 by @Cykyrios
2018-05-12 09:59:18 +02:00
f410e83b2c EditMode: multi-object UV reset
D3343 by @Cykyrios
2018-05-12 09:46:35 +02:00
dcc55c89fa Modifiers: port Remesh from DerivedMesh to Mesh
D3331 by @alikendarfen
2018-05-12 09:33:30 +02:00
df2de43459 Modifiers: ported Wave from DerivedMesh to Mesh
D3350 by @alikendarfen
2018-05-12 09:22:34 +02:00
4dc91ebf81 Merge branch 'master' into blender2.8 2018-05-12 08:22:03 +02:00
1813f00b94 Fix missing fallback in recent aabb precalc func
Also comment unused vars
2018-05-12 08:19:20 +02:00
c84b8d4801 Cleanup: modifier arg wrapping 2018-05-12 08:04:56 +02:00
be8add5d50 Refactor: Move functions to get the distance to a projected aabb to BLI_match and remove confusing parameters. 2018-05-11 20:20:51 -03:00
e4f75f97ba Icons: simpler flattened icon style
Update from @billreynish
2018-05-11 22:28:39 +02:00
6aca3e43ec UI: tweaks to icon defaults
Minor changes to fit w/ new icons.
2018-05-11 22:15:05 +02:00
bd30a6350b Cleanup: remove unused RNA variable 2018-05-11 21:57:02 +02:00
f197134426 Platform: macOS. Allow building on directory with whitespace (For example /Volumes/External HD/blender-build) 2018-05-11 21:56:13 +03:00
5503e2565b Bmesh: Clear possible geometry saved at runtime when converting bmesh to mesh. 2018-05-11 15:48:14 -03:00
0a7736a2e9 Tool System: curve draw options 2018-05-11 20:25:01 +02:00
f3f309c7f8 Tool System: inset & shrink/fatten options 2018-05-11 20:24:06 +02:00
9df6978211 Tool System: mesh rip fill option 2018-05-11 20:22:04 +02:00
194cba8ba4 Merge branch 'master' into blender2.8 2018-05-11 20:13:07 +02:00
925e775818 EditMesh: remove duplicate rip macro
Change the fill setting in the keymap,
this allows tool access the macro with either setting.
2018-05-11 20:02:12 +02:00
73a7885ab3 WM: initialize last used macro properties 2018-05-11 20:01:51 +02:00
ef49a587d4 DRW: Add DRW_UNIFORM_FLOAT_COPY and DRW_UNIFORM_BOOL_COPY.
And also use a union instead of forcing the cast to void*.
2018-05-11 19:00:32 +02:00
10b9c86c80 DRW: Add DRW_view_layer_engine_data_ensure_ex. 2018-05-11 19:00:32 +02:00
054d837e65 Modifiers: ported Laplacian Deform DerivedMesh → Mesh
Reviewers: sybren

Differential Revision: https://developer.blender.org/D3326
2018-05-11 18:10:21 +02:00
d5c1c0b10d Fix (unreported) broken freeing code for Sequencer.
Freeing sequencer would always do usercount, which is now forbidden when
called from main ID freeing code.

Annoying in 2.7x, much more critical issue in 2.8!

Also, moved RNA sequencer API functions to proper rna_scene_api.c file.
2018-05-11 11:23:11 +02:00
6894 changed files with 399672 additions and 396610 deletions

View File

@@ -1,7 +1,7 @@
{
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/blender2.8",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "blender2.8"
"arc.land.onto.default" : "master"
}

44
.editorconfig Normal file
View File

@@ -0,0 +1,44 @@
# C/C++
[*.{c,cc,h,hh,inl,glsl}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
# CMake & Text
[*.{cmake,txt}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
# Python
[*.py]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
max_line_length = 120
# Shell
[*.sh]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
# reStructuredText
[*.rst]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 3
max_line_length = 120

4
.gitignore vendored
View File

@@ -11,6 +11,10 @@ __pycache__/
*.swo
*#
# Indexes for emacs, vi & others
TAGS
tags
# QtCreator
CMakeLists.txt.user

2
.gitmodules vendored
View File

@@ -1,7 +1,7 @@
[submodule "release/scripts/addons"]
path = release/scripts/addons
url = ../blender-addons.git
branch = blender2.8
branch = master
ignore = all
[submodule "release/scripts/addons_contrib"]
path = release/scripts/addons_contrib

View File

@@ -16,11 +16,6 @@
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Jacques Beaurain.
#
# ***** END GPL LICENSE BLOCK *****
#-----------------------------------------------------------------------------
@@ -47,6 +42,13 @@ endif()
cmake_minimum_required(VERSION 3.5)
# Prever LEGACY OpenGL to eb compatible with all the existing releases and
# platforms which don't hare GLVND yet. Only do it if preference was not set
# externally.
if(NOT DEFINED OpenGL_GL_PREFERENCE)
set(OpenGL_GL_PREFERENCE "LEGACY")
endif()
if(NOT EXECUTABLE_OUTPUT_PATH)
set(FIRST_RUN TRUE)
else()
@@ -62,25 +64,21 @@ if(NOT DEFINED CMAKE_BUILD_TYPE_INIT)
set(CMAKE_BUILD_TYPE_INIT "Release")
endif()
# Omit superfluous "Up-to-date" messages.
if(NOT DEFINED CMAKE_INSTALL_MESSAGE)
set(CMAKE_INSTALL_MESSAGE "LAZY")
endif()
# quiet output for Makefiles, 'make -s' helps too
# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
# global compile definitions since add_definitions() adds for all.
if(NOT (${CMAKE_VERSION} VERSION_LESS 3.0))
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
$<$<CONFIG:Debug>:DEBUG;_DEBUG>
$<$<CONFIG:Release>:NDEBUG>
$<$<CONFIG:MinSizeRel>:NDEBUG>
$<$<CONFIG:RelWithDebInfo>:NDEBUG>
)
else()
# keep until CMake-3.0 is min requirement
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG _DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO NDEBUG)
endif()
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
$<$<CONFIG:Debug>:DEBUG;_DEBUG>
$<$<CONFIG:Release>:NDEBUG>
$<$<CONFIG:MinSizeRel>:NDEBUG>
$<$<CONFIG:RelWithDebInfo>:NDEBUG>
)
#-----------------------------------------------------------------------------
# Set policy
@@ -119,7 +117,11 @@ enable_testing()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests CACHE INTERNAL "" FORCE)
if(MSVC)
set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/$<CONFIG>/ CACHE INTERNAL "" FORCE)
else()
set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/ CACHE INTERNAL "" FORCE)
endif()
#-----------------------------------------------------------------------------
# Set default config options
@@ -157,7 +159,6 @@ option_defaults_init(
_init_BUILDINFO
_init_CODEC_FFMPEG
_init_CYCLES_OSL
_init_CYCLES_OPENSUBDIV
_init_IMAGE_OPENEXR
_init_INPUT_NDOF
_init_JACK
@@ -174,7 +175,6 @@ if(UNIX AND NOT APPLE)
# disable less important dependencies by default
set(_init_CODEC_FFMPEG OFF)
set(_init_CYCLES_OSL OFF)
set(_init_CYCLES_OPENSUBDIV OFF)
set(_init_IMAGE_OPENEXR OFF)
set(_init_JACK OFF)
set(_init_OPENCOLLADA OFF)
@@ -186,7 +186,6 @@ elseif(WIN32)
set(_init_JACK OFF)
elseif(APPLE)
set(_init_JACK OFF)
set(_init_OPENSUBDIV OFF)
endif()
@@ -205,11 +204,11 @@ mark_as_advanced(WITH_BLENDER)
option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON)
mark_as_advanced(WITH_PYTHON) # dont want people disabling this unless they really know what they are doing.
option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON)
mark_as_advanced(WITH_PYTHON) # don't want people disabling this unless they really know what they are doing.
mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option.
option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency, only enable for development)." OFF)
option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some efficiency, only enable for development)." OFF)
mark_as_advanced(WITH_PYTHON_SAFETY)
option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development), installs to PYTHON_SITE_PACKAGES (or CMAKE_INSTALL_PREFIX if WITH_INSTALL_PORTABLE is enabled)." OFF)
if(APPLE)
@@ -221,8 +220,8 @@ if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
# add_library OBJECT arg unsupported
set(WITH_BUILDINFO OFF)
endif()
set(BUILDINFO_OVERRIDE_DATE "" CACHE STRING "Use instead of the current date for reproducable builds (empty string disables this option)")
set(BUILDINFO_OVERRIDE_TIME "" CACHE STRING "Use instead of the current time for reproducable builds (empty string disables this option)")
set(BUILDINFO_OVERRIDE_DATE "" CACHE STRING "Use instead of the current date for reproducible builds (empty string disables this option)")
set(BUILDINFO_OVERRIDE_TIME "" CACHE STRING "Use instead of the current time for reproducible builds (empty string disables this option)")
set(CPACK_OVERRIDE_PACKAGENAME "" CACHE STRING "Use instead of the standard packagename (empty string disables this option)")
mark_as_advanced(CPACK_OVERRIDE_PACKAGENAME)
mark_as_advanced(BUILDINFO_OVERRIDE_DATE)
@@ -236,12 +235,10 @@ option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported
mark_as_advanced(WITH_SYSTEM_BULLET)
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
option(WITH_CLAY_ENGINE "Enable Clay engine" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" _init_OPENSUBDIV)
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ${_init_OPENSUBDIV})
option(WITH_OPENVDB "Enable features relying on OpenVDB" OFF)
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF)
@@ -295,9 +292,6 @@ else()
endif()
# (unix defaults to System OpenJPEG On)
option(WITH_SYSTEM_OPENJPEG "Use the operating systems OpenJPEG library" OFF)
if(UNIX AND NOT APPLE)
option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF)
endif()
@@ -381,7 +375,9 @@ if(UNIX AND NOT APPLE)
endif()
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
if(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
if(WIN32 OR APPLE)
# Windows and macOS have this bundled with Python libraries.
elseif(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
mark_as_advanced(PYTHON_NUMPY_PATH)
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
@@ -405,10 +401,12 @@ option(WITH_CYCLES "Enable Cycles Render Engine" ON)
option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF)
option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" OFF)
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ${_init_CYCLES_OSL})
option(WITH_CYCLES_OPENSUBDIV "Build Cycles with OpenSubdiv support" ${_init_CYCLES_OPENSUBDIV})
option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" OFF)
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 CACHE STRING "CUDA architectures to build binaries for")
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 CACHE STRING "CUDA architectures to build binaries for")
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
@@ -450,7 +448,7 @@ mark_as_advanced(WITH_MEM_VALGRIND)
option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking (only enable for development)" OFF)
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" OFF)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
mark_as_advanced(WITH_ASSERT_ABORT)
option(WITH_BOOST "Enable features depending on boost" ON)
@@ -469,11 +467,13 @@ endif()
# OpenGL
option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON)
option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF)
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
mark_as_advanced(
WITH_OPENGL
WITH_GLEW_ES
WITH_GL_EGL
WITH_GL_PROFILE_ES20
@@ -494,32 +494,59 @@ if(WIN32)
set(CPACK_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${})
endif()
# Experimental support of C11 and C++11
#
# We default options to whatever default standard in the current compiler.
if(APPLE)
set(_c11_init ON)
set(_cxx11_init ON)
set(WITH_C11 ON)
set(WITH_CXX11 ON)
elseif(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
set(_c11_init ON)
else()
set(_c11_init OFF)
endif()
set(_cxx11_init ON)
option(WITH_C11 "Build with C11 standard enabled, for development use only!" ${_c11_init})
mark_as_advanced(WITH_C11)
option(WITH_CXX11 "Build with C++11 standard enabled, for development use only!" ${_cxx11_init})
mark_as_advanced(WITH_CXX11)
# Compiler toolchain
if(CMAKE_COMPILER_IS_GNUCC)
option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
mark_as_advanced(WITH_LINKER_GOLD)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
mark_as_advanced(WITH_COMPILER_ASAN)
if(WITH_COMPILER_ASAN)
set(_asan_defaults "\
-fsanitize=address \
-fsanitize=bool \
-fsanitize=bounds \
-fsanitize=enum \
-fsanitize=float-cast-overflow \
-fsanitize=float-divide-by-zero \
-fsanitize=nonnull-attribute \
-fsanitize=returns-nonnull-attribute \
-fsanitize=signed-integer-overflow \
-fsanitize=undefined \
-fsanitize=vla-bound \
-fno-sanitize=alignment \
")
if(NOT MSVC) # not all sanitizers are supported with clang-cl, these two however are very vocal about it
set(_asan_defaults "${_asan_defaults} -fsanitize=leak -fsanitize=object-size" )
endif()
set(COMPILER_ASAN_CFLAGS "${_asan_defaults}" CACHE STRING "C flags for address sanitizer")
mark_as_advanced(COMPILER_ASAN_CFLAGS)
set(COMPILER_ASAN_CXXFLAGS "${_asan_defaults}" CACHE STRING "C++ flags for address sanitizer")
mark_as_advanced(COMPILER_ASAN_CXXFLAGS)
unset(_asan_defaults)
if(NOT MSVC)
find_library(COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
else()
find_library( COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
)
endif()
mark_as_advanced(COMPILER_ASAN_LIBRARY)
endif()
endif()
# Dependency graph
option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
if(WIN32)
# Use hardcoded paths or find_package to find externals
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
@@ -536,6 +563,9 @@ if(WIN32)
option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
mark_as_advanced(WINDOWS_PYTHON_DEBUG)
endif()
# avoid using again
@@ -578,18 +608,14 @@ if(NOT WITH_BLENDER AND NOT WITH_CYCLES_STANDALONE)
)
endif()
if(NOT WITH_CXX11)
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
message(FATAL_ERROR "WITH_AUDASPACE requires WITH_CXX11")
endif()
endif()
if(NOT WITH_AUDASPACE)
if(WITH_OPENAL)
message(FATAL_ERROR "WITH_OPENAL requires WITH_AUDASPACE")
message(WARNING "WITH_OPENAL requires WITH_AUDASPACE which is disabled")
set(WITH_OPENAL OFF)
endif()
if(WITH_JACK)
message(FATAL_ERROR "WITH_JACK requires WITH_AUDASPACE")
message(WARNING "WITH_JACK requires WITH_AUDASPACE which is disabled")
set(WITH_JACK OFF)
endif()
endif()
@@ -632,11 +658,8 @@ elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO)
# Keep enabled
else()
# New dependency graph needs either Boost or C++11 for function bindings.
if(NOT WITH_CXX11)
# Enabled but we don't need it
set(WITH_BOOST OFF)
endif()
# Disable boost if not needed.
set(WITH_BOOST OFF)
endif()
# auto enable openimageio for cycles
@@ -693,9 +716,6 @@ if(WITH_BUILDINFO)
endif()
endif()
TEST_SHARED_PTR_SUPPORT()
TEST_UNORDERED_MAP_SUPPORT()
if(WITH_AUDASPACE)
if(NOT WITH_SYSTEM_AUDASPACE)
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings/C" "${CMAKE_BINARY_DIR}/extern/audaspace")
@@ -738,8 +758,8 @@ if(WITH_PYTHON)
# Do this before main 'platform_*' checks,
# because UNIX will search for the old Python paths which may not exist.
# giving errors about missing paths before this case is met.
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.6")
message(FATAL_ERROR "At least Python 3.6 is required to build")
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.7")
message(FATAL_ERROR "At least Python 3.7 is required to build")
endif()
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules")
@@ -768,7 +788,8 @@ set(C_WARNINGS)
set(CXX_WARNINGS)
# for gcc -Wno-blah-blah
set(CC_REMOVE_STRICT_FLAGS)
set(C_REMOVE_STRICT_FLAGS)
set(CXX_REMOVE_STRICT_FLAGS)
# libraries to link the binary with passed to target_link_libraries()
# known as LLIBS to scons
@@ -780,6 +801,21 @@ set(PLATFORM_LINKLIBS "")
set(PLATFORM_LINKFLAGS "")
set(PLATFORM_LINKFLAGS_DEBUG "")
if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
if(WITH_COMPILER_ASAN)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMPILER_ASAN_CFLAGS}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CFLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
if(MSVC)
set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
endif()
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
endif()
endif()
#-----------------------------------------------------------------------------
#Platform specifics
@@ -801,7 +837,7 @@ if(WITH_X11)
endif()
if(WITH_X11_XF86VMODE)
# XXX, why dont cmake make this available?
# XXX, why doesn't cmake make this available?
find_library(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
mark_as_advanced(X11_Xxf86vmode_LIB)
if(X11_Xxf86vmode_LIB)
@@ -898,7 +934,7 @@ endif()
if(SUPPORT_SSE2_BUILD)
set(PLATFORM_CFLAGS " ${PLATFORM_CFLAGS} ${COMPILER_SSE2_FLAG}")
add_definitions(-D__SSE2__)
if(NOT SUPPORT_SSE_BUILD) # dont double up
if(NOT SUPPORT_SSE_BUILD) # don't double up
add_definitions(-D__MMX__)
endif()
endif()
@@ -911,7 +947,7 @@ if(MSVC)
# OSX-Note: as we do cross-compiling with specific set architecture,
# endianess-detection and auto-setting is counterproductive
# so we just set endianess according CMAKE_OSX_ARCHITECTURES
# so we just set endianness according CMAKE_OSX_ARCHITECTURES
elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
add_definitions(-D__LITTLE_ENDIAN__)
@@ -929,16 +965,11 @@ else()
unset(_SYSTEM_BIG_ENDIAN)
endif()
if(WITH_IMAGE_OPENJPEG)
if(WITH_SYSTEM_OPENJPEG)
# dealt with above
set(OPENJPEG_DEFINES "")
else()
set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
endif()
# Special handling of Windows platform where openjpeg is always static.
if(WIN32)
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
else()
set(OPENJPEG_DEFINES "")
endif()
endif()
@@ -952,6 +983,10 @@ endif()
find_package(OpenGL)
blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
if(WITH_OPENGL)
add_definitions(-DWITH_OPENGL)
endif()
if(WITH_SYSTEM_GLES)
find_package_wrapper(OpenGLES)
endif()
@@ -1017,8 +1052,11 @@ if(WITH_GL_PROFILE_ES20)
endif()
else()
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY)
list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
else()
list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY})
endif()
endif()
if(WITH_GL_EGL)
@@ -1079,7 +1117,10 @@ endif()
#-----------------------------------------------------------------------------
# Configure OpenMP.
if(WITH_OPENMP)
find_package(OpenMP)
if(NOT OPENMP_CUSTOM)
find_package(OpenMP)
endif()
if(OPENMP_FOUND)
if(NOT WITH_OPENMP_STATIC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
@@ -1154,7 +1195,7 @@ else()
list(APPEND GL_DEFINITIONS -DGLEW_STATIC)
# This won't affect the non-experimental glew library,
# This won't affect the non-experimental glew library,
# but is used for conditional compilation elsewhere.
list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
@@ -1232,42 +1273,8 @@ endif()
# Configure Ceres
if(WITH_LIBMV)
set(CERES_DEFINES)
if(WITH_CXX11)
# nothing to be done
elseif(SHARED_PTR_FOUND)
if(SHARED_PTR_TR1_MEMORY_HEADER)
list(APPEND CERES_DEFINES -DCERES_TR1_MEMORY_HEADER)
endif()
if(SHARED_PTR_TR1_NAMESPACE)
list(APPEND CERES_DEFINES -DCERES_TR1_SHARED_PTR)
endif()
else()
message(FATAL_ERROR "Ceres: Unable to find shared_ptr.")
endif()
if(WITH_CXX11)
list(APPEND CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
elseif(HAVE_STD_UNORDERED_MAP_HEADER)
if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
list(APPEND CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
else()
if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
list(APPEND CERES_DEFINES -DCERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
else()
list(APPEND CERES_DEFINES -DCERES_NO_UNORDERED_MAP)
message(STATUS "Ceres: Replacing unordered_map/set with map/set (warning: slower!)")
endif()
endif()
else()
if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
list(APPEND CERES_DEFINES -DCERES_TR1_UNORDERED_MAP)
else()
list(APPEND CERES_DEFINES -DCERES_NO_UNORDERED_MAP)
message(STATUS "Ceres: Replacing unordered_map/set with map/set (warning: slower!)")
endif()
endif()
# We always have C++11 which includes unordered_map.
set(CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
endif()
#-----------------------------------------------------------------------------
@@ -1358,16 +1365,22 @@ if(CMAKE_COMPILER_IS_GNUCC)
endif()
# flags to undo strict flags
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_TYPE_LIMITS -Wno-type-limits)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT -Wno-int-in-bool-context)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT -Wno-format)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH -Wno-switch)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS -Wno-class-memaccess)
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
endif()
if(NOT APPLE)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
endif()
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -1396,23 +1409,23 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS -Wunused-macros)
# flags to undo strict flags
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
@@ -1433,6 +1446,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
# warning level:
"/W3"
"/w34062" # switch statement contains 'default' but no 'case' labels
"/w34189" # local variable is initialized but not referenced
# disable:
"/wd4018" # signed/unsigned mismatch
"/wd4146" # unary minus operator applied to unsigned type, result still unsigned
@@ -1444,13 +1458,19 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
"/wd4267" # conversion from 'size_t' to 'type', possible loss of data
"/wd4305" # truncation from 'type1' to 'type2'
"/wd4800" # forcing value to bool 'true' or 'false'
"/wd4828" # The file contains a character that is illegal
"/wd4828" # The file contains a character that is illegal
"/wd4996" # identifier was declared deprecated
# errors:
"/we4013" # 'function' undefined; assuming extern returning int
"/we4133" # incompatible pointer types
"/we4431" # missing type specifier - int assumed
)
if(MSVC_VERSION GREATER_EQUAL 1911)
# see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
set(_WARNINGS "${_WARNINGS} /w35038") #order of initialisation in c++ constructors
endif()
string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
set(C_WARNINGS "${_WARNINGS}")
set(CXX_WARNINGS "${_WARNINGS}")
@@ -1470,14 +1490,14 @@ if(WITH_PYTHON)
)
endif()
if(WIN32)
# pass, we have this in an archive to extract
if(WIN32 OR APPLE)
# Windows and macOS have this bundled with Python libraries.
elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
find_python_package(numpy)
unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE)
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
endif()
endif()
@@ -1488,34 +1508,28 @@ if(WITH_PYTHON)
endif()
endif()
if(WITH_CXX11)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
# TODO(sergey): Do we want c++11 or gnu-c++11 here?
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(MSVC)
# Nothing special is needed, C++11 features are available by default.
else()
message(FATAL_ERROR "Compiler ${CMAKE_C_COMPILER_ID} is not supported for C++11 build yet")
endif()
if(
CMAKE_COMPILER_IS_GNUCC OR
CMAKE_C_COMPILER_ID MATCHES "Clang" OR
CMAKE_C_COMPILER_ID MATCHES "Intel"
)
# TODO(sergey): Do we want c++11 or gnu-c++11 here?
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(MSVC)
# Nothing special is needed, C++11 features are available by default.
else()
# GCC-6 switched to C++11 by default, which would break linking with existing libraries
# by default. So we explicitly disable C++11 for a new GCC so no linking issues happens.
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
# We also disable any of C++11 ABI from usage, so we wouldn't even try to
# link to stuff from std::__cxx11 namespace.
add_definitions("-D_GLIBCXX_USE_CXX11_ABI=0")
endif()
message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++11 build")
endif()
# Visual Studio has all standards it supports available by default
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Intel")
# Use C99 + GNU extensions, works with GCC, Clang, ICC
if(WITH_C11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
endif()
# Clang on windows copies this behavior and does not support these switches
if(
CMAKE_COMPILER_IS_GNUCC OR
(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT MSVC)) OR
(CMAKE_C_COMPILER_ID MATCHES "Intel")
)
# Use C11 + GNU extensions, works with GCC, Clang, ICC
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
# Include warnings first, so its possible to disable them with user defined flags
@@ -1662,7 +1676,6 @@ if(FIRST_RUN)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)
info_cfg_option(WITH_SYSTEM_GLEW)
info_cfg_option(WITH_SYSTEM_OPENJPEG)
info_cfg_text("Image Formats:")
info_cfg_option(WITH_OPENIMAGEIO)

View File

@@ -24,11 +24,133 @@
# ../build_linux_i386
# This is for users who like to configure & build blender with a single command.
define HELP_TEXT
Convenience Targets
Provided for building Blender, (multiple at once can be used).
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
* deps: Build library dependencies (intended only for platform maintainers).
* config: Run cmake configuration tool to set build options.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
Project Files
Generate poject files for development environments.
* project_qtcreator: QtCreator Project Files.
* project_netbeans: NetBeans Project Files.
* project_eclipse: Eclipse CDT4 Project Files.
Package Targets
* package_debian: Build a debian package.
* package_pacman: Build an arch linux pacman package.
* package_archive: Build an archive package.
Testing Targets
Not associated with building Blender.
* test:
Run ctest, currently tests import/export,
operator execution and that python modules load
* test_cmake:
Runs our own cmake file checker
which detects errors in the cmake file list definitions
* test_pep8:
Checks all python script are pep8
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
* test_style_c:
Checks C/C++ conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_c_qtc:
Same as test_style but outputs QtCreator tasks format
* test_style_osl:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_osl_qtc:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
Static Source Code Checking
Not associated with building Blender.
* check_cppcheck: Run blender source through cppcheck (C & C++).
* check_clang_array: Run blender source through clang array checking script (C & C++).
* check_splint: Run blenders source through splint (C only).
* check_sparse: Run blenders source through sparse (C only).
* check_smatch: Run blenders source through smatch (C only).
* check_spelling_c: Check for spelling errors (C/C++ only).
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
* check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only).
* check_descriptions: Check for duplicate/invalid descriptions.
Utilities
Not associated with building Blender.
* icons:
Updates PNG icons from SVG files.
Optionally pass in variables: 'BLENDER_BIN', 'INKSCAPE_BIN'
otherwise default paths are used.
Example
make icons INKSCAPE_BIN=/path/to/inkscape
* icons_geom:
Updates Geometry icons from BLEND file.
Optionally pass in variable: 'BLENDER_BIN'
otherwise default paths are used.
Example
make icons_geom BLENDER_BIN=/path/to/blender
* tgz:
Create a compressed archive of the source code.
* update:
updates git and all submodules
Environment Variables
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
* BUILD_DIR: Override default build path.
* PYTHON: Use this for the Python command (used for checking tools).
* NPROCS: Number of processes to use building (auto-detect when omitted).
Documentation Targets
Not associated with building Blender.
* doc_py: Generate sphinx python api docs.
* doc_doxy: Generate doxygen C/C++ docs.
* doc_dna: Generate blender file format reference.
* doc_man: Generate manpage.
Information
* help: This help message.
* help_features: Show a list of optional features when building.
endef
# HELP_TEXT (end)
# System Vars
OS:=$(shell uname -s)
OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
# CPU:=$(shell uname -m) # UNUSED
CPU:=$(shell uname -m)
# Source and Build DIR's
@@ -45,12 +167,18 @@ endif
# Dependencies DIR's
DEPS_SOURCE_DIR:=$(BLENDER_DIR)/build_files/build_environment
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
ifneq ($(OS_NCASE),darwin)
# Add processor type to directory name
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(shell uname -p)
ifndef DEPS_BUILD_DIR
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
endif
ifndef DEPS_INSTALL_DIR
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
ifneq ($(OS_NCASE),darwin)
# Add processor type to directory name
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
endif
# Allow to use alternative binary (pypy3, etc)
@@ -89,6 +217,18 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
endif
# -----------------------------------------------------------------------------
# Blender binary path
# Allow passing in own BLENDER_BIN so developers who don't
# use the default build path can still use utility helpers.
ifeq ($(OS), Darwin)
BLENDER_BIN?="$(BUILD_DIR)/bin/blender.app/Contents/MacOS/blender"
else
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
endif
# -----------------------------------------------------------------------------
# Get the number of cores for threaded build
ifndef NPROCS
@@ -140,7 +280,7 @@ all: .FORCE
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
@echo
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
@echo Blender successfully built, run from: "$(BUILD_DIR)/bin/blender"
@echo Blender successfully built, run from: $(BLENDER_BIN)
@echo
debug: all
@@ -180,83 +320,9 @@ config: .FORCE
# -----------------------------------------------------------------------------
# Help for build targets
export HELP_TEXT
help: .FORCE
@echo ""
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
@echo " * debug - build a debug binary"
@echo " * full - enable all supported dependencies & options"
@echo " * lite - disable non essential features for a smaller binary and faster build"
@echo " * headless - build without an interface (renderfarm or server automation)"
@echo " * cycles - build Cycles standalone only, without Blender"
@echo " * bpy - build as a python module which can be loaded from python directly"
@echo " * deps - build library dependencies (intended only for platform maintainers)"
@echo ""
@echo " * config - run cmake configuration tool to set build options"
@echo ""
@echo " Note, passing the argument 'BUILD_DIR=path' when calling make will override the default build dir."
@echo " Note, passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments."
@echo ""
@echo ""
@echo "Project Files for IDE's"
@echo " * project_qtcreator - QtCreator Project Files"
@echo " * project_netbeans - NetBeans Project Files"
@echo " * project_eclipse - Eclipse CDT4 Project Files"
@echo ""
@echo "Package Targets"
@echo " * package_debian - build a debian package"
@echo " * package_pacman - build an arch linux pacman package"
@echo " * package_archive - build an archive package"
@echo ""
@echo "Testing Targets (not associated with building blender)"
@echo " * test - run ctest, currently tests import/export,"
@echo " operator execution and that python modules load"
@echo " * test_cmake - runs our own cmake file checker"
@echo " which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8"
@echo " which are tagged to use the stricter formatting"
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
@echo " * test_style_c - checks C/C++ conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_c_qtc - same as test_style but outputs QtCreator tasks format"
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo ""
@echo "Static Source Code Checking (not associated with building blender)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@echo " * check_clang_array - run blender source through clang array checking script (C & C++)"
@echo " * check_splint - run blenders source through splint (C only)"
@echo " * check_sparse - run blenders source through sparse (C only)"
@echo " * check_smatch - run blenders source through smatch (C only)"
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
@echo " * check_spelling_py - check for spelling errors (Python only)"
@echo " * check_descriptions - check for duplicate/invalid descriptions"
@echo ""
@echo "Utilities (not associated with building blender)"
@echo " * icons - updates PNG icons from SVG files."
@echo " * icons_geom - updates Geometry icons from BLEND file."
@echo " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@echo ""
@echo "Environment Variables"
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
@echo " * BUILD_DIR - override default build path."
@echo " * PYTHON - use this for the Python command (used for checking tools)."
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@echo " * doc_doxy - generate doxygen C/C++ docs"
@echo " * doc_dna - generate blender file format reference"
@echo " * doc_man - generate manpage"
@echo ""
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
@echo ""
@echo "$$HELP_TEXT"
# -----------------------------------------------------------------------------
# Packages
@@ -410,7 +476,7 @@ check_spelling_osl: .FORCE
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions: .FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
$(BLENDER_BIN) --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
# -----------------------------------------------------------------------------
@@ -420,12 +486,15 @@ check_descriptions: .FORCE
tgz: .FORCE
./build_files/utils/build_tgz.sh
INKSCAPE_BIN?="inkscape"
icons: .FORCE
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
icons_geom: .FORCE
BLENDER_BIN="$(BUILD_DIR)/bin/blender" \
BLENDER_BIN=$(BLENDER_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
update: .FORCE
@@ -448,33 +517,26 @@ update: .FORCE
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py: .FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
ASAN_OPTIONS=halt_on_error=0 \
$(BLENDER_BIN) --background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
doc_doxy: .FORCE
cd doc/doxygen; doxygen Doxyfile
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna: .FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup \
$(BLENDER_BIN) --background -noaudio --factory-startup \
--python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man: .FORCE
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
$(PYTHON) doc/manpage/blender.1.py $(BLENDER_BIN) blender.1
help_features: .FORCE
@$(PYTHON) -c \
"import re; \
print('\n'.join([ \
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
if not l.lstrip().startswith('#') \
for w in (re.sub(\
r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\".*\")\s*.*', r'\g<1> - \g<2>', l).strip('() \n'),) \
if w.startswith('WITH_')]))" | uniq
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
clean: .FORCE
$(MAKE) -C "$(BUILD_DIR)" clean

View File

@@ -19,10 +19,10 @@
####################################################################################################
#
# This is a build system used by platform maintainers to build library dependencies on
# Windows and macOS. There is some support for Linux as well, but not ready for releases.
# Windows, macOS and Linux.
#
# Windows and macOS users should download the precompiled libraries in lib/, Linux users
# should run install_deps.sh for building dependencies.
# For users building Blender, we recommend using the precompiled libraries from lib/ on
# Windows and macOS, and install_deps.sh on Linux.
#
# WINDOWS USAGE:
# Don't call this cmake file your self, use build_deps.cmd
@@ -30,7 +30,7 @@
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake libtool yasm openssl xz
# Install with homebrew: brew install autoconf automake libtool yasm nasm
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
@@ -45,6 +45,17 @@ cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/options.cmake)
include(cmake/versions.cmake)
if(ENABLE_MINGW64)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
else()
set(mingw_LIBDIR ${LIBDIR})
endif()
include(cmake/zlib.cmake)
include(cmake/blendthumb.cmake)
include(cmake/openal.cmake)
@@ -68,6 +79,9 @@ include(cmake/opencollada.cmake)
include(cmake/opencolorio.cmake)
include(cmake/llvm.cmake)
include(cmake/clang.cmake)
if(APPLE)
include(cmake/openmp.cmake)
endif()
include(cmake/openimageio.cmake)
include(cmake/tiff.cmake)
include(cmake/flexbison.cmake)
@@ -77,26 +91,30 @@ include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/numpy.cmake)
include(cmake/pugixml.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(WIN32)
include(cmake/hidapi.cmake)
if(WITH_EMBREE)
include(cmake/embree.cmake)
endif()
if(ENABLE_MINGW64)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
else()
set(mingw_LIBDIR ${LIBDIR})
if(WIN32)
# HMD branch deps
include(cmake/hidapi.cmake)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
#include(cmake/lcms.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/openjpeg.cmake)
if(BUILD_MODE STREQUAL Release)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
@@ -105,8 +123,6 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/vpx.cmake)
include(cmake/orc.cmake)
include(cmake/schroedinger.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
@@ -115,17 +131,24 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
include(cmake/lapack.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
include(cmake/xml2.cmake)
endif()
endif()
endif()
endif()
if(UNIX)
include(cmake/bzip2.cmake)
include(cmake/ffi.cmake)
include(cmake/lzma.cmake)
include(cmake/ssl.cmake)
include(cmake/sqlite.cmake)
endif()
include(cmake/harvest.cmake)

View File

@@ -26,6 +26,12 @@ if(ALEMBIC_HDF5)
endif()
endif()
if(WIN32)
set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
else()
set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
@@ -38,12 +44,13 @@ set(ALEMBIC_EXTRA_ARGS
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${LIBDIR}/ilmbase
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/ilmbase/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DILMBASE_ROOT=${ALEMBIC_ILMBASE}
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
@@ -72,9 +79,27 @@ ExternalProject_Add(external_alembic
INSTALL_DIR ${LIBDIR}/alembic
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_alembic
external_boost
external_zlib
external_ilmbase
external_openexr
)

View File

@@ -23,10 +23,20 @@ set(BLOSC_EXTRA_ARGS
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC2.lib
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-DDEACTIVATE_SNAPPY=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
if(WIN32)
#prevent blosc from including it's own local copy of zlib in the object file
#and cause linker errors with everybody else
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-DPREFER_EXTERNAL_ZLIB=ON
)
endif()
ExternalProject_Add(external_blosc
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -47,3 +57,19 @@ if(WIN32)
external_pthreads
)
endif()
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -16,6 +16,8 @@
#
# ***** END GPL LICENSE BLOCK *****
set(BOOST_ADDRESS_MODEL 64)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
@@ -25,16 +27,11 @@ if(WIN32)
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
endif()
if(MSVC12)
set(BOOST_TOOLSET toolset=msvc-12.0)
set(BOOST_COMPILER_STRING -vc120)
set(PYTHON_COMPILER_STRING v120)
set(BOOST_ADDRESS_MODEL 32)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
set(PYTHON_COMPILER_STRING v140)
endif()
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
set(semi_path "${PATCH_DIR}/semi.txt")
@@ -51,22 +48,26 @@ if(WIN32)
#set(BOOST_WITH_PYTHON --with-python)
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_68/ ${HARVEST_TARGET}/boost/include/)
endif()
set(BOOST_PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/boost/src/external_boost < ${PATCH_DIR}/boost.diff)
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./bjam)
set(BOOST_BUILD_OPTIONS toolset=clang cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./bjam)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
endif()
set(BOOST_OPTIONS
@@ -85,23 +86,17 @@ set(BOOST_OPTIONS
${BOOST_TOOLSET}
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BOOST_MD5}
URL_HASH MD5=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} variant=${BOOST_BUILD_TYPE} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)

View File

@@ -0,0 +1,39 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BZIP2_PREFIX "${LIBDIR}/bzip2")
set(BZIP2_CONFIGURE_ENV echo .)
set(BZIP2_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(BZIP2_LDFLAGS "-Wl,--as-needed")
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
endif()
ExternalProject_Add(external_bzip2
URL ${BZIP2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
INSTALL_DIR ${LIBDIR}/bzip2
)

View File

@@ -21,13 +21,22 @@ set(CLANG_EXTRA_ARGS
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
)
if(WIN32)
set(CLANG_GENERATOR "Ninja")
else()
set(CLANG_GENERATOR "Unix Makefiles")
endif()
ExternalProject_Add(external_clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PATCH_COMMAND ${PATCH_CMD} -p 2 -N -R -d ${BUILD_DIR}/clang/src/external_clang < ${PATCH_DIR}/clang.diff
PREFIX ${BUILD_DIR}/clang
CMAKE_GENERATOR ${CLANG_GENERATOR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
)

View File

@@ -0,0 +1,69 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the utility apps may use png/tiff/gif system libraries, but the
# library itself does not depend on them, so should give no problems.
set(EMBREE_EXTRA_ARGS
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
-DEMBREE_STATIC_LIB=ON
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
)
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
else()
set(EMBREE_BUILD_DIR)
endif()
ExternalProject_Add(external_embree
URL ${EMBREE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
DEPENDEES install
)
else()
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -18,13 +18,18 @@
set(FAAD_EXTRA_ARGS)
if (WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
else()
set(FAAD_EXTRA_CONFIGURE echo .)
endif()
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/faad/src/external_faad < ${PATCH_DIR}/libfaad.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ffi
URL ${FFI_URI}
URL_HASH SHA256=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
--enable-shared=no
--enable-static=yes
--with-pic
--libdir=${LIBDIR}/ffi/lib/
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
INSTALL_DIR ${LIBDIR}/ffi
)
if (UNIX AND NOT APPLE)
ExternalProject_Add_Step(external_ffi after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
DEPENDEES install
)
endif()

View File

@@ -16,10 +16,10 @@
#
# ***** END GPL LICENSE BLOCK *****
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/dirac/include/dirac -I${mingw_LIBDIR}/schroedinger/include/schroedinger-1.0 -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/dirac/lib -L${mingw_LIBDIR}/schroedinger/lib -L${mingw_LIBDIR}/orc/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_EXTRA_FLAGS --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/schroedinger/lib/pkgconfig:${mingw_LIBDIR}/orc/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR})
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
@@ -31,6 +31,12 @@ if(WIN32)
--disable-pthreads
--enable-libopenjpeg
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=yasm
)
endif()
else()
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
@@ -51,6 +57,11 @@ ExternalProject_Add(external_ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
# will fail. This patch does that in a way that is compatible with multiple distributions.
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
@@ -63,7 +74,6 @@ ExternalProject_Add(external_ffmpeg
--disable-libspeex
--enable-libvpx
--prefix=${LIBDIR}/ffmpeg
--enable-libschroedinger
--enable-libtheora
--enable-libvorbis
--enable-zlib
@@ -73,7 +83,6 @@ ExternalProject_Add(external_ffmpeg
--disable-nonfree
--enable-gpl
--disable-postproc
--disable-x11grab
--enable-libmp3lame
--disable-librtmp
--enable-libx264
@@ -91,9 +100,8 @@ ExternalProject_Add(external_ffmpeg
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl
--disable-sdl2
--disable-gnutls
--disable-vda
--disable-videotoolbox
--disable-libxcb
--disable-xlib
@@ -103,7 +111,8 @@ ExternalProject_Add(external_ffmpeg
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
--disable-crystalhd
--disable-sndio
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
@@ -121,7 +130,6 @@ add_dependencies(
external_openjpeg
external_xvidcore
external_x264
external_schroedinger
external_vpx
external_theora
external_vorbis
@@ -134,3 +142,11 @@ if(WIN32)
external_zlib_mingw
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
DEPENDEES install
)
endif()

View File

@@ -37,4 +37,11 @@ ExternalProject_Add(external_fftw3
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)
endif()
endif()

View File

@@ -16,7 +16,15 @@
#
# ***** END GPL LICENSE BLOCK *****
set(FREETYPE_EXTRA_ARGS -DCMAKE_RELEASE_POSTFIX:STRING=2ST -DCMAKE_DEBUG_POSTFIX:STRING=2ST_d -DWITH_BZip2=OFF -DWITH_HarfBuzz=OFF)
set(FREETYPE_EXTRA_ARGS
-DCMAKE_RELEASE_POSTFIX:STRING=2ST
-DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
-DWITH_BZip2=OFF
-DWITH_HarfBuzz=OFF
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
ExternalProject_Add(external_freetype
URL ${FREETYPE_URI}
@@ -24,5 +32,13 @@ ExternalProject_Add(external_freetype
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/freetype/src/external_freetype < ${PATCH_DIR}/freetype.diff
INSTALL_DIR ${LIBDIR}/freetype
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
DEPENDEES install
)
endif()

View File

@@ -28,43 +28,16 @@ message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
# Zlib Rename the lib file and copy the include/bin folders
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic.lib ${HARVEST_TARGET}/zlib/lib/libz_st.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/bin/ ${HARVEST_TARGET}/zlib/bin/ &&
# jpeg rename libfile + copy include
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# FreeType, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype &&
# pthreads, rename include dir
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib &&
# ffmpeg copy include+bin
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib &&
# sdl merge bin/lib folder, copy include
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib &&
# openal
${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# openEXR
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# fftw3
${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
@@ -78,41 +51,13 @@ if(BUILD_MODE STREQUAL Release)
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# iconv
${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h &&
# opencolorIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenColorIO/ ${HARVEST_TARGET}/opencolorio &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenColorIO/lib/OpenColorIO.dll ${HARVEST_TARGET}/opencolorio/bin/OpenColorIO.dll &&
# Osl
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl &&
# OpenVDB
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openVDB/ ${HARVEST_TARGET}/openVDB &&
# blosc
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/ &&
# tbb
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/ &&
# opencollada
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/ &&
# opensubdiv
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv ${HARVEST_TARGET}/opensubdiv &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# alembic
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic &&
# BlendThumb
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp &&
DEPENDS
)
endif()
@@ -122,43 +67,8 @@ if(BUILD_MODE STREQUAL Debug)
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# ilmbase+openexr
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Half.lib ${HARVEST_TARGET}/openexr/lib/Half_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Iex-2_2.lib ${HARVEST_TARGET}/openexr/lib/Iex-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/IexMath-2_2.lib ${HARVEST_TARGET}/openexr/lib/IexMath-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/IlmThread-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmThread-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Imath-2_2.lib ${HARVEST_TARGET}/openexr/lib/Imath-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/lib/IlmImf-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmImf-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/lib/IlmImfUtil-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmImfUtil-2_2_d.lib &&
# opencollada
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib &&
# blosc
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib &&
# osl
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib &&
# opensubdiv
${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib &&
# tbb
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib &&
# openvdb
${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# alembic
${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
@@ -192,7 +102,6 @@ function(harvest from to)
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "clang" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
@@ -201,7 +110,6 @@ endfunction()
harvest(alembic/include alembic/include "*.h")
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest(alembic/bin alembic/bin "*")
harvest(blosc/lib openvdb/lib "*.a")
harvest(boost/include boost/include "*")
harvest(boost/lib boost/lib "*.a")
harvest(ffmpeg/include ffmpeg/include "*.h")
@@ -220,17 +128,35 @@ harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
harvest(clang/bin llvm/bin "clang-format")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
if(APPLE)
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
endif()
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(openal/lib openal/lib "*.a")
harvest(blosc/include blosc/include "*.h")
harvest(blosc/lib blosc/lib "*.a")
harvest(zlib/include zlib/include "*.h")
harvest(zlib/lib zlib/lib "*.a")
harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a")
else()
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
endif()
harvest(opencollada/include/opencollada opencollada/include "*.h")
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
harvest(opencolorio/include opencolorio/include "*.h")
harvest(opencolorio/lib opencolorio/lib "*.a")
harvest(opencolorio/lib/static opencolorio/lib "*.a")
harvest(openexr/include openexr/include "*.h")
harvest(openexr/lib openexr/lib "*.a")
harvest(openimageio/bin openimageio/bin "idiff")
@@ -238,13 +164,12 @@ harvest(openimageio/bin openimageio/bin "maketx")
harvest(openimageio/bin openimageio/bin "oiiotool")
harvest(openimageio/include openimageio/include "*")
harvest(openimageio/lib openimageio/lib "*.a")
harvest(openjpeg/include/openjpeg-1.5 openjpeg/include "*.h")
harvest(openjpeg/include/openjpeg-2.3 openjpeg/include "*.h")
harvest(openjpeg/lib openjpeg/lib "*.a")
harvest(opensubdiv/include opensubdiv/include "*.h")
harvest(opensubdiv/lib opensubdiv/lib "*.a")
harvest(openvdb/include/openvdb/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(orc/lib/liborc-0.4.a ffmpeg/lib/liborc.a)
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
@@ -254,7 +179,6 @@ harvest(png/lib png/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(schroedinger/lib/libschroedinger-1.0.a ffmpeg/lib/libschroedinger.a)
harvest(sdl/include/SDL2 sdl/include "*.h")
harvest(sdl/lib sdl/lib "libSDL2.a")
harvest(sndfile/include sndfile/include "*.h")
@@ -270,7 +194,8 @@ harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
endif()

View File

@@ -31,4 +31,11 @@ ExternalProject_Add(external_iconv
if(MSVC)
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_iconv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
DEPENDEES install
)
endif()
endif()

View File

@@ -18,18 +18,41 @@
if(WIN32)
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_ilmbase after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr
DEPENDEES install
)
endif()
else()
set(ILMBASE_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ilmbase ${ILMBASE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
endif()
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)

View File

@@ -18,7 +18,7 @@
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}

View File

@@ -36,7 +36,7 @@ ExternalProject_Add(external_lame
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--enable-export=full
--disable-frontend
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame

View File

@@ -1,43 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LAPACK_EXTRA_ARGS)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(LAPACK_EXTRA_ARGS -G "MSYS Makefiles" -DCMAKE_Fortran_COMPILER=${DOWNLOAD_DIR}/mingw/mingw64/bin/gfortran.exe)
else()
set(LAPACK_EXTRA_ARGS -G "MSYS Makefiles" -DCMAKE_Fortran_COMPILER=${DOWNLOAD_DIR}/mingw/mingw32/bin/gfortran.exe)
endif()
endif()
ExternalProject_Add(external_lapack
URL ${LAPACK_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAPACK_HASH}
PREFIX ${BUILD_DIR}/lapack
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && ${CMAKE_COMMAND} ${LAPACK_EXTRA_ARGS} -DBUILD_TESTING=Off -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lapack .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && make install
INSTALL_DIR ${LIBDIR}/lapack
)
if(MSVC)
set_target_properties(external_lapack PROPERTIES FOLDER Mingw)
endif()

View File

@@ -16,17 +16,16 @@
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_orc
URL ${ORC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${ORC_HASH}
PREFIX ${BUILD_DIR}/orc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/orc --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && make install
INSTALL_DIR ${LIBDIR}/orc
set(LCMS_EXTRA_ARGS
)
if(MSVC)
set_target_properties(external_orc PROPERTIES FOLDER Mingw)
endif()
ExternalProject_Add(external_lcms
URL ${LCMS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
#patch taken from ocio
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms
)

View File

@@ -26,7 +26,7 @@ set(LLVM_EXTRA_ARGS
)
if(WIN32)
set(LLVM_GENERATOR "NMake Makefiles")
set(LLVM_GENERATOR "Ninja")
else()
set(LLVM_GENERATOR "Unix Makefiles")
endif()
@@ -38,7 +38,6 @@ ExternalProject_Add(ll
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/ll
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm-alloca-fix.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
@@ -48,9 +47,7 @@ if(MSVC)
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
else()
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/
)
endif()
ExternalProject_Add_Step(ll after_install
@@ -58,4 +55,3 @@ if(MSVC)
DEPENDEES mkdir update patch download configure build install
)
endif()

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LZMA_PATCH_CMD echo .)
ExternalProject_Add(external_lzma
URL ${LZMA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
--disable-shared
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
INSTALL_DIR ${LIBDIR}/lzma
)

View File

@@ -33,10 +33,9 @@ set(NUMPY_POSTFIX)
if(WIN32)
set(NUMPY_INSTALL
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
)
set(NUMPY_PATCH ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff )
else()
set(NUMPY_INSTALL echo .)
set(NUMPY_PATCH echo .)
@@ -54,6 +53,13 @@ ExternalProject_Add(external_numpy
INSTALL_COMMAND ${NUMPY_INSTALL}
)
if(WIN32)
ExternalProject_Add_Step(external_numpy after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
DEPENDEES install
)
endif()
add_dependencies(
external_numpy
Make_Python_Environment

View File

@@ -39,5 +39,16 @@ if(BUILD_MODE STREQUAL Release)
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(WIN32)
ExternalProject_Add_Step(external_openal after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
DEPENDEES install
)
endif()
endif()

View File

@@ -16,7 +16,7 @@
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX AND NOT APPLE)
if(UNIX)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
@@ -32,9 +32,34 @@ ExternalProject_Add(external_opencollada
INSTALL_DIR ${LIBDIR}/opencollada
)
if(UNIX AND NOT APPLE)
if(UNIX)
add_dependencies(
external_opencollada
external_xml2
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,34 +17,46 @@
# ***** END GPL LICENSE BLOCK *****
set(OPENCOLORIO_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_INCLUDEDIR=${LIBDIR}/boost/include/boost_1_60/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_DEBUG=ON
-DBoost_MAJOR_VERSION=1
-DBoost_MINOR_VERSION=60
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
-DOCIO_BUILD_TRUELIGHT=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_JNIGLUE=OFF
-DOCIO_STATIC_JNIGLUE=OFF
)
if(WIN32)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_BOOST_PTR=ON
-DOCIO_BUILD_STATIC=OFF
-DOCIO_BUILD_SHARED=ON
-DOCIO_BUILD_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INLINES_HIDDEN=OFF
-DOCIO_PYGLUE_LINK=OFF
-DOCIO_PYGLUE_RESPECT_ABI=OFF
-DOCIO_PYGLUE_SONAME=OFF
-DOCIO_PYGLUE_LIB_PREFIX=OFF
-DUSE_EXTERNAL_TINYXML=ON
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-DUSE_EXTERNAL_YAML=ON
-DYAML_CPP_FOUND=ON
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
#lie because ocio cmake is demanding boost even though it is not needed
-DYAML_CPP_VERSION=0.5.0
)
else()
set(OCIO_PATCH opencolorio.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
)
endif()
@@ -53,7 +65,7 @@ ExternalProject_Add(external_opencolorio
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
)
@@ -71,3 +83,30 @@ add_dependencies(
external_opencolorio
external_boost
)
if(WIN32)
add_dependencies(
external_opencolorio
external_tinyxml
external_yamlcpp
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -18,26 +18,59 @@
if(WIN32)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OPENEXR_EXTRA_ARGS
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
-DOPENEXR_BUILD_ILMBASE=On
-DOPENEXR_BUILD_OPENEXR=On
-DOPENEXR_BUILD_PYTHON_LIBS=Off
-DOPENEXR_BUILD_STATIC=On
-DOPENEXR_BUILD_SHARED=Off
-DOPENEXR_BUILD_TESTS=Off
-DOPENEXR_BUILD_VIEWERS=Off
-DOPENEXR_BUILD_UTILS=Off
-DOPENEXR_NAMESPACE_VERSIONING=Off
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
ExternalProject_Add_Step(external_openexr after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
#libs have moved between versions, just duplicate it for now.
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
DEPENDEES install
)
else()
set(OPENEXR_PKG_CONFIG_PATH ${LIBDIR}/zlib/share/pkgconfig)
set(OPENEXR_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
--with-ilmbase-prefix=${LIBDIR}/ilmbase
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CONFIGURE_COMMAND ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${OPENEXR_PKG_CONFIG_PATH} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/openexr ${OPENEXR_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
endif()
set(OPENEXR_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/openexr/src/external_openexr < ${PATCH_DIR}/openexr.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
add_dependencies(
external_openexr
external_zlib

View File

@@ -51,8 +51,8 @@ if(MSVC)
set(OPENJPEG_FLAGS
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
)
else()
set(OPENJPEG_FLAGS
@@ -65,7 +65,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf-2_2${LIBEXT}
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
@@ -109,12 +109,12 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
@@ -127,7 +127,7 @@ ExternalProject_Add(external_openimageio
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_staticexr.diff
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)

View File

@@ -22,7 +22,7 @@
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles")
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
@@ -46,7 +46,7 @@ if(MSVC)
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
if(BUILD_MODE STREQUAL Release)
@@ -58,7 +58,7 @@ if(MSVC)
endif()
endif()
set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
set(OPENJPEG_LIBRARY libopenjp2${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,33 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_openmp
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
)
add_dependencies(
external_openmp
external_clang
)

View File

@@ -33,22 +33,28 @@ set(OPENSUBDIV_EXTRA_ARGS
)
if(WIN32)
#no cuda support for vc15 yet
if(msvc15)
set(OPENSUBDIV_CUDA ON)
else()
set(OPENSUBDIV_CUDA ON)
endif()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=${OPENSUBDIV_CUDA}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=OFF
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
)
endif()
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
@@ -69,10 +75,28 @@ ExternalProject_Add(external_opensubdiv
INSTALL_DIR ${LIBDIR}/opensubdiv
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
external_tbb
)

View File

@@ -21,23 +21,6 @@ if(BUILD_MODE STREQUAL Debug)
endif()
set(OPENVDB_EXTRA_ARGS
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_CUSTOM=ON
-DILMBASE_CUSTOM_LIBRARIES=Half;Imath-2_2;IlmThread-2_2;Iex-2_2
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DILMBASE_HALF_LIBRARIES=${LIBDIR}/ilmbase/lib/Half${LIBEXT}
-DILMBASE_IMATH_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DILMBASE_ILMTHREAD_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DILMBASE_IEX_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DOPENEXR_USE_STATIC_LIBS=ON
-DOPENEXR_CUSTOM=ON
-DOPENEXR_CUSTOM_LIBRARY=IlmImf-2_2
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DTBB_ROOT_DIR=${LIBDIR}/tbb/
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARY=${LIBDIR}/tbb/lib/tbb_static${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
@@ -46,25 +29,48 @@ set(OPENVDB_EXTRA_ARGS
-DBoost_NO_SYSTEM_PATHS=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DWITH_BLOSC=ON
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBLOSC_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-DOPENVDB_BUILD_UNITTESTS=Off
-DOPENVDB_BUILD_PYTHON_MODULE=Off
-DGLEW_LOCATION=${LIBDIR}/glew/
-DBLOSC_LOCATION=${LIBDIR}/blosc/
-DTBB_LOCATION=${LIBDIR}/tbb/
-DTBB_ROOT=${LIBDIR}/tbb/
-DOPENEXR_LOCATION=${LIBDIR}/openexr
-DILMBASE_LOCATION=${LIBDIR}/ilmbase
-DIlmbase_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
)
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS})
# CMake script for OpenVDB based on https://raw.githubusercontent.com/diekev/openvdb-cmake/master/CMakeLists.txt
# can't be in external_openvdb because of how the includes are setup.
if(WIN32)
# Namespaces seem to be buggy and cause linker errors due to things not
# being in the correct namespace
# needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DOPENEXR_NAMESPACE_VERSIONING=OFF
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC3.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
-DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
)
endif()
endif()
ExternalProject_Add(openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_openvdb.txt ${BUILD_DIR}/openvdb/src/openvdb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy_directory ${PATCH_DIR}/cmake/ ${BUILD_DIR}/openvdb/src/openvdb/cmake/ &&
${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_vc2013.diff
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
)
@@ -78,3 +84,19 @@ add_dependencies(
external_zlib
external_blosc
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -20,6 +20,7 @@ if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_EMBREE "Enable building of Embree" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
@@ -56,24 +57,27 @@ if(WIN32)
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
# TODO FIXME highly MSVC specific
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
@@ -123,8 +127,7 @@ else()
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.9)
set(OSX_SDK_VERSION 10.12)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
@@ -140,17 +143,17 @@ else()
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS)
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG")
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g")
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
@@ -199,7 +202,11 @@ endif()
if(WIN32)
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
else()
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
endif()
else()
set(ZLIB_LIBRARY libz${LIBEXT})
endif()

View File

@@ -19,20 +19,22 @@
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}")
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
else()
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}")
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
SET(OSL_PLATFORM_FLAGS)
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath-2_2.lib^^${LIBDIR}/ilmbase/lib/Half.lib^^${LIBDIR}/ilmbase/lib/IlmThread-2_2.lib^^${LIBDIR}/ilmbase/lib/Iex-2_2.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/LLVMipo${LIBEXT}")
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Half{ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/IlmThread${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Iex${ILMBASE_VERSION_POSTFIX}.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}")
set(OSL_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
@@ -50,11 +52,12 @@ set(OSL_EXTRA_ARGS
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
@@ -64,23 +67,36 @@ set(OSL_EXTRA_ARGS
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DOSL_BUILD_CPP11=ON
-DUSE_LLVM_BITCODE=OFF
-DUSE_PARTIO=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
)
if(WIN32)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
)
endif()
ExternalProject_Add(external_osl
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND
${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff &&
${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
)
@@ -95,4 +111,22 @@ add_dependencies(
external_zlib
external_flexbison
external_openimageio
external_pugixml
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -36,7 +36,7 @@ add_dependencies(
external_zlib
)
if(BUILD_MODE STREQUAL Debug)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install

View File

@@ -17,30 +17,37 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(PTHREAD_XCFLAGS /MD)
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H /D_TIMESPEC_DEFINED ")
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H ")
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XCFLAGS=${PTHREAD_XCFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA512=${PTHREADS_SHA512}
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
INSTALL_DIR ${LIBDIR}/pthreads
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pthreads after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
DEPENDEES install
)
endif()
endif()

View File

@@ -0,0 +1,43 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PUGIXML_EXTRA_ARGS
)
ExternalProject_Add(external_pugixml
URL ${PUGIXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -22,6 +22,12 @@ if(BUILD_MODE STREQUAL Debug)
endif()
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_POSTFIX -x64)
else()
set(SSL_POSTFIX)
endif()
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
macro(cmake_to_dos_path MsysPath ResultingPath)
@@ -46,13 +52,12 @@ if(WIN32)
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND
echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python.diff &&
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/pc < ${PATCH_DIR}/pyshell.diff
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}"
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE} -k ${PYTHON_COMPILER_STRING}
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
@@ -62,24 +67,43 @@ if(WIN32)
message("POutput = ${PYTHON_OUTPUTDIR}")
else()
if(APPLE)
# we need to manually add homebrew headers to get ssl module building
set(PYTHON_CFLAGS "-I/usr/local/opt/openssl/include -I${OSX_SYSROOT}/usr/include ${PLATFORM_CFLAGS}")
set(PYTHON_LDFLAGS "-L/usr/local/opt/openssl/lib ${PLATFORM_LDFLAGS}")
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && export CFLAGS=${PYTHON_CFLAGS} && export LDFLAGS=${PYTHON_LDFLAGS})
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
export ac_cv_func_basename_r=no &&
export ac_cv_func_clock_getres=no &&
export ac_cv_func_clock_gettime=no &&
export ac_cv_func_clock_settime=no &&
export ac_cv_func_dirname_r=no &&
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no)
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_apple.diff)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
@@ -92,39 +116,45 @@ if(MSVC)
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_queue${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_queue${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
#xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
#leaving it commented out, so I won't get confused again with the next update.
#COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libcrypto-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libcrypto-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/sqlite3${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/sqlite3${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
if(MSVC12)
set(PYTHON_DISTUTIL_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/run/lib/distutils < ${PATCH_DIR}/python_runtime_vc2013.diff)
else()
set(PYTHON_DISTUTIL_PATCH echo "No patch needed")
endif()
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
@@ -134,7 +164,18 @@ if(MSVC)
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
COMMAND ${PYTHON_DISTUTIL_PATCH}
)
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
endif()
if(UNIX)
add_dependencies(
external_python
external_bzip2
external_ffi
external_lzma
external_ssl
external_sqlite
external_zlib
)
endif()

View File

@@ -0,0 +1,9 @@
{
global:
Py*;
_Py*;
_py*;
local:
*;
};

View File

@@ -1,48 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(SCHROEDINGER_EXTRA_FLAGS "CFLAGS=-g -I./ -I${LIBDIR}/orc/include/orc-0.4" "LDFLAGS=-Wl,--as-needed -static-libgcc -L${LIBDIR}/orc/lib" ORC_CFLAGS=-I${LIBDIR}/orc/include/orc-0.4 ORC_LDFLAGS=-L${LIBDIR}/orc/lib ORC_LIBS=${LIBDIR}/orc/lib/liborc-0.4.a ORCC=${LIBDIR}/orc/bin/orcc.exe)
else()
set(SCHROEDINGER_CFLAGS "${PLATFORM_CFLAGS} -I./ -I${LIBDIR}/orc/include/orc-0.4")
set(SCHROEDINGER_LDFLAGS "${PLATFORM_LDFLAGS} -L${LIBDIR}/orc/lib")
set(SCHROEDINGER_EXTRA_FLAGS CFLAGS=${SCHROEDINGER_CFLAGS} LDFLAGS=${SCHROEDINGER_LDFLAGS} ORC_CFLAGS=-I${LIBDIR}/orc/include/orc-0.4 ORC_LDFLAGS=-L${LIBDIR}/orc/lib ORCC=${LIBDIR}/orc/bin/orcc) # ORC_LIBS=${LIBDIR}/orc/lib/liborc-0.4.a
endif()
ExternalProject_Add(external_schroedinger
URL ${SCHROEDINGER_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SCHROEDINGER_HASH}
PREFIX ${BUILD_DIR}/schroedinger
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/schroedinger/src/external_schroedinger < ${PATCH_DIR}/schroedinger.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ &&
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/schroedinger --disable-shared --enable-static ${SCHROEDINGER_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ && make install
INSTALL_DIR ${LIBDIR}/schroedinger
)
add_dependencies(
external_schroedinger
external_orc
)
if(MSVC)
set_target_properties(external_schroedinger PROPERTIES FOLDER Mingw)
endif()

View File

@@ -25,6 +25,7 @@ else()
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
-DSNDIO=OFF
)
endif()
@@ -37,3 +38,12 @@ ExternalProject_Add(external_sdl
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib
DEPENDEES install
)
endif()

View File

@@ -35,9 +35,9 @@ message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw32")
# download mingw32
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z")
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z" "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z")
file(DOWNLOAD "https://astuteinternet.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.4/threads-win32/sjlj/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
endif()
# make mingw root directory
@@ -49,10 +49,10 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
endif()
# extract mingw32
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/mingw32env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z"))
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z"))
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
@@ -78,24 +78,24 @@ if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win32/nasm-2.12.01-win32.zip" "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win32/nasm-2.13.02-win32.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip"))
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip"
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.12.01/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
@@ -119,6 +119,15 @@ if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "$
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
@@ -216,4 +225,3 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -35,9 +35,9 @@ message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw64")
# download ming64
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z")
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
message("Downloading mingw64")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-release/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z" "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.4/threads-win32/seh/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
endif()
# make mingw root directory
@@ -49,10 +49,10 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
endif()
# extract mingw64
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/mingw64env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z"))
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z"))
message("Extracting mingw64")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
@@ -78,23 +78,24 @@ if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip" "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip"))
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip"
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.12.01/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
@@ -119,6 +120,14 @@ if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "$
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
@@ -216,4 +225,3 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -0,0 +1,57 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SQLITE_CONFIGURE_ENV echo .)
set(SQLITE_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(SQLITE_LDFLAGS -Wl,--as-needed)
set(SQLITE_CFLAGS
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_SESSION \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
--enable-shared=no)
endif()
ExternalProject_Add(external_sqlite
URL ${SQLITE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${SQLITE_PATCH_CMD}
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install
INSTALL_DIR ${LIBDIR}/sqlite
)

View File

@@ -0,0 +1,48 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if (APPLE)
set(SSL_OS_COMPILER "blender-darwin-x86_64")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
set(SSL_OS_COMPILER "blender-linux-x86")
endif()
endif()
ExternalProject_Add(external_ssl
URL ${SSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
--openssldir=${LIBDIR}/ssl
no-shared
no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
--config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
${SSL_OS_COMPILER}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
INSTALL_DIR ${LIBDIR}/ssl
)

View File

@@ -0,0 +1,15 @@
%targets = (
"blender-linux-x86" => {
inherit_from => [ "linux-x86" ],
cflags => add("-fPIC"),
},
"blender-linux-x86_64" => {
inherit_from => [ "linux-x86_64" ],
cflags => add("-fPIC"),
},
"blender-darwin-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc" ],
cflags => add("-fPIC"),
},
);

View File

@@ -23,14 +23,6 @@ set(TBB_EXTRA_ARGS
-DTBB_BUILD_STATIC=On
)
if(TBB_VERSION MATCHES 2018)
set(TBB_VS_VERSION vs2013)
elseif(TBB_VERSION MATCHES 2017)
set(TBB_VS_VERSION vs2012)
else()
set(TBB_VS_VERSION vs2010)
endif()
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL ${TBB_URI}
@@ -38,7 +30,23 @@ ExternalProject_Add(external_tbb
URL_HASH MD5=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/${TBB_VS_VERSION}/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -39,7 +39,7 @@ add_dependencies(
external_zlib
)
if(BUILD_MODE STREQUAL Debug)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install

View File

@@ -0,0 +1,31 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TINYXML_EXTRA_ARGS
)
ExternalProject_Add(external_tinyxml
URL ${TINYXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
#patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml
)

View File

@@ -16,46 +16,63 @@
#
# ***** END GPL LICENSE BLOCK *****
set(ZLIB_VERSION 1.2.8)
set(ZLIB_URI https://netcologne.dl.sourceforge.net/project/libpng/zlib/${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 44d667c142d7cda120332623eab69f40)
set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(OPENAL_VERSION 1.17.2)
set(OPENAL_URI http://kcat.strangesoft.net/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH 1764e0d8fec499589b47ebc724e0913d)
set(OPENAL_VERSION 1.18.2)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH d4eeb0889812e2fdeaa1843523d76190)
set(PNG_VERSION 1.6.21)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.gz)
set(PNG_HASH aca36ec8e0a3b406a5912243bc243717)
set(PNG_VERSION 1.6.35)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
set(PNG_HASH 678b7e696a62a193ed3503b04bf449d6)
set(JPEG_VERSION 1.4.2)
set(JPEG_VERSION 1.5.3)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH f9804884c1c41eb7f4febb9353a2cb27)
set(JPEG_HASH 5b7549d440b86c98a517355c102d155e)
set(BOOST_VERSION 1.60.0)
set(BOOST_VERSION_NODOTS 1_60_0)
set(BOOST_URI http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_NODOTS}.tar.bz2/download)
set(BOOST_MD5 65a840e1a0b13a558ff19eeb2c4f0cbe)
set(BOOST_VERSION 1.68.0)
set(BOOST_VERSION_NODOTS 1_68_0)
set(BOOST_URI https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH 5d8b4503582fffa9eefdb9045359c239)
set(BLOSC_VERSION 1.7.1)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.zip)
set(BLOSC_HASH ff5cc729a5a25934ef714217218eed26)
set(BLOSC_VERSION 1.14.4)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
set(BLOSC_HASH e80dfc71e4cba03b8d01ed0876547ffe)
set(PTHREADS_VERSION 2-9-1)
set(PTHREADS_URI ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PTHREADS_VERSION}-release.tar.gz)
set(PTHREADS_SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551)
set(PTHREADS_VERSION 3.0.0)
set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(ILMBASE_VERSION 2.2.0)
set(ILMBASE_URI http://download.savannah.nongnu.org/releases/openexr/ilmbase-${ILMBASE_VERSION}.tar.gz)
set(ILMBASE_HASH b540db502c5fa42078249f43d18a4652)
set(ILMBASE_VERSION 2.3.0)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
set(ILMBASE_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_POSTFIX _s)
else()
set(ILMBASE_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_POSTFIX _s_d)
endif()
else()
set(ILMBASE_VERSION_POSTFIX)
endif()
set(ILMBASE_URI https://github.com/openexr/openexr/releases/download/v${ILMBASE_VERSION}/ilmbase-${ILMBASE_VERSION}.tar.gz)
set(ILMBASE_HASH 354bf86de3b930ab87ac63619d60c860)
set(OPENEXR_VERSION 2.2.0)
set(OPENEXR_URI http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz)
set(OPENEXR_HASH b64e931c82aa3790329c21418373db4e)
set(OPENEXR_VERSION 2.3.0)
if (WIN32) #release 2.3.0 tarball has broken cmake support
set(OPENEXR_URI https://github.com/openexr/openexr/archive/0ac2ea34c8f3134148a5df4052e40f155b76f6fb.tar.gz)
set(OPENEXR_HASH ed159435d508240712fbaaa21d94bafb)
else()
set(OPENEXR_VERSION_POSTFIX)
set(OPENEXR_URI https://github.com/openexr/openexr/releases/download/v${OPENEXR_VERSION}/openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH a157e8a46596bc185f2472a5a4682174)
endif()
set(FREETYPE_VERSION 263)
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/ft${FREETYPE_VERSION}.zip)
set(FREETYPE_HASH 0db2a43301572e5c2b4a0864f237aeeb)
set(FREETYPE_VERSION 2.9.1)
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH 3adb0e35d3c100c456357345ccfa8056)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
@@ -69,9 +86,9 @@ set(HDF5_VERSION 1.8.17)
set(HDF5_URI https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz)
set(HDF5_HASH 7d572f8f3b798a628b8245af0391a0ca)
set(ALEMBIC_VERSION 1.7.1)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.zip)
set(ALEMBIC_MD5 cf7705055501d5ea0cb8256866496f79)
set(ALEMBIC_VERSION 1.7.8)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_MD5 d095c2feb5e183b824904db7b63c1d30)
## hash is for 3.1.2
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
@@ -88,141 +105,122 @@ set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_1_1)
set(OPENSUBDIV_Hash 25a9a6a94136b0eb85ce69e9c8cb6ab3)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.zip)
set(OPENSUBDIV_VERSION v3_3_3)
set(OPENSUBDIV_Hash 29c79dc01ef616aab02670bed5544ddd)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(SDL_VERSION 2.0.4)
set(SDL_VERSION 2.0.8)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 44fc4a023349933e7f5d7a582f7b886e)
set(SDL_HASH 3800d705cef742c6a634f202c37f263f)
set(OPENCOLLADA_VERSION v1.6.51)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH 23db5087faed4bc4cc1dfe456c0d4701)
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/6de971097c7f552300f669ed69ca0b6cf5a70843.zip)
set(OPENCOLORIO_HASH c9de0fd98f26ce6f2e08d617ca68b8e4)
set(OPENCOLORIO_VERSION 1.1.0)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 802d8f5b1d1fe316ec5f76511aa611b8)
set(LLVM_VERSION 3.4.2)
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz)
set(LLVM_HASH a20669f75967440de949ac3b1bad439c)
set(LLVM_VERSION 6.0.1)
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH c88c98709300ce2c285391f387fecce0)
set(CLANG_URI http://releases.llvm.org/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.gz)
set(CLANG_HASH 87945973b7c73038871c5f849a818588)
set(CLANG_URI http://releases.llvm.org/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz)
set(CLANG_HASH 4e419bd4e3b55aa06d872320f754bd85)
set(OPENIMAGEIO_VERSION 1.7.15)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.zip)
set(OPENIMAGEIO_HASH_178 e156e3669af0e1373142ab5e8f13de66)
set(OPENIMAGEIO_HASH_179 4121cb0e0433bda6a7ef32c8628a149f)
set(OPENIMAGEIO_HASH_1713 42a662775b834161ba88c6abdb299360)
set(OPENIMAGEIO_HASH_1715 e2ece0f62c013d64c478f82265988b0b)
set(OPENIMAGEIO_HASH ${OPENIMAGEIO_HASH_1715})
set(OPENMP_URI http://releases.llvm.org/${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 4826402ae3633c36c51ba4d0e5527d30)
set(OPENIMAGEIO_VERSION 1.8.13)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH f5526c3c9878029ee900d84856683f93)
set(TIFF_VERSION 4.0.6)
set(TIFF_VERSION 4.0.9)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH d1d2e940dea0b5ad435f21f03d96dd72)
set(TIFF_HASH 54bad211279cc93eb4fca31ba9bfdc79)
set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
set(OSL_VERSION 1.9.9)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 44ad511e424965a10fce051a053b0605)
set(OSL_VERSION 1.7.5)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.zip)
set(OSL_HASH 6924dd5d453159e7b6eb106a08c358cf)
set(PYTHON_VERSION 3.6.2)
set(PYTHON_SHORT_VERSION 3.6)
set(PYTHON_SHORT_VERSION_NO_DOTS 36)
set(PYTHON_VERSION 3.7.0)
set(PYTHON_SHORT_VERSION 3.7)
set(PYTHON_SHORT_VERSION_NO_DOTS 37)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH 2c68846471994897278364fc18730dd9)
set(PYTHON_HASH eb8c2a6b1447d50813c02714af4681f3)
if(UNIX AND NOT APPLE)
# Needed to be compatible with GCC 7, other platforms can upgrade later
set(TBB_VERSION 2017_U7)
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 364f2a4b80e978f38a69cbf7c466b898)
else()
set(TBB_VERSION 44_20160128)
set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz)
set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc)
endif()
set(TBB_VERSION 2018_U5)
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH ff3ae09f8c23892fbc3008c39f78288f)
set(OPENVDB_VERSION 3.1.0)
set(OPENVDB_VERSION 5.1.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 30a7e9571a03ab7bcf1a39fb62aa436f)
set(OPENVDB_HASH 5310101f874dcfd2165f9cee68c22624)
set(IDNA_VERSION 2.6)
set(CHARDET_VERSION 3.0.2)
set(URLLIB3_VERSION 1.22)
set(CERTIFI_VERSION 2017.7.27.1)
set(REQUESTS_VERSION 2.18.4)
set(IDNA_VERSION 2.7)
set(CHARDET_VERSION 3.0.4)
set(URLLIB3_VERSION 1.23)
set(CERTIFI_VERSION 2018.8.13)
set(REQUESTS_VERSION 2.19.1)
set(NUMPY_VERSION v1.13.1)
set(NUMPY_SHORT_VERSION 1.13)
set(NUMPY_URI https://pypi.python.org/packages/c0/3a/40967d9f5675fbb097ffec170f59c2ba19fc96373e73ad47c2cae9a30aed/numpy-1.13.1.zip)
set(NUMPY_HASH 2c3c0f4edf720c3a7b525dacc825b9ae)
set(NUMPY_VERSION v1.15.0)
set(NUMPY_SHORT_VERSION 1.15)
set(NUMPY_URI https://files.pythonhosted.org/packages/3a/20/c81632328b1a4e1db65f45c0a1350a9c5341fd4bbb8ea66cdd98da56fe2e/numpy-1.15.0.zip)
set(NUMPY_HASH 20e13185089011116a98e11c9bf8aa07)
set(LAME_VERSION 3.99.5)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.99/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 84835b313d4a8b68f5349816d33e07ce)
set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
set(OGG_VERSION 1.3.2)
set(OGG_VERSION 1.3.3)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692)
set(OGG_HASH c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985)
set(VORBIS_VERSION 1.3.5)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_HASH 6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce)
set(VORBIS_HASH 6ed40e0241089a42c48604dc00e362beee00036af2d8b3f46338031c9e0351cb)
set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(FLAC_VERSION 1.3.1)
set(FLAC_VERSION 1.3.2)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c)
set(FLAC_HASH 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f)
set(VPX_VERSION 1.5.0)
set(VPX_URI http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-${VPX_VERSION}.tar.bz2)
set(VPX_HASH 306d67908625675f8e188d37a81fbfafdf5068b09d9aa52702b6fbe601c76797)
set(VPX_VERSION 1.7.0)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 1fec931eb5c94279ad219a5b6e0202358e94a93a90cfb1603578c326abfc1238)
set(ORC_VERSION 0.4.25)
set(ORC_URI https://gstreamer.freedesktop.org/src/orc/orc-${ORC_VERSION}.tar.xz)
set(ORC_HASH c1b1d54a58f26d483f0b3881538984789fe5d5460ab8fab74a1cacbd3d1c53d1)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180811-2245-stable.tar.bz2)
set(X264_HASH ae8a868a0e236a348b35d79f3ee80294b169d1195408b689f9851383661ed7aa)
set(SCHROEDINGER_VERSION 1.0.11)
set(SCHROEDINGER_URI https://download.videolan.org/contrib/schroedinger/schroedinger-${SCHROEDINGER_VERSION}.tar.gz)
set(SCHROEDINGER_HASH 1e572a0735b92aca5746c4528f9bebd35aa0ccf8619b22fa2756137a8cc9f912)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20160401-2245-stable.tar.bz2)
set(X264_HASH 1e9a7b835e80313aade53a9b6ff353e099de3856bf5f30a4d8dfc91281f786f5)
set(XVIDCORE_VERSION 1.3.4)
set(XVIDCORE_VERSION 1.3.5)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f)
set(XVIDCORE_HASH 165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0)
#this has to be in sync with the version in blenders /extern folder
set(OPENJPEG_VERSION 1.5.2)
set(OPENJPEG_SHORT_VERSION 1.5)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/version.${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d)
set(OPENJPEG_VERSION 2.3.0)
set(OPENJPEG_SHORT_VERSION 2.3)
# Use slightly newer commit after release which includes a cmake fix
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/66297f07a43.zip)
set(OPENJPEG_HASH 8242b18d908c7c42174e4231a741cfa7ce7c26b6ed5c9644feb9df7b3054310b)
set(FAAD_VERSION 2-2.7)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.bz2)
set(FAAD_HASH 4c332fa23febc0e4648064685a3d4332)
set(FAAD_VERSION 2-2.8.8)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.gz)
set(FAAD_HASH 28f6116efdbe9378269f8a6221767d1f)
set(FFMPEG_VERSION 3.2.1)
set(FFMPEG_VERSION 4.0.2)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH cede174178e61f882844f5870c35ce72)
set(FFMPEG_HASH 5576e8a22f80b6a336db39808f427cfb)
set(FFTW_VERSION 3.3.4)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 2edab8c06b24feeb3b82bbb3ebf3e7b3)
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
set(ICONV_VERSION 1.14)
set(ICONV_VERSION 1.15)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH e34509b1623cec449dfeb73d7ce9c6c6)
set(ICONV_HASH ace8b5f2db42f7b3b3057585e80d9808)
set(LAPACK_VERSION 3.6.0)
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
@@ -240,9 +238,9 @@ set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
set(HIDAPI_HASH b6e22f6b514f8bcf594989f20ffc46fb)
set(WEBP_VERSION 0.5.1)
set(WEBP_VERSION 0.6.1)
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_HASH 3d7db92ebba5b4f679413d25c6040881)
set(WEBP_HASH b49ce9c3e3e9acae4d91bca44bb85a72)
set(SPNAV_VERSION 0.2.3)
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
@@ -255,3 +253,52 @@ set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
set(XML2_VERSION 2.9.4)
set(XML2_URI ftp://xmlsoft.org/libxml2/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
set(TINYXML_VERSION 2_6_2)
set(TINYXML_VERSION_DOTS 2.6.2)
set(TINYXML_URI https://nchc.dl.sourceforge.net/project/tinyxml/tinyxml/${TINYXML_VERSION_DOTS}/tinyxml_${TINYXML_VERSION}.tar.gz)
set(TINYXML_HASH c1b864c96804a10526540c664ade67f0)
set(YAMLCPP_VERSION 0.6.2)
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
set(YAMLCPP_HASH 5b943e9af0060d0811148b037449ef82)
set(LCMS_VERSION 2.9)
set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
set(LCMS_HASH 8de1b7724f578d2995c8fdfa35c3ad0e)
set(PUGIXML_VERSION 1.9)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v1.9.tar.gz)
set(PUGIXML_HASH 9346ca1dce2c48f1748c12fdac41a714)
set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
# Libraries to keep Python modules static on Linux.
# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download
# sources from Debian packaging.
set(BZIP2_VERSION 1.0.6)
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.bz2)
set(BZIP2_HASH d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7)
set(FFI_VERSION 3.2.1)
set(FFI_URI ftp://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37)
set(LZMA_VERSION 5.2.4)
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HASH 3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf)
set(SSL_VERSION 1.1.0i)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99)
set(SQLITE_VERSION 3.24.0)
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
set(EMBREE_VERSION 3.2.4)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)

View File

@@ -18,9 +18,9 @@
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc)
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc)
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
else()
if(APPLE)

View File

@@ -37,14 +37,5 @@ ExternalProject_Add(external_webp
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp-build/${WEBP_BUILD_DIR}${LIBPREFIX}webp${LIBEXT} ${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/decode.h ${LIBDIR}/webp/include/webp/decode.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/encode.h ${LIBDIR}/webp/include/webp/encode.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/demux.h ${LIBDIR}/webp/include/webp/demux.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/extras.h ${LIBDIR}/webp/include/webp/extras.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/format_constants.h ${LIBDIR}/webp/include/webp/format_constants.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/mux.h ${LIBDIR}/webp/include/webp/mux.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/mux_types.h ${LIBDIR}/webp/include/webp/mux_types.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/types.h ${LIBDIR}/webp/include/webp/types.h
INSTALL_DIR ${LIBDIR}/webp
)

View File

@@ -18,14 +18,19 @@
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
else()
set(X264_PATCH_CMD echo .)
endif()
ExternalProject_Add(external_x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf

View File

@@ -0,0 +1,34 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(YAMLCPP_EXTRA_ARGS
-DBUILD_GMOCK=OFF
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DMSVC_SHARED_RT=OFF
)
ExternalProject_Add(external_yamlcpp
URL ${YAMLCPP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp
)

View File

@@ -25,9 +25,23 @@ ExternalProject_Add(external_zlib
INSTALL_DIR ${LIBDIR}/zlib
)
if(BUILD_MODE STREQUAL Debug)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
DEPENDEES install
)
endif()
else()
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
DEPENDEES install
)
endif()

View File

@@ -37,4 +37,3 @@ endif()
if(MSVC)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
endif()

View File

@@ -26,17 +26,17 @@ ARGS=$( \
getopt \
-o s:i:t:h \
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
with-all,with-opencollada,with-jack,\
with-all,with-opencollada,with-jack,with-embree,\
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
force-all,force-python,force-numpy,force-boost,\
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
force-ffmpeg,force-opencollada,force-alembic,\
force-ffmpeg,force-opencollada,force-alembic,force-embree,\
build-all,build-python,build-numpy,build-boost,\
build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
build-ffmpeg,build-opencollada,build-alembic,\
build-ffmpeg,build-opencollada,build-alembic,build-embree,\
skip-python,skip-numpy,skip-boost,\
skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
skip-ffmpeg,skip-opencollada,skip-alembic \
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree \
-- "$@" \
)
@@ -54,8 +54,9 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# Do not install some optional, potentially conflicting libs by default...
WITH_ALL=false
# Do not yet enable opencollada, use --with-opencollada (or --with-all) option to try it.
# Do not yet enable opencollada or embree, use --with-opencollada/--with-embree (or --with-all) option to try it.
WITH_OPENCOLLADA=false
WITH_EMBREE=false
THREADS=$(nproc)
@@ -67,6 +68,7 @@ or use --source/--install options, if you want to use other paths!
Number of threads for building: \$THREADS (automatically detected, use --threads=<nbr> to override it).
Full install: \$WITH_ALL (use --with-all option to enable it).
Building OpenCOLLADA: \$WITH_OPENCOLLADA (use --with-opencollada option to enable it).
Building Embree: \$WITH_EMBREE (use --with-embree option to enable it).
Example:
Full install without OpenCOLLADA: --with-all --skip-opencollada
@@ -113,6 +115,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--with-opencollada
Build and install the OpenCOLLADA libraries.
--with-embree
Build and install the Embree libraries.
--with-jack
Install the jack libraries.
@@ -177,6 +182,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--build-opencollada
Force the build of OpenCOLLADA.
--build-embree
Force the build of Embree.
--build-ffmpeg
Force the build of FFMpeg.
@@ -229,6 +237,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--force-opencollada
Force the rebuild of OpenCOLLADA.
--force-embree
Force the rebuild of Embree.
--force-ffmpeg
Force the rebuild of FFMpeg.
@@ -274,6 +285,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--skip-opencollada
Unconditionally skip OpenCOLLADA installation/building.
--skip-Embree
Unconditionally skip Embree installation/building.
--skip-ffmpeg
Unconditionally skip FFMpeg installation/building.\""
@@ -285,91 +299,97 @@ SUDO="sudo"
NO_BUILD=false
NO_CONFIRM=false
USE_CXX11=true # Mandatory in blender2.8
USE_CXX11=true
PYTHON_VERSION="3.6.2"
PYTHON_VERSION_MIN="3.6"
PYTHON_VERSION="3.7.0"
PYTHON_VERSION_MIN="3.7"
PYTHON_FORCE_BUILD=false
PYTHON_FORCE_REBUILD=false
PYTHON_SKIP=false
NUMPY_VERSION="1.13.1"
NUMPY_VERSION="1.15.0"
NUMPY_VERSION_MIN="1.8"
NUMPY_FORCE_BUILD=false
NUMPY_FORCE_REBUILD=false
NUMPY_SKIP=false
BOOST_VERSION="1.60.0"
BOOST_VERSION="1.68.0"
BOOST_VERSION_MIN="1.49"
BOOST_FORCE_BUILD=false
BOOST_FORCE_REBUILD=false
BOOST_SKIP=false
OCIO_VERSION="1.0.9"
OCIO_VERSION="1.1.0"
OCIO_VERSION_MIN="1.0"
OCIO_FORCE_BUILD=false
OCIO_FORCE_REBUILD=false
OCIO_SKIP=false
OPENEXR_VERSION="2.2.0"
OPENEXR_VERSION="2.3.0"
OPENEXR_VERSION_MIN="2.0.1"
ILMBASE_VERSION="2.2.0"
ILMBASE_VERSION_MIN="2.2"
ILMBASE_VERSION="2.3.0"
ILMBASE_VERSION_MIN="2.3"
OPENEXR_FORCE_BUILD=false
OPENEXR_FORCE_REBUILD=false
OPENEXR_SKIP=false
_with_built_openexr=false
OIIO_VERSION="1.7.15"
OIIO_VERSION_MIN="1.7.15"
OIIO_VERSION_MAX="1.9.0" # UNKNOWN currently # Not supported by current OSL...
OIIO_VERSION="1.8.13"
OIIO_VERSION_MIN="1.8.13"
OIIO_VERSION_MAX="99.99.0" # UNKNOWN currently # Not supported by current OSL...
OIIO_FORCE_BUILD=false
OIIO_FORCE_REBUILD=false
OIIO_SKIP=false
LLVM_VERSION="3.4"
LLVM_VERSION_MIN="3.4"
LLVM_VERSION="6.0.1"
LLVM_VERSION_MIN="6.0"
LLVM_VERSION_FOUND=""
LLVM_FORCE_BUILD=false
LLVM_FORCE_REBUILD=false
LLVM_SKIP=false
# OSL needs to be compiled for now!
OSL_VERSION="1.7.5"
OSL_VERSION="1.9.9"
OSL_VERSION_MIN=$OSL_VERSION
OSL_FORCE_BUILD=false
OSL_FORCE_REBUILD=false
OSL_SKIP=false
# OpenSubdiv needs to be compiled for now
OSD_VERSION="3.1.1"
OSD_VERSION="3.3.3"
OSD_VERSION_MIN=$OSD_VERSION
OSD_FORCE_BUILD=false
OSD_FORCE_REBUILD=false
OSD_SKIP=false
# OpenVDB needs to be compiled for now
OPENVDB_BLOSC_VERSION="1.7.0"
OPENVDB_BLOSC_VERSION="1.14.4"
OPENVDB_VERSION="3.1.0"
OPENVDB_VERSION="5.1.0"
OPENVDB_VERSION_MIN=$OPENVDB_VERSION
OPENVDB_FORCE_BUILD=false
OPENVDB_FORCE_REBUILD=false
OPENVDB_SKIP=false
# Alembic needs to be compiled for now
ALEMBIC_VERSION="1.7.1"
ALEMBIC_VERSION="1.7.8"
ALEMBIC_VERSION_MIN=$ALEMBIC_VERSION
ALEMBIC_FORCE_BUILD=false
ALEMBIC_FORCE_REBUILD=false
ALEMBIC_SKIP=false
OPENCOLLADA_VERSION="1.6.51"
OPENCOLLADA_VERSION="1.6.68"
OPENCOLLADA_FORCE_BUILD=false
OPENCOLLADA_FORCE_REBUILD=false
OPENCOLLADA_SKIP=false
FFMPEG_VERSION="3.2.1"
EMBREE_VERSION="3.2.4"
EMBREE_FORCE_BUILD=false
EMBREE_FORCE_REBUILD=false
EMBREE_SKIP=false
FFMPEG_VERSION="4.0.2"
FFMPEG_VERSION_MIN="2.8.4"
FFMPEG_FORCE_BUILD=false
FFMPEG_FORCE_REBUILD=false
@@ -502,6 +522,9 @@ while true; do
--with-opencollada)
WITH_OPENCOLLADA=true; shift; continue
;;
--with-embree)
WITH_EMBREE=true; shift; continue
;;
--with-jack)
WITH_JACK=true; shift; continue;
;;
@@ -547,6 +570,7 @@ while true; do
OSD_FORCE_BUILD=true
OPENVDB_FORCE_BUILD=true
OPENCOLLADA_FORCE_BUILD=true
EMBREE_FORCE_BUILD=true
FFMPEG_FORCE_BUILD=true
ALEMBIC_FORCE_BUILD=true
shift; continue
@@ -588,6 +612,9 @@ while true; do
--build-opencollada)
OPENCOLLADA_FORCE_BUILD=true; shift; continue
;;
--build-embree)
EMBREE_FORCE_BUILD=true; shift; continue
;;
--build-ffmpeg)
FFMPEG_FORCE_BUILD=true; shift; continue
;;
@@ -606,6 +633,7 @@ while true; do
OSD_FORCE_REBUILD=true
OPENVDB_FORCE_REBUILD=true
OPENCOLLADA_FORCE_REBUILD=true
EMBREE_FORCE_REBUILD=true
FFMPEG_FORCE_REBUILD=true
ALEMBIC_FORCE_REBUILD=true
shift; continue
@@ -645,6 +673,9 @@ while true; do
--force-opencollada)
OPENCOLLADA_FORCE_REBUILD=true; shift; continue
;;
--force-embree)
EMBREE_FORCE_REBUILD=true; shift; continue
;;
--force-ffmpeg)
FFMPEG_FORCE_REBUILD=true; shift; continue
;;
@@ -684,6 +715,9 @@ while true; do
--skip-opencollada)
OPENCOLLADA_SKIP=true; shift; continue
;;
--skip-embree)
EMBREE_SKIP=true; shift; continue
;;
--skip-ffmpeg)
FFMPEG_SKIP=true; shift; continue
;;
@@ -708,6 +742,9 @@ done
if [ "$WITH_ALL" = true -a "$OPENCOLLADA_SKIP" = false ]; then
WITH_OPENCOLLADA=true
fi
if [ "$WITH_ALL" = true -a "$EMBREE_SKIP" = false ]; then
WITH_EMBREE=true
fi
if [ "$WITH_ALL" = true ]; then
WITH_JACK=true
fi
@@ -737,43 +774,45 @@ _boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
BOOST_SOURCE=( "http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download" )
BOOST_BUILD_MODULES="--with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time --with-wave --with-iostreams --with-python --with-program_options"
OCIO_USE_REPO=true
OCIO_SOURCE=( "https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION" )
OCIO_SOURCE_REPO=( "https://github.com/imageworks/OpenColorIO.git" )
OCIO_SOURCE_REPO_UID="6de971097c7f552300f669ed69ca0b6cf5a70843"
OCIO_USE_REPO=false
OCIO_SOURCE=( "https://github.com/imageworks/OpenColorIO/archive/v$OCIO_VERSION.tar.gz")
#~ OCIO_SOURCE_REPO=( "https://github.com/imageworks/OpenColorIO.git" )
#~ OCIO_SOURCE_REPO_UID="6de971097c7f552300f669ed69ca0b6cf5a70843"
OPENEXR_USE_REPO=false
OPENEXR_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz" )
OPENEXR_SOURCE_REPO=( "https://github.com/mont29/openexr.git" )
OPENEXR_SOURCE_REPO_UID="2787aa1cf652d244ed45ae124eb1553f6cff11ee"
ILMBASE_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/ilmbase-$ILMBASE_VERSION.tar.gz" )
#~ OPENEXR_SOURCE=( "https://github.com/openexr/openexr/releases/download/v$OPENEXR_VERSION/openexr-$OPENEXR_VERSION.tar.gz" )
OPENEXR_SOURCE_REPO_UID="0ac2ea34c8f3134148a5df4052e40f155b76f6fb"
OPENEXR_SOURCE=( "https://github.com/openexr/openexr/archive/$OPENEXR_SOURCE_REPO_UID.tar.gz" )
#~ OPENEXR_SOURCE_REPO=( "https://github.com/mont29/openexr.git" )
ILMBASE_SOURCE=( "https://github.com/openexr/openexr/releases/download/v$ILMBASE_VERSION/ilmbase-$ILMBASE_VERSION.tar.gz" )
OIIO_USE_REPO=false
OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz" )
OIIO_SOURCE_REPO=( "https://github.com/OpenImageIO/oiio.git" )
OIIO_SOURCE_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
#~ OIIO_SOURCE_REPO=( "https://github.com/OpenImageIO/oiio.git" )
#~ OIIO_SOURCE_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
LLVM_SOURCE=( "http://releases.llvm.org/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
LLVM_CLANG_SOURCE=( "http://releases.llvm.org/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
LLVM_SOURCE=( "http://releases.llvm.org/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.xz" )
LLVM_CLANG_SOURCE=( "http://releases.llvm.org/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.xz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.xz" )
OSL_USE_REPO=false
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
#~ OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage/archive/Release-1.5.11.tar.gz" )
#~ OSL_SOURCE_REPO=( "https://github.com/imageworks/OpenShadingLanguage.git" )
#~ OSL_SOURCE_REPO_BRANCH="master"
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
#~ OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage/archive/Release-1.5.11.tar.gz" )
#~ OSL_SOURCE_REPO=( "https://github.com/mont29/OpenShadingLanguage.git" )
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
#~ OSL_SOURCE_REPO_BRANCH="master"
OSL_SOURCE_REPO=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
OSL_SOURCE_REPO_UID="7d40ff5fe8e47b030042afb92d0e955f5aa96f48"
OSL_SOURCE_REPO_BRANCH="blender-fixes"
#~ OSL_SOURCE_REPO=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
#~ OSL_SOURCE_REPO_UID="7d40ff5fe8e47b030042afb92d0e955f5aa96f48"
#~ OSL_SOURCE_REPO_BRANCH="blender-fixes"
OSD_USE_REPO=false
# Script foo to make the version string compliant with the archive name:
# ${Varname//SearchForThisChar/ReplaceWithThisChar}
OSD_SOURCE=( "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${OSD_VERSION//./_}.tar.gz" )
OSD_SOURCE_REPO=( "https://github.com/PixarAnimationStudios/OpenSubdiv.git" )
OSD_SOURCE_REPO_UID="404659fffa659da075d1c9416e4fc939139a84ee"
OSD_SOURCE_REPO_BRANCH="dev"
#~ OSD_SOURCE_REPO=( "https://github.com/PixarAnimationStudios/OpenSubdiv.git" )
#~ OSD_SOURCE_REPO_UID="404659fffa659da075d1c9416e4fc939139a84ee"
#~ OSD_SOURCE_REPO_BRANCH="dev"
OPENVDB_USE_REPO=false
OPENVDB_BLOSC_SOURCE=( "https://github.com/Blosc/c-blosc/archive/v${OPENVDB_BLOSC_VERSION}.tar.gz" )
@@ -788,26 +827,25 @@ ALEMBIC_SOURCE=( "https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.
# ALEMBIC_SOURCE_REPO_UID="e6c90d4faa32c4550adeaaf3f556dad4b73a92bb"
# ALEMBIC_SOURCE_REPO_BRANCH="master"
OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA.git" )
OPENCOLLADA_REPO_UID="0c2cdc17c22cf42050e4d42154bed2176363549c"
OPENCOLLADA_REPO_BRANCH="master"
OPENCOLLADA_USE_REPO=false
OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA/archive/v${OPENCOLLADA_VERSION}.tar.gz" )
#~ OPENCOLLADA_SOURCE_REPO=( "https://github.com/KhronosGroup/OpenCOLLADA.git" )
#~ OPENCOLLADA_REPO_UID="e937c3897b86fc0da53cde97257f5156"
#~ OPENCOLLADA_REPO_BRANCH="master"
EMBREE_USE_REPO=false
EMBREE_SOURCE=( "https://github.com/embree/embree/archive/v${EMBREE_VERSION}.tar.gz" )
#~ EMBREE_SOURCE_REPO=( "https://github.com/embree/embree.git" )
#~ EMBREE_REPO_UID="4a12bfed63c90e85b6eab98b8cdd8dd2a3ba5809"
#~ EMBREE_REPO_BRANCH="master"
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
# C++11 is required now
CXXFLAGS_BACK=$CXXFLAGS
if [ "$USE_CXX11" = true ]; then
WARNING "C++11 is now mandatory for blender2.8, this *should* go smoothly with any very recent distribution.
However, if you are experiencing linking errors (also when building Blender itself), please try the following:
* Re-run this script with '--build-all --force-all' options.
* Ensure your gcc version is at the very least 4.8, if possible you should really rather use gcc-5.1 or above.
Please note that until the transition to C++11-built libraries if completed in your distribution, situation will
remain fuzzy and incompatibilities may happen..."
PRINT ""
PRINT ""
CXXFLAGS="$CXXFLAGS -std=c++11"
export CXXFLAGS
fi
CXXFLAGS="$CXXFLAGS -std=c++11"
export CXXFLAGS
#### Show Dependencies ####
@@ -817,7 +855,7 @@ DEPS_COMMON_INFO="\"COMMON DEPENDENCIES:
Those libraries should be available as packages in all recent distributions (optional ones are [between brackets]):
* Basics of dev environment (cmake, gcc, svn , git, ...).
* libjpeg, libpng, libtiff, [libopenjpeg], [libopenal].
* libjpeg, libpng, libtiff, [openjpeg2], [libopenal].
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
* libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp.
* libsdl1.2, libglew, [libglewmx].\""
@@ -841,7 +879,8 @@ You may also want to build them yourself (optional ones are [between brackets]):
* [OpenShadingLanguage $OSL_VERSION_MIN] (from $OSL_SOURCE_REPO, branch $OSL_SOURCE_REPO_BRANCH, commit $OSL_SOURCE_REPO_UID).
* [OpenSubDiv $OSD_VERSION_MIN] (from $OSD_SOURCE_REPO, branch $OSD_SOURCE_REPO_BRANCH, commit $OSD_SOURCE_REPO_UID).
* [OpenVDB $OPENVDB_VERSION_MIN] (from $OPENVDB_SOURCE), [Blosc $OPENVDB_BLOSC_VERSION] (from $OPENVDB_BLOSC_SOURCE).
* [OpenCollada] (from $OPENCOLLADA_SOURCE, branch $OPENCOLLADA_REPO_BRANCH, commit $OPENCOLLADA_REPO_UID).
* [OpenCollada $OPENCOLLADA_VERSION] (from $OPENCOLLADA_SOURCE).
* [Embree $EMBREE_VERSION] (from $EMBREE_SOURCE).
* [Alembic $ALEMBIC_VERSION] (from $ALEMBIC_SOURCE).\""
if [ "$DO_SHOW_DEPS" = true ]; then
@@ -1206,7 +1245,7 @@ compile_Boost() {
if [ ! -d $_inst ]; then
INFO "Building Boost-$BOOST_VERSION"
# Rebuild dependecies as well!
# Rebuild dependencies as well!
OIIO_FORCE_BUILD=true
OIIO_FORCE_REBUILD=true
OSL_FORCE_BUILD=true
@@ -1325,12 +1364,14 @@ compile_OCIO() {
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
cmake_d="$cmake_d -D OCIO_BUILD_APPS=OFF"
cmake_d="$cmake_d -D OCIO_BUILD_PYGLUE=OFF"
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
if file /bin/cp | grep -q '32-bit'; then
cflags="-fPIC -m32 -march=i686"
else
cflags="-fPIC"
fi
cflags="$cflags -Wno-error=unused-function -Wno-error=deprecated-declarations"
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ..
@@ -1397,7 +1438,7 @@ compile_ILMBASE() {
if [ ! -d $_openexr_inst ]; then
INFO "Building ILMBase-$ILMBASE_VERSION"
# Rebuild dependecies as well!
# Rebuild dependencies as well!
OPENEXR_FORCE_BUILD=true
OPENEXR_FORCE_REBUILD=true
@@ -1493,7 +1534,7 @@ compile_OPENEXR() {
if [ ! -d $_inst ]; then
INFO "Building OpenEXR-$OPENEXR_VERSION"
# Rebuild dependecies as well!
# Rebuild dependencies as well!
OIIO_FORCE_BUILD=true
OIIO_FORCE_REBUILD=true
@@ -1607,7 +1648,7 @@ compile_OIIO() {
if [ ! -d $_inst ]; then
INFO "Building OpenImageIO-$OIIO_VERSION"
# Rebuild dependecies as well!
# Rebuild dependencies as well!
OSL_FORCE_BUILD=true
OSL_FORCE_REBUILD=true
@@ -1665,6 +1706,7 @@ compile_OIIO() {
cmake_d="$cmake_d -D USE_QT=OFF"
cmake_d="$cmake_d -D USE_PYTHON=OFF"
cmake_d="$cmake_d -D USE_FFMPEG=OFF"
cmake_d="$cmake_d -D USE_OPENCV=OFF"
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF"
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=OFF"
@@ -1682,9 +1724,7 @@ compile_OIIO() {
# fi
cmake_d="$cmake_d -D USE_OCIO=OFF"
if [ "$USE_CXX11" = true ]; then
cmake_d="$cmake_d -D OIIO_BUILD_CPP11=ON"
fi
cmake_d="$cmake_d -D OIIO_BUILD_CPP11=ON"
if file /bin/cp | grep -q '32-bit'; then
cflags="-fPIC -m32 -march=i686"
@@ -1750,7 +1790,7 @@ compile_LLVM() {
if [ ! -d $_inst ]; then
INFO "Building LLVM-$LLVM_VERSION (CLANG included!)"
# Rebuild dependecies as well!
# Rebuild dependencies as well!
OSL_FORCE_BUILD=true
OSL_FORCE_REBUILD=true
@@ -1758,23 +1798,20 @@ compile_LLVM() {
if [ ! -d $_src -o true ]; then
mkdir -p $SRC
download LLVM_SOURCE[@] "$_src.tar.gz"
download LLVM_CLANG_SOURCE[@] "$_src_clang.tar.gz"
download LLVM_SOURCE[@] "$_src.tar.xz"
download LLVM_CLANG_SOURCE[@] "$_src_clang.tar.xz"
INFO "Unpacking LLVM-$LLVM_VERSION"
tar -C $SRC --transform "s,([^/]*/?)llvm-[^/]*(.*),\1LLVM-$LLVM_VERSION\2,x" \
-xf $_src.tar.gz
-xf $_src.tar.xz
INFO "Unpacking CLANG-$LLVM_VERSION to $_src/tools/clang"
# Stupid clang guys renamed 'clang' to 'cfe' for now handle both cases... :(
tar -C $_src/tools \
--transform "s,([^/]*/?)(clang|cfe)-[^/]*(.*),\1clang\3,x" \
-xf $_src_clang.tar.gz
-xf $_src_clang.tar.xz
cd $_src
# XXX Ugly patching hack!
patch -p1 -i "$SCRIPT_DIR/patches/install_deps_llvm.diff"
cd $CWD
fi
@@ -1877,9 +1914,6 @@ compile_OSL() {
# Stick to same rev as windows' libs...
git checkout $OSL_SOURCE_REPO_UID
git reset --hard
# XXX Ugly patching hack!
patch -p1 -i "$SCRIPT_DIR/patches/install_deps_osl.diff"
fi
# Always refresh the whole build!
@@ -1897,9 +1931,7 @@ compile_OSL() {
cmake_d="$cmake_d -D OSL_BUILD_PLUGINS=OFF"
cmake_d="$cmake_d -D OSL_BUILD_TESTS=OFF"
cmake_d="$cmake_d -D USE_SIMD=sse2"
if [ "$USE_CXX11" = true ]; then
cmake_d="$cmake_d -D OSL_BUILD_CPP11=1"
fi
cmake_d="$cmake_d -D OSL_BUILD_CPP11=1"
#~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
@@ -2084,7 +2116,7 @@ compile_BLOSC() {
if [ ! -d $_inst ]; then
INFO "Building Blosc-$OPENVDB_BLOSC_VERSION"
# Rebuild dependecies as well!
# Rebuild dependencies as well!
OPENVDB_FORCE_BUILD=true
OPENVDB_FORCE_REBUILD=true
@@ -2285,12 +2317,6 @@ compile_ALEMBIC() {
cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
# Without Boost or TR1, Alembic requires C++11.
if [ "$USE_CXX11" != true ]; then
cmake_d="$cmake_d -D ALEMBIC_LIB_USES_BOOST=ON"
cmake_d="$cmake_d -D ALEMBIC_LIB_USES_TR1=OFF"
fi
if [ -d $INST/boost ]; then
if [ -d $INST/boost ]; then
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost"
@@ -2374,17 +2400,24 @@ compile_OpenCOLLADA() {
if [ ! -d $_src ]; then
mkdir -p $SRC
git clone $OPENCOLLADA_SOURCE $_src
if [ "$OPENCOLLADA_USE_REPO" = true ]; then
git clone $OPENCOLLADA_SOURCE_REPO $_src
else
download OPENCOLLADA_SOURCE[@] "$_src.tar.gz"
INFO "Unpacking OpenCOLLADA-$OPENCOLLADA_VERSION"
tar -C $SRC -xf $_src.tar.gz
fi
fi
cd $_src
# XXX For now, always update from latest repo...
git pull origin $OPENCOLLADA_REPO_BRANCH
if [ "$OPENCOLLADA_USE_REPO" = true ]; then
git pull origin $OPENCOLLADA_REPO_BRANCH
# Stick to same rev as windows' libs...
git checkout $OPENCOLLADA_REPO_UID
git reset --hard
# Stick to same rev as windows' libs...
git checkout $OPENCOLLADA_REPO_UID
git reset --hard
fi
# Always refresh the whole build!
if [ -d build ]; then
@@ -2423,6 +2456,101 @@ compile_OpenCOLLADA() {
fi
}
#### Build Embree ####
_init_embree() {
_src=$SRC/embree-$EMBREE_VERSION
_git=true
_inst=$INST/embree-$EMBREE_VERSION
_inst_shortcut=$INST/embree
}
clean_Embree() {
_init_embree
_clean
}
compile_Embree() {
if [ "$NO_BUILD" = true ]; then
WARNING "--no-build enabled, Embree will not be compiled!"
return
fi
# To be changed each time we make edits that would modify the compiled results!
embree_magic=9
_init_embree
# Clean install if needed!
magic_compile_check embree-$EMBREE_VERSION $embree_magic
if [ $? -eq 1 -o "$EMBREE_FORCE_REBUILD" = true ]; then
clean_Embree
fi
if [ ! -d $_inst ]; then
INFO "Building Embree-$EMBREE_VERSION"
prepare_opt
if [ ! -d $_src ]; then
mkdir -p $SRC
if [ "EMBREE_USE_REPO" = true ]; then
git clone $EMBREE_SOURCE_REPO $_src
else
download EMBREE_SOURCE[@] "$_src.tar.gz"
INFO "Unpacking Embree-$EMBREE_VERSION"
tar -C $SRC -xf $_src.tar.gz
fi
fi
cd $_src
if [ "$EMBREE_USE_REPO" = true ]; then
git pull origin $EMBREE_REPO_BRANCH
# Stick to same rev as windows' libs...
git checkout $EMBREE_REPO_UID
git reset --hard
fi
# Always refresh the whole build!
if [ -d build ]; then
rm -rf build
fi
mkdir build
cd build
cmake_d="-D CMAKE_BUILD_TYPE=Release"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
cmake_d="$cmake_d -D EMBREE_ISPC_SUPPORT=OFF"
cmake_d="$cmake_d -D EMBREE_TUTORIALS=OFF"
cmake_d="$cmake_d -D EMBREE_STATIC_LIB=ON"
cmake_d="$cmake_d -D EMBREE_RAY_MASK=ON"
cmake_d="$cmake_d -D EMBREE_FILTER_FUNCTION=ON"
cmake_d="$cmake_d -D EMBREE_BACKFACE_CULLING=OFF"
cmake_d="$cmake_d -D EMBREE_TASKING_SYSTEM=INTERNAL"
cmake_d="$cmake_d -D EMBREE_MAX_ISA=AVX2"
cmake $cmake_d ../
make -j$THREADS && make install
make clean
if [ -d $_inst ]; then
_create_inst_shortcut
else
ERROR "Embree-$EMBREE_VERSION failed to compile, exiting"
exit 1
fi
magic_compile_set embree-$EMBREE_VERSION $embree_magic
cd $CWD
INFO "Done compiling Embree-$EMBREE_VERSION!"
else
INFO "Own Embree-$EMBREE_VERSION is up to date, nothing to do!"
INFO "If you want to force rebuild of this lib, use the --force-embree option."
fi
}
#### Build FFMPEG ####
_init_ffmpeg() {
_src=$SRC/ffmpeg-$FFMPEG_VERSION
@@ -2640,8 +2768,8 @@ install_DEB() {
THEORA_USE=true
PRINT ""
# New Ubuntu crap (17.04 and more) have no openjpeg lib!
OPENJPEG_DEV="libopenjpeg-dev"
# We need openjp2, libopenjpeg is an old version
OPENJPEG_DEV="libopenjp2-7-dev"
check_package_DEB $OPENJPEG_DEV
if [ $? -eq 0 ]; then
_packages="$_packages $OPENJPEG_DEV"
@@ -2786,6 +2914,7 @@ install_DEB() {
fi
if $_do_compile_python; then
install_packages_DEB libffi-dev
compile_Python
PRINT ""
if [ "$NUMPY_SKIP" = true ]; then
@@ -2882,11 +3011,11 @@ install_DEB() {
INFO "Forced LLVM building, as requested..."
_do_compile_llvm=true
else
check_package_DEB clang-$LLVM_VERSION
check_package_DEB clang-$LLVM_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_DEB llvm-$LLVM_VERSION-dev clang-$LLVM_VERSION
install_packages_DEB llvm-$LLVM_VERSION_MIN-dev clang-$LLVM_VERSION_MIN
have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION
LLVM_VERSION_FOUND=$LLVM_VERSION_MIN
clean_LLVM
else
_do_compile_llvm=true
@@ -2989,6 +3118,23 @@ install_DEB() {
fi
fi
if [ "$WITH_EMBREE" = true ]; then
_do_compile_embree=false
PRINT ""
if [ "$EMBREE_SKIP" = true ]; then
WARNING "Skipping Embree installation, as requested..."
elif [ "$EMBREE_FORCE_BUILD" = true ]; then
INFO "Forced Embree building, as requested..."
_do_compile_embree=true
else
# No package currently!
_do_compile_embree=true
fi
if [ "$_do_compile_embree" = true ]; then
compile_Embree
fi
fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
@@ -3177,7 +3323,7 @@ install_RPM() {
fi
# These libs should always be available in fedora/suse official repository...
OPENJPEG_DEV="openjpeg-devel"
OPENJPEG_DEV="openjpeg2-devel"
VORBIS_DEV="libvorbis-devel"
OGG_DEV="libogg-devel"
THEORA_DEV="libtheora-devel"
@@ -3324,6 +3470,7 @@ install_RPM() {
fi
if [ "$_do_compile_python" = true ]; then
install_packages_RPM libffi-devel
compile_Python
PRINT ""
if [ "$NUMPY_SKIP" = true ]; then
@@ -3434,16 +3581,15 @@ install_RPM() {
else
CLANG_DEV="clang-devel"
fi
# XXX RHEL has 3.4 in repo but OSL complains about not finding MCJIT_LIBRARY, so compile for now...
#check_package_version_match_RPM $CLANG_DEV $LLVM_VERSION
#if [ $? -eq 0 ]; then
# install_packages_RPM llvm-devel $CLANG_DEV
# have_llvm=true
# LLVM_VERSION_FOUND=$LLVM_VERSION
# clean_LLVM
#else
check_package_version_match_RPM $CLANG_DEV $LLVM_VERSION
if [ $? -eq 0 ]; then
install_packages_RPM llvm-devel $CLANG_DEV
have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM
else
_do_compile_llvm=true
#fi
fi
fi
if [ "$_do_compile_llvm" = true ]; then
@@ -3536,6 +3682,23 @@ install_RPM() {
fi
fi
if [ "$WITH_EMBREE" = true ]; then
PRINT ""
_do_compile_embree=false
if [ "$OPENCOLLADA_SKIP" = true ]; then
WARNING "Skipping Embree installation, as requested..."
elif [ "$EMBREE_FORCE_BUILD" = true ]; then
INFO "Forced Embree building, as requested..."
_do_compile_embree=true
else
# No package...
_do_compile_embree=true
fi
if [ "$_do_compile_embree" = true ]; then
compile_Embree
fi
fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
@@ -3647,7 +3810,7 @@ install_ARCH() {
fi
# These libs should always be available in arch official repository...
OPENJPEG_DEV="openjpeg"
OPENJPEG_DEV="openjpeg2"
VORBIS_DEV="libvorbis"
OGG_DEV="libogg"
THEORA_DEV="libtheora"
@@ -3753,6 +3916,7 @@ install_ARCH() {
fi
if [ "$_do_compile_python" = true ]; then
install_packages_ARCH libffi
compile_Python
PRINT ""
if [ "$NUMPY_SKIP" = true ]; then
@@ -3843,11 +4007,11 @@ install_ARCH() {
INFO "Forced LLVM building, as requested..."
_do_compile_llvm=true
else
check_package_version_match_ARCH llvm35 $LLVM_VERSION_MIN
check_package_version_match_ARCH llvm $LLVM_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH llvm35 clang35
install_packages_ARCH llvm clang
have_llvm=true
LLVM_VERSION=`get_package_version_ARCH llvm35`
LLVM_VERSION=`get_package_version_ARCH llvm`
LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM
else
@@ -3965,6 +4129,28 @@ install_ARCH() {
fi
fi
if [ "$WITH_EMBREE" = true ]; then
PRINT ""
_do_compile_embree=false
if [ "$EMBREE_SKIP" = true ]; then
WARNING "Skipping Embree installation, as requested..."
elif [ "$EMBREE_FORCE_BUILD" = true ]; then
INFO "Forced Embree building, as requested..."
_do_compile_embree=true
else
check_package_ARCH embree
if [ $? -eq 0 ]; then
install_packages_ARCH embree
clean_Embree
else
_do_compile_embree=true
fi
fi
if [ "$_do_compile_embree" = true ]; then
compile_Embree
fi
fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
@@ -4136,6 +4322,21 @@ install_OTHER() {
fi
fi
if [ "$WITH_EMBREE" = true ]; then
_do_compile_embree=false
PRINT ""
if [ "$EMBREE_SKIP" = true ]; then
WARNING "Skipping Embree installation, as requested..."
elif [ "$EMBREE_FORCE_BUILD" = true ]; then
INFO "Forced Embree building, as requested..."
_do_compile_embree=true
fi
if [ "$_do_compile_embree" = true ]; then
PRINT ""
compile_Embree
fi
fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
@@ -4227,12 +4428,6 @@ print_info() {
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*"
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC*"
if [ "$USE_CXX11" = true ]; then
_1="-D WITH_CXX11=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
_1="-D WITH_CODEC_SNDFILE=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
@@ -4337,6 +4532,12 @@ print_info() {
_buildargs="$_buildargs $_1"
fi
if [ "$WITH_EMBREE" = true ]; then
_1="-D WITH_CYCLES_EMBREE=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
if [ "$WITH_JACK" = true ]; then
_1="-D WITH_JACK=ON"
_2="-D WITH_JACK_DYNLOAD=ON"
@@ -4378,6 +4579,10 @@ print_info() {
PRINT ""
PRINT "Or even simpler, just run (in your blender-source dir):"
PRINT " make -j$THREADS BUILD_CMAKE_ARGS=\"$_buildargs\""
PRINT ""
PRINT "Or in all your build directories:"
PRINT " cmake $_buildargs ."
}
#### "Main" ####

View File

@@ -1,35 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e09c57..26565ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,7 +116,7 @@ IF (NOT ${ALEMBIC_LIB_USES_TR1} AND NOT ${ALEMBIC_LIB_USES_BOOST})
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- IF (COMPILER_SUPPORTS_CXX1X)
+ IF (COMPILER_SUPPORTS_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSEIF (COMPILER_SUPPORTS_CXX0X)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
--- a/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
+++ b/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
@@ -47,7 +47,18 @@
#define COMPARE_EXCHANGE( V, COMP, EXCH ) V.compare_exchange_weak( COMP, EXCH, std::memory_order_seq_cst, std::memory_order_seq_cst )
// Windows
#elif defined( _MSC_VER )
-#define COMPARE_EXCHANGE( V, COMP, EXCH ) InterlockedCompareExhange64( &V, EXCH, COMP ) == COMP
+#define COMPARE_EXCHANGE( V, COMP, EXCH ) InterlockedCompareExchange64( &V, EXCH, COMP ) == COMP
+int ffsll(long long value)
+{
+ if (!value)
+ return 0;
+
+ for (int bit = 0; bit < 63; bit++)
+ {
+ if (value & (1 << bit))
+ return bit + 1;
+ }
+}
// gcc 4.8 and above not using C++11
#elif defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8
#define COMPARE_EXCHANGE( V, COMP, EXCH ) __atomic_compare_exchange_n( &V, &COMP, EXCH, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST )

View File

@@ -10,24 +10,22 @@ diff -Naur src/blosc/CMakeLists.txt external_blosc/blosc/CMakeLists.txt
endif(NOT Threads_FOUND)
else(WIN32)
find_package(Threads REQUIRED)
diff -Naur src/blosc/blosc.c external_blosc/blosc/blosc.c
--- src/blosc/blosc.c 2016-02-03 10:26:28 -0700
+++ external_blosc/blosc/blosc.c 2017-03-03 09:01:50 -0700
@@ -49,12 +49,12 @@
diff -Naur external_blosc.orig/blosc/blosc.c external_blosc/blosc/blosc.c
--- external_blosc.orig/blosc/blosc.c 2018-07-30 04:56:38 -0600
+++ external_blosc/blosc/blosc.c 2018-08-11 15:27:26 -0600
@@ -56,14 +56,7 @@
#include <inttypes.h>
#endif /* _WIN32 */
-#if defined(_WIN32) && !defined(__GNUC__)
-/* Include the win32/pthread.h library for all the Windows builds. See #224. */
-#if defined(_WIN32)
- #include "win32/pthread.h"
- #include "win32/pthread.c"
-#else
+//#if defined(_WIN32) && !defined(__GNUC__)
+// #include "win32/pthread.h"
+ //#include "win32/pthread.c"
+//#else
#include <pthread.h>
- #include <pthread.h>
-#endif
+//#endif
/* If C11 is supported, use it's built-in aligned allocation. */
#if __STDC_VERSION__ >= 201112L
-
+#include <pthread.h>
/* Some useful units */
#define KB 1024

View File

@@ -1,15 +0,0 @@
--- a/boost/config/compiler/visualc.hpp 2015-12-08 11:55:19 -0700
+++ b/boost/config/compiler/visualc.hpp 2018-03-17 10:29:52 -0600
@@ -287,12 +287,3 @@
# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
#endif
-//
-// last known and checked version is 19.00.23026 (VC++ 2015 RTM):
-#if (_MSC_VER > 1900)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# else
-# pragma message("Unknown compiler version - please run the configure tests and report the results")
-# endif
-#endif

View File

@@ -1,127 +0,0 @@
--- cfe/trunk/lib/Serialization/ASTWriter.cpp
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp
@@ -56,14 +56,14 @@
using namespace clang::serialization;
template <typename T, typename Allocator>
-static StringRef bytes(const std::vector<T, Allocator> &v) {
+static StringRef data(const std::vector<T, Allocator> &v) {
if (v.empty()) return StringRef();
return StringRef(reinterpret_cast<const char*>(&v[0]),
sizeof(T) * v.size());
}
template <typename T>
-static StringRef bytes(const SmallVectorImpl<T> &v) {
+static StringRef data(const SmallVectorImpl<T> &v) {
return StringRef(reinterpret_cast<const char*>(v.data()),
sizeof(T) * v.size());
}
@@ -1385,7 +1385,7 @@
Record.push_back(INPUT_FILE_OFFSETS);
Record.push_back(InputFileOffsets.size());
Record.push_back(UserFilesNum);
- Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, bytes(InputFileOffsets));
+ Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, data(InputFileOffsets));
}
//===----------------------------------------------------------------------===//
@@ -1771,7 +1771,7 @@
Record.push_back(SOURCE_LOCATION_OFFSETS);
Record.push_back(SLocEntryOffsets.size());
Record.push_back(SourceMgr.getNextLocalOffset() - 1); // skip dummy
- Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, bytes(SLocEntryOffsets));
+ Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, data(SLocEntryOffsets));
// Write the source location entry preloads array, telling the AST
// reader which source locations entries it should load eagerly.
@@ -2087,7 +2087,7 @@
Record.push_back(MacroOffsets.size());
Record.push_back(FirstMacroID - NUM_PREDEF_MACRO_IDS);
Stream.EmitRecordWithBlob(MacroOffsetAbbrev, Record,
- bytes(MacroOffsets));
+ data(MacroOffsets));
}
void ASTWriter::WritePreprocessorDetail(PreprocessingRecord &PPRec) {
@@ -2185,7 +2185,7 @@
Record.push_back(PPD_ENTITIES_OFFSETS);
Record.push_back(FirstPreprocessorEntityID - NUM_PREDEF_PP_ENTITY_IDS);
Stream.EmitRecordWithBlob(PPEOffsetAbbrev, Record,
- bytes(PreprocessedEntityOffsets));
+ data(PreprocessedEntityOffsets));
}
}
@@ -2548,7 +2548,7 @@
Record.push_back(CXX_BASE_SPECIFIER_OFFSETS);
Record.push_back(CXXBaseSpecifiersOffsets.size());
Stream.EmitRecordWithBlob(BaseSpecifierOffsetAbbrev, Record,
- bytes(CXXBaseSpecifiersOffsets));
+ data(CXXBaseSpecifiersOffsets));
}
//===----------------------------------------------------------------------===//
@@ -2623,7 +2623,7 @@
Decls.push_back(std::make_pair((*D)->getKind(), GetDeclRef(*D)));
++NumLexicalDeclContexts;
- Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, bytes(Decls));
+ Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, data(Decls));
return Offset;
}
@@ -2642,7 +2642,7 @@
Record.push_back(TYPE_OFFSET);
Record.push_back(TypeOffsets.size());
Record.push_back(FirstTypeID - NUM_PREDEF_TYPE_IDS);
- Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, bytes(TypeOffsets));
+ Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, data(TypeOffsets));
// Write the declaration offsets array
Abbrev = new BitCodeAbbrev();
@@ -2655,7 +2655,7 @@
Record.push_back(DECL_OFFSET);
Record.push_back(DeclOffsets.size());
Record.push_back(FirstDeclID - NUM_PREDEF_DECL_IDS);
- Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, bytes(DeclOffsets));
+ Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, data(DeclOffsets));
}
void ASTWriter::WriteFileDeclIDsMap() {
@@ -2680,7 +2680,7 @@
unsigned AbbrevCode = Stream.EmitAbbrev(Abbrev);
Record.push_back(FILE_SORTED_DECLS);
Record.push_back(FileSortedIDs.size());
- Stream.EmitRecordWithBlob(AbbrevCode, Record, bytes(FileSortedIDs));
+ Stream.EmitRecordWithBlob(AbbrevCode, Record, data(FileSortedIDs));
}
void ASTWriter::WriteComments() {
@@ -2893,7 +2893,7 @@
Record.push_back(SelectorOffsets.size());
Record.push_back(FirstSelectorID - NUM_PREDEF_SELECTOR_IDS);
Stream.EmitRecordWithBlob(SelectorOffsetAbbrev, Record,
- bytes(SelectorOffsets));
+ data(SelectorOffsets));
}
}
@@ -3253,7 +3253,7 @@
Record.push_back(IdentifierOffsets.size());
Record.push_back(FirstIdentID - NUM_PREDEF_IDENT_IDS);
Stream.EmitRecordWithBlob(IdentifierOffsetAbbrev, Record,
- bytes(IdentifierOffsets));
+ data(IdentifierOffsets));
}
//===----------------------------------------------------------------------===//
@@ -4046,7 +4046,7 @@
Record.clear();
Record.push_back(TU_UPDATE_LEXICAL);
Stream.EmitRecordWithBlob(TuUpdateLexicalAbbrev, Record,
- bytes(NewGlobalDecls));
+ data(NewGlobalDecls));
// And a visible updates block for the translation unit.
Abv = new llvm::BitCodeAbbrev();

View File

@@ -75,7 +75,7 @@ macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
# Handle new library names for OpenEXR 2.1 build via cmake
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
find_library(${tmp_prefix}_LIBRARY_RELEASE
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
HINTS ${${libpath_var}}
@@ -177,7 +177,7 @@ if(ILMBASE_INCLUDE_DIR)
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
endif()

View File

@@ -175,7 +175,7 @@ if(OPENEXR_INCLUDE_DIR)
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
endif()

View File

@@ -6,7 +6,7 @@
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
# and basename_LIBRARY_RELEASE will be set to the release value. If only
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
#
# If the generator supports configuration types, then basename_LIBRARY and
# basename_LIBRARIES will be set with debug and optimized flags specifying the
@@ -53,10 +53,10 @@ macro( select_library_configurations basename )
# if the generator supports configuration types or CMAKE_BUILD_TYPE
# is set, then set optimized and debug options.
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
set( ${basename}_LIBRARY
set( ${basename}_LIBRARY
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
set( ${basename}_LIBRARIES
set( ${basename}_LIBRARIES
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
@@ -67,16 +67,15 @@ macro( select_library_configurations basename )
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
"The ${basename} library" )
if( ${basename}_LIBRARY )
set( ${basename}_FOUND TRUE )
endif( ${basename}_LIBRARY )
mark_as_advanced( ${basename}_LIBRARY
mark_as_advanced( ${basename}_LIBRARY
${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG
)
endmacro( select_library_configurations )

View File

@@ -0,0 +1,51 @@
project(lcms2)
cmake_minimum_required(VERSION 2.8)
include_directories(include)
set(HEADERS
include/lcms2.h
include/lcms2_plugin.h
)
set(SOURCES
src/cmscam02.c
src/cmscgats.c
src/cmscnvrt.c
src/cmserr.c
src/cmsgamma.c
src/cmsgmt.c
src/cmsintrp.c
src/cmsio0.c
src/cmsio1.c
src/cmslut.c
src/cmsmd5.c
src/cmsmtrx.c
src/cmsnamed.c
src/cmsopt.c
src/cmspack.c
src/cmspcs.c
src/cmsplugin.c
src/cmsps2.c
src/cmssamp.c
src/cmssm.c
src/cmstypes.c
src/cmsvirt.c
src/cmswtpnt.c
src/cmsxform.c
src/lcms2_internal.h
)
add_library(${PROJECT_NAME} STATIC ${HEADERS} ${SOURCES})
set_target_properties(${PROJECT_NAME} PROPERTIES
LIBRARY_OUTPUT_NAME "${PROJECT_NAME}"
PUBLIC_HEADER "${HEADERS}"
)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include
)

View File

@@ -1,398 +0,0 @@
# --------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
# --------------------------------------------------------------------------------
project(OpenVDB)
# --------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
# --------------------------------------------------------------------------------
set(CMAKE_BUILD_TYPE_INIT "Release")
# --------------------------------------------------------------------------------
# Options
option(WITH_BLOSC "Enable Blosc support for compression" OFF)
option(WITH_LOGC4PLUS "Enable logging" OFF)
option(WITH_OPENVDB_2_ABI "Enable building the library to be compability with the OpenVDB 2 ABI" OFF)
option(WITH_PRINTER "Enable building the OpenVDB print executable" OFF)
option(WITH_PYTHON "Enable building the OpenVDB python API" OFF)
option(WITH_RENDERER "Enable building the OpenVDB render executable" OFF)
option(WITH_UNITTEST "Enable building the unit tests" OFF)
option(WITH_VIEWER "Enable building the OpenVDB viewer executable" OFF)
# --------------------------------------------------------------------------------
# Find packages
#set(BOOST_LIBRARIES boost_iostreams boost_system boost_thread)
find_package(IlmBase)
find_package(OpenEXR)
find_package(TBB)
find_package(Boost)
if(WITH_BLOSC)
find_package(Blosc)
if(NOT BLOSC_FOUND)
set(WITH_BLOSC OFF)
endif()
endif()
# todo
if(WITH_VIEWER)
set(GLFW_INCLUDE_DIRS ${GLFW_INCLUDE_PATH})
set(GLFW_LIBRARY_DIRS ${GLFW_LIBRARY_PATH})
endif()
if(WITH_LOGC4PLUS)
find_package(LogC4Plus)
if(NOT LOGC4PLUS_FOUND)
set(WITH_LOGC4PLUS OFF)
endif()
endif()
# todo
if(WITH_PYTHON)
set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
set(PYTHON_LIBRARY_DIRS ${PYTHON_LIBRARY_PATH})
endif()
if(WITH_UNITTEST)
find_package(CppUnit)
if(NOT CPPUNIT_FOUND)
set(WITH_UNITTEST OFF)
endif()
endif()
# --------------------------------------------------------------------------------
message (STATUS "BOOST_ROOT ${BOOST_ROOT}")
message (STATUS "Boost found ${Boost_FOUND} ")
message (STATUS "Boost version ${Boost_VERSION}")
message (STATUS "Boost include dirs ${Boost_INCLUDE_DIRS}")
message (STATUS "Boost library dirs ${Boost_LIBRARY_DIRS}")
message (STATUS "Boost libraries ${Boost_LIBRARIES}")
message (STATUS "ILMBase found ${ILMBASE_FOUND} ")
message (STATUS "ILMBase include dir ${ILMBASE_INCLUDE_DIR}")
message (STATUS "ILMBase libraries ${ILMBASE_LIBRARIES}")
message (STATUS "TBB found ${TBB_FOUND} ")
message (STATUS "TBB include dir ${TBB_INCLUDE_DIR}")
message (STATUS "TBB libraries ${TBB_LIBRARIES}")
if(MSVC)
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj" )
endif()
set(OPENVDB_LIBRARIES ${BLOSC_LIBRARIES} ${BOOST_LIBRARIES} ${OPENEXR_LIBRARIES} ${ILMBASE_LIBRARIES} ${TBB_LIBRARIES} ${ZLIB_LIBRARY} )
include_directories(. ${CMAKE_CURRENT_SOURCE_DIR}/../ ${Boost_INCLUDE_DIRS} ${ILMBASE_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR} ${TBB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS} ${OPENEXR_LIBRARY_DIRS} ${TBB_INCLUDE_DIRS})
add_definitions(-DNOMINMAX -D__TBB_NO_IMPLICIT_LINKAGE -DOPENVDB_STATICLIB -DOPENVDB_OPENEXR_STATICLIB)
if(WITH_BLOSC)
add_definitions(-DOPENVDB_USE_BLOSC)
include_directories(${BLOSC_INCLUDE_DIRS})
link_directories(${BLOSC_LIBRARY_DIRS})
endif()
if(WITH_LOGC4PLUS)
add_definitions(-DOPENVDB_USE_LOG4CPLUS)
include_directories(${LOG4CPLUS_INCLUDE_DIRS})
link_directories(${LOG4CPLUS_LIBRARY_DIRS})
endif()
if(WITH_OPENVDB_2_ABI)
add_definitions(-DOPENVDB_2_ABI_COMPATIBLE)
endif()
# todo
if(WITH_OPENVDB_USE_GLFW_3)
add_definitions(-DOPENVDB_USE_GLFW_3)
endif()
if(WITH_UNITTEST)
include_directories(${CPPUNIT_INCLUDE_DIRS})
link_directories(${CPPUNIT_LIBRARY_DIRS})
endif()
# --------------------------------------------------------------------------------
set(SRC_FILES
openvdb/openvdb.cc
openvdb/io/Compression.cc
openvdb/io/File.cc
openvdb/io/Queue.cc
openvdb/io/Stream.cc
openvdb/io/TempFile.cc
openvdb/io/GridDescriptor.cc
openvdb/io/Archive.cc
openvdb/metadata/MetaMap.cc
openvdb/metadata/Metadata.cc
openvdb/math/Maps.cc
openvdb/math/Transform.cc
openvdb/math/QuantizedUnitVec.cc
openvdb/math/Proximity.cc
openvdb/Grid.cc
openvdb/util/Formats.cc
openvdb/util/Util.cc
)
set(HEADER_FILES
openvdb/openvdb.h
openvdb/version.h
openvdb/PlatformConfig.h
openvdb/Metadata.h
openvdb/Exceptions.h
openvdb/Grid.h
openvdb/Types.h
openvdb/Platform.h
openvdb/tree/ValueAccessor.h
openvdb/tree/NodeUnion.h
openvdb/tree/Tree.h
openvdb/tree/Iterator.h
openvdb/tree/LeafNodeBool.h
openvdb/tree/TreeIterator.h
openvdb/tree/LeafNode.h
openvdb/tree/NodeManager.h
openvdb/tree/LeafManager.h
openvdb/tree/InternalNode.h
openvdb/tree/RootNode.h
openvdb/tools/PointScatter.h
openvdb/tools/VolumeAdvect.h
openvdb/tools/LevelSetTracker.h
openvdb/tools/Composite.h
openvdb/tools/Morphology.h
openvdb/tools/ValueTransformer.h
openvdb/tools/ChangeBackground.h
openvdb/tools/GridTransformer.h
openvdb/tools/Prune.h
openvdb/tools/LevelSetUtil.h
openvdb/tools/VolumeToSpheres.h
openvdb/tools/LevelSetAdvect.h
openvdb/tools/Statistics.h
openvdb/tools/LevelSetMeasure.h
openvdb/tools/VectorTransformer.h
openvdb/tools/RayIntersector.h
openvdb/tools/PointPartitioner.h
openvdb/tools/Interpolation.h
openvdb/tools/VelocityFields.h
openvdb/tools/PointIndexGrid.h
openvdb/tools/LevelSetRebuild.h
openvdb/tools/Clip.h
openvdb/tools/SignedFloodFill.h
openvdb/tools/MeshToVolume.h
openvdb/tools/Dense.h
openvdb/tools/Filter.h
openvdb/tools/RayTracer.h
openvdb/tools/Diagnostics.h
openvdb/tools/VolumeToMesh.h
openvdb/tools/PoissonSolver.h
openvdb/tools/LevelSetFracture.h
openvdb/tools/GridOperators.h
openvdb/tools/DenseSparseTools.h
openvdb/tools/ParticlesToLevelSet.h
openvdb/tools/LevelSetSphere.h
openvdb/tools/LevelSetMorph.h
openvdb/tools/LevelSetFilter.h
openvdb/tools/PointAdvect.h
openvdb/io/Queue.h
openvdb/io/TempFile.h
openvdb/io/Stream.h
openvdb/io/GridDescriptor.h
openvdb/io/Archive.h
openvdb/io/io.h
openvdb/io/Compression.h
openvdb/io/File.h
openvdb/metadata/StringMetadata.h
openvdb/metadata/MetaMap.h
openvdb/metadata/Metadata.h
openvdb/math/DDA.h
openvdb/math/Vec2.h
openvdb/math/FiniteDifference.h
openvdb/math/Stencils.h
openvdb/math/BBox.h
openvdb/math/Mat3.h
openvdb/math/Mat.h
openvdb/math/Proximity.h
openvdb/math/Ray.h
openvdb/math/ConjGradient.h
openvdb/math/Quat.h
openvdb/math/Vec3.h
openvdb/math/Vec4.h
openvdb/math/QuantizedUnitVec.h
openvdb/math/Coord.h
openvdb/math/Operators.h
openvdb/math/Stats.h
openvdb/math/Math.h
openvdb/math/Tuple.h
openvdb/math/LegacyFrustum.h
openvdb/math/Mat4.h
openvdb/math/Maps.h
openvdb/math/Transform.h
openvdb/util/PagedArray.h
openvdb/util/CpuTimer.h
openvdb/util/Formats.h
openvdb/util/NullInterrupter.h
openvdb/util/Util.h
openvdb/util/Name.h
openvdb/util/MapsUtil.h
openvdb/util/NodeMasks.h
openvdb/util/logging.h
)
add_library(openvdb STATIC ${SRC_FILES} ${HEADER_FILES})
# --------------------------------------------------------------------------------
target_link_libraries(openvdb ${OPENVDB_LIBRARIES})
set(OPENVDB_VERSION_MAJOR 3)
set(OPENVDB_VERSION_MINOR 1)
set(OPENVDB_VERSION_PATCH 0)
set(OPENVDB_VERSION_STRING ${OPENVDB_VERSION_MAJOR}.${OPENVDB_VERSION_MINOR}.${OPENVDB_VERSION_PATCH})
set_target_properties(openvdb PROPERTIES VERSION ${OPENVDB_VERSION_STRING} SOVERSION ${OPENVDB_VERSION_MAJOR})
install(TARGETS openvdb DESTINATION lib)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include COMPONENT Development FILES_MATCHING PATTERN "*.h"
PATTERN ".git" EXCLUDE PATTERN "build" EXCLUDE PATTERN "cmake" EXCLUDE)
# --------------------------------------------------------------------------------
if(WITH_PRINTER)
set(PRINT_SRC
openvdb/cmd/openvdb_print/main.cc
)
add_executable(vdb_print ${PRINT_SRC})
target_link_libraries(vdb_print openvdb)
install(TARGETS vdb_print RUNTIME DESTINATION bin)
endif()
if(WITH_RENDER)
set(RENDER_SRC
openvdb/cmd/openvdb_render/main.cc
)
add_executable(vdb_render ${RENDER_SRC})
target_link_libraries(vdb_render openvdb)
install(TARGETS vdb_render RUNTIME DESTINATION bin)
endif()
# todo
if(WITH_VIEWER)
set(VIEWER_SRC
openvdb/viewer/Camera.cc
openvdb/viewer/ClipBox.cc
openvdb/viewer/Font.cc
openvdb/viewer/RenderModules.cc
openvdb/viewer/Viewer.cc
openvdb/viewer/Camera.h
openvdb/viewer/ClipBox.h
openvdb/viewer/Font.h
openvdb/viewer/RenderModules.h
openvdb/viewer/Viewer.h
openvdb/cmd/openvdb_viewer/main.cc
)
include_directories(${GLFW_INCLUDE_DIRS})
link_directories(${GLFW_LIBRARY_DIRS})
add_executable(vdb_viewer ${VIEWER_SRC})
target_link_libraries(vdb_viewer openvdb)
install(TARGETS vdb_viewer RUNTIME DESTINATION bin)
endif()
# todo
if(WITH_PYTHON)
# add_library(pyopenvdb SHARED )
endif()
set(UNITTEST_SRC
openvdb/unittest/main.cc
openvdb/unittest/TestBBox.cc
openvdb/unittest/TestConjGradient.cc
openvdb/unittest/TestCoord.cc
openvdb/unittest/TestCpt.cc
openvdb/unittest/TestCurl.cc
openvdb/unittest/TestDense.cc
openvdb/unittest/TestDenseSparseTools.cc
openvdb/unittest/TestDiagnostics.cc
openvdb/unittest/TestDivergence.cc
openvdb/unittest/TestDoubleMetadata.cc
openvdb/unittest/TestExceptions.cc
openvdb/unittest/TestFile.cc
openvdb/unittest/TestFloatMetadata.cc
openvdb/unittest/TestGradient.cc
openvdb/unittest/TestGrid.cc
openvdb/unittest/TestGridBbox.cc
openvdb/unittest/TestGridDescriptor.cc
openvdb/unittest/TestGridIO.cc
openvdb/unittest/TestGridTransformer.cc
openvdb/unittest/TestInit.cc
openvdb/unittest/TestInt32Metadata.cc
openvdb/unittest/TestInt64Metadata.cc
openvdb/unittest/TestInternalOrigin.cc
openvdb/unittest/TestLaplacian.cc
openvdb/unittest/TestLeaf.cc
openvdb/unittest/TestLeafBool.cc
openvdb/unittest/TestLeafIO.cc
openvdb/unittest/TestLeafOrigin.cc
openvdb/unittest/TestLevelSetRayIntersector.cc
openvdb/unittest/TestLevelSetUtil.cc
openvdb/unittest/TestLinearInterp.cc
openvdb/unittest/TestMaps.cc
openvdb/unittest/TestMat4Metadata.cc
openvdb/unittest/TestMath.cc
openvdb/unittest/TestMeanCurvature.cc
openvdb/unittest/TestMeshToVolume.cc
openvdb/unittest/TestMetadata.cc
openvdb/unittest/TestMetadataIO.cc
openvdb/unittest/TestMetaMap.cc
openvdb/unittest/TestName.cc
openvdb/unittest/TestNodeIterator.cc
openvdb/unittest/TestNodeMask.cc
openvdb/unittest/TestParticlesToLevelSet.cc
openvdb/unittest/TestPointIndexGrid.cc
openvdb/unittest/TestPointPartitioner.cc
openvdb/unittest/TestPoissonSolver.cc
openvdb/unittest/TestPrePostAPI.cc
openvdb/unittest/TestQuadraticInterp.cc
openvdb/unittest/TestQuantizedUnitVec.cc
openvdb/unittest/TestQuat.cc
openvdb/unittest/TestRay.cc
openvdb/unittest/TestStats.cc
openvdb/unittest/TestStream.cc
openvdb/unittest/TestStringMetadata.cc
openvdb/unittest/TestTools.cc
openvdb/unittest/TestTransform.cc
openvdb/unittest/TestTree.cc
openvdb/unittest/TestTreeCombine.cc
openvdb/unittest/TestTreeGetSetValues.cc
openvdb/unittest/TestTreeIterators.cc
openvdb/unittest/TestTreeVisitor.cc
openvdb/unittest/TestUtil.cc
openvdb/unittest/TestValueAccessor.cc
openvdb/unittest/TestVec2Metadata.cc
openvdb/unittest/TestVec3Metadata.cc
openvdb/unittest/TestVolumeRayIntersector.cc
openvdb/unittest/TestVolumeToMesh.cc
)
# todo
if(WITH_UNITTEST)
add_executable(test ${UNITTEST_SRC} ${HEADER_FILES})
target_link_libraries(test openvdb ${CPPUNIT_LIBRARIES})
endif()

View File

@@ -1,11 +0,0 @@
--- _msvccompiler.py.orig 2017-01-17 00:57:48 -0700
+++ _msvccompiler.py 2017-05-20 09:47:26 -0600
@@ -237,7 +237,7 @@
ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib'))
ldflags_debug = [
- '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL'
+ '/nologo', '/INCREMENTAL:NO', '/LTCG'
]
self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']

View File

@@ -0,0 +1,11 @@
--- Makefile.in 2014-11-12 06:59:58.000000000 -0500
+++ Makefile.in 2018-09-17 13:36:10.974086554 -0400
@@ -600,7 +600,7 @@
target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
-toolexeclibdir = @toolexeclibdir@
+toolexeclibdir = $(libdir)
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@

View File

@@ -1,32 +1,11 @@
--- libavutil/common.h 2016-02-14 19:29:42 -0700
+++ libavutil/common.h 2016-03-30 09:50:29 -0600
@@ -99,6 +99,11 @@
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
+//msvc helper
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
/* misc math functions */
#ifdef HAVE_AV_CONFIG_H
--- configure 2016-11-26 03:12:05.000000000 +0100
+++ configure 2017-04-05 03:24:35.000000000 +0200
@@ -1899,7 +1899,6 @@
access
aligned_malloc
arc4random
- clock_gettime
closesocket
CommandLineToArgvW
CoTaskMemFree
@@ -5494,7 +5493,6 @@
check_func access
check_func_headers stdlib.h arc4random
-check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
check_func fcntl
check_func fork
check_func gethrtime
--- a/configure 2018-08-27 13:46:41.071106150 +0200
+++ b/configure 2018-08-27 13:46:28.162765762 +0200
@@ -6013,7 +6013,7 @@
require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
- { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+ { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version "-DOPJ_STATIC $pthreads_extralibs $libm_extralibs" && add_cppflags "-DOPJ_STATIC $pthreads_extralibs $libm_extralibs"; } }
enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
enabled libopus && {
enabled libopus_decoder && {

View File

@@ -0,0 +1,18 @@
diff -NaurBb b/CMakeLists.txt a/CMakeLists.txt
--- b/CMakeLists.txt 2018-05-01 12:45:46 -0600
+++ a/CMakeLists.txt 2018-08-08 13:03:22 -0600
@@ -229,9 +229,12 @@
endif ()
string(REPLACE "/undef " "#undef "
FTCONFIG_H "${FTCONFIG_H}")
- file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
- "${FTCONFIG_H}")
+else()
+ file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
+ FTCONFIG_H)
endif ()
+file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
+ "${FTCONFIG_H}")
# Create the options file

View File

@@ -1,11 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@
set(LLVM_VERSION_MINOR 4)
if (NOT PACKAGE_VERSION)
- set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
+ set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
endif()
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)

View File

@@ -1,12 +0,0 @@
--- a/src/shaders/CMakeLists.txt
+++ b/src/shaders/CMakeLists.txt
@@ -27,7 +27,7 @@ macro (osl_compile oslsrc objlist headers)
message (STATUS "cmd: ${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc ${oslsrc}")
endif ()
add_custom_command (OUTPUT ${osofile}
- COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" ${oslsrc}
+ COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" "-o" ${osofile} ${oslsrc}
MAIN_DEPENDENCY ${oslsrc}
DEPENDS ${${headers}} ${oslsrc} "${CMAKE_CURRENT_BINARY_DIR}/stdosl.h" "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

View File

@@ -1,10 +0,0 @@
--- frontend/main.c 2008-09-22 11:55:09 -0600
+++ frontend/main.c 2016-04-06 15:20:36 -0600
@@ -31,7 +31,6 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#define off_t __int64
#else
#include <time.h>
#endif

View File

@@ -1,111 +0,0 @@
Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp 2014-04-11 23:04:44.000000000 +0200
+++ lib/Target/X86/X86ISelLowering.cpp (working copy)
@@ -15493,12 +15493,36 @@
// non-trivial part is impdef of ESP.
if (Subtarget->isTargetWin64()) {
+ const char *StackProbeSymbol =
+ Subtarget->isTargetCygMing() ? "___chkstk" : "__chkstk";
+
+ MachineInstrBuilder MIB;
+
+ if (getTargetMachine().getCodeModel() == CodeModel::Large) {
+ // For large code model we need to do indirect call to __chkstk.
+
+ // R11 will be used to contain the address of __chkstk.
+ // R11 is a volotiale register and assumed to be destoyed by the callee,
+ // so there is no need to save and restore it.
+ BuildMI(*BB, MI, DL, TII->get(X86::MOV64ri), X86::R11)
+ .addExternalSymbol(StackProbeSymbol);
+ // Create a call to __chkstk function which address contained in R11.
+ MIB = BuildMI(*BB, MI, DL, TII->get(X86::CALL64r))
+ .addReg(X86::R11, RegState::Kill);
+
+ } else {
+
+ // For non-large code model we can do direct call to __chkstk.
+
+ MIB = BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
+ .addExternalSymbol(StackProbeSymbol);
+ }
+
if (Subtarget->isTargetCygMing()) {
// ___chkstk(Mingw64):
// Clobbers R10, R11, RAX and EFLAGS.
// Updates RSP.
- BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
- .addExternalSymbol("___chkstk")
+ MIB
.addReg(X86::RAX, RegState::Implicit)
.addReg(X86::RSP, RegState::Implicit)
.addReg(X86::RAX, RegState::Define | RegState::Implicit)
@@ -15507,8 +15531,7 @@
} else {
// __chkstk(MSVCRT): does not update stack pointer.
// Clobbers R10, R11 and EFLAGS.
- BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
- .addExternalSymbol("__chkstk")
+ MIB
.addReg(X86::RAX, RegState::Implicit)
.addReg(X86::EFLAGS, RegState::Define | RegState::Implicit);
// RAX has the offset to be subtracted from RSP.
Index: lib/Target/X86/X86FrameLowering.cpp
===================================================================
--- lib/Target/X86/X86FrameLowering.cpp 2013-10-24 01:37:01.000000000 +0200
+++ lib/Target/X86/X86FrameLowering.cpp (working copy)
@@ -635,25 +635,49 @@
.addReg(X86::EAX, RegState::Kill)
.setMIFlag(MachineInstr::FrameSetup);
}
+
+ MachineInstrBuilder MIB;
if (Is64Bit) {
+
// Handle the 64-bit Windows ABI case where we need to call __chkstk.
// Function prologue is responsible for adjusting the stack pointer.
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::RAX)
.addImm(NumBytes)
.setMIFlag(MachineInstr::FrameSetup);
+
+ if (TM.getCodeModel() == CodeModel::Large) {
+ // For large code model we need to do indirect call to __chkstk.
+
+
+ // R11 will be used to contain the address of __chkstk.
+ // R11 is a volotiale register and assumed to be destoyed by the callee,
+ // so there is no need to save and restore it.
+ BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::R11)
+ .addExternalSymbol(StackProbeSymbol);
+ // Create a call to __chkstk function which address contained in R11.
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::CALL64r))
+ .addReg(X86::R11, RegState::Kill);
+ } else {
+
+ // For non-large code model we can do direct call to __chkstk.
+
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::W64ALLOCA))
+ .addExternalSymbol(StackProbeSymbol);
+ }
} else {
// Allocate NumBytes-4 bytes on stack in case of isEAXAlive.
// We'll also use 4 already allocated bytes for EAX.
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX)
.addImm(isEAXAlive ? NumBytes - 4 : NumBytes)
.setMIFlag(MachineInstr::FrameSetup);
+
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::CALLpcrel32))
+ .addExternalSymbol(StackProbeSymbol);
}
- BuildMI(MBB, MBBI, DL,
- TII.get(Is64Bit ? X86::W64ALLOCA : X86::CALLpcrel32))
- .addExternalSymbol(StackProbeSymbol)
- .addReg(StackPtr, RegState::Define | RegState::Implicit)
+
+ MIB.addReg(StackPtr, RegState::Define | RegState::Implicit)
.addReg(X86::EFLAGS, RegState::Define | RegState::Implicit)
.setMIFlag(MachineInstr::FrameSetup);

View File

@@ -1,23 +0,0 @@
diff -Naur numpy-1.11.1/numpy/distutils/ccompiler.py numpy-1.11.1/numpy/distutils/ccompiler.py
--- numpy-1.11.1/numpy/distutils/ccompiler.py 2016-06-25 08:38:34 -0600
+++ numpy-1.11.1/numpy/distutils/ccompiler.py 2016-08-04 12:33:43 -0600
@@ -29,6 +29,7 @@
# Using customized CCompiler.spawn.
def CCompiler_spawn(self, cmd, display=None):
+ cmd = quote_args(cmd)
"""
Execute a command in a sub-process.
diff -Naur numpy-1.11.1/numpy/distutils/misc_util.py numpy-1.11.1/numpy/distutils/misc_util.py
--- numpy-1.11.1/numpy/distutils/misc_util.py 2016-06-25 08:38:34 -0600
+++ numpy-1.11.1/numpy/distutils/misc_util.py 2016-08-04 12:34:56 -0600
@@ -116,7 +116,7 @@
args = list(args)
for i in range(len(args)):
a = args[i]
- if ' ' in a and a[0] not in '"\'':
+ if ' ' in a and a[0] not in '"\'' and a[len(a)-1] not in '"\'':
args[i] = '"%s"' % (a)
return args

View File

@@ -0,0 +1,13 @@
diff -Naur external_openal_original/CMakeLists.txt external_openal/CMakeLists.txt
--- external_openal_original/CMakeLists.txt 2016-01-24 20:12:39 -0700
+++ external_openal/CMakeLists.txt 2018-06-02 12:16:52 -0600
@@ -885,7 +885,8 @@
OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF)
IF(HAVE_WINDOWS_H)
# Check MMSystem backend
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502)
+ set(CMAKE_REQUIRED_FLAGS "-D_WIN32_WINNT=0x0502")
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
IF(HAVE_MMSYSTEM_H)
CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM)
IF(HAVE_LIBWINMM)

View File

@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fc9be5..5112ce6 100644
index 95abbe2..4f14f30 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -254,11 +254,11 @@
@@ -254,11 +254,11 @@ if(USE_STATIC_MSVC_RUNTIME)
endif()
#adding PCRE
@@ -16,10 +16,10 @@ index 3fc9be5..5112ce6 100644
message("WARNING: Native PCRE not found, taking PCRE from ./Externals")
add_definitions(-DPCRE_STATIC)
add_subdirectory(${EXTERNAL_LIBRARIES}/pcre)
diff --git a/DAEValidator/library/include/no_warning_begin.orig b/DAEValidator/library/include/no_warning_begin
index 3fc9be5..5112ce6 100644
--- a/DAEValidator/library/include/no_warning_begin.orig 2017-05-31 16:56:39 -0600
+++ b/DAEValidator/library/include/no_warning_begin 2017-06-07 10:18:45 -0600
diff --git a/DAEValidator/library/include/no_warning_begin b/DAEValidator/library/include/no_warning_begin
index 7a69c32..defb315 100644
--- a/DAEValidator/library/include/no_warning_begin
+++ b/DAEValidator/library/include/no_warning_begin
@@ -2,6 +2,9 @@
#if defined(_WIN32)
# pragma warning(push)
@@ -30,3 +30,16 @@ index 3fc9be5..5112ce6 100644
# if defined(_MSC_VER) && defined(_DEBUG)
# pragma warning(disable:4548)
# endif
diff --git a/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp b/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
index 1f9a3ee..d151e9a 100644
--- a/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
+++ b/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
@@ -1553,7 +1553,7 @@ namespace GeneratedSaxParser
#if defined(COLLADABU_OS_WIN) && !defined(__MINGW32__)
return _isnan( value ) ? true : false;
#else
-#ifdef isnan
+#if defined(isnan) || defined(__APPLE__)
return isnan( value );
#else
return std::isnan(value);

View File

@@ -1,21 +1,33 @@
diff -ru ./CMakeLists.txt ./CMakeLists.txt
--- ./CMakeLists.txt 2014-09-11 21:08:18.000000000 +0200
+++ ./CMakeLists.txt 2016-05-15 17:17:01.000000000 +0200
@@ -186,7 +186,7 @@
PATCH_COMMAND patch -f -p1 < ${CMAKE_SOURCE_DIR}/ext/tinyxml_${TINYXML_VERSION}.patch
BINARY_DIR ext/build/tinyxml
INSTALL_DIR ext/dist
- CMAKE_ARGS ${TINYXML_CMAKE_ARGS}
+ CMAKE_ARGS ${TINYXML_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
if(WIN32)
set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib)
@@ -254,7 +254,7 @@
BINARY_DIR ext/build/yaml-cpp
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/yaml-cpp-${YAML_CPP_VERSION}.patch
INSTALL_DIR ext/dist
- CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS}
+ CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include)
set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib)
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 1eb691b..cff9bd8 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -23,8 +23,6 @@ if(WIN32)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX")
endif()
-else()
- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror")
endif()
# SHARED
--- a/CMakeLists.txt 2018-09-10 22:15:29.000000000 +0200
+++ b/CMakeLists.txt 2018-09-10 22:17:40.000000000 +0200
@@ -229,7 +229,7 @@
PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-whitespace ${TINYXML_PATCHFILE}
BINARY_DIR ext/build/tinyxml
INSTALL_DIR ext/dist
- CMAKE_ARGS ${TINYXML_CMAKE_ARGS}
+ CMAKE_ARGS ${TINYXML_CMAKE_ARGS} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
if(WIN32)
set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib)
@@ -343,7 +343,7 @@
PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-whitespace ${YAML_CPP_PATCHFILE}
BINARY_DIR ext/build/yaml-cpp
INSTALL_DIR ext/dist
- CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS}
+ CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include)
set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib)

View File

@@ -0,0 +1,51 @@
diff -Naur external_opencolorio/CMakeLists.txt external_opencolorio.patched/CMakeLists.txt
--- external_opencolorio/CMakeLists.txt 2018-01-04 18:38:27 -0700
+++ external_opencolorio.patched/CMakeLists.txt 2018-08-15 11:46:53 -0600
@@ -251,25 +251,30 @@
if(USE_EXTERNAL_YAML)
# Set minimum yaml version for non-patched sources.
set(YAML_VERSION_MIN "0.3.0")
- include(FindPkgConfig)
- pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp)
- find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h
- HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} )
- find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp
- HINTS ${PC_YAML_CPP_LIBRARY_DIRS} )
- set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY})
- set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
- set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION})
+ if(NOT WIN32)
+ include(FindPkgConfig)
+ pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp)
+ find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h
+ HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} )
+ find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp
+ HINTS ${PC_YAML_CPP_LIBRARY_DIRS} )
+ set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY})
+ set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
+ set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION})
- if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN})
- message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.")
- endif()
-
- find_package_handle_standard_args(yaml-cpp
- REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS )
- set(YAML_CPP_FOUND ${YAML-CPP_FOUND})
- mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND)
+ if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN})
+ message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.")
+ endif()
+ find_package_handle_standard_args(yaml-cpp
+ REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS )
+ set(YAML_CPP_FOUND ${YAML-CPP_FOUND})
+ mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND)
+ else()
+ set(EXTERNAL_INCLUDE_DIRS ${EXTERNAL_INCLUDE_DIRS} ${INC_1})
+ set(EXTERNAL_INCLUDE_DIRS ${EXTERNAL_INCLUDE_DIRS} ${INC_2})
+ message("INCLUDE DIRS = i:${EXTERNAL_INCLUDE_DIRS} |1:${INC_1} |2:${INC_2}")
+ endif()
if(YAML_CPP_FOUND)
if(YAML_CPP_VERSION VERSION_GREATER "0.5.0")
# Need to also get the boost headers here, as yaml-cpp 0.5.0+ requires them.

View File

@@ -1,33 +0,0 @@
--- IlmImf/CMakeLists.txt 2014-08-10 06:23:56.000000000 +0200
+++ IlmImf/CMakeLists.txt 2017-01-08 04:06:04.931723800 +0100
@@ -8,8 +8,8 @@
TARGET_LINK_LIBRARIES ( b44ExpLogTable
Half
- Iex${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB}
)
@@ -25,8 +25,8 @@
TARGET_LINK_LIBRARIES ( dwaLookups
Half
- Iex${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB}
)
@@ -138,9 +138,9 @@
TARGET_LINK_LIBRARIES ( IlmImf
Half
- Iex${ILMBASE_LIBSUFFIX}
Imath${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB} ${ZLIB_LIBRARIES}
)

View File

@@ -0,0 +1,22 @@
diff -Naur external_openimageio.orig/src/cmake/compiler.cmake external_openimageio/src/cmake/compiler.cmake
--- external_openimageio.orig/src/cmake/compiler.cmake 2018-07-31 23:45:19 -0600
+++ external_openimageio/src/cmake/compiler.cmake 2018-08-16 12:50:12 -0600
@@ -152,6 +152,7 @@
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-DJAS_WIN_MSVC_BUILD)
+ add_definitions (-DOPJ_STATIC)
endif (MSVC)
# Use ccache if found
--- external_openimageio.orig/CMakeLists.txt 2018-07-31 23:45:19 -0600
+++ external_openimageio/CMakeLists.txt 2018-08-17 15:22:56 -0600
@@ -169,7 +169,7 @@
add_subdirectory (src/iinfo)
add_subdirectory (src/maketx)
add_subdirectory (src/oiiotool)
- add_subdirectory (src/testtex)
+# add_subdirectory (src/testtex)
add_subdirectory (src/iv)
endif ()

View File

@@ -1,11 +0,0 @@
--- CMakeLists.txt 2016-11-01 01:03:44 -0600
+++ CMakeLists.txt 2016-12-01 09:20:12 -0700
@@ -454,7 +454,7 @@
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-DJAS_WIN_MSVC_BUILD)
- add_definitions (-DOPENEXR_DLL)
+ add_definitions (-DOPJ_STATIC)
if (LINKSTATIC)
add_definitions (-DBoost_USE_STATIC_LIBS=1)
else ()

View File

@@ -1,16 +1,13 @@
opensubdiv/osd/d3d11VertexBuffer.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opensubdiv/osd/d3d11VertexBuffer.cpp b/opensubdiv/osd/d3d11VertexBuffer.cpp
index 603cbf4..07e7e0a 100644
--- a/opensubdiv/osd/d3d11VertexBuffer.cpp
+++ b/opensubdiv/osd/d3d11VertexBuffer.cpp
@@ -81,7 +81,7 @@ D3D11VertexBuffer::UpdateData(const float *src, int startVertex, int numVertices
diff --git a/opensubdiv/far/topologyRefiner.cpp b/opensubdiv/far/topologyRefiner.cpp
index 3754b36e..7fe42bcc 100644
--- a/opensubdiv/far/topologyRefiner.cpp
+++ b/opensubdiv/far/topologyRefiner.cpp
@@ -263,7 +263,7 @@ namespace internal {
bool IsEmpty() const { return *((int_type*)this) == 0; }
deviceContext->Unmap(_uploadBuffer, 0);
FeatureMask() { Clear(); }
- FeatureMask(Options const & options, Sdc::SchemeType sType) { InitializeFeatures(options, sType); }
+ FeatureMask(Options const & options, Sdc::SchemeType sType) { Clear(); InitializeFeatures(options, sType); }
- D3D11_BOX srcBox = { 0, 0, 0, size, 1, 1 };
+ D3D11_BOX srcBox = { 0, 0, 0, (UINT) size, 1, 1 };
deviceContext->CopySubresourceRegion(_buffer, 0, 0, 0, 0,
_uploadBuffer, 0, &srcBox);
}
// These are the two primary methods intended for use -- intialization via a set of Options
// and reduction of the subsequent feature set (which presumes prior initialization with the

View File

@@ -1,11 +1,102 @@
diff -Naur k:\BlenderDev\lib\win64_vc12_Harvest\openVDB\/include/openvdb/math/Coord.h .\openVDB/include/openvdb/math/Coord.h
--- k:\BlenderDev\lib\win64_vc12_Harvest\openVDB\/include/openvdb/math/Coord.h 2016-03-30 15:09:49 -0600
+++ .\openVDB/include/openvdb/math/Coord.h 2016-04-01 06:53:47 -0600
@@ -34,6 +34,7 @@
diff -Naur openvdb.orig/openvdb/CMakeLists.txt openvdb/openvdb/CMakeLists.txt
--- openvdb.orig/openvdb/CMakeLists.txt 2018-04-10 12:22:17 -0600
+++ openvdb/openvdb/CMakeLists.txt 2018-08-15 19:04:52 -0600
@@ -82,6 +82,9 @@
IF (WIN32 AND OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING)
ADD_DEFINITIONS ( -DBOOST_ALL_NO_LIB )
ENDIF ()
+if(WIN32)
+ADD_DEFINITIONS ( -D__TBB_NO_IMPLICIT_LINKAGE )
+endif()
FIND_PACKAGE ( Blosc REQUIRED )
FIND_PACKAGE ( TBB REQUIRED )
@@ -195,6 +198,7 @@
${Ilmbase_HALF_LIBRARY}
${ZLIB_LIBRARY}
${BLOSC_blosc_LIBRARY}
+ ${EXTRA_LIBS}
)
IF (WIN32)
@@ -225,13 +228,16 @@
${VDB_PRINT_SOURCE_FILES}
)
+if(NOT WIN32)
+ set(EXTRA_LIBS m stdc++ dl)
+endif()
+
TARGET_LINK_LIBRARIES ( vdb_print
openvdb_shared
${CMAKE_THREAD_LIBS_INIT}
${BLOSC_blosc_LIBRARY}
- m
- stdc++
- )
+ ${EXTRA_LIBS}
+)
SET ( VDB_RENDER_SOURCE_FILES cmd/openvdb_render/main.cc )
SET_SOURCE_FILES_PROPERTIES ( ${VDB_RENDER_SOURCE_FILES}
@@ -249,8 +255,7 @@
${Openexr_ILMIMF_LIBRARY}
${Ilmbase_ILMTHREAD_LIBRARY}
${Ilmbase_IEX_LIBRARY}
- m
- stdc++
+ ${EXTRA_LIBS}
)
SET ( VDB_VIEW_SOURCE_FILES
@@ -270,7 +270,7 @@
PROPERTIES
COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} -DGL_GLEXT_PROTOTYPES=1"
)
-IF (NOT WIN32)
+IF (FALSE)
ADD_EXECUTABLE ( vdb_view
${VDB_VIEW_SOURCE_FILES}
)
@@ -283,9 +288,8 @@
${GLFW_LINK_LIBRARY}
${GLFW_DEPENDENT_LIBRARIES}
${GLEW_GLEW_LIBRARY}
- m
- stdc++
- )
+ ${EXTRA_LIBS}
+ )
ENDIF ()
SET ( UNITTEST_SOURCE_FILES
@@ -392,8 +396,7 @@
TARGET_LINK_LIBRARIES ( vdb_test
${CPPUnit_cppunit_LIBRARY}
openvdb_shared
- m
- stdc++
+ ${EXTRA_LIBS}
)
ADD_TEST ( vdb_unit_test vdb_test )
@@ -422,7 +422,7 @@
ENDIF ()
# Installation
-IF ( NOT WIN32 )
+IF ( FALSE )
INSTALL ( TARGETS
vdb_view
DESTINATION
diff -Naur openvdb.orig/openvdb/math/Coord.h openvdb/openvdb/math/Coord.h
--- openvdb.orig/openvdb/math/Coord.h 2018-04-10 12:22:17 -0600
+++ openvdb/openvdb/math/Coord.h 2018-08-15 20:32:43 -0600
@@ -35,6 +35,7 @@
#include <array> // for std::array
#include <iostream>
#include <limits>
+#define NOMINMAX
#include <openvdb/Platform.h>
#include "Math.h"
#include "Vec3.h"
+#define NOMINMAX
namespace tbb { class split; } // forward declaration

View File

@@ -1,35 +0,0 @@
--- openvdb/tree/LeafNode.h 2015-10-01 15:55:33 -0600
+++ openvdb/tree/LeafNode.h 2016-03-26 13:12:22 -0600
@@ -70,13 +70,14 @@
typedef boost::shared_ptr<LeafNode> Ptr;
typedef util::NodeMask<Log2Dim> NodeMaskType;
- static const Index
- LOG2DIM = Log2Dim, // needed by parent nodes
- TOTAL = Log2Dim, // needed by parent nodes
- DIM = 1 << TOTAL, // dimension along one coordinate direction
- NUM_VALUES = 1 << 3 * Log2Dim,
- NUM_VOXELS = NUM_VALUES, // total number of voxels represented by this node
- SIZE = NUM_VALUES,
+ static const Index
+ LOG2DIM = Log2Dim, // needed by parent nodes
+ TOTAL = Log2Dim, // needed by parent nodes
+ DIM = 1 << TOTAL, // dimension along one coordinate direction
+ NUM_VALUES = 1 << 3 * Log2Dim,
+ NUM_VOXELS = NUM_VALUES; // total number of voxels represented by this node
+ static const Index
+ SIZE = NUM_VALUES,
LEVEL = 0; // level 0 = leaf
/// @brief ValueConverter<T>::Type is the type of a LeafNode having the same
--- openvdb/PlatformConfig.h 2016-03-30 15:09:49 -0600
+++ openvdb/PlatformConfig.h 2016-04-01 07:00:38 -0600
@@ -47,7 +47,7 @@
#if !defined(OPENVDB_OPENEXR_STATICLIB) && !defined(OPENEXR_DLL)
#define OPENEXR_DLL
#endif
-
+ #define NOMINMAX
#endif // _WIN32
#endif // OPENVDB_PLATFORMCONFIG_HAS_BEEN_INCLUDED

View File

@@ -1,6 +1,6 @@
diff -Naur osl/src/external_osl/src/cmake/flexbison.cmake osl_bak/src/external_osl/src/cmake/flexbison.cmake
--- osl/src/external_osl//src/cmake/flexbison.cmake 2016-01-29 11:15:22 -0700
+++ osl_bak/src/external_osl/src/cmake/flexbison.cmake 2016-02-29 21:26:26 -0700
diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake external_osl/src/cmake/flexbison.cmake
--- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600
+++ external_osl/src/cmake/flexbison.cmake 2018-08-23 15:42:27 -0600
@@ -77,7 +77,7 @@
DEPENDS ${${compiler_headers}}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
@@ -10,3 +10,65 @@ diff -Naur osl/src/external_osl/src/cmake/flexbison.cmake osl_bak/src/external_o
MAIN_DEPENDENCY ${flexsrc}
DEPENDS ${${compiler_headers}}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej external_osl/src/cmake/flexbison.cmake.rej
--- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej 1969-12-31 17:00:00 -0700
+++ external_osl/src/cmake/flexbison.cmake.rej 2018-08-24 17:42:11 -0600
@@ -0,0 +1,11 @@
+--- src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600
++++ src/cmake/flexbison.cmake 2018-08-24 10:24:03 -0600
+@@ -77,7 +77,7 @@
+ DEPENDS ${${compiler_headers}}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
+ ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx}
+- COMMAND ${FLEX_EXECUTABLE} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
++ COMMAND ${FLEX_EXECUTABLE} ${FLEX_EXTRA_OPTIONS} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
+ MAIN_DEPENDENCY ${flexsrc}
+ DEPENDS ${${compiler_headers}}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h external_osl/src/include/OSL/llvm_util.h
--- OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h 2018-05-01 16:39:02 -0600
+++ external_osl/src/include/OSL/llvm_util.h 2018-08-25 14:05:00 -0600
@@ -33,6 +33,8 @@
#include <vector>
+#define OSL_HAS_BLENDER_CLEANUP_FIX
+
#ifdef LLVM_NAMESPACE
namespace llvm = LLVM_NAMESPACE;
#endif
@@ -487,6 +489,7 @@
std::string func_name (llvm::Function *f);
static size_t total_jit_memory_held ();
+ static void Cleanup ();
private:
class MemoryManager;
diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/oslnoise.h external_osl/src/include/OSL/oslnoise.h
--- OpenShadingLanguage-Release-1.9.9/src/include/OSL/oslnoise.h 2018-05-01 16:39:02 -0600
+++ external_osl/src/include/OSL/oslnoise.h 2018-08-24 17:42:11 -0600
@@ -762,7 +762,7 @@
// packed into a float4. We assume T is float and VECTYPE is float4,
// but it also works if T is Dual2<float> and VECTYPE is Dual2<float4>.
template<typename T, typename VECTYPE>
-OIIO_FORCEINLINE T bilerp (VECTYPE abcd, T u, T v) {
+OIIO_FORCEINLINE T bilerp (VECTYPE& abcd, T u, T v) {
VECTYPE xx = OIIO::lerp (abcd, OIIO::simd::shuffle<1,1,3,3>(abcd), u);
return OIIO::simd::extract<0>(OIIO::lerp (xx,OIIO::simd::shuffle<2>(xx), v));
}
diff -Naur OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp external_osl/src/liboslexec/llvm_util.cpp
--- OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp 2018-05-01 16:39:02 -0600
+++ external_osl/src/liboslexec/llvm_util.cpp 2018-08-25 14:04:27 -0600
@@ -140,7 +140,10 @@
};
-
+void LLVM_Util::Cleanup ()
+{
+ jitmm_hold.clear();
+}
size_t
LLVM_Util::total_jit_memory_held ()

View File

@@ -1,14 +0,0 @@
--- CMakeLists.txt 2016-10-31 16:48:19 -0600
+++ CMakeLists.txt 2017-04-10 10:38:48 -0600
@@ -269,6 +269,11 @@
add_definitions ("-DOIIO_STATIC_BUILD=1")
endif ()
+set (OIIO_NOSIMD OFF CACHE BOOL "Disable simd support in oiio")
+if (OIIO_NOSIMD)
+ add_definitions ("-DOIIO_NO_SSE=1")
+endif ()
+
if (OSL_NO_DEFAULT_TEXTURESYSTEM)
add_definitions ("-DOSL_NO_DEFAULT_TEXTURESYSTEM=1")
endif ()

View File

@@ -1,12 +0,0 @@
--- pyshellext.cpp.orig 2017-01-17 00:57:53 -0700
+++ pyshellext.cpp 2017-05-20 15:21:51 -0600
@@ -13,6 +13,9 @@
#include <strsafe.h>
#include "pyshellext_h.h"
+#if _MSC_VER < 1900
+#include "pyshellext_i.c"
+#endif
#define DDWM_UPDATEWINDOW (WM_USER+3)

View File

@@ -1,82 +0,0 @@
--- Include/Python.h 2017-07-07 21:33:27 -0600
+++ Include/Python.h 2017-09-19 10:36:10 -0600
@@ -2,6 +2,10 @@
#define Py_PYTHON_H
/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
+#if _MSC_VER < 1900
+#define inline __inline
+#endif
+
/* Include nearly all Python header files */
#include "patchlevel.h"
--- Include/pydtrace.h 2017-07-07 21:33:27 -0600
+++ Include/pydtrace.h 2017-09-19 10:32:31 -0600
@@ -2,6 +2,11 @@
#ifndef Py_DTRACE_H
#define Py_DTRACE_H
+
+#if _MSC_VER < 1900
+#define inline __inline
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
--- Modules/_blake2/impl/blake2.h 2017-07-07 21:33:27 -0600
+++ Modules/_blake2/impl/blake2.h 2017-09-19 10:22:41 -0600
@@ -19,6 +19,10 @@
#include <stddef.h>
#include <stdint.h>
+#if _MSC_VER < 1900
+#define inline __inline
+#endif
+
#ifdef BLAKE2_NO_INLINE
#define BLAKE2_LOCAL_INLINE(type) static type
#endif
--- pcbuild/build.bat 2016-05-21 09:53:55 -0600
+++ pcbuild/build.bat 2016-05-21 09:56:16 -0600
@@ -59,6 +59,7 @@
if "%~1"=="-h" goto Usage
if "%~1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
if "%~1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
+if "%~1"=="-k" (set vs_toolset=%2) & shift & shift & goto CheckOpts
if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts
if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts
if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts
@@ -120,7 +120,7 @@
:Kill
echo on
-%MSBUILD% "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^
+%MSBUILD% "%dir%\pythoncore.vcxproj" /t:KillPython %verbose% /p:PlatformToolset=%vs_toolset%^
/p:Configuration=%conf% /p:Platform=%platf%^
/p:KillPython=true
@@ -130,7 +130,7 @@
rem batch is, shall we say, "lackluster"
echo on
%MSBUILD% "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^
- /p:Configuration=%conf% /p:Platform=%platf%^
+ /p:Configuration=%conf% /p:Platform=%platf% /p:PlatformToolset=%vs_toolset%^
/p:IncludeExternals=%IncludeExternals%^
/p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^
/p:UseTestMarker=%UseTestMarker%^
--- pcbuild/sqlite3.vcxproj 2015-12-06 18:39:10 -0700
+++ pcbuild/sqlite3.vcxproj 2016-11-02 09:25:56 -0600
@@ -43,7 +43,7 @@
<Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

View File

@@ -1,25 +0,0 @@
--- pyconfig.h.in 2017-09-19 14:41:01.000000000 +0300
+++ pyconfig.h.in 2017-09-19 14:43:18.000000000 +0300
@@ -119,12 +119,6 @@
/* Define to 1 if you have the `clock' function. */
#undef HAVE_CLOCK
-/* Define to 1 if you have the `clock_getres' function. */
-#undef HAVE_CLOCK_GETRES
-
-/* Define to 1 if you have the `clock_gettime' function. */
-#undef HAVE_CLOCK_GETTIME
-
/* Define to 1 if you have the `clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
@@ -369,9 +363,6 @@
/* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
#undef HAVE_GETC_UNLOCKED
-/* Define to 1 if you have the `getentropy' function. */
-#undef HAVE_GETENTROPY
-
/* Define to 1 if you have the `getgrouplist' function. */
#undef HAVE_GETGROUPLIST

View File

@@ -0,0 +1,38 @@
diff --git a/setup.py.orig b/setup.py
index a97a755..07ce853 100644
--- a/setup.py.orig
+++ b/setup.py
@@ -1422,13 +1422,13 @@ class PyBuildExt(build_ext):
version = line.split()[2]
break
if version >= version_req:
- if (self.compiler.find_library_file(lib_dirs, 'z')):
+ if (self.compiler.find_library_file(lib_dirs, 'z_pic')):
if host_platform == "darwin":
zlib_extra_link_args = ('-Wl,-search_paths_first',)
else:
zlib_extra_link_args = ()
exts.append( Extension('zlib', ['zlibmodule.c'],
- libraries = ['z'],
+ libraries = ['z_pic'],
extra_link_args = zlib_extra_link_args))
have_zlib = True
else:
@@ -1442,7 +1442,7 @@ class PyBuildExt(build_ext):
# crc32 if we have it. Otherwise binascii uses its own.
if have_zlib:
extra_compile_args = ['-DUSE_ZLIB_CRC32']
- libraries = ['z']
+ libraries = ['z_pic']
extra_link_args = zlib_extra_link_args
else:
extra_compile_args = []
@@ -1991,7 +1991,7 @@ class PyBuildExt(build_ext):
print('Header file {} does not exist'.format(ffi_h))
ffi_lib = None
if ffi_inc is not None:
- for lib_name in ('ffi', 'ffi_pic'):
+ for lib_name in ('ffi_pic', ):
if (self.compiler.find_library_file(lib_dirs, lib_name)):
ffi_lib = lib_name
break

View File

@@ -1,29 +0,0 @@
--- _msvccompiler.py.orig 2017-05-20 19:31:45 -0600
+++ _msvccompiler.py 2017-06-10 10:05:38 -0600
@@ -222,9 +222,9 @@
# use /MT[d] to build statically, then switch from libucrt[d].lib to ucrt[d].lib
# later to dynamically link to ucrtbase but not vcruntime.
self.compile_options = [
- '/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG'
+ '/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG' , '/MD'
]
- self.compile_options.append('/MD' if self._vcruntime_redist else '/MT')
+ #self.compile_options.append('/MD' if self._vcruntime_redist else '/MT')
self.compile_options_debug = [
'/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG'
@@ -233,11 +233,11 @@
ldflags = [
'/nologo', '/INCREMENTAL:NO', '/LTCG'
]
- if not self._vcruntime_redist:
- ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib'))
+ #if not self._vcruntime_redist:
+ # ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib'))
ldflags_debug = [
- '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL'
+ '/nologo', '/INCREMENTAL:NO', '/LTCG'
]
self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']

View File

@@ -1,54 +0,0 @@
--- configure.orig 2012-01-22 19:06:43 -0700
+++ configure 2016-04-06 20:00:50 -0600
@@ -16492,10 +16492,10 @@
HAVE_ORC=yes
fi
if test "x${HAVE_ORC}" != xyes ; then
- as_fn_error $? "orc-0.4 >= $ORC_VER is required" "$LINENO" 5
+ $as_echo "orc-0.4 >= $ORC_VER is required"
fi
SCHRO_PKG_DEPS="$SCHRO_PKG_DEPS orc-0.4 >= $ORC_VER"
-ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
+#ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
if test "x$cross_compiling" != xyes; then
HAVE_ORCC_TRUE=
--- Makefile.in 2012-01-22 18:06:42 -0700
+++ Makefile.in 2016-04-06 20:30:09 -0600
@@ -291,7 +291,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = schroedinger doc tools testsuite
+SUBDIRS = schroedinger doc tools
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
DIST_SUBDIRS = schroedinger doc tools testsuite
EXTRA_DIST = COPYING COPYING.GPL COPYING.LGPL COPYING.MIT COPYING.MPL \
--- schroedinger.pc.in 2011-03-21 17:08:39 -0600
+++ schroedinger.pc.in 2016-04-08 13:30:42 -0600
@@ -7,9 +7,9 @@
Name: schroedinger-@SCHRO_MAJORMINOR@
Description: Dirac codec library
-Requires.private: @SCHRO_PKG_DEPS@
+Requires: @SCHRO_PKG_DEPS@
Version: @VERSION@
-Libs: -L${libdir} -lschroedinger-@SCHRO_MAJORMINOR@
+Libs: -L${libdir} -lschroedinger-@SCHRO_MAJORMINOR@ -lorc-0.4
Libs.private: @PTHREAD_LIBS@ @LIBM@
Cflags: -I${includedir}
--- ./schroedinger/schrodecoder.c 2012-01-23 00:38:57.000000000 +0100
+++ ./schroedinger/schrodecoder.c 2016-05-15 06:07:24.000000000 +0200
@@ -70,8 +70,8 @@
};
-int _schro_decode_prediction_only;
-int _schro_telemetry;
+int _schro_decode_prediction_only = 0;
+int _schro_telemetry = 0;
static void schro_decoder_x_decode_motion (SchroAsyncStage * stage);
static void schro_decoder_x_render_motion (SchroAsyncStage * stage);

View File

@@ -1,33 +1,4 @@
diff -ru /Users/brecht/dev/lib/deps/Downloads/SDL2-2.0.4/src/video/SDL_video.c ./src/video/SDL_video.c
--- /Users/brecht/dev/lib/deps/Downloads/SDL2-2.0.4/src/video/SDL_video.c 2016-01-02 20:56:31.000000000 +0100
+++ ./src/video/SDL_video.c 2016-05-15 02:58:27.000000000 +0200
@@ -137,7 +137,7 @@
#define FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN)
-#ifdef __MACOSX__
+#if SDL_VIDEO_DRIVER_COCOA
/* Support for Mac OS X fullscreen spaces */
extern SDL_bool Cocoa_IsWindowInFullscreenSpace(SDL_Window * window);
extern SDL_bool Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state);
@@ -1141,7 +1141,7 @@
if ( window->is_hiding && fullscreen )
return 0;
-#ifdef __MACOSX__
+#if SDL_VIDEO_DRIVER_COCOA
/* if the window is going away and no resolution change is necessary,
do nothing, or else we may trigger an ugly double-transition
*/
@@ -2365,7 +2365,7 @@
return SDL_FALSE;
}
-#ifdef __MACOSX__
+#if SDL_VIDEO_DRIVER_COCOA
if (Cocoa_IsWindowInFullscreenSpace(window)) {
return SDL_FALSE;
}
diff -ru ./src/video/SDL_video.c ./src/video/SDL_video.c
--- CMakeLists.txt.old 2016-01-02 12:56:31 -0700
+++ CMakeLists.txt 2016-10-03 11:24:24 -0600
@@ -609,7 +609,7 @@
@@ -39,12 +10,23 @@ diff -ru /Users/brecht/dev/lib/deps/Downloads/SDL2-2.0.4/src/video/SDL_video.c .
if(HAVE_LIBICONV)
list(APPEND EXTRA_LIBS iconv)
set(HAVE_ICONV 1)
@@ -1455,7 +1455,7 @@
set(_INSTALL_LIBS "SDL2main")
--- src/video/SDL_video.c 2018-09-10 23:27:57.000000000 +0200
+++ src/video/SDL_video.c 2018-09-10 23:28:09.000000000 +0200
@@ -1176,7 +1176,7 @@
return 0;
}
if(SDL_SHARED)
- add_library(SDL2 SHARED ${SOURCE_FILES})
+ add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
if(UNIX)
set_target_properties(SDL2 PROPERTIES
VERSION ${LT_VERSION}
-#ifdef __MACOSX__
+#if defined(__MACOSX__) && SDL_VIDEO_DRIVER_COCOA
/* if the window is going away and no resolution change is necessary,
do nothing, or else we may trigger an ugly double-transition
*/
@@ -2563,7 +2563,7 @@
return SDL_FALSE;
}
-#ifdef __MACOSX__
+#if defined(__MACOSX__) && SDL_VIDEO_DRIVER_COCOA
if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */
if (Cocoa_IsWindowInFullscreenSpace(window)) {
return SDL_FALSE;

View File

@@ -0,0 +1,34 @@
diff -Naur tinyxml.orig/CMakeLists.txt tinyxml/CMakeLists.txt
--- tinyxml.orig/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800
+++ tinyxml/CMakeLists.txt 2013-06-18 17:10:59.000000000 -0700
@@ -0,0 +1,30 @@
+project(tinyxml)
+
+cmake_minimum_required(VERSION 2.8)
+
+add_library(tinyxml
+ STATIC
+ tinystr.cpp
+ tinyxml.cpp
+ tinyxmlerror.cpp
+ tinyxmlparser.cpp)
+
+set(TINYXML_COMPILE_FLAGS "-DTIXML_USE_STL")
+
+if(UNIX)
+ set(TINYXML_COMPILE_FLAGS "${TINYXML_COMPILE_FLAGS} -fPIC -fvisibility=hidden")
+endif()
+
+if(OCIO_INLINES_HIDDEN AND UNIX)
+ set(TINYXML_COMPILE_FLAGS "${TINYXML_COMPILE_FLAGS} -fvisibility-inlines-hidden")
+endif()
+
+set_target_properties(tinyxml PROPERTIES
+ COMPILE_FLAGS "${TINYXML_COMPILE_FLAGS}")
+
+install(TARGETS
+ tinyxml
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+install(FILES
+ tinyxml.h tinystr.h
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/include)

Some files were not shown because too many files have changed in this diff Show More