1
1

Compare commits

...

4701 Commits

Author SHA1 Message Date
92f4bf8c09 Workspace: better default for ambient light 2018-05-03 09:14:54 +02:00
de37fb0991 Merge branch 'blender2.8' into blender2.8-workbench 2018-05-03 09:03:56 +02:00
262bef5ec8 Workbench: Shadow groups
- A collection has an override for casting shadows. When not set, the
objects in the collection will not cast any shadows.
2018-05-03 09:02:03 +02:00
31f8d05432 Merge branch 'master' into blender2.8 2018-05-03 08:31:38 +02:00
0d6ddd0a1d Cleanup: split out extrude spin/screw
Since these will have their own manipulators,
its more convenient to keep them separate.
2018-05-03 08:20:29 +02:00
e954082dda WM: warn when tool widget not found
This happens when testing adding tools, assert isn't useful.
2018-05-03 07:33:44 +02:00
d9f4ce617b Cleanup: trailing space 2018-05-03 07:22:04 +02:00
7840c593b8 Cleanup: remove axis bounds ifdef
This was added for scale-cage manipulator, but seems generally useful.
2018-05-03 07:21:06 +02:00
51aba69b89 Transform: expose 3D center/axis calculation
This is needed for other manipulator placement.
2018-05-03 07:19:33 +02:00
f5cb96704b WM: add function to access last_properties 2018-05-03 07:09:22 +02:00
e4774c0b2d Metaball: pointers used in DRW_shgroup_call_dynamic_add don't need to hold the reference. 2018-05-02 21:26:43 -03:00
36bbf80929 Armature: Envelope: Small cleanup + don't smooth the distance display.
The actual weighting calculation is not smooth as the bone display.

The bone itself can be smooth for esthetic purpose but the distance display
should match the underlying weighting formula.
2018-05-02 20:49:38 +02:00
46662a289b Armature: Envelope: Optimize outline shader. 2018-05-02 20:49:38 +02:00
0ea329d32d Armature: Envelope: Revisit envelope drawing again.
Past shader was too slow and had bad artifacts. This method is much simpler
and eficient and only exhibit some popping when the raidus of the head/tail
is changed.
2018-05-02 20:49:38 +02:00
73cb83d48f GPUShader: Remove unused envelope shaders. 2018-05-02 20:49:38 +02:00
e764d2b6ba Armature: More work and cleanup on envelope bones drawing.
- Draw tail & head sphere with point shader (no needs for another way).
- Use the same function for issuing the calls for wire and solid envelope.
2018-05-02 20:49:38 +02:00
a76d27f694 Armature: Add envelope outline shader. 2018-05-02 20:49:38 +02:00
01cec3e0c5 Armature: Envelope Bones: Change drawing method.
We now use a more pleasant and efficient way to display enveloppe bones
and their radius.

For this we use a capsule geometry that is displaced (in the vertex shader)
to a signed distance field that represents the bone shape.

The bone distance radius are now drawn in 3D using a "pseudo-fresnel" effect.
This gives a better understanding of what is inside the radius of influence.

When capsules are not needed, we switch to default raytraced points.
The capsules are not distorded by the bone's matrix (same as their actual
influence radius) and are correctly displayed even with complex scaled
parents hierarchy.
2018-05-02 20:49:38 +02:00
18071f4e0e Armature: Draw envelope on non MSAA buffer.
Appart from the performance issue, the MSAA resolve pass is not compatible
with additive passes.
2018-05-02 20:49:38 +02:00
d0d282bf2f Armature: Add multisampling to posemode. 2018-05-02 20:49:38 +02:00
6f5bf23c98 DRW: Convert DRW_cache_circle_get to use GWN_PRIM_LINE_LOOP 2018-05-02 20:49:38 +02:00
8c2a6f957a Armature: "Raytrace" bones endpoint spheres.
Here is how it works:
We render a high poly disc that we orient & scale towards the camera so that
it covers the same pixel of the sphere it's supposed to represent.

Then the pixel shader raytrace the sphere (effectively starting from
the poly disc depth) and outputs the depth to gl_FragDepth.

This approach has many benefit:
- high quality obviously: per pixel accurate depth!
- compatible with MSAA: since the sphere horizon is delimited by polygons,
  we get the coverage computed by the rasterizer. However we still gets
  aliasing if the sphere intersect directly other meshes.
- virtually no overdraw: there is no backface to shade but we still get
  overdraw because by little triangle [gpus rasterize pixel by groups of 4].
- allows early depth test: since the poly disc is set at the nearest depth
  we can output, we can use GL_ARB_conservative_depth to enable early depth
  test and discard pixels that are already behind geometry.
- can draw outline pretty easily without geometry shader.
2018-05-02 20:49:38 +02:00
a56561dcd2 DRW: Make use of new multisample resolve pass. 2018-05-02 20:49:38 +02:00
33356b7be0 DRW: Add DRW_multisamples_resolve function
This manually resolve the content of a multisample FB to a single sample FB.

It resolves color (combine the 2 framebuffers in a logical maner keeping
depth buffer occlusion etc..) instead of a plain glBlitFramebuffer copy.
2018-05-02 20:49:38 +02:00
6d8e308eae GPUShader: Optimize Multisample resolve shader.
Group all fetches together without interleived alu to let compiler optimize.

Also do the color samples only if needed.

Went from 3.86ms to [1.11-2.22]ms [min-max] for the 16samples resolve pass
on my nvidia card.
2018-05-02 20:49:38 +02:00
1fff3e02c2 DRW: Add DRW_STATE_BLEND_PREMUL blend mode. 2018-05-02 20:49:38 +02:00
12570c7373 GPUShader: Add GPU_SHADER_2D_IMAGE_MULTISAMPLE_2/4/8/16
This shader is used instead of blitting back and forth to a single sample
buffer.

This means it resolves the color and depth samples and outputs a fragment
which can be depth tested and blended on top of an existing framebuffer.

We do static shader variation with manual loop unrolling for performance
reason. In my test I get 25% more perf with intel integrated gpu and 75%
performance gain with dedicated nvidia card compared to a single shader
with a uniform for sample count.
2018-05-02 20:49:38 +02:00
2602198485 GWN: Add GWN_batch_uniform_mat4. 2018-05-02 20:49:38 +02:00
a8463284bb GPUShader: Fix simple lighting modulating alpha color 2018-05-02 20:49:38 +02:00
ad97ba3367 Object Mode: Draw non meshes before outline.
This makes the outlines occluded by the other objects. This was a problem
before the outline refactor but now there is no need for it.
2018-05-02 20:49:38 +02:00
e493a1a1ae DRW: Armature: New bone outline shader.
This fix the issue with the zfighting we were getting at bones edges.

Moreover, this enables us to render arbitrarly large outline with
varying thickness.
2018-05-02 20:49:38 +02:00
77b481fd5a DRW: Add Adjacency info for bone shapes.
Only for cube and octahedral shapes for now.
2018-05-02 20:49:38 +02:00
0c47a83fb9 GWN: Add GL_TRIANGLES_ADJACENCY to supported primitive types. 2018-05-02 20:49:38 +02:00
3f9f27e5a8 GPUTexture: Fix wrong multisample texture size. 2018-05-02 20:49:38 +02:00
fd23c42faa Paint Vertex Mode: Fix shader not free. 2018-05-02 18:39:53 +02:00
1ff2646d58 Eevee: Add Lamp Specular multiplier.
It's usefull in some scenario to tweak the specular intensity of a light
without modifying the diffuse contribution.

Cycles allows it via lamps material which we currently not support in Eevee.

This is a good workaround for now.
2018-05-02 18:39:53 +02:00
Dalai Felinto
965e6ed54f Fix T54864: Assert when changing interface display scale
The asserts were introduced on rB5f6c45498c92 (top-bar).

Although the asserts are technically correct, they would fail even in master.
And the commit simply added the asserts without fixing the situation itself
(as you can see in the report, it is really simple to reproduce this issue).

I propose we remove the asserts and bring them back only when the situation
itself is fixed. It doesn't make sense to introduce asserts that would fail
with the current state of the code.
2018-05-02 18:32:44 +02:00
d877831115 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-02 17:37:37 +02:00
f0d67d8f6a Workbench: Linear => srgb conversion 2018-05-02 17:37:11 +02:00
Dalai Felinto
b6b17338c2 Fix mysterious crash on tooltips
This was a hard to reproduce bug, but it happens often enough.
Basically the tooltip of the active tool was been invoked when
context had no valid ScrArea which would lead to a crash.

We now just return no tooltip in these cases.
2018-05-02 17:37:05 +02:00
1e4fb83f61 Merge branch 'blender2.8' into blender2.8-workbench 2018-05-02 17:10:38 +02:00
3fa6b6ed4c Depsgraph: Add function to iterate over all original IDs 2018-05-02 17:09:44 +02:00
7c32ef84aa Use meaningful debug name for render depsgraph 2018-05-02 17:09:44 +02:00
6560a96232 Depsgraph: Show log message when tagging specific depsgraph ID 2018-05-02 17:09:44 +02:00
b6aa8a71fd Depsgraph: Add per-depsgraph debug name which is shown in the logs
This way we can see for which depsgraph datablock is being evaluated for.
2018-05-02 17:09:44 +02:00
651a255931 Depsgraph: Cleanup, naming conventions 2018-05-02 17:09:44 +02:00
bb75c4cbe9 Depsgraph: Make all print messages to respect per-depsgraph debug flags 2018-05-02 17:09:44 +02:00
65e6654c85 Depsgraph: Allow per-depsgraph debug flags
Currently only affects EVALUATION debug messages, rest are to be
supported on per-depsgraph level.
2018-05-02 17:09:44 +02:00
2f4dea0ef9 Depsgraph: Use utility function to print CoW update function 2018-05-02 17:09:44 +02:00
c7e0bb0b90 Depsgraph: Make bAction a part of dependency graph
There are various values which depends on context in there, for example
current driver value and original DNA value f-curve is applied for.

This partially fixes issue with not being able to tweak keyed values
when material preview is open.

The material preview is not being currently updated against non-keyed
changes since every tweak of material property does full preview scene
depsgraph evaluation.
2018-05-02 17:09:44 +02:00
98461aa5dc Workbench: Fix interface change in draw maanger 2018-05-02 17:08:42 +02:00
9cfbdff71c Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-02 16:59:42 +02:00
a61ade5283 Workbench: view specific ambient light for shadows 2018-05-02 16:59:13 +02:00
befbf7eb9b Vertex Paint: Use Linear colors for interpolation.
This matches Cycles and Eevee's behaviour.
2018-05-02 16:45:08 +02:00
a2b05accea Eevee: Fix vertex color being in srgb space.
Now they are properly converted to Linear space before interpolation.

Since the only way to get vertex color in eevee and cycles is via the
attribute node with the CD_AUTO_FROM_NAME flag, we have to know at binding
time which type of buffer will be connected to this auto input.

We store this information inside the batch cache (together with the according
uniform name) and pass it as uniform to the shader which does conversion if
needed. The same shader can then be reused to draw another mesh with
different auto layers configuration.
2018-05-02 16:45:08 +02:00
648de1be52 Modifiers: ported Skin modifier DerivedMesh → Mesh 2018-05-02 16:39:22 +02:00
3f2f27642e Renamed 1st parameter of BKE_bmesh_to_mesh from me to be
It's a BMesh, it shouldn't be called `me`
2018-05-02 16:39:22 +02:00
ce7575c823 Static Override: Move 'auto' flag into override struct, expose it to RNA. 2018-05-02 16:15:52 +02:00
40771a0e9e Modifiers: ported Solidify modifier DerivedMesh → Mesh 2018-05-02 16:03:16 +02:00
2450b70efa Mesh: add runtime customdata dirty flags 2018-05-02 15:52:59 +02:00
9e477bdf63 Mesh: move runtime members to own struct 2018-05-02 15:48:17 +02:00
c84d95d5a9 Merge branch 'blender2.8' into blender2.8-workbench 2018-05-02 15:33:22 +02:00
ae1ba7679c Workbench: update of 3dview 2018-05-02 15:32:59 +02:00
f17e7a3474 Workbench: Shadows
Use a depth fail shadow volume algoritmh. TODO: optimize for speed. Fix
fireflies
2018-05-02 15:12:42 +02:00
5659d8bc0a Merge branch 'master' into blender2.8 2018-05-02 14:40:00 +02:00
23fe6e7eab Merge branch 'master' into blender2.8 2018-05-02 14:37:32 +02:00
eaf6345d4b Lattice modifier: take comparison out of loop 2018-05-02 13:51:31 +02:00
1f8720cf05 Modifiers: ported Lattice modifier DerivedMesh → Mesh 2018-05-02 13:42:09 +02:00
d09920687c Merge branch 'master' into blender2.8 2018-05-02 12:46:14 +02:00
adc17317c5 UI: open toolbar hold buttons on drag
Allows for faster tool switching, no need to wait for it to open.
2018-05-02 12:20:11 +02:00
81175eb40d Modifiers: ported Bevel modifier DerivedMesh → Mesh
This introduces `BKE_mesh_to_bmesh_ex()`, which exposes all of the
`BMeshFromMeshParams` parameters to the caller. This is required to enable
the `calc_face_normal` flag, which is required for the Bevel modifier.

This also introduces `BKE_bmesh_to_mesh()`, which allocates a new `Mesh`,
converts the `BMesh` to it, and returns it. The returned mesh is owned by
the caller.
2018-05-02 12:15:00 +02:00
4f65ba19c1 Merge branch 'blender2.8' into blender2.8-workbench 2018-05-02 12:11:24 +02:00
baf0547de5 Workbench: Single Color Modes
- ability to switch between Single Color, Object Color, Material Color
and Random Color
 - fixed Shading and Lighting popover
 - Renamed Solid -> Single Color
2018-05-02 12:05:40 +02:00
62ed13340b UI: don't allow disabled popovers to open w/ drag
First dragging over active menu items could be used to open a disabled
popover.
2018-05-02 12:02:50 +02:00
31d5fcd2a7 UI: run redo poll check in operators context 2018-05-02 11:33:24 +02:00
85dcdb87d2 UI: fix operator redo showing empty popovers
Many operators have no options,
showing a popover button with no content isn't good.
2018-05-02 11:03:03 +02:00
2bc9396b55 UI: disable popovers when panel poll fails 2018-05-02 11:03:03 +02:00
9b21055dfb WM: utility to check if an operator will draw a UI
Checking if a redo operator will show something is needed
to avoid empty redo popover.
2018-05-02 11:03:03 +02:00
Dalai Felinto
3def6c7f8e Edit Mesh: look-cut copy-on-write support
Note: As already commented in the code, the ideal solution would
be to pass select mode as parameter to ED_view3D_backbuf_validate.

Without that we have to resort to the hack solution of writing to
evaluation data.
2018-05-02 10:13:22 +02:00
c052346fbf UI: move object selector into 3D view
This matches the new convention for left-handed mode selectors,
however we're still undecided on exactly how this should work.

For now test this out as a convention for all space types.
2018-05-01 22:33:10 +02:00
e1bd883df3 Eevee: Don't enable temporal AA when using 1 sample only.
This was producing infinite rendering but wasn't noticeable.
2018-05-01 19:39:18 +02:00
20c1edf592 Eevee: Shadows: Only tag as shadow caster if a shadow is cast.
This leads to great improvement if the scene have moving objects without
shadows (shadows disabled in the material panel).
2018-05-01 19:39:18 +02:00
3e4c78e7ba Workbench: Shadows
Fix negation of light direction
added SHOW_SHADOW_VOLUME option
2018-05-01 19:23:23 +02:00
52f1510613 UI: move space-mode selectors before menu items
This adds a convention to have a spaces primary mode selector
positioned to at the left of the header.
2018-05-01 18:56:52 +02:00
0d61cab7ce Modifiers: Fix crash when entering edit mode on unported modifiers 2018-05-01 18:47:26 +02:00
Dalai Felinto
3eca0af19c Fix number sliders for the topbar 2018-05-01 18:35:11 +02:00
334b55fd2e Extract common modifier parameters into ModifierEvalContext struct
The contents of the ModifierEvalContext struct are constant while iterating
over the modifier stack. The struct thus should be only created once, outside
any loop over the modifiers.
2018-05-01 18:02:17 +02:00
6b9f1ffe6e Formatting 2018-05-01 18:02:17 +02:00
2d6620a100 Modifiers: Array DerivedMesh → Mesh 2018-05-01 18:02:17 +02:00
1553f6b656 Introduced CDDM_from_mesh_ex() to create a non-referencing CDDM
This allows the mesh to be freed and the CDDM kept.
2018-05-01 18:02:17 +02:00
4211d02ab5 Modifiers: Mirror DerivedMesh → Mesh 2018-05-01 18:02:17 +02:00
eb6fc05f25 Modifiers: Armature DerivedMesh → Mesh
The mesh parameter of armature_deform_verts() is now const, to indicate
that it's safe to pass ob->data to it directly.
2018-05-01 18:02:17 +02:00
7efc75c709 Modifiers: Simple Deform & Build, DerivedMesh → Mesh
This commit introduces `EditMeshData`. The fields in this struct are
extracted from `EditDerivedBMesh` into their own struct `EditMeshData`,
which can then also be used by the `Mesh` struct. This allows passing
deformed vertices efficiently to the draw routines.

The modifier code constructs a new Mesh instead of writing to ob->data;
even when ob->data is a CoW copy, it can still be used by different
objects and thus shouldn't be modified by a modifier.
2018-05-01 18:02:17 +02:00
be4df85919 Modifiers: Add wrapper functions with Mesh / DerivedMesh conversion
Makes the follow changes:

- Add new `deform*` and `apply*` function pointers to `ModifierTypeInfo` that take `Mesh`, and rename the old functions to indicate that they take `DerivedMesh`. These new functions are currently set to `NULL` for all modifiers.
- Add wrapper `modifier_deform*` and `modifier_apply*` functions in two variants: one that works with `Mesh` and the other which works with `DerivedMesh` that is named with `*_DM_depercated`. These functions check which type of data the modifier supports and converts if necessary
- Update the rest of Blender to be aware and make use of these new functions

The goal of these changes is to make it possible to port to using `Mesh` incrementally without ever needing to enter into a state where modifiers don't work. After everything has been ported over the old functions and wrappers could be removed.

Reviewers: campbellbarton, sergey, mont29

Subscribers: sybren

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3155
2018-05-01 18:02:17 +02:00
9fcb4e6406 Typo fix 2018-05-01 18:02:17 +02:00
b83d48b574 Added note about potential crash in add_orco_dm() 2018-05-01 18:02:17 +02:00
01a720fc9f Eevee: Fix crash when using visibility groups with dupli objects. 2018-05-01 17:59:40 +02:00
1bef7f9318 Eevee: Contact Shadows: Add slope based bias & fix brightening. 2018-05-01 17:59:40 +02:00
8c92a02720 Eevee: Fix raytracing.
- Fix the confusing naming in raycast()
- Fix raytrace acne caused by the rays not being correctly centered on
  the texel.
2018-05-01 17:59:40 +02:00
92fd931e53 Fix: Silence |RNA_boolean_get: WM_OT_save_as_mainfile.exit not found." warning on exit
The operator in question doesn't define this property.
I'm commenting out for now in case another operator actually still uses it.
2018-05-01 17:43:18 +02:00
f6c1762bb3 Fix previous commit, sorry about that :/ 2018-05-01 17:03:23 +02:00
691c532506 Static override: rename highly confusing var name in apply code.
We use 'reference' to designate the linked ID which is being overridden
by the local one, so using 'reference' to designate the stored local ID
in apply RNA code was... not a good idea. ;)
2018-05-01 17:02:30 +02:00
0636acc59a Icons: updated icons from @billreynish
This adds vertex paint & sculpt icons + other minor changes.
2018-05-01 16:52:12 +02:00
43452c254e Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-01 16:28:02 +02:00
be88f23b83 Overlay: Enabled wireframe drawing for vertex/weight paint
This is a temp hack, so that billrey can use blender 2.8 for
drawing the icons. Hack will be phased out by T54910
2018-05-01 16:26:31 +02:00
c5c3fa3eac Fix compiler warning: Uninitialised var 2018-05-01 16:22:36 +02:00
30093a6596 Add/finish rna read-only access to actual override rules.
For some reasons did not add operations themselves previously...
2018-05-01 15:18:30 +02:00
3166086c60 Static Override: fix 'search matching override operation' function.
Previous code was waaaayyyy to flacky, returning matches for things that
did not actually have much in common!
2018-05-01 15:08:38 +02:00
522bee3fc8 Refactoring: bvhutils: Use a function that gets the bvhtree through an identifier type.
Reviewed By: @campbellbarton
Differential Revision: https://developer.blender.org/D3192
2018-05-01 10:03:28 -03:00
008a5d9106 Depsgraph: Add missing relations needed for nested datablock relations 2018-05-01 13:22:55 +02:00
3f4a81232a UI: expose radial gradient as option
Was a separate tool, use option so we can extend more easily.
2018-05-01 12:48:35 +02:00
f38fbc9bed UI: add weight paint sample tools
Also use unified weight.
2018-05-01 12:20:53 +02:00
314420e193 Fix crash opening file saved in weight paint mode 2018-05-01 12:07:38 +02:00
f0982220be Nodes: Remove workaround for action copy
Actions shouldn't be copying by new library management code.
Or at least should be possible to make it to not copy actions
or do unneeded user management.

This way we avoid modification of original data which could
and does cause threading conflict with copy-on-write which
could be happening for viewport.
2018-05-01 12:07:38 +02:00
70d352d994 Tool System: add paint poll which ignores the tool
Needed for tools which ensure paint context but aren't brushes
(color sample & gradient).
2018-05-01 11:42:25 +02:00
2c9670b92d Tool System: support non-brush tools w/ paint modes
Allows select, gradient tools not to conflict with brush keymap.
2018-05-01 11:23:46 +02:00
Dalai Felinto
1e8021a58a Fix missing copy-on-write update when changing edit mode selection mode 2018-05-01 11:15:48 +02:00
c02e764722 Workbench: update light direction uniform
- still need to check a usable UI for the light direction
2018-05-01 11:06:09 +02:00
0be4b0f7a5 Fix edit mesh selection with copy-on-write enabled 2018-05-01 11:02:55 +02:00
f708cad6b2 Merge branch 'blender2.8' into blender2.8-workbench 2018-05-01 10:51:54 +02:00
98c767244d Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-01 10:44:31 +02:00
aad0e52e38 Workbench: Shading popover
- Moved random object color and object outline to shading popover as
these are draw options.
2018-05-01 10:43:27 +02:00
2ce94cc24b Fix crash opening files saved in sculpt/vertex paint modes
Skip access to any evaluated data when operator is run on file load,
we don't have depsgraph evaluated yet. In this case we skip part of
sculpt session initialization, since it will be done during depsgraph
evaluation which happens after DEG_on_visible_update().

We can not skip sculpt session initialization since during normal
operation we want all the data to be initialized on mode change,
and not on initial brush stroke.
2018-05-01 10:14:20 +02:00
416b7036e1 Workbench: World shadows 2018-05-01 09:44:16 +02:00
af508a1e39 Mark localized node trees and materials as such
Makes it easier to see where the datablock is coming from.
2018-05-01 09:17:17 +02:00
2bd2a2ac03 Depsgraph: Extra sanity checks for copy-on-write tagging 2018-05-01 09:17:17 +02:00
8cf9c58906 Depsgraph: Put original and evaluated ID node pointers to graphviz 2018-05-01 09:17:17 +02:00
04ee606383 Depsgraph: use human readable node type for graphviz debug output 2018-05-01 09:17:17 +02:00
2daab40717 Depsgraph: Cleanup, simplify operation code stringification 2018-05-01 09:17:17 +02:00
2a89ef3da7 Depsgraph: Cleanup, remove unused code 2018-05-01 09:17:17 +02:00
e52dce6408 Animation: Don't user-copunter copy-on-written action block 2018-05-01 09:17:17 +02:00
ed51b93bed Icons: write object children
Allows for sharing geometry between icons.
2018-05-01 08:40:07 +02:00
a2c8bc4113 Merge branch 'blender2.8' into blender2.8-workbench 2018-05-01 08:03:26 +02:00
Dalai Felinto
c21ceb3317 Edit-Mesh: multi-object mark freestyle face
Freestyle face drawing is not working, but I tested it in 2.79, all good.
2018-04-30 22:38:06 +02:00
Dalai Felinto
9ce4a7e824 Edit Mesh: multi-object mark freestyle edge
Freestyle edge drawing is not working though.
2018-04-30 22:38:06 +02:00
Dalai Felinto
0ac3d5f7db Edit Mesh: multi-object mark sharp 2018-04-30 22:38:06 +02:00
Dalai Felinto
61f0608b4a Edit Mesh: multi-object mark seams
Note that I'm using bm->totedgesel instead of bm->totfacesel to skip objects.
2018-04-30 22:38:06 +02:00
2e98524b58 Add support for area lights to the Apply Transform operator
Since area lights are affected by scaling them, it only makes sense to support applying the scale to the lamp size.
Of course, applying location or rotation does not work.

If a scaling that changes the aspect ratio is applied to a square lamp, the mode is automatically changed to Rectangle.
2018-04-30 22:09:23 +02:00
b93a76fe75 Add missing tools to vertex paint 2018-04-30 21:58:35 +02:00
7770d38303 Cleanup: simplify GLSL logic in outlines drawing.
No functional changes.
2018-04-30 16:55:16 -03:00
Dalai Felinto
32c4158047 Fix Merge > To Cursor
In master this is working fine, but in 2.8 ob->imat was identity matrix.
Committing this in master to simplify merging.
2018-04-30 21:42:16 +02:00
Dalai Felinto
aaf85e29a1 Popover: tiny cleanup 2018-04-30 21:13:37 +02:00
40f27e520f Fix T54901: Crash renaming UV layer 2018-04-30 21:03:16 +02:00
a44d5b59d3 UI: order edit-mesh tools
See T54885
2018-04-30 20:40:36 +02:00
ba339379fe Fix linking brushes crashing on load
We need to link brushes for all windows that use a workspace.
2018-04-30 20:09:39 +02:00
33bb8b785a Fix T54900: radial control drawing in wrong place after recent WM changes. 2018-04-30 20:02:39 +02:00
f56b7fb863 Cleanup: de-duplicate paint access from object 2018-04-30 19:42:58 +02:00
188c4a22c9 Cleanup: de-duplicate paint access from object 2018-04-30 18:58:43 +02:00
6e67d8e3bb Cleanup: Move FOREACH_PCHAN_*_IN_OBJECT_*() macros to BKE_armature.h
This reduces the number of headers we need to import (and/or dependencies
on the order of them), as these depend on PBONE_VISIBLE(), which is already
in BKE_armature.h
2018-04-30 18:46:52 +02:00
0020a326ee Copy on write support for Bone Group operators 2018-04-30 18:38:56 +02:00
005f4748c1 Multi-Object Pose: POSE_OT_group_assign/unassign
Like the select/deselect operators, we only support doing this for the
active object for now. From the UI panels, it doesn't make sense to be
operating on bone groups which may not appear/line up with those in the panel
that we're currently dealing with.

This can be reviewed later, but for now, it's easier and makes more sense
this way.
2018-04-30 18:23:05 +02:00
de1405949a UI: show topbar brush options w/ texture paint 2018-04-30 17:06:03 +02:00
9b6778271e Workbench: Shadows (WIP) 2018-04-30 17:02:34 +02:00
3b9554ce9d UI: share common paint panels between all modes 2018-04-30 16:59:16 +02:00
7720525873 UI: add texture paint brushes to toolbar 2018-04-30 16:43:36 +02:00
9114ebe850 Multi-Object Pose Fixes for POSE_OT_armature_apply()
This operator was only partially converted to multi-object editing,
as on one hand, it was using the new "objects in mode" iterator,
while on the other hand, it was also using the context iterator inside
that, making all selected bones across armatures get included.
2018-04-30 16:40:50 +02:00
09dcb6d60c Multi-Object Pose: Fix POSE_OT_group_select and POSE_OT_group_deselect
We only want these to operate on the "active" armature only at a time
(where the "active" one is whichever the groups from the UI came from).
The fix therefore is to make it not use the context functions
(which were changed to always take bones from all selected armatures
instead).
2018-04-30 16:40:50 +02:00
8e78282a94 Eevee: Use GPU_RG16 for velocity pass instead of GPU_RG32F. 2018-04-30 16:39:26 +02:00
0a73000dfc GPUTexture: Add support for GPU_RG16. 2018-04-30 16:39:26 +02:00
eb7188802d DRW: Remove DRWTextureFormat in favor or GPUTextureFormat.
Because:
- Less redundancy.
- Better suffixes.

Also a few modification to GPU_texture_create_* to simplify the API:
- make the format explicit to the texture creation process.
- remove the component count as it's specified in the GPUTextureFormat.
2018-04-30 16:39:26 +02:00
41431eacfa Eevee: TAA: Use safe color when outputing the final color.
This prevent any NANs pixel to spear accross the history. This does not
mean we should allow NANs at all!
2018-04-30 16:39:26 +02:00
26f8d7690f Merge branch 'blender2.8' into blender2.8-workbench 2018-04-30 16:34:17 +02:00
630c24fc61 Overlay: missed in last commit 2018-04-30 16:27:34 +02:00
5dab34df50 Overlay: Integration of TexturePaint with Workbench 2018-04-30 16:16:07 +02:00
9aef2d961d UI: add weight paint brushes to toolbar 2018-04-30 16:08:15 +02:00
cbe57acddf Workbench: Integration VertexPaint and WeightPaint modes
- Disable VertexPaint and WeightPaint for OB_MATERIAL and OB_RENDER. Users want to see the final result
 - When in OB_SOLID, the active object should be rendered without any color. The lighting information is multiplied with the VertexPaint/WeightPaint color
 - Removed the use_shading flag from VertexPaint and WeightPaint
 - add method to check if render engine should draw without color (DRW_object_in_only_lighting_mode)

Reviewers: fclem

Tags: #code_quest

Maniphest Tasks: T54894

Differential Revision: https://developer.blender.org/D3191
2018-04-30 15:54:38 +02:00
Julian Eisel
e76a65e359 UV editing: Make 'Select Linked' work consistent to 3D View
Don't see a good reason for the old behavior, so better have it consistent.
2018-04-30 15:42:29 +02:00
d9f395ac39 UI: add vertex paint tools
Generalize logic to show the paintbrush as a tool so
different paint modes can use it.
2018-04-30 15:23:04 +02:00
b5f5e6ce29 Depsgraph: Fix missing node tree update when adding keyframes
Need to make sure animation data is copied from original tree to a copy,
it is NOT enough to only copy node socket values.
2018-04-30 15:16:51 +02:00
05cf7863c3 Fix: UI layout for "Pause" button on timeline header was broken (leaving a gap)
A recent change in the UI layout code probably broke how the scale_x
for layouts was getting handled. This was leaving a large gap
(and causing layouts to pop) when trying to scrub the timeline.

This commit fixes this with a manually-found value that largely seems
to get rid of the popping problem. There's still a little jumping (1-2 px)
but it's less distracting now.
2018-04-30 15:11:43 +02:00
7714d6dd65 COW Fix: Material property update callbacks need to tag depsgraph for COW updates
Otherwise, trying to change color/material properties of EEVEE materials
that have been keyframed doesn't work until a new keyframe has been inserted.

NOTE: There's still some wonkiness if you edit more than one keyframed value
before keyframing (i.e. the other unkeyed value temporarily gets reset). But
that's more of a general COW+animation issue.
2018-04-30 14:49:07 +02:00
36324f9dab ANIM_apply_keyingset() - Tag modified datablocks for copy on write update for good measure 2018-04-30 14:49:07 +02:00
5f8ad885e1 Fix some popup menus that don't support it refreshing and crashing. 2018-04-30 14:27:44 +02:00
78f13ee46c UI: use "none" icon if loading fails
Workaround for issues w/ two column layout when icons are missing.

Also fix reloading icons when some values aren't valid.
2018-04-30 13:57:47 +02:00
85221f6fa7 Fix Eevee shadows not working in certain cases, after recent WM changes. 2018-04-30 13:52:25 +02:00
005711ffef Fix sculpt ToolDef generation
With non-default sculpt brushes, tool generation could fail.
2018-04-30 13:46:01 +02:00
ea2146c3e1 Correct error in toolbar update 2018-04-30 12:46:23 +02:00
310bfe1a77 3D View: refresh on Overlay & Shading changes 2018-04-30 12:36:23 +02:00
bfe88006a3 Remove unused function
Is not needed anymore since 9577ebde79.
2018-04-30 12:27:18 +02:00
a88a8528f1 Draw manager: Fix wrong engine type used for view update
Was causing temporal sampling artifacts when scene is set to Cycles
and viewport is set to Eevee. Visually was looking like ghosting or
motion blur when moving objects.
2018-04-30 12:20:30 +02:00
f4697b392d Tool System: change internal definitions (again)
Was using classes to define tools, however this makes it awkward to
dynamically generate them (we can do it, but its not very "Pythonic").

Move to a named tuple.
2018-04-30 12:14:46 +02:00
98fe9da37d Add NULL check for transform manipulator
Removes need for empty keymap
2018-04-30 12:14:10 +02:00
Julian Eisel
5ea85d0b04 DNA: Unnecessarily big padding size in Object struct
Was added in 159806140f.
2018-04-30 11:18:54 +02:00
cb37080627 Topbar: Enable Vertex Paint tools
Discussed with Campbell just to use the .dummy for now.
2018-04-30 10:40:54 +02:00
422a325acf Fix build of Alembic test. 2018-04-30 10:04:29 +02:00
0ffe51bbdb Merge branch 'blender2.8' into blender2.8-workbench 2018-04-30 08:08:43 +02:00
128506eeb1 BLI Color: YUV to/from rgb colorspace option
This commit does two things:

- Adds an option to do the calculation in different color spaces (BT601
or BT709).
- Changes the default caluclation from legacy BT601 to BT709.

This affects several areas:

- UI areas (mainly scopes)
- ViewLevelsNode
- Several other nodes that use `COM_ConvertOperation.h`
2018-04-29 18:00:45 -04:00
7297b1881e Fix accidentally removed code in recent commit. 2018-04-29 22:11:15 +02:00
7a9f64e665 UI: better support for dynamically sized regions in topbar.
Dynamically sized regions in the topbar were flickering due to only updating
their size after redraws. Now there is an optional layout() callback for
all regions in an area to do UI layout first, then refresh the region layout,
and then do the actual drawing for each region.

Task T54753
2018-04-29 22:11:12 +02:00
0c512a6f95 Fix missing NULL check when setting the tool 2018-04-29 19:14:51 +02:00
1c06064bfb Fixed incorrect merge 2018-04-29 18:37:53 +02:00
fe16270fe5 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-29 18:30:38 +02:00
4218a94b1e UI: disable top-bar tool name drawing
Makes text jump about.
2018-04-29 18:03:01 +02:00
b5985831e2 UI: show add/subtract as icons
Saves space in the topbar
2018-04-29 17:38:17 +02:00
5cdeae2105 UI: show basic sculpt options in topbar 2018-04-29 17:33:08 +02:00
e84735de45 Cleanup: rename snake_hook 2018-04-29 17:08:24 +02:00
60ce3275c1 UI: use sculpt icons in the toolbar 2018-04-29 17:01:10 +02:00
7c3a028e85 UI: new sculpt icons from @billraynish 2018-04-29 17:00:46 +02:00
79638c5c30 UI: backface cull generated icons
Allows for keeping icons 3D without adding extra geometry at export.
2018-04-29 16:51:15 +02:00
695326eb8f UI: remove toolbar separator between categories
Made cursor split from selection tools, giving ugly 2 column layout.
2018-04-29 16:49:24 +02:00
65d78f4695 UI: group sculpt brushes in the toolbar
All sculpt brushes are accessible from the toolbar, grouped by type
to keep the toolbar a fixed size.
2018-04-29 16:36:31 +02:00
6f544f635b UI: fix toolbar groups w/ data_blocks 2018-04-29 16:24:40 +02:00
8c4ff84ed6 UI: hide sculpt panels from toolbar
These are already available from the topbar.
2018-04-29 16:22:40 +02:00
3b785be8f4 Cleanup: warning, use STRNCPY macro 2018-04-29 14:48:30 +02:00
76282a986d UI: initial dynamically generated sculpt tools
Lots more work needed, this just lists sculpt tools in the toolbar.
2018-04-29 14:31:00 +02:00
6e76a35f07 Tool System: support data-blocks in tools
Needed so tools can set the active brush.
2018-04-29 14:30:09 +02:00
f4ba7667dc UI: support tool generators (no visible change)
This allows toolbar definitions to dynamically generate tools,
needed for generating a tool list from brushes for eg.
2018-04-29 12:28:21 +02:00
e017876f78 3D View: add initial view.shading and view.overlay in RNA.
These are mostly empty still, many properties need to be renamed and moved there.
2018-04-29 09:55:47 +02:00
16c05161e7 Cycles: Cleanup: Remove double semicolons 2018-04-29 09:28:41 +02:00
03957b9487 3D View: move shading and overlay settings into popovers.
* This is just moving buttons to get a bit closer to the intended design,
  better naming and layout is needed.
* Popovers currently work best when the 3D view header is at the top, with
  the most important settings nearest to the mouse. Open design question is
  if we should flip (part of) the buttons if header is at the bottom.
* Another question is if selecintg a shading mode enum should immediately
  close the popover since those are changed often, unlike the other settings
  for which it seems more convenient to keep the popover open.
2018-04-29 09:22:00 +02:00
97c7db168d UI: auto open adjacent pulldown and popover buttons. 2018-04-29 09:18:54 +02:00
fc32bd729c UI: don't flip contents of popovers, avoid closing when size changes. 2018-04-29 09:18:54 +02:00
cb53c9bc7b Fix use of removed Blender Internal properties. 2018-04-29 09:18:54 +02:00
a56d6e467b UI: show popover arrow directly under the button
A visual hint but looks broken when its not pointing to the button.
2018-04-29 09:16:32 +02:00
0616bb5d32 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-28 21:27:43 +02:00
ca7964c24b UI: fix toolbar not snapping properly with system DPI and display scale. 2018-04-28 20:50:47 +02:00
b5d3fcc9f5 Python/UI: add more convenient API for drawing based on DPI.
system.ui_scale: size multiplier to use when drawing custom UI elements.
system.ui_line_width: suggested line thickness and point size in pixels.
2018-04-28 20:49:46 +02:00
e87dd9aa00 Edit Mesh: loop-cut multi-object support 2018-04-28 18:26:44 +02:00
Dalai Felinto
922ea41395 UI: Number Slider - treat percentage as a special case
This is to address things like a percentage slider with a fixed soft mininum.

For example, the render resolution ranges from 1% to 100% and it is really
strange to have the slider showing nothing filled when the ui shows 1%.
2018-04-28 16:55:17 +02:00
Dalai Felinto
9b0ea92be7 UI: Number slider uniform filling
Now we always fill the slider with a vertical boundary. A bit hard to explain,
but very easy to see the difference.

I split the widget in three parts and used fragment shader discard to remove the
undesired bits. That means all the widget program is doing a bit extra
calculation.

Reviewers: fclem

Subscribers: billreynish

Differential Revision: https://developer.blender.org/D3186
2018-04-28 16:54:57 +02:00
Dalai Felinto
c06bfe9d09 UI: Remove hardcoded 11 uniform parameters
Using a define makes it easy to increase this later.
2018-04-28 16:33:15 +02:00
Dalai Felinto
c6fccbf842 UI: Remove deprecated drawing code 2018-04-28 16:33:15 +02:00
54aa834b7d Cleanup: fix compiler warnings on macOS / clang. 2018-04-28 16:28:19 +02:00
ff5e24b808 Workbench: Shadows from outlines 2018-04-28 16:17:34 +02:00
bf75b24818 UI: fix incorrect scaling of manipulator widgets with DPI.
U.ui_scale is the setting from the user preferences and should never be used
for drawing. UI_DPI_FAC is the final scale after DPI from the operating system
is taken into account.
2018-04-28 16:16:04 +02:00
61759f3b55 Cleanup: remove code for removed Blender Internal properties. 2018-04-28 16:15:42 +02:00
b6e66a66c2 Fix number button sides exiting continuous grab 2018-04-28 15:38:33 +02:00
d5a766a9ed Merge branch 'master' into blender2.8 2018-04-28 14:49:08 +02:00
60f4cb24da Fix vertex paint alpha brush setting color black 2018-04-28 14:47:53 +02:00
ffda096413 Cleanup: meaningful names for color blending 2018-04-28 14:45:10 +02:00
a74097dc19 UI: Add icon color saturation preference
Toolbar icon saturation can now be set from the preferences,
(use 0.4 by default).
2018-04-28 13:34:52 +02:00
69ca12c45c Revert "UI: don't highlight number button while dragging"
This reverts commit bb513b173e.

Broke click events.
2018-04-28 12:20:38 +02:00
e1417c665d UI: split toolbar layout from button creation
Having single & multi-column checks inline were becoming unmanageable.

Use a generator to define the layout,
allows for easily adding different layouts in the future.
2018-04-28 11:42:53 +02:00
a14005c070 UI: fix popover menus not refreshing when changing settings. 2018-04-28 10:42:58 +02:00
a593cc046c UI: put active tool buttons in center topbar region. 2018-04-28 10:42:58 +02:00
128b7ddd83 Fix multi-editmode memory leak
Previous commit only removed return's.
2018-04-28 09:34:48 +02:00
159a7e8b38 UI: replace transform hand icon w/ 4 arrows
The hand doesn't have a hotspot which you might want using manipulators
2018-04-28 09:14:02 +02:00
617534327a Cleanup: style, duplicate includes 2018-04-28 09:02:22 +02:00
cfa1700792 UI: add loopcut & edge offset tools
Also fix minor layout bug.
2018-04-27 23:08:25 +02:00
c42a47d177 UI: add new transform tool that enables all widgets
Also add bevel tool.
2018-04-27 22:49:52 +02:00
bb513b173e UI: don't highlight number button while dragging 2018-04-27 22:25:54 +02:00
e97ab28a03 Edit Mesh: skip unselected meshes w/ fill holes 2018-04-27 21:52:08 +02:00
69b95b45f4 Edit Mesh: multi-object support for 'Fill Holes' 2018-04-27 21:22:21 +02:00
e724238457 Tool System: use release_confirm for extrude 2018-04-27 20:43:41 +02:00
c4a24a7f5d Tool System: inset tool now completes on release 2018-04-27 20:38:29 +02:00
c0c9eb7fe2 Fix quad view region dividing lines not drawing after recent changes. 2018-04-27 20:33:58 +02:00
0adabe33bd UI: respect separators for row layout 2018-04-27 20:03:43 +02:00
970cf6f765 UI: use the layouts scale_x to scale icon width 2018-04-27 20:03:43 +02:00
Dalai Felinto
a6fb54f236 UI: Set cursor to X_MOV when editing number button middle area
Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D3184
2018-04-27 19:38:18 +02:00
8daefb5eaf Merge branch 'blender2.8' into blender2.8-workbench 2018-04-27 19:37:50 +02:00
782240636c UI: use new extrude icon and correct keymap 2018-04-27 19:16:00 +02:00
fd68bdf7f9 UI: updated icons from @billreynish
- black outlines (better readability).
- add bone roll.
- add extrude to cursor.
2018-04-27 19:02:44 +02:00
a55016d5ef Draw Edit Curve Overlay: Fix the offset direction of the contour of selected handles 2018-04-27 14:00:22 -03:00
9cc9db87bb Fix missing action zones and emboss in the 3D viewport.
Not really happy with the fix, but it works. With the new window draw method
we are no longer storing the 3D viewport in 4 buffers, by having the GPU
viewport function directly as the 3rd buffer. This means we need to draw the
action zones into it, and so we need to keep the framebuffer bound a little
longer.
2018-04-27 18:52:19 +02:00
351d782286 UI: disable 3 column toolbars
They conflict a little with showing a narrow toolbar w/ text.
2018-04-27 18:20:48 +02:00
eb4c60124c UI: multi-column toolbar support 2018-04-27 18:02:45 +02:00
Dalai Felinto
964a2dd73f UI: Bring Embossing for the top-bar and quad-view
Note: Quad-View region overlay drawing is not working because of e01cadd657.
However I tested this patch after reverting that commit locally and this
patch's code seems fine.

Partial revert of 3d62230ed6.
2018-04-27 17:47:19 +02:00
ca66112b29 Fix missing icons in non-portable local builds.
The problem is that some local path is always returned by
bpy_resource_path. The function does not enforce a check for existence
of the path in the low level code.

Since client code may indeed not care about existence of the directory,
I leave bpy_resource_path alone and patch the python code to check for
existence. An  extra argument that enforces the check might be a better
solution, but I will be leaving this to the UI team.
2018-04-27 17:10:39 +03:00
c6d68916ed Fix multi-editmode memory leak 2018-04-27 15:38:35 +02:00
84a706a366 Minor fix, report missing instead of corrupt icon if file does not exist 2018-04-27 15:34:54 +03:00
e933ab0a99 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-27 14:34:51 +02:00
85ea14df2f UI: support for tool settings in the top-bar
This uses the operators last used properties
to store settings to use on the next execution.
2018-04-27 14:17:12 +02:00
9504652687 UI: move tool definitions to classes
Originally it was nice to have a small list of definitions
with tools inline.

However we need to be able to define drawing functions for tools
which Python can't easily inline.

Use function for keymap definition,
support creating a function from a tuple as well
(handy for simple key-maps).
2018-04-27 13:55:04 +02:00
e01cadd657 WM: new offscreen window draw method to replace all existing methods.
For Blender 2.8 we had to be compatible with very old OpenGL versions, and
triple buffer was designed to work without offscreen rendering, by copying
the the backbuffer to a texture right before swapping. This way we could
avoid redrawing unchanged regions by copying them from this texture on the
next redraws. Triple buffer used to suffer from poor performance and driver
bugs on specific cards, so alternative draw methods remained available.

Now that we require newer OpenGL, we can have just a single draw method
that draw each region into an offscreen buffer, and then draws those to
the screen. This has some advantages:

* Poor 3D view performance when using Region Overlap should be solved now,
  since we can also cache overlapping regions in offscreen buffers.
* Page flip, anaglyph and interlace stereo drawing can be a little faster
  by avoiding a copy to an intermediate texture.
* The new 3D view drawing already writes to an offscreen buffer, which we
  can draw from directly instead of duplicating it to another buffer.
* Eventually we will be able to remove depth and stencil buffers from the
  window and save memory, though at the moment there are still some tools
  using it so it's not possible yet.
* This also fixes a bug with Eevee sampling not progressing with stereo
  drawing in the 3D viewport.

Differential Revision: https://developer.blender.org/D3061
2018-04-27 12:14:14 +02:00
868c9ac408 UI: show active tool in the topbar 2018-04-27 10:50:11 +02:00
3556838983 Fix build error after recent changes (missing FILE). 2018-04-27 10:21:56 +02:00
b756e869ee WM: Add function to access last operator props
Needed for tool-settings to control options for a tool
which has not yet been executed.
2018-04-27 10:05:03 +02:00
0908fc1190 Tool System: publish/subscribe to tool changes 2018-04-27 08:24:20 +02:00
5752e4f06f WM: message bus rna utilkity macros 2018-04-27 08:23:16 +02:00
226c757b44 UI: add darker theme color for toolbar items 2018-04-26 21:18:27 +02:00
9183592698 Animation: Make it possible to keyframe to with copy-on-write
The issue was that every object tweak was doing a full copy
of original datablock onto evaluated version, and was updating
animation. This made it impossible to tweak properties which
has keyframes.

Proposed solution is to:

- Always apply animation on frame change, and when object
  is explicitly tagged for animation update.

  This will store original DNA value of animated property
  in the f-curve.

- When applying animation in other cases, we check original
  DNA value stored in f-curve with the actual original DNA
  property. If they differ, it means user started to tweak
  animated property, and we should skip animation.

  If the value is the same, we apply animation.

This is just a first step towards proper final implementation,
but seems to be the direction we want to take.
2018-04-26 18:11:58 +02:00
c86be7345b Tool System: expose tool space-type 2018-04-26 17:58:37 +02:00
3ca20148c4 Animation: Split f-curve reading and writing functions
This way we can re-use reading part.
2018-04-26 17:24:00 +02:00
46a256b5d1 Depsgraph: Make it possible to check for ID directly tagged for animation recalc 2018-04-26 17:22:17 +02:00
db808ab36e Merge branch 'blender2.8' into blender2.8-workbench 2018-04-26 17:18:49 +02:00
68b920d6a1 Workbench: Shadow primitives 2018-04-26 17:18:03 +02:00
67b014af48 Workspaces: active view layer now always comes from workspace, not scene.
Both the scene and workspace had an active view layer, and it was confusing
which settings were being used or displayed where. Now we always have one,
so there is no mismatch.

The "View Layers" tab in the properties editor is now "View Layer", no longer
showing a list of layers. Instead view layers can be added and removed with
the workspace view layer selector. They are also listed and selectable in the
outliner.

Single layer rendering uses the active view layer from the workspace.

This fixes bugs where the wrong active view layer was used, but more places
remain that are wrong and are now using the first view layer in the scene.
These are all marked with BKE_view_layer_context_active_PLACEHOLDER.
2018-04-26 17:06:14 +02:00
2697fa9fec Workbench: Shadows pipeline 2018-04-26 16:53:22 +02:00
c490428bd4 UI: desaturate toolbar icons that the mouse is not over.
This does not look great with light toolbar buttons as in the default,
so consider this a work in progress.
2018-04-26 16:37:59 +02:00
5876856f7b Properties: remove redundant settings from workspaces tab.
Use render settings and active view layer will be handled elsewhere.
Also change icon to not be confusing with render layers.

Probably we should get rid of the workspace tab entirely and do it in
the user preferences, but that's for later.
2018-04-26 16:37:59 +02:00
11995c5a6e Fix reversed diff output order in view layer tests. 2018-04-26 16:37:59 +02:00
d60be68100 Fix crash with depsgraph iterator and empty scene.
This causes crashes in the view layer tests.
2018-04-26 16:37:59 +02:00
Julian Eisel
a31807ed7c Reduce size of scrollbars that don't contain scale markings
More changes will follow, this is just an initial tweak.
2018-04-26 15:34:39 +02:00
2fc5f3f378 UI: support icon reloading (F8 key) 2018-04-26 15:19:56 +02:00
29e96158b9 Icons: correct arg parsing
Use _PyArg_ParseTupleAndKeywordsFast
2018-04-26 15:18:00 +02:00
05c9ddb2d6 UI: correct icon 2018-04-26 15:02:50 +02:00
b98311f847 Cleanup: avoid direct access to private class 2018-04-26 14:55:46 +02:00
26644cd424 Merge branch 'master' into blender2.8 2018-04-26 14:36:00 +02:00
3f1df6f6fc Fix T54836: Select sharp edges doesn't flush to faces 2018-04-26 14:35:55 +02:00
57405054b2 Fix T54836: Select sharp edges doesn't flush to faces 2018-04-26 14:32:35 +02:00
Julian Eisel
35742e882f Merge branch 'master' into blender2.8 2018-04-26 14:24:41 +02:00
2ebcde701a BLF: Fix problem with drawing with fonts with multiple size.
Fix T54838 : Text display glitch w/ fonts at different sizes.

This was cause by the cache not being flushed when changing font texture.
2018-04-26 14:21:16 +02:00
df3ea82b84 Workbench: GLSL layout locations
Added layout locations
2018-04-26 14:12:39 +02:00
Julian Eisel
3c7500ca71 Cleanup: Use enums for View2D value defines
Makes the file much less cluttered and more structured.
Also made some whitespace tweaks.
2018-04-26 14:07:03 +02:00
6a0264896b UI: toolbar single column size snapping
Once a region is set to it's snapped size, zooming keeps the size.
2018-04-26 12:08:58 +02:00
e0c088f8fb GHOST: WGL: Make background rendering works on windows.
When creating an offscreen context we need wglCreatePbufferARB to create
a drawable. In non-background mode wglCreatePbufferARB would have been set
by the main window creation code. But in background mode this is not the
case so we need to create a dummy context using the screen window to init
wglew properly.
2018-04-26 11:49:47 +02:00
d37dcc4880 Fix discontinuity in default UVs for a torus
Reported in T47489 by Simon Windmill (coolpowers) who also provided the
fix, thanx.

Reviewed by Sebastian Witt (witt)
2018-04-26 11:18:59 +02:00
7fcdccbb6c Fix vertex slide regression from multi-edit
- Invalid casts.
- Leaked memory on mode switching.
2018-04-26 10:18:03 +02:00
ba9b01d3c0 Merge branch 'blender2.8-workbench' into blender2.8 2018-04-26 08:47:28 +02:00
badab5cb7d Workbench: Hair rendering 2018-04-26 08:46:58 +02:00
6c608b2f8a Workbench: Environment Light
- Changed defaults
 - Updated render panel
2018-04-26 08:31:14 +02:00
4afbbb8cf9 UI: correct toolbar w/ text display
Missed in tuple to dict refactor.
2018-04-26 08:18:41 +02:00
f7d9db5e68 Missed last commit 2018-04-26 08:10:52 +02:00
52454f1290 UI: fix toolbar naming collision bug
Active tool name needed to be unique from all other tools.
This caused problems since different modes have different tools with the
same name (Armature/Mesh click to extrude for eg).

Tool names now only need to be unique per mode.
2018-04-26 08:09:03 +02:00
27d837a6ac Workbench: Shader compilation 2018-04-26 08:06:22 +02:00
e4ee23f780 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-26 07:52:09 +02:00
3e2edb160f UI: update tool docstring
Also assert on invalid tool definitions.
2018-04-26 07:39:15 +02:00
37ca6ef7d8 UI: use dict for tool definitions
Using tuple was becoming too cryptic - new settings needed to be added
last and the purpose of each wasn't very clear.
2018-04-26 07:31:39 +02:00
db68166ed8 UI: update icons from @billreynish 2018-04-25 22:03:47 +02:00
c509922605 UI: use a wider minimum menu width
Icon only buttons with menus would be too narrow,
especially buttons for selecting tools.
2018-04-25 21:54:29 +02:00
6c1a121aef Workbench: normal packing
Normal packing. The sign is stored in the A of the color buffer.
if the A == 1.0 the normal should be inverted. before use.

The reason is that packing has more precision for frontfaces, than for
backfaces
2018-04-25 21:33:59 +02:00
8430249791 UI: shrink operator menu hold triangle a little 2018-04-25 21:24:55 +02:00
7a67bb7018 UI: workaround for text & icon alignment
Blender's icons weren't written to draw different sizes.
For now ifdef in a hack to show toolbar icons larger.
2018-04-25 21:02:50 +02:00
700012b66e UI: icon-only hold popup uses region alignment
Gives nicer tool popups for icon only buttons.
2018-04-25 20:51:49 +02:00
81f19b0c5f Fix selection with image planes 2018-04-25 19:01:41 +02:00
ce7c6e3894 Multi-Pose: Port POSE_OT_select_mirror 2018-04-25 18:35:20 +02:00
46bfdb48a1 WM: Add GHOST lazy init for background mode.
This allows for background rendering with EEVEE and other opengl render
engine.

I've only tested it on Linux for the moment so I can't say about other
platforms.

We do lazy init because we cannot assume we will need Ghost for rendering
before having parsed all arguments and we cannot know if a script will
trigger rendering. This is also because it currently does not work without
any display server (blender will crash).
2018-04-25 17:43:18 +02:00
56fbdd7908 GHOST: Fix missing glXCreatePbuffer initialisation.
For some reason this happened if no windows are created before creating an
offscreen context.
2018-04-25 17:43:18 +02:00
284dbd56df GHOST: GLX: Remove old version check. 2018-04-25 17:43:18 +02:00
5337f66e81 EEVEE: UI: Add missing separator. 2018-04-25 17:43:18 +02:00
d19dc5f891 EEVEE: UI: Merge the custom parallax checkbox with the panel title. 2018-04-25 17:43:18 +02:00
0113693129 Merge branch 'master' into blender2.8 2018-04-25 17:27:23 +02:00
f69feb4957 UI: optionally pass icon size to widget_draw_icon
No functional changes.
2018-04-25 17:26:45 +02:00
e584f3d8d2 Depsgraph: Don;t use copy actions flag
Is useless without main.
2018-04-25 17:00:41 +02:00
99c5bd0cd9 Merge branch 'master' into blender2.8 2018-04-25 17:00:19 +02:00
89bcc80c25 Library: Add assert to catch unsupported copy flags combination
Thanks Bastien for review!
2018-04-25 16:59:35 +02:00
fa43886690 Workbench: make normal packing optional 2018-04-25 16:57:18 +02:00
75e0767849 Merge branch 'master' into blender2.8 2018-04-25 16:35:11 +02:00
a153acde1d Depsgraph: Introduce flag top indicate scene is evaluating for a new frame 2018-04-25 16:34:55 +02:00
e5633114cd Depsgraph: Preserve CoW ID recalc flags
Previously they would have been replaced with flag from original
datablock, which is not what we want.
2018-04-25 16:34:55 +02:00
29631ff013 Depsgraph: Ensure we only expand scene datablock on evaluation
Previously it could have happened on every request to evaluated scene
or view layer.

This commit also removes expansion of view layer and scene from iterator.
Iterator is not to be used before depsgraph is evaluated.
2018-04-25 16:34:55 +02:00
09da47b67a Depsgraph: Avoid hash lookup for every evaluated scene query
Cache pointer to evaluated scene datablock on relations build time,
that pointer never changes after that.
2018-04-25 16:34:55 +02:00
331e97bcf3 Depsgraph: Fix missing relations in array modifier
Found by Dr. Sybren while working on modifiers port.
2018-04-25 16:34:01 +02:00
5f97331ffc Workbench: Added studio lighting to view layer 2018-04-25 15:59:15 +02:00
a9d3f9f54d Revert "UI: fix inconsistency in button rounding when zooming in."
This isn't working well when zoomed out in the properties editor,
we should be taking into account properties editor zoom level.

This reverts commit 1ba91ae2c0.
2018-04-25 15:42:41 +02:00
cc7460eaa4 Fix multi-edit mode on file load
Setting up the initial object mode would change objects which were
already moved into their mode along with the active object.
2018-04-25 15:29:20 +02:00
4b8d7a143e Merge branch 'master' into blender2.8 2018-04-25 14:54:34 +02:00
13b6867d1f CDDM: correct (disabled) logic in merge verts 2018-04-25 14:53:44 +02:00
cdfc4c0d1d Search local before system path
This works in both cases,
where system path would return a path even when it's missing.
2018-04-25 14:13:32 +02:00
c392f2448c Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-25 13:44:45 +02:00
a8f114258a Merge branch 'master' into blender2.8 2018-04-25 13:35:38 +02:00
Dalai Felinto
0357493033 Fix T54806: Editors drawing glitch when using lasso selection
We should always reset to default glBlendFunc after done drawing.
2018-04-25 13:08:34 +02:00
74b0976926 Merge branch 'blender2.8-workbench' into blender2.8
Support of hair in workbench
2018-04-25 13:08:02 +02:00
fe149da993 Edit Mesh: don't recalc all meshes w/ extrude 2018-04-25 13:06:03 +02:00
9e3e648a08 Depsgraph: Clarify python API
Follow same naming convention as for C:

- Original data is named without any extra prefix/suffix.
- Evaluated data is named with _eval suffix.
2018-04-25 13:04:14 +02:00
5345f28229 Workbench: Enabled Hair rendering 2018-04-25 13:00:18 +02:00
53dc251fd3 Remove developer exception hack
This caused too much trouble, also it's possible users run with
'release' in their CWD causing issues.

Developers can symlink "release/" to "bin/2.79".
2018-04-25 12:54:27 +02:00
d7d20b483a Revert "Fix (unreported) broken 'get system path' in some cases."
This reverts commit f1bc0aedde.
2018-04-25 12:48:51 +02:00
Dalai Felinto
1d7bdbd273 Edit Mesh: multi-object extrude_region
Technically this is the following operator:
bpy.ops.view3d.edit_mesh_extrude_move_normal

But this is a Python operator that in turns calls:
MESH_OT_extrude_region_move

Which in turns calls:
* MESH_OT_extrude_region
* TRANSFORM_OT_translate
2018-04-25 12:37:10 +02:00
7958a2b40e Docs: correct debug help message 2018-04-25 12:30:11 +02:00
26dab9c2fe Buildbot: Attempt to link against Blosc statically
Was broken by f1e6838376.
2018-04-25 12:27:35 +02:00
2de00f495d Merge branch 'master' into blender2.8 2018-04-25 12:26:26 +02:00
9a7f963a02 Cleanup: comments 2018-04-25 12:25:47 +02:00
fca3dbdba5 Fixed wrong merge 2018-04-25 12:23:44 +02:00
336abd6fac Merge branch 'blender2.8' into blender2.8-workbench 2018-04-25 12:20:45 +02:00
Dalai Felinto
791b9d821b Multi-View: Moving panel to render, and rename to Stereoscopy
Multi-View was never a per-viewlayer option. And now that we have viewlayer
it is better to name it in a more recognizable way:

"Stereoscopy" instad of plain "Views".
2018-04-25 12:12:43 +02:00
3315963f0a Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-25 12:06:03 +02:00
e236b2977c Overlay: Codestyle
removed unused code
2018-04-25 12:03:27 +02:00
c115021f8b Cleanup: unused vars 2018-04-25 11:59:52 +02:00
8f76d05fa5 Workbench: GLSL performance + code style
- store normal in vec2
 - use rgba_8 for colorBuffer
2018-04-25 11:54:02 +02:00
83528feeed Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-25 11:31:03 +02:00
f938ff1010 Workbench: Dither background color/gradient 2018-04-25 11:30:38 +02:00
9befee49a7 Fix: Silence texture stack owner_id warnings in debug mode from anim_filtering code
The Blender Internal removal (51b796ff15)
removed support for texture slots from Materials/Lamps/Worlds,
but didn't remove the relevant parts from the animation editor filtering
code that were responsible for adding the texture slots for those channels.
2018-04-25 11:18:45 +02:00
35220ccde0 Silhouette Overlap Overlay
Added Object Overlap Overlay

 - Added R32UI support to GPU_framebuffer
 - Added R32U support to draw manager
 - The overlay mode has a object data pass that will render 'needed' data to specific buffers so we can mix them together via a deferred rendering. In future will also add UV's and other data
 - Overlap is implemented as an overlay so it could be used on top of the Scene lighted Solid mode (that will be rendered by Eevee.

Reviewers: fclem, brecht

Reviewed By: fclem

Subscribers: sergey

Tags: #code_quest

Maniphest Tasks: T54726

Differential Revision: https://developer.blender.org/D3174
2018-04-25 11:09:49 +02:00
Dalai Felinto
fc8d903000 Edit Mesh: multi-object split 2018-04-25 10:58:59 +02:00
e649feea14 Merge branch 'master' into blender2.8 2018-04-25 10:39:51 +02:00
f1bc0aedde Fix (unreported) broken 'get system path' in some cases.
There were two issues here actually:
* The hack to allow running Blender directly from the source directory
would just check for a 'release' directory, without actually ensuring it
is release dir from blender source tree, and not some other random
folder.
* GHOST_getSystemDir returns nothing for portable installations, now
we'll then check directly in the blender binary dir in that case.

This fix is more critical in 2.8 branch, where that system path is used
to retrieve new '3D' icons...
2018-04-25 10:37:36 +02:00
5f8b85e253 Cleanup: use blender terminology 2018-04-25 10:17:31 +02:00
6866547517 Fix cursor switching w/ transform redo
Recent cursor changes stopped number button continuous grab.
2018-04-25 10:15:20 +02:00
3ae4aa720f Cleanup: indentation 2018-04-25 10:10:00 +02:00
f210c93945 UI: disable advanced option for redo popover 2018-04-25 10:08:04 +02:00
d63b66be82 CMake: only write edited file when changes made
Caused cmake to run after every icon update.
2018-04-25 09:58:38 +02:00
0d69dfbfc1 Cleanup: typos 2018-04-25 09:58:38 +02:00
Dalai Felinto
dfd82b18df Merge remote-tracking branch 'origin/master' into blender2.8 2018-04-25 09:31:25 +02:00
Dalai Felinto
5285de16f3 Fix string comparison in GNUMakefile for linux systems 2018-04-25 09:30:55 +02:00
2fe35914e1 CMake: generate icon list for installation
MSVC users weren't getting icons installed, since glob isn't reliable,
list all files in a section which the update script maintains.
2018-04-25 09:24:54 +02:00
4d6cdb8b89 UI: add extrude icon 2018-04-25 09:21:49 +02:00
deb98cfe5a UI: show all pain mode panels in the topbar
This shows some which need to be hidden (eventually).
2018-04-25 08:20:01 +02:00
ca49a9edce UI: move mode options to the topbar
Remove toolbar panels which have items available in menus.
2018-04-25 08:16:21 +02:00
b00d971efe UI: Apply remove redo region
This was a disabled part of the top-bar merge (code by @Severin)

The only change made is to move to redo UI into a popover.
2018-04-25 07:55:50 +02:00
e944e215bf UI: remove history & object tools
Add object shading menu.
2018-04-25 07:25:08 +02:00
021444c827 UI: mesh rip icons 2018-04-25 07:15:30 +02:00
6a9d215ad5 UI: remove mesh panel 2018-04-25 07:12:34 +02:00
64e3051ebe UI: remove shading & uv's panel 2018-04-24 21:07:05 +02:00
987fc30959 UI: disable grease pencil panel
Disable poll functions since branch replaces this code.
2018-04-24 21:05:24 +02:00
1a8b24e1b1 UI: move rigid body physics to menu 2018-04-24 20:46:18 +02:00
f3692c6ab9 UI: remove animation panel 2018-04-24 20:37:37 +02:00
Julian Eisel
2cd9a0ce5c Hide top-bar in fullscreen
Fullscreen as in the Alt+F10 fullscreen.
2018-04-24 20:16:44 +02:00
34d6b48c47 UI: remove relations panel 2018-04-24 19:54:22 +02:00
5d3f1d1f78 UI: remove transform panels 2018-04-24 19:35:11 +02:00
0c4ceda75b Fix NULL pointer check 2018-04-24 19:34:09 +02:00
d6e7ec6253 Cleanup: unused var 2018-04-24 19:28:53 +02:00
b05fd95f8a Current Frame Indicator tweaks
* Draw the frame/time number box over the scrollbar instead of above it,
  to reduce the clutter/clashes with markers.

* Draw the box centered around the line instead of off to one side,
  making it clearer that the frame shown is the one being affected.

* Make the box larger than the scrollbar + use white text to make it
  stand out from the neighbouring frame numbers (otherwise, it's easy
  to misread that it's just another one of those)
2018-04-24 19:18:31 +02:00
9511cc13d7 Bind Camera to Markers - Various tweaks to make this nicer to work with
Based on discussions here in the office, this commit introduces a number of
changes to make the "Bind Camera to Markers" feature (introduced during Sintel
to facilitate camera switching, and now an integral part of the UI for doing this)
nicer to use.

Main changes:
* "Camera Markers" are now drawn using Camera icons, making it easier to
   distinguish between them and other ("normal") markers

* "Camera Markers" will display the name of the bound marker, making it
   easier to see what camera each marker uses. This will then also stay
   in sync with the camera being used (though a manual refresh is needed
   after renaming objects to make the timeline update), fixing the problem
   where the marker's camera and the name get out of sync.

* Behaviour of Ctrl-B has been modified to make it easier to quickly add
  these markers. Now, it will directly add a new marker on the current frame,
  bound to the currently selected camera object. If there's an existing marker
  on that frame, the existing marker's camera will be replaced instead of making
  a new marker.
2018-04-24 19:18:31 +02:00
ef08e77a46 Markers: Move "Bind Camera to Marker" from 'View' Menu to the Markers menu proper
It was always weird that this tool for markers was stored in a different
menu where it was hard to find.
2018-04-24 19:18:31 +02:00
58650a7599 UI Tweak: Don't hide frame range indicators when preview range is shown
After discussing with UI team, it's better to show both ranges, to make it
clearer that we have an "overlay" with the preview range.
2018-04-24 19:18:31 +02:00
b671b1759c EEVEE: Fix TAA spreading black disease.
The SSR has a bug that creates NAN pixels values. Reported here T54795.
2018-04-24 17:54:39 +02:00
b60617ffab Error in last commit 2018-04-24 17:46:51 +02:00
bd40b2c402 Icons: only write icons from group 'Export'
Allows reference objects not to get mixed up with finished icons.
2018-04-24 17:45:19 +02:00
00d4e99955 UI: move mesh-weights from panels to menus
Also de-duplicate edit/object mode menus.
2018-04-24 17:04:43 +02:00
354dbdde01 UI: hide toolbar text when narrow 2018-04-24 16:33:38 +02:00
e4724b1c8b UI: remove create panel
Move create to the menus.
2018-04-24 16:13:03 +02:00
a59bf99f1d UI: remove toolbar header 2018-04-24 16:04:07 +02:00
9c5025d67d UI: use new icons in toolbar 2018-04-24 15:32:45 +02:00
174cb39192 UI: icons from @billreynish 2018-04-24 15:32:45 +02:00
2a9d008283 Manipulators: Fix Rotate manipulator arc drawing issue. 2018-04-24 15:06:27 +02:00
19808c347d Manipulators: Make rotate manipulator smoother. 2018-04-24 15:06:27 +02:00
adb915c1a6 Manipulators: Enable AntiAliased drawing of manipulators by default.
This exhibit some little artifacts inherent to GL_LINE/POLYHON_SMOOTH but
it's far less distracting than really bad Aliasing.
2018-04-24 15:06:27 +02:00
dd14145511 EEVEE: Fix contact shadows on flat objects/backfaces. 2018-04-24 15:06:27 +02:00
4e0a535670 EEVEE: Group Timing stats for probe rendering. 2018-04-24 15:06:27 +02:00
40199c1d10 Manipulator: Use evaluated object's matrix to get maipulator position
With the clear separation between data and a state we need to make sure
operators and other areas are readingstate from evaluated datablocks.

Code-wise it means that all evaluated values are to be read from dataglock
which is owned by dependency graph, using DEG_get_evaluated_id() or similar
helper.

Reviewers: brecht, mont29, campbellbarton, dfelinto

Differential Revision: https://developer.blender.org/D3036
2018-04-24 14:50:40 +02:00
bb92d9a946 BLI BVHTree Walk DFS: Decreases the size of the stack space used for the recursive function.
Each parameter of the function is copied into the memory stack.
This also brought an improvement in peformance of snapping functions between 5% and 12% in my tests.
2018-04-24 09:48:14 -03:00
eb521b22b2 Make View Selected to be aware of copy-on-write 2018-04-24 14:44:31 +02:00
4376bb6405 Multi-Object Pose: Apply Visual Transforms operator 2018-04-24 14:31:56 +02:00
b96f8bf7fb UI: display icons w/ OSA even when very large 2018-04-24 14:18:56 +02:00
c56bbf60d8 Outliner: reorganize collection related display modes.
* "Scenes" now shows for each scene lists of all view layers, collections and
  objects contained in it. This is the place to see all collections and objects
  in the scene even if they are not used in any view layer. Objects are nested
  according to parenting here.
* "Collections" now shows all collections in the view layer, and the objects
  in those collections. Objects are not nested by parenting, only collections
  since it would be too confusing if the children are in a different collection.
* "Groups" is unchanged.
* "View Layer" was removed, replaced by "Collections".

Part of T54790.
2018-04-24 14:01:51 +02:00
d67b120f17 UI: disable writing icon size
Causes staircasing, just use byte range
2018-04-24 13:52:25 +02:00
011c0b6113 Cleanup: correct comments 2018-04-24 13:50:31 +02:00
Stefan Werner
f1e6838376 Build: Added explicit search for Blosc in CMake files. Unix build will now disable WITH_OPENVDB_BLOSC if Blosc libraries cannot be found. 2018-04-24 13:26:54 +02:00
Stefan Werner
0ab30f9e39 Build deps: Fixed TBB build with GCC 6 and newer, turning off dead store elimination. 2018-04-24 13:23:52 +02:00
3e26b84397 Camera manipulator: Make it aware of evaluated version of object
Reviewers: brecht, dfelinto

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3159
2018-04-24 12:57:43 +02:00
15bfa175f8 EEVEE: LightProbe: Implement Visibility Group.
Works on every probe type.

The function to see is EEVEE_lightprobes_obj_visibility_cb.

Set pinfo->vis_data.cached to true makes the computation faster for multiple
views using the same group.

We could even sort the probes by group for that mater to speed things up
even more (only applies to dynamic probes like the planar reflections because
other probes are only rendered one at a time).
2018-04-24 12:48:43 +02:00
2ff8f965df DRW: Add visibility callback function.
This add a callback function that runs after frustum culling test.

This callback returns the final visibility for this object.

Be aware that it's called for EVERY drawcalls that use this callback even
if their visibility has been cached.
2018-04-24 12:48:43 +02:00
8fb9dfbec5 EEVEE: LightProbes: Add Visibility Group to DNA/RNA/UI. 2018-04-24 12:48:43 +02:00
9ff8195535 OpenGL: Remove remaining instances of GL_RGBA16F_ARB.
There is no need for it now that we use opengl 3.3. Use GL_RGBA16F instead.
2018-04-24 12:48:43 +02:00
7d859da513 Arc: Use proper lacding branch 2018-04-24 12:26:37 +02:00
Dalai Felinto
08e4808318 Fix EEVEE lamps with shadows by default but wrong UI
Reported on T54788: Actually this was what BI was doing as well.
But anyways fixed for good now.

That includes a subversion bump.
2018-04-24 12:25:41 +02:00
24bde1ca43 Add "make icons_geom" convenience target
Generates icons from the blend file in lib.
2018-04-24 12:09:31 +02:00
67f23cff53 Topbar: clarify command settings name, remove placeholder button. 2018-04-24 11:35:25 +02:00
1ba91ae2c0 UI: fix inconsistency in button rounding when zooming in.
Some widgets would have rounding relative to the button size, others
absolute. Now it's always absolute. Note changing Display Scale in the
user prefs is not zooming, the rounding still scales with that.
2018-04-24 11:10:08 +02:00
1da1288544 Check LOCAL datafiles if SYSTEM not found 2018-04-24 10:45:57 +02:00
45374b3880 Icon Generate: write icon size into the header 2018-04-24 10:32:08 +02:00
Stefan Werner
dac8b08f4c Build deps: Fixed capitalisation of CMake modules path for OpenVDB. Before, OpenVDB would always build without BLOSC and TBB support on case-sensitive file systems. 2018-04-24 10:28:38 +02:00
3581b997d4 UI: use icons for the toolbar 2018-04-24 09:19:28 +02:00
4b544e857c Merge branch 'master' into blender2.8 2018-04-24 08:01:21 +02:00
76b7142690 Merge branch 'blender2.8-workbench' of git.blender.org:blender into blender2.8-workbench 2018-04-24 07:59:18 +02:00
c1b310c32b Utility to generate geometry icons 2018-04-24 07:52:57 +02:00
Julian Eisel
10f0f4b06f Fix opening new windows would try to open global areas twice
Would cause weird & broken areas below the topbar.
2018-04-23 22:18:49 +02:00
92f36586e3 BLI_math: avoid assert with non-finite numbers 2018-04-23 21:09:01 +02:00
ab10181d57 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-23 20:45:24 +02:00
74b3947c90 Error in last commit 2018-04-23 20:44:41 +02:00
860642aba1 Error in last commit 2018-04-23 20:29:40 +02:00
1287fa3f7c UI: option to load icon from file 2018-04-23 20:24:49 +02:00
20105fc845 Static Override: initial enabling of overrides for modifiers and constraints.
Just the 'mute' button for now.
2018-04-23 18:10:06 +02:00
1fe4ade251 Merge branch 'blender2.8-workbench' of git.blender.org:blender into blender2.8-workbench 2018-04-23 17:04:13 +02:00
4498192813 Static Overrides: more performances improvements.
Moved another dynamic allocating print into (usually) static one, gives
us another average 8% speedup on Autumn rig.
2018-04-23 16:52:26 +02:00
fc9624e485 Merge branch 'master' into blender2.8 2018-04-23 16:44:09 +02:00
53d69e6d04 Depsgraph: Add relation flag to avoid flush across it
This way we can avoid re-evaluation of certain parts of datablock
when something unrelated has changed.
2018-04-23 16:42:37 +02:00
c8e1f18c5d stylecode cleanup 2018-04-23 16:13:50 +02:00
2e1ac7e2df Static Overrides: disable animated check for now.
This is actually rather slow process, commeting it out gives us another
10% speedup... On a non-animated char! Don't even want to know how much
this would have costed on a rig with hundreds of fcurves!

And checking this is not really critical for us anyway, once animated
you do not really care whether props are also statically overridden or
not.
2018-04-23 16:08:45 +02:00
a7960db471 Static Overrides: hide/deactivate all but 'REPLACE' operation.
Others remain in code for now, just not exposed to user.
2018-04-23 15:15:53 +02:00
d2f4b4962f Overlay: Object Overlap overlay
- Added UInt R support to framebuffers
- Added the overlap as an overlay so should be reusable by other engines
(Scene lighted Solid mode)

Differential Revision: https://developer.blender.org/D3175
2018-04-23 15:13:22 +02:00
054d7038cc Merge branch 'master' into blender2.8 2018-04-23 14:55:38 +02:00
86f988cede Overlay: Object Overlap overlay
- Added UInt R support to framebuffers
- Added the overlap as an overlay so should be reusable by other engines
(Scene lighted Solid mode)
2018-04-23 14:54:18 +02:00
0ca7a78f20 Depsgraph: Fix missing update with animated curve path 2018-04-23 14:53:54 +02:00
4529192157 Multi-Object Pose: Reset unkeyed works now (Clear User Transforms) 2018-04-23 14:51:24 +02:00
375f757a60 Cleanup: Remove old cruft (from 2.4) 2018-04-23 14:51:24 +02:00
Julian Eisel
6c46174662 Fix crash when opening file-browser through top-bar menus
Was probably caused by top-bar merge.
2018-04-23 14:36:42 +02:00
2183f93dbe Merge branch 'master' into blender2.8 2018-04-23 14:35:46 +02:00
41cf2d9042 Depsgraph: Cleanup, remove unused relation tag 2018-04-23 14:34:56 +02:00
89f7fb0aef Pqrtiql fix of some operators in object.py.
They were still trying to set active object of Scene.

Select hierarchy with extend option is still not zorking for some
;ysterious reasons. :/
2018-04-23 14:26:07 +02:00
d276ef7062 Fix typo in error message. 2018-04-23 14:25:42 +02:00
21c250926c Cleanup some remaining LOD stuff after BGE removal. 2018-04-23 14:12:34 +02:00
020c93360f Fix: Set defaults for converted timeline editors properly
(Summary channels for the "timeline" dopesheet wasn't collapsed as it should be)
2018-04-23 14:05:55 +02:00
3f21023f24 Fix: View All/Selected entries in new "timeline" not working
These entries were still referring to the old standalone timeline editor
2018-04-23 14:05:55 +02:00
9acf3a10cf Fix: Changing bone group color doesn't refresh/redraw viewport 2018-04-23 14:05:55 +02:00
Dalai Felinto
71eca8e82c Indentation cleanup 2018-04-23 13:53:11 +02:00
ede19477c8 Fix T54765: build error on macOS. 2018-04-23 13:42:43 +02:00
46a0e72540 Merge branch 'master' into blender2.8 2018-04-23 12:59:57 +02:00
7cb2727157 Fix git submodules branch configuration 2018-04-23 12:55:04 +02:00
b14979f91f Cleanup: style 2018-04-23 12:53:45 +02:00
d68f7c8e11 Depsgraph: Make update flags debug print more useful
Will print list of human-readable update flags, not the combined bitfield
printed as a number.
2018-04-23 12:53:43 +02:00
4df12b6ca6 DRW: Antialiased 3D cursor.
Common peeps! Why wasn't it already done?
2018-04-23 12:49:25 +02:00
100e10e4b0 WM: use last_redo operator
Was showing operators that weren't meant to display in the UI.
2018-04-23 12:36:20 +02:00
8264b772f5 Fix T54766: "Record With"-NLA "Push Down" discards Blend Mode, Extrapolation, and Influence
Applied similar fix to T54233 to get the "Record with NLA" feature working with
active action blending + influence settings. Extrapolation is explicitly ignored
though, as it shouldn't be used with this feature (i.e. it is already disabled
with the new strips and also on the animdata by default)
2018-04-23 12:35:37 +02:00
dc16f6fedc Fix T54767: Crash in versionning code for recent editors' removal.
Always check for non-Null pointers there! This versionning code is
called from many different places, with many different kind of Main's.
2018-04-23 12:31:03 +02:00
f19e8eaa4b Depsgraph: Avoid redundant copy-on-write relations
Was adding some relations twice. Harmless, but means extra stuff to do
when evaluating the scene.
2018-04-23 12:18:59 +02:00
cd289f6ea5 UI Tweak: Bring Graph Editor's mode selector left of the menus, as is now done for Dopesheet 2018-04-23 12:01:59 +02:00
fdf5834b44 Fix crash reading old userpref.blend
While window manager is supposed to exist after file was fully read
and do-versioned, we can not rely on window manager to exist while
reading file and setting up an environment.
2018-04-23 11:45:40 +02:00
63c4654135 Cleanup: uninitialized variable 2018-04-23 11:04:10 +02:00
fc1374c01b Cleanup: style 2018-04-23 11:04:10 +02:00
3aa75ba452 Merge branch 'master' into blender2.8 2018-04-23 09:35:20 +02:00
fa7e19bca4 Depsgraph: Add missing relations builder
Was possible to miss some relations from being built
when parent object is linked to the scene graph indirectly.
2018-04-23 09:33:33 +02:00
dea3ba6d81 UI: show arrow for popovers above buttons
Also don't align popover buttons with activated popovers.
2018-04-23 08:51:13 +02:00
9971eb4437 Cleanup: includes & comments 2018-04-23 08:10:03 +02:00
574c0fe38f Manipulators/Tools: always draw a cursor while interacting
Cursor can be a system one or drawn with OpenGL.
Before, dragging the transform manipulator would hide the cursor and reset it to the initial positon.
2018-04-23 00:59:01 +02:00
93adbf8195 Manipulators: tweak plane distance in move manipulator 2018-04-23 00:51:20 +02:00
ad0753218f Manipulators: removed unused structure member 2018-04-23 00:51:20 +02:00
Julian Eisel
c6144b24f9 Update default workspaces.blend fixing crashes after editor removals
* Fixes crashes in versioning code for the removed editor types (see d8c719d8d8)
* Removes 'Game Logic' workspace.

It still only contains workspaces converted from old screen-layouts, proper
defaults are on the TODO.
2018-04-23 00:18:31 +02:00
Julian Eisel
d8c719d8d8 Replace old Timelines and Logic Editors with new Dopesheet (Timeline mode)
Timelines and Logic Editors are gone. So far they were simply replaced by broken
Info Editors, now they are replaced by Dopesheets in the new Timeline mode.

We reuse ScrArea.butspacetype to temporarily store the space-type identifier of
the deprecated editor (see 9db492de6d). That way we can identify it in
versioning code and replace it nicely.
Action editor creation needs a scene to set the scrolling based on frame range.
Active screen-layouts use the active scene of the window they are displayed in.
Inactive screens simply use the first scene in the main data base.
Note that inactive editors don't need version patching, readfile.c converts them
to SPACE_EMPTY already, so users can't activate them.

Files saved since the editors were removed will still be broken.
Workspace config files saved before this will also crash (will update default
one in followup commit).
2018-04-23 00:12:26 +02:00
Julian Eisel
9db492de6d Cleanup: Get rid of ScrArea.butspacetype syncing with ScrArea.spacetype
The only real reason we need `butspacetype` is while switching areas, where we
need to delay the actual switch to the RNA _update callback since only there we
can access context.
So instead of trying to sync it with `spacetype`, only set while needed and
unset it afterwards (as in set to `SPACE_EMPTY`).

This should also allow us to re-use `butspacetype` in versioning code when
trying to read removed editors. It'll store the space type value of the removed
editor which we can then use on versioning.

For backwards compatibility, we store `butspacetype` with the value of
`spacetype`.
2018-04-22 23:23:20 +02:00
9eaf00616b UI: draw arrow for popover 2018-04-22 23:03:08 +02:00
Dalai Felinto
387bf726ac UI: Editor outline color themable
Note: Not bothering with doversion, re-using 280, 10 bump.
2018-04-22 22:55:18 +02:00
62cd5e0b7b UI: support for center popovers over buttons 2018-04-22 22:13:26 +02:00
Dalai Felinto
46375b8e03 Embossing for the areas only, with unified color
We bring back embossing however only for areas.
We use the same color for the corners.
2018-04-22 22:11:48 +02:00
20a713b7ff UI: number button arrows appear on hover, highlight clickable areas. 2018-04-22 21:48:53 +02:00
15ca90489f UI: make button roundness themeable. 2018-04-22 21:47:51 +02:00
b8404be8a8 Fix missing filter size in Eevee film panel. 2018-04-22 21:47:51 +02:00
e467916034 Cycles: rename engine to just "Cycles" instead of "Cycles Render" in the UI. 2018-04-22 21:47:51 +02:00
Dalai Felinto
3d62230ed6 UI: Remove Embossing
We are using a different visual system to tell the areas apart.
There is no longer need for embossing.
2018-04-22 20:11:36 +02:00
Dalai Felinto
342d62291b Action Zone: No need for drawing (the triangles)
Now that we can easily tell the corners apart, there is no need to
a specific action zone draw here (cursor still changes, naturally).
2018-04-22 19:54:26 +02:00
Dalai Felinto
d5af21f543 Action Zone: Enable them in the four corners 2018-04-22 19:54:26 +02:00
Dalai Felinto
8733ad4d2a UI: Draw round corners between the editors
This makes easier to distinguish between different editors
(as oppose to an editor and its regions).

Note action zones look a bit strange with this. I recommend we do next:
* Make sure all 4 corners can be used as action zones.
* Remove their drawing code (or show them only on mouse hover).
2018-04-22 19:54:26 +02:00
Dalai Felinto
90068773db UI: Move ui_draw_anti_tria to UI_interface.h
Using extern makes too easy to get a crash if the original
function definition changed.
2018-04-22 19:54:26 +02:00
Dalai Felinto
2d0c1f324c UI: Remove hard-code + add comment for aa triangles 2018-04-22 19:54:26 +02:00
43bceeedd9 Merge branch 'master' into blender2.8 2018-04-22 19:23:02 +02:00
89ab591345 Cleanup: UI naming 2018-04-22 19:22:10 +02:00
0d9c97d170 UI: moving the cursor to open other popovers
Match menu behavior
2018-04-22 18:43:59 +02:00
92404dd48d UI: popover now use menu style buttons
Also scale width with UI-scale.
2018-04-22 18:39:29 +02:00
e6d1fb87c6 UI: Initial popover support for panels
- UILayout.popover(.. panel_type ..)
  A single panel
- UILayout.popover_group(.. panel categories ..)
  Expands all panels matching args.

Currently used in the topbar for redo and paint options.
2018-04-22 17:45:14 +02:00
b8e7991811 Overlay: face orientation
- fixed the blending with solid drawtype
2018-04-22 12:58:11 +02:00
1de7a0c0dc Merge branch 'master' into blender2.8 2018-04-22 10:51:23 +02:00
420e379e99 Cleanup: de-dup popup/pie menu RNA definition
Also rename pupmenu -> popmenu
2018-04-22 10:49:45 +02:00
e597f7495a Cleanup: ui-link drawing code from logic bricks 2018-04-22 10:23:43 +02:00
5eb20bd152 Cleanup: style 2018-04-22 09:09:28 +02:00
c754ddf395 Remove unused shader
Originally added for icon drawing, no longer used.
2018-04-22 08:57:56 +02:00
02f28da187 Cleanup: trailing spaces
Applied to newly added files in 2.8
2018-04-22 08:45:52 +02:00
ba71184755 Lattice Select Random, Mirror
D3165, D3166 by @ranjian0
2018-04-21 23:52:47 +02:00
a0a8bc2719 Error in last commit 2018-04-21 23:52:16 +02:00
207b549d40 Edit Mesh: multi-object edge split support
D3161 by @JacquesLucke
2018-04-21 22:26:33 +02:00
Julian Eisel
5ddcfd2456 Fix crash when opening properties editor
Opening as in activating one in an area that didn't contain a properties editor
before.
2018-04-21 22:06:27 +02:00
25a529f440 UI: add own icon rasterizer
Use software drawing, cache to an image at the requested pixel size.
2018-04-21 21:10:09 +02:00
122d0d1504 Cleanup: style 2018-04-21 20:42:27 +02:00
46a9038f60 Cleanup: variable naming 2018-04-21 20:22:12 +02:00
112540da62 Merge branch 'master' into blender2.8 2018-04-21 20:17:41 +02:00
Julian Eisel
9a35ad752e Cleanup: Get rid of context in editor 'new' callback
Requiring context means we can't easily create new editors to replace deprecated
ones in versioning code.
Think it's reasonable to give editors access to scene and area data for their
initial setup though. They mostly need it for setting "the view", as in,
scrolling values.

Also did minor cleanup in top-bar creation function.
2018-04-21 19:47:27 +02:00
9ba84342fb Fix point density rendering in Cycles. 2018-04-21 19:43:41 +02:00
Julian Eisel
fa5aa18fdd Fix: Adding new 3D View changes custom transform orientation to gimbal
Steps to recreate were:
* Create custom transform orientation.
* Change properties editor into 3D View.
* Trigger refresh of 3D view header by mouse hovering it.

Mistake in rB7d055da327b9555f.
2018-04-21 19:05:15 +02:00
Julian Eisel
003e4e6b80 Top-bar: Don't draw horizontal region separator
That way the tabs look nicely together with the lower sub-bar.
2018-04-21 18:45:58 +02:00
1e9fb355bf BLI_bitmap: 2D triangle drawing function
Matching polygon filling but no need for allocation or qsort.
2018-04-21 18:34:34 +02:00
83cb387944 BLI math: clamped barycentric weight calculation 2018-04-21 18:34:20 +02:00
22bd1559e1 Fix active region flickering in some cases, now always update before draw. 2018-04-21 17:42:49 +02:00
c23f33ac9e View3D: Atenuate banding artifacts on background gradient.
Dithering the output color for 8bit precision framebuffer with bayer matrix.
On my tests the bayer matrux patterns are not noticeable at all.

Note that it also does that in opengl rendered mode which can be in a much
higher bitdepth. We can fix that if that's a problem in the future but I
doubt it will.
2018-04-21 16:49:38 +02:00
28a24db68a Fix feature set button misalignment. 2018-04-21 13:03:16 +02:00
0f2b4cb68a Topbar: remove info editor menus, rename topbar menus for script compatibility.
We can still rename them later, but avoid breaking stuff for now.
2018-04-21 12:43:27 +02:00
e89fefdc69 Topbar: visual tweaks
* Make bottom half of topbar a bit higher
* Make tabs higher and put them closer together
* Remove screen layouts dropdown, we'll have one layout per window
* Hide action zones from topbar
* Don't change topbar background color when activating
2018-04-21 12:41:20 +02:00
04fe5edba3 Fix: Typos in operator names were resulting in warnings being printed to the console 2018-04-21 00:34:55 +02:00
26ee70099a Fix: D3160 fixed blednerplayer stub.s for unix 2018-04-20 23:34:54 +02:00
e9d940ca2f Fix topbar UI w/ no active object 2018-04-20 23:08:08 +02:00
be648680c7 Fix frame-buffer texture creation
- disable depth buffer didn't work.
- push/pop viewport bit was needed.
2018-04-20 20:57:28 +02:00
6dc50bc25a Cleanup: warnings 2018-04-20 20:48:19 +02:00
18f239d5a8 Remove attempt at timeline editor version patching
This will never get run, because direct_link_area() already flags/resets
every space type isn't registered, meaning that we don't have any opportunity
to apply our patching.
2018-04-20 18:55:56 +02:00
5374865523 Dopesheet-Timeline: Removal of Timeline Editor!
This commit removes all references to the old timeline editor.

Unfortuantely, the removal of the Timeline spacetype defining
functions has ended up breaking the version patching code I'd
been working on earlier (as now, the editor gets marked as
"unknown/info" before we get a chance to patch it!)
2018-04-20 18:55:56 +02:00
b5b4802af6 Fix: Copy and paste error from earlier commit adding message_subscriber callbacks
All of these were previously using the timeline theme, instead of the one
for each respective editor
2018-04-20 18:54:41 +02:00
7be36661c2 Dopesheet-Timeline: Somewhat hacky version-patching code to switch old timelines to dopesheet-timelines
After a lot of failed attempts and head banging working trying to find a way to reuse
the standard editor-switching/creation code, I've just hacked in a temporary solution
here so that users can load old files and see the old timeline instances replaced
with Dopesheet-Timelines.

Note: This is not nice code, and copies a lot of the standard initialisation code,
but it works well enough for now. We can revisit this later when the other mode changes
come along.
2018-04-20 18:54:41 +02:00
60e2c60be7 Fix: Timeline's "Show Cache" options should not get reset on window size change
These were getting set in the init() callback instead of the new(). As a result,
the settings would get reset everytime you resized the window/area - not quite
something you'd really want happening everything the size changes!
2018-04-20 18:54:41 +02:00
6d0c59b011 Dopesheet-Timeline: Make sure ND_SPACE_TIMELINE notifier gets handled by dopesheet 2018-04-20 18:54:41 +02:00
b210ead73b Dopesheet-Timeline: Channels list now gets hidden automatically when switching to dopesheet-timeline 2018-04-20 18:54:41 +02:00
cafc1e1bb7 Add utility to make it easier to get editors/regions to redraw after changing visibility of regions
Previously, there was only an API method to toggle and update, but sometimes you
want to explicitly hide instead of just toggling.
2018-04-20 18:54:41 +02:00
e3ebe5c8c3 Dopesheet-Timeline: Collapse summary channel by default (so that it's more like default timeline)
TODO: Still can't figure out a way to get the channels region to hide
2018-04-20 18:54:41 +02:00
729dab4e66 Fix: Toggling preview range from timeline button didn't update animation editors
Most of these were missing the message bus stuff that now handles the update flushing.
2018-04-20 18:54:41 +02:00
af6a662798 Preview Range: Show preview range using a different color (based on ANIM_ACTIVE)
instead of using "black" curtains

With most editors now showing the start/end range by default, we need a way of
easily distinguishing when preview range is now enabled. By using a different color
(the exact color used is something we can change/adjust later), there is a more distinct
visual difference between them, making it easier to see what's happening.
2018-04-20 18:54:41 +02:00
c9fc11a314 AnimEditors: Draw start/end frame ranges on all timelines by default
This uses the global scene range, with styling matching the sequencer's start/end
frame drawing.

(The graph editor's "drivers" mode is exempt, as that doesn't really display time
in a linear way, so the start/end frames don't apply)
2018-04-20 18:54:41 +02:00
0f77060ebc Move the set start/end frame operators from Timeline to Animation module
Eventually the idea is that they'll get remapped to some more global/generic hotkey
that can get used across all animation editors (see T54728). However, to facilitate
the removal of the timeline editor, it's better we do this now.
2018-04-20 18:54:41 +02:00
91b1b35bba Dopesheet-Timeline: Ported over all (missing) notifiers/listeners/etc. from timeline to dopesheet
We already had most of these, but some of these were missing (e.g. pointcache and animplay)
as well as messagebus stuff. Hopefully I didn't miss any!
2018-04-20 18:54:41 +02:00
59a1ebabcd Cleanup: Remove the "SpaceTime->caches" and "SpaceTimeCache" stuff
These were runtime only data, used in pre 2.8 Blender to make use of GL vertex arrays
to draw these more efficiently. Maybe we might restore these sometime as an optimisation
step, but for now, they're not needing and were confusing.
2018-04-20 18:54:41 +02:00
b2eb76cd50 Dopesheet-Timeline: Ported over cache indicator drawing + settings used to control their visibility
These now live in the action editor/dopesheet related files.

Apart from these, the timeline didn't actually have other settings
of its own that were of any interest to anyone.
2018-04-20 18:54:40 +02:00
cc06e0fbe8 Dopesheet-Timeline: First steps towards making the Timeline a mode of the DopeSheet Editor
For many years, animators have been requesting the ability to edit keyframes in the
timeline. However, implementing such tools in the timeline quickly becomes a slippery
slope, where we'll eventually end up having to duplicate all the functionality from the
dopesheet editor.

Discussing with William and Pablo this morning, we realised that perhaps it might be possible
to just make the Timeline a mode of the Dopesheet Editor (and kill off the old standalone
Timeline), meaning that we essentially get all the Dopesheet Editor goodness for free!
Also, with some proposed UI updates (i.e. allowing "submodes" of editors to be part of the
the main editors selector), it might not even matter that there isn't an "actual" timeline
editor anymore.

This commit implements the following changes (which are actually sufficient for supporting
most basic workflows):
* Timeline mode in Dopesheet Editor
* Tweaks to UI code to make the Timeline header/menus show up in Dopesheet editor

TODO:
* Hide channels list when switching to timeline mode
* Port over cache-file indicators
* Add missing timeline-only settings that need a new home in the dopesheet
* Go through fixing all timeline editor operators (e.g. Bind to camera)
* Port over start/end frame shading (and adjust preview range rendering to make the
  distinction between these clear)
* Remove old timeline editor, and transfer over any leftover code
2018-04-20 18:54:40 +02:00
73d2e6f202 Eevee: TAA Reprojection: Initial implementation
This "improve" the viewport experience by reducing the noise from random
sampling effects (SSAO, Contact Shadows, SSR) when moving the viewport or
during playback.

This does not do Anti Aliasing because this would conflict with the outline
pass. We could enable AA jittering in "only render" mode though.

There are many things to improve but this is a solid basis to build upon.
2018-04-20 18:29:33 +02:00
be307d6032 Eevee: TAA Reprojection: Add layer property. 2018-04-20 18:29:33 +02:00
e2613e4051 Eevee: Add Velocity pass.
This pass create a velocity buffer which is basically a 2D motion vector
texture. This is not yet used for rendering but will be usefull for motion
blur and temporal reprojection.
2018-04-20 18:29:33 +02:00
358dfe6ac9 DRW: Cleanup: Make DRW_shgroup_uniform_mat4 uniform expect float (*)[4]
Same thing for mat3.
2018-04-20 18:29:33 +02:00
9c274b0d52 Eevee: Contact Shadows: Fix blue noise correlation. 2018-04-20 18:29:33 +02:00
Julian Eisel
5f6c45498c UI: New Global Top-Bar (WIP)
== Main Features/Changes for Users

* Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars.
* Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector.
* Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here.
* Individual sections of the topbar are individually scrollable.
* Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting.
* Top-bar should scale nicely with DPI.
* The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes).
* Info editors at the top of the window and using the full window width with be replaced by the top-bar.
* In fullscreen modes, no more info editor is added on top, the top-bar replaces it.

== Technical Features/Changes

* Adds initial support for global areas

  A global area is part of the window, not part of the regular screen-layout.
  I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas.
* Adds a TOPBAR editor type

  The editor type is hidden in the UI editor type menu.
* Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY)
* Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar.
* Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds.

  The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved.
* Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code.

Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being.

NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility.

== ToDo's

It's a bit hard to predict all the ToDo's here are the known main ones:
* Add options for the new active-tool system and for operator redo to the topbar.
* Automatically hide the top-bar in fullscreen modes.
* General visual polish.
* Top-bar drag & drop support (WIP in temp-tab_drag_drop).
* Improve dynamic regions (should also fix some layout glitches).
* Make internal terminology consistent.
* Enable topbar file writing once design is more advanced.
* Address TODO's and XXX's in code :)

Thanks @brecht for the review! And @sergey for the complaining ;)

Differential Revision: D2758
2018-04-20 17:14:52 +02:00
4bfb6d21df Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-20 16:42:33 +02:00
c4e007d5f6 Workbench: Removed Clay engine draw mode
- need a draw mode in workbench engine.
- reorganized render engine retrieval in 3d view. There are 2 places
where this happenes 1. 3d view draw code and 2. draw manager.
the draw manager code is not used for external engines, currently added
an exception in for cycles. will need to have a better solution in
place.
2018-04-20 16:40:08 +02:00
57221d8e83 More debug timing info from main RNA diffing func. 2018-04-20 16:04:57 +02:00
b95df9957d UI: move manipulator to tool-system
Current manipulator now follows active tool.
2018-04-20 15:59:42 +02:00
8ec25e5dcc UI: Python API defining dynamic icons
Currently only able to define geometry icons.
2018-04-20 15:33:09 +02:00
bc11cb3daa UI: Support for runtime geometry icons 2018-04-20 15:26:06 +02:00
a1cc75f22d Fix building w/o clay 2018-04-20 15:26:06 +02:00
1f625cbfea Merge remote-tracking branch 'origin/master' into blender2.8 2018-04-20 15:13:06 +02:00
e5bb234f64 Cleanup (followup commit for D3160)
Added some spaces to keep the eInsertKeyFlags enumeration proper
2018-04-20 15:09:56 +02:00
792eab8190 Merge remote-tracking branch 'origin/master' into blender2.8 2018-04-20 15:05:22 +02:00
ff839fb6c1 Fix: D3160 Propose to use proper typedefs to avoid confusion
Differential Revision: https://developer.blender.org/D3160
2018-04-20 15:02:11 +02:00
50579da91a Workbench: Clay renderer was not accessible anymore
issue was the factoring of the workspace engine that was removed. the logic implied that the clay could not be rendered as clay will be a draw mode we placed it already there so it is accessible in any engine. Should eventually fix the clay engine by migrating it to the workbench engine.
2018-04-20 14:52:16 +02:00
c7d3eb2a7e Workbench: Draw random object colors
Basic implementation hashes the ob->id.name. In the future we should use
an golden ratio offset algorithm as it can make a better random
palettte.
2018-04-20 14:38:55 +02:00
f18213ae3a Workbench: drawtype_* => drawtype_options, drawtype_lighting
In the new design the lighting is shared across the drawtypes.
the drawtype_options will be used for viewport draw engine settings
2018-04-20 13:40:18 +02:00
b4aff90fd0 Workbench: Face orientation blending 2018-04-20 13:01:16 +02:00
6f61983da3 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-20 12:49:02 +02:00
7d38379e49 Workbench: Face orientation overlay
- Removed the depth pass as it will reuse the depth pass of the render
engine
- Used gl_FrontFacing to determine the facing
- Blender the result with the render engine result
2018-04-20 12:46:37 +02:00
89bdc208d1 Static overrides optimization: 30% quicker.
use stack instead of always allocating memory for RNA paths of checked
properties! From average 167ms to 118ms here with Autumn rig... Still a
lot to improve, but that's already much better.
2018-04-20 12:21:11 +02:00
03a916e5b5 Edit Mesh: multi-object support for 'Symmetrize' 2018-04-20 11:04:11 +02:00
3b100c5a2a Depsgraph: Add utility functions to go from evaluated to original datablock 2018-04-20 11:02:21 +02:00
bf63fee23e Merge branch 'master' into blender2.8 2018-04-20 11:01:29 +02:00
ac8f6413cc Fix usage of lib filepath in previous own commit... 2018-04-20 11:00:12 +02:00
3c524178bc Merge branch 'master' into blender2.8 2018-04-20 10:49:14 +02:00
88bbb68ad0 Add debug tool to check validity of current file *before* saving.
It is hidden behind the --debug-io flag for now.

Idea is to try to catch broken libraries state in current Main before we
actually write the file on disk, should help catching and understanding
what happens in Spring corruption cases.
2018-04-20 10:46:59 +02:00
cc0c971f84 Workbench: Added the basics for the OverlayMode
Implemented the face orientation overlay for testing.
Overlay mode is only drawn when there are overlays to be rendered.
The overlay mode is rendered before the object mode.
2018-04-20 10:45:46 +02:00
36773e35f6 Remove Armature Sketching & Retarget
While the feature is interesting, it's not much from what we can tell.

Retargeting is an important feature but needs
to fit in better with typical animation work-flows.

See: T52809
2018-04-20 10:34:48 +02:00
98422c36ab Edit Mesh: use a single report for remove doubles
Report all doubles removed instead of report per-object.

Also correct use_unselected check.
2018-04-20 10:34:48 +02:00
801270f09d Edit Mesh: Correction to previous commit
The operation is based on faces, not vertices
2018-04-20 10:22:05 +02:00
0e5a4f927a Edit Mesh: multi-object support for 'Make Planar Faces' 2018-04-20 10:16:05 +02:00
8c269d94f4 Limit updates to active view layer only
This is rather uncommon when operator will operate on a non-active view layer,
so there is no need to do full scene update.

This change solves lag first time using Extrude operator in edit mode.
2018-04-20 10:03:27 +02:00
dda7e3b695 VSE Effects: Wipe box: fix compilation errors
This is still broken I cant tell if it is the fact that the in_band
funtion does not work properally or an issue in the box algorithm, or
both.

It seems like the calculation of the size of the box while roatated
needs to be fixed also.
2018-04-19 18:44:56 -04:00
22b2bab702 Edit Mesh: multi-object support for 'Remove Doubles'
@campbellbarton: This operator works (as intended) on an object level, wich means that it won't remove doubles for vertices that are close to each other but contained in different objects - is that really helpful?
2018-04-20 00:25:57 +02:00
daff3c442f Fix mistake in previous GLSL cleanup commit. 2018-04-19 19:37:05 +02:00
Dalai Felinto
bef7d67cf5 Triangulate operator: Free memleak
The leak was introduced in the recent changes to
support multiple-object editing.
2018-04-19 19:20:48 +02:00
26207c278e Fix build error with Windows / MSVC. 2018-04-19 19:03:54 +02:00
470c25e5f1 Cleanup: removed unused GLSL shader functions. 2018-04-19 18:16:18 +02:00
c0a7fef591 Cleanup: unused functions 2018-04-19 18:14:01 +02:00
bca7563d07 Merge branch 'master' into blender2.8 2018-04-19 18:11:49 +02:00
e2678d6b7b Cleanup: make variable name English 2018-04-19 18:10:51 +02:00
307492c2db Cleanup: rename vlak -> poly 2018-04-19 18:08:55 +02:00
d03024f6b3 Cleanup: warnings 2018-04-19 18:07:06 +02:00
51b796ff15 Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!

* Point density, voxel data, ocean, environment map textures were removed,
  as these only worked within BI rendering. Note that the ocean modifier
  and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
  with BI. If we ever wanted to support this again probably it should go
  through the baking API.
* GPU shader export through the Python API was removed. This only worked
  for the old BI GLSL shaders, which no longer exists. Doing something
  similar for Eevee would be significantly more complicated because it
  uses a lot of multiplass rendering and logic outside the shader, it's
  probably impractical.
* Collada material import / export code is mostly gone, as it only worked
  for BI materials. We need to add Cycles / Eevee material support at some
  point.
* The mesh noise operator was removed since it only worked with BI
  material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
  for BI material texture slots. Could be added back with node support.

* Not all legacy viewport features are supported in the new viewport, but
  their code was removed. If we need to bring anything back we can look at
  older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
  that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
  used anywhere now. We may eventually use this to replace the texture
  nodes with Cycles / Eevee shader nodes.

* The Cycles Bake panel now includes settings for baking multires normal
  and displacement maps. The underlying code needs to be merged properly,
  and we plan to add back support for multires AO baking and add support
  to Cycles baking for features like vertex color, displacement, and other
  missing baking features.

* This commit removes DNA and the Python API for BI material, lamp, world
  and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
  are reusing some old BI properties but the names are not really correct
  anymore.
* Texture slots for materials, lamps and world were removed. They remain
  for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
  other renderers use this to find all panels to show, minus a few panels
  that they have their own replacement for.
2018-04-19 17:35:25 +02:00
785e8a636a GHOST: Fix processEvents not notifying events handled by the system if the window is hidden.
Reviewed By: @LazyDodo
Differential Revision: https://developer.blender.org/D3154
2018-04-19 11:26:33 -03:00
ffe02e17b2 GWN Immediate: use GWN_BATCH_OWNS_VBO for created with imm immBeginBatch. 2018-04-19 11:24:10 -03:00
1266a36b87 UV Editor: Fix memleak with loop_vbo and loop_batch. 2018-04-19 11:22:16 -03:00
ec86bebb87 UV Editor: Style: rename variables to match others. 2018-04-19 11:20:13 -03:00
95e39943ef UV Editor: Fix memleak from recent changes. 2018-04-19 15:47:02 +02:00
733fd3eabd Workbench: removed per collection object color
Will be part of the collection manager where per collection the
ob->col can be set. This currently depends on DepsGraph +
CollectionManager.

I removed it for now so the code won't influence development
2018-04-19 15:22:30 +02:00
8a2f0058ae Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-19 14:49:34 +02:00
a305652d87 Workbench: Diffuse studio lighting 2018-04-19 14:48:53 +02:00
723c33aba0 UV Editor: Fix overflow issue with IMM usage.
Use batch API in this case.

It's not the ideal solution (slow) but it works.
2018-04-19 14:25:59 +02:00
e2dce975bc UV Editor: Fix imm assert about program still bound. 2018-04-19 14:25:44 +02:00
9d6a175756 Merge branch 'master' into blender2.8 2018-04-19 12:53:21 +02:00
da82269c58 Cleanup: rename Icon.type -> id_type
Confusing when adding non-id icons.
2018-04-19 12:52:32 +02:00
0a679c6b68 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-19 12:47:11 +02:00
b0d5e74fcc Workbench: drawtype object color from collection to v3d
Now every 3d view can have its own solid draw color setting
2018-04-19 12:44:37 +02:00
2029697861 Fix: Armature display settings (names, axes, shapes, etc.) didn't refresh view with Copy on Write enabled
Now we need to tag the depsgraph to inform all copies that stuff changed.
2018-04-19 12:37:17 +02:00
b352d2705d Depsgraph: Fix crash with copy-on-write enabled
Was caused by ec0756af6c, once again, we can't pass view layer,
need to pass index.

The sad part is that currently we don't have quick way to look up
view layer by index. Can do similar thing as we do for bones and
bases.
2018-04-19 12:05:17 +02:00
caa7101df5 Fix edit-bone select crash w/ multi-edit
Also avoid duplicate base lookups and minor cleanup.
2018-04-19 11:30:22 +02:00
f2a3579661 Fix bug with NULL context being used in undo
Caused sculpt to crash.
2018-04-19 11:12:57 +02:00
63225d7c8b Port particle instance modifier changes from Gooseberry branch
The work is mainly from Lukas Toenne, with some modifications from myself.

Includes following obvious changes:

- Particle system selection is now name-based, with lookup menu.
- Lots of new options to control varieties.

Changes comparing to the Gooseberry branch:

- Default values and versioning code ensures same behavior as the
  old modifier.

- Custom data layers are coming from vertex color, the modifier
  does not create arbitrary layers now. The hope is to keep data
  more manageable, and maybe make it easier to select in the shader
  later on.

  This means, values are quantized to 256 values, but it should be
  enough to get varieties in practice.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D3157
2018-04-19 10:51:18 +02:00
a8db1efbcf Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-19 10:42:03 +02:00
3a4a5ed378 Workbench: added draw_scene_finish to workbench_materials 2018-04-19 10:41:24 +02:00
1802c6e4a1 Fix use of missing properties in UI after game engine removal. 2018-04-19 10:32:39 +02:00
79899373eb Finish use-after-free in workbench code.
GHash should probably not own the data itself, but that's other question
to be fixed later, at least this fixes the crash.

Solution by @fclem, thanks!
2018-04-19 10:25:52 +02:00
8a923e5295 Code cleanup 2018-04-19 09:51:22 +02:00
163b631122 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-19 09:49:44 +02:00
16fac020e0 Workbench: Option to use Object color
- added `object_color_type` where the user can set if the collection
determines the color, or the object will be used for the color.
Implemented it as an enum as later this can have a random color option.
- moved OB_LIGHTING_* to DNA_view3d_types and renamed it.
- Fixed some DRY in workbench_materials.c. Can remove more DRY's but
will need to discuss the responsibility of the workbench engine as it
might become part of the eevee renderer.
2018-04-19 09:45:52 +02:00
95a45e308d BMesh: Add back call to finish operator
Was commented in multi-edit patch, finish is needed to free memory.
2018-04-19 09:10:10 +02:00
81673f5ab7 Fix T54712: Undo w/ multi-edit failed 2018-04-19 08:58:49 +02:00
9a301978bd Merge branch 'master' into blender2.8 2018-04-19 08:18:42 +02:00
fcac9e8410 Cleanup: style 2018-04-19 08:18:16 +02:00
9f7f6d5540 Undo: add missing flag for text delete 2018-04-19 08:16:37 +02:00
1f5d51e44e Cleanup: style 2018-04-19 07:47:03 +02:00
5b45d32f3a Edit Mesh: multi-object support for 'Decimate Geometry' 2018-04-19 00:30:05 +02:00
7c415e6fd7 Edit Mesh: multi-object support for 'Vertices Only' extrusion (Alt+E) 2018-04-19 00:03:51 +02:00
07774d4860 Edit Mesh: multi-object support for 'Individual Faces' extrusion (Alt+E) 2018-04-18 23:55:27 +02:00
d8f70a26fd Edit Mesh: multi-object support for 'Edges Only' extrusion' 2018-04-18 23:53:21 +02:00
1ade071052 Edit Mesh: multi-object duplicate_move support 2018-04-18 23:18:08 +02:00
abeae5d38e Cleanup: indent face poke example 2018-04-18 23:16:34 +02:00
75133f5d7c Cleanup: Use BLI_layer / BLI_view_layer prefix
Also use doxy sections for iterators.
2018-04-18 21:18:05 +02:00
69c42ad57b Cleanup: consistent changed_multi assignment 2018-04-18 19:22:00 +02:00
Dalai Felinto
4704f2687a Edit Mesh: multi-object flip normals support 2018-04-18 19:15:01 +02:00
7560aabf71 Pose: multi-object Flip Quats 2018-04-18 19:11:11 +02:00
e0478ae92f Pose: multi-object support for clear transform 2018-04-18 18:56:27 +02:00
602f0bc2d4 Use macros for looping over pose bones 2018-04-18 18:56:27 +02:00
42b0cd1ea0 MSVC: use 'unsigned int' 2018-04-18 18:56:27 +02:00
ec0756af6c Depsgraph: Fix base flag flush for objects from set scene
Fixes view_layer_background_set regression test.

This makes Dalai happy! :)
2018-04-18 18:05:37 +02:00
3701cf785c Depsgraph; Correct assert for depsgraph scene
We can not do it from builder, since builder will pull set scenes.
2018-04-18 17:43:15 +02:00
3c7254ffb6 Depsgraph: Fix missing bases array update
view_layer_object_copy test was broken.

This is a quick fix for now, can be optimized further later.
2018-04-18 17:35:05 +02:00
4ec55350d4 Edit Mesh: improve subdivide multi-object
Don't run the operator on faces/edges without selection.
2018-04-18 17:22:51 +02:00
3a9669bfff Edit Mesh: multi-object poke support 2018-04-18 17:15:58 +02:00
Dalai Felinto
422f939f95 Fix layer unittests after scene/workspace engine changes
Note: view_layer_background_set and view_layer_object_copy still fail.
But they were failing before.
2018-04-18 17:06:57 +02:00
f9cf2e2f6c Workspaces: remove workspace engine, use 3D viewport draw mode instead.
ViewRender was removed, which means we can't get the render engine for files
saved in 2.8. We assume that any files saved in 2.8 were intended to use Eevee
and set the engine to that.

A fix included with this is that .blend thumbails now draw with Clay mode,
and never Eevee or Cycles. These were drawn with solid mode in 2.7, and should
be very fast and not e.g. load heavy image textures.

Differential Revision: https://developer.blender.org/D3156
2018-04-18 16:35:38 +02:00
15850a8740 Workbench: don't change to workbench drawtype for files saved in 2.8.
Assume files saved in 2.8 were intended for Eevee and set them to material
viewport shading. In Eevee this is equal to rendered draw mode, in Cycles
this will draw with Eevee. This way Eevee demo files still show something
interesting when opened.
2018-04-18 16:35:38 +02:00
34dbe7ff33 UV Edit Draw: Fix assert in immBeginBatch -> vertex_count_makes_sense_for_primitive. 2018-04-18 11:34:44 -03:00
24b3b9fa21 Fix bad merge conflict resolution
Line got lost..
2018-04-18 16:12:56 +02:00
3b209a45de Fix missing initialization of depsgraph for snapping context
Was causing crashes once attempting to use snapping.

Reported by mano-wii in IRC, thanks!
2018-04-18 15:41:51 +02:00
2108142934 Workbench: use SET_UINT_IN_POINTER for hashes 2018-04-18 15:16:21 +02:00
c86975d90a Merge branch 'blender2.8' into blender2.8-workbench 2018-04-18 15:06:03 +02:00
5cc92a376b Workbench: fixed C++ style comments 2018-04-18 14:56:25 +02:00
b3e479757e Cleanup: Indentation 2018-04-18 14:46:33 +02:00
3bacd17b1c Added comment to explain MeshRenderData.orco 2018-04-18 14:13:20 +02:00
c67a2bd5ba Merge branch 'master' into blender2.8 2018-04-18 13:55:09 +02:00
f28aec17e9 Depsgraph: Fix missinf relation for particle instance modifier
Was causing lack of animation update when particle system had simulation,
2018-04-18 13:54:02 +02:00
8a71c139d8 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-18 13:53:22 +02:00
a091da7ffa Workbench: reuse similar materials
Similar materials will reuse the same shadergroup. Currently using
a custom hash function that might select too similar colors into the
same material.

Reintroduced the workbench_materials.c this file will be responsible for
material lookup/creation and shader compilation

Fixed a GPUShader mem leak
2018-04-18 13:44:33 +02:00
3811998177 Cleanup: Trailing whitespace 2018-04-18 12:31:26 +02:00
9b338e8028 Merge remote-tracking branch 'origin/master' into blender2.8
Explicitly undoing 287d1924fa here, as that was a master-only change.
2018-04-18 12:28:13 +02:00
287d1924fa Remove irrelevant print statement
This statement is only relevant in 2.8, but causes confusion in master.
I kept the 'default' label to prevent compiler warnings about unhandled
cases. The break is needed because there should be at least one statement
after 'default'.
2018-04-18 12:26:40 +02:00
ea0630ade6 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-18 12:11:59 +02:00
661226959c WORKBENCH: Solve C2016 compile errors 2018-04-18 12:11:36 +02:00
2117e46e5b Disable auto-override for all but active object in group case.
I.E. only enable auto-override for 'active' selected object when making
an override of a linked group. This will ease on auto-override creation,
and you typically do not want to auto-override most objects in the group
anyway (in proxy system, you could only proxyfy one object of the group
anyaway!).
2018-04-18 11:41:07 +02:00
10ce4719d4 Object Mode: Outlines: Make outline thinner.
This is by default. We can still enable the thicker outlines for high dpi
screens or personnal preference but it's not used atm. This also improve
the performance removing 1/3 of the outline cost.
2018-04-18 11:34:53 +02:00
3054a96981 Object Mode: Outlines: Fix sample coordinates. 2018-04-18 11:34:53 +02:00
7cdc0b76aa Make depsgraph tag for auto-override IDs it updates.
This will reduce amount of needless auto-override checks, at least when
not touching anything related to overriding IDs...
2018-04-18 11:25:31 +02:00
0afe103269 Particles: Interpolate size for interpolated children
This finally allows us to use Random factor to add variations to the
interpolated children. This feature never worked since 2007L there was
random factor slider in the interface, but it was only used by simple
children. Now it has affect on interpolated children as well.

Technically, this will break compatibility if older file had random
factor set to something else than 0 (default value is 0 though). But
we are leaving 2.7 series, so can accept such breackage in the name
of supported features.
2018-04-18 10:52:27 +02:00
05ef225272 Cleanup: rename 'static override regarding reference ID' tag.
Just 'OK' was waaayyyyyy too generic!
2018-04-18 10:45:50 +02:00
773205ada0 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-04-18 10:44:52 +02:00
ed72eedd07 Workbench: Fixed SegFault
In more complex models the object color uniform data is freed before rendered.
We should copy it to local data. but for now we redirected it to a
constant.
2018-04-18 10:43:03 +02:00
a02feaeba9 Cleanup: merge checks for same version 2018-04-18 09:20:28 +02:00
7d055da327 Move transform orientation to scene
This was stored in the workspace, selected from the view.
Move both to scene since custom orientations are closely related to your
scene data.
2018-04-18 09:16:15 +02:00
33ba170f5c Cleanup: unused var 2018-04-18 09:16:15 +02:00
d9051c46fd Merge branch 'blender2.8-workbench' into blender2.8 2018-04-18 08:25:59 +02:00
b7f50f651f Cleanup: unused var 2018-04-18 08:23:59 +02:00
ee11c85c06 CMake: make recent bad level include explicit
This isn't something we should do,
each instance should be noted and removed.
2018-04-18 08:21:24 +02:00
ccb104b9c2 Workbench: Basic Solid Studio
Currently uses static lighting. Will become HDRI lighting.
Added do_versions to set default drawtype_solid and drawtype_texture to
OB_LIGHTING_STUDIO. When View3D space is created drawtype_solid and
drawtype_texture are also set to OB_LIGHTING_STUDIO.

Current studio lighting uses a dot product to simulate static lighting.
Will need to be changed in the future with different lighting models.
2018-04-18 08:20:12 +02:00
Julian Eisel
bc9e05599d Fix makesdna not respecting C++ comments
Tab after C++ comment broke parsing and didn't remove the line at all.
Was there since 2002 at least, probably confused some peeps.

This means commented out code was actually written to SDNA.
2018-04-18 00:29:53 +02:00
b40f5be01f Eevee: Use textureGather for minmaxZbuffer downsampling.
I haven't noticed any performance improvement but it could be more important
for other hardware. At least it's not slower!
2018-04-17 22:25:59 +02:00
38399c0b10 Object Mode: Outlines: Fix precision issue on intel GPU. 2018-04-17 22:25:59 +02:00
3f762dd764 Workbench: clean up the viewport shading code
- added the drawtype_solid, drawtype_wireframe, drawtype_texture to
View3D
- enabled workbench panels for important render engines
- merged workbench_materials to solid_flat_mode. All draw modes will get
its own fast implementation in the workbench
2018-04-17 22:11:56 +02:00
dd8d55b31a Cleanup: unused vars, long lines 2018-04-17 20:02:17 +02:00
9b8e27127e UI: Perf: Improve Dopesheet performance. 2018-04-17 19:37:05 +02:00
5559abf31d GWN: IMM: Add util function to batch several immRecti/immRectf 2018-04-17 19:37:05 +02:00
Dalai Felinto
de6289e79e Remove player from buildbot part II 2018-04-17 18:46:03 +02:00
Dalai Felinto
1f24a60a3e Remove player from buildbot 2018-04-17 18:42:00 +02:00
41748b6a5e Cleanup: remove modules that were only used by the game engine. 2018-04-17 18:37:29 +02:00
f06272ab6a DRW: Perf: Early out empty passes. 2018-04-17 18:26:22 +02:00
49f7ca3b9d Add overridable control to 'edit' feature of custom props. 2018-04-17 18:07:08 +02:00
1913322402 Add generic bpy API to check if a property is overridable, and to set overridable status of custom props. 2018-04-17 18:07:08 +02:00
75f82ac722 Update/improve handling of 'overridable' status of properties.
Main new thing in this commit is ability for real IDProps (aka custom
properties) to be set as overridable or not, they are not by default.
2018-04-17 18:07:08 +02:00
Dalai Felinto
fad7c065c2 Remove Shift+F2 and other related BGE keymaps
Reported by Pablo Vazquez (venomgfx)
2018-04-17 17:56:06 +02:00
Dalai Felinto
fb24813d64 Remove game properties in image editor
The following properties were used by the Blender Game Engine and no longer
need to be around:

* Animated
* Tiles
* Clamp
* Mapping
2018-04-17 17:51:28 +02:00
Dalai Felinto
159806140f Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine

This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.

Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
  that we can wait until then to remove this.
2018-04-17 17:51:28 +02:00
Dalai Felinto
28b996a9d2 Disable GAME ENGINE from the build options 2018-04-17 17:38:18 +02:00
Dalai Felinto
8a695efe9b Merge remote-tracking branch 'origin/master' into blender2.8 2018-04-17 17:36:39 +02:00
2b730763a3 Particles: Hair: Make hair selectable in the 3D view. 2018-04-17 17:34:22 +02:00
821722ac05 Interface: Show properties values from evaluated datablocks
This is a way to deal with animated properties in evaluated version
off datablock. Previously, running blender with copy-on-write enabled
will show original values. Now we can see proper properties, while
typing values in still goes to the original datablock.

Thanks Brecht for the review!
2018-04-17 17:22:33 +02:00
c6681f735e Object Mode: Fix wrong wire color on non-meshes objects. 2018-04-17 17:00:36 +02:00
088b6342e6 Object Mode: Cleanup uneeded texture attachment. 2018-04-17 17:00:36 +02:00
81ede70609 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-17 16:39:18 +02:00
d26b7592b8 Workbench: Switching Draw engines based on draw mode 2018-04-17 16:34:41 +02:00
d442e0ad63 UI: Fix T54691: Vector icon vs Widget base ordering.
It was making keyframe marker and bone theme color icon disappear under
their button.
2018-04-17 15:53:49 +02:00
b229c879c1 Eevee: Render: Fix assert with framebuffer not being bound before read. 2018-04-17 15:33:06 +02:00
1eea3e4d6b Eevee: Fix AA in render mode.
Was due to wrong framebuffer being read because of wrong comparisson caused
by b9ec7a9272
2018-04-17 15:33:06 +02:00
3759b2aa59 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-17 14:59:37 +02:00
fa68786692 Workbench: Draw modes 2018-04-17 14:58:48 +02:00
c991bb0baf Depsgraph: Allow querying NULL IDs for evaluated version
Saves us from extra checks for NULL pointers when using datablocks for read.
2018-04-17 13:49:31 +02:00
b52cd283d9 DRW: Fix lightprobe objects outlines. 2018-04-17 13:24:48 +02:00
60b33ea327 GPU: Add GPU_SHADER_INSTANCE_VARIYING_ID_VARIYING_SIZE.
Will be used for probe outline id drawing.
2018-04-17 13:24:48 +02:00
ad648b7693 DRW: Add DRW_UNIFORM_INT_COPY.
This allow to use int uniforms that are not references. Convenient for ids.
2018-04-17 13:24:48 +02:00
17041bd895 Depsgraph: Fix unwanted node tree copy-over
Was caused by two things from the past:

- Tagging would set id->recalc to COW update flag.
  This one is to be ignored.

- Particle tagging will use psys recalc flags on id->recalc,
  but we only need to use flags from particles. Otherwise
  it will be some collisions in bit masks.
2018-04-17 12:47:28 +02:00
Dalai Felinto
a0ef147f29 bpy consistency fix handler_add(handle)
This doesn't change the API, so it doesn't affect any script.
However it give more consistent error messages.
2018-04-17 12:29:40 +02:00
Dalai Felinto
c558d8fa7c bpy blf api example update
With changes from Campbell Barton as well.
2018-04-17 12:25:51 +02:00
2408a482c0 Merge branch 'master' into blender2.8 2018-04-17 12:12:35 +02:00
aff71a7fdc Fix (unreported) RNA sometimes trying to get named sub-props from non-Group IDProp.
Why exactly this happens remains unclear, found that in the
autumn.blenrig file of Spring production while working on static
overrides... Tons of ugly IDProps in that rig. xD
2018-04-17 11:59:14 +02:00
963b1c8e41 Pose: fix wpaint + pose mode pick & linked select 2018-04-17 11:23:58 +02:00
ad797ed39a Fix blenderplayer and collada build. 2018-04-17 11:01:52 +02:00
c9d1082a2c Pose: multi-object hide/reveal support 2018-04-17 10:22:40 +02:00
a04b551e40 BKE_object: utility functions for pose access
Pose objects may be from the active object,
or from the weight paint mesh.

Since this is such a common check move this to a function call.
2018-04-17 10:22:40 +02:00
be3392e0f9 Make particle edit mode work again
This is just to have hair rendering and editing mostly working as in
master. A better fix is probably needed, there seems to be some
missing depsgraph relations for particle edit settings, and particle
edit code doesn't rebuild caches after applying edits. But at least
you can see and interact with hair now until those things can be
sorted out.
2018-04-17 03:41:04 -04:00
1dbe9c262f View3D: Check all objects w/ view-selected 2018-04-17 08:30:29 +02:00
ae0c36f82b Object Mode: Outline: Perf: Only do outlines detection if needed. 2018-04-16 22:55:02 +02:00
f92e92b1c0 Object Mode: Outlines: Use textureGather extension if available.
This has very little impact (only had 12.5% perf improvment on Nvidia for this specific pass).
But it's an improvement nontheless!
2018-04-16 22:53:44 +02:00
af1c220d89 Fix for building w/o open-subdiv 2018-04-16 20:45:43 +02:00
c7d6aa4338 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-16 20:35:59 +02:00
34ab90f546 Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.

This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.

Differential Revision: https://developer.blender.org/D3152
2018-04-16 19:55:33 +02:00
0c495005dd Fix multi-object edit crash
Border select assumed all objects had pose bones.
2018-04-16 19:42:24 +02:00
45f04ba48a DRW: Fix outdated code. 2018-04-16 19:38:58 +02:00
7f5d76b37f Object Mode: Rework outline drawing.
This changes quite a few things.
- Outline is now per object.
- No more outline at object intersection (fix hairs problem).
- Simplify the code quite a bit.

We use a R16UI buffer to save one id per object outline. We convert this id
to color when detecting the outline.

Added textureGatherOffsets to the code but could not test on current hardware
so leaving it commented for now.
2018-04-16 19:38:58 +02:00
c2d4ba2ff5 GPU/DRW: Add GPU_R16UI format. 2018-04-16 19:38:58 +02:00
dccda1fe43 DRW/GWN: Add callId builtin uniform.
This uniforms can be used to have a unique id for each drawcall of a shgrp.
This only works for standard shgroups and is an exception for the outline
drawing.
2018-04-16 19:38:58 +02:00
2b0b4133c8 DRW: Culling: Fix algorithm for asymmetric perspective frustum reconstruction. 2018-04-16 14:34:32 -03:00
15b841f5dc Audaspace: Change default plugin path on windows.
This was suggested by Ray Molenkamp in order to avoid problems with
thumbnail dlls.
2018-04-16 19:00:35 +02:00
8710943570 Cleanup: indentation 2018-04-16 18:24:38 +02:00
49ee1a97d2 Merge branch 'master' into blender2.8 2018-04-16 18:22:43 +02:00
eb6fe5fa94 Cleanup: indentation 2018-04-16 18:13:48 +02:00
292a2802ad Cleanup: indentation
Indent lines for multi object editing, no functional changes.

Also strip trailing space from indented regions.
2018-04-16 17:58:26 +02:00
bfc9d426bb Multi-Object Editing
This adds initial multi-object editing support.

- Selected objects are used when entering edit & pose modes.
- Selection & tools work on all objects however many tools need porting
  See: T54641 for remaining tasks.

Indentation will be done separately.

See patch: D3101
2018-04-16 17:56:50 +02:00
80bb4254c6 Fix T54491: Do not avoid the creation of inverted frustum.
Blender allows this.
The Cube in the file in the report would always disappear with the non camera view.
The clip_end was too small.
The correction here is only on the assert.
2018-04-16 12:37:14 -03:00
3b48a2a72f Cleanup: indentation 2018-04-16 17:26:55 +02:00
9a11aeb300 Merge branch 'master' into blender2.8 2018-04-16 17:24:20 +02:00
95eb9f22e6 Cleanup: indentation 2018-04-16 17:16:29 +02:00
85de548e03 Cleanup: indentation 2018-04-16 17:08:27 +02:00
3a14a03812 DRW: Culling: Reorganize frustum_boundbox_calc to match comments.
And Cleanup.
2018-04-16 11:48:58 -03:00
10f7f4ec14 Fix unreported error: Algorithm for extracting the Bounding Sphere from an Orthographic frustum was incorrect.
There was double transformation.
2018-04-16 11:42:20 -03:00
a945bcc028 Fix two more 'infinite recursions' cases in RNA pose. 2018-04-16 16:39:13 +02:00
eb3ae79c2d Merge branch 'master' into blender2.8 2018-04-16 16:22:34 +02:00
141f0f4c47 BKE_context: macro to access ID's while looping 2018-04-16 16:19:16 +02:00
cf95267456 Merge branch 'master' into blender2.8 2018-04-16 16:17:03 +02:00
047950db7c Depsgraph: Pull indirect relations via driver targets 2018-04-16 16:12:15 +02:00
295ced9baa Switch 'make static override' of group to making all objects local overrides.
Note: tried with a complex production file characters, this is currently
totally non-functionnal (crashing even in a infinite recursion loop),
IDProps and override need some love :(
2018-04-16 16:01:17 +02:00
Julian Eisel
969c4315b1 Fix warning: Passed ID pointer where screen pointer was expected 2018-04-16 15:53:34 +02:00
86abc4da10 Fix rBb31ebd8c5c55: the asymmetric furstrum algorithm was still incorrect.
Although somewhat less micro efficient, I decided to separate the `viewinv` matrix to calculate the world position separately.
This makes it easier to understand the code.
2018-04-16 10:40:46 -03:00
Julian Eisel
57c651d248 Cleanup: move some screen utility functions, from topbar branch. 2018-04-16 15:18:48 +02:00
Julian Eisel
1b6fddb968 Cleanup: split off area reading/writing functions, from topbar branch. 2018-04-16 15:18:48 +02:00
dfd9e549ee Fix build errors after recent depsgraph changes. 2018-04-16 15:18:48 +02:00
4ed21f1360 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-16 15:02:40 +02:00
410810d42f Workbench: Added Object Color to collection_properties 2018-04-16 15:01:31 +02:00
a3c80615d5 Fix stubs 2018-04-16 14:57:23 +02:00
b31ebd8c5c Fix T54609: Erros in precise BBox extraction algorithm 2018-04-16 09:22:42 -03:00
6a75a1a669 Depsgraph: Tag scene after changing cursor location
While 3d cursor is mainly an UI thing and isn't needed for scene evaluation,
it is stored in scene DNA. This means, operator is inform depsgraph that data
has changed, so all copies of that scene can copy new values.

Fixes lack of visual feedback when changing cursor location in viewport
with copy-on-write enabled.
2018-04-16 12:59:21 +02:00
cab5dd5ea0 Fix incorrect scene used for building freestyle stroke depsgraph. 2018-04-16 10:39:13 +02:00
8ad93dd009 Merge branch 'master' into blender2.8 2018-04-16 10:19:03 +02:00
6617818c7a Make ID icons safe for deletion from threads
Added a lock-free deferred queue for deletion. Now if ID icon
is requested to be freed from non-main thread, it will be added
to the deferred list. Actual deletion will happen later from main
thread.

Currently actual deletion only happens next time BKE_icon_id_delete()
is called, which might not be enough. But it's easy to enforce
deferred deletion.

Icons for preview images are not covered by deferred deletion yet.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D3146
2018-04-16 10:18:43 +02:00
5bfe6126f8 Added lock-free single linked list implementation
Only supports lock-free insertion for now, can not delete element
or traverse the list at the same time.
2018-04-16 10:18:43 +02:00
6ef5b422fc Merge remote-tracking branch 'origin' into blender2.8 2018-04-16 09:59:52 +02:00
2720667566 Disable Feature Collada: Tests do not work on unix
The tests as they are now make string comparisons. This only works
on Windows because the reference files look different for different
operating systems because of different number formatting.
The collada tests need a complete rework (wip)
2018-04-16 09:56:59 +02:00
bfb633087b Fix object/bone select buffer big-endian sorting 2018-04-16 08:51:41 +02:00
7ffc8bc25d Merge branch 'blender2.8' into blender2.8-workbench 2018-04-16 08:20:12 +02:00
9777cd2b1e Cleanup: unused function 2018-04-16 07:40:40 +02:00
c1730a03af Merge branch 'master' into blender2.8 2018-04-16 07:39:56 +02:00
b4e8d33f11 Logging: edits to build on macOS 2018-04-16 07:38:11 +02:00
55939bf219 Merge branch 'master' into blender2.8 2018-04-16 07:27:53 +02:00
61a22262d1 Eevee: Cleanup remaining shadow geometry references. 2018-04-15 22:23:51 +02:00
d8d1f637b1 Eevee: Shadows: Transition to individual face rendering.
This gets rid of the need of a geom shader and instancing.

Both are pretty slow compared to the new method.
The only moment the old method could be better is when scene is filled
with lots of objects and most of the objects in the shadow map appear
on every layer.

But even then, we could optimize the culling and minimize the overhead.
2018-04-15 22:23:51 +02:00
dd6fcd2f21 DRW: Fix culling algorithm for cascade shadow maps.
draw_frustum_boundbox_calc does not work properly it seems in this case.
2018-04-15 22:23:51 +02:00
728816dbdc DRW: Override matrices: fix const correctness. 2018-04-15 22:23:51 +02:00
80f7249d09 Cleanup: skip redundant edit-bone select lookups 2018-04-15 21:46:25 +02:00
Julian Eisel
4b080ff18f Cleanup: Make access to widget triangle defines explicit
E.g. the vertices created for each of the defines would require a
certain offset. If you don't know what to look for, finding out about
this is pretty difficult. Make them easily searchable instead.
2018-04-15 21:36:21 +02:00
Julian Eisel
7c02008e74 Fix button triangle for "hold action" not working
There is quite some mess going on in that most of the old triangle
drawing code is still there, but does almost nothing effectively.
Instead values are hardcoded in the shader, however it doesn't support
the drawing options the triangle functions expose.
E.g. the 'where' variable to set triangle direction doesn't work.
2018-04-15 21:24:24 +02:00
447622f717 Pydoc: Fix multiple bpy.type modules 2018-04-15 11:45:25 -04:00
35ff9e44ca Missed from last merge 2018-04-15 17:41:11 +02:00
ebe3361181 Merge branch 'master' into blender2.8 2018-04-15 12:48:39 +02:00
7bccd21afa Cleanup: remove redundant args from ebone picking
Make this match editmesh picking more closely
2018-04-15 12:45:39 +02:00
9e2ea6c500 Merge branch 'master' into blender2.8 2018-04-15 12:03:09 +02:00
0f2efce6c5 Cleanup: remove bad casts 2018-04-15 11:57:49 +02:00
c12d976020 Cleanup: ED_armature naming
- Wasn't clear which functions handle edit-bones.
- Mixed both ebone and edit_bone in names.
- Didn't use ED_armature_* prefix for public API.

See P655 to apply to branches.
2018-04-15 11:50:53 +02:00
f3a8f97fcf Merge branch 'master' into blender2.8 2018-04-15 10:52:14 +02:00
d0e3fbc06b Cleanup: remove undoing access, minor formatting
Access to undoing state isn't needed,
some text insert code was overly compacted.
2018-04-15 10:48:50 +02:00
fb3528d088 Fix T54593: Py text edits crash (undo regression) 2018-04-15 10:34:41 +02:00
87a9b6ac06 Fix compiler error in Windows 2018-04-15 09:55:42 +02:00
2666e77c22 Fix T54527: Misleading Tooltip on Snap Target Menu 2018-04-14 18:26:27 -04:00
73dfd3d382 Pydocs: Expand bge.contraint docs
Takes information from the manual and dumps it here.
2018-04-14 18:08:32 -04:00
3a10f8e1b1 Cleanup: style 2018-04-14 22:26:12 +02:00
94959dba1b Fix compiler error in Windows 2018-04-14 16:24:34 +02:00
36152afa76 Merge branch 'master' into blender2.8 2018-04-14 14:34:21 +02:00
5ab77ab4ee Cleanup: use const for BKE_object args 2018-04-14 14:27:38 +02:00
35785ee7cb Merge branch 'master' into blender2.8 2018-04-14 14:10:27 +02:00
66d4e9300b Logging: replace 'fwrite' w/ 'write'
We're already buffing output, so use write directly.
2018-04-14 13:59:33 +02:00
1c23b5c6ff Cleanup: rename WriteData struct members.
Relationship between tot/count/buf wasn't clear.

Also use doxy sections.
2018-04-14 13:35:20 +02:00
cbd4a79c6d Undo: refactor memfile writing
- Move static undo variable into 'WriteData',
  'memfile_chunk_add' used arguments in a confusing way,
  sometimes to set/clear static var.

- Replace checks for 'wd->current' with 'wd->use_memfile'
  move memfile vars into 'wd->mem' struct.
2018-04-14 13:03:41 +02:00
2e9b92b5cc Fix T54568: Undo memory de-duplication failed
Error in 651b8fb14e caused de-duplication to fail.
2018-04-14 12:30:14 +02:00
b107e77e46 BGL: Expose OpenGL API for FrameBuffers and RenderBuffers. 2018-04-14 02:25:18 -03:00
7bf252ddc0 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-13 16:01:43 +02:00
e6998b6e62 Workbench: Silhouette shading
Currently it uses the `obj->col`. This needs to be made more intelligent
with fe collection overrides.
2018-04-13 15:49:50 +02:00
8245c4fd66 PyAPI: Gawain: Checks the member data instead vbo_id.
After recent changes in gawain, `vbo_id` is now assigned in VertBuf creation.
2018-04-13 10:47:49 -03:00
3765653b38 RNA: Fix crash with select_mode_update.
`bpy.context.tool_settings.mesh_select_mode = (True, True, True)` was crashing because `wmn->window` was not being passed.
2018-04-13 10:41:44 -03:00
ce114a307d DRW: Deferred Shader Compilation: Optimize shaders compilation.
`glFinish()` that was causing bad perf issue on `Intel(R) HD Graphics 4000`.
2018-04-13 10:38:13 -03:00
7d8f35b471 CLAY: Fix prepass shader on certain compiler.
`Intel(R) HD Graphics 4000` driver sometimes does stupid things.
2018-04-13 10:36:05 -03:00
7b9fb32591 Python API: remove preview/render resolution settings from API functions.
For correct results these must have been set already when the depsgraph was
created and evaluated, so all dependencies have appropriate resolutions too.

For particle we no longer backup and restore the viewport particles to avoid
overwriting them during render, as copy-on-write solves this for us. Even
without COW particles seem to work ok.

This also removes the particle simplification options based on camera. This
was never used much and only available in Blender Internal.

Differential Revision: https://developer.blender.org/D3148
2018-04-13 14:38:59 +02:00
a1e2415ed5 Depsgraph: don't pass evaluation context to update functions.
The depsgraph now contains all the state needed to evaluate it.

Differential Revision: https://developer.blender.org/D3147
2018-04-13 14:17:37 +02:00
eec5d3a8a8 Depsgraph: remove engine type from evaluation context.
This was only used for viewport rendering, where we can just pass the engine
type directly. There is no technical reason why we can't draw the same depsgrpah
with different render engines.

It also led to some weird things like requiring a render engine for snapping
and raycast API functions.

Differential Revision: https://developer.blender.org/D3145
2018-04-13 14:17:32 +02:00
340bfdef2e Depsgraph: store mode and time in depsgraph, add view layer / scene accessors.
Scene, view layer and mode are now set in the constructor and never changed.
Time is updated on frame changes to indicate which frame is being or has been
evaluated last.

This is a step towards making EvaluationContext obsolete.

Differential Revision: https://developer.blender.org/D3144
2018-04-13 14:17:22 +02:00
5d7952d9c7 Python API: remove object.dupli_list_create and dupli_list_clear.
Cycles is no longer using this. There are still addons using it but for
correct results with the new depsgraph this API should not be used.

Differential Revision: https://developer.blender.org/D3143
2018-04-13 14:16:59 +02:00
f0a4c631bb Fix incorrect object in editmode tests in depsgraph eval.
These cases should not depend on the view layer.
2018-04-13 13:04:19 +02:00
1c85fb95b1 Fix incomplete evaluation context in depsgraph iter. 2018-04-13 13:04:19 +02:00
07fc6c9224 Merge branch 'master' into blender2.8 2018-04-13 12:19:31 +02:00
332846b188 Remove editor type selector from File Browser when in 'Operator' mode.
Having that one when opening a file or loading some lib makes absolutely
no sense, and switching that 'temp' editor to some other type can
trigger all kind of funny bugs...

Note that using the shortcuts keys (Shift-F5 etc.) is still possible,
removing those seems a bit more involved. :/
2018-04-13 12:14:50 +02:00
199715eabc Point cache: stop using general object dupli system.
We now only look into dupli groups to find point caches to edit. This
feature is a leftover from the old proxy system, and evaluating the
full dupli list and all transforms was overkill. With static overrides
we may want to get rid of using duplis entirely, and just let users
select the objects directly.
2018-04-13 11:47:29 +02:00
d8bdd7b261 Cleanup: add utility function to find a single point cache ID. 2018-04-13 11:31:19 +02:00
b92d78553b Cleanup: don't use Blender structs in iTaSC module. 2018-04-13 11:31:19 +02:00
Julian Eisel
9599ed3ba7 UI: Activate (unused) tab button-type on press instead of release
Even if we want to support drag & drop, seems like most other apps that
support drag & drop for tabs activate the tab first anyway.
2018-04-13 10:32:52 +02:00
Julian Eisel
b5570337b6 UI: Activate workspace after appending it using the '+' menu
Could use an operator-macro if they'd support own RNA-properties. For
now added a wrapper operator.
2018-04-12 18:13:19 +02:00
bf854b2851 GPUSelect: Remove glFinish() that was causing bad perf issue.
I can see how it's slowing things down: glFinish make sure that every query
are finished but the first query may have been finished a long time ago.

This might create bubbles because of the PIL_sleep_ms.
2018-04-12 17:37:13 +02:00
a494df8e38 Fix: Follow up to 16b795cb95
It's not just the Graph Editor that needed this - the NLA also uses similar code
and thus suffers from a similar problem.

(My first commit from the Blender Institute v2.0 - Just testing that everything works)
2018-04-12 15:50:26 +02:00
31067c9757 Depsgraph: Move CoW tag to ID datablock tag
Unless there is an external action from an user, there should not
be need in re-copying original datablock to a copied one.

This brings performance up from 5fps to 11fps with Spring runcycle
(performance in master is 14fps).
2018-04-12 11:05:18 +02:00
15698f9907 Depsgraph: Avoid relations build time scene datablock expansion
Quite straightforward implementation, allows us to remove all the cherry-picking
update of specified scene/view layer/collection fields. Makes it possible to use
generic function to update scene.

The tricky part is that we need to know view layer pointer before the whole
evaluation starts. So we actually expand scene at initialization of evaluation.
context. This is still a bit of an exceptional case, but at least we still avoid
dangerous cherry-picking update.
2018-04-12 11:05:18 +02:00
18c7575f93 Depsgraph: Introduce ID recalc flag for COW component
Currently unused, but will become handy to check whether ID needs
to have COW update to be run.
2018-04-12 11:05:18 +02:00
fac1892e11 Depsgraph: Bind base by it's index
For the performance we convert object bases list to an array
during view layer evaluation. This makes it possible to have
very cheap index-based base lookup.

The goal of this change is to get rid of base used for function
binding, and avoid scene datablock expansion at the depsgraph
construction time.
2018-04-12 11:05:18 +02:00
9c406b786f Depsgraph: Bind view layer by index
Makes it a bit slower to evaluate single view layer, but this is does not
happen often, and overall number of layers is not very high.
2018-04-12 11:05:18 +02:00
ca2484e090 Depsgraph: Remove function bindings with collections
Use single function to evaluate all the collections for the given view layer.

This way we avoid need to get scene ID sub-data. Similar to pchan index, this
allows us to avoid build-time scene expansion, which also simplifies update of
the scene datablock.

Well, sort of. There is still work to be done to get rid of build-time scene
datablock expansion, which includes:

- Need to pass view layer by index.

  Annoying part would be to get actual view layer for that index. In practice
  doing list lookup might not be such a bad idea, since such lookup will not
  happen very often, and it is unlikely to have more than handful of view
  layer anyway.

  Other idea could be to use view layer from evaluation context.
  Or maybe from depsgraph, which is supposed to be in the context. Can have
  some assert statements to make sure everything is good.

- Need to get id of base binding for flags flush.

  We can replace that with index-based lookup from an array created by view
  layer evaluation.

Reviewers: dfelinto

Differential Revision: https://developer.blender.org/D3141
2018-04-12 11:05:18 +02:00
d213474070 Moved vectorblur code from render to compositor
In preparation of the removal of blender internal render we
moved the vectorblur code that was placed in the render package
(legacy) to the compositor. The compositor is only using this
code even the blender internal renderer did not use the code at
all.
2018-04-12 10:27:38 +02:00
c1680902ac Fix again 'auto override' system.
Got lost in big undo refactor.

Note that this is probably (maybe) not how we want to have it in the
end, things like EditMode undo should probably not trigger this check?
2018-04-11 15:23:54 +02:00
9ec26c415a Merge branch 'master' into blender2.8 2018-04-11 15:07:03 +02:00
8aa6e4d50b Changed assertion of '..' in file browser entries
The previous assert assumed '..' is always there, which isn't necessarily
true (for example when in the root of an Asset Engine repository).

The new code asserts that if '..' is present it should be the first entry
(rather than forcing the first entry to be '..').
2018-04-11 15:06:42 +02:00
5a3c146652 fix T54549: Vector Transform node in wrong nodeclass
the Vector Transform node was added to the "Vector" category in
nodeitems_builtins.py
but was using the "NODE_CLASS_CONVERTOR" internally (thus using e.g. the
'wrong' theme color)

thanx @dingto for review

Differential Revision: https://developer.blender.org/D3138
2018-04-11 14:14:31 +02:00
ce3adc090d Merge branch 'master' into blender2.8 2018-04-11 09:41:49 +02:00
a3a76bc0fe Explicitly specify which tag to use 2018-04-11 09:34:29 +02:00
c963488b5e Pose Mode: pass object to mode enter/exit
Also add lower level mode exit function
2018-04-11 09:21:01 +02:00
debe3011f6 Merge branch 'master' into blender2.8 2018-04-11 09:02:32 +02:00
32339a56f1 Cleanup: minor changes to pose-mode switching API
Prepare for multi-object pose mode
2018-04-11 08:53:59 +02:00
1b78f05b1c Merge branch 'master' into blender2.8 2018-04-10 20:17:56 +02:00
f55adabb3e Cleanup: remove unused flag 2018-04-10 20:13:31 +02:00
d7aa51a50c DRW: Deferred Shader Compilation: Don't recreate ogl context.
Only recreate ogl context if we cannot reuse the one of the previous thread.

Adding lots of shaders were recreating as many ogl context which was very
slow.
2018-04-10 19:30:23 +02:00
1bc8ebaa26 Formatting 2018-04-10 18:27:49 +02:00
48dc5c14d4 Fix crashing of EEVEE/Clay engines when importing an Alembic file
The dependency graph still isn't updated properly, so animated meshes don't
move in EEVEE/Clay, but at least Blender doesn't crash.
2018-04-10 18:24:24 +02:00
3dce5b2ef9 UI: Fix some drawing order issues. 2018-04-10 17:42:45 +02:00
04e363376b WM: Fix a crash (assert) when creating a new window.
This happened when creating a window with the cursor over the timeline area.
I still don't know exactly what happened but for a reason batches were not
reset in this case.
2018-04-10 17:42:45 +02:00
3cfca15b50 DRW: Hair: Use GWN_PRIM_LINE_STRIPS instead of LINES
This means fewer indices to store. That being said, it seems to be a little
slower because of the restart index. But that's in the case we would be
vertex bound, which is mostly never going to happen.
2018-04-10 17:42:45 +02:00
21a57ec29e BLF: Style: Fix bad casts.
This could have caused overflow issue.
2018-04-10 17:42:45 +02:00
8d1c21998a Merge branch 'master' into blender2.8 2018-04-10 16:15:30 +02:00
549d4a55ab Fix transform nearest axis check
Was mixing up global/local coords
2018-04-10 16:14:29 +02:00
71980945bc Draw Manager: Fix lazy compilation on certain hardware.
Before, the drawing functions sometimes froze with `AMD Radeon HD 7570M`.
2018-04-10 11:03:15 -03:00
6962119e7f Merge branch 'master' into blender2.8 2018-04-10 12:00:10 +02:00
5c3857b305 Depsgraph: Build relations for objects linked via pchan constraints
This is similar to previous fix for missing ID nodes, just the original
fix missed this part of change because it looked like it is already
happening.
2018-04-10 11:57:20 +02:00
a74e782f5b BLF: Fix broken shadows on certain hardware.
This was due to uninitialized texture space.
2018-04-10 10:26:09 +02:00
814f143acf Fix T54423: Messages from RNA_property_editable_info() were not translatable. 2018-04-10 10:24:02 +02:00
bd76c88754 Depsgraph: Flush debug prints
Makes it more reliable to see what was updating last when
crash happens.
2018-04-10 09:54:27 +02:00
c0ac908fe8 Fix crash when no object is active
Could happen when deleting the active object or opening an old file
2018-04-09 22:03:33 -04:00
16b795cb95 Fix crash in graph editor id remapping
Dopsheet pointer isn't set...?
2018-04-09 21:40:52 -04:00
Julian Eisel
77e9193c23 Fix invalid context when refreshing popups
Patch D2759 by @raa, with minor edits by me.
2018-04-09 19:31:39 +02:00
8d9a5d5062 UI: Fix widget shader on certain compiler.
There was a crash with Intel(R) HD Graphics 4000.
2018-04-09 14:07:32 -03:00
ec91948dd7 Cleanup: unused variable 2018-04-09 19:01:49 +02:00
Julian Eisel
7213553c84 UI: Clamp scrollbar offset to lower view boundaries
Fixes the "emtpy scrolling" glitch by clamping the scroller offset to
the boundary of the view when it's smaller than the previous.

Fixes T45197. Patch by @januz.

Differential Revision: D1580
2018-04-09 18:55:50 +02:00
4a656f5d16 GPU Shader: Cleanup: Remove unnecessary ";" 2018-04-09 13:45:57 -03:00
2a0dca4252 UI: Fix widget shader on certain compiler.
There was a crash with `Intel(R) HD Graphics 4000`.
Thanks to @fclem for the help and review.
2018-04-09 13:45:17 -03:00
26a283deae Use the newer version of the bullet 6dof spring constraint for rigidbody.
The new constraint is slower and not backward compatible, but should
be better, especially in the damping side. The new constraint also
has a different valid range of the damping coefficient, and a limit
implementation that bounces instead of making the object stationary.

Reviewers: sergof

Differential Revision: https://developer.blender.org/D3125
2018-04-09 19:14:35 +03:00
c1a2f973da Merge branch 'master' into blender2.8 2018-04-09 15:44:28 +02:00
7e39d151d8 Added support for the WEBM/VP9 video codec
WEBM is the codec name, and VP9 is the encoder (the older encoder "VP8"
is less efficient than VP9).

WEBM/VP9 and h.264 both have options to control the file size versus
compression time (e.g. fast but big, or slow and small, for the same
output quality). Since WEBM/VP9 only has three choices, I've chosen to
map those to 3 of the 9 possible choices of h.264:

- BEST → SLOWER
- GOOD → MEDIUM
- REALTIME → SUPERFAST

The VERYSLOW and ULTRAFAST options give very little extra benefit.

Reviewed by: @Severin
2018-04-09 15:27:11 +02:00
39116a4340 Remove commented-out code 2018-04-09 15:26:12 +02:00
d533b70b23 Fix build error with GCC, make depsgraph iterator compatible with C++. 2018-04-09 15:09:22 +02:00
f0edb853be Build: fix make deps using system webp/sndio libs. 2018-04-09 15:08:40 +02:00
Julian Eisel
867f96c234 Fix crash and invalid context when changing workspace
Caused by 1c24c04e60.
2018-04-09 13:19:19 +02:00
09ee3eb173 Merge branch 'master' into blender2.8 2018-04-09 12:44:25 +02:00
2872965652 Cleanup: avoid recalculating global center 2018-04-09 12:40:10 +02:00
3cb42e5917 GPU Codegen: Fix assert caused by GC of failled shaders. 2018-04-09 12:10:03 +02:00
020c4e19f2 BLF: Fix assert when drawing very small chars. 2018-04-09 12:10:03 +02:00
209c5cebb0 Freestyle: use depsgraph to get geometry, instead of Blender Internal.
Some of the code is simpler because we use Blender's triangulation directly
instead of dealing with quads. Also some progress printing code was removed
because the depsgraph can not tell us the number of objects ahead of time.

Differential Revision: https://developer.blender.org/D3127
2018-04-09 11:21:14 +02:00
cf4041eb05 UI: Widgets: Fix text edit cursor not drawing.
Actually it was drawn before the widget. Flushing widget cache and
everything is fine again.
2018-04-08 18:54:34 +02:00
9960feb7e3 GPU Select: Remove warnings on Intel GPU.
- Disable scissor test for fast clear. This could lead to some issues but
   I cannot think of one and could not find one either.
 - Manually wait for queries to be available instead of making the driver
   wait and issue warnings.
2018-04-08 18:31:50 +02:00
fc6b69bedc UI: Perf: Use GWN_draw_primitive for drawing viewport textures. 2018-04-08 18:31:50 +02:00
0b06e73258 UI: Perf: Use GWN_draw_primitive for drawing triple buffers texture. 2018-04-08 18:31:50 +02:00
17aad5ad97 UI: Perf: View3D: Batch view infos BLF calls together. 2018-04-08 18:31:50 +02:00
ccbc14d995 UI: Perf: Batch horizontal scrollers numbers together. 2018-04-08 18:31:50 +02:00
651ea84471 Clay: Improve loading time.
Only compile hair shader if we need it.
2018-04-08 18:31:50 +02:00
e9f048052f Merge branch 'master' into blender2.8 2018-04-08 17:54:07 +02:00
d6a1a0ebb8 Alphabetically ordered audio and video codecs 2018-04-08 17:52:30 +02:00
afbc73ab72 BLF: Perf: Use BLF_KERNING_STEP_FAST for other functions. 2018-04-08 15:57:24 +02:00
47cfdb3c0c Eevee: Reduce loading time.
Only compile the needed shadow shaders to reduce the startup time.

Theses shaders is taking forever to compile on intel (~5s each).
2018-04-08 15:57:24 +02:00
0c9bc69f42 DRW: Profiling: Batch BLF strings and add shadowing
Shadows makes it more readable and are relatively cheap now.
2018-04-08 15:57:24 +02:00
6b109da114 BLF: Fix BlenderPlayer compilation. 2018-04-08 15:57:24 +02:00
a981206fd1 Merge branch 'master' into blender2.8 2018-04-08 14:07:34 +02:00
245e01c30a Encoding panel clarifications
The encoding panel mentions "None" in a few places, which is confusing.
- "Codec: None" now reads "No Video"
- "Audio Codec: None" now reads "No Audio"
- "Output Quality: None; ..." now reads "Constant Bitrate"

When selecting "No Video" the remaining video encoding options are
hidden, making it even more explicit that there will not be video in the
output file.

The label "Codec" now reads "Video Codec" for symmetry with "Audio
Codec".
2018-04-08 13:46:29 +02:00
0b5ebb3265 BLF: Fix problem with bound texture.
Previous code was assuming that the glyph texture would remain bound to
GL_TEXTURE0 until the cache would be drawn. This is not always the case,
so better save the texture and rebind it before drawing.
2018-04-08 01:14:43 +02:00
3725d82cee BLF: Opti: More clever sampling for blured glyphs.
Reduce the number of sampled required for blurring by using filtered
texture samples.

This changes the result a bit but it is not noticable.
2018-04-08 01:00:55 +02:00
987c56c4b6 BLF: Opti: Draw only one quad per shadow/blurred glyph.
This port the Blurring of blf fonts to the final drawing shader.

We add a bit of extra padding to each glyph so that jittering the texture
coord does not sample the neighbor glyphs.
2018-04-08 00:44:35 +02:00
e0452cc5a9 Fix edit-mesh select next
Last change introduced error, return would stop looking over candidates.

D3137 by @nBurn
2018-04-07 19:54:59 +02:00
4db3b4da46 Bullet: Fix velocity calculation of new spring constraint
This is a backport of bullet commit: 86ca7dc
2018-04-07 17:37:23 +02:00
1a33707417 UI: Fix waveform widget text drawing.
Flush the text cache so that we have proper scissor test and ordering.
2018-04-07 14:03:32 +02:00
2d618974d1 UI: Perf: Port color widgets to batch.
This is more for completeness than perf.

Shader is tiny bit more complex but we get less overdraw and drawcalls.
2018-04-06 23:54:39 +02:00
3e998b8860 Fix object mode workspace check 2018-04-06 18:31:32 +02:00
4a2b64e43d Minor change to last commit 2018-04-06 18:17:18 +02:00
6b2cf4e86e Delete object crashed (missing NULL check)
Error in recent removal of workspace.object_mode
2018-04-06 18:15:51 +02:00
4e52724aa8 UI: Perf: Optimize F-curve handles drawing.
50% less time in my test when all handles are selected.
2018-04-06 15:39:09 +02:00
5441e4802a Style: Remove duplicated struct declaration. 2018-04-06 14:30:44 +02:00
39b654f4ff UI: Perf: Use widget base batching
Overall 10% more performance on general UI drawing time.

This commit can introduce ordering problem on some elements.
In this case you need to flush the widget cache to ensure the element that
is going to be drawn is drawn on top of any widget base.

To flush the cache use UI_widgetbase_draw_cache_flush.

This is already done for BLF and Icons.
2018-04-06 14:30:20 +02:00
21113ad834 UI: Perf: Add batching capability to widgets.
Similiar to how we batch Icons together. This is not enabled in this
commit.
2018-04-06 14:25:55 +02:00
fcb4aaf7a9 GPUShader: Add GPU_SHADER_2D_WIDGET_BASE_INST shader.
This will let us draw multiple widget base at once.
2018-04-06 14:22:20 +02:00
d2e1a14a57 Fix Collada: nullptr is a c++11 keyword. Changed to NULL 2018-04-06 13:06:46 +02:00
fe73c12990 Fix Collada: 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.

This fix also improves the console logging whenever the importer
finds a consistency problem with the imported animation data.
2018-04-06 12:42:38 +02:00
4de70da73a Cleanup: style, doxy headers 2018-04-06 10:47:39 +02:00
4a73127a2b UI: Perf: Improve ui_draw_dropshadow.
Replace the 12 iterations of UI_draw_roundbox_4fv with only one batch.

This mean less overdraw and less drawcalls.

I had to hack the opacity falloff curve manually to get approximatly the
same result as previous technique. I'm sure with a bit more brain power
somebody could find the perfect function.
2018-04-06 10:25:53 +02:00
80d4d71360 UI: Perf: Modify UI_draw_roundbox to use GWN_batch API.
This commit also rename and move a few thing to clean things up.

Major improvment is using one drawcall instead of 8 for UI_draw_roundbox_aa.
2018-04-06 10:25:53 +02:00
Julian Eisel
72e5082b67 UI: Add accelerator keys to quit confirmation popup 2018-04-05 19:15:37 +02:00
eb7b701137 Fix error where find-next missed None check
Thanks to @nBurn
2018-04-05 18:48:48 +02:00
ba821ad2ad Depsgraph: Avoid build-time armature expanding
With index-based pchan evaluation we don't need to go into
a mess of expanding armature at relation construction time.
2018-04-05 18:40:10 +02:00
58ba5a65bc Cleanup: use string macros to avoid duplicate args 2018-04-05 18:39:23 +02:00
3a864f5ee4 BLI_string_utf8: macros that de-duplicate sizeof arg 2018-04-05 18:37:54 +02:00
025bf11a9f Merge branch 'master' into blender2.8 2018-04-05 18:25:05 +02:00
1c24c04e60 Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
2018-04-05 18:21:14 +02:00
9b8a92b874 Depsgraph: Pull indirect dependencies via pchan constraints
Was missing ID looper for pchan constraint.
2018-04-05 18:03:36 +02:00
57329304b0 Merge branch 'master' into blender2.8 2018-04-05 16:58:41 +02:00
ea0e2f9bd3 Load metadata from video files and expose via RNA
The MovieSequence and MovieClip classes now have a metadata() function
that exposes the `IDProperty *` holding the video metadata.

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton
2018-04-05 16:50:24 +02:00
6c3110a661 Write the scene render frame range to image/video files
This is useful to create a mapping from the frame range in the video to
frame index in the blend file.

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton
2018-04-05 16:50:24 +02:00
6374d390d3 Write StampData metadata to video files
This is currently only supported by FFmpeg (so not frameserver, AVI RAW,
or AVI JPEG), and only seems to work when using Matroska or Ogg Theora
containers.

Only metadata that doesn't change from frame to frame is written to
video files. This distinction is visible in the UI by looking at the
stamp checkbox tooltips (they either mention "image" or "image/video").

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton
2018-04-05 16:50:23 +02:00
b0a767b85b IMB_metadata improvements
- Metadata handling is now separate from `ImBuf *`, allowing it to be
  used with a generic `IDProperty *`.
- Merged `IMB_metadata_add_field()` and `IMB_metadata_change_field()`
  into a more robust `IMB_metadata_set_field()`. This new function
  doesn't return any status (it now always succeeds, and the previously
  existing return value was never checked anyway).
- Removed `IMB_metadata_del_field()` as it was never actually used
  anywhere.
- Use `IMB_metadata_ensure()` instead of having
  `IMB_metadata_set_field()` create the containing `IDProperty` for
  you.
- Deduplicated function declarations, moved `intern/IMB_metadata.h` out
  of `intern/`. Note that this does mean that we have some extra
  `#include "IMB_metadata.h"` lines now, as the metadata functions are
  no longer declared in `IMB_imbuf.h`.
- Deduplicated function declarations, all metadata-related declarations
  are now in imbuf/IMB_metadata.h.

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton
2018-04-05 16:50:23 +02:00
f0f6c96a92 BLI_string: macros that de-duplicate sizeof arg 2018-04-05 16:44:48 +02:00
3eaf77fdd3 Merge branch 'master' into blender2.8 2018-04-05 16:19:43 +02:00
1c1dc39466 UI: Node Editor: Make nodelink arrow size and link width dpi dependant. 2018-04-05 16:08:46 +02:00
fb8a1a58d9 UI: Node Editor: Batch nodelinks together.
This will do only one drawcall for every 256 nodelinks.
2018-04-05 16:08:46 +02:00
72bfa849ee UI: Node Editor: Port nodelink drawing to shader based drawing.
Use the new GPU_SHADER_2D_NODELINK and GPU_SHADER_2D_NODELINK_INST to
accelerate nodelink drawing.

This commit does not include the batching functionnality. So this should
not make a lot of difference.
2018-04-05 16:08:46 +02:00
c65c4fb77b GWN: Add GWN_batch_uniform_2fv_array. 2018-04-05 16:08:46 +02:00
cadef79a52 GPUBatch: Change preset managment system.
Now use a list of preset batches with a function to add new ones to this
list.

This removes the need of new functions all over the place to reset/exit.
2018-04-05 16:08:46 +02:00
d48597eb54 GPUShader: Add 2D Nodelink shader.
Special shader to draw nodelinks for the node editor.

We only pass bezier points to the GPU and vertex position is handled inside
the vertex shader.
The arrow is also part of the batch to avoid separate drawcalls for it.

We still draw 2 pass one for shadow and one for the link color on top.

One variation to draw instances of theses links so that we only do one
drawcall.
2018-04-05 16:08:46 +02:00
ad1ea9a427 Undo: split text undo steps out of the data-block
This moves undo storage into a separate struct which is passed
in from the undo system.
2018-04-05 15:22:33 +02:00
79c3c56894 Undo System: return undo step from undo push init
Also improve logging
2018-04-05 14:11:51 +02:00
1761095abc Logging: use -1 log level to log all levels 2018-04-05 13:55:04 +02:00
cd474b913b ED_undo: use logging 2018-04-05 13:41:52 +02:00
47b6e23271 Fix crash w/ empty text undo operations 2018-04-05 10:01:12 +02:00
5fba4458e9 Fix Cycles motion blur and engine.frame_set() not working. 2018-04-04 17:59:46 +02:00
db3c3d1338 Depsgraph: Fix/workaround crash with animation and drivers and CoW
The issue was caused by component tag forcing CoW component to be run,
without actually flushing changes down the road from the CoW operation.

In a way, this is what we want: we do want CoW to run on changes, but
we don't want tiny change forcing full datablock update.

This commit makes it so order of updates is all correct, but the bigger
issue is still open: what parts of datablock CoW should be updating?

Now it's possible to open spring file and play around.
2018-04-04 17:49:08 +02:00
b561707bed Gawain: Make removing batches more thread safe
The issue was mainly visible when copy-on-write was enabled. This was forcing
lots of meshes to be freed from multiple thread, causing all sorts of race
conditions in Gawain's VAO code.

OpenGL resources seems already to be doing deferred deletion, need to do the
same for CPU side arrays.
2018-04-04 17:49:08 +02:00
160e62b88c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_object.h
2018-04-04 15:03:55 +02:00
d59c2d12b1 Fix modifier freeing code re. ID refcounting.
Free code should not handle ID refcounting at all. This has to be done
at higher level, since in some case we want to free (temp) data that
actually did not refcount at all its IDs.

This change seems to be working OK, but as usual in that area, only
lots of testing in real-case situation will say whether there are some
hidden bugs or not.
2018-04-04 14:58:52 +02:00
59562e5b25 Fix Cycles particle info node not working. 2018-04-04 13:18:06 +02:00
7db4b935e1 Depsgraph: Cleanup, reduce indentation level 2018-04-04 13:02:28 +02:00
ef22b837e8 Merge branch 'master' into blender2.8 2018-04-04 12:57:36 +02:00
0c7ec58966 Depsgraph: Make sure textures used by modifiers are in the graph 2018-04-04 12:56:04 +02:00
49f77b0d83 Proper fix for T54337
Accidentally checked the wrong variable in fa01a1738b.
2018-04-04 06:36:16 -04:00
39585e1abc Fix undefined workspace in UI script 2018-04-04 12:33:10 +02:00
3a17dab2b1 Fix Eevee crash with generated coordinates on non-objects. 2018-04-04 12:28:20 +02:00
9c7bd1fad9 Cleanup: simplify fix for T53497, this part is not strictly needed. 2018-04-04 12:28:20 +02:00
3a566687e1 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenloader/intern/readfile.c
2018-04-04 12:00:57 +02:00
677d699645 Tweak ID->tag reset on file load (no visible change expected!).
Issue was, *some* IDs (like infamous nodetrees from materials etc.)
would not go through the 'main' read_libblock() func, so their tags were
never reset.

So now, we ensure direct_link_id() always clear the tags, and move
setting them in read_libblock() after the call to direct_link_id().

Needed for depsgraph, but general healthier fix actually.
2018-04-04 11:59:16 +02:00
948f4e8c94 Depsgraph: Get pchan index from correct pose
This code should be replaced with evaluation-time ID block expansion,
but before that it will be helpful to get old design to work again.
2018-04-04 11:55:06 +02:00
a6999a869e Merge branch 'master' into blender2.8 2018-04-04 11:49:24 +02:00
c128738926 Depsgraph: Ensure root pchan is always found 2018-04-04 11:49:01 +02:00
c9ad9b260a Depsgraph: Pass CoW version of object to armature update done 2018-04-04 11:47:33 +02:00
fb5a57ab97 Fix part of T53497: Eevee stuttering on macOS for the first few seconds of usage.
The problem was that textures were assigned to different slots on different draw
calls, which caused shader specialization/patching by the driver. So the shader
would be compiled over and over until all possible assignments were used.
2018-04-04 11:30:55 +02:00
3f4df3f847 Fix missing hair in fishycat and everything else after particle recalc changes
The cache was getting reset always, due to special case of flag being 0.

Bug introduced by: 44cd24a9ce
2018-04-04 05:10:47 -04:00
e217fb439f Merge branch 'master' into blender2.8 2018-04-04 10:36:39 +02:00
909efe6be5 Depsgraph: Assert that pchan index is always valid 2018-04-04 10:35:32 +02:00
d54a058f35 Merge branch 'master' into blender2.8 2018-04-04 10:16:38 +02:00
f913e69093 Depsgraph: Add missing expansion od custom bone shapes
This was fixed in 2.8 branch but not in master.
2018-04-04 10:15:45 +02:00
eaf8608ba5 Merge branch 'master' into blender2.8 2018-04-04 09:54:50 +02:00
4674e02562 Depsgraph: Only bind ID-data and indices to depsgraph callbacks
This is a part of copy-on-write sanitization, to avoid all the checks
which were attempting to keep sub-data pointers intact.

Point is: ID pointers never change for CoW datablocks, but nested
data pointers might change when updating existing copy.

Solution: Only bind ID data pointers and index of sub-data.
This will make CoW datablock 7update function was easier in 2.8.

In master we were only using pose channel pointers in callbacks,
this is exactly what this commit addresses. A linear lookup array
is created on pose evaluation init and is thrown away afterwards.

One thing we might consider doing is to keep indexed array of
poses, similar to chanhash.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: dfelinto

Differential Revision: https://developer.blender.org/D3124
2018-04-04 09:48:41 +02:00
fa01a1738b Fix T54337: Cycles crash with simple subd object in debug build 2018-04-03 23:37:12 -04:00
8c4d28cdb9 Fix T54400: Some GCN 1 cards available to select for use with Cycles
Hainan was missing from the list of GCN 1 cards.
2018-04-03 23:15:07 -04:00
2f723a414f BMesh: remove redundant loop in select-next-active
Thanks to @nBurn for spotting
2018-04-03 18:32:55 +02:00
cd6daea7d3 Missed in last merge 2018-04-03 18:22:52 +02:00
48eaddfae0 Missed in last merge 2018-04-03 18:22:05 +02:00
e52beb3733 Merge branch 'master' into blender2.8 2018-04-03 18:12:39 +02:00
ab695c3297 Undo: make id-map use binary search to keep sorted 2018-04-03 18:07:51 +02:00
1f0f234b07 Fix own error w/ undo ID lookup
Was testing with small number of items, so this went unnoticed.
2018-04-03 17:58:37 +02:00
c713e9c472 Draw Manager: Improve description of draw_frustum_boundbox_calc variables 2018-04-03 12:18:56 -03:00
b2c9fdfe87 Cleanup: rename BMesh count_ex -> count_at_most 2018-04-03 17:06:36 +02:00
bfdb88f3f4 Cleanup: rename list count_ex -> count_at_most 2018-04-03 17:05:21 +02:00
06a62d4e06 Undo: use with_prev verisons of id-map lookups 2018-04-03 17:03:33 +02:00
5a7deab65a Undo: use general id-map for image undo lookups.
Was doing own name based lookups to keep compatible w/ global undo.
2018-04-03 17:03:33 +02:00
75de21f072 Undo System: id-map avoid duplicate add/lookup
Add versions of add/lookup that check the previous item.
2018-04-03 17:03:33 +02:00
53f068454e Fix mistake logging w/ undo 2018-04-03 17:03:33 +02:00
6744c34a26 Merge branch 'master' into blender2.8 2018-04-03 16:13:13 +02:00
96f565b380 Fix T54477: Broken utf8 strings in old .blend files
Back in the days (2.4x and before), it was rather easy to get some
invalid utf-8 strings in Blender. This is totally breaking modern code,
so this commit adds a simple 'check & fix strings' operator, available
from the main File menu.
2018-04-03 16:03:11 +02:00
601835cd31 Fix (unreported) crash when accessing some bl_rna.properties.
E.g. typing `bpy.data.bl_rna.properties[8].<tab>` in console would hard-crash
trying to dereference NULL pointer. Was a missing check in rna_Property_tags_itemf().
2018-04-03 14:32:23 +02:00
7e9a80530f Cleanup: remove unused mtexpoly array
Not needed in 2.8
2018-04-03 14:30:12 +02:00
a2c0a382cd Merge branch 'master' into blender2.8 2018-04-03 14:19:51 +02:00
feb7852e1b Fix duplicate Cycles panels in properties editor. 2018-04-03 14:04:59 +02:00
3a96cfcd26 Fix crash on startup on macOS, after recent framebuffer refactoring. 2018-04-03 09:36:31 +02:00
b3004d30f5 Undo: remove particle undo push
Was only called on copy particle system
which is already doing an undo push.
2018-04-03 08:57:01 +02:00
72ae0e1b6d Cleanup: editor BKE_main includes 2018-04-03 08:42:12 +02:00
a0eb54142f Undo: replace global access w/ ED_undo_stack_get
While I'd like to avoid using this too much since the operator
system should handle.
It's less trouble than accessing it inline each time.
2018-04-03 08:35:42 +02:00
a7a25fed2b Fix mode switching error on undo
For 2.8 there is already a utility function for this,
wrap it - avoiding an undo step.
2018-04-03 08:05:18 +02:00
751782c8df Correct own error in string lookup 2018-04-03 07:44:37 +02:00
Dalai Felinto
495b21fa0c Move to Collection: Reduce memory leakage
This is really minor but anyways, now it will only leak if you cancel the menu.
And that only if htis is the last time you called this operator before closing
Blender.
2018-04-02 18:52:22 -03:00
Dalai Felinto
89eb9c7f3e Move to Collection: Use automatic fallback name for new collections popup 2018-04-02 17:25:22 -03:00
Dalai Felinto
1f291d5814 Collections: API to get automatic name of new collection 2018-04-02 17:25:22 -03:00
Dalai Felinto
0faa065ed4 Move to Collection: Popup for naming new collection 2018-04-02 17:25:22 -03:00
Dalai Felinto
80e7a48f21 Fix blenderplayer (tm) 2018-04-02 17:24:20 -03:00
31f2a6755d PyAPI: Add PyC_Tuple_Pack_F64 utility 2018-04-02 19:48:34 +02:00
71d7d6cd8c Build: add WITH_OPENVDB_3_ABI_COMPATIBLE option.
Better fix for T54457. It seems Debian compiles OpenVDB without ABI 3
compatibility, while Arch does enable it as is the default in the OpeVDB
CMake build system.

So now there's an option that the distribution can set depending on how
they compile their OpenVDB package.
2018-04-02 19:13:04 +02:00
72c57a755e UI: Fix: Center vertical scrollbar circles. 2018-04-02 18:47:56 +02:00
e1d6e524b3 UI: Perf: Batch Trias with widgets.
This remove another portion of imm calls and reduce overall drawcall count.
2018-04-02 18:47:56 +02:00
4041385ddd Cleanup: remove redundant imbuf return values
Some functions always returned the input argument
which was never used.

This made code read as if there might be a leak.

Now return a boolean (true the imbuf is modified).
2018-04-02 17:34:52 +02:00
b49290be14 Partial fix for T54491: Use a more accurate solution to calculate the frustum boundbox 2018-04-02 12:21:09 -03:00
Milan Jaros
888a04c7e4 Build: fixes for the Intel compiler versions 2016, 2017, 2018.
Differential Revision: https://developer.blender.org/D3109
2018-04-02 16:39:04 +02:00
692aeb6fe0 Cleanup: newlines left in messages 2018-04-02 15:46:31 +02:00
89fdd88906 Merge branch 'master' into blender2.8 2018-04-02 15:18:10 +02:00
57bbd478a5 Cleanup: remove unused view_layer argument 2018-04-02 15:11:53 +02:00
4ffa05c30b Cleanup: move undo into it's own directory
Split out undo API from ED_util.h into ED_undo.h
2018-04-02 15:07:40 +02:00
b186592b21 Cleanup: move BKE_global include under ifdef's 2018-04-02 14:19:44 +02:00
44efbef41e Undo: store active curve shape key in edit-mode 2018-04-02 13:13:57 +02:00
017c731cf3 Logging: use for Python API
Adds categories "bpy.context" & "bpy.rna"
2018-04-02 13:13:57 +02:00
21fcc723e9 imbuf: revert some of the changes of rBb6ba3c682dd6615e760905572a5bcd69bb46371f since they broke the build. 2018-04-01 15:17:17 -06:00
b29ecbfc6b Fix compiling with Alembic
Still need G.main
2018-04-01 19:50:19 +02:00
c0eab1fde5 Workaround for undo steps not storing object modes 2018-04-01 19:33:02 +02:00
557db587b7 Merge branch 'master' into blender2.8 2018-04-01 11:14:09 +02:00
b65ea517eb Merge branch 'master' into blender2.8
- Undo that changes modes currently asserts,
  since undo is now screen data.

  Most likely we will change how object mode and workspaces work
  since it's not practical/maintainable at the moment.

- Removed view_layer from particle settings
  (wasn't needed and complicated undo).
2018-04-01 11:03:25 +02:00
f48895f74a Correct accidental changes by C Logging addition
Error in 891c1cfc9a
2018-04-01 10:23:28 +02:00
473f17b3d5 Resolve unsigned comparison error w/ MSVC 2018-04-01 07:41:23 +02:00
b6ba3c682d Cleanup: remove global header 2018-04-01 07:24:45 +02:00
951d89b7b4 Cleanup: warning 2018-03-31 23:51:38 +02:00
d18116a297 Removed by accident in last commit 2018-03-31 23:47:05 +02:00
651b8fb14e Undo: unified undo system w/ linear history
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
  should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
  undo data is restored.
- Some undo types accumulate changes (image & text editing)
  others store the state multiple times (with de-duplication).
  This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
  manage restoring correct ID's.
  Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
  Previously this wasn't done, making history fail in some cases.
  This can be optimized to skip some combinations of undo steps.

grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.

See D3113
2018-03-31 20:40:37 +02:00
916c91bd08 BLF: Remove debug print
"this is not the commit you're looking for"
2018-03-31 20:33:05 +02:00
4ae7235637 BLF: Fix Vertical/Horizontal layout switch.
This was breaking the first drawcall after a simple/non-simple shader
switch.
2018-03-31 20:26:09 +02:00
c77870fc78 UI: Perf: Batch icons drawcalls together.
For this we use a new shader that gets it's data from a uniform array.
Vertex shader position the vertices using these data.

Using glUniform is way faster than using imm for that matter.

Like BLF rendering, UI icons are always (as far as I know) non occluded and
displayed above everything else. They also does not overlap with texts so
they can be batched at the same time.
2018-03-31 19:43:22 +02:00
4dc0c923fb BLF: Perf: Do not call FT_Set_Char_Size every time.
Using FT_Set_Char_Size is slow. Calling it only when needed is more clever.
2018-03-31 19:32:53 +02:00
f9691bae84 BLF: Perf: Add a kerning cache table for ascii chars.
This adds less than a megabyte of mem usage.
FT_Get_Kerning was the 2nd hotspot when profilling. This commit completly
remove this cost.

One concern though: I don't know if the kerning data is constant for every
sizes but it seems to be the case. I tested different fonts at different
dpi scalling and saw no differences.
2018-03-31 19:32:53 +02:00
91d0825b55 BLI_sort_utils: add pointer sorting callback
Also rename Pointer -> Ptr
2018-03-31 19:25:27 +02:00
ae3a1da1e6 Logging: fix own error with formatting 2018-03-31 15:43:47 +02:00
b237a1c2ea Use int instead of bool
Causes issues when including in some files.
2018-03-31 15:33:15 +02:00
db8e7f9780 Logging: add argument --log-show-basename
Optionally strips leading path from filenames when logging.
2018-03-31 15:29:46 +02:00
5cb440492e Cleanup: --help text output
Some arguments missed their <value>.
2018-03-31 14:53:15 +02:00
22d40fdfd8 Cleanup: blf internal struct naming
- use x/y/width/height/max as a suffix.
- replace 'num' prefix /w 'len' suffix.
2018-03-31 13:40:23 +02:00
0ef38879b3 Cleanup: BLF batch drawing naming
- batching -> batch_draw.
- ct & size -> len.
- start/end -> begin/end (follow GL convention).
2018-03-31 13:11:38 +02:00
ac4513a5b8 Logging: add ability to exclude categories. 2018-03-31 12:52:47 +02:00
5f59c22bf1 Docs: doxygen docs for clog 2018-03-31 12:27:18 +02:00
b8a66973ac Fix clog: own error allocating from static buffer 2018-03-31 11:25:49 +02:00
af11eea3fd Fix logger build w/ MSVC 2018-03-31 09:18:30 +02:00
1ebc14064b Build deps: do sndfile patch also on linux platform 2018-03-31 02:15:13 +03:00
8b74741b9e GWN: Perf: Bypass glUseProgram(0)
I left a flag to quickly debug if something is wrong.
But now that everything uses shader, it seems to be alright since a shader
is always set active before drawing.
2018-03-30 23:27:45 +02:00
ddbde6d1c0 UI: Perf: Do not use implicit Attrib fill. 2018-03-30 22:51:28 +02:00
4241d6a9cc BFL: Fix broken vertical texts.
I've made a separate version of the geom shader that works with full
3D modelviewmat.

This commit also includes some fixup inside blf_batching_start().
2018-03-30 22:50:17 +02:00
96d6a928ab DRW: Add BLF_batch_reset to be able to use BLF inside DRW. 2018-03-30 21:10:24 +02:00
f44d3e83cc UI: Perf: Add BLF batching for File browser and UI blocks.
This batch together most of the calls that can be batch together.
2018-03-30 21:09:24 +02:00
963e48e1df BLF: Add Batching capabilities.
You can now use BLF_batching_start and BLF_batching_end to batch every
drawcall to BLF together minimizing the overhead introduced by BLF and the
opengl driver.

These calls cannot be nested (for now).

If the modelview matrix changes, previously batched calls are issued and a
the process resume with the new matrix.

However the projection matrix MUST not change and gl scissors as well.
2018-03-30 20:59:45 +02:00
fb1463ff2b GPUFramebuffer: Fix assert triggering another assert. 2018-03-30 20:15:03 +02:00
ab9adf9cdc BLF: Use Batch API instead of IMM.
This is not a perfect win just yet. It's now calling glBufferSubData for
every call (instead of using glMapBufferRange which is almost faster), but
with this system we will be able to batch drawcalls together.

See next commit.
2018-03-30 20:09:26 +02:00
8568d38f1b GWN: Add GWN_vertbuf_vertex_count_set.
This allows us to specify a the number of vertices to upload to the gpu.
This is to keep the same allocation on the System Memory but send the least
amount of data to the GPU/Driver.
2018-03-30 20:09:26 +02:00
891c1cfc9a C Logging: use instead of printf for messages
- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.

See D3120 for details.
2018-03-30 18:57:41 +02:00
c647c93f63 build_deps: Disable building docs for OIIO
Two issues are fixed with this commit:

1) When we build OIIO (on unixoid build environments) and no /src/doc/oiiotool was present we had no build target for it (which led to a build error). As we don't need docs for OIIO, we disable it now.

2) We specified a var that OIIO does not recognize (was removed upstream a long time ago): ILMBASE_VERSION.
2018-03-30 15:22:40 +02:00
Dalai Felinto
cc69831796 Select Grouped: Collection Part II
Selecting not only the objetcs directly linked to the selected collection.
So we also do it for the objetcs in the nested collections, just as we can
do from the outliner.
2018-03-29 20:03:47 -03:00
Dalai Felinto
41a81fece4 Collections: API to select all scene collection objects 2018-03-29 20:03:47 -03:00
Dalai Felinto
534916258d Select Grouped: Collection Part I
Use Shift+G > Collection. If there is only one collection, it just selects it,
if there are multiple ones user get to pick which one to select.

This is the same behaviour we have for groups. Note, we only select objects
directly in the collection, not the ones in any nested collection.

Feature suggested by Pablo Vazquez (venomgfx)
2018-03-29 20:03:47 -03:00
Dalai Felinto
024395170c Fix typo in outliner Select Objects tooltip 2018-03-29 20:03:47 -03:00
Dalai Felinto
156b548208 Collections: API to get collection from index 2018-03-29 20:03:47 -03:00
Dalai Felinto
1251043636 Collections: API to check if object is in collection 2018-03-29 20:03:47 -03:00
ee2aa31982 PyDoc: Merge manual docs for bge.texture
https://docs.blender.org/manual/en/dev/game_engine/python_api/videotexture.html

Had a few things that this file did not while this file having things the other did not.
To fix, I merged both documents into the python api.
2018-03-29 18:02:04 -04:00
b882257fbd BLF: Reduce the size of the buffer requested to IMM.
There is no point to not call strlen if the number of char is large.
2018-03-29 21:32:26 +02:00
7144fdf285 BLF: Perf: Divide by 6 the amount of verts sent to the GPU.
This means smaller imm buffer usage.

This does not reduce the number of drawcalls.

This uses geometry shader which is slow for the GPU but given we are really
CPU bound on this case, it should not matter.

A perfect implementation would:
- Set the glyph coord in a bufferTexture and just send the glyph ID to the
  GPU to read the bufferTexture.
- Use GWN_draw_primitive and draw 2*strllen triangle and just retrieve the
  glyph ID and color based on gl_VertexID / 6.
- Stream fixed size buffer that the Driver can discard quickly but this is
  the same as improving IMM directly.
2018-03-29 21:32:26 +02:00
c48b6fae9a GWN: Add immVertex4f. 2018-03-29 21:32:26 +02:00
354dfdac88 UI: Edit mode move edge data tool into a menu
UI: Edit mode move edge data tool into a menu

See also:

- D1741
- T46853

Reviewers: Severin, meta-androcto, campbellbarton

Subscribers: mont29, #user_interface

Tags: #user_interface

Differential Revision: https://developer.blender.org/D2259
2018-03-29 14:26:49 -04:00
0f6d52cd29 PyDocs: Adde link to Wikipedia page for mathutils.Euler class
This update adds a link to the Wikipedia article "Euler angles" to the description of the mathutils.Euler class.
I initially was not sure what a "Euler" represented in Blender API, but found the Wikipedia article helpful. I believe others will find the link helpful too if it appears in the class documentation.

This is similar to the Wikipedia links that appear in the mathutils.Matrix class, e.g: https://docs.blender.org/api/blender_python_api_current/mathutils.html?highlight=euler#mathutils.Matrix.adjugate

Author: @justasb

Reviewers: campbellbarton, trumanblending, Blendify

Reviewed By: Blendify

Subscribers: Blendify

Tags: #bf_blender

Differential Revision: https://developer.blender.org/D3077
2018-03-29 14:25:13 -04:00
Julian Eisel
b3ef5a04d1 Cleanup: Use uppercase UI_ prefix for external functions
Using uppercase prefixes is our convention for external functions.
"External" as in functions exposed to the outside of interface/ directory.
2018-03-29 17:21:02 +02:00
Julian Eisel
973eeff2ea Fix Blenderplayer compile error 2018-03-29 17:15:35 +02:00
8b45fd8b61 UI: Fix out of bound read catched by asan. 2018-03-29 16:46:28 +02:00
d93e7e6430 UI: Perf: Group fill/border/emboss batches together.
This roughly halves the number of drawcalls from widgetbase_draw.
2018-03-29 16:36:01 +02:00
Dalai Felinto
26b9c502ed Merge remote-tracking branch 'origin/master' into blender2.8
Fix for T54437: Sequencer preview uses last updated scene

The fix started in master, moving EvaluationContext initialization
before we leave `deg_evaluate_on_refresh()`.

Upon merging master we can fix the actual issue which was to set
the EvaluationContext depsgraph even if the depsgraph was already updated.
2018-03-29 10:36:34 -03:00
Dalai Felinto
11130970c6 Merge commit 'origin/master^' into blender2.8 2018-03-29 10:36:01 -03:00
Dalai Felinto
9f60c850f9 Depsgraph: initialize EvaluationContext even if nothing to update
This is required to T54437 (sequencer preview uses last updated scene).
Although the fix itself needs to be in 2.8, for the 2.8 specific
initialization code.
2018-03-29 09:56:09 -03:00
f6ad538040 UI: Perf: widgetbase: Replace imm usage by a batch cache.
Introduce a UI batch cache. For the moment it's only used by widgetbase so
leaving it interface_widgets.c. If it grows, it can have its own file.

Like all preset batches (batches used by UI context), vaos must be refreshed
each time a new window context is binded.

This still does 3 GWN_batch_draw in the worst cases but at least it does
not use the IMM api.

I will continue and batch the 3 calls together since we are really CPU
bound, so shader complexity does not really matters.

I cannot spot any difference on all the widgets I could test. I did not use
any unit tests so I cannot tell if there is really any defects.

This is not a complete rewrite but it adresses the top bottleneck found
after a profilling session.
2018-03-29 14:22:50 +02:00
ba9c2746b6 GPUShader: Add specialized widget base shader.
This vertex shader let us draw widgets with batches instead of imm calls.
2018-03-29 14:22:50 +02:00
3c48a21833 GWN: Batch: Add GWN_batch_uniform_4fv_array 2018-03-29 14:22:50 +02:00
8301b26452 EEVEE: Fix bad framebuffer configuration
Was causing black / corrupted scene because of broken downsample

Add a debug check to not run into this problem again.
2018-03-29 13:43:30 +02:00
72b4d444f6 Particles: Fix missing hair dynamics
Only if all the nasty looking bugs had such a simple solution...
2018-03-29 12:43:00 +02:00
44cd24a9ce Particles: Remove dedicated recalc field from ParticleSettings
Use more generic id->recalc flag.

Also sanitize flag flush from settings to particle system.
Need to do such flush before triggering point cache reset, since
point cache reset will do some logic based on what flags are set.

This will solve crash caused by threaded update which will set
some bitflags while point cache reset is in progress.
2018-03-29 12:41:11 +02:00
526719bccb Cleanup, silence compiler warning in release build 2018-03-29 12:40:23 +02:00
95b9680597 Draw manager: Make particle code drawing closer to old viewport
The way how particle state is to be accessed or used did not change
in Blender 2.8, so the drawing code should follow old design.

This code is somewhat duplicated from drawobject.c, but old draw
code is on the way to be removed anyway.

This fixes issue with disappearing particles when tweaking number
of particles.
2018-03-29 12:31:32 +02:00
0cbf747ffa Draw manager: Make evaluation context a part of context state
This way we don't have to re-initialize the full evaluation
context in every area we need it.
2018-03-29 12:18:07 +02:00
3177023104 Draw manager: Use C99 struct initialization
Allows us to easily add fields which we never want to
be initialized, but still keep sane order of fields in
the structure itself.
2018-03-29 12:07:11 +02:00
90e1a5fd27 Draw manager: Use utility functions for dealing with state memset 2018-03-29 11:43:42 +02:00
f42c6960d2 Draw manager: Cleanup, early output
Do early output and reduce level of indentation.
2018-03-29 10:34:42 +02:00
05c76990c8 Depsgraph: Tag datablock with original update flag
Tagging based on components might not be granular enough.

For example, for particles we would want to know what part
of particles was changed exactly. For the flushing we wouldn't
worry too much, because we will want less granular updates
there anyway.
2018-03-29 10:08:56 +02:00
ca5f3dd220 Fix T54457: build error with OpenVDB versions newer than 3.
Solution provided by Sven-Hendrik Haase.
2018-03-29 07:21:35 +02:00
52302757cd Fix T54455: OpenCL build error after recent changes. 2018-03-29 07:14:09 +02:00
Matt Heimlich
e3f1d98098 Cycles: take into account diffuse roughness for roughness baking.
Roughness baking previously defaulted to 1.0 for all diffuse materials,
now we also bake roughness values of Oren-Nayer and Principled Diffuse.

Differential Revision: https://developer.blender.org/D3115
2018-03-28 23:45:15 +02:00
Dalai Felinto
6456d59b6b Move to Collection - Add new collection
Include option to create new collection and move objects to this
collection.

Based on suggestion by Pablo Vazquez (venomgfx) and my own feedback.
2018-03-28 17:15:33 -03:00
Dalai Felinto
ba90597f22 Move to Collection - Skip Master Collection nested level
Have the Master Collection always opened. This removes one level of nesting.
As suggested by Pablo Vazquez (venomgfx).
2018-03-28 17:15:01 -03:00
Dalai Felinto
f167226b79 Move to Collection - initial operator
How to use: Select a few objects, and press "M" in the viewport.

If you hold ctrl the objects will be added to the selected collection.
Otherwise they are removed from all their original collections and moved
to the selected one instead.

Development Notes
=================
The ideal solution would be to implement an elegant generic multi-level
menu system similar to toolbox_generic() in 2.49.

Instead I used `uiItemMenuF` to acchieve the required nesting of the menus.

The downside is that `uiItemMenuF` requires the data its callback uses to be
always valid until the menu is discarded. But since there is no callback we
can call when the menu is discarded for operators that exited with
`OPERATOR_INTERFACE`.

That means we are using static allocated data, that is only freed next time
the operator is called. Which also means there will always be some
memory leakage.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3117
2018-03-28 17:14:51 -03:00
1953de335e Cleanup: Tooltip spelling 2018-03-28 13:09:00 -04:00
1b6bf5b75e build_deps: disable hdf5 lib support
we do not ship with hdf5 support for alembic on any of the platforms.
2018-03-28 10:48:52 -06:00
8afc9c1e7d Fix Collada: broken tangents with Camera Animation import for xfov
When importing an xfov curve, we must transformed the data to
Lens opening angles in degrees. While the curve value itself is
correctly transformed, the transformation of the tangents has been
forgotten. this is fixed now.
2018-03-28 18:01:32 +02:00
Jeff Witthuhn
bc3a55c343 Cycles: don't require pthreads as dependency on Windows.
Use C++11 threads when available, and native critical section on Windows.
Later on we can remove pthread code when C+11 becomes required.

Differential Revision: https://developer.blender.org/D3116
2018-03-28 12:13:04 +02:00
205fe8afd7 Clay: Remove warning. 2018-03-28 11:33:23 +02:00
e49d66f22c Cleanup: typo in function name 2018-03-28 11:23:38 +02:00
a970ac5d55 BLI_array: utility to check memory is zerod 2018-03-28 11:13:54 +02:00
4bd5b824b0 Fix missing confirm quit dialog on macOS, after recent changes. 2018-03-28 10:54:17 +02:00
be587d76ef Cycles: Fix bad register cast in sseb
This is currently unused code, but causes gcc-8 to fail.
2018-03-28 10:34:31 +02:00
873c23456b UI: Perf: Don't use implicit Attrib.
Implicit attrib is doing memcpy which seems to be slower compared to
individual immAttrib*.

Only fixed the ones who appeared in my profilling logs.
2018-03-28 00:05:57 +02:00
0acf655f9d UI: Perf: Group drawcalls inside ui_draw_panel_dragwidget
16 Drawcalls > 1 Drawcall

Do I need to say more?
2018-03-28 00:05:57 +02:00
637993fafe UI: Perf: Make icon_draw_texture use GWN_draw_primitive.
This bypass the use of immediate mode for theses drawcalls. Placement and
and icon select (via uvs) is done inside the vertex shader.
2018-03-28 00:05:51 +02:00
3bb720a7de GPUShader: Cleanup: Remove unused uniform_interface. 2018-03-27 23:51:23 +02:00
7a94d4362a DRW: Opti: Make cursor use batch instead of immediate API.
This is also much cleaner and taking 1 drawcall instead of 2.
2018-03-27 23:50:26 +02:00
2117680094 UI: Fix assert cause by vertex count being too small. 2018-03-27 17:58:05 +02:00
2cbd7cc269 UI: Perf: Optimize widgetbase_draw.
Drawcall per window redraw on default layout:
- 4100+ without patch
- 1270 with patch

Theses drawcalls meant a lot of driver overhead since they each correspond
to one glMapBuffer which is slow.
2018-03-27 17:03:42 +02:00
e4d82c0dcf Fix T54435: Quit prompt fails w/ fractional scale 2018-03-27 16:46:10 +02:00
90b7bcb48d Merge branch 'master' into blender2.8 2018-03-27 15:09:00 +02:00
e22b870b4a Cleanup: global undo (minor changes to internals)
- Get memory usage from MemFile instead of MEM API
  avoids possible invalid when threads alloc memory.
- Use size_t instead of uint and uintptr_t to store size.
- Rename UndoElem.str -> filename
- Rename MemFileChunk.ident -> is_identical
2018-03-27 14:56:54 +02:00
ddecf23711 Merge branch 'master' into blender2.8 2018-03-27 07:08:58 +02:00
3bca1ef26b Cleanup: move paint curve undo into own file 2018-03-27 07:06:14 +02:00
a7aee250b8 Fix T54420: too much volume render noise with multiple volume objects.
Random numbers for step offset were correlated, now use stratified samples
which reduces noise as well for some types of volumes, mainly procedural
ones where the step size is bigger than the volume features.
2018-03-27 01:08:30 +02:00
17a4a5a553 Eevee Shaders: Fix "No matching overloaded function"
invert -> inverse
2018-03-26 19:11:02 -03:00
dff7f55cd0 GPUFramebuffer: Fix compiler warning about return value. 2018-03-26 17:54:46 +02:00
fc348a563e Fix bad merge resolution from previous commit 2018-03-26 14:59:55 +02:00
21aca14e43 Merge branch 'master' into blender2.8 2018-03-26 14:56:00 +02:00
3c45fdd171 GHOST: Solve compilation error of test programs 2018-03-26 14:51:56 +02:00
64e5f83133 BLF: Don't use user preferences
BLF is a low level module, which might (and is) used without Blender.

Thanks Campbell for review!
2018-03-26 14:49:23 +02:00
0476f8277a BLF: Cleanup, indentation inside of preprocessor 2018-03-26 14:07:19 +02:00
13f80a152a Fix T53800: Bad data editing during DEG evaluation?
Remain convinced that it should not be possible for undo code to run in
parallel with DEG eval... But for now, this whould prevent static
override code to dive into this collection.
2018-03-26 10:41:31 +02:00
0c49d83b49 Eevee: Use named EEVEE_EffectsFlag for effects flag. 2018-03-26 10:02:53 +02:00
b9ec7a9272 Eevee: Fix feedback loop warning. 2018-03-26 10:01:46 +02:00
92b61dc16d GPUTexture: Fix compilation issue. 2018-03-26 09:59:12 +02:00
41852c8a8c DRW: Fix crash/broken Metaballs display. 2018-03-25 20:06:12 +02:00
42b5328c36 DRW: Rename DRW_shgroup_uniform_buffer into DRW_shgroup_uniform_texture_ref
This is in order to not mix it with the incomming buffer textures.
2018-03-25 20:06:12 +02:00
94dd81941f DRW: Remove mentions of DRWInterface.
Theses are no longer relevant. Better talk about shgroup directly.
2018-03-25 20:06:12 +02:00
bc15ec0896 GPUFramebuffer: Refactor (Part 2)
This refactor modernise the use of framebuffers.
It also touches a lot of files so breaking down changes we have:
 - GPUTexture: Allow textures to be attached to more than one GPUFrameBuffer.
   This allows to create and configure more FBO without the need to attach
   and detach texture at drawing time.
 - GPUFrameBuffer: The wrapper starts to mimic opengl a bit closer. This
   allows to configure the framebuffer inside a context other than the one
   that will be rendering the framebuffer. We do the actual configuration
   when binding the FBO. We also Keep track of config validity and save
   drawbuffers state in the FBO. We remove the different bind/unbind
   functions. These make little sense now that we have separate contexts.
 - DRWFrameBuffer: We replace DRW_framebuffer functions by GPU_framebuffer
   ones to avoid another layer of abstraction. We move the DRW convenience
   functions to GPUFramebuffer instead and even add new ones. The MACRO
   GPU_framebuffer_ensure_config is pretty much all you need to create and
   config a GPUFramebuffer.
 - DRWTexture: Due to the removal of DRWFrameBuffer, we needed to create
   functions to create textures for thoses framebuffers. Pool textures are
   now using default texture parameters for the texture type asked.
 - DRWManager: Make sure no framebuffer object is bound when doing cache
   filling.
 - GPUViewport: Add new color_only_fb and depth_only_fb along with FB API
   usage update. This let draw engines render to color/depth only target
   and without the need to attach/detach textures.
 - WM_window: Assert when a framebuffer is bound when changing context.
   This balance the fact we are not track ogl context inside GPUFramebuffer.
 - Eevee, Clay, Mode engines: Update to new API. This comes with a lot of
   code simplification.

This also come with some cleanups in some engine codes.
2018-03-25 20:06:12 +02:00
f937123116 GPUFramebuffer: Refactor (part 1)
Move some DRWFramebuffer functions to GPUFramebuffer.
2018-03-25 20:06:12 +02:00
e5ee1ed818 Basic Engine: Remove unneeded use of Framebuffers. 2018-03-25 20:06:12 +02:00
9c1ab47fc4 GPUOffscreen: Remove unused offscreen blit. 2018-03-25 20:06:12 +02:00
619d977e1a GPULamp: Move GPU_frambuffer_blur to GPU_lamp.c
This is a bit useless because gpu lamps are only used by the game engine
and it is planned to be "remove" in some way.

Doing this to clean gpu_framebuffer.c.
2018-03-25 20:06:12 +02:00
4c66068790 GPUFramebuffer: Make current framebuffer thread local.
This make sense since we are using multiple olg contexts and two contexts
can be active at the same time with different framebuffers.
2018-03-25 20:06:12 +02:00
a78f5accbb GPUTexture: Style: Respect 120 char per line limit. 2018-03-25 20:06:12 +02:00
37a7cd8344 GPUViewport: Small simplifications + fixes.
- Use GPU_SHADER_2D_IMAGE_ALPHA.
 - Add alpha uniform.
 - bypass reseting the scissors and depth test because we used
   another context for drawing.
2018-03-25 20:06:12 +02:00
6d6c292cf8 Clay: Fix alpha problem cause by FXAA pass. 2018-03-25 20:06:12 +02:00
f63bb98223 GPUViewport: Remove depth debug.
This is not used anymore.
Debug visualisations should be moved to the draw manager.
2018-03-25 20:06:12 +02:00
b1c025d1e8 GPUTexture: Small refactor.
This includes a few modification:
 - The biggest one is call glActiveTexture before doing any call to
   glBindTexture for rendering purpose (uniform value depends on it).
   This is also better to know what's going on when rendering UI. So if
   there is missing UI elements because of this commit look for this first.
   This allows us to have "less calls" to glActiveTexture (I did not
   measure the final count) and less checks inside GPU_texture.

 - Remove use of GL_TEXTURE0 as a uniform value in a few places.

 - Be more strict and use BLI_assert for bad usage of GPU_texture functions.

 - Disable filtering for integer and stencil textures (not supported by
   OGL specs).

 - Replace bools inside GPUTexture by a bitflag supporting more options to
   identify texture types.
2018-03-25 20:06:11 +02:00
879eabedda DRWTexture: Remove DRW_texture_update 2018-03-25 20:06:11 +02:00
b9962d0070 DRW: Remove unecessary push/pull attrib.
Since we are rendering draw manager's command in a separate context, we
don't need to save/restore the UI opengl state attributes/config.
2018-03-25 20:06:11 +02:00
e02480fd16 GPU: gpu_draw.c: Fix wrong renaming.
Renaming happened in b4d053efc7 and seems to have been a bit too
agressive.
2018-03-25 20:06:11 +02:00
31bf6edf79 Text: line break always returned cancelled
Harmless but incorrect.
2018-03-25 17:51:49 +02:00
977a4e7f5d Text: re-allocate exact lengths for undo
Undo sometimes reserved too much space in the buffer,
now assert when this happens and allocate the exact size needed.

Note prepares for moving text editor undo out of the text block (D3113)
which will split the undo buffer into a list of undo steps.
2018-03-24 14:27:31 +01:00
3f9d5ea0ec Fix text editor undo w/ 4+ byte utf8 characters 2018-03-24 14:14:19 +01:00
9d1de621e2 Cleanup: move undo opcodes out of public header 2018-03-24 12:46:25 +01:00
19f148d9d0 PyDoc: Add docutils ref for "registration"
This will be used to link to from the manual.
2018-03-23 20:25:30 -04:00
Julian Eisel
357b72e0a7 Theming: Use list-item colors for all un-embossed buttons in list-items
E.g. number buttons in the shape key list would use theme colors of text
widgets.

Addresses T50862.
2018-03-23 20:46:51 +01:00
a7e4268bee UI: restore quit confirmation when dialog disabled 2018-03-23 17:32:13 +01:00
0c753c1dc4 RNA comparison/override: better control over property processing.
This commit essentially introduces a new RNA property flag, which when
set prevents affected property from being processed at all in comparison
code (also used to automatically generate static override rules).

The idea is to use it on very low-level data in RNA, like e.g. mesh's
geometry or psys' particles collections.

For now only applied to psys' particle collections, on the main mesh of
Agent327 pigeon, it goes from 100ms to 0.5ms on a full
auto-override-generating comparison...

Also added some new RNA property helper funcs to check on comparable and
overridable status.
2018-03-23 16:35:53 +01:00
15af75d79e msvc: Fix msvc2013 new despgraph related build errors.
msvc's function.hpp does not like NULL for function pointers. disabled support for this platform.
2018-03-23 09:23:08 -06:00
21f16bb93e Merge branch 'master' into blender2.8 2018-03-23 15:25:27 +01:00
4f8e407086 Libmv: Fix compilation error on Windows 2018-03-23 15:05:08 +01:00
ab48e6355d Glog/gflags: Reduce amount of local modifications
With better directory layout and more proper include
statements we can avoid several local modifications,
such as changing config.h for Windows Glog and the
ones related on pass-through statements in logging
headers in Glog.

This commit also makes unused functions not-a-warning
for external code.
2018-03-23 14:38:02 +01:00
Julian Eisel
60712d12eb UI: 4-column layout for the editor-type selector menu
The list of editor-types is rather long by now, so better to arrange them into
sections.

Original patch by @jeske with updates by @Blendify and myself.
Design Task: T36028
Patch: D3112
2018-03-23 14:28:46 +01:00
8eb8aa4939 Merge branch 'master' into blender2.8 2018-03-23 12:05:55 +01:00
da00a50f7f Merge branch 'master' into blender2.8 2018-03-23 11:56:14 +01:00
7cc2b27099 Cleanup: stray tabs
Tabs in middle of code (mostly for no reason / by accident).
2018-03-23 11:51:19 +01:00
f2f32c81d4 Cleanup: doxy header, line length 2018-03-23 11:28:25 +01:00
72c43e0285 Cleanup: move image undo into own file 2018-03-23 09:15:23 +01:00
Julian Eisel
529c21acc2 Fix issues with confirmation prompt on Windows
* Pressing "OK" wouldn't close Blender anymore
* Using File -> Quit would use popup version, not OS native window

Cleaned up code a bit to avoid duplicated logic.
2018-03-23 02:00:14 +01:00
Julian Eisel
aeec19d2e7 Fix own mistake from 4cb4556fa5
Trying to close Blender from a second window wouldn't work, the first window
would have to be hovered first. Ouch!
2018-03-22 23:52:38 +01:00
Julian Eisel
a4ea46ffc5 Fix memory leaks when doing "Save & Quit"
Steps to reproduce were:
* Open Blender (no need for factory settings, "Promt Quit" needs to be enabled)
* Edit the file (e.g. translate some object)
* Quit Blender but don't skip quit promt
* Press "Save & Quit"
* Save the file

Not sure if Windows supports the "Save & Quit" behavior, so this may not have
applied to Windows.
2018-03-22 23:29:48 +01:00
Julian Eisel
4cb4556fa5 Fix T48027: Memory leaks when exiting Blender from menu
You only had to close Blender through File -> Quit.

Leaks happened because WM_exit() was called from within operator, UI wasn't able
to free some of it's heap data then. This data was the handler added in
uiTemplateRunningJobs() and the IDProperty group added in uiItemFullO_ptr_ex().
There was obviously a general design issue which only became visible in this
specific case.

We now delay the WM_exit call by wrapping it into a handler that gets registered
as usual. I didn't see a better way to do this, all tricks done in
ui_apply_but_funcs_after() to prevent leaks didn't work here. In fact they may
be redundant now, but am not brave enough to try ;)
2018-03-22 23:25:28 +01:00
2ee4e9761f GPUCompositing: Remove last reference to gpu_shader_fullscreen_vert.glsl
It was breaking compilation with MSVC apparently.
2018-03-22 22:39:24 +01:00
150ad2238c PyDocs: Fix link syntax 2018-03-22 16:38:53 -04:00
0080878d67 Merge branch 'master' into blender2.8 2018-03-22 19:21:36 +01:00
897a21e6a3 Glog: Restore some custom config for MSVC2015 2018-03-22 17:48:36 +01:00
4486eddfaa GLog: Tweak settings according to our config
We do have gflags.
2018-03-22 17:32:51 +01:00
c9e7e1987b Glog: Workaround mess around windows and non-windows headers
Seems we can not use include directories order trick, since
files are included form inside ".." string, which forces current
directory to be checked first.
2018-03-22 17:26:02 +01:00
9f45f1a6b7 GFlags: Fix usage of unused attribute 2018-03-22 17:19:56 +01:00
2a4c40f4b9 Glog: Attempt to fix compilation error on Windows
Ideally it should be possible without hacking into sources files
of Glog itself.
2018-03-22 17:02:16 +01:00
0bce7186f7 Glog: Restore haiko OS 2018-03-22 16:58:23 +01:00
27d9863fa5 Fix T54172: Avoid jumping panel length during playback 2018-03-22 11:42:35 -04:00
18e2a5df1a Merge branch 'master' into blender2.8 2018-03-22 16:41:37 +01:00
69b327d8dc Depsgraph: Report new depsgraph evaluation time
Timing is printed to the console when running with --debug-depsgraph-time.
2018-03-22 16:40:32 +01:00
d554b8a748 UI: skip confirmation menu on quit prompt to save 2018-03-22 16:24:14 +01:00
47acd706fd GPUCompositing: Remove entire module.
This module has no use now with the new DrawManager and DrawEngines and it
is using deprecated paths.

Moving gpu_shader_fullscreen_vert.glsl
to draw/modes/shaders/common_fullscreen_vert.glsl
2018-03-22 16:11:49 +01:00
161393805f Update Google libraries
This commit updates:

- gflags 2.2.0 -> 2.2.1
- glog 0.3.4 -> 0.3.4
- gmock 1.7.0 -> 1.8.0
- gtest 1.7.0 -> 1.8.0
2018-03-22 16:10:08 +01:00
cfe43f8d1a Fix T54360: FFMPEG bitrate not editable for all codecs
The bitrate selection was hidden when a CRF mode was chosen and then
switched to a codec that doesn't support CRF.
2018-03-22 14:47:22 +01:00
e35f964daa Cleanup: Use more python way of checking boolean 2018-03-22 09:33:15 +01:00
865fbe343a Fix T54348: Bone dissolve gives invalid hierarchy
Disconnected bones weren't handled correctly.
2018-03-22 07:50:58 +01:00
ce51066e47 Fix bone dissolve using wrong envelope radius
Also correctly copy bone tip selection when dissolving.
2018-03-22 07:50:03 +01:00
6939523a15 Fix T54203: crash changing engine w/ project-paint 2018-03-21 16:51:56 +01:00
a6914d8f33 Eevee: Fix missing camera animation with CoW 2018-03-21 16:39:00 +01:00
5c08d17423 Draw manager: Fix missing active camera triangle with CoW 2018-03-21 16:31:10 +01:00
d33d6d0e06 GHOST CONTEXTWGL: Remove unused member
No longer used from this commit: https://developer.blender.org/rB0940e89e604d85d717f792b73e30e5e96a42e7c6#change-kg3gZvqkYPB6
2018-03-21 12:30:36 -03:00
69eb452622 Merge branch 'master' into blender2.8 2018-03-21 16:27:48 +01:00
3ea8710b9d Depsgraph: Remove redundant operation nodes
Rather a mistake since previous merge.
2018-03-21 16:12:36 +01:00
5ba5254ec1 UI: Optional prompt to quit for non win32 systems
D566 by @januz

Use Blender native dialog when OS dialog's aren't supported.
2018-03-21 16:04:01 +01:00
75c6119dc9 Fix: GWN Indexbuf creation was replacing the index buff bound to the last VAO
This led to problems such as the drawing of the navigate manipulator.
More details in the code comments.
2018-03-21 11:55:38 -03:00
cac2415d82 Merge branch 'master' into blender2.8 2018-03-21 12:47:13 +01:00
23ffd4ec39 Tracking: Make object created form tracks active and selected 2018-03-21 12:33:04 +01:00
658fb7f453 Tracking: Warn when no tracks are selected when creating mesh
Makes it more clear why mesh was not created this way.

Fixes T54368: 3D markers to mesh In MovieClipEditor Not working.
2018-03-21 12:30:50 +01:00
1e43665a39 Fix T54378: Drivers fail with property from empty
Empties were missing Parameters component.
2018-03-21 12:17:51 +01:00
f3efa2526d Fix T54366: Custom manipulator acts on linked data 2018-03-21 07:26:58 +01:00
Julian Eisel
7701f9e35c Fix crash when changing workspaces
Steps to reproduce were:
* Append a workspace (via '+' icon) - make sure its from the default workspaces.blend
* Activate it
* Should crash

Was accessing data from view-layer which wasn't updated yet (and thus could be
NULL). Crash occured after rB8153f89518b4a.

@campbellbarton, you may want to check if all object-mode stuff still works as
expected, not sure what's the state of it.
2018-03-20 23:31:44 +01:00
Dalai Felinto
89aa4b1604 Link and expand overrides for collections
This code was neglected. Yet it is needed for when we support datablock
overrides so that the ID pointers are properly linked and expanded.
2018-03-20 14:48:54 -03:00
504319239a Cleanup: remove useless static override reference pointer from ID struct. 2018-03-20 18:12:45 +01:00
410410f57b Add basic read-only RNA access to static override data.
Will make investigating issues much, much easier!
2018-03-20 18:12:45 +01:00
8a94a82934 Fix broken tatic verride detection in RNA collections.
We have to check all items of a collection when we want to create
overrides as needed...
2018-03-20 18:12:45 +01:00
d03223850e Fix build error on Windows 32 bit. 2018-03-20 17:11:14 +01:00
e0388bc61a Merge branch 'master' into blender2.8 2018-03-20 16:55:16 +01:00
69e35429bf Remove debug only code from previous commit 2018-03-20 16:54:50 +01:00
a5bb918392 Memory allocator: Clarify consistency check function
Also make it to return truth when everything is good and
false otherwise.
2018-03-20 16:51:33 +01:00
ebbb55dd80 Depsgraph: Fix memory leak when datablock is not reused
It is possible that datablock will not be re-used for the new
dependency graph building. Freeing function was freeing all
the nested pointers of databnlock, but not datablock memory
itself.
2018-03-20 16:07:27 +01:00
c188ab7b67 Depsgraph: Prevent non-expandable datablocks from being freed
This avoids original image datablock destruction when using
copy on write.
2018-03-20 16:07:27 +01:00
4f97f58513 MSVC: Fix lite build.
MSVC still defines __cplusplus as 199711L until it's in full conformance with the newer c++ standards, however the things we need from the standard are fully supported, hence a check for the msvc version was needed.
2018-03-20 08:26:11 -06:00
cdf0df10a6 DRW: Fix bound_ubo_slots allocation size. 2018-03-20 15:16:10 +01:00
8a9be95cfb DRW: Fix ubo binding code. 2018-03-20 15:08:23 +01:00
09c88fed1f Fixed: cache clearing when using multiple Alembic files. 2018-03-20 12:54:48 +01:00
1782abf6e2 Fix BLI_assert for MSVC
Also use `_BLI_ASSERT` prefix for internal defines.
2018-03-20 11:56:11 +01:00
04b8b1a167 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2018-03-20 11:33:59 +01:00
60ff803998 Fix missing ID pointer handling in materials in ID remapping code. 2018-03-20 11:32:16 +01:00
46a391b668 Fix missing array duplication when copying material
Texture paint slots were copied as a pointer, causing double-free.
2018-03-20 11:22:47 +01:00
1662c514c0 Cleanup: unused variables
Missed in own recent changes.
2018-03-20 08:03:58 +01:00
c8a7c4f245 Merge branch 'master' into blender2.8 2018-03-20 16:13:37 +13:00
8e5c407fc4 Fix compile error with MSVC2013 - Can't use __func__ (from BLI_assert) in inlined functions
ERROR: blenlib/intern/math_base_inline.c:371 - '__func__' : undeclared identifier (C:\blenderdev\master2\blender\source\blender\editors\lattice\editlattice_tools.c)  [C2065]
2018-03-20 16:03:43 +13:00
Bogdan Nagirniak
b65933e7b3 Fix T54019: copying and linking bugs with custom ID pointer properties. 2018-03-19 22:14:02 +01:00
84536d1d3c GPU Bufferes: Small optimization when updating buffers
With the API recently added to gawain, it is now possible to update the vbos linked to the batch.
So the batch does not have to be destroyed.
The optimization is more sensitive when sculpt is made on low poly meshs
2018-03-19 18:09:00 -03:00
Matthias Ellerbeck
8ecf35d850 Fix T54240: automatic node link moving should take into account type.
Without this a "Clearcoat" link could be moved to "Clearcoat Normal"
for example, which doesn't make much sense.

Differential Revision: https://developer.blender.org/D3105
2018-03-19 21:52:49 +01:00
148b0fef09 Fix T54317: overlapping volume render bug after recent changes.
Increasing the samplig dimensions like this is not optimal, I'm looking
into some deeper changes to reuse the random number and change the RR
probabilities, but this should fix the bug for now.
2018-03-19 21:22:15 +01:00
fddb4dee8a Fix T54356: volume rendering bug using just color attribute. 2018-03-19 21:22:15 +01:00
254bb922e8 Cleanup: avoid passing bContext to particle API
Also add EvaluationContext to PEData
2018-03-19 19:04:50 +01:00
402486ea7b Merge branch 'master' into blender2.8 2018-03-19 18:18:49 +01:00
b8eca8e07d Cleanup: use utility header for particle looping 2018-03-19 18:18:04 +01:00
5e81d993af Merge branch 'master' into blender2.8 2018-03-19 18:14:05 +01:00
a3486e735f Cleanup: move particle undo into own file
Also avoid extern declarations which can get out of sync.
2018-03-19 17:46:49 +01:00
a5fc0ae150 Cleanup: move armature undo into own file 2018-03-19 17:45:20 +01:00
566f4e06ba Cleanup: move metaball undo into own file 2018-03-19 16:59:34 +01:00
e7ca9d3477 Cleanup: move curve undo into own file 2018-03-19 16:30:53 +01:00
b5bf3011bf GWN: Vertex Buffer: Remove the use of glMapBufferRange
We revert to the malloc/realloc and manually manage the upload.
There seems to be a performance penalty from using glMapBuffer on some
hardware, prefering way is glBufferData(NULL) with glBufferSubData.
2018-03-19 16:13:00 +01:00
c78ebf9f26 Cleanup: split lattice into own library
Was mixed with object functionality.
2018-03-19 15:45:50 +01:00
772e558e92 GWN: Perf: Use unsync glMapBufferRange to prevent sync time. 2018-03-19 14:14:32 +01:00
f2ae7796c3 GWN: Context: Use <unordered_set> instead of <forward_list>
We cannot have duplicates so unordered_set is better suited for this case.

Removing batches is now constant time on average instead of linear.
2018-03-19 14:14:32 +01:00
8859927e6f Merge branch 'master' into blender2.8 2018-03-19 11:17:52 +01:00
342a18287f Cleanup: type conversion warning 2018-03-19 09:12:48 +01:00
7729966af1 Fixed typo Python API
`mathutils.geometry.barycentric_transform` used `tri_a[1-3]` for the
target triangle, but in fact they are `tri_b[1-3]`
2018-03-19 08:19:48 +01:00
e95282e783 Merge branch 'master' into blender2.8 2018-03-18 16:05:02 +01:00
0301df40e5 Fix ugly recursive pattern in RNA PointCache data layout.
PointCache was having a collection of items of PointCache type, having a
collection of items of PointCache type, having...

Nuff said.

For now, chose the 'ugly' way to fix it, that is, the one that changes
nothing to API and scripts using it: we define another 'PointCacheItem'
RNA type for items of our point cache collection, which has exact same
interface as PointCache except for the collection.

This is doomed to be rewritten at some point anyway, not worth spending
time trying to define a really correct data layout for now.
2018-03-18 15:37:23 +01:00
368c581df1 CMake: disable boost for lite builds 2018-03-18 05:10:02 +01:00
2a9f000806 Cleanup: kdopbvh, only set parent nodes once 2018-03-18 05:08:12 +01:00
a51fdd89fd Cleanup: use MEM_SAFE_FREE 2018-03-18 05:08:12 +01:00
2aa0bde3dc mathutils: replace interp w/ blend when standalone 2018-03-18 05:08:12 +01:00
07c90f3a73 build_environment: remove msvc compiler warning from boost.
Even the boost people have given up trying to keep up with the rapid release
of new msvc versions, and have removed the warn for now see: 5ad0730630 (diff-eac863c1d46c77471e54e8818aab7534)
2018-03-17 12:47:17 -06:00
7427e3e501 MSVC: ignore warning c4828 The file contains a character that is illegal.
The only place this warning is coming from is from comments in headers of 3rd party libs. we can safely repress this warning for now.
2018-03-17 12:45:27 -06:00
4a3d94c073 Eevee: Volumetrics: Fix crash when using smoke volumes. 2018-03-17 19:08:14 +01:00
1ed287058d DRW: Fix error in texture binding / unbinding. 2018-03-17 18:48:14 +01:00
c2f36c3558 GWN: Element Buffer: Refactor / Optimisation.
- Upload the data to the GPU directly when creating the element buffer in
   GWN_indexbuf_build_in_place().

 - Convert data in place when squeezing the indices and removing the need
   for another allocation.

 - GWN_indexbuf_build_in_place() can be used with already used element
   buffers and reupload their data without changing vbo id (keeping vaos
   up to date).
2018-03-17 18:23:04 +01:00
87d88581aa GWN: Vertex Buffer refactor.
We now alloc a vbo id on creation and let OpenGL manage its memory directly.
We use glMapBuffer to get this memory location.

This enables us to reuse and modify any vertex buffer directly without
destroying it with its associated Batches.

This commit does not really improve performance but will let us implement
more optimizations in the future.

We can also resize the buffer even if this can be slow if we need to keep
the existing data.

The addition of the usage hint makes dynamic buffers not a special case
anymore, simplifying things a bit.
2018-03-17 17:02:07 +01:00
dd44248219 DRW: Move cache time to GPUViewport for profiling
This enables us to average this timer over time like the others.
2018-03-17 17:02:07 +01:00
9ed7093aa6 Merge branch 'master' into blender2.8 2018-03-17 14:24:06 +01:00
64fbd50e4c Refactor: Collada: remove param, changed order of params in Function call
* In the Collada Module parameters are typically ordered
  in a similar way. I changed this to:

    extern std::string get_joint_id(Object *ob, Bone *bone);

* The Object parameter was not used in get_joint_sid().
  I changed this to:

	extern std::string get_joint_sid(Bone *bone);
2018-03-17 14:16:19 +01:00
dc08df659e Merge branch 'master' into blender2.8 2018-03-16 17:50:07 +01:00
e15591a1d7 Fix (unreported) a broken 'RNA diff collection' case.
When a name property is defined for collection's struct, but no name is
actually set, we want to also fallback to index case. We cannot handle
empty names to address items of a collection!
2018-03-16 17:49:54 +01:00
c722fd2184 Some more minor cleanups. 2018-03-16 17:49:54 +01:00
5389964eea Add an assert to BKE_icon_changed() that we are actually dealing with ID icon.
Otherwise, ID->obj is an opaque pointer, wrong usage here could lead to
a vast amount of bad things.
2018-03-16 17:17:19 +01:00
1a71d5ae85 Fix T54310: Assert when enable Brush custom icon.
We had a mix of two issues here actually:
* First, Brush are currently using their own sauce for custom previews,
this is not great, but moving them to use common ImagePreview system of
IDs is a low-priority TODO. For now, they should totally ignore their
own ImagePreview.
* Second, BKE_icon_changed() would systematically create a PreviewImage
for ID types supporting it, which does not really makes sense, this
function is merely here to 'tag' previews as outdated. Actual creation
of previews is deferred to later, when we actually need them.
2018-03-16 17:06:43 +01:00
67e2806dcb Cleanup: naming and const parameter. 2018-03-16 16:44:23 +01:00
36e7de9eb3 Merge branch 'master' into blender2.8 2018-03-16 12:26:37 +01:00
da4efaeb87 Depsgraph: Support colored addresses in debug prints
Enabled with --debug-depsgraph-pretty, only works with ANSI terminals.

Thanks Bastien for review!
2018-03-16 12:24:51 +01:00
295d8510af Add Truecolor ANSI console constants
They are used to start and end colored output in console.
Use with care, it is up to you to check that console actually
supports Truecolor ANSII.

In thew future we can extend this to other consoles and platforms.
2018-03-16 12:16:29 +01:00
f0596bf660 Hash: Add utility function to convert address to rgb values
Some magic hashing, will become handy to make debug messages
easier to follow.
2018-03-16 12:11:55 +01:00
5baf0de6e7 Merge branch 'master' into blender2.8 2018-03-16 11:24:41 +01:00
3baf31e73a Depsgraph: Move evaluation debug prints to depsgraph
This way we can easily control format and keep it consistent.

And also possibly do other trickery, like coloring addresses!
2018-03-16 11:14:38 +01:00
5de9c8f6f0 Cleanup: move mesh mirror functions to own file 2018-03-17 00:55:11 +11:00
ee0697e50b Cleanup: doxy sections for editmesh files. 2018-03-17 00:55:11 +11:00
7e954d974a GWN: Uncomment a (now) usefull assert 2018-03-16 08:50:31 +01:00
53f8c47c49 Eevee: Add warning comment about ubo/texture persistence.
More info on bindings persistence here :
8a692da7f81d8b0798f4aeebaa4a1123693fc279
2018-03-16 08:50:31 +01:00
2cfcffb057 Clay: Small cleanup.
Use persistent binds for the texture and UBOs.
Remove use of stencil.
2018-03-16 08:50:31 +01:00
93e26cb770 DRW: Fix/refactor UBO & Texture binding.
Previous approach was not clear enough and caused problems.
UBOs were taking slots and not release them after a shading group even
if this UBO was only for this Shading Group (notably the nodetree ubo,
since we now share the same GPUShader for identical trees).

So I choose to have a better defined approach:
- Standard texture and ubo calls are assured to be valid for the shgrp
they are called from.
- (new) Persistent texture and ubo calls are assured to be valid accross
shgrps unless the shader changes.

The standards calls are still valids for the next shgrp but are not assured
to be so if this new shgrp binds a new texture.

This enables some optimisations by not adding redundant texture and ubo
binds.
2018-03-16 08:50:31 +01:00
43d0943141 Merge branch 'master' into blender2.8 2018-03-17 01:43:19 +11:00
2816694b05 Code cleanup: fix various compiler warnings on clang/macOS. 2018-03-16 05:08:56 +01:00
3692a2bcb3 Merge branch 'master' into blender2.8 2018-03-16 04:35:37 +01:00
e5327afcb7 Fix T54326: Import Alembic stuck in edit mode
Switch to object mode before doing the import.
2018-03-16 04:06:34 +01:00
Cheryl Chen
07b07e53ea Fix T53971: single layer render showing the wrong render layer in image editor.
Original patch Cheryl Chen, extra fixes by Brecht.

Differential Revision: https://developer.blender.org/D3098
2018-03-16 00:58:10 +01:00
Guillaume Chereau
e56fd59f22 Code refactor: move OIIO image buffer writing outside session, into callback.
Original patch by Guillaume, modifications by Brecht.

Differential Revision: https://developer.blender.org/D3102
2018-03-15 23:05:16 +01:00
41149ca134 GHOST: Support Unity taskbar progress API
Unity itself is deprecated, but the API is also supported by KDE and the GNOME Dock extension,
which means that it will be useful for a wide variety of distributions.

To get a progress bar, the system must have a blender.desktop file and libunity installed.

The need for libunity is annoying, but the only alternative would be to integrate a DBus library...

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D3106
2018-03-15 22:49:56 +01:00
995ccf8168 BLI_assert: extract from BLI_utildefines
BLI_utildefines is quite large, defining many unrelated things.
Add BLI_assert to include in inline headers, so math defines don't
pull in too much.
2018-03-16 06:03:29 +11:00
cca1e1b707 UV/Image Editor: Optimize UV Drawing
Use batchs to store the entire buffer of loops before drawing.
These batchs can be stored in the mesh draw cache later.
2018-03-15 13:36:16 -03:00
709ffd94ee Depsgraph: Fix missing shader updates with copy on write
Basically, don't do full in-place copy of node tree datablock if it's
already expanded. Current way how node tree is evaluated is fully
built around the idea that evaluation copies values from original
to copied datablocks.

Changing links is handled on another level.
2018-03-15 15:21:07 +01:00
1816d1f992 Mesh: Batch cache: Fix sculpt update issue.
Old solution was to create a new vbo and copy it to the location of
the old vbo hoping for the batches to update their vaos before drawing.

The issue is that the new VAO caching is not updating the VAOs at all
unless the shader interface changes.

So unless we expand gawain to support updating of vertex buffers (in a
better way than the current "dynamic" buffer) we need to delete every batch
linked to the vbo we want to recreate.

This solution might have performance implications.
2018-03-15 13:58:25 +01:00
a769cae241 GWN: Fix compilation error without VRAM_USAGE flag. 2018-03-15 13:58:25 +01:00
8d36629b4b Merge branch 'master' into blender2.8 2018-03-16 06:11:35 +11:00
d7a8a864ed Minor cleanup & commenting. 2018-03-15 09:44:16 +01:00
316ccc4a6e GHOST: Fix wrong usage of wglCreatePbufferARB.
Last argument must be a pointer to list of int terminated by a value of 0.
2018-03-15 01:51:46 +01:00
71139cedcb Missed last commit 2018-03-15 11:16:32 +11:00
e55c29b4ec BLI_math: don't use asserts in inline API
Requires BLI_utildefines.h to be included first,
(already noted in other inline code).

Possible alternative could be to move BLI_assert into own header.
2018-03-15 11:12:10 +11:00
6fa4001824 GWN: Batch: Perf: Comment out glBindVertexArray(0)
Even if they are for safety they are not free to use !

On my system (Mesa + AMD Vega GPU) calling:
glBindVertexArray(1);
glDrawArrays(GL_TRIANGLES, 0, 3);
glBindVertexArray(0);
in a loop, shows the same overhead as a full vao switching (which is more
or less 10 times slower than just calling glDrawArrays)

Moreover, now that we use OpenGL 3.3 binding a VAO is REQUIRED to issue a
drawcall so it is garanted to be overwritten before the next drawcall.
Problem can only happen if someone draws directly with opengl commands.
2018-03-14 22:44:27 +01:00
75de653e4d GWN: Batch: Only revert to default Vao when needed.
Drawing ranges via glDrawArrays is already supported and should not need
a manual offset in the VAO like glDrawArraysInstanced or glDrawElements.
2018-03-14 22:44:27 +01:00
4ecc8b6786 GWN: Add primitive restart in element/index buffers.
This allows to draw multiple primitive of the type
GWN_PRIM_LINE_STRIP
GWN_PRIM_LINE_LOOP
GWN_PRIM_TRI_STRIP
GWN_PRIM_TRI_FAN
GWN_PRIM_LINE_STRIP_ADJ
with only one drawcall. This should speed up some areas that are really
sensitive to drawcall counts : UV drawing, Hair drawing...
2018-03-14 22:44:27 +01:00
2c80a4d4aa Fix T54322: partial redraw not working after recent refactor. 2018-03-14 20:39:10 +01:00
9009622b54 Merge branch 'master' into blender2.8 2018-03-14 18:10:31 +01:00
b0823962e9 Style cleanup. 2018-03-14 18:05:09 +01:00
d34b1b35bf Fix (unreported) broken IDarray case in IDP_EqualsProperties_ex.
For IDProps IDarray, IDP_EqualsProperties was called for each item,
instead of IDP_EqualsProperties_ex, discarding value of `is_strict`
option.

Probably not an issue with current code, though.
2018-03-14 17:53:29 +01:00
d0055155e8 Fix T54319: Crash after double-clicking baked F-curve 2018-03-14 16:02:46 +01:00
342593f124 Cleanup: rename BLI_array_count -> len
Match naming convention used everywhere else.
Count should only be used when this isn't directly accessible.
2018-03-15 01:53:20 +11:00
9521b67ac0 Depsgraph: Fix missing updates with drivers
The issue was only visible with copy-on-write enabled, and related to the
fact, that dependency graph builder binds original FCurves.

For now use smallest patch possible to make things to work and to make
draguu happy.

Need to think of a smarter way to deal with drivers, bones and view layers.
2018-03-14 15:21:31 +01:00
5c30121b8c Clay: Add FXAA.
I tried to use real multisampling but the main problem is the outline detection that needs to have matching depth samples.

So adding FXAA instead. Always on for now, may add a parameter for it later.

One thing to note is that we need to copy the final output once again to the main color buffer because we cannot swap the dtxl textures (they can be referenced elsewhere like GPUOffscreen).

We could improve upon this and add TAA on top if viewport is still.
2018-03-14 14:55:36 +01:00
3530ee2949 GPUViewport: Fix offscreen multisample syncing. 2018-03-14 12:55:19 +01:00
b4209b138f Clay: Refactor: Port clay to a deferred pipeline.
This means that rendering clay with AO only needs 1 geometry pass.
Thus greatly improving performance of poly heavy scene.

This also fix a self shadow issue in the AO, making low sample count
way better.

We also do not need to blit the depth anymore since we
are doing a fullscreen shading pass.

The constant cost of running the a deferred shading pass is negligeable.
This include quite a bit of code cleanup inside clay_engine.c.

The deferred pipeline is only enabled if at least one material needs it.
Multisampling is not supported yet.

Small hacks when doing deferred:
- We invert the normal before encoding it for precision.
- We put the facing direction into the sign of the mat_id.
- We dither the normal to fight the low bitdepth artifacts of the normal
  buffer (which is 8bits per channel to reduce bandwidth usage).
2018-03-14 12:41:00 +01:00
e22bc559b0 DRW: Add DRW_viewport_invert_size_get for more ease of use. 2018-03-14 12:41:00 +01:00
f7f3b08977 GPUTexture: Unlock GL_R16I format. 2018-03-14 12:41:00 +01:00
Dalai Felinto
e7c3c46e89 Fix make single user crash
How to reproduce the crash:
* Factory startup
* 'u'key (make single user)

It comes with a simple unittest to reproduce the original issue.
2018-03-14 08:13:27 -03:00
59aa8d22ef Cleanup: use flags instead of collection of bools to get RNA override status. 2018-03-14 11:47:35 +01:00
c22c2ff060 Updated bpy.props getter/setter example
- The common name in computer science are 'getters' and 'setters', so by
  adding these names to the documentation (while 'get' and 'set are still
  also mentioned) we improve findability. Having 'Getters/Setters' as a
  title also makes it clearer that this example is not just about
  getting or setting the property value.
- Added a little prefix to each printed value, so that print statement,
  expected output, and real output can be matched easier.
2018-03-14 11:42:36 +01:00
b76471c1f9 Fix T54286: bpy.props operator example misses property access
The old example had two downsides:

- It promoted a blocking UI design, where the user is shown a popup
  before actually executing the operator.
- It didn't show how to actually use the property values.

The new code avoids these mistakes. The properties are also shown in the
redo panel in the 3D view.

Note that I also changed the bl_idname, as this is an example about
properties, not about dialogue boxes, and changed the class name to use
the standard operator naming convention.

I also extended the example to include a panel that sets multiple
properties of the operator, since I see questions about this relatively
frequently.
2018-03-14 11:31:14 +01:00
d430d12123 Merge branch 'master' into blender2.8 2018-03-14 18:08:37 +11:00
8803c5ca5d Cleanup: use sections for editmesh tools/select 2018-03-14 17:54:45 +11:00
7314904a77 Eevee: Fix sequencer rendering.
Sequencer rendering can use multisample render targets. Be sure to sync
thoses after rendering.

Also disable the sample loop when not needed.

Do note that currently the color correction is broken with the sequencer.
2018-03-14 03:29:10 +01:00
f5d529b8e2 GPUViewport: Fix offscreen multisample rendering.
Multisample rendering needs to have both a multisample and a regular color/depth target for engines that does not support MSAA.
2018-03-14 03:29:10 +01:00
bba3b43112 GPUTexture: Save sample count inside texture struct.
This adds a quick way to know if a texture is a multisample texture and its sample count.
2018-03-14 03:29:10 +01:00
c1694540c3 API generating script: give better version for releases builds.
Was giving '2.62.1 <sha1>' even for releases, now rather giving nicer
'2.62a <sha1>' in that case.
2018-03-13 19:49:39 +01:00
585208e0e9 Merge branch 'master' into blender2.8 2018-03-14 02:15:37 +11:00
be25a0faa7 Cleanup: pass selectmode directly
Pass instead of editmesh or toolsettings.
Needed for multi edit-mode
2018-03-14 02:08:29 +11:00
bf8f5f5142 Cleanup: doxygen comments 2018-03-14 02:08:07 +11:00
c99c45a1e3 Fix (unreported) crash when changing active shapekey in Edit mode.
Looks like someone changed the signature of some RNA update callback,
and for some reason that 'change skey' update function was not updated
(or later got merged from master)...

We'll need RNA to check for its func signatures, some day...
2018-03-13 14:08:17 +01:00
81c199af83 Fix T54302 - Wrong added scene when adding a scene strip to the Sequencer
When adding scene strips to the sequencer, the wrong scenes were
getting getting added if some were skipped. For example:
Given 4 scenes (A, B, C, D) if you're trying to add the last 3 scenes
(B, C, D) as strips to the first scene (A), it would ended up adding
"A, B, C" instead of "B, C, D" as expected.

Fix provided by Andrew (signal9).
2018-03-13 23:05:57 +13:00
e0bb5109b3 Use Action datablock's own icon (instead of Animation Data's one) for File Browser's lib icons 2018-03-13 23:05:57 +13:00
028580fd1e Merge branch 'master' into blender2.8 2018-03-13 18:39:51 +11:00
3106f18176 Cleanup: long lines, use doxy sections 2018-03-13 18:07:10 +11:00
ce08d0681b Eevee: Render: Add Info messages. 2018-03-13 04:25:50 +01:00
266cdf955e Eevee: Render: Allow cancel during probe update. 2018-03-13 03:58:27 +01:00
0f1d7a5796 Eevee: Render: Fix softlock if rendering before lazy shader compil ends.
Calling the rendering operator seems to kill any other WM_job running, leaving
uncompiled materials into a GPU_MAT_QUEUED state. This then made the probe update
looping indefinitely (all_materials_updated remaining to false).

To fix this, we resume compilation for materials that are in this state.
Cancelling Render before all material compilation could make certain material
remain uncompiled. Fortunately, this is not allowed as of now.
2018-03-13 03:58:00 +01:00
0acccda4a4 GPUMaterial: Fix non finished material status if shader has no output.
This wasn't producing any issue for now but it's better to make things clean.
2018-03-13 03:49:04 +01:00
8b399d3148 Eevee: Fix temporal sampling not resetting.
World Probe update was not resetting the TAA.

This also reset the volume sampling in cases that needs it (world/grid probe diffuse coefs update).
2018-03-13 01:35:16 +01:00
a3f4de64e5 Eevee: Fix bad Outlines after probe updates.
This was because the default matrices were not setup back after resetting the current TAA sample.
2018-03-13 01:24:51 +01:00
17793a66c6 Fix T54299: crash rendering objects with motion blur disabled, after recent changes. 2018-03-12 17:37:29 +01:00
733b9e4f99 Merge branch 'master' into blender2.8 2018-03-12 17:31:46 +01:00
44aa86b0a5 Cycles: reorganize tests in more evenly distributed groups. 2018-03-12 17:29:44 +01:00
e07dd9fd59 Cycles: add constant folding to displacement nodes. 2018-03-12 17:29:44 +01:00
629d44e049 Fix type in comment 2018-03-12 17:03:54 +01:00
a752bc148e Depsgraph: Make timing profile a command line option
This way we can add even more statistics, even one which will be print
to the console.

Would be nice if we also have verbosity level control.
2018-03-12 17:01:02 +01:00
815852e950 Fix T54296: Cycles viewport render stuck on constant re-render
Need Clear ID recalc flag on load. Otherwise it's possible to have
some IDs considered always updated by Cycles, when they were saved
in a tagged-for-update state.

Thanks Bastien for feedback and review!
2018-03-12 10:58:12 +01:00
8f4579affd Merge branch 'master' into 28 2018-03-12 16:38:41 +11:00
da62507bc8 Cleanup: remove misleading array size 2018-03-12 16:37:26 +11:00
d75456196f Cleanup: typo 2018-03-12 16:35:31 +11:00
ba01cdc770 Merge branch 'master' into blender2.8 2018-03-12 15:01:22 +11:00
25502a9bdc Cleanup: sync EDBM_uv_* functions w/ 2.8
They're nearly the same, so keep names matching to avoid conflicts.
2018-03-12 14:51:45 +11:00
1d0077649d Merge branch 'master' into blender2.8 2018-03-12 14:25:20 +11:00
1966924467 UV: internal changes to picking
Nothing user visible, only things needed for multi-object support,
making picking functions more flexible too.

- Support passing in an initialized hit-struct,
  so it's possible to do multiple nearest calls on the same hit data.
- Replace manhattan distance w/ squared distance
  so they can be compared.
- Return success to detect changes to a hit-data
  which might already be initialized (also more readable).
2018-03-12 13:57:38 +11:00
3a6f26c087 Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-03-11 23:47:08 +01:00
ddae05cdca Merge remote-tracking branch 'origin' into blender2.8 2018-03-11 23:45:53 +01:00
7fed3ad32b GPUImage: Add back garbage collection for the new viewport pipeline. 2018-03-11 23:44:10 +01:00
765d7242d5 GPUMaterial: Add Material shader cache.
This is mostly to avoid re-compilation when using undo/redo operators.
This also has the benefit to reuse the same GPUShader for multiple materials using the same nodetree configuration.

The cache stores GPUPasses that already contains the shader code and a hash to test for matches.
We use refcounts to know when a GPUPass is not used anymore.

I had to move the GPUInput list from GPUPass to GPUMaterial because it's containing references to the material nodetree and cannot be reused.

A garbage collection is hardcoded to run every 60 seconds to free every unused GPUPass.
2018-03-11 23:44:10 +01:00
7194259fb1 Eevee: SSS: Fix compilation error. 2018-03-11 23:44:10 +01:00
2c9c22df26 fix Collada: wrong usage of pointer and hidden redeclaration
* Suspicious usage of pointer:

  short *type = 0; // this creates a null pointer

When this is later used for anything then blender would crash.
After following the code and check what happens i strongly believe
the author wanted to use a short and not a pointer to a short here.

* local variable where reused later in same function
While this did no harm, i still felt it was better to use a different
name here to make things more separated:

- moved variable declaraiotns into loop (for int a=0; ...)
- renamed uv_images to uv_image_set
- renamed index variable from i to j in inner loop that
  reused same index name from outer loop
2018-03-11 20:59:50 +01:00
49a7cd1ba4 Cleanup Collada: Removed duplicate variable setting 2018-03-11 20:59:50 +01:00
7952ece01b Cleanup: avoid redeclaration of iterator in same function
The iterator was redeclared 3 times. I fixed this to avoid future issues.
I commit separately because so the changes are less cluttered all over
the place.
2018-03-11 20:59:49 +01:00
a2cc85b264 Cleanup Collada: Avoid unintentional reuse of previous defined variable
The variable child was redeclared multiple times in the same function.
While this has not created any issues i still changed this to avoid
confusion and keep the usage of the variables more local.
2018-03-11 20:59:49 +01:00
ca11ef7fd3 Fix Collada: Avoid unnecessary and even wrong check on unavailable data
The function validateConstraints() potentially causes a null pointer
exception. I changed this so that the function returns a failure as soon
as the validation fails. This avoids falling into the null pointer trap.
2018-03-11 20:59:49 +01:00
2de0daa179 Cleanup Collada: Make sure index variables are not reused
The variables i and j have been declared before in the same function.
I changed the names to mi and mj to keep things clear.
2018-03-11 20:59:49 +01:00
86b1887ded Cleanup Collada: make sure float array is initialised
This is just to silence a compiler warning and keeping
the code clean. The actual code never uses uninitialised
array elements.
2018-03-11 20:59:49 +01:00
01c27faed0 Refactor Collada: combined 2 almost identical functions into one
The 2 methods add_bezt() and create_bezt() do almost the same.
I combined them both into add_bezt() and added the optional parameter
eBezTriple_Interpolation ipo
2018-03-11 20:59:48 +01:00
3eaa408cb3 Fix T54274, and rename option --window-borderless to --window-fullscreen 2018-03-11 12:26:43 +02:00
7ecc7c46af Merge branch 'master' into blender2.8 2018-03-11 16:11:56 +11:00
63483fe417 Cleanup: long lines 2018-03-11 15:50:25 +11:00
93e0e716f3 Merge branch 'master' into blender2.8 2018-03-10 19:06:28 +01:00
23ccf5767f Cycles: add roughness baking support, using squared roughness convention. 2018-03-10 18:37:33 +01:00
7613ffc944 Cycles: switch to squared roughness convention for all nodes.
This was already done for the Principled BSDF to be compatible with typical
baked roughness maps in PBR workflows.
2018-03-10 18:05:01 +01:00
d27158aae9 Merge branch 'master' into blender2.8 2018-03-10 06:55:39 +01:00
8a76f8dac3 Code cleanup: fix compiler warning. 2018-03-10 06:51:52 +01:00
1f5c5fa189 Fix T54279: viewport update bug with volume meshes.
Meshes without vertex normals were not handled correctly.
2018-03-10 06:27:19 +01:00
3f2b88d195 Code refactor: reduce number of loops over meshes. 2018-03-10 06:27:19 +01:00
07d0a87b5c Fix T54278: volume artifacts with small density and color after recent changes. 2018-03-10 06:27:19 +01:00
50dde3d01a Fix T54269: saved EXR file files unreadable some editors in Blender.
Don't write the multichannel metadata when there is only a single layer,
and don't unnecessarily consider single layer images with Blender metadata
as multi layer.
2018-03-10 06:27:19 +01:00
d526b35ce2 Code cleanup: use spaces for aligned indentation. 2018-03-10 06:27:19 +01:00
db333d9ea4 Cycles: support arbitrary number of motion blur steps for objects. 2018-03-10 06:27:19 +01:00
78c2063685 Cycles: support arbitrary number of motion blur steps for cameras. 2018-03-10 06:27:19 +01:00
267d892326 Code refactor: motion blur cleanups, preparing for next commit. 2018-03-10 04:54:05 +01:00
6c4ddfc5d9 Code refactor: don't expose UpdateObjectTransformState in header. 2018-03-10 04:54:05 +01:00
b66efbecf4 Code refactor: make Transform always affine, dropping last row.
This save a little memory and copying in the kernel by storing only a 4x3
matrix instead of a 4x4 matrix. We already did this in a few places, and
those don't need to be special exceptions anymore now.
2018-03-10 04:54:05 +01:00
623141f339 Code refactor: add DecomposedTransform.
This is in preparation of making Transform affine only, and also gives us
a little extra type safety so we don't accidentally treat it as a regular
4x4 matrix.
2018-03-10 04:54:05 +01:00
516e82a900 Code refactor: add ProjectionTransform separate from regular Transform.
This is in preparation of making Transform affine only.
2018-03-10 04:54:04 +01:00
cd15d87bfc Code refactor: avoid motion transform copy, remove unused curved code.
The purpose of the previous code refactoring is to make the code more readable,
but combined with this change benchmarks also render about 2-3% faster with an
NVIDIA Titan Xp.
2018-03-10 04:54:04 +01:00
Stefan Werner
f3010e98c3 Code refactor: use KernelShader and KernelParticle instead of float arrays.
Original patch by Stefan with modifications by Brecht.
2018-03-10 04:54:04 +01:00
Stefan Werner
fa9175ff02 Code refactor: use KernelLight instead of float4 arrays.
Original patch by Stefan with modifications by Brecht.
2018-03-10 04:54:04 +01:00
Stefan Werner
f66ff4ee86 Code refactor: use KernelOject struct instead of float4 array.
Original patch by Stefan with modifications by Brecht.
2018-03-10 04:54:04 +01:00
f3161bd2ab Eevee: Planar Reflections: Fix corrupted results in downsampling step.
It only seems to happen in some drivers/gpu, the vertices gets culled if 4th component is 0.0. So lesson learned: always use 1.0 if constant.
2018-03-10 02:18:25 +01:00
92c2e2f386 Eevee: Planar Reflection: Add refraction support for reflected objects. 2018-03-10 02:18:25 +01:00
4f55ee5a3c Eevee: Add new clipping UBO.
This fixes problems with the planar reflections.
2018-03-10 02:18:25 +01:00
82957cfec8 Eevee: Make use of the new view matrix UBO. 2018-03-10 02:18:25 +01:00
41abbc271c DRW: Change UBOs binding logic.
Use the same logic than textures. Also reset bindings only on shader changes.
2018-03-10 02:18:25 +01:00
dfd8a52cd2 DRW: Change clip planes API.
The draw manager now just set the number of active clip planes. It's now up to the engine to specify the plane equations as uniform/ubo/constant.
2018-03-10 02:18:25 +01:00
1b8ba6b8b9 DRW: Add assert for uniform that needs valid data. 2018-03-10 02:18:25 +01:00
8444aaaa69 DRW: Put all view-only dependant uniform in a UBO.
This leads to less lookups to the GWNShaderInterface and less uniform upload.

We still keep a legacy path so that Builtin uniforms can still work. We might restrict this path to Builtin shader only in the future.
2018-03-10 02:18:25 +01:00
4540bd226d Eevee: Probes: Fix last planar reflections remaining after deletion. 2018-03-10 02:18:25 +01:00
13b99b7bbb Eevee: Probes: Add culling for planar probes.
Planar probes that have no influence on pixels in the view are culled.

This greatly improve performance when theses probes are offscreen.
2018-03-10 02:18:25 +01:00
7c31edb385 DRW: Culling: Expose & Add culling functions to engines.
This way engines can do preemptive culling by themselves.
2018-03-10 02:18:25 +01:00
4402633e33 BoundBox: Fix wrong max in BKE_boundbox_alloc_unit. 2018-03-10 02:18:25 +01:00
c962f7ef77 Eevee: Render: Add cancel support
You can now cancel your renders that are too long. This will still output the current status of the render. For example if you cancel at 50% rendering progress, you will have a render result with only half the render samples.
2018-03-10 02:18:25 +01:00
f043365c38 DRW: Culling: Fix precision error.
This was triggering the BLI_assert(fac >= 0.0f);.

Clamp fac to ensure correct value for release builds.
2018-03-10 02:18:25 +01:00
9cd09fee6a Eevee: Planar: Add transparent objects.
The ordering is left broken for the viewport as this can be quite heavy.
Only do it if doing a render.
2018-03-10 02:18:25 +01:00
e697c1da42 Eevee: Planar Probe: Add supersampling jitter.
This also fix a bug with the probe debug display when there was more than 2 probes. ped->probe_id was equal to 0 for all planar probes until the next frame. Resulting in all planar data debug to show probe 0.
2018-03-10 02:18:25 +01:00
Julian Eisel
41b38c5f75 Don't add "Report a Bug" button for official tracker to non-official add-ons
If no custom URL was set, add-ons would get a "Report a Bug" button opening
the default developer.blender.org bug tracker. Now we only add this default
button if the add-on is bundled and not installed by the user.
2018-03-09 21:22:24 +01:00
14e7ba0c8a Fix Pose Lib: pose is applied when selected bones don't overlap with pose
Premise: When pose bones are selected, applying a pose library should
only affect the selected bones.

This commit fixes a bug where the pose was also applied when there was
no overlap between the selected bones and the bones in the pose. For
example, applying a pose which contains only keyframes for the left
hand, while only right-hand bones are selected, would apply the pose
to the left hand anyway.

The code is now also slightly more efficient; the removed 'selcount'
counter was only used as a binary (i.e. zero or non-zero). It's now
stored as a bitflag instead.
2018-03-09 19:03:29 +01:00
c3d7be150b Cleanup: iterator macros
This line was missing in previous commit
2018-03-09 11:00:54 +01:00
d3e14c2e2f Manipulator: disable UV widget, following prefs 2018-03-09 20:44:41 +11:00
40e62f271c FFmpeg: Add regression tests
Currently only covering handful of files from reports about wrong fps detected.

It will need D3083 applied first to get tests passed, also tests themselves
are to be committed to svn.

But there are some python code which needs to be reviewed, like blendfile
passed to run_blender().

Reviewers: sybren, mont29

Reviewed By: sybren, mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D3096
2018-03-09 10:33:20 +01:00
370a2d6917 Fix T53857: Incorrect framerate for videos imported from OBS
This is an issue with which value to trust: fps vs. tbr. They both cam be
somewhat broken. Currently the idea is:

- If file was saved with FFmpeg AND we are decoding with FFmpeg we trust tbr.
- If we are decoding with Libav we use fps (there does not seem to be tbr in
  Libav, unless i'm missing something).
- All other cases we use fps.

Seems to work all good for files from T53857, T54148 and T51153. Ideally we
would need to collect some amount of regression files to make further tweaks
more scientific.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D3083
2018-03-09 10:32:17 +01:00
f47a41a3d9 Cleanup: iterator macros
- put render iterator in own scope
  (would shadow it's own variable if used multiple times).
- enforce semicolon at end of iterator macros.
- no need to typedef one-off macro structs.
2018-03-09 11:52:11 +11:00
9342f55d12 Merge branch 'master' into blender2.8 2018-03-08 17:54:52 +11:00
222a941a2b Merge branch 'master' into blender2.8 2018-03-08 17:47:02 +11:00
ecab7bef69 Cleanup: Rename view3d context set function
Use common prefix so adding related functions share the prefix.
2018-03-08 17:30:24 +11:00
28f86bf117 Cleanup: use edit/active objects from view context
Needed to implement multiple edit-objects.
2018-03-08 17:27:36 +11:00
cb8311fecf Cleanup: set the view-context once 2018-03-08 17:27:36 +11:00
5331581ea4 Cleanup: Use BKE_ prefix for all public functions exposed by the NLA module 2018-03-08 17:15:34 +13:00
7e2100e499 T54233: NLA "Push Down" discards Blend Mode, Extrapolation, and Influence
Each AnimData block has a set of Blend/Extrapolation/Influence settings
that can be used to control how the active action is blended with the
NLA stack. However, these settings were not getting copied over to the
newly created strips (as the push-down code existed long before these
settings were added).

This commit solves this in several ways:
* Active Action Blend/Extrapolation/Influence settings now get copied
  to the new strips when adding them to the NLA stack via Push Down.

  Note: This doesn't happen when there are no existing NLA tracks,
        as these settings don't get used in that case.

* Strip Influence will be copied across when inf < 1.0 (i.e. when a
  non-default value is used), to maintain the effect. To make this work,
  the influence value will get added as a keyframe to the strip's
  "Influence" Control FCurve.

  - See code comments for an alternative approach and why that was not chosen
  - Strip Time still doesn't get keyframes added automatically yet.

* To ensure the "extrapolation mode" settings don't get always overwritten,
  I've put in place a compromise: the extrapolation will only get changed
  if the chosen setting will cause problmes (i.e. hold forward & back -> hold forward
  if there are other tracks before it already).

Not safe for backporting to 2.79[x] stable releases.
2018-03-08 17:15:33 +13:00
fb70f9bf99 Fix crash if NLA strip with "Use Animated Influence" setting is enabled without the Influence Strip F-Curve existing 2018-03-08 17:15:33 +13:00
a5d63624de Cleanup: Fix invalid name prefix 2018-03-08 17:15:32 +13:00
872df463f6 Eevee: Render: Add progress. 2018-03-08 00:09:04 +01:00
70fa15d1b8 Eevee: Save and reset matrixstate for probe rendering. 2018-03-08 00:09:04 +01:00
45ec962f68 DRW: Fix culling with inverted view (planar reflections)
Just invert the frustum planes in this case.
2018-03-08 00:09:04 +01:00
8d8f7e52c1 Make sure that the WM_opengl_context_create is always called on the main thread
Avoid the error 170 ("The requested resource is in use").
2018-03-07 20:05:51 -03:00
fef1b01553 Fix wglShareLists being called with rendering contexts in use
`wglShareLists` was failing with error code 170 ("The requested resource is in use").
2018-03-07 19:40:08 -03:00
596f33f801 Fix T54206: bevel and inset operations repeat did not remember offset.
Now repeating the operator will use the previously chosen offset, either with
the modal operator or typed in. The modal operator will still start at zero.
2018-03-07 22:53:22 +01:00
Julian Eisel
8851460174 Proper fix for User Preferences window crash
Reverts rBb9ae517794765d6a1660 and fixes the issue properly. Old fix could cause
NULL to be passed to functions that expect all arguments to be non-NULL.
2018-03-07 21:18:16 +01:00
Julian Eisel
c00b42b710 Fix Blenderplayer not compiling 2018-03-07 20:41:49 +01:00
d59627d361 Merge branch 'master' into blender2.8 2018-03-08 02:03:36 +11:00
118fb9f1f7 EditMesh: pass object data to notifiers
Both were being passed in different parts of the code,
use object data for consistency.
2018-03-08 01:49:30 +11:00
f02af0407f Cleanup: use _BEGIN suffix for group iterators 2018-03-07 20:46:27 +11:00
b9ae517794 Add missing NULL check
Caused loading user-prefs to crash.
2018-03-07 16:40:02 +11:00
49baf15a35 Merge branch 'master' into blender2.8 2018-03-07 14:31:53 +11:00
737a5efff4 Cleanup: edit-mode undo API
Move function descriptions into the struct,
minor improvements to variable naming,
use convention of 'g_' prefix for static vars.
2018-03-07 14:00:02 +11:00
4f23e13001 DRW: Fix memory leak.
This prevents the creation of a new job if no job is running.
2018-03-07 01:40:40 +01:00
cfba75a21a Eevee: Fix volume rendering glitches.
The bug was due to the Halton function returning uninitialized value for 0 iteration.
2018-03-07 01:40:40 +01:00
aa07660201 Eevee: Fix garbage on the first frames when enabling volumetrics.
Was cause by newly added shader deferred compilation.
2018-03-07 01:40:40 +01:00
267e816b9a Draw Manager: Simplify the algorithm that extract the BoundingSphere of a Frustum
The idea is to separate the most common case from symmetrical frustum. And to make a simple but efficient calculation.

The new radius is usually 98% the size of the radius size of the asymmetric solution.

Thanks to @fclem for reviewing the patch on IRC
2018-03-06 19:27:43 -03:00
faf70e1e64 Eevee: Fix crash with volumetrics + default mat + alpha blend 2018-03-06 16:52:06 +01:00
d5ecadd643 Eevee: Fix Cascaded shadowmap setup.
It was getting the wrong matrice because of the point light override.
2018-03-06 16:45:23 +01:00
6b5b61eb8c DRW: Fix DRW_viewport_matrix_override_set_all function. 2018-03-06 16:45:23 +01:00
4e7d9b7a98 Eevee: Fix probes not working after a world update. 2018-03-06 16:45:23 +01:00
f8b63b564d Eevee: Update to support shader deferred compilation.
World probe is tagged to refresh when it it's shader is updated.
Probes are recomputed only after all meshes shaders have been compiled.
2018-03-06 16:45:23 +01:00
2faa809ea6 GPU: Fix typo. 2018-03-06 16:45:23 +01:00
b55077a506 DRW: Fix broken grid in ortho view. 2018-03-06 16:45:23 +01:00
aa02c099f9 Eevee: fix wrong sizeof.
Like really? wtf dude? *self face slapping*
2018-03-06 16:45:23 +01:00
94fadd00d8 DRW: Shader Deferred compilation: Use a wmJob for threading.
Also get rid of the static var and initialization.
This enables the user to see the progress on the info header.
Closing blender or reading a file also kill the job which is good.

Unfortunatly, this job cannot be interrupt by users directly. We could make it interruptible but we need a way to resume the compilation.
2018-03-06 16:45:22 +01:00
3a209c2857 DRW: Deferred compilation initial implementation. 2018-03-06 16:44:04 +01:00
f14cbc0d07 Material: Free gpumaterials before the notree.
This is because gpumaterials can contain references to the tree when doing lazy compilation.
2018-03-06 16:44:04 +01:00
162ef15da6 Eevee: Fix bad framebuffer when changing probe resolution. 2018-03-06 16:44:04 +01:00
b7414d357a Screen: Fix screen layout preview render. 2018-03-06 16:44:04 +01:00
a6e6d7e022 Eevee: More use of DRW_viewport_matrix_override_set_all 2018-03-06 16:44:04 +01:00
2af6520007 DRW: Fix occlusion culling. 2018-03-06 16:30:27 +01:00
76122bc8f0 Cycles: Fix crash when building with no shading systems 2018-03-06 13:04:28 +01:00
ec904ed327 Cycles: Cleanup, indentation 2018-03-06 13:04:28 +01:00
8d572e8764 Cleanup: unused var 2018-03-06 22:42:32 +11:00
85b68aaf7f Merge branch 'master' into blender2.8 2018-03-06 20:04:02 +11:00
a5a0dcec90 Merge branch 'master' into blender2.8 2018-03-06 19:13:41 +11:00
4d86a432da Utility to enter sculpt mode 2018-03-06 19:11:19 +11:00
dd611dd0b8 Eevee: Optimize shadows drawing
In the gpus like `AMD Radeon HD 7570M` and `Intel(R) HD Graphics 4000` this solution improves performance a hundreds or even thousands of times depending on the resolution.

Reviewed By: @brecht and @fclem

Differential Revision: https://developer.blender.org/D3095
2018-03-05 22:03:14 -03:00
b5b5260464 Fix T54234, add BLENDER_VERSION_CHAR to .plist 2018-03-06 02:36:29 +02:00
d9d3ed16a8 Fix T53206: Array modifier doesn't merge vgroups
Vertex group remapping utility function,
now shared between object join and array modifier cap-ends.

Weights which don't exist are removed.

D3092 by @Foaly
2018-03-06 09:57:41 +11:00
84a154ac68 Merge branch 'master' into blender2.8 2018-03-05 16:14:46 +01:00
df267bd4c4 Sequencer: Expose read-only FPS property for movie-type strips
Main purpose is to make it possible to cover FPS detection with regression test.
But it might also be handy for some other scripters.

Thanks Campbell for review!
2018-03-05 15:01:23 +01:00
ae9beb1cea UI: rename panel 'Workspace Add-ons'
Show/Hide is limited to menus
2018-03-06 00:59:44 +11:00
caa0b0fadf Fix T54204: Wrong selection on Clean Tracks (Motion Tracking)
A mistake in a fix for T53612.

Regression in 2.79a, candidate for 2.79b :S
2018-03-05 12:00:25 +01:00
63d8ccf9ff Fix T54225: Blur node stopped working when Map Range was fed with image
The issue was happening with fast Gaussian blur, and caused by NaN value pixels
in the input buffer.

Now made it so Map Range output does not produce NaN, by returning arbitrary
value of 0. Still better than NaN!
2018-03-05 11:44:42 +01:00
9593a62746 Cleanup: left wrong comment in 2018-03-05 17:03:18 +11:00
f3018322c0 Fix T53478, T53430: Sequencer cut edge case fails
Previous fix for T53430 caused T54200.

The edge case for soft & hard cuts weren't working,
where the strip used start/end-still & the frame was placed exactly on
the start/end of of the sequence content.

T54200 fixed the end-still case but broke hard-cuts for all other cases.

This fixes the case for soft/hard cuts with/without start/end-still.
2018-03-05 16:58:01 +11:00
327985e887 Revert "Fix T53430: Cut at the strip end fails w/ endstill"
This reverts commit 855799ecc1.

Caused T54200
2018-03-05 16:58:01 +11:00
807663742b Error passing context arg to marker menu
own mistake in 6981861fcf
2018-03-05 14:10:43 +11:00
3607b4eb52 Fix LLVM/OSL library detection on macOS to prefer own OSL libraries. 2018-03-04 07:40:21 +01:00
74f3fb746a Fix Clang compiler detection on macOS.
"AppleClang" was not properly detected here. Now make the compiler ID
test a bit less compact but consistent with other code.
2018-03-04 07:39:04 +01:00
2adece9fbb Merge branch 'master' into blender2.8 2018-03-03 14:58:14 +01:00
dab20bd41f Fix T54211: OpenGL debug error message in texture draw mode.
Quite harmless and won't be a problem in 2.8.
2018-03-03 14:57:02 +01:00
8d575899a1 WorkSpace: use existing mode data w/ scene-switch
Check if mode data exists before attempting to change the modes.
2018-03-03 16:39:57 +11:00
b8f7538348 WorkSpace: avoid redundant notifiers w/ mode sync 2018-03-03 16:24:35 +11:00
d111f33008 WorkSpace: always change modes w/ the same active object 2018-03-03 12:28:42 +11:00
94b99949eb Fix T54202: Cycles crash rendering empty mesh volume after recent optimization. 2018-03-02 23:10:27 +01:00
Dalai Felinto
3fc2d122c4 Fix texture panel for Cycles
I keep reading that texture painting is not working yet. However it is fully
working. We even have a "Full Shading" option in the viewport display panel.

Clay/EEVEE still need their UI figured out. But the context itself is doing
its part after this patch, and at least for Cycles it's working like 2.79.
2018-03-02 17:19:04 -03:00
b6fe80ca19 Fix Cycle standalone build. 2018-03-02 19:56:22 +01:00
c43d51c1c2 Eevee: Make use of culling when rendering the shadowmaps. 2018-03-02 18:35:59 +01:00
9b47ad2974 Eevee: Cleanup & fix Warnings. 2018-03-02 18:35:59 +01:00
5e730974fe DRW: Add DRWMatrixState to manage all matrices together. 2018-03-02 18:35:59 +01:00
d63829117c DRW: Refactor simple instancing.
Instead of creating a new instancing shading group without attrib, we now have instancing calls. The benefits is that they can be culled.
They can be used in conjuction with the standard and generate calls but shader must support it (which is generally not the case).
We store a pointer to the actual count so that the number can be tweaked between redraw.

This will makes multi layer rendering more efficient.
2018-03-02 18:35:59 +01:00
62390527b2 Object Mode: Make use of optimized DRW_shgroup_call_object_add 2018-03-02 18:35:59 +01:00
1c12e1a2eb Clay: Perf: Early out of SSAO if there is no need for it. 2018-03-02 18:35:59 +01:00
Dalai Felinto
2308b5e9c5 Fix build errors in Linux 2018-03-02 13:09:32 -03:00
c327cf489c Merge branch 'master' into blender2.8 2018-03-02 16:42:27 +01:00
f76d49ed95 Depsgraph: Fix dependency cycle when ID prop drives ID property
Introduced explicit ID property node for driers in depsgraph,
so it is clear what is the input for driver, and what is the
output.

This also solved relations builder throwing lots of errors
due to ID property not being found.
2018-03-02 16:27:31 +01:00
411a781491 Depsgraph: Silence obviously noisy relations build errors
Those were happening for drivers which points to invalid drivers, and those
drivers will have their own dedicated error prints.
2018-03-02 15:51:44 +01:00
0fb55310b3 Depsgraph: Cleanup, use dedicated function to ensure node exists 2018-03-02 14:35:19 +01:00
f9f559a05f WorkSpace: Simplify exiting mode after changes
It was too tricky to know ahead of time if an object would still
be visible in the new window/workspace/scene/layer combination,
especially since other windows may share some of these data-blocks.

So store the context, make the change, then check if the object is
still visible, freeing mode data of it's not.
2018-03-03 00:23:02 +11:00
cedc7676ac Depsgraph: Cleanup, function return value
Driver build result was never used, so no reason to return operation.
2018-03-02 14:12:33 +01:00
35bd1bb957 WorkSpace: move edit mode w/ sync into own func 2018-03-02 23:04:19 +11:00
437801bec1 Correct draw manager locking flag check
Error in eeae50fc1c, thanks @mano-wii for spotting
2018-03-02 22:53:01 +11:00
42d9280b8a Depsgraph: Fix cycle detector to handle closed loops
It was possible to have relations like A -> B -> C -> A (import thing is
that no other operations points into this cluster) which were not detected
or reported by dependency cycle solver.

Now this is solved by ensuring we don't leave unvisited nodes behind.
2018-03-02 12:30:58 +01:00
99bcfb825f Cleanup: Avoid double semi-colon 2018-03-02 11:26:07 +01:00
b5b34bc2c0 Tests: Avoid access globals from abstract base class
Delegate functionality to subclasses, assert when subclasses didn't do
job the are supposed to do.

Thanks Sybren for pointing to a proper solution.
2018-03-02 11:18:12 +01:00
f2a2d5492b Cycles: Fix building of OpenCL kernels after volume optimization commit
OpenCL is C based, so no support for operators.

Related commit: 7377d411b4
2018-03-02 04:53:13 -05:00
e1f1567b56 WorkSpace: ED_workspace_object_mode_in_other_window check other windows
The same workspace can have different active objects depending on the
window. So check other windows.
2018-03-02 20:01:49 +11:00
a9509a2f8a Maintain scaling ratio of non-free axes in Maintain Volume T48079 fix.
This is probably a better way to handle it: instead of totally
discarding scaling of non-free axes, keep the ratio between them.
Basically the logic of the constraint is now that it rescales the
object uniformly in the non-free axis plane in order to force the
total volume change to the desired value.
2018-03-02 11:01:49 +03:00
8153f89518 WorkSpace: object-sync when changing workspaces. 2018-03-02 19:01:38 +11:00
eee3a4d3ab Cleanup: move ED_object_mode_generic_* to object_modes.c 2018-03-02 14:55:53 +11:00
da2d0fe43a Merge branch 'master' into blender2.8 2018-03-02 14:46:21 +11:00
4913e47aa0 Merge branch 'master' into blender2.8 2018-03-02 14:09:27 +11:00
ff74357da0 Object Mode: move logic to 'object_modes.c'
Was mixed with edit-mode, centralize mode switching in a single file.

No functional changes.
2018-03-02 14:00:47 +11:00
b7016e69b3 Cleanup: remove object-mode 'reset' check
Silently fail when attempting to enter a mode that's not compatible
with the object.
2018-03-02 13:37:35 +11:00
4df2179f19 Cleanup: rename 'screen_changed_update'
Match 'workspace_change_update'.
2018-03-02 13:25:21 +11:00
a7355c3221 WorksSpace: sync object-modes when changing scene
Note that this code will likely be generalized,
currently each new case is a little different though
so it's too early to move them into general functions.
2018-03-02 13:19:52 +11:00
7e4c23e4d7 FCurve: only calculate single axis length
Was calculating all 3
2018-03-02 12:45:25 +11:00
341ab45f7b Fix building w/o Python
Also minor cleanup.
2018-03-02 11:17:57 +11:00
bc23381a26 Cleanup: remove print 2018-03-02 10:22:10 +11:00
Dalai Felinto
b941d808c1 Remove legacy code used for sequencer preview image
This (now removed code) calls gl_Vertex deprecated draws. It was doing
background drawing (color gradient, flat background) which is not used
by any engine.
2018-03-01 18:22:31 -03:00
ec76f38b09 Discard non-free axis scaling in Maintain Volume to improve 2.79 compat.
It seems the reason the old version of the constraint overcompensates
as reported in T48079 is to allow the constraint to work with uniform
scaling on all axes. However the way it did that actually _requires_
uniform scaling for the constraint to work correctly, and breaks if
only the free scaling axis is used to avoid redundant channels.

This version attempts to allow both by discarding scaling in the non-
free directions instead of applying the correction on top of it.
2018-03-01 20:46:59 +03:00
3a3dfd4e65 Python tests: Split re-usable test related functionality to a module
The idea is to avoid re-implementing this for an upcoming FFmpeg tests.
2018-03-01 17:44:35 +01:00
1178518a68 Refactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.
This merges changes in internals, runtime-only of existing custom
normals code, which make sense as of themselves, and will make diff of
soc branch easier/lighter to review.

In the details, it mostly changes two things:

* Now, smooth fans (aka MLoopNorSpaceArray) can store either loop
indices, or pointers to BMLoop themselves. This makes sense since in
BMesh, it's relatively easy to get index from a BMElement, but nearly
impracticable to go the other way around.

* First change enforces another, now we cannot rely anymore on `loops`
being NULL in MLoopNorSpace to detect single-loop fans, so we instead
store that info in a new flag.

Again, these are expected to be totally non-functional changes.
2018-03-01 16:54:21 +01:00
Dalai Felinto
8f7e3600d1 More clean of macros with an _END and no _BEGIN
Follow up on 7aed2de798.
2018-03-01 12:23:25 -03:00
f242f3e75b Fix assert on exit edit-mode 2018-03-01 22:46:25 +11:00
865fdd61df 3D View: minor selection tweaks
- don't initialize the GL context when cache is used.
- don't run second pass when the first one has no hits.
2018-03-01 22:05:09 +11:00
1852e702ab Merge branch 'master' into blender2.8 2018-03-01 11:56:01 +01:00
7377d411b4 Cycles volume: fast empty space optimization by generating a tight mesh
around the volume.

We generate a tight mesh around the active voxels of the volume in order
to effectively skip empty space, and start volume ray marching as close
to interesting volume data as possible. See code comments for details on
how the mesh generation algorithm works.

This gives up to 2x speedups in some scenes.

Reviewed by: brecht, dingto

Reviewers: #cycles

Subscribers: lvxejay, jtheninja, brecht

Differential Revision: https://developer.blender.org/D3038
2018-03-01 11:54:01 +01:00
bcafdc82d8 WorkSpace: fix mode exiting w/ multi-window
Activating an object exited modes for all other objects in the layer.
Now check these objects aren't active in other windows first.
2018-03-01 21:33:06 +11:00
7aed2de798 Cleanup: macro's w/ an _END need a matching _BEGIN
Convention from 2.7x, since some looping macros don't need an '_END',
it avoids confusion to keep this.
2018-03-01 19:01:53 +11:00
1fc5eb305a Missing assignment in object mode sync
Own error in recent change (1aeb9294f4)
2018-03-01 18:37:49 +11:00
eeae50fc1c DRW: add ability to lock states from changing
Selection code relies on being able to set the depth functions
however passes have their own depth settings.

Add DRW_state_lock to ignore passes settings for particular flags.

This fixes occlusion queries cycling through objects under the cursor.
2018-03-01 17:14:35 +11:00
b5cc55c822 Merge branch 'master' into blender2.8 2018-03-01 16:48:13 +11:00
172614fb7d GPU_select: remove unused finalize function
Changed 2.8x code so this is no longer needed.
2018-03-01 16:43:45 +11:00
a459ef2827 Fix T54190: Occlusion query select failed
By default select wasn't picking the nearest object,
this could have been fixed by not clearing the depth buffer,
but calling GPU_select_(begin/end) without the binded frame-buffer
caused issues for depth-picking. So move GPU_select begin/end to a
callback.

This also has the advantage that only needs to populate the engines once
to draw two passes.

Note that cycling through objects fails with occlusion queries still,
will fix shortly.
2018-03-01 16:37:39 +11:00
68015f9d39 DRW: Initial implementation of Frustum culling.
This is very efficient and add a pretty low overhead (0.1ms of drawing time for 10K objects passing through all tests, on my i3-4100M).
The like the rest of the DRWCallState, test is "cached" until the view matrices changes.
2018-03-01 03:53:25 +01:00
dee2efb968 Clay: Make use of optimized DRW_shgroup_call_object_add. 2018-03-01 03:53:25 +01:00
5d0665d435 DRW: DRWCallState: Fix matflag being overwritten by other engines. 2018-03-01 03:53:25 +01:00
725112cce7 DRW: Codestyle: Remove DRWCallHeader and DRWCallGenerate 2018-03-01 03:53:25 +01:00
64e35f6fd2 DRW: Reuse DRWCallState for the same object.
This enables caching the matrices and reducing redraw time of the same object which is particulary important for eevee.
2018-03-01 03:53:25 +01:00
1ba96857d1 DRW: Merge calls_generate pool with calls pool & add DRWCallState pool. 2018-03-01 03:53:25 +01:00
d1da7dba47 DRW: Fix warnings in Release Build. 2018-03-01 03:53:25 +01:00
61c8ed40f5 WorkSpace: show/hode opt-out support for addons
In some cases it doesn't make sense for add-ons to be listed for hiding.
Especially for import/export which use minimal UI space.

This adds `bl_info["use_owner"]` to add-ons,
currently defaulting to True for all non Import-Export add-ons.
2018-03-01 11:22:46 +11:00
7f86afec9d Cycles: don't count volume boundaries as transparent bounces.
This is more important now that we will have tigther volume bounds that
we hit multiple times. It also avoids some noise due to RR previously
affecting these surfaces, which shouldn't have been the case and should
eventually be fixed for transparent BSDFs as well.

For non-volume scenes I found no performance impact on NVIDIA or AMD.
For volume scenes the noise decrease and fixed artifacts are worth the
little extra render time, when there is any.
2018-03-01 01:21:29 +01:00
33b6f944c6 Merge branch 'master' into blender2.8 2018-02-28 21:34:09 +01:00
03d1070378 Cycles: change principled BSDF default distribution and SSS.
* Use a subsurface color equal to the base color, and give the subsurface
  radius skin like values by default. This is how the parameter should
  typically be used.
* Use GGX by default, multiscatter GGX is still quite noisy and has some
  fireflies so let's keep it optional for now.
2018-02-28 21:31:28 +01:00
8cc7f48581 Cycles: principled absorption color now has more effect at lower values. 2018-02-28 20:11:53 +01:00
Dalai Felinto
382218beb2 Point cache: Pass EvaluationContext for all the related functions
Now the only missing bit seems to be in Cycles to pass depsgraph to
builtin_image_float_pixels().

Ideally we could get evaluation context instead of using depsgraph + settings.
But for the other rna EvaluationContext functions this is how we are doing.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3087
2018-02-28 13:55:56 -03:00
4a892adac5 merge from master (needed to fix collada headerfiles which have been modified in master and in blender2.8 slightly different) 2018-02-28 17:29:56 +01:00
4762c099d7 Fix T52685, part II: Add option to strip numbers from flipped bone names again.
While doing so with Bone_R.001, Bone_R.003, Bone_R.003 etc. is doomed to
issues, doing that on duplicates of actually correctly named bones can
be handy, and safe.

So adding back as an option (was removed in rB702bc5ba26d5).
2018-02-28 17:13:31 +01:00
e73fe77ac0 collada: EvaluationContext is now feeded into the class instances of AnimationExporter and DocumentExporter on creation. Also skipped the const qualifier for now because BKE_scene_graph_update_for_newframe() needs it to be not const 2018-02-28 17:10:57 +01:00
cee66b8cc0 Fix T52685: Flip names for bones its not working.
Flip names operator changed in rB702bc5ba26d5, to some sensible
behavior. But this breaks common workflow of 'duplicate part of the
bones, scale-mirror new ones, and flip their names'.

So now, instead of doing this in two steps, trying to guesstimate which
bones should get which name, just add option to flip names to duplicate
operator itself. Simpler, safer, and much, much more consitent behavior
and predictable results.
2018-02-28 16:59:32 +01:00
56ea42efa1 Radial control: Skip operator properties from being saved
This solves issue with tweaking brush size when interleaving particle edit
and texture paint modes. The issue was caused by texture paing setting more
operator properties then it's done for particle edit mode, which made window
manager to use saved proeprties for the "missing" ones.

Don't see any reason why we would want to save any of those properties.

This is a regression since rB83b60dac57a1.
2018-02-28 16:14:35 +01:00
a363324f7f Collada: Make EvaluationContext const as its only used for reading here 2018-02-28 16:05:29 +01:00
91c3cfbb6f collada: call from operator to Collada exporter/importer now uses structures instead of passing many parameters 2018-02-28 16:05:29 +01:00
01f732d97b Collada: Moved structure definitions for export settings to the exportSettings.h Also make typedefs for import/export structures. 2018-02-28 16:05:28 +01:00
d937d06c02 WorkSpace: UI filtering for add-ons
Allows for each workspace to have it's own add-ons on display.

Filtering for: Panels, Menus, Keymaps & Manipulators.
Automatically applies to add-ons at the moment.

Access from workspace, toggled off by default
once enabled, add-ons can be white-listed.

See D3076
2018-03-01 01:31:07 +11:00
80d1d9629e Depsgraph: Update tool settings when updating CoW scene 2018-02-28 14:57:49 +01:00
4e8bd537c3 Merge branch 'master' into blender2.8 2018-02-28 14:54:51 +01:00
8b8e16dc2c De-duplicate tool settings copy and make tool settings freeing reusable 2018-02-28 14:52:17 +01:00
bd25e73c54 Null pointer check exiting sculpt mode
Needed for 2.8x, harmless here.
2018-03-01 00:39:42 +11:00
e7aca5bd3c Null pointer check exiting sculpt mode
Needed for 2.8x, harmless here.
2018-02-28 23:23:48 +11:00
1aeb9294f4 WorkSpace: use existing objects mode on select
When selecting an object which is already visible in another window
use the mode from that workspace without performing any mode switching.
2018-02-28 23:09:33 +11:00
9e9cb9fce9 Workspace: sync object-modes to other workspaces
When changing the mode of an object, apply this to all other
workspaces that share the same active object.

Also use copy the object-mode when duplicating workspaces.
2018-02-28 20:04:21 +11:00
c0d6627dc5 Merge branch 'master' into blender2.8 2018-02-28 03:11:17 +01:00
c9a2927930 Code cleanup: fix a few harmless warnings. 2018-02-28 03:10:38 +01:00
2329cc09e6 Code cleanup: make viewport free simpler and consistent with GPU module. 2018-02-28 03:04:15 +01:00
8a7eb6c4c1 Update CUEW to latest version
Some Linux distribution have only libcuda.so.1, not libcuda.so.
2018-02-28 03:03:12 +01:00
7990105407 Code cleanup: fix a few compiler warnings. 2018-02-28 03:03:07 +01:00
be5e437bb5 DRW: Fix broken particle drawing.
Was caused by GPU_SELECT_LOAD_IF_PICKSEL_LIST not iterating at all if shgroup->instance_count == 0.
2018-02-28 02:24:21 +01:00
376e74f2aa Object Mode: Fix incorrect lightprobe wire color when in edit mode. 2018-02-28 02:10:38 +01:00
6bd53cb541 Cleanup: comment for depth picking code, const args
Note that setting `glDepthFunc` isn't important,
since 2.8 branch changes this value it might seem like an error
however it's harmless in this case - so better make note of this.
2018-02-28 11:47:54 +11:00
4d382e2564 DRW: Disable depth test when drawing statistics 2018-02-28 01:39:12 +01:00
6addaf7393 Cleanup: use 'uint' for GPU_select 2018-02-28 11:37:39 +11:00
74a22c8a8a DRW: Fix negative scale object drawing. 2018-02-28 01:29:26 +01:00
0df21e2504 DRW: Refactor & Split draw_manager.c into multiple files.
Refactor include:
- Removal of DRWInterface. (was useless)
- Split DRWCallHeader into a new struct DRWCallState that will be reused in the future.
- Use BLI_link_utils for APPEND/PREPEND.
- Creation of the new DRWManager struct type. This will enable us to create more than one manager in the future.
- Removal of some dead code.
2018-02-28 01:29:26 +01:00
d5a55b6918 BLI_link_utils: Add BLI_LINKS_APPEND(list, link) 2018-02-28 01:29:26 +01:00
11100faa5c Merge branch 'master' into blender2.8 2018-02-28 00:08:16 +01:00
bc71aa5a4c Cleanup: macros using _END, should have a _BEGIN
Also use var names not likely to be shadowed.
2018-02-28 10:05:38 +11:00
2eb94be750 Code cleanup: refactor Cycles image metadata retrieval to use a struct. 2018-02-27 23:42:30 +01:00
Dalai Felinto
000002e42d Cycles point density texture
This still does not make point density to work in Cycles, but at least it pass
the depsgraph down the line.

Note this was working fine before the depsgraph/render refactor to pass
evaluated depsgraph to the engines.
2018-02-27 18:25:54 -03:00
828f545213 Fix Cycles to mostly work with render layer / depsgraph changes.
Point density texture and motion blur are still broken, and many more changes
are needed in general to used evaluated datablocks.
2018-02-27 18:25:54 -03:00
Dalai Felinto
06420c5fe8 Refactor depsgraph/render logic to serve evaluated depsgraph to engines
User notes
----------
Compositing, rendering of multi-layers in Eevee should be fully working now.

Development notes
-----------------
Up until now we were still using the same depsgraph for rendering and viewport
evaluation. And we had to go out of our ways to be sure the depsgraphs were
updated.

Now we iterate over the (to be rendered) view layers and create a depsgraph to
each one, fully evaluated and call the render engines (Cycles, Eevee, ...) with
this viewlayer/depsgraph/evaluation context.

At this time we are not handling data persistency, Depsgraph is created from
scratch prior to rendering each frame.  So I got rid of most of the partial
update calls we had during the render pipeline.

Cycles: Brecht Van Lommel did a patch to tackle some of the required Cycles
changes but this commit mark these changes as TODOs. Basically Cycles needs to
render one layer at a time.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3073
2018-02-27 18:25:54 -03:00
Dalai Felinto
bd119ab017 Depsgraph: Expose query to get view layer to RNA 2018-02-27 18:25:54 -03:00
0f6c08c8cf Merge branch 'master' into blender2.8 2018-02-27 21:06:29 +01:00
450be3b226 Collada: Added tests for Animation export 2018-02-27 20:41:34 +01:00
1a65168c42 merge Collada changtes from master 2018-02-27 17:53:53 +01:00
Dalai Felinto
925f2280e6 Merge commit '6aadd61bd892d3908ed8151' into blender2.8 2018-02-27 13:48:26 -03:00
26fc197d49 Collada: commented out code was previously left over with an unresolved conflict in it. Deleting as its no longer needed 2018-02-27 17:14:35 +01:00
05b5958a7a Collada: Remove obsolete code 2018-02-27 17:08:40 +01:00
d1f0bdd337 fix: Collada Matrixdata Importer tried to fix rotations where nothing was to fix. The matrixdata import is now only doing a matrix decompose and then pplies the decomposed values to 3 trans-, 3 scale- and 4 rot-curves) 2018-02-27 17:02:52 +01:00
148e2ace61 Collada: removed unnecessary dup[licate matrix conversion in matrix data exporter 2018-02-27 17:02:52 +01:00
0ea110f4ea Collada exporter: Replaced numbers 0/1 by boolean values fasle/true for better reading 2018-02-27 17:02:52 +01:00
91f3cfec10 Collada Shape key export can create huge datafiles and may need some optimization. Disable export by default, user can still enable on demand 2018-02-27 17:02:52 +01:00
20c5131384 Collada enable Export of animation data by default 2018-02-27 17:02:52 +01:00
158a1de4fb DRW: Fix multithreading conflict with material previews. 2018-02-27 15:50:34 +01:00
ec0ecbe795 DRW: Refactor / Cleanup Builtin uniforms.
-Make the view and object dependant matrices calculation isolated and separated, avoiding non-needed calculation.
-Adding a per drawcall matrix cache so that we can precompute these in advance in the future.
-Replaced integer uniform location of only view dependant builtins by DRWUniforms that are only updated once per shgroup.
2018-02-27 14:50:16 +01:00
fe80d8ec3c DRW: Do not recreate the common uniform buffer every frame. 2018-02-27 14:50:16 +01:00
be284c82d4 GWN: Query builtin uniform at shader creation.
This avoids having non null entries in shaderface->builtin_uniforms and a redundant check.
2018-02-27 14:50:16 +01:00
3cc4070a30 Fix T54179: Assert changing layers in 2nd window 2018-02-28 00:08:49 +11:00
Dalai Felinto
12c8fef8c7 Eevee preview materials
Now that Eevee has support for offline rendering (F12) we can use it for
the Material previews.

Note: This makes the duplicated UI issue one panel worse. That happens when
Cycles if your scene engine, and Eevee is your workspace engine.
2018-02-27 09:31:16 -03:00
6aadd61bd8 Cleanup: remove unused duplicate code 2018-02-27 22:02:18 +11:00
3d7235fc87 MSVC 2013 Compile Fix/Workaround for "static thread_local" vars
Apparently MSVC 2013 has trouble with stuff that's been declared
"static thread_local" (and/or maybe even the "thread_local" keyword).

https://stackoverflow.com/questions/29399494/what-is-the-current-state-of-support-for-thread-local-across-platforms
2018-02-27 11:23:22 +01:00
5a1a63a858 Merge branch 'master' into blender2.8 2018-02-27 11:16:43 +01:00
26f4ce4a76 Collada: Remove unused vector of flaot[4][4] values
Was in fact causing issues on macOS, something to do with
a destructor.
2018-02-27 11:14:55 +01:00
2026179bb2 Collada: Use floating point version of abs()
Avoids implicit cast of float to int.
2018-02-27 11:14:17 +01:00
aa592cc00c Merge branch 'master' into blender2.8 2018-02-27 20:45:33 +11:00
a7ef312611 GPU_select: correction to select-pick-finalize
Would run twice, harmless at the moment but could cause issues later.
2018-02-27 20:44:12 +11:00
50d03de600 Fix error in depth picking caused by GL contexts
Depth picking needs to read the depth buffer after drawing
since GPU_select_end runs in a different OpenGL context
reading the depth buffer wasn't working.
This caused the last object to be unelectable.
2018-02-27 20:33:42 +11:00
efef0ee672 Merge branch 'master' into blender2.8 2018-02-27 20:24:02 +11:00
4de50d7572 GPU_select: utility function to finalize selection
Needed for depth picking in 2.8
2018-02-27 20:16:53 +11:00
24f759ba5a Revert "F12 offline Freestyle rendering support in Eevee"
This reverts commit 8a7c0abc2d.
2018-02-27 13:02:58 +09:00
50b95211bf Fix T54106: Save blend ignores 'check_existing' 2018-02-27 13:33:59 +11:00
8a7c0abc2d F12 offline Freestyle rendering support in Eevee
This patch adds F12 offline Freestyle rendering support to Eevee.

Most functionalities are identical with those found in Cycles.

The only major difference is that the per-view layer "use Freestyle" toggle
option is currently placed in the "Passes" panel of the "View Layers"
properties window instead of a "Layer" panel as in Cycles.  Since Freestyle
is a post-processed overlay and not a pass, the present option location is
a compromise.  To describe this fact, the per-layer "use Freestyle" option
is in a subsection labeled as "Layer".

Reviewers: fclem, brecht, campbellbarton

Reviewed By: fclem, brecht

Subscribers: dfelinto

Differential Revision: https://developer.blender.org/D3084
2018-02-27 08:53:31 +09:00
e24906759f Merge branch 'master' into blender2.8 2018-02-26 23:38:21 +01:00
b5f0e8e1a1 Collada: removed unused variables. fixed incompatible format in console output (AnimationExporter.cpp) 2018-02-26 23:37:27 +01:00
edcd30f6ab Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-02-26 22:55:15 +01:00
f228a08d02 merge from master 2018-02-26 22:49:30 +01:00
Dalai Felinto
96285e1ca4 VSE preview: Get depsgraph from EvaluationContext
Note: Sequencer preview is working only for Clay, for Eevee is still not working.
2018-02-26 18:04:18 -03:00
e94276d403 GWN: Fix glitches when closing a window. 2018-02-26 20:09:54 +01:00
c17042bc6d Eevee: Fix prev_persmat being used by multiple viewport. 2018-02-26 20:08:48 +01:00
f4cc9ba4c3 V3D: Vertex selection: Fix opengl error. 2018-02-26 20:07:39 +01:00
fa7e4cc685 WM/GPU: Clear VAO cache of batch preset when switching context.
This is needed for multiple windows to draw the batch presets.
This will not be needed once we use only one context for UI.
2018-02-26 19:49:06 +01:00
13261304a3 DRW: Add new Draw Manager OpenGL Context.
This separate context allows two things:
- It allows viewports in multi-windows configuration.
- F12 render can use this context in a separate thread and do a non-blocking render.

The downside is that the context cannot be used while rendering so a request to refresh a viewport will lock the UI. This is something that will be adressed in the future.

Under the hood what does that mean:
- Not adding more mess with VAOs management in gawain.
- Doing depth only draw for operators / selection needs to be done in an offscreen buffer.
- The 3D cursor "autodis" operator is still reading the backbuffer so we need to copy the result to it.
- All FBOs needed by the drawmanager must to be created/destroyed with its context active.
- We cannot use batches created for UI in the DRW context and vice-versa. There is a clear separation of resources that enables the use of safe multi-threading.
2018-02-26 19:41:17 +01:00
0940e89e60 GHOST: Add new interface to manage offscreen contexts.
Offscreen contexts are not attached to a window and can only be used for rendering to frambuffer objects.

CGL implementation : Brecht Van Lommel (brecht)
GLX implementation : Clément Foucault (fclem)
WGL implementation : Germano Cavalcante (mano-wii)

Other implementation are just place holder for now.
2018-02-26 19:10:15 +01:00
7dd0e36dc4 simplified collada integration in Blender. made functions mostly similar with blender2.8 2018-02-26 17:18:31 +01:00
a024da55af Adding support for Matrix Transformation export
The exporter does export matrix data (4*4 Transformation matrix) only for Skeletal animation. For object animation only exporting to trans/rot/loc is implemented.

This task implements Matrix export also for simple Object animation.

Differential Revision: https://developer.blender.org/D3082
2018-02-26 17:16:56 +01:00
5f9657316e collada: fix typo in if statement 2018-02-26 12:55:54 +01:00
57b378b046 as discussed on IRC this definition seems to be not necessary 2018-02-26 12:45:37 +01:00
8e826caf5e optimized the output of the collada test script for better reading 2018-02-26 12:09:48 +01:00
c52df4fc7c Cleanup: typos
D3081 by @rjg, with others.
2018-02-26 19:58:31 +11:00
f1bd96a9ab Revert "changing collada parameters"
This reverts commit d91f2ac37a.

This change makes scene.collada_export() meaningless
(ignoring the scene the method is being run on).
2018-02-26 19:35:45 +11:00
3fd5a4047c Presets: remove double underscore in preset names 2018-02-26 19:21:02 +11:00
d416e56e70 Fix T54029: Wrong preset name display in win32 2018-02-26 19:05:01 +11:00
b1414b7322 Cleanup: use function for clearing bmesh tags 2018-02-26 14:05:58 +11:00
Hugo Sales
5d54d6b479 Fix T50132: UV sticky mode is not respected with border/circle/lasso select.
Differential Revision: https://developer.blender.org/D3074
2018-02-25 22:28:54 +01:00
ec27281812 Fix incorrect text clipping on node link button in material properties. 2018-02-25 19:57:40 +01:00
d6df23d9d9 Object Mode: Display meshes without faces and edges in object mode. 2018-02-25 17:55:49 +01:00
b795f5eb7a Eevee: Cleanup cascaded shadowmap code. 2018-02-25 17:55:49 +01:00
241c90c92d DRW/GWN: Bypass glUseProgram.
Turns out to be the call that was destroying performance.

I get 18ms->6ms improvement of drawing time with 10 000 unique objects.

And we can still improve upon this!
2018-02-25 17:59:46 +01:00
24d51a05a9 Manipulator: rename is_visible -> poll
Rename to WM_manipulator_group_type_poll,
use convention of other poll functions.
2018-02-26 00:04:59 +11:00
15dfd866db Fix Player tm, a lifes job 2018-02-25 10:35:08 +01:00
2b158861a3 merged collada rework from master into blender 2.8 2018-02-25 00:06:41 +01:00
d91f2ac37a changing collada parameters
Differential Revision: https://developer.blender.org/D3080
2018-02-24 22:51:04 +01:00
0a1434ed86 Fix a whitespace slipped in 2018-02-24 18:07:05 +01:00
c23b77fe46 Fix Plyer tm 2018-02-24 17:30:37 +01:00
dd7b9a362d T45687: Rework the Export/Import of Animations
This started with a fix for an animated Object Hierarchy. Then i decided to cleanup and optimize a bit. But at the end this has become a more or less full rewrite of the Animation Exporter. All of this happened in a separate local branch and i have retained all my local commits to better see what i have done.

Brief description:

* I fixed a few issues with exporting keyframed animations of object hierarchies where the objects have parent inverse matrices which differ from the Identity matrix.
* I added the option to export sampled animations with a user defined sampling rate (new user interface option)
* I briefly tested Object Animations and Rig Animations.

What is still needed:

* Cleanup the code
* Optimize the user interface
* Do the Documentation

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D3070
2018-02-24 15:55:27 +01:00
94eb189752 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_blender_version.h
2018-02-24 14:02:50 +01:00
4403ca80bd Smoke: expose empty space clipping property to the UI.
This is used to determine which voxels are to be considered empty space.

Previously it was hardcoded for converting dense grids to OpenVDB grids
to reduce disk space usage.

This value is also useful for rendering engines to know, i.e. to
optimize ray marching.
2018-02-24 13:37:58 +01:00
6d8a4c10b6 OpenVDB : use underscores instead of spaces in grid names.
Some other software cannot handle grid names with spaces in them. We still check for names with spaces so as to not break old
files.

This fixes T53802.
2018-02-24 13:37:08 +01:00
Dalai Felinto
c4abb33102 Fixup for border render changes
Although I fixed border rendering, I broke non-border rendering.

Issue introduced on:  0305fc30b3
2018-02-23 17:26:57 -03:00
38ccd1fe33 Eevee: add Principled Volume shader. 2018-02-23 19:10:24 +01:00
77062e8bbb Eevee: add blackbody shader node support.
This replaces the blackbody to RGB code with the simpler and faster one from
Cycles. It's a little different but the other placing using this is the legacy
volume drawing, so no need to stay compatible with that.
2018-02-23 19:10:24 +01:00
57609993d0 GPU: fixes for string socket types in shader nodes.
These are not passed to GLSL functions, but should be used to load e.g.
a texture or attribute.
2018-02-23 19:10:24 +01:00
af061b4dac Eeevee: add temperature grid support, make color grid unpremultiplied.
This matches similar changes done for Cycles.
2018-02-23 19:10:02 +01:00
a44b08a6c4 Merge branch 'master' into blender2.8 2018-02-23 19:02:49 +01:00
0aec2dcd3a Cycles: add Principled Volume shader.
Similar to the Principled BSDF, this should make it easier to set up volume
materials. Smoke and fire can be rendererd with just a single principled
volume node, the appropriate attributes will be used when available. The node
also works for simpler homogeneous volumes like water or mist.

Differential Revision: https://developer.blender.org/D3033
2018-02-23 18:57:58 +01:00
acd619d7c9 Cycles: change smoke color grid to not include density multiplied in.
This breaks backwards compatibility some, making smoke colors brighters
than before. But it is also more correct this way.
2018-02-23 18:57:58 +01:00
a963c7d48d Code refactor: improve attribute handling for optional volume attributes.
A volume shader should be able to request attributes, and still be rendered
as homogeneous if no volume attributes are available for the object.
2018-02-23 18:57:58 +01:00
4448ed6c5e Smoke: change default flame temperatures to match OpenGL preview. 2018-02-23 18:57:58 +01:00
04896d223d Smoke: add temperature grid, with values 0..1 corresponding to 0..1000K. 2018-02-23 18:57:58 +01:00
15fb8ad6ae Nodes: left align text for color and string sockets, same as other types. 2018-02-23 18:57:58 +01:00
Dalai Felinto
0305fc30b3 Fix border rendering for eevee + stop passing render result around
Technically the original issue is that xof/yof in render result is calculated
for drawing border render. So a simpler patch could be:

```
- rr->xof = re->disprect.xmin;
+ rr->xof = re->disprect.xmin + BLI_rcti_cent_x(&re->disprect) - (re->winx / 2);
```

However everywhere in the code we are getting border directly from re->disprect
which we may as well do here too.

Besides I'm taking this as a chance to get rid of RenderResult in the internal
loop of eevee, to help prepare the code to the upcoming rendering pipeline
changes.
2018-02-23 13:26:30 -03:00
dceb8d37c2 Fix T54137: OpenEXR files with long red/green/blue channel names not loading correctly. 2018-02-23 14:34:27 +01:00
44d45e1af4 Buildbot: Enable Volta deviced CUDA binaries 2018-02-23 14:24:59 +01:00
e24dee435e Buildbot: Remove master configuration files
Those are stored in blender-buildbot repository now, so having them in
Blender only causes extra work to keep files in sync.
2018-02-23 12:37:05 +01:00
07f05e294a Buildbot: Disable cuda hack for macOS 2018-02-23 10:55:26 +01:00
5127910749 Merge branch 'master' into blender2.8 2018-02-23 17:12:55 +11:00
6618852b7f WM: Add WM_menutype_poll function
Wraps menutype poll, no functional changes.
2018-02-23 17:02:03 +11:00
171c756f20 Merge branch 'master' into blender2.8 2018-02-23 13:10:39 +11:00
f36c803e55 WM: add WM_keymap_poll function
Wrapps keymap poll, no functional changes.
2018-02-23 12:59:55 +11:00
dd77e45151 Cleanup: header guards & style 2018-02-23 12:59:55 +11:00
Dalai Felinto
d7ba1ada82 Fix T54136: Crash when deleting an object that is in an instanced group
We were not cleaning up groups after deleting objects, leaving groups with
Bases that had no object.

It includes a unittest.

Reviewers: mont29
2018-02-22 17:16:39 -03:00
e7c4a9d1ef GWN: Fix immediate mode when closing a window. 2018-02-22 19:49:59 +01:00
8115162e98 DRW: Fix T54135 : Crash caused by wrongly iterating over ListBase. 2018-02-22 19:47:52 +01:00
d4795cc5d1 DRW: Fix use of uninitialized call->obmat. 2018-02-22 19:47:52 +01:00
03d1f08282 WM: Make sure that immediate mode is active before deactivate it 2018-02-22 13:22:28 -03:00
2694c1fc60 Merge branch 'master' into blender2.8 2018-02-22 16:31:59 +01:00
71e00252f0 Depsgraph: Fix mistake in previous refactor commit 2018-02-22 16:30:47 +01:00
2f5f392453 Merge branch 'master' into blender2.8 2018-02-22 15:45:41 +01:00
5f857378af Cleanup: Fix const pointers mess in previous commit. 2018-02-22 15:41:41 +01:00
4ee3d7e3ac Merge branch 'master' into blender2.8
Conflicts:
	source/blender/bmesh/intern/bmesh_mesh.c
2018-02-22 15:22:44 +01:00
0eee776e45 Fix (unreported) meshes changing shading when creating empty clnors data.
When you were using autosmooth to generate some custom normals, and
created empty custom loop normal data, you would go back to an 'all
smooth' shading, cancelling some sharp edges generated by the mesh's
smooth threshold.

Now we will first tag such edges as sharp, such that shading remains the
same. This is not crucial in current master, but it is for clnors
editing gsoc branch!
2018-02-22 15:20:39 +01:00
4b068c4d6f Cleanup: clnor code: more 'do not use same varname for two different things'. 2018-02-22 15:20:39 +01:00
e83b9cde1a Fix T54129: Moving keyframes on top of other keyframes, removes both keyframes
Regression caused by earlier commits to improve the automerge behaviour.
In this case, the problems only occurred when moving a selected keyframe
forwards in time to overlap an unselected keyframe.
2018-02-23 03:13:56 +13:00
00ba28e9f8 Fix: Don't ignore duplicate channels when doing border/circle/lasso select
While it is necessary to ignore duplicates when doing Deselect/Column Select
(where double-updates may result in nothing being selected), for borderselect,
not including the duplicates meant that sometimes, nothing would happen
if you were trying to borderselect keyframes originating from hidden channels.

This was first noticed in the greasepencil-object branch, but affects all
animation channel types.
2018-02-23 02:41:05 +13:00
5aff002f7b GWN: Context: Fix allocation/codestyle and crash on startup. 2018-02-22 14:31:40 +01:00
672e823578 Merge branch 'master' into blender2.8 2018-02-22 14:27:57 +01:00
86ad5cacfa Depsgraph: Remove unused argument 2018-02-22 14:27:29 +01:00
4a0d8f92f6 Remove old depsgraph from modifiers relations update context 2018-02-22 14:09:45 +01:00
539987766b Merge branch 'master' into blender2.8 2018-02-22 14:08:27 +01:00
3d1c0afe0e Depsgraph: Remove unused bmain from modifiers relations update context 2018-02-22 14:07:08 +01:00
62b3522da2 Fix compilation error with legacy depsgraph disabled 2018-02-22 13:05:38 +01:00
6e860bef28 Merge branch 'master' into blender2.8 2018-02-22 13:05:00 +01:00
df04520602 Depsgraph: Wrap all arguments foe modifiers relations update into a struct
Makes it easier to add or remove fields needed to update relations.
2018-02-22 12:54:06 +01:00
cc05b661f7 GWN: Fix use after free crash.
This is not an ideal solution but blender freeing system is already well tangled.
So tracking and clearing vao caches when destroying contexts does prevent bad behaviour.
2018-02-22 12:39:57 +01:00
a17de773fd Merge branch 'master' into blender2.8 2018-02-22 11:20:28 +01:00
93072e44d1 Depsgraph: Replace LIB_TAG_DOIT with hash lookup
This allows us to:

- Not mock around with tags stored in a global space,
    and not to iterate over all datablocks in the database
    to clear the tags.

- Properly deal with datablocks which might not be in main database.

    While it sounds crazy, it might be handy when dealing with preview,
    or some partial scene updates, such as motion paths.

- Avoids majority of places where depsgraph construction needed bmain.

    This is something what could help in blender2.8 branch.

From tests with production file here did not see any measurable slowdown.

Hopefully, there is no functional changes :)
2018-02-22 11:03:39 +01:00
76953a6ebd Depsgraph: Add utility class to keep track of handled ID datablocks
Currently unused, actual logic change will come in the next commit.
2018-02-22 10:58:33 +01:00
6bac7c35e8 Merge branch 'master' into blender2.8 2018-02-22 10:47:40 +01:00
51483bd49f Depsgraph: Use proper debug print flags check
Was printing some tagging/evaluation prints when only building
messages were requested.
2018-02-22 10:40:18 +01:00
9729726aa8 Depsgraph: Report graph construction time when run with --debug-depsgraph-build 2018-02-22 10:35:04 +01:00
632d66eb89 Depsgraph: Cleanup, reduce indentation level 2018-02-22 10:31:47 +01:00
4ab002bca3 WorkSpace: object-mode switching support
When changing workspaces, existing object-mode data is freed
the new workspaces mode is entered (if possible).
2018-02-22 18:18:44 +11:00
5b857102fa Add NULL checks to ED_object_base_activate
Passing a NULL active base is valid,
own changes to mode-switching didn't check for this case.
2018-02-22 17:09:25 +11:00
026ac65831 WorkSpace: Restore saved object-modes again
Was temporarily removed when moving object mode to workspace.

Note: there is an issue where eval_ctx->view_layer is NULL on load,
for now pass a view layer argument, we might wan't to set the value
instead.
2018-02-22 15:52:30 +11:00
648df0fcdb Revert "BKE: Changing ID freeing order."
This reverts commit 87c72a7d27.

Caused T54121 which breaks blend file saving.
For now crash on exit is preferable.
Possible solution is to free screen-manipulator batches in a separate
loop.
2018-02-22 15:10:43 +11:00
257cf86a05 Merge branch 'master' into blender2.8 2018-02-22 00:59:32 +01:00
5d5c6bb5ef Cycles: add Russian roulette termination for volume multiple scattering.
This mainly helps with dense volumes, rendering can be 30% faster with
little noise increase in such scenes.
2018-02-22 00:55:32 +01:00
2d81758aa6 Cycles: better path termination for transparency.
We now continue transparent paths after diffuse/glossy/transmission/volume
bounces are exceeded. This avoids unexpected boundaries in volumes with
transparent boundaries. It is also required for MIS to work correctly with
transparent surfaces, as we also continue through these in shadow rays.

The main visible changes is that volumes will now be lit by the background
even at volume bounces 0, same as surfaces.

Fixes T53914 and T54103.
2018-02-22 00:55:32 +01:00
84e92f9b3c Cycles: make principled BSDF node wider in the node editor by default. 2018-02-22 00:55:32 +01:00
6a48a9dc6e Code cleanup: fix incorrect socket names in hair and particle info nodes. 2018-02-22 00:55:11 +01:00
04964ff1f4 GWN: Fix compilation on windows 2018-02-21 18:58:29 -03:00
87c72a7d27 BKE: Changing ID freeing order.
Screen can contains manipulators that contains batches to be freed before the opengl contexts (in WM) are destroyed.

Also fix other GPU related free.
2018-02-21 22:51:35 +01:00
9a5be1fba9 Fix incorrect OSL raytype bits and add some comments. 2018-02-21 17:56:26 +01:00
606bc5f301 Fix T54105: random walk SSS missing in branched indirect paths.
Unify the path and branched path indirect SSS code. No performance impact
found on CUDA, for AMD split kernel the extra code was already there.
2018-02-21 17:56:26 +01:00
5cc1d5fe17 Fix T54107: bevel shader + normal map gives wrong result. 2018-02-21 17:56:26 +01:00
7be1928ea1 Gawain: VertexFormat: Cleanup
Reorganize struct elements by size, rename a constant.
2018-02-21 15:28:26 +01:00
c5eba46d7f Gawain: Refactor: VAOs caching AND use new VAOs manager.
A major bottleneck of current implementation is the call to create_bindings() for basically every drawcalls.
This is due to the VAO being tagged dirty when assigning a new shader to the Batch, defeating the purpose of the Batch (reuse it for drawing).

Since managing hundreds of batches in DrawManager and DrawCache seems not fun enough to me, I prefered rewritting the batches itself.

--- Batch changes ---
For this to happen I needed to change the Instancing to be part of the Batch rather than being another batch supplied at drawtime.
The Gwn_VertBuffers are copied from the batch to be instanciated and a new Gwn_VertBuffer is supplied for instancing attribs.
This mean a VAO can be generated and cached for this instancing case.

A Batch can be rendered with instancing, without instancing attribs and without the need for a new VAO using the GWN_batch_draw_range_ex with the force_instance parameter set to true.

--- Draw manager changes ---
The downside with this approach is that we must track the validity of the instanced batch (the original one). For this the only way (I could think of) is to set a callback for when the batch is getting free.
This means a bit of refactor in the DrawManager with the separation of batching and instancing Batches.

--- VAO cache ---
Each VAO is generated for a given ShaderInterface. This means we can keep it alive as long as the shader interface lives.
If a ShaderInterface is discarded, it needs to destroy every VAO associated to it. Otherwise, a new ShaderInterface with the same adress could be generated and reuse the same VAO with incorrect bindings.
The VAO cache itself is using a mix between a static array of VAO and a dynamic array if the is not enough space in the static.
Using this hybrid approach is a bit more performant than the dynamic array alone.
The array will not resize down but empty entries will be filled up again. It's unlikely we get a buffer overflow from this. Resizing could be done on next allocation if needed.

--- Results ---
Using Cached VAOs means that we are not querying each vertex attrib for each vbo for each drawcall, every redraw!
In a CPU limited test scene (10000 cubes in Clay engine) I get a reduction of CPU drawing time from ~20ms to 13ms.

The only area that is not caching VAOs is the instancing from particles (see comment DRW_shgroup_instance_batch).
2018-02-21 15:28:26 +01:00
1b3f9ecd0d Gawain: Add new context/vao manager.
This allows allocation of VAOs from different opengl contexts and thread as long as the drawing happens in the same context.

Allocation is thread safe as long as we abide by the "one opengl context per thread" rule.

We can still free from any thread and actual freeing will occur at new vao allocation or next context binding.
2018-02-21 15:28:26 +01:00
7de387f4b5 Cleanup: Don't perform borderselect on channels that aren't visible 2018-02-22 01:46:12 +13:00
cab608066a Fix: Return back to conventional way of averaging points for keyframe de-dup
The other approach was causing too much error in some cases (e.g. favouring
the lower-valued keyframes). This fix should make the resulting curves less
bumpy/jagged.
2018-02-22 01:46:11 +13:00
915d120c36 Fix: Forgot to recalculate handles after deleting keyframes 2018-02-22 01:46:11 +13:00
bba1120116 Fix: Don't average keyframe values if FCurve can only have int/discrete values
This is to prevent problems with integer/enum properties getting invalid
values set.
2018-02-22 01:46:10 +13:00
dd75211d83 Cleanup: Delete debugging code and the old version of the automerge code 2018-02-22 01:46:10 +13:00
f2cdb1c7cc Tweak/Fix for T54106 - Moving multiple selected keyframes on top of an unselected one would not merge the keys
This commit removes an earlier attempt at optimising the lookups
for duplicates of a particular tRetainedKeyframe once we'd already
deleted all the selected copies. The problem was that now, instead
of getting rid of the unselected keys (i.e. the basic function here),
we were only getting rid of the selected duplicates.

With this fix, unselected keyframes will now get removed (as expected)
again. However, we currently don't take their values into account
when merging keyframes, since it is assumed that we don't care so much
about their values when overriding.
2018-02-22 01:46:09 +13:00
63da3b79ed Minor Optimisation: Terminate early if we've passed the insertion point for tRetainedKeyframes 2018-02-22 01:46:08 +13:00
ac717928ad Feature Request T54106: When scaling keyframes, merge (by-averaging) selected keys
that end up on the same frame

Currently, when scaling keyframes in the Dopesheet, if multiple
selected keyframes end up on the same frame post-scaling, they
would not get removed by the "Automerge" setting that normally
removes duplicates on the same frame.

This commit changes the behaviour so that when multiple selected
keyframes end up on the same frame, instead of keeping all these
around on the same frame (e.g. resulting in a column of keyframes
on different values), we will instead merge them into a single
keyframe (by averaging the values). This should result in a
smoother F-Curve with fewer "stair-steps" that need to be carefully
cleaned out afterwards.

Requested by @hjalti
2018-02-22 01:46:07 +13:00
6b31a14ff7 bezt_add_to_cfra_elem() - Use same keyframe equality test as in other places
This shouldn't affect anything currently, as this function doesn't appear
to get used anywhere.
2018-02-22 01:46:07 +13:00
4d966aa19c Fix T54065: NLA-Strip Control Curves would get disabled when name-based-filtering is enabled
This bug took a while to track down. In the test file with this report,
the Nla-Strip Control Curve for strip time would get disabled if you
changed the NLA Editor to a second Graph Editor instance.

It turns out that because this second Graph Editor would have the
"filter fcurves by name" option enabled, this would trigger a lookup
of the referenced property's name (in order to test whether it matched
the filtering criteria). However, since that filtering code was written
before the introduction of these curves, it still assumed that the names
for these Control Curves should be handled the same as for standard FCurves.
Unfortunately, that doesn't work, as the property lookups fail if the standard
method is used - when the lookups fail, the F-Curves get tagged as being
invalid/disabled (and need to be reset using the "Revive Disabled FCurves"
operator).

Note: The changes in this patch look complicated, as I've had to shuffle
a bit of code around so that the name-filtering check can have access to
the additional info it needs. In the process, I've also removed the earlier
(hacky) approach where the control curves were getting added to a temp
buffer to get changed from normal FCurves to special ANIMTYPE_NLACURVES.
2018-02-22 01:46:06 +13:00
f7354119cc Fix more missing ID remapping in animation editor callbacks
Applying the same fixes as introduced in 98d797b67c
this time, for the Graph and NLA editors
2018-02-22 01:46:05 +13:00
2945831630 Depsgraph: Fix fake dependency cycle with chained IK solvers with tip excluded
Not sure why we need a relation from solver to a tip local transform, this
will be handled via parent relation.

Fixes remaining dependency cycles reported in T54083.
2018-02-21 12:04:28 +01:00
74ee98f642 Depsgraph: Fix dependency when constraint influence drives some other constraint
It is not possible to address transform at particular position of constraint
stack, and when constraint is being addressed is usually from driver variable.

This fixes some of dependency cycles reported in T54083.
2018-02-21 11:13:25 +01:00
d4ee0cee51 Merge branch 'master' into blender2.8 2018-02-21 10:51:58 +01:00
fe1a508e55 Depsgraph: Split debug flags
Now it's possible to have debug messages for following things:

- Graph construction
- Graph evaluation
- Graph tagging
2018-02-21 10:44:36 +01:00
2e73efa9b8 Depsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads
Was accessing past the array boundaries.

Should be safe for 2.79a.
2018-02-21 10:42:22 +01:00
bfa51b1b0c Fix subsurf modifier after error in merge commit
Merge commit that had the error: e99094035c
2018-02-21 04:38:29 -05:00
78ceb4b51e Merge branch 'master' into blender2.8 2018-02-21 10:30:50 +01:00
b1946e7f7a Depsgraph: Report overall number of cycles detected
Handy to quickly see if a fix fixed any of the cycles in a real rig,
or whether it's introduced new ones.
2018-02-21 10:11:43 +01:00
6535f668b4 VSE: skip non image/movie w/ proxy dir storage
This would use uninitialized filename variable,
looked into supporting this however generating proxies currently only
works for movies.
2018-02-21 18:33:48 +11:00
Dalai Felinto
813204838a Fix for draw manager cache not re-set between different render layers 2018-02-20 16:43:15 -03:00
Dalai Felinto
c14925bddf Proper implementation of compositor support for Draw Manager
We need to move the render result logic outside the render engine code.

It makes no sense for Eevee/Clay/... to have to re-implement the render resilt
creation logic. Beside the original implementation really got it wrong, by
ignoring the different render layers needed for the final render.

Finally, there is no need to re-create the logic for views. So this was also
fixed.

Note 1: This will break still if the depsgraph of the needed view layers is not
updated / created. We need to address this separately. For now if users want
to test this, just show each view layer in the viewport at least once.

Note 2: We are still getting depsgraph from scene and creating if needed.
`BKE_scene_get_depsgraph(scene, view_layer, true);` according to Sergey we need
to move the render depsgraph for the Render struct instead. I will do it
separately as well.
2018-02-20 11:03:26 -03:00
35f225b44c Cleanup: split normals: use different varnames for angle and its cosine.
Using same name for two different things is not the best idea ever...
2018-02-20 13:03:10 +01:00
87e37224c7 Fix T54069: Vertex groups for hair length is wrong in some cases
This is a regression in rB4f1c0a1 which only allowed cutting haior at the
second segment only, while there is nothing wrong with cutting hair at the
first segmewnt.
2018-02-20 10:47:01 +01:00
529cc364f4 Fix T54096: Subdivision Surface + Boolean Modifiers + Transform = crash
Don't use dm->get*Array for DM you don't own. This call can allocate temporary
CD layer, which is not thread safe at all.

Also removed hard-coded logic around CDDM check. new functions will do same
logic, but are mode DM-type-=independent.
2018-02-19 16:16:56 +01:00
Dalai Felinto
a16c0ebc59 Fix warning after fix for crash on renaming group collections
Warning introduced on: 73079e01fd.
2018-02-19 11:12:46 -03:00
Dalai Felinto
73079e01fd Outliner: Fix crash when renaming Group layer collection 2018-02-19 10:52:03 -03:00
Dalai Felinto
065630e717 Outliner: Update buttons editor when renaming collection
Reported by Pablo Vazquez (venomgfx) outside phabricator.
2018-02-19 10:48:07 -03:00
dc65a6f63b Fix T53032: Image sequence works bad with Displace modifier
We shouldn't mix image pool acuisition with and without user provided,
the fact that internally image.c uses last frame from Image datablock
confuses the logic.
2018-02-19 14:33:48 +01:00
Dalai Felinto
30d0194585 Fix collection object mode panels
They were broken since we moved object mode into workspace.
2018-02-19 09:53:39 -03:00
0e4829eb05 Cleanup: rename SequenceEditor instance to 'ed'
Name 'sequencer' & 'sequence' are too similar.
2018-02-19 22:32:41 +11:00
264691e563 Merge branch 'master' into blender2.8 2018-02-19 17:46:42 +11:00
860939ccc2 Cleanup: remove BMeshToMeshParams.calc_tessface
This wasn't used, tessface is being phased out.
Caller can run explicitly if needed.
2018-02-19 17:41:37 +11:00
05f3e245a8 Fix T54098: Crash existing /w dyntopo sculpt
Optionally don't remap indices for objects.

Checking all objects parent's would reference a freed pointer
while freeing all objects.

In the case of dynamic topology there is no use in keeping track
of hook/vertex-parent indices.

Also disable this when creating meshes for undo storage
since adding an undo step shouldn't be modifying other objects.
2018-02-19 17:34:30 +11:00
34e76c7162 Merge branch 'master' into blender2.8 2018-02-19 15:59:20 +11:00
7f65ab86e5 Cleanup: sync vertex-paint and sculpt from 2.8
Sync API changes from 2.8 to master.
2018-02-19 15:54:06 +11:00
569273c234 Merge branch 'master' into blender2.8 2018-02-18 19:59:27 +01:00
1beb6b43c1 Fix T54089: missing GLSL material draw update when changing object pass index. 2018-02-18 19:28:46 +01:00
2bc952fdb6 Merge branch 'master' into blender2.8 2018-02-18 22:33:05 +11:00
7ff3cd2693 Cleanup: group BLI_ghash_utils.c API in BLU_ghash.h 2018-02-18 22:12:27 +11:00
41ad08f3c3 Cleanup: split GHash helpers from implementation 2018-02-18 21:44:56 +11:00
deacb3d6b8 Cleanup: add 2d suffix to BLI files
Some of these API's can have 3D versions, explicitly name them 2D.
2018-02-18 21:27:33 +11:00
fee4b646c4 Cycles: tweak CUDA messages and avoid build errors with existing sm_2x configs. 2018-02-18 00:53:25 +01:00
1dcd7db73d Code cleanup: remove some more unused code after recent CUDA changes. 2018-02-18 00:53:03 +01:00
9e717c0495 Cycles: Remove Fermi texture code.
This should be the last Fermi removal commit, unless I missed something.
It's been a pleasure Fermi!
2018-02-17 22:56:58 +01:00
e1ef902058 Cycles: Remove fermi related defines from the code.
Did not touch Texture related defines, that comes next.
2018-02-17 22:19:54 +01:00
2eaf90b305 Cycles: Remove Fermi support from CMake and update runtime checks in device_cuda.cpp.
Fermi code in Cycles kernel and texture system are coming next.
2018-02-17 16:15:07 +01:00
75396edb31 Buildbot: Disable Cycles CUDA support on 32bit, and stop building sm_2x. 2018-02-17 15:49:37 +01:00
5d3f679013 Code cleanup: remove WM subwindows.
These no longer made much sense after regions were added, they just
duplicated state that was already in the regions.
2018-02-17 14:23:19 +01:00
cbd0e09898 Fix GL_FRAMEBUFFER_UNSUPPORTED warning in console on macOS. 2018-02-17 14:12:54 +01:00
f2453ecdcd Merge branch 'master' into blender2.8 2018-02-17 01:39:29 +01:00
09eb790f4b DRW: Fix assert with DRW_shgroup_material_instance_create. 2018-02-16 23:06:43 +01:00
85f179eb23 Fix T53399: Dopesheet keyframes and the drawing of points were not visible with some Intel cards 2018-02-16 18:02:06 -02:00
4b1904c8df GHOST: Windows: Print information on the GPU 2018-02-16 16:46:58 -02:00
5bc2c17161 fix:T50079 collada matrix and blender matrix are transposed. This was not regarded by the animation importer, so it was creating very odd results 2018-02-16 16:58:20 +01:00
e1a686e444 fix: limit precision also for animation matrixes if the limit option is set (gives nicer output for inspection) 2018-02-16 16:55:20 +01:00
c45f28ce95 New function to check if running opengl render 2018-02-16 16:52:27 +01:00
7fdf720fb1 Fix rotation issues due to matrix to quaternion ambiguities
Reviewers: mont29

Reviewed By: mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D3066
2018-02-16 15:19:35 +01:00
18bb0bc569 Object Mode: exit sculpt on selection 2018-02-17 00:01:25 +11:00
ce4d52c4f3 Object Mode: exit vert/weight paint on selection
Was keeping data, since objects no longer store modes,
object mode can't be properly detected.
2018-02-17 00:01:25 +11:00
c28dea5e24 Vertex Paint: expose exist paint-mode to API 2018-02-17 00:01:25 +11:00
31f47f44de Cleanup: avoid shadowing w/ name 'base' 2018-02-17 00:01:25 +11:00
233a886ceb Code cleanup: deduplicate code for running Python scripts outside Blender. 2018-02-16 12:51:49 +01:00
3d2d58391a Tests: add OpenGL UI drawing tests.
This reuses the Cycles regression test code to also work for OpenGL UI drawing.
We launch Blender with a bunch of .blend files, take a screenshot and compare
it with a reference screenshot, and generate a HMTL report showing the failed
tests and their differences.

For Cycles we keep small reference renders to compare to in svn, but for OpenGL
developers currently have to generate the references manually. How to use:

* WITH_OPENGL_DRAW_TESTS=ON in CMake
* BLENDER_TEST_UPDATE=1 ctest -R opengl_draw
* .. make code changes ..
* ctest -R opengl_draw
* open build_dir/tests/opengl_draw/report.html

Differential Revision: https://developer.blender.org/D3064
2018-02-16 12:51:49 +01:00
0f23f618f3 Tests: split off render report test code from Cycles tests.
This renames test environment variables from CYCLESTEST_* to BLENDER_TEST_*.

Differential Revision: https://developer.blender.org/D3064
2018-02-16 12:51:49 +01:00
5fde26454c Fix bplayer (c) 2018-02-16 12:40:11 +01:00
c3ace7950d Merge branch 'master' into blender2.8 2018-02-16 11:51:41 +01:00
8dfe9ef4e3 Fix bplayer (c) 2018-02-16 10:42:43 +01:00
451d5cef0f Fix part II of T53977: Severe problem with multiple instances of a library (save and reload).
Once 'losing lib' issue is fixed (in previous commit), we have new issue
that this could lead to several copies of the same linked data-block in
.blend file. Which is not good. At all.

So had to add a GHash-based check in libraries reading code to ensure we
only load a same ID from a same lib once.
2018-02-16 10:34:00 +01:00
8165234b46 Fix part I of T53977: Severe problem with multiple instances of a library (save and reload).
The issue was that when a same lib was found several times in loaded
.blend, we'd only keep the first occurence. But since Blender expects
next data-blocks to belong to last found library, we could actually
be adding data-blocks assigned to copies of the duplicated lib to
another, totally unrelated lib.

Those data-blocks were then obviously not found when actually loading
libs content, and lost.

Note that this only fix one part of the issue, current code can
generate several copies of same linked data-block now, will fix in
another commit.
2018-02-16 10:34:00 +01:00
fa0e89b9e8 Metalball drawing: rename mball helpers to handles
and also rename some related functions
2018-02-16 02:01:09 -02:00
3ba6ff6750 Cleanup: quiet warning 2018-02-16 09:14:25 +11:00
a24be95b0f GWN: Fix ubo debug printf 2018-02-15 19:16:08 +01:00
e401e2d89c GWN: Fix attrib arrays giving incorrect name depending on the platform.
It seems that some opengl implementations are returning "[0]" after array names but some others dont.

Remove the "[0]" so everything is consistent.
2018-02-15 19:16:08 +01:00
4438325ec9 Merge branch 'master' into blender2.8 2018-02-15 18:15:00 +01:00
e03f335b1d Code cleanup: simplify switch statement, ensure we catch missing enums. 2018-02-15 18:13:07 +01:00
b1ee10aa1b Fix T54073: crash and uninitialized memory in Cycles displacement hashing. 2018-02-15 18:00:55 +01:00
ad37ccbc32 Fix crash reading deg_point_cache_transform.blend test, saved with 2.8.
In general 2.8 files may not be readable in master, but might as well fix
this case so all the lib/tests can be opened still.
2018-02-15 18:00:55 +01:00
4fd3f8db9d Cleanup: Remove debug-only code 2018-02-15 17:57:51 +01:00
b879502da4 Fix T54076: MCE in Graph mode - clip.graph_select_border does not work by header menu
While the script should be using INVOKE_PREVIEW for operators in clip view,
window manager was lacking some switch statements.

Thanks Brecht fore review!
2018-02-15 16:58:56 +01:00
ca5fdd857b Merge branch 'master' into blender2.8 2018-02-16 01:17:43 +11:00
2aef87bfae Cleanup: rename BLI_thread.h API
- Use BLI_threadpool_ prefix for (deprecated)
  thread/listbase API.
- Use BLI_thread as prefix for other functions.

See P614 to apply instead of manually resolving conflicts.
2018-02-16 01:13:46 +11:00
df1c88b652 Merge branch 'master' into blender2.8 2018-02-15 14:15:55 +01:00
ccdacf1c9b Cleanup: use '_len' instead of '_size' w/ BLI API
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
  (hint this isn't a simple getter).

See P611 to apply instead of manually resolving conflicts.
2018-02-15 23:39:08 +11:00
4da6c49613 Cleanup: Style, braces with macros
See https://wiki.blender.org/index.php/Dev:Doc/Code_Style#Braces_with_Macros
2018-02-15 12:41:35 +01:00
c0bbc4abf5 Cleanup: Remove BLI_ prefix from listbase macro
This is kind of doesn't matter where macro itself is defined.

We should stick to the following:

- If some macro is actually more an inline function, follow regular
  function name conventions.
- If macro is a macro, type it in capitals. Use module prefix if that
  helps readability or it if helps avoiding accidents.
2018-02-15 12:38:21 +01:00
2589f55a55 Merge branch 'master' into blender2.8 2018-02-15 12:33:44 +01:00
6d4022f619 Simple hair children: Make twist affected by texture
This completes twist feature, which is now possible to also control by
texture. Since textures can not easily contain negative values as well,
same trick with 0.5 neutral as vertex groups is used.

All in all, this twist features allows to do following things.

Original hair:

{F2287535}

Hair with scientifically calculated twist value of 0.5:

{F2287540}

And we can also twist braids in opposite directions dependent on left/right
side:

{F2287548}
2018-02-15 12:24:48 +01:00
5ce6ca0536 Fix T54078: Adding subsurf prior to particle system breaks simple children vgroups and textures
cpa->num points to a face index on BASE mesh, but get_child_modifier_parameters()
expects index on a FINAL dm. So wrong index was used here.
2018-02-15 11:53:58 +01:00
67cec97387 Simple hair children: Make twist affected by vertex group
The idea is to give a control over direction of twist, and maybe amount of
twist as well. More concrete example: make braids on left and right side of
character head to be twisting opposite directions.

Now, tricky part: we need some negative values to flip direction, but weights
can not be negative. So we use same trick as displacement map and tangent normal
maps, where 0.5 is neutral, values below 0.5 are considered negative and values
above 0.5 are considered positive.
2018-02-15 11:53:58 +01:00
ffde74a878 Simple hair children: Initial implementation of twist control
It allows to have children hair to be twisted around parent curve, which is
quite an essential feature when creating hair braids.

There are currently two controls:

- Number of turns around parent children.
- Influence curve, which allows to modify "twistness" along the strand.
2018-02-15 11:53:58 +01:00
bb3efe6127 Blenlib: Assert when attempting to rotate point around vector and store result in the point
This isn't supported since there are subsequent reads to all point coordinates
after modification started.

Probably we need to create a temp copy of point, but that's like extra CPU
ticks.
2018-02-15 11:53:57 +01:00
ff82968a6c Particles: Wrap insane amount of arguments to child modifier evaluation
Use single structure. It seems we will need to pass more information soon,
so better to do it via the structure.
2018-02-15 11:53:57 +01:00
9d2a699a90 Avoid unnecessary sqrt calls 2018-02-15 21:38:24 +11:00
c1784824ff Fix crash when rendering particles with cycles
view_layer is NULL when the render engine is created, this gets passed
around and ends up in this code causing a crash. This should be reverted
after the render engine api is updated to set view_layer.
2018-02-15 03:26:59 -05:00
144a661152 Make particle edit draw mode a noop
Seems this was just a template, but that template painted everything
green. Not sure what this draw mode should do really.
2018-02-15 03:26:59 -05:00
c4a783bdf7 Fix lack of particles updates and disappearing particles
The conditionals in particle code are... some sort of madness... I'm not
even sure what the correct behavior should be from looking at it.

In this case the path cache generation was being skipped in edit mode.
2018-02-15 03:26:59 -05:00
5dba0b68f8 Tag update when using particle edit brushes 2018-02-15 03:26:59 -05:00
eb0d430b4d Fix crash with particle cut brush and other brushes
Why is bedit->data.context NULL?
2018-02-15 03:26:59 -05:00
7f38e59810 Start bringing back particle edit
Its kind of broken, but have to start somewhere
2018-02-15 03:26:59 -05:00
c98af0faaf Add versioning code to make particles with default size visible again
Due to changes in draw code particles from old files that may have had a
default draw size of 0 will not be visible. Old draw code would check
for this and adjust the size, however the unit for draw size has changed
from pixels to BU, and it no longer makes sense to have such checks.

This patch is to ensure particles from such files remain visible.
2018-02-15 03:26:59 -05:00
ca7f826c6f Merge branch 'master' into blender2.8 2018-02-15 18:05:02 +11:00
b8b8669b28 Cleanup: style, warning 2018-02-15 18:03:55 +11:00
58ba89b5be Fix T54075: Align Objects fails w/ empty mesh 2018-02-15 11:33:47 +11:00
70f1b8cc40 Cleanup: style 2018-02-15 11:13:54 +11:00
56fa48969e Fix T54072: Crash splitting edges 2018-02-15 11:05:37 +11:00
e6386ed286 Merge branch 'master' into blender2.8 2018-02-14 21:49:13 +01:00
b5fe00d1ac Cycles: restore Particle Info Index for now, keep it next to Random.
It seems to be useful still in cases where the particle are distributed in
a particular order or pattern, to colorize them along with that. This isn't
really well defined, but might as well avoid breaking backwards compatibility
for now.
2018-02-14 21:45:57 +01:00
2464dcef37 Eevee: Fix broken AO and Contact shadows on certain platform.
This was caused by ce0f70fbd6
2018-02-14 19:02:03 +01:00
0ef981f603 DRW: Refactor: Less feature duplication with Gwn.
This removes the need of custom attribs for instancing.
Instancing works fully with dynamic batches & Gwn_VertFormat now.

This is in prevision of the VAO manager patch.
2018-02-14 18:59:42 +01:00
629a874817 DRW: Add instance buffer manager.
This manager allows to distribute existing batches for instancing
attributes. This reduce the number of batches creation.
Querying a batch is done with a vertex format. This format should
be static so that it's pointer never changes (because we are using
this pointer as identifier [we don't want to check the full format
that would be too slow]).

This might make the original Instance Data manager useless but it's currently used by DRW_object_engine_data_ensure().
2018-02-14 18:59:42 +01:00
ab7e7a005b GWN: Add new dynamic type of batches and remove
Theses batches keeps their memory chuck allocated after transfer to be reused and updated very often.

NOTE: This commit break instancing in DRW. (it's fixed in the next commit)
2018-02-14 18:59:42 +01:00
1e9ef2a25e GWN: Add GWN_batch_draw_procedural
This allow to drawn large amounts of primitives without any memory footprint.
2018-02-14 18:59:42 +01:00
0f3bc636c8 GWN: Allow drawing instances without batch_instancing 2018-02-14 18:59:42 +01:00
01244df007 DRW: Refactor: Make use of the new Gawain long attrib support. 2018-02-14 18:59:42 +01:00
df86e9cab5 GWN: Extend support for multiple of 4 components in batches. 2018-02-14 18:59:42 +01:00
27a7174546 GWN: Fix style and line of code that does nothing! 2018-02-14 18:59:41 +01:00
a5afe13e1c GWN: Add support for 4x4 Matrices and instancing attributes.
Only support float matrices specifically for code simplicity.
2018-02-14 18:59:41 +01:00
3102bf2889 Merge branch 'master' into blender2.8 2018-02-14 15:16:50 +01:00
f6107af4cf Cycles: change Index output of Hair and Particle Info to Random, in 0..1 range.
These are used for randomization, so it's convenient if the index is already
hashed and consistent with the Object Info node.
2018-02-14 14:55:46 +01:00
618bc6c679 GPU: use alpha blend that works for drawing to transparent buffer.
It's unlikely to ever be intentional to square the source alpha, as happens
with glBlendFunc, so this changes the blending throughout the code.
2018-02-14 14:00:57 +01:00
7028a11db9 GPU: don't use multisample for entire window, only for offscreen 3D viewport.
Now that the new 3D viewport draws to a multisample offscreen buffer, there is
no good reason anymore to create an entire multisample window and pay the
performance/memory cost for other regions that don't need it.

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

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

Maybe not ideal, but the time will show.
2018-02-13 14:20:47 +01:00
9e2ec6c86a Fix T54064: Can't create new Cycles materials
Was caused by object mode removal
2018-02-13 07:03:12 -05:00
cd517c002f Object Mode: remove Scene.obedit for RNA 2018-02-13 21:06:51 +11:00
8234f24838 Object Mode: Loop over objects for ED_editors_exit
We could loop over active objects but this ensures don't miss any
and avoids complicated context checks.
2018-02-13 21:00:26 +11:00
c8597a465f Object Mode: remove Scene.obedit
Add ED_screen_window_find, BKE_workspace_edit_object
2018-02-13 20:55:12 +11:00
754d3a2fe6 Object Mode: remove Scene.obedit for 3D View 2018-02-13 19:44:21 +11:00
d8992192e5 Object Mode: pass edit-object to outliner drawing
Also add 'OBEDIT_FROM_EVAL_CTX' macro.
2018-02-13 18:45:35 +11:00
2c6d079a90 Object Mode: pass edit-object to UV API 2018-02-13 18:29:49 +11:00
dacc6d4b02 Object Mode: remove Scene.obedit in draw manager
Part of larger change to remove this variable entirely.
2018-02-13 18:15:47 +11:00
d640ce40aa (Nodes) Display image name if any in the Cycles Image and Environment Texture node title 2018-02-13 00:58:26 +01:00
fc99eed5be Fix random walk SSS issues with different base and subsurface color.
Burley SSS uses a bit of strange thing where the albedo and closure weight are
different, which makes the subsurface color act a bit like a subsurface radius
indirectly by the way the Burley SSS profile works.

This can't work for random walk SSS though, and it's not clear to me that this
is actually a good idea since it's really the subsurface radius that is supposed
to control this. For now I'll leave Burley SSS working the same to not break
backwards compatibility.
2018-02-12 21:08:59 +01:00
b37dff9239 Fix part of T53080: don't use current scene world for icon previews.
This can be very slow if it contains a big texture, and it's not
necessarily setup in a useful way anyway, and materials can be used
in multiple scenes.
2018-02-12 20:39:40 +01:00
37ce77ba06 Buildbot: Remove usage of deprecated chroot 2018-02-12 17:56:19 +01:00
ce8b5bd90d Add boolean regression test. 2018-02-12 07:23:50 -05:00
147c24aeeb Fix T54032: Adding torus test fails
rna_LayerObjects_active_object_update used wrong viewlayer.

Regression in 345c6298e9
2018-02-12 19:39:52 +11:00
bbb2fa14c8 Merge branch 'master' into blender2.8 2018-02-12 17:57:53 +11:00
657396be08 Error in last commit, disable cycles when not enabled
Would only disable when loading old preferences.
2018-02-12 17:56:14 +11:00
2c3d4f7e65 Merge branch 'master' into blender2.8 2018-02-12 17:39:58 +11:00
53431a560e Disable cycles when WITH_CYCLES=OFF 2018-02-12 17:37:39 +11:00
fc97e120f6 BKE_addon: new/free/ensure functions 2018-02-12 17:24:18 +11:00
0bf615fc24 GHOST: Optimize and simplify the creation of a GHOST_Context on Windows
Instead of cloning the window to create dummyHWNDs and dummyHDCs to avoid calling the SetPixelFormat more than once in the same window, use the original window and HDC and do not call the SetPixelFormat again.

In addition to avoiding a lot of unnecessary calls, it simplifies the code and makes it match the others OS
2018-02-10 00:32:13 -02:00
832f7a6648 Merge branch 'master' into blender2.8 2018-02-09 20:36:59 +01:00
Dalai Felinto
5216eaec1d Eevee: Film filter default to 1.5 instead of 1.0
Cycles already uses 1.5 as default. BI original 1.0 filter doesn't look good for
Eevee. The ideal scenario would be for both Cycles AND Eevee to use the same DNA
setting.

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

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

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

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

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

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

With unittest.
2018-02-09 09:05:27 -02:00
3c09077e3b Paint Dirt: some small fixes
- normalize → average the vector: the vector isn't normalized here, because
  it doesn't necessarily becomes unit length. Instead, the sum is converted
  to an average vector.
- angle is the acos()…: the dot product between the vertex normal and the
  average direction of the connected vertices is computed, and not the
  opposite.
- The initial `con` list was discarded immediately and replaced by a new
  list.
- File didn't end with a newline.
2018-02-09 10:35:03 +01:00
37e53ca5f3 Missed opencollada edit in recent changes 2018-02-09 20:25:32 +11:00
07ccb8b97c Fix crash with font on curve
Was a mistake from recent texspace changes.

Reported by Pablo here in the studio!
2018-02-09 10:14:08 +01:00
32287212f5 Cleanup: pass eval_ctx to sculpt_init_session
Matches vertex paint mode
2018-02-09 17:46:46 +11:00
9b9861578d Merge branch 'master' into blender2.8 2018-02-09 13:56:49 +11:00
8f9386596f CMake: include missing headers 2018-02-09 13:50:05 +11:00
8a6b83d27e Fix T53958: Sequencer zoom 1:1 fails 2018-02-09 13:39:47 +11:00
5e65791516 Fix T53347: Vertex paint crash
Vertex paint was still using sculpt mode brush (which can be NULL).
2018-02-09 12:00:26 +11:00
Dalai Felinto
518d59970d Fix blenderplayer (tm) 2018-02-08 17:44:25 -02:00
3b61d2bb68 Merge branch 'master' into blender2.8
Conflicts:
	intern/cycles/blender/addon/ui.py
2018-02-09 03:00:20 +09:00
859379ac48 Fix for missing "Use Freestyle" toggle in the Cycles "Layer" options panel.
Reviewed By: Brecht Van Lommel (brecht), Dalai Felinto (dfelinto)

Differential Revision: https://developer.blender.org/D3048
2018-02-09 02:48:21 +09:00
29d2ff7b31 Cycles: unify OSL BSSRDF closure into a single bssrdf() closure with method.
This is similar to the upstream unified microfacet() closure, and makes it
easier to extend in the future.
2018-02-08 16:56:11 +01:00
aabafece03 Code refactor: tweaks in SSS code to prepare for coming changes.
This also fixes a subtle bug in the split kernel branched path SSS, the
volume stack update can't be shared between multiple hit points.
2018-02-08 16:56:11 +01:00
28e2bc90dd Code refactor: remove unnecessary RNG offset in branched path code.
This is only needed for SSS which bounces to a different shading point.
2018-02-08 16:56:11 +01:00
8c8e53c12d Cycles tests: separate directory for sss tests. 2018-02-08 16:56:11 +01:00
d3248bb50b Disable fast adjust code. Add other end spec matching.
This fixes a few caess where new width adjustment code

was less than ideal.
2018-02-08 10:48:24 -05:00
74fa84f37f Remove redundant check for armature mode
Caller ensures pose-mode, this flag is only set while drawing.
2018-02-09 02:39:54 +11:00
be2bd5d722 Fix mixed weight-paint & pose mode 2018-02-09 02:34:32 +11:00
9278614115 Merge branch 'master' into blender2.8 2018-02-08 16:27:28 +01:00
e0597baed5 Remove Carve boolean
We've got quite comprehensive BMesh based implementation, which is way easier
for maintenance than abandoned Carve library.

After all the time BMesh implementation was working on the same level of
limitations about manifold meshes and touching edges than Carve. Is better
to focus on maintaining one boolean implementation now.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3050
2018-02-08 15:37:44 +01:00
bdc708762c Merge branch 'master' into blender2.8 2018-02-08 15:14:22 +01:00
9dc7dca3a2 Depsgraph: Fix missing camera animation after visibility changes
Synchronize code in on_visible_update with depsgraph building.

Need to update all cameras, since they might be hooked up to marker.
2018-02-08 15:12:38 +01:00
c3e61cab8a Merge branch 'master' into blender2.8 2018-02-08 23:48:36 +11:00
f088c6b9f6 Mesh: concave quad support
Previously quads always split along first-third vertices.
This is still the default, to avoid flickering with animated deformation
however concave quads that would create two opposing triangles now use
second-fourth split.

Reported as T53999 although this issue has been known limitation
for a long time.
2018-02-08 23:38:17 +11:00
5f2b4002f4 Dopesheet: Synchronize selection on bones when selecting everything
This is also how box selection and mouse selection is working.

Requested by Hjalti, reviewed by Joshua. Thanks!
2018-02-08 12:36:39 +01:00
022a481789 Fix error in object-mode removal
Wasn't setting transform context
2018-02-08 21:58:45 +11:00
127d515f3d Merge branch 'master' into blender2.8 2018-02-08 21:43:37 +11:00
1ddd03b793 Fail gracefully when editmode data doesn't exist
Sync changes from 2.8
2018-02-08 21:36:16 +11:00
345c6298e9 Object Mode: move to workspace struct
- Read-only access can often use EvaluationContext.object_mode
- Write access to go to WorkSpace.object_mode.
- Some TODO's remain (marked as "TODO/OBMODE")
- Add-ons will need updating
  (context.active_object.mode -> context.workspace.object_mode)
- There will be small/medium issues that still need resolving
  this does work on a basic level though.

See D3037
2018-02-08 21:14:26 +11:00
Dalai Felinto
14a19fed78 Fixing builds for 2.8 - outliner typo 2018-02-08 08:03:35 -02:00
611712fcc8 Linux: Add appdata.xml file for packagers
D3025 by @januz
2018-02-08 15:59:16 +11:00
8fa19e1950 Fix: Data-Blocks view in Outliner no longer displayed property values, making it semi-useless
Partially revert efe1af3d11

The offending commit over-zealously removed the datablocks viewer case
as well, when only the condition needed to be modified.
2018-02-08 16:15:49 +13:00
42c99ee5f5 DRW: Fix crash caused by fixing the leak (badly).
Previous commit was af425f3f7a
2018-02-08 00:41:27 +01:00
44aaffc684 Merge branch 'master' into blender2.8 2018-02-07 22:27:08 +01:00
00d2dfa93a Forgot to return actual value in previous own commit.
Sorry about the noise...
2018-02-07 22:26:37 +01:00
b8d376174c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
2018-02-07 22:19:11 +01:00
49745aa5ff Library linking code: proper early out in case there is nothing to link. 2018-02-07 22:09:44 +01:00
749caf4984 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
2018-02-07 21:54:52 +01:00
843271d0a5 Library reload code: add early out in case there is nothing to reload. 2018-02-07 21:52:38 +01:00
af425f3f7a DRW: Fix memory leak with dupli objects.
This was caused by dupli's ObjectEngineData that were not free.

This allocates the data using the instance data manager (no alloc/free between frames). Though the data should be treated as not persistent in this case.
2018-02-07 19:15:55 +01:00
8a2f93b2ab DRW: Opti: Use less bytes in DRWUniform. 2018-02-07 19:15:55 +01:00
25c8b5046f Clay: Small refactoring of matcap_colors and put ubos into sldata.
Ubos needed to be free correctly.
Also the matcap colors are statics and does not need to be uploaded each drawcall.
2018-02-07 19:15:55 +01:00
ade2aaba09 Merge branch 'master' into blender2.8 2018-02-07 17:17:24 +01:00
56f6938b5e Depsgraph: More fixes for shape keys
Made shape keys to work for meshes. Also added missing code for curves.

Curves and lattices will not have shape keys visible, since modifiers support
is still to be done for them.
2018-02-07 14:15:24 +01:00
84155ab21a Depsgraph: Fix crash with shape keys and lattices
Only crash is fixed, still need to do something about missing recalc
or something like that.
2018-02-07 12:26:30 +01:00
1dafe759ed Update CUEW to latest version
This brings separate initialization for libcuda and libnvrtc, which
fixes Cycles nvrtc compilation not working on build machines without
CUDA hardware available.

Differential Revision: https://developer.blender.org/D3045
2018-02-07 11:53:01 +01:00
5892efa883 Depsgraph: Fix crash when visible update is called after tagging for updates
It is possible to have non-NULL scene in graph which was never built yet,
this happens when ID is tagged for update for non-built graph.

Was causing crash opening deg_anim_pose_bones.

Reported by Mai in IRC, thanks!
2018-02-07 11:21:16 +01:00
60eef5c7ff Depsgraph: Fix node sockets as driver variables
Fixes empty not moving int deg_anim_material_driving_empty.

Reported by Mai in IRC, thanks!
2018-02-07 10:57:54 +01:00
da128c12b5 Fix error with Main.eval_ctx.object_mode being unset
This made vertex/weight/sculpt crash.

Add BKE_workspace_update_object_mode which sets the object mode from the
workspace.

We may want to re-visit exactly when this is set, for now call within
wm_event_do_refresh_wm_and_depsgraph.
2018-02-07 18:35:05 +11:00
17f5d7f3c5 Depsgraph: Add missing relationship between object transform and point cache reset
This fixes an issue where old cache data was used after an object has been moved.
Particles were coming from very wrong positions. Reproduction case is to move an
object while animation is running and then let the animation loop back and
play again.

Differential Revision: https://developer.blender.org/D3044
2018-02-07 01:18:04 -05:00
5b01e428a9 Move eval_ctx after object mode changes 2018-02-07 16:38:17 +11:00
e99094035c Merge branch 'master' into blender2.8 2018-02-07 15:59:16 +11:00
38d35603f2 Correct header guard in last commit 2018-02-07 15:52:34 +11:00
6981861fcf Cleanup: Python context access
Avoid access from bpy when it's already declared.
2018-02-07 15:47:54 +11:00
ce0f70fbd6 Eevee: Fix SSR & AO on Vega + Mesa.
Really strange bug. Maybe gl_FragDepth is broken on this implementation.
2018-02-07 05:44:05 +01:00
708ef19d88 GPU: Remove Mesa + Vega hack.
This is not needed anymore with linux 4.15 + Mesa 17.3.3.
2018-02-07 05:44:05 +01:00
17577c53c6 Merge branch 'master' into blender2.8 2018-02-07 11:19:01 +11:00
1e4b612d6a Cleanup: add _types.h suffix to DNA headers 2018-02-07 11:14:08 +11:00
Dalai Felinto
77b61b554c Outliner: Add object(s) to new collection
Suggested by Pablo Vazquez (venomgfx).

The idea here is that it should be easy to work in the outliner by picking a
bunch of objects and adding them to a new collection.
Where is the new collection? In the same level as the "outliner active" object.

Note, since the outliner has no pure concept of an active object, I'm using
the highlight tag for this. Hopefully it works fine.

It should work in "Collections", "View Layer", and "Groups".
Only when collections are not filtered out.
2018-02-06 18:39:14 -02:00
Dalai Felinto
107486e673 Fix poll for OUTLINER_OT_object_remove_from_collection
Outliner groups mode support no filtering.
2018-02-06 18:37:37 -02:00
Dalai Felinto
fcb430afba Rename OUTLINER_OT_collection_object_remove > _object_remove_from_collection
Better make it clear it is different than OUTLINER_OT_collection_objects_remove.
2018-02-06 13:28:37 -02:00
Dalai Felinto
9631c1ac1a Outliner: Operator to delete outliner selected elements from collection
Suggested by Pablo Vazquez (venomgfx).
2018-02-06 13:19:58 -02:00
Dalai Felinto
5633bab2d0 Fix crash when no active object
To reproduce the crash: delete the active object of the scene.

This bug was introduced on e9c40b7339.
2018-02-06 13:19:12 -02:00
66521b382b Depsgraph: Correction to previous particle fix
The reason it appeared working was due to left-over debug code to force
time dependency.

Real fix seems to include force tagging objects used by duplication,
similar to what we do for some other modifiers already.
2018-02-06 14:51:02 +01:00
1ae5dfd049 Fix T54005: Broken IDProp copying from RNA code.
When destination IDProp did not exist, new code (related ot static
overrides) would not do nothing...

IDProps and RNA are really not easy to tame, thinking more and more we
should totally bypass RNA and directly use (add) IDP code to handle
comparison and diff creation/application of IDProps.

But for now, this bandage should to the trick.
2018-02-06 14:39:39 +01:00
0eb9d2adc6 Merge branch 'master' into blender2.8 2018-02-06 23:36:12 +11:00
f9f64ca4a3 Use eObjectMode for function arguments 2018-02-06 23:34:58 +11:00
885d78150d Use eObjectMode for function arguments 2018-02-06 23:27:49 +11:00
5376c739f5 Merge branch 'master' into blender2.8 2018-02-06 23:06:23 +11:00
486e2547ee DNA: move eObjectMode into own header
Add a enum headers to DNA, to be included in other headers
so function signatures can use enums for better type safety.

Add DNA_*_enums.h matching DNA_*.types.h as needed.
2018-02-06 22:58:13 +11:00
98dcd33238 Fix Collada building after changes in API.
Seriously guys... *Full* build when you change APIs!
2018-02-06 12:11:00 +01:00
f9deea57d9 Fix bplayer (c) 2018-02-06 12:10:41 +01:00
ce0cb4de8d Object Mode: use eval_ctx for modifiers_isCorrectableDeformed
Some other minor changes from D3037 as well
2018-02-06 19:35:06 +11:00
f9da89a38d Partially revert changes from 2a184f3d2b
Ended up removing the need for eval_ctx,
but left it being initialized.
2018-02-06 19:17:28 +11:00
74f7fb084c Object Mode: use eval_ctx for get_active_constraints 2018-02-06 18:03:29 +11:00
fa588e9ef4 Object Mode: pass eval_ctx to ED_object_iter_other 2018-02-06 18:03:29 +11:00
2a184f3d2b Object Mode: use eval_ctx for paint & object 2018-02-06 18:03:29 +11:00
906ed54d28 Object Mode: ED_mesh_mirrtopo_* check edit-mode data
Replace object mode checks for edit-mode data
2018-02-06 18:03:29 +11:00
e9c40b7339 Object Mode: pass as arg to stats_string 2018-02-06 18:03:29 +11:00
5ec016169b Object Mode: use eval_ctx for context/screen code 2018-02-06 18:03:28 +11:00
269ed0a770 Object Mode: pass eval_ctx in outliner functions 2018-02-06 18:03:28 +11:00
021bf4c2fe Object Mode: use eval_ctx for keyframe & weight calculation 2018-02-06 18:03:28 +11:00
c7fecab2ef Object Mode: Use eval_ctx mode for drawing, paint & modifiers 2018-02-06 18:03:28 +11:00
ef11113399 Object Mode: use eval_ctx mode in transform code
This adds EvaluationContext into TransInfo
2018-02-06 18:03:28 +11:00
91db372b48 Object Mode: pass object mode to CTX_data_mode_enum_ex 2018-02-06 18:03:28 +11:00
28dfc47cf0 Object Mode: Add to EvaluationContext & DRWContextState 2018-02-06 18:03:28 +11:00
1c600cc643 Object Mode: use obdata when loading from editmode
Avoids having to check the objects mode in 'update_from_editmode'.
2018-02-06 18:03:28 +11:00
7b0cb7e00d Object Mode: don't check posemode in the BGE
No reason pose mode should change behavior
2018-02-06 18:03:28 +11:00
a3409d3f53 Fix T54003: Particles - Size and random size not present in "physics" tab in Advanced mode
The check to see if `use_advanced_hair` was enabled was actually in two places
(render panel `draw` function and physics panel `poll` function). As these
properties are only in one place now the check in `draw` isn't needed anymore.

Related: T53513, a6c69ca57f
2018-02-05 20:25:08 -05:00
78c6684ee9 Freestyle: Unnecessary repeats of Cycles property copying.
As a follow-up to the commit rB354f92a49458795c69f857de927c5b1531cd3618
for fixing Freestyle crash when using Cycles (thanks Brecht for the fix), this revision
applies a related bugfix addressed partly in D3040 (item #2 in the description).
2018-02-06 09:11:59 +09:00
9810f4a11c Freestyle: Additional debug info for the render engine used for stroke rendering. 2018-02-06 08:53:59 +09:00
ce3e0afe59 Fix T54001: AMD OpenCL fails with certain resolutions, after recent changes.
We should actually be using CL_DEVICE_MEM_BASE_ADDR_ALIGN for sub buffers,
previous change in this code was incorrect. Renamed the function now to
make the specific purpose of this alignment clear, it's not required for
data types in general.
2018-02-05 22:19:49 +01:00
Dalai Felinto
e75c04898f Fix duplicator visibility logic
Cycles old behaviour is to hide the duplicator on rendering at all times.

We have since a few months an option in 2.8 to control the duplicator
visibility on its own. However when the duplicator is also duplicated, things
were not working properly.

What we do now is, in addition to the duplicator visibility control, is to not
have the source collection of the duplicator object to ever influence its
visibility when the object is been duplicated.

So if the user wants to reproduce Cycles old behaviour all that is required is
to have different collections, one for the original to-be duplicated objects
that you hide in for the view layer used in the final render. And another
collection with only the first duplicator (which in turn duplicates other
duplicators).

I know this all may sound confusing, so please just give it a try, it's simpler
than it sounds.
2018-02-05 19:01:27 -02:00
bd9ed0228b Fix bevel profile=1 problems, see T39132, T38458, T40278, T51010,
T53783.

Before, profile=1 ("square outside") only worked well in a few cases
(some "pipes", cube corners). This makes it work well pretty much
everywhere.
2018-02-05 14:21:43 -05:00
354f92a494 Fix Freestyle not copying Cycles properties to stroke rendering scene. 2018-02-05 18:57:26 +01:00
a8a77609d3 Fix Cycles + Freestyle rendering crash, due to bug in RNA override code. 2018-02-05 15:08:04 +01:00
Nathan Letwory
f9fcda533b Fix typo in struct name obejct to object.
Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D3041
2018-02-05 11:31:33 +02:00
a1c45a453f Merge branch 'master' into blender2.8 2018-02-05 17:58:31 +11:00
f911fb0744 Minor change to last commit
Keep mode checks simple, nest other checks in their body.
2018-02-05 17:56:09 +11:00
ceb645bc56 Fix T53986: Crash saving during sculpt stroke
Also remove unused struct member.
2018-02-05 17:54:13 +11:00
23d2f708f3 Eevee: Pixel Filter: Add parameter & rescale final LUT. 2018-02-05 01:59:14 +01:00
cc1e88b37a Eevee: AA: Add Blackmann-Harris pixel filter distribution.
This leads to a huge improvement of AntiAliasing quality.
There is no other distribution now and there is not settings displayed to the user. That's for another commit.
2018-02-05 01:59:14 +01:00
08112c2acf Eevee: Style: More Const correctness. 2018-02-05 01:59:14 +01:00
143b0ab52a Eevee: Render: Reset winmat before jittering it again. 2018-02-05 01:59:14 +01:00
c8e87edccb Eevee: Render: Fix Ao pass background contamination.
It was poluted by the additive blend mode.
2018-02-05 01:59:14 +01:00
f61bcc70e1 Eevee: Render Fix black normals on blended material in the normal pass. 2018-02-05 01:59:14 +01:00
956a7bc3ea Eevee: Render: Force normal buffer creation if needed. 2018-02-05 01:59:14 +01:00
e1d5d55b56 Eevee: Codestyle: Indent #ifdefs 2018-02-05 01:59:14 +01:00
07e1212e34 Eevee: Render: Fix black reflections in 1st sample. 2018-02-05 01:59:14 +01:00
e84e8cb497 cycles: fix black render with cycles_cubin_cc.
I have honestly no idea how this got swapped..
2018-02-04 15:12:35 -07:00
f8236e4869 cycles: fix cxx11 usage for cycles_cubin_cc 2018-02-04 15:11:08 -07:00
eeb621566a Merge branch 'master' into blender2.8 2018-02-04 10:46:34 +11:00
36c1122b96 msvc: Use source folder structure for project file.
This patch changes the huge list of projects in visual studio into a nice tree matching the source folder structure. see D2823 for details.

Differential Revision: http://developer.blender.org/D2823
2018-02-03 16:38:27 -07:00
a5052770b8 cycles: Add an nvrtc based cubin cli compiler.
nvcc is very picky regarding compiler versions, severely limiting the compiler we can use, this commit adds a nvrtc based compiler that'll allow us to build the cubins even if the host compiler is unsupported. for details see D2913.

Differential Revision: http://developer.blender.org/D2913
2018-02-03 10:59:09 -07:00
1bc0cd0071 Merge branch 'master' into blender2.8 2018-02-03 16:10:01 +01:00
db989e1f11 Fix more Cycles incorrect principled BSDF mixing due to missing initialization.
Spotted by Ha Hyung-jin, thanks!
2018-02-03 13:43:44 +01:00
7ea7ce970c Fix build error with CUDA 9.1 and compute capability 2.x. 2018-02-03 13:36:38 +01:00
bb6f1d159a Cycles: make displacement a supported feature.
Adaptive subdivision remains experimental, still needs more work.
2018-02-03 12:20:58 +01:00
f9ea097a87 Cycles: add Vector Displacement node and extend Displacement node.
This adds midlevel and object/world space for displacement, and a
vector displacement node with tangent/object/world space, midlevel
and scale.

Note that tangent space vector displacement still is not exactly
compatible with maps created by other software, this will require
changes to the tangent computation.

Differential Revision: https://developer.blender.org/D1734
2018-02-03 12:20:26 +01:00
065a84c8d0 Eevee: Fix crash when using Ogl render and subsurface. 2018-02-03 02:19:10 +01:00
226685d3a0 Eevee: Render: Fix hashed-alpha testing. 2018-02-03 02:19:10 +01:00
4820c7400f Eevee: Render: Make sure all probes are refreshed before rendering. 2018-02-03 02:19:10 +01:00
e530d0ccaa Eevee: Perf: Put transparent sorting before the render loop. 2018-02-03 02:19:10 +01:00
36b259fa88 Eevee: Render: Add ambient occlusion pass support. 2018-02-03 02:19:10 +01:00
39706a0a3d Eevee: Subsurface: Release separate albedo texture if not used. 2018-02-03 02:19:10 +01:00
269d9eb54c Eevee: Render: Fix emission shader normal output 2018-02-03 02:19:10 +01:00
Dalai Felinto
217bc17a3c Fix draw manager F12 evaluation mode
This effectively allows for ob duplicator_render/viewport to work properly
when doing final renders.
2018-02-02 18:03:04 -02:00
dcea87b58e fix: rBc4a19e988bb4 error stepped in by a merge from mmaster 2018-02-02 17:30:54 +01:00
Dalai Felinto
c7c070c2ec Collections: Operator to duplicate a collection
When duplicating a layer collection directly linked to the view layer we copy
the collection and link it.

For all the not directly linked layer collectionns, we try to sync the layer
collection flags, overrides, ...

Also we make sure the new collection is right after the original collection.

We also expose this in RNA, via collection.duplicate().
2018-02-02 12:25:05 -02:00
Dalai Felinto
a4d2b102f3 Collections: Operator to select collection objects
This is only supported by layer collections (the ones accessible
in the outliner when you see "View Layer").
2018-02-02 12:25:05 -02:00
26dff781b3 Merge branch 'master' into blender2.8 2018-02-02 12:21:24 +01:00
37beac8eb8 Fix missing group duplicated by hair in render
Was happening when viewport visibility on the particle system is disabled.
This became an issue after c45afcf, but the actual issue goes a bit deeper
and the following aspects were involved:

- Relations builder for particle system was ignoring particle system if
  it's visibility is not enabled for viewport. This is something what
  shouldn't have been done -- depsgraph relations are supposed to be the
  same no matter if it's viewport or render.

- Relation builder was only dealing with duplication set to object, but
  was ignoring group duplication.

This is technically a regression in 2.79a-RC as well, so would need to
backport this fix to the branch after extra testing is done here in the
studio.
2018-02-02 12:05:11 +01:00
c4a19e988b fix: silence warnings about unused local variable (thanks to dfelinto for the hint) 2018-02-02 11:57:10 +01:00
fe82a09f89 Fix T53980: IK influencing REST POSE with New Depsgraph 2018-02-02 10:37:06 +01:00
c3eb22e2ab Merge branch 'master' into blender2.8 2018-02-02 14:15:29 +11:00
88e69806b9 Cleanup: wrap function args 2018-02-02 14:11:14 +11:00
b2dc0e6970 Fix T53978: Bad memory access after recent fix to BSDF mixing
Added proper checks after BSDF allocation and cleaned up existing
inline checks.

Was introduced in 7261d675e6
2018-02-01 20:03:29 -05:00
7003c8a143 Eevee: Render: Fix volume sampling. 2018-02-02 01:18:25 +01:00
263083c7e6 Eevee: Render: Make sure background does not write to ssr data. 2018-02-02 00:50:18 +01:00
78a77fe622 fix: unintentionally commented out collada animation export 2018-02-02 00:49:42 +01:00
9173a6f519 Eevee: Render: Fix NaNs in Normal pass. 2018-02-02 00:48:33 +01:00
44c4d62092 Eevee: Render: Make render passes appear in compositor. 2018-02-01 21:38:16 +01:00
7049bcf76e Eevee: Render: Fix broken "non-multiview" render. 2018-02-01 21:08:05 +01:00
00f1bc1685 Eevee: Render: Add support for multiview. 2018-02-01 20:48:30 +01:00
ab5f86a04e Eevee: Render: Add Transparent Background option.
... under a new "Film" tab in the render properties panel.
2018-02-01 20:48:30 +01:00
e52c5bcdb5 Eevee: Add mist pass support.
Eevee: Render: Fix crash when not enabling mist pass.
2018-02-01 20:47:56 +01:00
12bd214b9a World: Use enum for mist falloff parameter. 2018-02-01 18:09:17 +01:00
d57741d91f Eevee: Simplify/Fix view_vecs calculation.
Now view_vecs[0][2] ALWAYS contains Near clip plane and view_vecs[1][2] = far - near.
2018-02-01 18:09:17 +01:00
c95f3a3616 Eevee: Render: Fix Normals of refraction shader. 2018-02-01 18:09:17 +01:00
253b412ace Eevee: Render: Add Subsurface Pass support. 2018-02-01 18:09:17 +01:00
7884ae6eb2 Fix T53686: VSE Render crash when zooming timeline
This is rather a workaround to avoid main thread freeing all glyph caches
at the same time as sequencer uses fonts to draw text sequences.

Ideally we need to either make cache more local, or user-counted or to make
somewhat more global locks. All this ends up in a bigger refactor which is
better for 2.8. For the meantime let's make Blender more stable with a tiny
workaround.

Downside is that keeping zooming things up and down in interface during render
will increase memory usage by unused glyph caches. It's not too bad though,
all unused caches will be freed first time at area zoom after render.

Thanks Bastien for review!
2018-02-01 16:34:30 +01:00
1a840c3e27 Fix T53951: Copy ms runtime dlls using InstallRequiredSystemLibraries.cmake
Differential Revision: https://developer.blender.org/D3032
2018-02-01 08:26:14 -07:00
Dalai Felinto
a57063a432 Merge remote-tracking branch 'origin/master' into blender2.8 2018-02-01 13:13:44 -02:00
7e928c3bbc Fix: msvc build error with bli_fileops.h
bli_fileops.h was using uint64_t without including the proper header.

issue triggered by rBb0af44fa4d7a2e134b315c49a4fbdf573f781004
2018-02-01 07:59:52 -07:00
0bf54dd66b Fix T53686: VSE Render crash when zooming timeline.
Epic fail from recent 'security' fixes (rBe04d7c49dca9). ;)

To be backported to 2.79a!
2018-02-01 15:55:38 +01:00
ff54dbd8fa Cycles: Attempt to fix 32 bit linux compilation 2018-02-01 15:13:54 +01:00
7bd86d74ba Cycles: Fix for non-vectorized version of bitscan()
It was doing bit search in an opposite direction comparing to a
vectorized version.
2018-02-01 15:11:17 +01:00
b8bb15f744 Finalize/enable new static override for linked groups.
Behavior is expected to be simillar to 'make proxy' on linked groups, it
basically allows you to select which object in the group will be to
'root' override (usually, the armature), checks which other objects
needs to be overridden as well, overrides the group itself too, and
instantiates the group and the root overridden object.

It seems to be working, though handling of armature deformation is kind
of totally broken in blender2.8 currently (modifiers...). ;)
2018-02-01 14:08:18 +01:00
73b4cb5c89 Fix some issues in new RNA diff code. 2018-02-01 14:07:51 +01:00
Dalai Felinto
781dd5edb5 Fix audaspace mess in 2.8
All these files were removed since accidental commit, revert and merge in 2.8.

ea31f0ac3b + 0a4e170c28 + 11f9a23a28 + 7b27b10fa6
2018-02-01 09:22:57 -02:00
cd317fab65 Fix wrong attempt to get depsgraph from RNA Groups ViewLayer. 2018-02-01 12:10:10 +01:00
1ce8a7f3d0 Fix incorrect message bus tag count 2018-02-01 15:56:36 +11:00
70841e58c4 Merge branch 'master' into blender2.8 2018-02-01 15:18:58 +11:00
653746f5f8 Cleanup: pass userdef to write_userdef, const args 2018-02-01 15:16:36 +11:00
4174524cb0 Error in last commit 2018-02-01 15:15:57 +11:00
6ffc6b30aa Merge branch 'master' into blender2.8 2018-02-01 14:59:14 +11:00
4d96202c9e Cleanup: Python code-style 2018-02-01 14:58:05 +11:00
e4c9cf7088 Merge branch 'master' into blender2.8 2018-02-01 14:02:33 +11:00
10fec1f153 Cleanup: Python code-style (addons, wm) 2018-02-01 13:58:44 +11:00
078e012cd9 Cleanup: rename BLI_*_empty() -> clear()
Consistent with other BLI API's
2018-02-01 13:40:53 +11:00
7b27b10fa6 Merge branch 'master' into blender2.8 2018-01-31 22:36:16 -02:00
0a4e170c28 Revert "tmp"
This reverts commit ea31f0ac3b.
2018-01-31 22:35:46 -02:00
11f9a23a28 Merge branch 'master' into blender2.8 2018-01-31 22:34:29 -02:00
42ca1fe89c gpu_shader_material: Correct incorrect glsl texture of Voronoi, Noise, and Musgrave on some Intel GPUs 2018-01-31 22:31:08 -02:00
ea31f0ac3b tmp 2018-01-31 22:11:01 -02:00
4bd72586aa Merge branch 'master' into blender2.8
Apply Fix T50198 also in blender2.8
2018-02-01 00:43:01 +01:00
22faf66c8b fix T50198: The OpenCollada error handler must return true after detecting uncritical errors. 2018-02-01 00:41:39 +01:00
4b5ac3b768 Merge branch 'master' into blender2.8 2018-01-31 17:17:43 +01:00
9d39980cfd I18n disambiguation: IRIS is both a file format and a VSE wipe effect...
At some point, we could probably think about removing IRIS file format
support, don't think there are much of those around anymore. But for
now, let's add a translation context to wipe effect. :)

Reported in T43295 by @blend-it, thanks.
2018-01-31 16:43:04 +01:00
6a6f7547e3 DRW: Finish 85d3de94c6 2018-01-31 15:00:39 +01:00
616182ea44 Eevee: SSS: Fix SSS perturbating SSR normals. 2018-01-31 14:41:26 +01:00
458dd4100f Merge branch 'master' into blender2.8 2018-01-31 14:24:38 +01:00
483b981d63 Outliner: Fix crash when invoking operators of a collection or group
The crash occurred when trying to see a tooltip or activate any of the operator's tools with the cursor outside the outliner area.
2018-01-31 11:07:25 -02:00
f309becf2d Fix possible concurency issue in mesh normals computation.
Failure in own code from last December, thanks @sergey for finding it.

To be backported to 2.79a.
2018-01-31 12:30:39 +01:00
6d55b522fe Merge branch 'master' into blender2.8 2018-01-31 19:03:45 +11:00
87608e66e1 WM: correct comment, variable name for addons 2018-01-31 19:02:43 +11:00
afaca68ea8 Eevee: Render: Fix crash when using a sun lamps with shadow. 2018-01-31 02:53:03 +01:00
55a238edd6 Eevee: Render: Add Normal pass output. 2018-01-31 02:53:02 +01:00
76135d6b72 Eevee: Fix indentation and fix output normal of emission shader. 2018-01-31 02:53:02 +01:00
251fd91064 Eevee: Fix Crash when rendering using Render Border. 2018-01-31 02:53:02 +01:00
85d3de94c6 Eevee: Fix crash when Rendering (F12) using camera mapping. 2018-01-31 02:53:02 +01:00
4801e3fd92 Eevee: Display compositing tab. 2018-01-31 02:53:02 +01:00
807713e4f2 UI: re-enable alt-key for editing selection
Fixes T53950 where changing node layers applies to all selected nodes.
2018-01-31 11:54:04 +11:00
Dalai Felinto
d8059a5f11 Make layers unittest pass after filter cleanup
Update your svn lib.

Unittests broken since 7628961391.
2018-01-30 19:06:23 -02:00
Dalai Felinto
133afc07b2 Compositor / Render Layer Node: Fix wrong layer after deleting view layers
I was calling the ntree syncing function too late. So the index of the layer
was -1 since it was no longer in the ListBase, making all RenderLayer nodes
to decrease their respective `custom1` (even going to negative sometimes).
2018-01-30 18:31:38 -02:00
7b675e0dc4 Fix blender player (tm) 2018-01-30 16:36:15 -02:00
97d225ed6f Fix Cycles incorrect principled BSDF mixing with some parameter variatons.
Spotted by Ha Hyung-jin, thanks!
2018-01-30 16:36:15 -02:00
7a868d127f Fix blender player (tm) 2018-01-30 16:11:58 +01:00
Dalai Felinto
dbed11d272 Fix FOREACH_OBJECT_RENDERABLE using stack data
Since 30a966a726 when I removed the recursion, the code was still relying
on stack data. This would crash in release often, and it should crash always.

Big thanks to Sergey Sharybin for spotting the issue.
2018-01-30 13:07:08 -02:00
7261d675e6 Fix Cycles incorrect principled BSDF mixing with some parameter variatons.
Spotted by Ha Hyung-jin, thanks!
2018-01-30 15:05:47 +01:00
0d64857c3f Merge branch 'master' into blender2.8 2018-01-30 14:32:27 +01:00
Dalai Felinto
b5cbc8bb60 Fix FOREACH_OBJECT_RENDERABLE going over the same object twice
Which is really silly because we were already tagging the ids, but simply
never checking them back.
2018-01-30 11:27:12 -02:00
b3c4a2a8da Fix T52520: Metaballs in edit mode causes infinite Cycles viewport reset
The issue was introduced by eb016eb as a fix for T41258, which added depsgraph
tagging with zero flag. The comment was saying that it's to make derived caches
to be updated, however bot sure how that could possibly work: tagging ID for
update with 0 flag only sets updated tags in bmain in old dependency graph.

In the new depsgraph, where object data is a part of depsgraph, doing such a
tag forces object to be updated, which re-triggers viewport rendering, which
is causing such an infinite viewport render rest.

Can not reproduce any crashes here, so maybe it's fine to move on with this
change.
2018-01-30 14:20:23 +01:00
Dalai Felinto
30a966a726 Fix FOREACH_OBJECT_RENDERABLE recursion going over the roof
This was leading to so much recursion that it was failing here.
How to test it: Open wanderer.blend and try to render (F12).

Note: This won't fix F12 rendering for wanderer with Eevee. Something else is
going wrong there.
2018-01-30 10:53:09 -02:00
c80b1f5410 Cleanup: warning, spelling 2018-01-30 21:02:27 +11:00
d0f63d402d Fix T53943: Weight paint crash in new scene 2018-01-30 20:33:20 +11:00
b0af44fa4d Fix T50630: Fluid fails on win32 w/ unicode paths
Allow overriding gzip open w/ elbeem.
2018-01-30 14:31:04 +11:00
e83cbf4610 Fix crash drawing light probe 2018-01-30 13:36:41 +11:00
58c92f9f0d Fix light probe callbacks
Even though this wasn't crashing here, the arg types were wrong.
2018-01-30 13:15:04 +11:00
3e8c96ae46 DRW / Render: Make render result show when using final render with eevee. 2018-01-29 22:27:22 +01:00
1fe2b4bf60 Eevee: Remove unused variable. 2018-01-29 22:00:15 +01:00
376d42304b Eevee: Add Z pass render result. 2018-01-29 22:00:15 +01:00
0f93d67617 Eevee: Display render button in render panel 2018-01-29 22:00:15 +01:00
f107af3519 Eevee: Add support for TAA/SuperSampling for final render. 2018-01-29 22:00:15 +01:00
8cce339131 Eevee: Add new "render samples" properties. 2018-01-29 22:00:15 +01:00
ba9a4dedda Eevee: Initial Final Render support.
TAA / multiple samples is not working at the moment.
2018-01-29 22:00:15 +01:00
847613c34e Render: Abort operator if there is no render_to_image() function 2018-01-29 22:00:15 +01:00
b6dbd8723c DRW / Render: Add support for render pipeline in drawmanager.
For simplicity we choose to execute the rendering of Opengl engines in the main thread and block the interface.
This might be addressed in the future at least for video rendering.

A drawmanager wrapper (DRW_render_to_image) is called by the render pipeline to set up the Opengl state and then call the specific draw_engine->render_to_image function.
2018-01-29 22:00:15 +01:00
01a62515cb DRW: Add "hardcoded" stipples for sun ray display. 2018-01-29 22:00:15 +01:00
Dalai Felinto
0f35436bcf Outliner: Moving object context menu to Python, and adding hierarchy
As suggested by Pablo Vazquez, though I think we can refine it a bit with icons.
I will wait for his feedback on it.
2018-01-29 18:01:57 -02:00
38bc973a6c uvedit_draw: Ensure first if it has any UV to draw
Otherwise an assert could be launched
2018-01-29 16:56:52 -02:00
d072022bbf Deduplicate GLSL frag code in particle drawing
Differential Revision: D2993
2018-01-29 15:51:23 -02:00
9577ebde79 Fix T53598: OpenGL Render Animation does not update shadows
General idea of the fix: skip the whole draw manager callback madness which
was used to tag object's engine specific data as dirty. Use generic recalc
flag in ObjectEngineData structure instead. This gives us the following
benefits;

- Sovles mentioned bug report.
- Avoids whole interface lookup for opened viewports for EVERY changed ID.
- Fixes missing updates when viewport is temporarily invisible.

Reviewers: dfelinto, fclem

Differential Revision: https://developer.blender.org/D3028
2018-01-29 17:54:20 +01:00
006c66b1ff Refactor object engine data storage
Main idea is to make specific engine types be a subclass of generic
ObjectEngineData structure.

This required following changes:

- Have extra size argument to engine data allocation function.

  Not sure whether there is less error-prone way of doing this.

- Add init() callback to engine data allocation function.

Additionally, added some extra checks to Eevee's engine data getters, so we do
not silently cast lamp data to lightprobe data.

Reviewers: dfelinto, fclem

Differential Revision: https://developer.blender.org/D3027
2018-01-29 17:53:51 +01:00
1eeb846e78 Fix Cycles viewport render not updating when tweaking displacement shader.
This was disabled to avoid updating the geometry every time when the
material includes displacement, because there was no way to distinguish
between surface shader and displacement updates.

As a solution, we now compute an MD5 hash of the nodes linked to the
displacement socket, and only update the mesh if that changes.

Differential Revision: https://developer.blender.org/D3018
2018-01-29 17:07:08 +01:00
fb941679bb Fix Cycles allocating too much device memory, after recent memory refactoring.
Spotted by Ha Hyung-jin, thanks!
2018-01-29 17:07:08 +01:00
282b3d0fcd Revert "Fix T53914: Volumetric scattering now goes correctly through transparent surfaces."
This reverts commit 3c852ba074. This is breaking
the regression tests, and maybe requires some deeper changes to really fix.
2018-01-29 17:07:08 +01:00
cebc7bb198 Fix nan problem in previous bevel commit.
For chains, access to g_prod[0] was undefined.
And two minor style (whitespace) changes.
2018-01-29 10:01:19 -05:00
263efb0b9a Depsgraph: Correction for previous fix
Original fix only worked when there is one custom property.
2018-01-29 15:06:44 +01:00
Dalai Felinto
d174f3bd60 Outliner: Remove Toggle options from object RMB
Task suggested by Pablo Vazquez (venomgfx).
2018-01-29 12:05:04 -02:00
68c1e3c28d Depsgraph: Fix missing update when property from proxy rig drives something 2018-01-29 14:53:27 +01:00
6eb2b57f5a Depsgraph: Disable labels on relations
This code was disable a while back and got re-enabled by some previous debug
process. Having relation names in dot file helps understanding what's going
on in one cases, but makes things spread too far away in others.
2018-01-29 14:45:45 +01:00
70286a7652 Depsgraph: Cleanup, line wraps 2018-01-29 14:43:12 +01:00
083f6af8f8 Fix more filebrowser not refreshing correctly after new message bus system.
This does not affect current blender2.8, but is mandatory for asset
engine branch.

Bottom line being, we also need to 'survey' changes in actual
SpaceFileBrowser struct, not only its FileSelectParams sub-struct.
2018-01-29 12:50:15 +01:00
c501855eb6 Fix filebrowser not refreshing correctly after new message bus system.
Generic ED_area_do_msg_notify_tag_refresh callback only tags area for
refresh, not redraw. This was not updating view e.g. when changing
ordering options in top region, until you'd mouse-over main filelisting
region...

So now, always tag area for redraw in filbrowser's refresh callback.
2018-01-29 10:24:30 +01:00
be0b2ac18b Manipulator: ignore mouse location w/ view widgets
When pressing on a button to zoom for eg,
using zoom-to-mouse-position doesn't make any sense.

There is also zoom speed scaling which increases the closer the cursor
is to the top-edge of the screen, which was noticable since the
navigation widget is currently at the top of the screen.
2018-01-29 17:40:19 +11:00
da885b922c Merge branch 'master' into blender2.8 2018-01-29 17:32:20 +11:00
45fdea48c1 Fix T53614: New Depsgraph ignores NLA strips
The new depsgraph was only considering the active action
when attaching relations from the AnimData component/operation
to the properties that are affected by the animation data.
As a result, only properties animated by the active action
were working, while those animated by NLA strips did not change
when playing back/scrubbing the timeline.

This commit fixes this introducing a recursive method to properly
visit all NLA strips, and calling DepsRelBuilder::build_animdata_curves_targets()
on each of those strips.
2018-01-29 19:01:59 +13:00
79639ccd6b 3D View: use_mouse_init for zoom & trackball orbit 2018-01-29 17:01:51 +11:00
961602f7ae Cleanup: move boolean options into flag
- Rename eViewOpsOrbit to eViewOpsFlag
  since VIEWOPS_ORBIT_DEPTH isn't just used for orbiting.
- Move use_ensure_persp & use_mouse_init into the flag.
- Remove viewops_data_create_ex.
2018-01-29 15:38:37 +11:00
64888eabfd Fix: Disable leftover debug prints from earlier work on the rna path renaming/fixing code 2018-01-29 17:22:03 +13:00
d13b943853 Fix T53909: Joining armatures did not remap names on merged action data
Technically this was not a bug, as this functionality was not meant to
work. (Drivers were already handled though, as they are part of the rig)
It was assumed that there was little value in having this functionality
available, as in most pipelines, animation production only begins after
the rig has been locked down (see bug report comments for more details).

On reflection, in most common situations, there's probably no harm in
doing these rna path fixups. This commit takes advantage of some similar
code I recently put in place in the Grease Pencil branch (for joining GP
objects and their layers).

Important Note for Animators/Riggers/TD's:
Please be aware that after joining armatures, some of the animation may
still need to be redone (due to changes in the transform hierarchies/
transform spaces that the animation is applied in). We do not attempt
to correct for these problems, and it is unlikely that we will in future.
2018-01-29 17:22:03 +13:00
5dd5286995 Apply Pose as Rest Pose: Bendy Bone support
The "Apply Pose as Rest Pose" operator now affects Bendy Bone settings
too, making it possible to use interactive posing tools (e.g. Pose Sculpting
brushes) to get the desired shape for the rest-pose shape of Bendy Bones.
When such posing tools are available, this change makes it easier to get
the desired Bendy Bone shapes, as you are no longer restricted to using
buttons to get the desired effects.
2018-01-29 17:22:02 +13:00
5b67a7a2e7 Cleanup: rename user preference flags
USER_ZBUF_ORBIT -> USER_DEPTH_NAVIGATE
The name didn't make sense since it's used for all view navigation.

Also rename USER_ZBUF_CURSOR -> USER_DEPTH_CURSOR since zbuf
is an internal detail.
2018-01-29 15:07:43 +11:00
42a8799efa Cleanup: comments & whitespace 2018-01-29 14:59:56 +11:00
ca116153fa Cleanup: ViewOpsData struct members
- Group initial/previous/current members
  Was using terms old/prev/last/orig in confusing way.
- Replace x,y variables with vectors.
- Remove unused members.
2018-01-29 14:42:50 +11:00
902198a117 3D View: internal option not to use mouse location
When accessing view-port operators from widgets
we need the ability not to use auto-depth or zoom-to-mouse.

Trackball rotation still needs to be supported.
2018-01-29 13:56:35 +11:00
5964c34f8c Cleanup: minor simplification for zoom/dolly
Make args more consistent.
2018-01-29 13:42:28 +11:00
02832c4ca1 Cleanup: de-duplicate common 3D view properties 2018-01-29 13:26:35 +11:00
561d738eaa Fix T53459, inconsistent bevel on identical edges.
The old algorithm depended on vertex order.
The new one uses a global least squares solution on chains
and cycles of edges where loop slide induces a dependency.

See https://wiki.blender.org/index.php/Dev:Source/Modeling/Bevel
in the "Consistent Widths for Even Bevels" for derivation of
the new algorithm.
2018-01-28 19:19:02 -05:00
045f3bda64 Merge branch 'master' into blender2.8 2018-01-28 17:49:58 +01:00
d099b1073b Usual i18n/UI messages fixes. 2018-01-28 17:27:53 +01:00
dfbe415372 Merge branch 'master' into blender2.8 2018-01-28 17:18:56 +11:00
bff1dae767 Cleanup: style, spelling 2018-01-28 17:00:39 +11:00
1c905046d1 Merge branch 'master' into blender2.8 2018-01-28 16:40:23 +11:00
d386d4e7c4 Cleanup: use doxy sections for view3d_view.c
Also move ..._needs_opengl functions into view3d_utils.c
2018-01-28 16:29:32 +11:00
9a5d198cd2 Use factory startup for icon generation
Avoids using local preferences.
2018-01-28 16:03:32 +11:00
87215bbae4 Merge branch 'master' into blender2.8 2018-01-28 15:58:11 +11:00
88174bd22c Merge branch 'master' into blender2.8 2018-01-28 15:18:33 +11:00
7aaede920f Cleanup: warning 2018-01-28 15:15:32 +11:00
1164a70634 Cleanup: move 3D view utilities into own file
Operators and utility functions were getting too mixed up,
the files were also quite large.
2018-01-28 15:01:35 +11:00
Stefan Werner
3c852ba074 Fix T53914: Volumetric scattering now goes correctly through transparent surfaces.
There was a check for volume bounces at every surface intersection. That could lead to a volume scattered path being terminated
when passing through a transparent surface. This check was superfluous, as the volume shader evaluation already checks the
number of volume bounces and once it passes the max, volume shaders will not return scatter events any more.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: brecht, #cycles

Tags: #cycles

Maniphest Tasks: T53914

Differential Revision: https://developer.blender.org/D3024
2018-01-27 21:39:19 +01:00
3cc8b35699 Speed up a little drawing of UVs in the Image Editor
In my tests the previous loop was running in 200 ms. With this change it now runs in 17 ms.

The difference in the end is still not great because the `draw_uvs_lineloop_bmface` function is called for each face and has an ImmBegin and ImmEnd in the function itself
2018-01-26 20:42:30 -02:00
7b29e91711 Code refactor: make mixed small/large BSSRDF radii more robust. 2018-01-26 23:06:53 +01:00
Dalai Felinto
492145f8ac Collections: As it turned out, this is quite harmless to have accessible everwhere
I think ultimately we may move these operators from the outliner space to scene.

Partial revert of a08f687b91.
2018-01-26 19:42:42 -02:00
Dalai Felinto
6634eb3490 Make outliner new collection operator work via viewport too
Technically this revert b3bcbc9e85. This however doesn't seem to be needed
any longer.
2018-01-26 19:37:08 -02:00
Dalai Felinto
5798345c99 Outliner: If a collection is empty and you drag something inside it, it opens up.
Idea by Pablo Vazquez.
2018-01-26 17:10:31 -02:00
d611cf9233 Fix mixed BSDF + BSSRDF sampling bug in path tracing, after 095a01a73a.
Spotted by Ha Hyung-jin, thanks!
2018-01-26 18:47:21 +01:00
ce4915cddb Code refactor: store RGB BSSRDF in a single closure.
Previously we stored each color channel in a single closure, which was
convenient for sampling a closure and channel together. But this doesn't
work so well for algorithms where we want to render multiple color
channels together.
2018-01-26 18:47:21 +01:00
47a3bbcc34 IMB: Add asserts that returned fps and fps base are strictly positives.
Forgot to add that in previous commit, also related to T53003.
2018-01-26 15:14:32 +01:00
567afcca20 Related to T53003: tweak scene fps range.
Move restricted 'reasonable' range to ui_range, and allow wider values
for manual settings.
2018-01-26 15:12:18 +01:00
c528b9b777 Fix T53003: IMB: Invalid framerate handling due to short integer overflow.
FFMPEG uses int for the numerator, while Blender uses a short. So in
cases people gave weird exotic framerate values and we cannot reduce
enough the numerator, we'd get totally weird values (even negative frame
rates sometimes!)

Now we add checks for short overflow and approximate as best as possible
in that case (error should not matter unless you have shots of at least
several hundreds of hours ;) ).
2018-01-26 14:59:16 +01:00
376fc19b24 fix:T53271 now using the context scene layer as requested 2018-01-26 13:37:45 +01:00
Dalai Felinto
f71d8f6b48 Fix Collada importer (crash)
We were not tagging depsgraph to update its nodes after importing new objects.
2018-01-26 09:16:31 -02:00
Dalai Felinto
0e2bc1a4ac Make object_update comment about lack of ID even more clear 2018-01-26 09:15:56 -02:00
Dalai Felinto
ab77363619 Fix silly crash on Collada
Note: This was originally wrongly committed together with an outliner tooltip
fix, re-committing separately now. See bd7060a87f.
2018-01-26 08:45:27 -02:00
Dalai Felinto
de079abfbd Outliner tooltips: Small refactor, future proof change
In the future we may have siblings to collections (like overrides) that are not
collections. This change make sure tooltips will keep working.

Note: This was originally wrongly committed together with a Collada fix,
re-committing separately now. See bd7060a87f.
2018-01-26 08:45:20 -02:00
Dalai Felinto
13238ee991 Revert "Fix crash on Collada exporter"
This reverts commit bd7060a87f.

I mixed two commits together (a fixup for outliner tooltips and a collada fix).
Re-committing them individually.
2018-01-26 08:43:17 -02:00
Dalai Felinto
bd7060a87f Fix crash on Collada exporter 2018-01-26 08:38:46 -02:00
Dalai Felinto
16a3ae580c Outliner: Tooltips for reorder operators
I really would prefer if we were to use the dropbox API for this.
That said, we now have some tooltips that work.

I'm using the new draw callback draw API for outliner tooltips.

Reviewers: mont29

Subscribers: venomgfx, mano-wii, Severin

Differential Revision: https://developer.blender.org/D3020
2018-01-26 08:22:28 -02:00
009ce8f3f4 Fix harmlness RNA warning in image texture node drawing. 2018-01-26 08:41:20 +01:00
c4a4d20d3d Fix part of T53080: all material previews re-rendering after undo.
This reverts commit dc2617130b, which disabled
writing of previews for undo. While this uses some memory, re-rendering all
previews is very expensive, especially if for example you have lots of materials
using high-res image textures.
2018-01-26 08:41:19 +01:00
848f0c5b5b Code cleanup: simpler and faster detection of BVH refit. 2018-01-26 08:41:19 +01:00
22afe88882 Fix navmesh creation w/ multiple objects
D2976 by @dertom
2018-01-26 13:10:02 +11:00
19b1b45d71 make_quickie: replace os.system w/ subprocess.call 2018-01-26 12:53:42 +11:00
9b96dd0f61 icon update: replace os.system w/ subprocess.check_call 2018-01-26 12:46:10 +11:00
0f14c72c29 project_info: replace os.system w/ subprocess.check_call 2018-01-26 12:38:07 +11:00
7980265e7e Tests: replace os.system w/ subprocess.call
Saves on process creation and avoids
being tripped up by command line parsing.

Based on D2967 by @ldo with edits.
2018-01-26 12:23:15 +11:00
65d40b3eeb Docs: invoke_search_popup uses bl_property
Also add code example in docs.
2018-01-26 11:52:01 +11:00
Dalai Felinto
5b67f7a959 Outliner: Implement Add (Ctrl) when moving objects inside collection
Note there is no "text" explaining to users what is going on.
I will address this shortly in an upcoming commit.
2018-01-25 19:26:11 -02:00
Dalai Felinto
7e885e1e10 Layer: Update outdated code comment 2018-01-25 17:50:25 -02:00
Dalai Felinto
748adb37e5 Merge remote-tracking branch 'origin/master' into blender2.8 2018-01-25 11:31:54 -02:00
da4c3f30d9 Cycles: rename displacement methods, default to displace, tweak panel layout.
Differential Revision: https://developer.blender.org/D3019
2018-01-25 14:25:21 +01:00
176c0c96c2 Fix T53874: OpenGL render problem with OpenEXR in 2.8 with float buffers. 2018-01-25 14:25:17 +01:00
Dalai Felinto
e057d7b9eb No need to tag depsgraph id when dropping objects from the outliner
As done by c42fc19a8a - this was needed originally because notifiers were
not working so I had to force tagging.

And for the records, I should have used DEG_TAG_BASE_FLAGS_UPDATE instead of 0.
2018-01-25 11:14:13 -02:00
Dalai Felinto
6743308e59 Fix Eevee error message
That said, this should be informed to the user, not printed in the console.
2018-01-25 10:59:41 -02:00
Dalai Felinto
43b0e61408 Fix missing broken notifiers
We can't have more than one NOTE_SUBTYPE in the same notifier.
Instead of calling both subtypes the code end up not calling either.
2018-01-25 10:10:58 -02:00
Dalai Felinto
c42fc19a8a Fix crash when drag&drop invisible object from outliner to viewport
This is not the issue actually mentioned there. However it is the most serious
one.

Now if the object being dragged was not in a collection linked in the viewlayer
or invisible, we add it to the active collection (or create one if necessary).

This is related to T50967, which is now fully fixed.
2018-01-25 10:00:05 -02:00
Dalai Felinto
10f92f299e Merge remote-tracking branch 'origin/master' into blender2.8 2018-01-25 09:55:59 -02:00
Dalai Felinto
8e341633e9 Fix T50967: When you move an icon from the outliner area object doesn't show up
We can't have more than one NOTE_SUBTYPE in the same notifier.

This is a partial revert of: cd4d5dcb46. In particular to the part concerning
"Also fixed a missing notifier of the object instancing operator".

Not only this was mixed with the original reason for the commit for no reason,
but it actually introduced a bug. Bad, bad developers ;)

Note: Although this commit is not needed for master, blender2.8 requires it for
the forementioned bug report.
2018-01-25 09:52:24 -02:00
5836293990 Merge branch 'master' into blender2.8 2018-01-25 22:20:27 +11:00
2d46ea52cd WM: comments on wmTooltipState struct 2018-01-25 21:52:40 +11:00
7d66925c73 WM: NULL check for recent tooltip change
Caused crash dragging boolean buttons.
2018-01-25 21:52:40 +11:00
fd4d7fbf13 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/library_remap.c
2018-01-25 10:15:31 +01:00
566eb60d81 Fix T53363: Blender won't update mesh's usercount when deleting object datablocks in Editmode.
Only do special handling of ob->data pointer in case we are remapping to
a valid (non-NULL) other obdata. Otherwise, handle it as any other
'remapping to NULL' case.

Hopefully not breaking anything else...
2018-01-25 10:11:12 +01:00
38dafd5f44 Merge branch 'master' into blender2.8 2018-01-25 16:32:43 +11:00
693b41eb17 UI: change tool-tips to be stored in the screen
Move timer and tip out of button code,
now the only requests a tooltip,
passing a creation callback to run.

Needed for manipulators in 2.8,
also helps de-duplicate logic - since we never want
multiple tool-tips showing at once.
2018-01-25 16:22:21 +11:00
032129ef35 Merge branch 'master' into blender2.8 2018-01-25 10:31:37 +11:00
9b32248894 Cleanup: correct ATTR_NONNULL use 2018-01-25 10:21:31 +11:00
9560c57e0b Fix T53874: more cases of OpenGL render to OpenEXR not working after recent changes. 2018-01-24 15:56:09 +01:00
bbc562fc69 Fix T53593: sculpt brush rake spacing bug after recent bugfix. 2018-01-24 15:56:09 +01:00
ca088a7b12 Fix T53115: Memleak with instanced groups and Cycles
The issue was caused by Cycles allocating ID property in a temporary object
which gets overwritten and thrown away every so often.

Now dependency graph will try to reliably check whether ID properties from
a temp object are to be freed.
2018-01-24 15:46:34 +01:00
9f713ec962 Depsgraph: Cleanup, line wrap 2018-01-24 15:34:33 +01:00
9c493ca378 Depsgraph: Add missing synchronize code to scene
The issue here is that we can not duplicate the whole datablock since we
use view layer pointers in depsgraph callbacks.

Maybe this whole chunk of code belongs to somewhere else, or maybe we
can find a smart solution to avoid need of CoW pointers passed to the
evaluation functions.

This fixes lack of viewport update when toggling collection enabled flag.
2018-01-24 15:04:46 +01:00
56a336196d Add utility function to reset ID property value to a given one
This is similar to idproperty_reset() defined in layer.c, but it does not
re-alloc property itself.

We should replace idproperty_reset() with IDP_Reset() now.
2018-01-24 15:04:46 +01:00
90768c9b68 Manipulator: icon highlight could be darker
Use color and highlight from theme.
2018-01-25 00:47:01 +11:00
992ac8f942 Fix for fix w/ GPU_batch_wire_from_poly_2d_encoded
Was missing first edge
2018-01-25 00:47:01 +11:00
c0ddbf39c4 Fix T53646: Blender 2.8 multiple crashes in auto UVs generation
Make sure scene and view_layer set for depsgraph before running editors
update. This is required since tagging might happen before we created depsgraph.
2018-01-24 14:00:49 +01:00
a47a7f2a7b Manipulator: add show_drag option for 2d buttons
Needed so 3d navigation buttons can show show drag cursor
only for buttons with modal operators.
2018-01-24 23:29:17 +11:00
d8b5b4b7b1 Fix bug in view navigation icons
Own error in GPU_batch_wire_from_poly_2d_encoded
Wasn't correctly filling in the VBO with edges.
2018-01-24 22:58:02 +11:00
6a65fc3456 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/modifiers/intern/MOD_wireframe.c
2018-01-24 12:14:59 +01:00
752fc35fa1 Depsgraph: Fix crash entering edit mode with CoW enabled
The issue was caused by some incompatibility of new API which expects ID block
to be specified explicitly, while old code is tagging object's data using
object's ID with OB_RECALC_DATA flag.

We need to switch all areas to give proper ID and everything, but for until
then we'd better stop crashing.
2018-01-24 11:46:54 +01:00
e68771fa87 Cleanup: MOD_wireframe: remove useless isDisabled callback. 2018-01-24 11:22:35 +01:00
a55a4818d6 Fix (unreported) missing feature in ccgdm pbvh generator.
Compared to usual cddm one, ccgdm one was not applying the
ob->derivedDeform deformation to the pbvh generated from the
original mesh geometry, when possible.
2018-01-24 11:22:35 +01:00
ad046efa79 Fix T53551: Weight paint crash when subsurf modifier is not first (master not 2.79).
We can only support painting from subsurf DM in a limited subset of
cases, others (like multiple subsurf, or topology-modyfying ones,
break mapping to original geometry).

This is not the most ideal fix (ideally, we should always be able to get
a mapping to original geometry from any point in modifiers stack...).
2018-01-24 11:22:35 +01:00
9112cceb5e BKE's modifier_isEnabled: add check on NULL Scene pointer.
We do not always have that one available, and even without the
isDisabled callback this func is helpful.

Note that this is a bot stupid, only modifier actually needing a valid
Scene pointer here is subsurf... :|
2018-01-24 11:22:35 +01:00
3e20ac8df3 Fix T53874: OpenGL render to OpenEXR not working after recent changes.
Multilayer EXR also failed already in 2.79 for Sequencer and OpenGL rendering.
Now we revert to single layer OpenEXR in that case.
2018-01-24 11:07:06 +01:00
fe18d9ba11 Depsgraph: Fix evaluaiton order with nested animation and copy on write
It is possible to have animation (or driver) to modify nested datablock, such
as shape key value for example (where animation is on Mesh level, but shape key
is it's own datablock). To deal with such cases we need to create relation
from nested datablock CoW to animaiton/driver operation.
2018-01-24 11:00:37 +01:00
bf8f7304e0 Fix T53878: Cycles bug rendering multiple render layers with different passes.
This was caused by recent pass refactoring from f78e963.
2018-01-24 10:57:32 +01:00
eb7d251cd7 Fix Cycles GLSL bump not matching final render after recent changes. 2018-01-24 10:57:32 +01:00
68284785e5 Cleanup: typo 2018-01-24 18:23:53 +11:00
b9dbd5e85e Manipulators: disable 3D widgets w/ animation
Workaround for T53078.
2018-01-24 18:23:49 +11:00
0ff968eaf5 Fix Cycles inserting displacement node when there is a custom node setup instead. 2018-01-24 07:15:22 +01:00
1686baa7f2 Fix "GPUTexture: texture alloc failed. Not enough Video Memory." in area resizing
`gpu_texture_try_alloc` invalidates zero-sized textures.
The message in the console is not correct in this case (because it is not due to lack of memory).
2018-01-23 22:50:05 -02:00
7389bfdeb0 Merge branch 'master' into blender2.8 2018-01-24 11:45:34 +11:00
bd5696f857 CMake: store icon names
Without this, adding/removing icons wouldn't force cmake to re-run
making builds fail.

This is the same issue with globbing source code.
2018-01-24 11:32:58 +11:00
Dalai Felinto
e6064b412a Fix object mode/edit mode panels not visible in collections
This was broken since e8c15e0ed1. When object_mode moved from
workspace to window.
2018-01-23 16:05:30 -02:00
Dalai Felinto
6249c59609 Greasepencil icons
Note this comes from the greasepencil-object branch, and are merged to help
preventing future merge conflicts.

Also, I renamed the icons for consistency sake. So when this is merged in 2.8
other areas of the code will need to change.

Icons by Matias Mendiola
2018-01-23 12:01:21 -02:00
Dalai Felinto
173f90c700 Revert "Grease-Pencil: Icons"
This reverts commits:

* f0ef360386 Grease-Pencil: Icons from the grease pencil branch
* 13bf4b3804 Grease-Pencil: Fixup for icons
* fb8c382fa1 Grease Pencil dat files fix
2018-01-23 12:01:21 -02:00
41945fcfe4 Cleanup: some ED_view3d functions used uppercase D 2018-01-23 23:37:55 +11:00
41cc2ae626 Merge branch 'master' into blender2.8 2018-01-23 13:19:32 +01:00
4a3ddd8a7a Fix Cycles assert when resizing rendererd viewport. 2018-01-23 13:07:25 +01:00
b129ea843a Cycles: change material output displacement to vector.
Previously only scalar displacement along the normal was supported,
now displacement can go in any direction. For backwards compatibility,
a Displacement node will be automatically inserted in existing files.

This will make it possible to support vector displacement maps in the
future. It's already possible to use them to some extent, but requires
a manual shader node setup. For tangent space maps the right tangent
may also not be available yet, depends on the map.

Differential Revision: https://developer.blender.org/D3015
2018-01-23 12:49:35 +01:00
4a5ee1a5a2 Cycles: add Displacement node.
This converts object space height to world space displacement, to be
linked to the new vector displacement material output.

Differential Revision: https://developer.blender.org/D3015
2018-01-23 11:12:26 +01:00
2838cf0dfe Fix T53854: branched path tracing correlation bug with transparency in split kernel. 2018-01-23 11:11:48 +01:00
4ebcdff873 Merge branch 'master' into blender2.8 2018-01-23 20:04:54 +11:00
9466f8f531 Cleanup: use doxygen groups for view3d_edit.c 2018-01-23 19:48:49 +11:00
f6dc7a7cf3 Cleanup: code comment for view3d_viewmatrix_set 2018-01-23 17:36:51 +11:00
41e930ac66 Cleanup: CMake whitespace 2018-01-23 17:25:09 +11:00
8181e4c812 Manipulator: limit UI for locked views 2018-01-23 17:11:13 +11:00
e679f472ed Cleanup: avoid passing bContext to cameracontrol 2018-01-23 15:19:53 +11:00
3a712632f5 Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/editors/screen/screen_ops.c
2018-01-23 01:00:16 -02:00
1c98fbf982 Merge branch 'master' into blender2.8 2018-01-23 12:18:46 +11:00
1443235aa4 Cleanup: sync w/ blender2.8 branch
Also make some args const
2018-01-23 12:14:26 +11:00
85ca39ec4b Fix screen split refresh issues
`Ctrl` (enable snapping) ans `TAB` (Switching direction) didn't refresh.
2018-01-22 23:07:36 -02:00
fc1fd2704a Merge branch 'master' into blender2.8 2018-01-23 11:45:39 +11:00
367e611179 Merge branch 'master' into blender2.8 2018-01-23 11:24:44 +11:00
bf7e406766 Cycles: Fix optimal BVH selection. 2018-01-22 14:52:09 -07:00
Dalai Felinto
fb8c382fa1 Grease Pencil dat files fix
The ones I previously commited were done with Inkspace 0.92.2
But apparently this renders some parts of the icons transparent.

For example, the tip of the new grease pencil pencil icon.
2018-01-22 15:33:20 -02:00
Dalai Felinto
13bf4b3804 Grease-Pencil: Fixup for icons
I tried to cleanup the .svg but I overdid it a bit
2018-01-22 15:12:12 -02:00
Dalai Felinto
f0ef360386 Grease-Pencil: Icons from the grease pencil branch 2018-01-22 14:37:50 -02:00
2f79d1c058 Cycles: Replace use_qbvh boolean flag with an enum-based property
This was we can introduce other types of BVH, for example, wider ones, without
causing too much mess around boolean flags.

Thoughs:

- Ideally device info should probably return bitflag of what BVH types it
  supports.

  It is possible to implement based on simple logic in device/ and mesh.cpp,
  rest of the changes will stay the same.

- Not happy with workarounds in util_debug and duplicated enum in kernel.
  Maybe enbum should be stores in kernel, but then it's kind of weird to include
  kernel types from utils. Soudns some cyclkic dependency.

Reviewers: brecht, maxim_d33

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3011
2018-01-22 17:19:20 +01:00
Dalai Felinto
0a622c6dd6 Collections/Layer cleanup: Remove placeholder for de/select objects
No need for placeholders bloating the source code. They can come back once
we decide to implement them.
2018-01-22 12:43:24 -02:00
Dalai Felinto
7628961391 Collections/Layer cleanup: Remove all reference to filter objects
This was not implemented yet. So it's a bit pointless to have all this
placeholder code around without any functionality coming out of it.
2018-01-22 12:43:19 -02:00
Dalai Felinto
8e5f433554 Collections/Layer cleanup: Remove TODO_LAYER_OVERRIDE from most places
This was originally a good idea. However we will need to pay special attention
to this when doing the dynamic overrides anyways. The placeholders won't be
enough to spare us that job.

That said I left the ones on layer.c because we are actually calling these
BKE_override_*_add() functions from doversion, yet they don't do anything.
2018-01-22 12:43:09 -02:00
Philippe Schmid
48fb7e9635 T53831: Fixed vertical line alignment & expand Collection and Scene buttons position.
This was fixed in master with commit 9d873fc3de. However, this fix never made it to 2.8.
(The following merge (a96008f3aa) did not import the fixes.)

Note: This fix is ment to fix the alignment problem.
I don't know if other parts of the code not merged are interesting or not.

But if they are, they should be tackled separately.

Reviewers: dfelinto

Subscribers: venomgfx, dfelinto, raa, Severin

Differential Revision: https://developer.blender.org/D3014
2018-01-22 12:08:30 -02:00
Dalai Felinto
0f69026b1c Fix windows building (log10)
Error: math_base_inline.c(402): error C2668: 'log10' : ambiguous call to
overloaded function
2018-01-22 11:37:19 -02:00
51da664fa1 Fix broken merge in fb45821, was missing changes from cc64872. 2018-01-22 14:28:43 +01:00
8a2d09eb9f Fix T53854: branched path tracing correlation bug with transparency.
This was broken in d750d18.
2018-01-22 14:02:58 +01:00
b06bd20a6b Cycles: Cleanup, remove unused argument 2018-01-22 10:59:14 +01:00
fb4582134a Fix T53850: Lock to Cursor breaks 3D manipulators 2018-01-22 20:14:12 +11:00
f7c812e199 Merge branch 'master' into blender2.8 2018-01-22 14:14:33 +11:00
c723e91ee1 WM: add mouse-move after smooth-view
When hot-spots moved under the pointer,
clicking wouldn't activate the correct item.
2018-01-22 14:09:17 +11:00
ebbed57bef Manipulator: draw all rules while dragging 2018-01-22 13:52:45 +11:00
759aaad0f3 Cleanup: commends
Avoid copy-pasting same comments.
2018-01-22 11:32:03 +11:00
d629f2a8a3 Cleanup: reuse camera frame arrays
Use GWN_vertbuf_raw_step in a loop for less verbose vbo creation.
2018-01-22 11:28:34 +11:00
809dc17254 Merge branch 'master' into blender2.8 2018-01-22 10:42:42 +11:00
9211a4acf8 Fix linking error when compiling without clay engine 2018-01-22 00:19:38 +01:00
13715adc09 DRW: Object Mode: Fix bad camera display in camera view
This fix T53485 : Ortho cameras display frame when in camera view
2018-01-22 00:14:28 +01:00
56fc812d1e Fix manual lookups (data is now lowercase) 2018-01-22 10:00:40 +11:00
d9c962a367 Fix T53843: Error opening online manual 2018-01-22 10:00:40 +11:00
a841e65b85 Cleanup: unused var 2018-01-22 10:00:40 +11:00
777e1d358a Eevee: Probes: Add support for intensity tweak.
This works for grid and cubemaps.

The intensity is baked into the map itself. Thus you need to refresh/rebake the probe to see the changes.
2018-01-21 23:16:59 +01:00
73a1bf1a80 Eevee: Fix grid lighting disappearing when adding a new cubemap probe. 2018-01-21 23:16:59 +01:00
bdfd9a11e8 Clay: Performance: Disable AO codepath if not necessary.
This optimisation only works if no material in the scene require the AO pass.
For this either set the AO distance to 0 or both Cavity and Edges factors to 0.

This double the performance of scenes with very high triangle count.
2018-01-21 23:16:59 +01:00
6700ee9855 DRW: Make the lamp widgets lines stippled. 2018-01-21 23:16:59 +01:00
b2c81c5d43 DRW: Remove unused material uniforms.
This might have some consequences but in my testing I did not found any.
2018-01-21 23:16:59 +01:00
e82616aea6 Eevee: SSR: Optimize the AO out when not enabled. 2018-01-21 23:16:59 +01:00
a507c251b2 Eevee: Put all constant uniforms in a global UBO.
This is an optimization / cleanup commit.

The use of a global ubo remove lots of uniform lookups and only transfert data when needed.

Lots of renaming for more consistent codestyle.
2018-01-21 23:16:59 +01:00
790025c01e Merge branch 'master' into blender2.8
# Conflicts:
#	intern/cycles/blender/blender_mesh.cpp
#	source/blender/editors/screen/screen_ops.c
#	source/blender/editors/space_view3d/drawobject.c
2018-01-21 18:45:47 -02:00
8d671f6f65 Update description of the screen_draw functions 2018-01-21 18:22:39 -02:00
46267fe7bf WM: Fix snapping on split area without preview
In addition to removing unnecessary variables and `tag_redraw` whenever the factor changes;
2018-01-21 18:18:38 -02:00
cc64872b88 Fix T49159: missing Cycles tangents for adaptive subdivision. 2018-01-21 15:43:59 +01:00
e767d21b74 Cleanup: BLI_kdopbvh avoid negative array access
It's harder to reason about array access with negative indices.
2018-01-21 20:17:29 +11:00
a7dc5e12ac Cleanup: style 2018-01-21 11:41:52 +11:00
e53447c137 Fix old files with changed node socket type not loading correctly.
This would lead to sock.default_value pointing to the wrong data type,
possibly causing crashes. Unfortunately, this bug will still exist for
older Blender versions that try to load newer files, which makes
changing the type of a node socket problematic.
2018-01-20 22:42:59 +01:00
99efebd2dd Merge branch 'master' into blender2.8 2018-01-21 01:47:49 +11:00
dd35048602 Cleanup: doxy groups for screen_ops.c 2018-01-21 01:41:58 +11:00
a177d64213 Merge branch 'master' into blender2.8 2018-01-21 00:55:08 +11:00
949e56dff1 Fix screen split preview refresh issues
Switching direction didn't refresh, also cursors were flipped.
2018-01-21 00:41:48 +11:00
da53eb3748 Manipulator: tweak shape drawing
Draw triangles over wire for a more subtle outline.
2018-01-20 19:41:41 +11:00
a3716f5945 GPU_batch: Add GPU_batch_wire_from_poly_2d_encoded
Draws wire around polygon shapes:
better visibility w/ any background color.
2018-01-20 18:45:27 +11:00
Dalai Felinto
e969ac6413 Fix collections names no longer unique when moved around
We were not checking for uniqueness after moving. And in some cases the new
siblings of our collection may have conflicting names.
2018-01-19 18:44:11 -02:00
Dalai Felinto
4dfccf8b7f Collections: Fix for auto-named children when parent name is MAX_NAME
Reported via IRC by Vuk Gardašević (lijenstina).
2018-01-19 17:24:35 -02:00
Dalai Felinto
244fb3ebe0 Merge remote-tracking branch 'origin/master' into blender2.8 2018-01-19 17:06:32 -02:00
Dalai Felinto
431d5772bb Fixup for integer digits commit 2018-01-19 17:04:19 -02:00
Dalai Felinto
4d0bb7de64 Merge remote-tracking branch 'origin/master' into blender2.8 2018-01-19 17:01:48 -02:00
Dalai Felinto
075def8fbd Util function to determine number of digits from an integer 2018-01-19 16:54:07 -02:00
Dalai Felinto
efe1af3d11 Outliner: Remove User Preferences
This was introduced to the outliner when we had no User Preference
window back in 2.5x. Right now it makes no sense to keep this around.

But how about addon user preferences:
* They belong in the user preference window under the addon.

How about the user preferences themselves:
* You find them in the user preference window.

And templates?
* Why are they here in the first place?

After talking to Pablo Vazquez (who in turn poked Sergey Sharybin) we found
it reasonable to get rid of this. If it turns out that we were wrong we
revert this.

As for leaving this exposed as a debug option (as suggested on IRC) I would say
no, please. This end up polluting the code and never cleaned up in the end.
(this was specific talking about templates).

Technical note: I left the functions in outliner still hanging around.
While I used UNUSED_FUNCTION for one of them, for the other one I had to use:
`#if 0` because the function was calling itself, which would fail to build if
I used UNUSED_FUNCTION.
2018-01-19 16:06:14 -02:00
fa91b43e8c Cycles: Make it more proper check on vectorization flags from DebugFlags
Mimics to checks in system_cpu_support() checks.
2018-01-19 15:48:42 +01:00
Dalai Felinto
d9858d5897 Merge remote-tracking branch 'origin/master' into blender2.8 2018-01-19 12:46:23 -02:00
Dalai Felinto
edf053ff63 Outliner Python UI cleanup: remove KEYMAPS
This was removed since 2013 (ef765b3606). It should have been removed back
then from the UI file too.
2018-01-19 12:45:57 -02:00
Dalai Felinto
7866870a9a Outliner: Fix unparenting poll (when drag'n'droping an object) 2018-01-19 12:28:16 -02:00
ccec1e7667 Cycles: Cleanup, stop using debug flags in system utilities
Debug flags are to be controlling render behavior, nothing to do with low level
system utilities.

it was simple to hack, but logically is wrong. Lets do things where they are
supposed to be done!
2018-01-19 15:22:32 +01:00
54632dc830 Cycles: Remove util_debug include from kernel code
Not sure why it was in there, all the debug flags stuff is to be handled outside
of kernel.
2018-01-19 15:21:34 +01:00
8e1dd7ed81 Cycles: Remove unneeded include statements
Also try to move them from headers to implementation files as much as possible.
2018-01-19 15:19:45 +01:00
Dalai Felinto
db9f0527e8 Outliner: Change All Scenes to Scenes and make it focus on compositing
We have different ways of explore the scene objects, namely View Layer and
Collections. This change let us focus on compositing elements only such as:

* View Layers
** Collections
** Render Passes
* Freestyle
* Grease Pencil?

Not included in this commit is an option to handle filtering of
collections passes, ... Not sure if we would like, though.
Since they are all properly nested under a "Collections" / "Passes"
parent.
2018-01-19 12:13:40 -02:00
Dalai Felinto
37913cf532 Outliner Filtering System + Cleanup
User notes:

The outliner so far was a great system to handle the object oriented workflow
we had in Blender prior to 2.8. However with the introduction of collections
the bloated ammount of data we were exposed at a given time was eventually
getting on the way of fully utilizing the outliner to manage collections and
their objects.

We hope that with this filtering system the user can put together the outliner
with whichever options he or she seem fit for a given task.

Features:
* Collection filter: In case users are only focused on objects.
* Object filter: Allow users to focus on collections only.
* (Object) content filter: Modifiers, mesh, contrainst, materials, ...
* (Object) children filter: Hide object children [1].
* Object State (visible, active, selected).
* Compact header: hide search options under a search toggle.
* Preserve scrolling position before/after filtering [2].

[1] - Note we still need to be able to tell if a children of an object is in a
      collection, or if the parent object is the only one in the collection.
      This in fact was one of the first motivations for this patch. But it is to
      be addressed separately now that we can at least hide children away.

[2] - We look at the top-most collection in the outliner, and try to find it again
      after the filtering and make sure it is in the same position as before.
      This works nice now. But to work REALLY, REALLY nice we need to also store
      the previous filter options to be sure the element we try to keep on top
      was valid for both old and new filters. I would rather do this later though
      since this smell a lot like feature creeping ;)

Remove no longer needed display options:
 * Current Scene (replaced by View Layer/Collections)
 * Visible (replaced by filter)
 * Selected (same)
 * Active (same)
 * Same Type (same-ish)

How about All Scenes? I have a patch that will come next to replace the current
behaviour and focus only on compositing. So basically stop showing the objects
and show only view layers, their passes and collections, besides freestyle.

Also, while at this I'm also reorganizing the menu to keep View Layer and
Collections on top.

Developer notes:

* Unlike the per-object filtering, for collections we need to filter at tree
creation time, to prevent duplication of objects in the outliner.

Acknowledgements:

Thanks Pablo Vazquez for helping testing, thinking some design questions
together and pushing this to its final polished state as you see here.

Thanks Sergey Sharybin and Julian Eisel for code review. Julian couldn't do a
final review pass after I addressed his concerns. So blame is on me for any
issue I may be introducing here. Sergey was the author of the "preserve
scrolling position" idea. I'm happy with how it is working, thank you.

Reviewers: sergey, Severin, venomgfx
Subscribers: lichtwerk, duarteframos

Differential Revision: https://developer.blender.org/D2992
2018-01-19 12:13:10 -02:00
76f374052c Depsgraph: Fix freeing of evaluated mesh
Was accessing wrong pointer to get original version of the mesh.
2018-01-19 14:20:22 +01:00
25739ada0b Correct view3d_draw_bgpic_test declaration
Was extern, which got out of sync, move into header.
2018-01-19 23:11:57 +11:00
08fe885d06 Merge branch 'master' into blender2.8 2018-01-19 21:47:57 +11:00
889321e22b Cleanup: reaname LINKLIST_FOREACH -> LISTBASE
LinkList's are a different API, no need to confuse things.
2018-01-19 21:39:18 +11:00
0fe41009f0 Fix T53830: Cycles OpenCL debug assert on macOS,
This was probably harmless besides some unnecessary memory usage due to
aligning allocations too much.
2018-01-19 11:35:07 +01:00
e46c49ff3d Fix T53788: Camera animation not working
Both object level and camera datablock properties animation did not work with
copy on write enabled.

The root of the issue is going to the fact, that all interface elements are
referencing original datablock. For example, View3D has pointer to camera it's
using, and all areas which does access v3d->camera should in fact query for
the evaluated version of that camera, within the current context.

Annoying part of this change is that we now need to pass depsgraph in lots
of places. Which is rather annoying.

Alternative would be to cache evaluated camera in viewport itself, but then
it makes it annoying to keep things in sync.

Not sure if there is nicer solution here.

Reviewers: dfelinto, campbellbarton, mont29

Subscribers: dragoneex

Differential Revision: https://developer.blender.org/D3007
2018-01-19 11:12:22 +01:00
5a61c1de82 Fix T53786: Proportional size from redo ignored
Changing PET size while transforming stores the size in the
tool settings, but changing in the redo panel didn't.
2018-01-19 21:09:16 +11:00
0cddc7e300 WM: operator flag to check repeat/redo execution 2018-01-19 21:07:43 +11:00
9cac97fb3c Fix sculpt error freeing NULL vertex buffer
Relates to T53806 which needs further investigation
2018-01-19 19:36:36 +11:00
5477452194 Merge branch 'master' into blender2.8 2018-01-19 18:03:43 +11:00
53e062da94 Cleanup: sync w/ blender2.8 branch
Split screen_draw.c from screen_edit.c (avoid conflicts syncing).
2018-01-19 17:57:37 +11:00
4444ea42f2 Merge branch 'master' into blender2.8 2018-01-19 17:37:01 +11:00
c850320b35 Merge branch 'master' into blender2.8 2018-01-19 17:21:15 +11:00
ebf01d44ee WM: window draw callbacks and split preview snap
This moves window overlay from hard coded flags into drawing callbacks.

It also supports snapping (holding Ctrl).
2018-01-19 17:15:45 +11:00
7a24e0d175 Cleanup: typos 2018-01-19 15:34:54 +11:00
abb3a86e10 Fix T53833: Particle Info node and Displacement Crash
The displacement shared was running before particle data was copied to the
device causing bad memory access when the particle info node was used. Fix
is simply to move particle update before mesh update so the data is
available to displacement shaders.

(Altho this fixes the crash the particle info node is still mostly useless
with displacement for now...)
2018-01-18 22:40:48 -05:00
368414efac Fix T53823: Particle weight brush crash
Entering particle edit mode w/ the weight brush enabled crashed
on non-hair particle systems.
2018-01-19 12:25:09 +11:00
2b9fb723ed Fix T53832: Particle weight paint crash
Drawing hair weights read before the hair array start.
This code could be improved since it currently copy-pastes,
from do_particle_interpolation, but this would need larger changes.

For now just correct existing logic.
2018-01-19 12:14:53 +11:00
4d3d002b65 Eevee: Fix translucency light powers. 2018-01-18 22:43:05 +01:00
59989fd4e0 Eevee: Volumetrics: Update/fix the lamp power convertion.
Include a better fit for area lights.
2018-01-18 21:52:36 +01:00
03e432bcdb Eevee: Implement Sun area lighting and few fixes/opti.
Sun is treated as a unit distant disk like in cycles.

Opti: Since computing the diffuse contribution via LTC is the same as not using the Linear Transformation, we can bypass most of the LTC code.
This replaces the sphere analytical diffuse computation as it gives a more pleasing result very close to cycles' AND cheaper.

Lights power have been retweaked to be coherent with cycles (except sun lamp with large radius where cycles has a non-uniform light distribution).
2018-01-18 21:52:36 +01:00
0cec092eca Eevee: Optimize rectangle area light.
Use the latest LTC optimisation techniques. That said, the final output is a bit more biased (and a bit further away from cycles).
2018-01-18 21:52:36 +01:00
220f1ad67e Eevee: Use inversesqrt() when possible. 2018-01-18 21:52:36 +01:00
8ed0161aa7 Eevee: Implement new LTC algorithm for Sphere Lights.
This is an improvement on the old spining quad method that was giving artifacts when the reflection ray was nearly aligned with the sphere center.
This might be a bit heavier but it's worth it.
2018-01-18 21:52:36 +01:00
Dalai Felinto
97e2b0c594 Outliner: Follow up on "Alphabetical sorting"
Technicall this works for collections modes too (View Layer and Collections) even
if only for objects. So it should be in the menu as well.
2018-01-18 18:23:19 -02:00
Dalai Felinto
60eb897fa5 Outliner: Alphabetical sorting - Fixup on "Get rid of Search Menu"
Issue introduced on 51bcf7bd5f.

Alphabetical sorting is not related to search, so it shouldn't have been
touched by the Search Menu changes.
2018-01-18 18:15:00 -02:00
Dalai Felinto
dc296542d4 Outliner: Fix parenting clear poll 2018-01-18 18:02:32 -02:00
Dalai Felinto
f1cfe67594 Outliner: Use (temporary) icons for collections
We need new icons for collections.

Yet we are using them in a few places, so we may as well be consistent and use
it everywhere.
2018-01-18 17:30:37 -02:00
Dalai Felinto
74f872df3a Outliner: Rename "Active View Layer" > "View Layer"
The original name came from a cheap conversion of the "active layer" option
to "active render layer" and then "active view layer".
2018-01-18 14:17:07 -02:00
Dalai Felinto
33ddd926b7 Outliner: View Layer: add option to add a new collection to the current view layer
This operator not only links a collection, but it creates a new one and then it
links it. Although the preferrable method for users to handle their collections
is when viewing the "Collections", let's explore this workflow for now.

Suggested by Pablo Vazquez, thank you.
2018-01-18 13:56:55 -02:00
Dalai Felinto
51bcf7bd5f Outliner: Get rid of Search Menu
Use inline options instead. This will be collapsable once we merge the upcoming
filter sytem.
2018-01-18 13:20:10 -02:00
Dalai Felinto
9398db07cc Outliner: Keep header operator-free and edit menu cleanup
Headers should not have operators as much as possible. The exception here is
for datablocks mode when you want to see the active keyset.

Edit menus on the other hand should be clearly distinct from the RMB context
menus. Edit menu options should be only the ones that apply to the entire
outliner, regardless of the selected element.

Context (rmb) menus should be related to the element you RMB on to invoke the
menu. I'm also taking this opportunity to start bringing the context menus
to Python. There is little reason not to, and it helps editing them (In this
case I'm doing it only for the Scene Collection one).
2018-01-18 13:05:45 -02:00
539e170d79 Depsgraph: Fix crahs when selecting objects
Was wasy to reproduce by hitting A-key.

Missing part of the recent orig_id pointer commit.
2018-01-18 14:14:53 +01:00
42a562496b Fix memory leak in recent curve refactor
5b25605761fb7
2018-01-18 20:54:59 +11:00
7b3e441bcf Improved docstring of mathutils.Matrix.lerp() 2018-01-18 09:58:14 +01:00
9811150952 Improve docstring for mathutils.Matrix.decompose() 2018-01-18 09:38:01 +01:00
001789d733 Fix T53808: VSE doesn't show scene strip markers 2018-01-18 14:49:09 +11:00
e8452cf0bc Merge branch 'master' into blender2.8 2018-01-18 14:11:38 +11:00
6880a549ba Fix weight particle brush versioning 2018-01-18 14:02:26 +11:00
9b04a47070 Cleanup: label scene flags more clearly
Also correct typo in enum name
2018-01-18 13:51:49 +11:00
2be8598fe7 Fix T53811: "bmesh.ops.split" crash 2018-01-18 12:36:25 +11:00
7ffe838473 WM: improved area resize snapping
Instead of 10px steps, snap to mid-point & adjacent edges.

Not yet implemented for split preview.
2018-01-18 11:33:51 +11:00
27dff3fbc1 Merge branch 'master' into blender2.8 2018-01-18 01:01:17 +01:00
e6df02861e Fix buffer overflow vulnerability in curve, font, particles code.
Solves these security issues from T52924:
CVE-2017-12102
CVE-2017-12103
CVE-2017-12104

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

Differential Revision: https://developer.blender.org/D3002
2018-01-18 00:54:07 +01:00
e04d7c49dc Fix buffer overflow vulnerabilities in mesh code.
Solves these security issues from T52924:
CVE-2017-12081
CVE-2017-12082
CVE-2017-12086
CVE-2017-12099
CVE-2017-12100
CVE-2017-12101
CVE-2017-12105

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

Differential Revision: https://developer.blender.org/D3002
2018-01-18 00:54:07 +01:00
e0f2c7aff4 Fix Linux/GCC compiler warning in recent fixes. 2018-01-18 00:54:07 +01:00
235f578a0d Loop Cut: Allow mouse placement w/ numeric input
D2973 by @cyaoeu
2018-01-18 10:55:53 +11:00
07aed404cf Fix buffer overflow vulernability in thumbnail file reading.
Fixes CVE-2017-2908 from T52924.

Differential Revision: https://developer.blender.org/D3001
2018-01-17 20:25:42 +01:00
d30cc1ea0b Fix buffer overflows in TIFF, PNG, IRIS, DPX, HDR and AVI loading.
Solves these security issues from T52924:
CVE-2017-2899
CVE-2017-2900
CVE-2017-2901
CVE-2017-2902
CVE-2017-2903
CVE-2017-2904
CVE-2017-2905
CVE-2017-2906
CVE-2017-2907
CVE-2017-2918

Differential Revision: https://developer.blender.org/D2999
2018-01-17 19:59:47 +01:00
a6700362c7 Memory: add MEM_malloc_arrayN() function to protect against overflow.
Differential Revision: https://developer.blender.org/D3002
2018-01-17 19:59:47 +01:00
8400b4b566 Merge branch 'master' into blender2.8 2018-01-17 18:03:08 +01:00
46204f843b Depsgraph: Fix for fake dependency cycle being created for shape key drivers
One thing i'm not fully happy with is all this is_same_* functions. Need to
get rid of this by probably adding explicit entry/init/whatever nodes and
maybe making node criteria aware of whether key will be used as "from" or
as "to" node.
2018-01-17 18:02:51 +01:00
10e6da1f2d Merge branch 'master' into blender2.8 2018-01-17 17:47:38 +01:00
5d4ffb42a3 Delete Invalid Drivers: more lenient poll function
This function is faster and also allows for deletion of invalid drivers in
nested data blocks (for example in shape keys). Thanks @sergey!
2018-01-17 17:14:39 +01:00
a8fc44299b external_libs: Add openjpeg to the mavc lib folders for cycles standalone. 2018-01-17 07:45:05 -07:00
8e35a9e4c7 Eevee: Perf: Update noises (in utilTex) via GPU drawing.
This leads to a ~3ms improvement of CPU time during drawing.
This prevent the rendering from being stalled waiting for the texture data to be transfered.
2018-01-17 14:02:48 +01:00
54e10dbd17 DRW: Add DRW_framebuffer_create() function.
This is because certain part of the engine may require a blank framebuffer to bind textures to.
This is the case when using only array textures, unsupported by DRW_framebuffer_init().
2018-01-17 13:55:49 +01:00
c6101b09eb Merge branch 'master' into blender2.8 2018-01-17 12:38:52 +01:00
0aaae43748 Simplified GRAPH_OT_driver_delete_invalid after feedback @aligorith
By adding the ANIMFILTER_NODUPLIS flag to the filter it'll only be
processing each F-Curve once, which means we can remove while iterating.

This also solves a potential issue when a datablock has a driver and is
shared among multiple objects.
2018-01-17 12:38:14 +01:00
333d4f3447 Depsgraph: Use more const qualifiers 2018-01-17 12:27:46 +01:00
971a44fe08 Merge branch 'master' into blender2.8 2018-01-17 12:21:05 +01:00
c38ebf93e3 Added "Delete Invalid Drivers" operator
This operator is available in the graph editor in the Drivers mode, and
allows quick cleanup of drivers marked as 'invalid'.
2018-01-17 12:12:37 +01:00
ca5987c8a5 Cleanup: replace BLI_dynstr w/ BLI_string_joinN
Use in place of recently reverted 'DRW_shader_create_lib'
2018-01-17 21:42:14 +11:00
f314d9ce47 Depsgrapph: Fix/workaround for missing hair
The issue was happening because dependency graph did not inform particle
settings as modified. This is a regression caused by tagging and flushing
mechanism refactor.

The real fix would be to make particle settings to use ID level recalc flags
rather than own flags, which will also simplify relations around particle system,
and particle settings evaluation.

Reported by Mai in IRC.
2018-01-17 11:23:16 +01:00
10ce5af2dd Revert "Fix use-after free in DRW_shader_create_with_lib"
Caused an error entering edit-mode.

d60f26f37a & 2659500835
2018-01-17 20:39:42 +11:00
2094bbd033 Fix assert in mesh batch conversion 2018-01-17 19:54:13 +11:00
dfea9f43db Merge branch 'master' into blender2.8 2018-01-17 19:29:50 +11:00
8d064c5bc4 Fix use-after free in DRW_shader_create_with_lib
Limit scope to avoid future accidents
2018-01-17 19:28:15 +11:00
7935a394b7 Correct simple deform versioning from D2989 2018-01-17 19:17:49 +11:00
c02d428147 Eevee: Update lightprobes when deleting or linking a new world datablock 2018-01-17 00:23:31 +01:00
a19e3bdad8 Fix T53810: Crash removing a scene used in render
Header drawing accesses the scene too.
2018-01-17 10:03:22 +11:00
d7acabdef5 Eevee: SSS: Fix OpenGL error when enabling TRANSLUCENCY but not SSSS.
This was causing this error:
"Different sampler types for same sample texture unit in fragment shader"
2018-01-17 00:01:17 +01:00
2659500835 DRW: Codestyle refactor: Use macro to create shader libs.
This clears up the code from many DynStr usage. Easier to read.
2018-01-16 23:40:15 +01:00
96138daa2b Eevee: SSR: Fix artifacts at object/background limits.
This should have a very small perf impact but it's needed.
2018-01-16 22:18:35 +01:00
213e34a6c3 Eevee: Fix Hashed Alpha.
Now hashed alpha materials are stable when moving the camera/not using TAA.
It also converge to a noise free image when using TAA. No more numerical imprecision.

There still can be situations with multiple overlapping transparent surfaces that can lead to residual noise.
2018-01-16 19:40:17 +01:00
9fd28c7769 Eevee: AO: Removes samples and denoise options.
This comes with a lot of code simplification that leads to a small performance improvement.
2018-01-16 18:22:25 +01:00
c372113489 Eevee: Add macro to sample noise in utilTex.
Avoid future coding error.
2018-01-16 18:22:25 +01:00
5f569378d2 Eevee: SSR: Derive the brdf bias from the trace quality.
Also change the range of the trace quality so that the trace actually covers the screen most of the time.
2018-01-16 18:22:25 +01:00
9afeba330f Eevee: Fix SSRefraction noise. 2018-01-16 18:22:24 +01:00
9365e966b4 Eevee: SSR: Enhance the halfres raytrace.
This make the halfres raytrace actually converge to an antialiased image by jittering the source pixel.
2018-01-16 18:22:24 +01:00
2221cdb517 Eevee: SSR: Optimise Texture fetches and solve noise issue.
There was some remaining issue caused by neighbor re-use. Randomizing them every _prime_number_ of iterations fixes this.
2018-01-16 18:22:24 +01:00
3cb2b2956b Eevee: SSR: Remove ray count and use integer texture for hit coord.
Using GL_RG16I texture for the hit coordinates increase tremendously the precision of the hit.
The sign of the integer is used to 2 flags (has_hit and is_planar).
We do not store the depth and retrieve it from the depth buffer (increasing bandwith by +8bit/px).
The PDF is stored into another GL_R16F texture.

We remove the raycount for simplicity and to reduce compilation time (less branching in refraction shader).
2018-01-16 18:22:24 +01:00
84c91be0a4 Eevee: Fix noise correlation in the blue noise update. 2018-01-16 18:22:24 +01:00
39af6c27f5 DRW: Change framebuffer texture creation.
Instead of creating non temp textures only at framebuffer creation, we create them and bind them if their pointer is NULL.

This should simplify the framebuffers creation code.
2018-01-16 18:22:24 +01:00
9d1ae07d4f Cleanup: Avoid ifdefs in multiple places
Define a helper macro. Makes code read easier.
2018-01-16 17:14:57 +01:00
d9eb17b18e Cleanup: Remove deprecated enum flags
Those are not used anymore.
2018-01-16 17:11:47 +01:00
bf9460e3cf Cleanup: Get rid of legacy extra recalc flags
Those are not used by new dependency graph and are not needed for properly
created rigs with new granular nodes.
2018-01-16 17:11:47 +01:00
55f97d1dd9 Static override: cleanup: name consistency. 2018-01-16 17:11:03 +01:00
3cd8264505 Static override: enhance 'make override' operator.
Now when you make an override of a linked armature, code will
automatically also override objects using that armature (deformed by, or
children of), trying to replicate make_proxy results.

Also some initial code to replicate 'make_proxy' in case of instantiated
linked groups, but that is not working yet (and will also require some
work in RNA part of group's objects collection anyway).
2018-01-16 17:11:03 +01:00
72ec6dbb0b Static overrides API: add functions to create overrides from several datablocks at once.
This simplifies remapping task, since you don't have to ensure your
overrides are created in the correct dependency order.

Uses famous LIB_TAG_DOIT to mark IDs to be overridden.
2018-01-16 17:11:03 +01:00
436eea2d93 Merge branch 'master' into blender2.8 2018-01-16 16:40:05 +01:00
b55111f8f6 Cleanup: Naming of depsgraph 2018-01-16 16:38:39 +01:00
4e0673927a Alembic: don't explicitly pass NULL 2018-01-16 16:28:10 +01:00
6db0fd65ab T53711: Alembic don´t import vertex colors correctly
An index stored in Alembic wasn't used. Often this index is a no-op
(i.e. index[n] = n), in which case the result was fine. However, when it
isn't, it caused issues.
2018-01-16 16:03:21 +01:00
c810df35b2 Draw manager: Cleanup, use full name for depsgraph variable 2018-01-16 15:58:39 +01:00
1ed06a1167 Draw manager: Make depsgraph a part of draw state
Makes it more explicit and avoids hash loookup when depsgraph is needed.
2018-01-16 15:42:03 +01:00
eea3506019 Draw manager: Make update context aware of what depsgraph causes update 2018-01-16 15:38:44 +01:00
1e0283828f Depsgraph: pass depsgraph to editors update context struct
This way callbacks will know which depsgraph is being changed, and where
evaluated data is coming from.
2018-01-16 15:37:52 +01:00
263f614932 Add dedicated pointer to an original ID datablock
Before we were re-using newid pointer inside of ID structure where we were
storing pointer to an original datablock.

It seems there is no way we can avoid requirement of having pointer to an
original datablock, so let's stop obusing system which was only designed to
be a runtime only thingie. Will be more safe this way, without need to worry
about using any API which modifies newid.
2018-01-16 15:09:48 +01:00
d4ff1a1f2c Merge branch 'master' into blender2.8 2018-01-16 14:52:43 +01:00
0bdb1eab82 Sculpting: Fix uninitialized color being left for smooth meshes with hidden mask 2018-01-16 14:46:48 +01:00
7934e7ab83 Sculpting: Fix for "Hide Mask" does not work with multires 2018-01-16 14:31:52 +01:00
379a752ee7 Manipulator: fix arrow offset in perspective view
Use 3D calculations instead of projecting into 2D space.
2018-01-16 23:38:27 +11:00
7df1983bf9 Fix compilation error 2018-01-16 12:48:33 +01:00
cfe6b83134 Merge branch 'master' into blender2.8 2018-01-16 12:07:43 +01:00
67e4b1d3e9 Fix missing node tree updates when unconnected node affects output via driver
Fixes T53794: Can't control color ramp node color values with drivers
2018-01-16 12:06:22 +01:00
0b500ba147 Depsgraph: Fix fake cyclic dependencies for node tree drivers
There was a fake cyclic dependency happening when node of node tree is driving
another node of the same tree.

This is related to T53794, but more fixes is needed here.
2018-01-16 11:54:32 +01:00
45b5de9cb3 Depsgraph: Better relations name 2018-01-16 11:43:05 +01:00
1d763b5395 Depsgraph: Check for ID match when checking if operations corresponds to the same bone 2018-01-16 11:41:50 +01:00
b974d0da4d Depsgraph: Cleanup, indentation 2018-01-16 11:40:02 +01:00
b667020310 Depsgraph: Cleanup, brace placement\ 2018-01-16 11:38:44 +01:00
03223a5e7d readfile: ensure blend header follows the spec 2018-01-16 20:02:32 +11:00
2346e0850f Ruler Manipulator: dragging out of the view removes
Not ideal, but means we don't need to override Delete key.
2018-01-16 18:14:11 +11:00
fd80b83e8e Manipulator: Support tweak removing the manipulator 2018-01-16 18:03:15 +11:00
873a87c7e8 Merge branch 'master' into blender2.8 2018-01-16 14:56:03 +11:00
e428ea3e00 Cleanup: indentation 2018-01-16 11:40:43 +11:00
6f45dea6ee UI: support canceling color ramp drag
D2997 by @oktomus
2018-01-16 11:16:50 +11:00
Dalai Felinto
1e9bc60777 Fix collection visibility evaluation
Collection       A [disabled]
 -> Collection   B
   -> Collection C
     -> object

Object should be invisible, but it is not. Reported by Antonio Vazquez.

Bug introduced on: 1f5106de61
2018-01-15 20:19:12 -02:00
Dalai Felinto
59fcfaf5c3 Fix crash in outliner when moving objects around
How to reproduce it:
* Change Outliner from Active View Layer to Collections
* Create a new collection under Master Collection (Collection 2)
* Move all three objects from Collection 1 to Collection 2
* Move all three objects from Collection 2 to Collection 1
2018-01-15 19:08:45 -02:00
Dalai Felinto
ae12424298 Outliner/Collections: Fix objects disappearing when moving to collections
Bug introduced on fb4cd136a7 (multi-object drag-and-drop).

How to reproduce the bug:
* Create a new collection
* Move the Cube to the new collection
* Move the Camera to the new collection (Cube disappears)
* Move the Lamp to the new collection (Camera disappears)

Explanation of the bug:
The moved object was still selected, so we were trying to add the object to the
collection were the object was already inserted (which would fail silently) and
then remove it.
2018-01-15 18:27:50 -02:00
b810e9ffc4 Fix: Mesh Edit Mode Shader: Correct artifacts that appeared on edges of edit mode with some AMD GPUs
In case the problem appeared with the `AMD Radeon HD 7570M`
2018-01-15 16:29:41 -02:00
7183d15d97 Fix unreported: Eevee Principled Shader: Crash because Intel does not like dead code
The reason for the crash is still a bit confusing, but on Windows with Intel HD Graphics 4000 it always happens when you enable `Use Nodes` or when you try to connect the Pricipled Shader node to the output without the `Subsurface Scattering` and `Subsurface Translucency` options enabled.
2018-01-15 13:49:50 -02:00
f5e2d42092 GPU Texture: Add GL_RG16I format. 2018-01-15 15:39:03 +01:00
5e6c86cb1f GPU_batch_from_poly_2d_encoded: skip winding check
Ensure all polygons have the same winding instead.
2018-01-16 00:59:52 +11:00
7ba07b7e64 GPU_batch_from_poly_2d_encoded: optional rctf arg
Also use compiler attributes
2018-01-16 00:16:54 +11:00
5cb43b0f20 Cleanup: update comments 2018-01-16 00:16:54 +11:00
ec3248437d Merge branch 'master' into blender2.8 2018-01-15 13:55:52 +01:00
Karl Semich
75e2ae72c7 Allow for multi-gigapixel renders
This patch fixes a 32-bit overflow that occurs on 64-bit systems due to a numeric literal being treated as 32-bit.

This patch allows for the generation of images that occupy more than 4GB of RAM, which previously caused a crash.

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2975
2018-01-15 12:57:12 +01:00
2c2203d82a Cycles: CLeanup, remove unused function argument 2018-01-15 11:45:16 +01:00
4d8b78b0a9 Sculpting: Sdd an option to hide mask in viewport
Brushes themselves are still affected by the mask, but the viewport is not
showing the mask. This way it's easier to see details while sculpting.

Studio request by Julien Kaspar
2018-01-15 11:43:59 +01:00
6cb06501c3 GPU buffers: Use bitflag to whether we want to show diffuse color
Those fine-tuning bits will be extended soon, so makes sense to start using
some more verbose flag names when calling functions.
2018-01-15 11:43:59 +01:00
72cb7e2726 Manipulator: vector icons for 3D view navigation
Use different icons for perspective/ortho state
(previous icon was place-holder).
2018-01-15 20:56:31 +11:00
6acfef6ef1 Manipulator: support for buttons as vector shapes 2018-01-15 20:40:57 +11:00
bfada6cc4a GPU_batch: Add utility to create 2D shapes
Shapes are represented by compact byte array,
encoded by 'make_shape_2d_from_blend.py' in the tools repo.
2018-01-15 20:38:06 +11:00
ae6cc4a21d GPU_batch_presets: move static vars into struct
Also use GWN raw stepping API to fill in data.
2018-01-15 16:55:40 +11:00
b1ac7571a8 Cleanup: split GPU_batch_presets into own file
Mixing other batch code in this file easily shadowed existing variables.
Keep presets separate (we may have more, 2D & 3D presets)
2018-01-15 16:24:02 +11:00
7c1286b2b7 Manipulator: add free callback 2018-01-15 16:06:56 +11:00
129196dc32 Merge branch 'master' into blender2.8 2018-01-15 15:59:59 +11:00
ec52e64a5d RNA: Add RNA_property_string_set_bytes
This is needed to set values that contain zero bytes
(where the length isn't fixed).
2018-01-15 15:59:10 +11:00
82a94d0f84 Cleanup: correct names 2018-01-14 17:54:27 +11:00
58be6d282d Merge branch 'master' into blender2.8 2018-01-14 17:29:38 +11:00
02a01b3505 Cleanup: BLI_ghash
Improve hashsizes comment too.
2018-01-14 17:28:15 +11:00
8d3efb2b90 Fix T53772: Presets don't support colons 2018-01-14 14:31:39 +11:00
e7bf77df3a Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-01-13 01:13:37 -02:00
cdc31c3e6e Merge branch 'master' into blender2.8 2018-01-13 02:05:49 +01:00
40dbf2fc00 Fix T53771: missing view pixels when rendering multiview + FSAA.
This never worked, it's not due to recent refactoring.
2018-01-12 23:57:45 +01:00
5bd9b12dc4 Cycles: adaptive subdivision support for panoramic cameras.
Adds the code to get screen size of a point in world space, which is
used for subdividing geometry to the correct level. The approximate
method of treating the point as if it were directly in front of the
camera is used, as panoramic projections can become very distorted
near the edges of an image. This should be fine for most uses.

There is also no support yet for offscreen dicing scale, though
panorama cameras are often used for rendering 360° renders anyway.

Fixes T49254.

Differential Revision: https://developer.blender.org/D2468
2018-01-12 23:57:45 +01:00
b603792fec Code refactor: adjust camera update for easier code sharing with kernel. 2018-01-12 23:57:45 +01:00
5cf032678f Code cleanup: remove test code to disable motion blur, no longer useful. 2018-01-12 23:57:14 +01:00
5a293de925 Draw Manager: Edit Mode Shader: Remove #ifdef GPU_INTEL
The problem with memory alignment on Intel GPUs does not happen anymore after the last shader changes.
2018-01-12 15:09:13 -02:00
49d51a1e62 Eevee: Fix motion blur alpha being > 1.0 2018-01-12 15:57:41 +01:00
2bbc287af1 Eevee: Fix Motion blur not working in OGL render.
Thanks to @sergey for the patch.

Also include some sexy line breaks.
2018-01-12 15:57:41 +01:00
9c76ec615a Fix T53759: Cycles / 2.8: Light position doesnt update in viewport render 2018-01-12 15:00:58 +01:00
Dalai Felinto
d931f6f785 Outliner: Harmless cleanup
There is even a chance the compilers handles this itself, but we should try to
use the internal storage as much as possible (and save 0.000001s in the process)
2018-01-12 09:07:16 -02:00
a33a5880f7 Fix bmesh.utils.face_join arg parsing 2018-01-12 14:51:15 +11:00
93d30d62e6 User Prefs: app-template option to hide the cursor 2018-01-12 12:45:56 +11:00
ff4c9d69ee User Prefs: add new flag for app-template options
For experimental options, outside the scope of typical preferences.

While templates are developed we might want to make changes
to behavior which aren't fully compatible with typical work-flows.

Instead of mixing these options in with current preferences
expose separately (we could even force disable them when templates
aren't int use)
2018-01-12 12:45:56 +11:00
322f0223d0 Cycles: option to make background visible through glass transparent.
This can be enabled in the Film panel, with an option to control the
transmisison roughness below which glass becomes transparent.

Differential Revision: https://developer.blender.org/D2904
2018-01-12 01:34:28 +01:00
cce280dd67 Cycles: add offscreen dicing scale and dicing camera.
The offscreen dicing scale helps to significantly reduce memory usage,
by reducing the dicing rate for objects the further they are outside of
the camera view.

The dicing camera can be specified now, to keep the geometry fixed and
avoid crawling artifacts in animation. It is also useful for debugging,
to see the tesselation from a different camera location.

Differential Revision: https://developer.blender.org/D2891
2018-01-12 01:34:07 +01:00
Dalai Felinto
de176b75b2 Fix T53764: vertical line glitch for collections with objects and collections
The code for vertical line was assuming that we necessarily neeeded vertical
lines for all the elements. Which is not true since we are not drawing
vertical and horizontal lines for collections.

Patch made in contribution with Philippe Schmid (@Quetzal).
2018-01-11 19:58:50 -02:00
2dbcc17897 Fix Cycles bevel normal baking having some random incorrect pixels.
The bevel and SSS code could result in NaNs in some cases, tweak the
formulas so this can't happen.
2018-01-11 22:30:31 +01:00
6b3d85fa51 Build: auto detection of libraries built by "make deps" on Linux.
Use the libraries if they exist in ../lib/linux_x86_64 or similar, so
that you can run "make deps && make full" to get a full static build.
Note that install_deps.sh is still the only officially supported way to
build Blender dependencies on Linux, but this may be useful to some.

Differential Revision: https://developer.blender.org/D2980
2018-01-11 22:30:31 +01:00
79b0bce890 Edit Mode Overlay Shaders: remove loose comment left by last commit 2018-01-11 18:28:11 -02:00
6a37f49211 Fix error weird sliding vertices appearing in edit mode with some Intel GPUs
Appear when zooming
2018-01-11 18:07:41 -02:00
8bff6f319a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/multires.c
2018-01-11 20:19:18 +01:00
6104596587 Cleanup commented out OMP command. 2018-01-11 20:17:29 +01:00
6695e390c6 Nuke OMP from multires.c: forgot that one in previous commit.
Gives same kind of speedup too, 8.7ms with old OMP code, 2.7ms with new
one, with same level-4 multires monkey head.
2018-01-11 20:14:16 +01:00
90cd856ac3 Nuke OMP usage in multires.c.
New code is over three times quicker than old one here (e.g. Suzanne
subdiv level 4, 250k tris, threaded part is now 1.4ms instead of 4.5ms
with OMP).
2018-01-11 19:39:24 +01:00
da97b6930b DRW: Fix T53583 Armature instances not drawing.
Was due to the fact that the instances don't have a "static" obmat that can be referenced to use as a uniform.
Solution : precompute the full matrix for each bone and pass it as instance data. (theses are copied into a buffer and can be discarded right away)

Note: this could be optimized further and make only one drawcall (shgroup) to draw all bone instance of one type (vs. one call per armature).
2018-01-11 19:35:56 +01:00
Dalai Felinto
31782609f4 Fix T53340: Outliner collections collapsing when UNDO
This is not the original reported issue, but it is a second issye mentioned
that, the only one reminding.
2018-01-11 16:03:08 -02:00
6c4bc79134 Fix T51576: Blender crash when change to edit mode with some Intel GPUs
Differential Revision: D2995
2018-01-11 15:58:20 -02:00
713852affb Preparation step for nuking OMP from multires code.
Remove the critical OMP sections used to protect mem allocation.

First one can be done in a separate loop before main, parallelized one.

Second one only affect 'private' data, so we only need to ensure
guardedalloc thread safety is enabled.

This is committed as separated step to ease troubleshooting in case
bisecting becomes necesary.
2018-01-11 17:56:18 +01:00
c253fe5e87 Cleanup typo in comment. 2018-01-11 17:55:58 +01:00
5ef2be5f59 Eevee: DoF: Fix most color artifacts in render.
Use full 32bit floats buffers. This increase render time but also color fidelity.
2018-01-11 16:50:55 +01:00
494e4c0977 Eevee: Fix Depth of Field.
It was using a wrong blending function.
2018-01-11 16:50:55 +01:00
0142264508 Eevee: Lamps: Optimize lamps CPU/Memory usage.
Tests on my system with ~1200 objects with 128 shadow casting lamps (current max) show a significant perf improvment (cache timing : 22ms -> 9ms)
With a baseline with no shadow casting light at 6ms this give a reduction of the overhead from 16ms to 3ms.

This remove pretty much all allocations during the cache phase. Leading to a big improvement for scene with a large number of lights & shadowcasters.
The lamps storage has been replace by a union to remove the need to free/allocate everyframe (also reducing memory fragmentation).

We replaced the linked list system used to track shadow casters by a huge bitflag.
We gather the lights shadows bounds as well as the shadow casters AABB during the cache populate phase and put them in big arrays cache friendly.

Then in the cache finish phase, it's easier to iterate over the lamps shadow SphereBounds and test for intersection.

We use a double buffer system for the shadow casters arrays to detect deleted shadow casters.
Unfortunatly, it seems that deleting an object trigger an update for all other objects (thus tagging most shadow casting lamps to update), defeating the purpose of this tracking.
This needs further investigation.
2018-01-11 16:50:54 +01:00
Dalai Felinto
a08f687b91 Fix poll and name of collection link/unlink operators
Reported via IRC by Pablo Vazquez (venomgfx).
2018-01-11 12:45:00 -02:00
656b9a46b3 Merge branch 'master' into blender2.8 2018-01-11 15:14:30 +01:00
38d480fb54 Subsurf: Allow partial threading over geometry arrays
This helps avoiding threading overhead when having lots of system threads..
2018-01-11 15:06:56 +01:00
374c4f168d Mesh evaluate: Tweak threadability criteria
Gives measurable speedup on layout scenes from Spring.

Actual value for chunk size is a subject for more scientific research.
2018-01-11 15:04:13 +01:00
cdcdae663a Mesh deform: Tweak threadability criteria
Allow threading using subset of all available threads. Makes it faster to
evaluate lower resolution mesh but with complex deform groups and such.
2018-01-11 14:51:30 +01:00
c276fef413 Subsurf: Make copyFinalLoopArray() threaded
Gives about 40% speedup of object which has simple-ish deformation applied
on top of subdivided mesh.

This might easily happen with single character animation.
2018-01-11 14:49:32 +01:00
1255f572c7 Depsgraph: Make eval initialization more friendly for threading
Helps in cases of not very complex scenes and lots of system threads available.

A bit hard to measure change on it's own, it works best with the upcoming
changes and gives measurable improvements.
2018-01-11 14:48:49 +01:00
498ffef7b0 Subsurf: Use regular mutex instead of RW one
Mutex is now local to particular CCGDM, and guarding edge hash which is only
used by a single function only. There is no need to acquire read lock after
edge hash was created.
2018-01-11 14:38:58 +01:00
c36f4a7f7f Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/blender.c
	source/blender/makesdna/DNA_ID.h
2018-01-11 14:35:36 +01:00
b415ed55a7 Fix critical issue with our DNA ID tags (two totally different tags having same value).
Nice typo from rBc4046e9082f6, tssk. ;)
2018-01-11 14:26:44 +01:00
cc63c8511c Fix static override (very stupid mistakes in code!) 2018-01-11 12:29:09 +01:00
de91f2389d Further fixes to new RNA props diff code.
Unfortunately, we cannot perform set/unset checks on 'resolved'
properties (i.e. from actual IDProperties pointers, and not virtual RNA
placeholders)... IDProps in RNA are rather challenging topic. :|

This should fully fix T53715: 2.8: Removing keymap items no longer works
2018-01-11 09:41:44 +01:00
0edda8e4ce Fix T53311: transform edge/normal orientation
When the edge is aligned with it's own normals,
transform orientation wasn't aligned with the edge.
2018-01-11 19:25:27 +11:00
6dd164a188 Fix T53755: Cycles OpenCL lamp shaders have incorrect normal. 2018-01-11 08:48:32 +01:00
717090f40e UI: option not to show screen splitting widgets
Request for simplified Blender template,
this may be extended to limit access to other UI changes
that could be pressed by accident.
2018-01-11 16:10:46 +11:00
9c91c75ea6 Merge branch 'master' into blender2.8 2018-01-11 13:24:41 +11:00
9d62e6e782 UI: don't draw outline when it's not calculated
Outline drawing was running even when there were no verts to draw.
Causes an assert in 2.8.
2018-01-11 13:23:55 +11:00
Stefan Werner
25b794a39d Cycles: support animated object scale in motion blur.
This was disabled previously due to CUDA compiler bugs, see T32900.

Differential Revision: https://developer.blender.org/D2937
2018-01-11 02:58:29 +01:00
ac2ebf9c54 Fix T53455: Object disappear w/ TrackTo constraint
Regression caused by own commit 16fbb47c88,
this is really an edge case though since calling normalize twice fixes.
2018-01-11 10:57:30 +11:00
d0cc5d8948 Fix T53752: Draw curve fails w/ stylus 2018-01-11 10:23:52 +11:00
6112cde3f9 Merge branch 'master' into blender2.8 2018-01-11 10:19:00 +11:00
f330005266 Cleanup: BKE naming conventions for datablock add/localize
Conventions were already followed nearly everywhere.
2018-01-11 10:01:01 +11:00
c27cab268b Fix Windows compiler warning using WITH_CYCLES_NATIVE_ONLY. 2018-01-11 00:00:48 +01:00
d0892a6648 Fix issue with moving CUDA memory to host and multiple devices.
This is not expected to fix all issues. Also adds some more details
to error reporting to investigate failures.
2018-01-11 00:00:48 +01:00
0f4b46cee6 Fix T53692: OpenCL multi GPU rendering not using all GPUs.
Ensure each OpenCL device has a unique ID even if the hardware ID is not
unique for some reason.
2018-01-11 00:00:48 +01:00
Julian Eisel
3f16810150 Cleanup: Naming, avoid passing bContext to low-level function, etc 2018-01-10 23:02:10 +01:00
Julian Eisel
748e95ad50 Fix crash when deleting collections
With factory settings, steps to reproduce were:
* Select "Collection 1" (in "RenderLayer")
* Delete
It might crash at this point, although maybe this crash is ASAN only.

However, this was also doing some weird things that I've corrected now. It
called outliner_build_tree in an operator callback. This should only be
called in the main redraw function or so, not in regular handlers.
Instead, we manually cleanup the tree to keep it valid.
2018-01-10 22:45:44 +01:00
76bdd40bfd Subsurf: Loop array should not be called mv
mv is a mesh vertex, not loop.
2018-01-10 14:58:49 +01:00
fca202566f Subsurf: Remove increment of unused variable 2018-01-10 14:58:09 +01:00
181124ad13 Fix compilation error
Seems of new padding were added in 2.8 branch.
2018-01-10 14:15:13 +01:00
5d38c14116 Merge branch 'master' into blender2.8 2018-01-10 13:22:03 +01:00
2737837b09 Fix wrong data type used for undo memory limit 2018-01-10 13:20:36 +01:00
f21f18b572 Task scheduler: Use const qualifier in callbacks for parallel range 2018-01-10 12:53:59 +01:00
5614193745 Task scheduler: Use restrict pointer qualifier
Those pointers are never to be aliased, so let's be explicit about this and hope
compiler does save some CPU ticks.
2018-01-10 12:49:51 +01:00
518c65460e Task scheduler: Use more const qualifiers 2018-01-10 12:27:43 +01:00
f68b2fd233 RNA: Increase memory limit settings to their possible max on platform
This is quite common to have 64GB memory now, and even 128. There is no reason
to add any artificial caps on the cache and undo memory here. We can not protect
against using too much memory in one cases and allow use of full computer
potential in others.

Now 32 bit will use 2GB max (as it used to be), but 64bit will use whatever
number of megabytes fits into integer.

Reviewers: campbellbarton, mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D2972
2018-01-10 11:09:10 +01:00
f0610563ee math utils: Add size_t version of min and max functions 2018-01-10 11:06:44 +01:00
f59303bead Fix color for manipulator drawing
Was drawing black after the first draw call.
For now set the shader before each draw call,
noted as TODO to investigate a nicer way to handle.
2018-01-10 20:50:14 +11:00
2b56faebe5 Merge branch 'master' into blender2.8 2018-01-10 19:58:05 +11:00
18f53d8822 Cleanup: comment block alignment 2018-01-10 19:57:02 +11:00
bc02c5de49 Alternate fix for brush user count
This reverts change to BKE_brush_add,
callers now remove the extra user.

Note this isn't very convenient for callers but
is consistent with other ID types.

In the future we will probably remove this and have new
ID's created with zero users.
2018-01-10 19:34:34 +11:00
3f837341c8 Correction to brush user commit
RNA API was compensating for the extra user.
2018-01-10 18:31:54 +11:00
98d89cef6b Fix background_job template
Update attribute and use empty file operator
2018-01-10 17:50:41 +11:00
6e6b79de35 Fix brush user count
New brushes had 2 users on adding.
Caused assert removing them after.
2018-01-10 17:45:34 +11:00
5ff33ecdf0 Merge branch 'master' into blender2.8 2018-01-10 14:01:09 +11:00
5c3dc01f54 Draw Manager: Edit Mode: Curve: uniforms were not being setted 2018-01-10 00:40:02 -02:00
7d865bc4ab Fix T53748: uniform globalsBlock was not being added was not being added to the shaders of the curves handles 2018-01-10 00:08:51 -02:00
cacba951ea Correct typos 2018-01-10 12:43:29 +11:00
fdd3d969a6 Fix T53491: Absolute tablet motion detection fails
When using a tablet, detecting absolute motion only worked
when activating a tool with the tablet.

Pressing Enter to run a tool for e.g. would use relative motion.

Now store is_motion_absolute in the event,
set for new events based on the most recent motion events.
2018-01-10 12:41:45 +11:00
9aada45e52 fix t53701 minimal changes to get it working right 2018-01-10 01:51:04 +01:00
3c6e19b30b Curve/Surface Display: UV support 2018-01-10 10:11:32 +11:00
0f6ed7d111 Fix (unreported) potential crash.
RNA_pointer_as_string could return NULL instead of a valid string in some cases.
2018-01-09 19:51:50 +01:00
a0655ed487 Eevee: Fix AO in planar reflections. 2018-01-09 19:01:24 +01:00
8aaf7bc438 Eevee: Fix Planar probe refresh. 2018-01-09 18:59:13 +01:00
5fe87a0a8c Task scheduler: Use single thread branch when range fits into single chunk 2018-01-09 18:10:47 +01:00
4a3b303bb0 Task scheduler: Fix wrong tasks calculation when chunk size is too big 2018-01-09 18:07:34 +01:00
9135530f79 Eevee: Support for dupli lamps without shadows. 2018-01-09 18:01:56 +01:00
9f94f17ea4 Eevee: Fix crash with volumetrics. 2018-01-09 17:29:56 +01:00
6deb908a5c Merge branch 'master' into blender2.8 2018-01-09 16:15:33 +01:00
932d448ae0 Task scheduler: Use const qualifiers in parallel range 2018-01-09 16:09:33 +01:00
8cffb0a141 Task scheduler: Avoid over-allocation of tasks for parallel ranges
This seems to only cause extra rthreading overhead on systems with 10s of
threads, without actually solving anything.
2018-01-09 16:09:33 +01:00
c4e42d70a4 Task scheduler: Add minimum number of iterations per thread in parallel range
The idea is to support following: allow doing parallel for on a small range,
each iteration of which takes lots of compute power, but limit such range to
a subset of threads.

For example, on a machine with 44 threads we can occupy 4 threads to handle
range of 64 elements, 16 elements per thread, where each block of 16 elements
is very complex to compute.

The idea should be to use this setting instead of global use_threading flag,
which is only based on size of array. Proper use of the new flag will improve
threadability.

This commit only contains internal task scheduler changes, this setting is not
used yet by any areas.
2018-01-09 16:09:33 +01:00
3144f0573a Task scheduler: Simplify parallel range function
Basically, split it up and avoid extra abstraction level.
2018-01-09 16:09:33 +01:00
4c4a7e84c6 Task scheduler: Use single parallel range function with more flexible function
Now all the fine-tuning is happening using parallel range settings structure,
which avoid passing long lists of arguments, allows extend fine-tuning further,
avoid having lots of various functions which basically does the same thing.
2018-01-09 16:09:33 +01:00
d2708b0f73 Task scheduler: Get rid of extended version of parallel range callback
Wrap all arguments into TLS type of argument. Avoids some branching and also
makes it easier to extend things in the future.
2018-01-09 16:09:33 +01:00
1cab3be7a7 Significant step toward supporting IDProperties in new RNA diff code.
Still not fully working, more work TODO (IDProps are rather tedious to
handle in RNA... :/ ).

Partial fix of T53715: 2.8: Removing keymap items no longer works.
Some shortcuts can now be edited/deleted again, but some remain
mysteriously frozen!
2018-01-09 15:54:33 +01:00
2ee5e05107 DRWInstanceData: Bump the max data size. 2018-01-09 15:37:28 +01:00
35ac496dbd Gawain: Fix codestyle. 2018-01-09 15:37:00 +01:00
2bb08f0ad2 DRW & GPUViewport: Cleanup unused code. 2018-01-09 14:54:11 +01:00
377915b081 DRW: Make use of DRWInstanceData.
This modify the selection code quite a bit but it's for the better.
When using selection we use the same batching / instancing process but we draw each element at a time using a an offset to the first element we want to draw and by drawing only one element.
This result much less memory allocation and better draw time.
2018-01-09 14:54:11 +01:00
aa0097ad5e DRW: Add instance data memory manager.
This is a special memory manager that keeps memory blocks ready to send as vbo data.
Since we loose which memory block was used each DRWShadingGroup we need to redistribute them in the same order/size to avoid to realloc each frame.
This is why DRWInstanceDatas are sorted in a list for each different data size.
2018-01-09 14:54:11 +01:00
2237ee3ed7 Gawain: VBO: Add possibility to use external datablock.
Adds the possibility to specify the data buffer directly and precise ownership.
By not passing ownership to gawain the memory block can be reused.
2018-01-09 14:54:11 +01:00
b300fa4923 Gawain: Modify batch draw function to work with ranges.
This enables to draw the same vbo but only with a selected range. (useful for selection with instancing/batching)
2018-01-09 14:54:11 +01:00
f5d64b59f5 Fix T53691: Motion Tracking Object Solver Constraint doesn't work as Bone Constraint 2018-01-09 14:27:19 +01:00
bf8137994d Depsgraph: Move special handling of tracking constraints to a dedicated function 2018-01-09 14:11:23 +01:00
d32878b425 Depsgraph: Perform early check on constraint info NULL 2018-01-09 13:09:59 +01:00
83e84b2c2c Merge branch 'master' into blender2.8 2018-01-09 12:52:13 +01:00
ce0fcf1378 Correct error in last commit (versioning) 2018-01-09 15:17:00 +11:00
6554207841 Add deform axis for Simple Deform modifier
D2989 by @dmarra w/ own edits
2018-01-09 15:09:55 +11:00
375d27f230 Curve Edit Mode: Use curve handle theme colors 2018-01-09 13:30:30 +11:00
850f73638c install_deps: Fix OCIO always re-cloning its whole git repository. 2018-01-08 16:34:34 +01:00
c8a989d644 No groping in Blender's Tracker!
This a small cleanup of something which I think is just a typo anyway.

With all the recent talks of harrassment and groping, I think we better avoid
that within our source code! :)

Reviewers: sergey

Reviewed By: sergey

Tags: #motion_tracking

Differential Revision: https://developer.blender.org/D2979
2018-01-08 14:12:15 +01:00
3ee2ed3049 Fix T53612: Blender crashes on CleanTracks with 'DELETE_SEGMENTS' and a disabled marker
Simple fix, which is totally safe for 2.79a!
2018-01-08 14:10:50 +01:00
c26da06ae6 Merge branch 'master' into blender2.8 2018-01-08 09:39:32 +01:00
96e507d989 Fix T53509: Datablock ID Properties attached to bpy.types.Material are not loaded.
Stupid mistake in material reading code, thanks to Simon Wendsche (@BYOB) for the investigation and fix!

To be backported to 2.79a.
2018-01-08 09:37:56 +01:00
a7b4f98e73 Fix T53713: User remap failed w/ texface images 2018-01-08 16:58:58 +11:00
87607254d6 (Nodes) Display image name if any in the Image and Texture Image node title 2018-01-07 22:29:25 +01:00
add580beee Fix T47212: Luminance Key not working with HDR and out-of-gamut ranges.
Differential Revision: https://developer.blender.org/D2981
2018-01-06 16:41:39 +01:00
0e59f2b256 Fix T47212: incorrect luma coefficients for Luminance Key node.
Differential Revision: https://developer.blender.org/D2982
2018-01-06 16:41:33 +01:00
c6abf41f71 Fix T53650: remove hard limits on force field size and max distance.
Differential Revision: https://developer.blender.org/D2987
2018-01-06 16:15:13 +01:00
Dalai Felinto
84d4476eb1 Outliner: Rename "Master Collection Tree" to "Collections"
This is part of T53495.
2018-01-05 19:17:38 -02:00
Dalai Felinto
fb4cd136a7 Outliner: Support multiple-objects drag'n'drop into collections
We now can drag multiple objects at once in the outliner. You we restricted to
working within a single outliner. Be sure to drag from the objects name, not
from its icon (otherwise it will try to parent it).

We don't use the same drag'n'drop system as IDs here. Which although I dislike
allowed for this solution to be local, and not dependent on the entire
drag'n'drop system of Blender.

This is a feature Andy Goralczyk has requested a long time ago.
Kudos for him for his request.
2018-01-05 18:23:55 -02:00
Dalai Felinto
9d134a22c2 Cleanup: DNA comment regarding ID for collections in outliner 2018-01-05 17:32:22 -02:00
Dalai Felinto
a768aa6ec8 Fix drag and drop in outliner for scene collections
This technically reverts 176698b2eb.

Drag and drop for scene collections requires id for its poll function. However
we were passing the collection as id pointer for outliner_add_element
(which is ok since the function doesn't require a real ID).

I couldn't reproduce the original issue tackled by the forementioned commit so
I'm going ahead and bringing drag and drop back for scene collections.

Note: We already pass the ID for view layer collections as well since we brought
collections into groups.
2018-01-05 13:58:49 -02:00
Dalai Felinto
c5e01edeca Outliner: Fix for restriction columns
This is a partial revert of 1f5106de61.

First and firemost, for groups I was checking the wrong flag
(soops->flag & SO_GROUPS) instead of (soops->outlinevis == SO_GROUPS).

Second, the columns were entirely broken for things like Orphan Data.

Third, I tried to have different columns for different `outlinevis`, but we have
bones with only visible and select, modifiers with visible and render, render
passes with enable and another value ... I would rather stay away from this mess
at the moment, and stick to the more obvious bug fix.

Finally, there is a bug (not addressed here) where the whole line is selected,
regardless of the restriction column area. It should be fixed separately.
2018-01-05 11:42:10 -02:00
d73f74793e Eevee: Make Ogl render sampling more correct
Result is less noisy ogl renders.

What this patch does:
- the draw loops gets accumulated into the output buffer.
- disable TXAA persmat jittering in ogl render since ogl render already does that.
- make noise texture update correct accross all draw loops. Previously it was reset between each FSAA samples.
2018-01-05 10:25:28 +01:00
9a00d57371 DRW: Add viewport argument to DRW_draw_render_loop_offscreen
This way we can have persistent data accross different calls.
2018-01-05 10:25:28 +01:00
6eb89027c3 Fix T53696: Compositor HSV limits changed 2018-01-05 20:13:17 +11:00
9be32ac5fe Fix manipulator crash when modal operator doesn't run 2018-01-05 14:53:10 +11:00
Dalai Felinto
a9e3ac906e Merge remote-tracking branch 'origin/master' into blender2.8 2018-01-04 15:57:48 -02:00
Dalai Felinto
95d83b9b23 Fix leak when rendering OpenGL animations
We were duplicating rectf twice :/

Patch by Clément Foucault.
2018-01-04 15:56:43 -02:00
0becc8a7dd Fix T52953: Crash removing material 2018-01-04 21:35:09 +11:00
205978a489 Eevee: Fix AO applied twice on glossy shader when using OGL render
Seems to be a compiler bug. This is really strange.
I just rephrased the whole thing and it appears to work.
2018-01-04 10:43:54 +01:00
4df11e3c70 Eevee: SSR: Fix ssr nor working in ogl render. 2018-01-04 10:43:54 +01:00
5ab2fc65c6 DRW: Fix boolean uniform lenght.
Boolean uniform needs to be 4bytes long for opengl.
Use "int" for every bool you want to pass as a uniform.
2018-01-04 10:43:54 +01:00
b4ad0151c3 Eevee: Fix issues with alpha blending
- Hashed Alpha materials were outputing their alpha values even if the final pixel has no blending and thus no transparency.
- Opacity was not clamped when using "add closure" nodes.
2018-01-04 10:43:54 +01:00
bbf810f969 DRW: Fix incorrect blending functions. 2018-01-04 10:43:54 +01:00
2b678db3fe Eevee: Make the background black when rendering without sky.
This prevent some bad blending when using transparent materials.
2018-01-04 10:43:54 +01:00
cbe9098bf9 OGL Render: Use float buffer instead of byte buffer.
We need to remove all transform to display during rendering for this to work. The float rect is then color managed when displayed.

This makes all interface colors wrongly displayed because they should be color managed when rendering.
2018-01-04 10:43:54 +01:00
c79216d77d GPU_offscreen: Add option for high bit depth.
This way we can render in HDR and read the real pixel values.
2018-01-04 10:43:54 +01:00
6b2989ae75 DRW: Fix small changes to transparent background.
Fix changes introduced e3ef782af5

Eevee is in charge of rendering so it should be its task to have it's buffer initialized
2018-01-04 10:43:54 +01:00
5a6a819b5d Merge branch 'master' into blender2.8 2018-01-04 10:36:50 +01:00
727aab5af4 Fix uninitialized stack use in rna diff override 2018-01-04 16:15:31 +11:00
457dc8d12c Fix T53586: Surfaces collapse when joined 2018-01-04 16:01:27 +11:00
9b65560934 Fix T53637: Keymap from app-template ignored
Addon's were also ignored
2018-01-04 14:19:00 +11:00
7fc1f42aae tests: limit public API in view_layer_common 2018-01-04 11:57:45 +11:00
ea55af2163 tests: replace boiler-plate with util function
This crept back in somehow!
2018-01-04 11:28:46 +11:00
Dalai Felinto
e1cbac715a Fix FOREACH_SCENE_COLLECTION/FOREACH_SCENE_OBJECT for nested collections
This fixes any function that relied on these iterators such as:
* Outliner Same Type
* Metaballs
* scene.objects

We were not considering the collections when there was collections nested
to the collections nested to the master collection.

It includes a unittest.
2018-01-03 19:33:00 -02:00
Dalai Felinto
10f0635d32 Outliner/Collections: Remove selected objects operator
This is part of T53495.
2018-01-03 18:27:42 -02:00
Dalai Felinto
eaf559d52a Outliner/Collections: Add selected objects operator
This is part of T53495.
2018-01-03 18:27:06 -02:00
Dalai Felinto
d9b4d6ee5a Outliner: Right mouse menu for collections editing 2018-01-03 12:28:01 -02:00
8a72c3baef Static assert for correct strings from context mode enum.
Adding new context modes requires adding a string in CTX_data_mode_string,
but there is no error when omitting this other than panels using
incorrect contexts. The static assert should help detect simple
missing strings at least to avoid confusing errors.
2018-01-03 13:15:33 +00:00
f20bb6c63f Merge branch 'master' into blender2.8 2018-01-04 00:09:10 +11:00
25418be97e build deps: llvm new website download locations 2018-01-03 14:52:25 +02:00
be40389165 Merge branch 'master' into blender2.8 2018-01-03 23:44:47 +11:00
Dalai Felinto
ffb2c40176 New API function to call an existing menu
Thanks Campbell Barton for the help and review.
This is for Blender 2.8, so we are not using this function yet.
2018-01-03 10:17:59 -02:00
e981a7de31 Missing from last commit 2018-01-03 22:01:40 +11:00
2f8c2572ed Fix T53632: Objects outside scene shown in popup
Only show objects in current scene when not pinned.

This commit adds a filter argument to id-template
since we may want to filter by other criteria.
2018-01-03 21:54:02 +11:00
cbc7aa80d4 Fix T53678: Smart Project UV margin ignores units 2018-01-03 16:10:41 +11:00
060fdb49d6 Fix an error on last commit
`count` here is multiplied by 4.
2018-01-02 23:44:01 -02:00
2a57a46441 Fix crash when you change the curve resolution in Edit Mode of the Blender Render engine
Same problem as previous commit, but now in `drawobject.c`.
Also added a comment to the equivalent line in `draw_cache_imp_curve.c`.
2018-01-02 23:31:28 -02:00
6c46dff50d Curve Edit Mode: Fix crash when the U-resolution of the curve is changed
`normal_len` did not follow the value of the loop that is executed to add the vertices, being different from the vbo size
2018-01-02 23:09:51 -02:00
b3c4e30a7c Fix: MSVC2013 compile problems with the "inline" keyword 2018-01-03 12:59:10 +13:00
c621832d3d Cycles: CUDA support for rendering scenes that don't fit on GPU.
In that case it can now fall back to CPU memory, at the cost of reduced
performance. For scenes that fit in GPU memory, this commit should not
cause any noticeable slowdowns.

We don't use all physical system RAM, since that can cause OS instability.
We leave at least half of system RAM or 4GB to other software, whichever
is smaller.

For image textures in host memory, performance was maybe 20-30% slower
in our tests (although this is highly hardware and scene dependent). Once
other type of data doesn't fit on the GPU, performance can be e.g. 10x
slower, and at that point it's probably better to just render on the CPU.

Differential Revision: https://developer.blender.org/D2056
2018-01-02 23:50:18 +01:00
6699454fb6 Cycles: make CUDA code a bit more robust to host/device alloc failures.
Fixes a few corner cases found while stress testing host mapped memory.
2018-01-02 23:46:19 +01:00
Dalai Felinto
07de8eff77 Layers/Collections: Fix crash when deleting collection
If the collection to be deleted has a nested collection that is directly linked
to a view layer, we were getting a crash.
2018-01-02 18:19:26 -02:00
Dalai Felinto
8300b5e539 Layers: Fix operator_context unittest
This was broken since 70cdc8412c when we changed the requirement for context
scene collection to be part of context view layer.
2018-01-02 17:42:23 -02:00
Dalai Felinto
f3566235ca Layers: Fix collection_rename unittest
This was broken since c9cb5dc3da when we supported same name for
non-sibling collections.
2018-01-02 16:59:30 -02:00
Dalai Felinto
a9fe94245b Outliner: Master Collection always expanded
This is part of T53495.

This makes sure the master collection is always expanded and you don't even get
the expand/collapse icons for it.

This is only for the Collecions (currently Master Collection Tree) option, not
for active view layer.
2018-01-02 14:40:33 -02:00
Dalai Felinto
e1238bcced Outliner: Always show the master collection on top of the tree
This reverts commit 0d0d68d39d with extra changes.

This is part of T53495.
2018-01-02 13:10:45 -02:00
Dalai Felinto
e8c737d7c2 Outliner/Collections: Don't link a collection after creation 2018-01-02 13:10:45 -02:00
e84966ac42 nstall_deps: llvm downloads new website location
Patch by Lucas Walter (@lucasw), thanks.

Reviewers: mont29

Reviewed By: mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D2983
2018-01-02 15:23:45 +01:00
e59cf13b8c fix T53230: avoid Nullpointer problems in Collada Exporter 2018-01-01 15:02:26 +01:00
ac934efc5e Build: fix make deps TBB on Linux, older versions don't support GCC 7. 2017-12-30 00:07:33 +01:00
6a225a283e Build: fix make deps OpenSubdiv build on Linux. 2017-12-29 22:53:32 +01:00
Dalai Felinto
bbbdb27d65 Outliner/Collection: Interface for Master Collection Tree
This is part of T53495.

This adds an Edit menu and remove the buttons.
2017-12-29 13:38:28 -02:00
Dalai Felinto
4d08ef822c Outliner/Collection: Operator to delete selected collections
This is part of T53495.

This operator is actually using existing code. The only new thing about it is
that it has a shortcut.

It will be exposed in the UI soon together with the nested collection operator.
2017-12-29 13:37:27 -02:00
Dalai Felinto
8252a414d8 Outliner/Collection: Operator to create (nested) collections
This is part of T53495.

This operator is intended for the outliner when viewing Collections (at the moment, Master Collection Tree).
It has a shortcut "C", and will be added to a menu shortly.
2017-12-29 13:36:55 -02:00
Dalai Felinto
a6c69ca57f Fix T53513: Particle size showing in multiple places
Technically this was introduced in 01b547f993 when
exposing size and randomness for particles.

This "fixes" makes sure particle size and size randomness is always in the
Render panel when it affects the particle system (i.e., always unless using
advanced hair or hair that is not rendering groups/objects).
2017-12-29 13:17:55 -02:00
Dalai Felinto
f2a24afe8c Fix T53647: Outliner crashes when active object is deleted
Based on patch by Philipp Oeser (lichtwerk).
2017-12-29 09:55:13 -02:00
08b063a19f Fix T53639: text sequence strips no stamped into render.
Differential Revision: https://developer.blender.org/D2977
2017-12-29 00:25:29 +01:00
7a6967cbe6 Fix mistake in previous fix for T53600, shows we really need a smarter solution. 2017-12-29 00:07:49 +01:00
17f1ce4d4f Fix T53630: Effect strips not displaying Input data.
Fix T52977: Parent bone name disappeared in the UI in pose mode.

Regression caused by own rBc57636f060018. So instead of changing widget
type, just flag it as disabled.

Note that core of the issue is elsewhere though - there is absolutely no
reasons to have a search widget for pointers we cannot change nor
search! But fixing this is not really top priority, one of the many
glitches of our UI code, so think we can live with current code.

To be backported to 2.79a.
2017-12-28 17:57:18 +01:00
Dalai Felinto
2b7f36300e RNA cleanup: Argument names + tooltip for scene_collection.collections.remove() 2017-12-28 12:53:54 -02:00
Dalai Felinto
70cdc8412c Context: Fix scene_collection
We now allow for scene collection that is not currently linked to view layer.
2017-12-28 12:24:13 -02:00
Dalai Felinto
dfd7b0d07a RNA: scene_collection.collections.new() name optional
We already have a fallback naming system when no naming is given, we should use that.
2017-12-28 12:23:37 -02:00
Dalai Felinto
8620dd7adf Cleanup after collection rename commit
Related to c9cb5dc3da.
2017-12-28 09:23:35 -02:00
Dalai Felinto
c9cb5dc3da Collections: Allow collections from different "parents" to have the same name
This allows users to have "Support", "Rig", "Characters" collections nested to
different collections without having to resort to "House.Rig", "House.Characters"
or "Rig.001", "Characters.003" :/

This is part of T53495.
2017-12-27 19:45:37 -02:00
Julian Eisel
7dee0bbf06 Fix missing redraws when changing active view-layer or its name
Also removed unnecessary `struct` keywords.
2017-12-27 17:08:00 +01:00
Dalai Felinto
110373de6a Fix T53638: View layer renaming crashes 2/2
This fixes renaming the view layer via Python.

This bug was introduced originally in 3a95bdfc65. Although I suspect it was
around for longer, since this commit didn't touch this part of the code.

But basically we need the id of the RNA property to be the one that owns
the data (view layer).
2017-12-27 13:39:28 -02:00
Dalai Felinto
b517dc9b2d Fix T53638: View layer renaming crashes 1/2
This fixes renaming via the interface.

This bug was introduced originally in 9515737b55. We need the id of the RNA
property to be the one that owns the data (view layer).

So it can't be the window's id, but the scene one instead.
2017-12-27 13:37:38 -02:00
Dalai Felinto
bd80ace2da Depsgraph: Fix copy-on-write assert when freeing Freestyle config
We were bumping user count when duplicating viewlayer and its freestyleconfig
depending on the flag, however when freeing we were always decreasing user
count.

This fixes this and get rid of the assert when running:
`--factory-startup --enable-copy-on-write`

And closing Blender.
2017-12-26 13:31:48 -02:00
948515c21a Fix T53600: Cycles shader mixing issue with principled BSDF and zero weights.
SVM nodes need to read all data to get the right offset for the following node.
This is quite weak, a more generic solution would be good in the future.
2017-12-25 23:59:20 +01:00
e8e92dffed Fix T53607: Cycles normal map baking problem when there is no bump. 2017-12-25 23:05:45 +01:00
7e4568a939 Cleanup - Various style/typo fixes 2017-12-23 23:54:05 +13:00
Dalai Felinto
fe1e2c2f89 Collections: deletea collection move objects to master collection if users=0
The mental model is that a scene collection is a small wrap on top of the master
collection, so all objects are in the master collection at all times.

When we remove a collection there is no reason to remove an object. So if the
object was not linked to any other collection, we add link it to the master one.
2017-12-22 19:18:21 -02:00
d130c66db4 Fix scalability issue in threaded code of Mesh normals computation.
We tried to do as much as possible in a single threaded callback, which
lead to using some nasty tricks like fake atomic-based spinlocks to
perform some operations (like float addition, which has no atomic
intrinsics).

While OK with 'standard' low number of working threads (8-16), because
collision were rather rare and implied memory barrier not *that* much
overhead, this performed poorly with more powerful systems reaching the
100 of threads and beyond (like workstations or render farm hardware).

There, both memory barrier overhead and more frequent collisions would
have significant impact on performances.

This was addressed by splitting further the process, we now have three
loops, one over polys, loops and vertices, and we added an intermediate
storage for weighted loop normals. This allows to avoid completely any
atomic operation in body of threaded loops, which should fix scalability
issues. This costs us slightly higher temp memory usage (something like
50Mb per million of polygons on average), but looks like acceptable
tradeoff.

Further more, tests showed that we could gain an additional ~7% of speed
in computing normals of heavy meshes, by also parallelizing the last two
loops (might be 1 or 2% on overall mesh update at best...).

Note that further tweaking in this code should be possible once Sergey
adds the 'minimum batch size' option to threaded foreach API, since very
light loops like the one on loops (mere v3 addition) require much bigger
batches than heavier code (like the one on polys) to keep optimal
performances.
2017-12-22 22:12:23 +01:00
Julian Eisel
8ed1c61642 Correction to previous commit: Pass MakePrimitiveData to make_prim_finish 2017-12-22 18:53:26 +01:00
Julian Eisel
10390ca057 Cleanup: Encapsulate primitive creation data into struct, remove unused argument
Should make it easier to add new and modify existing parameters.
2017-12-22 18:27:25 +01:00
Julian Eisel
430070938c Fix manipulators not updating when changing workspace view-layer
There are more issues when changing view-layer (esp. with edit-mode).
2017-12-22 17:04:00 +01:00
6efd58dd3e Task scheduler: Clarify why do we need an atomic add of 0 2017-12-22 16:37:25 +01:00
Dalai Felinto
c08dac000f Collection: Name collection based on parent's name
So they are:

House
 -> House 1
 -> House 2
 -> ...

The exception is when the parent collection is the master collection. In this case we get:

Master Collection
 -> Collection 1
 -> Collection 2
 -> ...

This is part of "T53495: View layer and collection editing - Design Task"
2017-12-22 11:41:09 -02:00
870840e8b7 Subsurf: Avoid possible use of partially initialized edge hash 2017-12-22 12:51:00 +01:00
df0ecd73af Subsurf: Avoid global lock for loops and orig index layers
This is a bit annoying to have per-DM locking, but it's way better (as in, up to
4 times better) for playback speed when having lots of subsurf objects,
2017-12-22 12:50:57 +01:00
50f1c9a8af Task scheduler: Start with suspended pool to avoid threading overhead on push
The idea is to avoid any threading overhead when we start pushing tasks in a
loop. Similarly to how we do it from the new dependency graph. Gives couple of
percent of speedup here, but also improves scalability.
2017-12-22 12:25:11 +01:00
Dalai Felinto
fec3be6b54 T53610: Crash opening file with linked particles
I could done a subversion bump, but I found a safe way to avoid it.
It leads a bit of an ugly code, but once we bump the subversion
next time we can clean it up easily.
2017-12-21 23:25:27 -02:00
d2ea9c2063 Fix typo in previous commit 2017-12-21 17:19:07 +01:00
a7efdc14a1 Merge branch 'master' into blender2.8 2017-12-21 17:17:27 +01:00
c66983c5c8 Depsgraph: Sort and clam number of statistics entries
Makes log easier to read.
2017-12-21 17:16:18 +01:00
Dalai Felinto
b89f2276e5 Implement duplicator viewport/render visibility options
This allows a duplicator (as known as dupli parent) to be in a visible
collection so its duplicated objects are visible, however while being
invisible for the final render.

An object that is a particle emitter is also considered a duplicator.

Many thanks for the reviewers for the extense feedback.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2966
2017-12-21 13:43:24 -02:00
103dd66057 Merge branch 'master' into blender2.8 2017-12-21 16:36:02 +01:00
885bb5b137 Depsgraph: Bring timing statistics to the new dependency graph
This statistics is only collected when debug_value is different from 0.

Stored in depsgraph node itself, so we can always have access to average data
and other stats which requires persistent storage. This way we also don't waste
time trying to find stats from a separately stored hash map.
2017-12-21 16:33:22 +01:00
d988eae6f9 Depsgraph: Make it more clear that we dump relations into graphviz
We might implement other things to dump into graphviz, so better to
start having explicit names.
2017-12-21 16:33:22 +01:00
b7121639e9 Depsgraph: Simplify some functions in evaluaiton 2017-12-21 16:33:22 +01:00
f0a5dc63ff Depsgraph: Simplify evaluation function 2017-12-21 16:33:22 +01:00
bf1dc39679 Fix T53567: Negative pixel values causing artifacts with denoising
Now negative color values are clamped to zero before the actual denoising.
2017-12-21 14:24:23 +01:00
b38c083259 Merge branch 'master' into blender2.8 2017-12-21 12:17:48 +01:00
41b29c69c0 Depsgraph: Fix mistake in previous commit 2017-12-21 12:16:12 +01:00
00062e08ee Merge branch 'master' into blender2.8 2017-12-21 12:00:06 +01:00
6e47680077 Depsgraph: Remove confusing declaration of node method
it is only to be implemented for operation node.
2017-12-21 11:58:48 +01:00
681a102800 Depsgraph: Remove one of temporary tags in the node
No real reason to have that, better to free up space for something much more
awesome!
2017-12-21 11:47:34 +01:00
5df4950073 Depsgraph: Cleanup, move implementation away from header 2017-12-21 11:35:10 +01:00
9f0d067c2e Merge branch 'master' into blender2.8 2017-12-21 11:17:34 +01:00
f6b2fbb029 Depsgraph: Remove evaluation priority completely 2017-12-21 11:15:21 +01:00
f906f5cc58 Depsgraph: Remove eval priority from debugger
This needs to be redone anyway, to correspond to possibly new priorities
calculated for evaluaiton.
2017-12-21 11:14:39 +01:00
0ed3a72012 Depsgraph: Remove unused component context functions 2017-12-21 10:37:00 +01:00
Dalai Felinto
e3ef782af5 Fix for T53599: OpenGL render with transparent background
I had to make Eevee draw its scene in the scene pass (before it was doing it
in the background pass). This is not ideal since reference images require
a separation between scene and background.

But it's the best way to solve it now. Clay is working fine.
2017-12-20 16:05:47 -02:00
93b2871cf5 Depsgraph: Remove node class stored in both type info and node
This is something deliver form node type, there is no reason to try cache it
anywhere, especially since it's not used in any performance critical code.

Lighter weight dependency graph is what we want.
2017-12-20 17:54:52 +01:00
5650fe77e4 Cycles: Cleanup, indentation 2017-12-20 17:42:50 +01:00
03a589125f Merge branch 'master' into blender2.8 2017-12-20 16:46:28 +01:00
e5b92cd63e Depsgraph: Remove unused incldues 2017-12-20 16:45:10 +01:00
9eb46fc22b Fix compilaiton error in debug mode
The structure was just calloc-ed, no need to check for anything. It's all zeroes!
2017-12-20 16:41:51 +01:00
a52452c043 Merge branch 'master' into blender2.8 2017-12-20 16:40:49 +01:00
3474db4b37 Depsgraph: Move ID node to own file 2017-12-20 16:35:48 +01:00
f87c157f22 Depsgraph: Move time source node to own file 2017-12-20 16:29:13 +01:00
b2ef042793 Depsgraph: Print some statistics about transitive reduction 2017-12-20 16:19:40 +01:00
f2aacfc943 Depsgraph: Make transitive reduction to work 2017-12-20 16:16:28 +01:00
5b1404f066 Depsgraph: Add utility function to unlink relation from graph 2017-12-20 16:15:55 +01:00
1e236deab3 Depsgraph: Remove unused priority calculator
While it sounds useful, in practice it was rather causing
extra overhead and was slowing things down.
2017-12-20 15:53:39 +01:00
65128d296c Depsgraph: Remove remaining parts of old removed debugger 2017-12-20 15:50:22 +01:00
b1a036861d Fix T53572: Alembic imports UV maps incorrectly
Since in Alembic the loop order seems to be reversed when exporting and
importing, and this was the only place where it was not, I was thinking
to match this to the convention of reversing the loop order as well.

Reviewers: sybren, kevindietrich

Tags: #alembic

Differential Revision: https://developer.blender.org/D2968
2017-12-20 10:55:02 +01:00
94a3ee56c7 Fix MSVSC2017 error
The last compiler version needs this include
2017-12-20 10:23:12 +01:00
d0ac5d3810 Cleanup: remove unnecessary tooltip line limit
Also add TODO for possible future changes.
2017-12-20 17:20:33 +11:00
f6766c31cf Manipulator: clear tooltip for click actions too 2017-12-20 17:13:54 +11:00
5b364dd780 Manipulator: tooltip support
Currently operators and properties are used.
2017-12-20 16:40:53 +11:00
3143b2f942 Merge branch 'master' into blender2.8 2017-12-20 15:06:22 +11:00
51f0c3fadf UI: move tooltip API to public header 2017-12-20 14:58:06 +11:00
Julian Eisel
b0d61ea770 Fix crash in RNA when accessing empty property_tags list
E.g. running `bpy.context.active_object.cycles.bl_rna.property` in the
console would crash.

Thanks @lijenstina for reporting!
2017-12-19 20:56:14 +01:00
Dalai Felinto
b3bcbc9e85 Fix T53442: Outliner refresh issues when adding new collection
Notifier is getting through, yet tree wasn't rebuilding until
we force redraw by resizing the outliner.

Thanks to Danrae Pray (@spockTheGray) for looking at this issue.
2017-12-19 14:33:27 -02:00
433c74d9f7 bpy_extras: add missing colorband keymap to keyconfig_utils.py
fixes failing ctest script_load_keymap
2017-12-19 08:04:17 -07:00
7e8525663c Font objects: Support proper auto-space
Annoyingly, need to convert vfont to nurbs, do minmax and toss nurbs away.
This is likely to be fine, since this function is not intended to be used
a lot, and this is the only way to get more meaningful result.

However, it's not very clear what to do with font on curve.

This fixes rendering of font object with auto texture space in Cycles
introduced in c34f3c7.

It is probably possible to introduce new mode to vfont_to_curve which
will do boundbox without extra allocations, but that's more like an
optimization.

Reviewers: campbellbarton, mano-wii

Reviewed By: campbellbarton

Subscribers: zeauro

Differential Revision: https://developer.blender.org/D2971
2017-12-19 15:55:56 +01:00
ab1af38c74 Cycles: Fix crash opening user preferences after adding extra GPU
We can not store pointers to elements of collection property in the
case we modify that collection. This is like storing pointers to
elements of array before calling realloc().
2017-12-19 15:51:28 +01:00
Dalai Felinto
672c9a9a6d Fix T53583: Crash when instancing a group with an armature
There is still a crash that you get because the draw manager needs to
handle duplis differently.

But the initial assert caused by this particular file is now fixed.
2017-12-19 10:46:37 -02:00
2bbfce631d Merge branch 'master' into blender2.8 2017-12-19 13:42:01 +01:00
b6b9351371 Tracking: Add missing animation path fix after renaming tracks 2017-12-19 13:39:37 +01:00
e1921ed871 Tracking: Add utility function to get RNA path prefix for given track
Some code could be de-duplicated with the full path case, but that's
for another rainy day i guess.
2017-12-19 13:09:39 +01:00
9fa021cdaf Tracking: Disable animation of auto-keyframe option 2017-12-19 12:59:52 +01:00
61c218fe7d Tracking: Add missing animation fix when deleting plane track 2017-12-19 12:58:42 +01:00
883e342bdb Tracking: Fix possible numerical overflow 2017-12-19 12:52:20 +01:00
28970b6ed2 Fix T53523: Keyframes for Marker weight stay, even if the track itself is deleted
Was using wrong prefix for the RNA path fix.
2017-12-19 12:51:45 +01:00
92197c24f0 Tracking: Use new RNA path utility functions 2017-12-19 12:48:53 +01:00
cf90b11d68 Tracking: Add utility function to get RNA path for given track 2017-12-19 12:45:23 +01:00
f62de28972 Depsgraph: Fix nexted node trees being tagged with wrong flag 2017-12-19 12:37:57 +01:00
43dcf804bd Tracking: Remove duplicated functions 2017-12-19 12:22:34 +01:00
1818aa3b24 Tracking: Add plane tracks equivalents to previous commit 2017-12-19 12:18:52 +01:00
e598e55edd Tracking: Add utility function to get tracks list for given track 2017-12-19 12:14:26 +01:00
adaeb14b3e Tracking: Add utility function to find tracking object from a given track 2017-12-19 12:13:57 +01:00
71c93624e2 Cleanup: Don't use camel case for variable names 2017-12-19 11:53:11 +01:00
6cbdde1ba1 Fix T53400: DEG tagging is freeing Irradiance Grid when selecting objects
Ignore selection related recalc in Eevee ID update callback.
2017-12-19 11:46:53 +01:00
4045a51a11 Depsgraph: Rework tagging and flushing routines
The goal is: have id->recalc flags set to components which got changed.
To make it possible for render engines to check on a more granular basis
what changed in the object. For example, is it a transform which changed
or is it just some ID property changed which has nothing to do with rendering.

The tricky part is: we don't want duplicated logic in tagging and flushing.
In order to avoid this duplication, we store ID recalc flag in the component
node type information. That type information could easily be accessed by both
tagging and flushing routines.

Remaining part of the changes are related on changing the way how tagging
works. The new idea here is to have utility function which maps update tag to
a component. This way we can easily set ID recalc flags right away. Without
any duplication of ID recalc flags set in multiple flag handler functions.

With all this being said, there should be no user measurable difference for
now, it's a gigantic basement for some upcoming work and fixes.
2017-12-19 11:37:22 +01:00
e4849ad3a6 Depsgraph: Preliminary work to make components to ID recalc flags 2017-12-19 11:37:14 +01:00
3500274d9c Add more granular ID recalc bits
Only bits for now, unused. Just to keep upcoming patches smaller.
2017-12-19 11:36:58 +01:00
0ebf69287a Merge branch 'master' into blender2.8 2017-12-19 10:05:04 +01:00
c34f3c777f Fix T53559: Auto texture space for text and font is wrong in Cycles
The issue actually goes a bit deeper, converting curve to mesh will
change texture space just because font and bezier curves are using CV
to calculate texture space.

So now when those objects are converted to mesh, we disable auto
texture space and copy evaluated space over.
2017-12-19 10:01:00 +01:00
a130c82f0a Cycles tests: Enable texture space tests 2017-12-19 09:54:23 +01:00
9d69b3d48b Merge branch 'master' into blender2.8 2017-12-19 19:42:11 +11:00
77c62c7793 UI: split out button checks from tooltip creation
Allows to make tooltips from other kinds of data.
2017-12-19 19:34:16 +11:00
e288afe110 Merge branch 'master' into blender2.8 2017-12-19 08:57:34 +01:00
a0fa404deb Fix T53547 for real now
Original fix was assuming that particle init operation is updated on every
frame, which is wrong behavior and that was fixed in previous commit to the
original bugfix.
2017-12-19 08:56:11 +01:00
891a3762ce Manipulator: ui-scale support for navigate widget 2017-12-19 17:14:52 +11:00
01850f0928 Manipulator: 3D view navigation improvements
- Highlight's were too intense/distracting
  use more subtle alpha (consistent with the rest of our UI).
- Don't fill center cube (only draw edges).
- Draw widget while interacting since this is helpful in some cases.

Thanks to @jbakker for suggestions.

Also change axis hotspots so the nearest is always selected
for quicker axis picking (relies on dragging any axis to orbit).
2017-12-19 15:28:01 +11:00
f03660bb84 Correct axis mapping logic 2017-12-19 14:36:22 +11:00
cfd1b48492 Merge branch 'master' into blender2.8 2017-12-19 14:15:19 +11:00
e418c858ab 3D View: use shortest angle between quaternions
Gave incorrect smoothview speed changing between some axis and
axis locking.
2017-12-19 14:05:54 +11:00
7a58ff928c Math Lib: signed versions of quaternion angle
There was no simple way to get the shortest quaternion angle.
2017-12-19 14:03:29 +11:00
5df597171b Manipulator: Support click only manipulator's
Makes the 3D view navigation widget easier to use: dragging anywhere
in the rotation region now rotates without having to avoid the XYZ axis
hotspots which only activate on a single click.

Logic for drag detection is complicated by manipulators reliance
on keeping the modal operator running.
Currently this is wrapped in an ifdef,
we may want to implement it differently later.
2017-12-19 12:49:02 +11:00
12bc63a0fe Manipulaor: de-duplicate finish call 2017-12-19 12:46:36 +11:00
02abb17ae2 Forgotten on last commit 2017-12-18 23:24:12 -02:00
24ca903f6d Draw Manager: draw_cache_imp_displist, always return IndexBuf even when there is no index
This prevents possible errors with materials and a crash with low resolution metaball.
Also a small cleanup was done in the code.
2017-12-18 23:17:55 -02:00
bb30ce0f0b Fix T53474, bevel glitchy with big objects.
A comparison should have not just have been against an epsilon,
but relative to the edge length involved.
Thanks to mano-wii for patch on which this is based.
2017-12-18 12:24:42 -05:00
57f2cc918b Depsgraph: Cleanup, line length 2017-12-18 16:55:04 +01:00
e57fe5cd95 Depsgraph: Use named typedef for tag 2017-12-18 16:53:12 +01:00
94d34ae205 Depsgraph: Cleanup, typo in comment 2017-12-18 16:52:46 +01:00
90021402e2 Merge branch 'master' into blender2.8 2017-12-18 16:51:05 +01:00
443789d7c6 Depsgraph: Add facilities to store what ID recalc flag component corresponds to
The idea is to de-duplicate logic in DEG_id_tag_update() and flushing where we
need to translate depsgraph tag or component type to ID level recalc flag.

Currently unused, but is required for Blender 2.8.
2017-12-18 16:46:32 +01:00
9e424faec6 Add dedicated named constant for no ID recalc flag 2017-12-18 16:40:18 +01:00
fbfb35741c Merge branch 'master' into blender2.8 2017-12-18 16:36:23 +01:00
342226a670 Depsgraph: Synchronize flushing with 2.8 branch
Not only this helps merges form master to the branch, but also:

- Allows us to production-check changes as soon as possible.
- Avoids some unnecessary editors update about ID changes.
- Adds small optimization on queue size by always keeping one of the pointers
  outside of the queue.
2017-12-18 16:33:12 +01:00
c46a9d8117 Merge branch 'master' into blender2.8 2017-12-18 16:19:12 +01:00
344eff9c48 Depsgraph: Add query API to traverse all dependent IDs of the given ID 2017-12-18 16:15:47 +01:00
c5d9eb88e2 Depsgraph: Replace iteration over ghash with iteration over flat array 2017-12-18 16:14:50 +01:00
8fe556a337 Depsgraph: Introduce flat list of ID nodes
The idea is to allow iterating over ID nodes in exact order of their
construction, and in order which will not change dependent on memory
pointers or anything.
2017-12-18 16:10:22 +01:00
1fb43dcd5a Fix bad merge happened at some point 2017-12-18 16:04:06 +01:00
a41fe949d8 Fix T53398: Surface deform modifier says that convex polygons are concave for big faces
Dot-product for angle check need either to be divided by vectors magnitude or be
calculated for normalized vectors.
2017-12-18 15:16:22 +01:00
5566a88873 Static Override: better handling in ID template.
Now we stick to a single button, when data is directly linked, clicking
on it will make a local copy, while shift-clicking on it will make a
static override.

When data is a static override, icon is the DATA_OVERRIDE one, and clicking
on the button will make it a fully borring local data-block.
2017-12-18 12:29:08 +01:00
ec6e490bb8 Add override icon to such data-blocks in OUtliner. 2017-12-18 12:02:23 +01:00
4c9f303eba Add macros to check whether an ID is a static override or has a template for it. 2017-12-18 12:01:50 +01:00
98aa51ffa1 blender_icons_update script: run Blender in factory startup.
Can avoid some stupid issues with custom addons etc.
2017-12-18 10:47:02 +01:00
9052db809f Add basic 'override' icon.
This is just the 'linked' icon with top-down arrow instead of left-right
one, if any graphist feels more inspired... ;)

Note that this is 'new inkscape' version of the svg file, hope
everything is alright (it does change all icons whe re-exporting :/ ).
2017-12-18 10:44:20 +01:00
7ab8c90686 Serious cleanup/refactor/fixing of new RNA comparison code.
Code also handling auto-generation of static overrides.

Aside from some naming consistency cleanup, this commit:

* Is the first step addressing the 'operator' issue with static
overrides, by implementing a first version of the 'restore from
reference' behavior.

* Fixes several issues that were discovered on the way in enhanced
RNA comparision code, like the 'zero-length dynamic array' case, or some
infinite looping caused by some non-ID pointers (that for some
mysterious reasons did not show up previously...).

* Factorizes a bit said RNA comparison code (auto-static override
generation and comparison/check were essentially doing the same thing).
2017-12-18 10:13:43 +01:00
994648a674 RNA: add new property falg for pointers (and collection), 'NO_OWNERSHIP'.
This flag means that the pointer does not 'own' the data it references.
This is the case of nearly all ID RNA pointers (NodeTrees will probably
again be some nasty exception here :( ), but also several other cases.

That kind of information is mandatory for complex processing over whole
data-blocks done in RNA, like some static override tasks (advanced
comparison...).
2017-12-18 10:08:22 +01:00
076616898b Fix T53577: Rake sculpt/paint wrong on first step 2017-12-18 14:35:15 +11:00
c2ad5e805a Fix triangles indexbuf of Curve Displists was being discarded incorrectly
They were discarded when shaded surfaces were requested thus bringing glitches to the outline of the selected Displists Objects
2017-12-16 22:22:21 -02:00
3713de163e Fix triangles of the Displists were being drawn in the opposite direction 2017-12-16 21:58:16 -02:00
342a322a93 CMake: bump minimum version to 3.5 2017-12-17 01:04:05 +11:00
45434c75a0 Manipulator: change cursor for navigation axis
Wasn't easy to see
2017-12-16 19:28:39 +11:00
625d72ed48 Manipulator: draw 2d manipulators over view border
Needed so passepartout doesn't cover 2d manipulators.
2017-12-16 19:05:27 +11:00
d855fc4dad App Template: use manipulator flag
So templates can enable manipulators.
Also remove invalid enum set.
2017-12-16 18:36:49 +11:00
468ac90317 Manipulator: view3d navigation buttons
Added for Blender101 template.
Disabled by default, enable as a preference.

Exposes rotate, pan, zoom, persp-ortho & camera toggle.
2017-12-16 04:21:30 +11:00
c2cc42742d Manipulator: support single press button actions
While not the main purpose of manipulators, it's handy to be able
to use operators without modal callbacks sometimes.
2017-12-16 04:08:37 +11:00
68ffb2a267 Merge branch 'master' into blender2.8 2017-12-15 17:55:23 +01:00
50ef25d73f Depsgraph: Cleanup, remove unused function 2017-12-15 17:47:15 +01:00
da570fcbb4 Depsgraph: Cleanup, make naming more understandable 2017-12-15 17:46:30 +01:00
3d72b94196 Depsgraph: Use array instead of set for node factory
Avoids extra time spent on hashing and such.

Old comment is kind of weird, because types we can totally make a sequent
integer values.
2017-12-15 17:43:07 +01:00
4ce38abfcd Depsgraph: Add named constant with number of node types 2017-12-15 17:39:01 +01:00
68a7f5e594 Depsgraph: Don't use negative enum value
Not sure why it sohuld be negative, we shouldn't be using any explicit value
comparison.
2017-12-15 17:38:12 +01:00
Julian Eisel
5cb70a89e1 Fix failing assert when reading workspace list from workspaces.blend 2017-12-15 17:26:23 +01:00
114013de0d Merge branch 'master' into blender2.8 2017-12-15 17:24:28 +01:00
c795309c03 Depsgraph Cleanup, spelling 2017-12-15 17:23:57 +01:00
6609be0520 Depsgraph: Simplify logic around special case for node tree update 2017-12-15 17:23:57 +01:00
1797923f32 Depsgraph: Cleanup, extra whitespace 2017-12-15 17:23:57 +01:00
76a1046478 Depsgraph: Cleanup, use names for particle system tag flags 2017-12-15 17:23:57 +01:00
f88ce5bf27 Depsgraph: Remove special exception logic from ID node tagging
This is something what we should be limiting as much as possible, it is
enough already to have special mapping cases in depsgreaph_depsgraph_tag.
2017-12-15 17:23:57 +01:00
5e28b71457 math utils: Add utilities to scan bit and clear it 2017-12-15 16:54:28 +01:00
de9e5a0926 Math utils: Go away form naive code for highest_order_bit_uint 2017-12-15 16:54:28 +01:00
412de222f8 Math utils: Add bit scan operations 2017-12-15 16:54:28 +01:00
02ec0b53df Math utils: Make it more clear what the functions are returning 2017-12-15 16:54:28 +01:00
2aa0f8a41b Math utils: Cleanup, use _uint suffix for function which operates on uint 2017-12-15 16:54:28 +01:00
Julian Eisel
9515737b55 Fix missing refresh of editors when changing workspace view-layer
Needs to use new messaging system.
2017-12-15 16:09:12 +01:00
2b25d8ea30 Depsgraph: Fix assignment to wrong flags 2017-12-15 14:42:42 +01:00
ff0d3c520f Tracking: Cleanup, fix typo in variable name 2017-12-15 13:53:44 +01:00
6b62f1dcb9 Tracking: Pass all markers to autotrack at once
This solves delay before tracking actually starts.

The issue is reported by Sebastian over IRC, thanks!
2017-12-15 12:51:53 +01:00
4895bd6ace Libmv: Add C-API function to set all markers within AutoTrack structure 2017-12-15 12:51:17 +01:00
e50442418a Tracking: Cleanup, make autotrack context creation code more granular 2017-12-15 12:37:23 +01:00
4cc0f09881 Tracking: Cleanup, use more const qualifiers when appropriate 2017-12-15 12:23:53 +01:00
Dalai Felinto
0b5616aef1 Depsgraph: cleanup DEGOIterObjectData > DEGObjectIterData 2017-12-15 08:59:05 -02:00
Dalai Felinto
90b7917687 Depsgraph: Make DEG_OBJECT_ITER more granular
It is not nice to assume we always want visible or directly linked objects.
So we make it as granular as we can.
2017-12-15 08:59:04 -02:00
Dalai Felinto
3a47fb764c Depsgraph / Render / Collection: Tag groups for rendering
We need to tag groups before and after rendering, so the group collections
viewport and render visibility are taken into account.

Note: This is a workaround, that will be removed once the render engine have
its own depsgraph, instead of re-using the viewport depsgraph.
2017-12-15 08:59:04 -02:00
Dalai Felinto
1f5106de61 Group collection viewport/render options and remove collection visibility
Users can change the group collection visibility in the outliner
when looking at groups.

Regular collections on the other hand don't have any special visibility control,
if you need a collection to be invisible during render, either don't link it
into the view layer used for F12, or disable it.

This includes:
* Updated unittests - update your lib/tests/layers folder.
* Subversion bump - branches be aware of that.

Note:
Although we are using eval_ctx to determine the visibility of a group collection
when rendering, the depsgraph is still using the same depsgraph for the viewport
and the render engine, so at the moment the render visibility is ignored.

Following next is a workaround for this separately to tag the groups before and
after rendering to tackle that.
2017-12-15 08:56:48 -02:00
7402b8ec74 Draw manager: Cleanup, unused variable 2017-12-15 10:54:00 +01:00
f4140f2c81 Merge branch 'master' into blender2.8 2017-12-15 10:45:20 +01:00
Dalai Felinto
2ddee0ba5a Fix dupli-frames (and other duplis)
Even non-group dupli objects need to get the overrides from somewhere.
Getting them from dupli_parent.
2017-12-15 07:14:25 -02:00
c4046e9082 Move ID recalc flags into dedicated field in ID
Currently this is a no-visible-changes change, but the idea is to use this
dedicated flag to tell which exact components of ID changed, make it more
granular than just OBJECT and OBJECT_DATA. Allow setting this field based
on what components new dependency graph flushed on evaluation.
2017-12-15 09:43:18 +01:00
Dalai Felinto
569e29c49c Fix RNA crash for objects without collection properties
This would happen if you tried to access the collection property for an object
that has not being evaluated by the depsgraph.
2017-12-14 20:17:27 -02:00
100e9aa15f Draw Manager: Texture space support for Curve and Metaball objects 2017-12-14 17:53:27 -02:00
c027be3189 Fix broken collada from recent merge rBb83b6afe5572ae29b4ad105dd8001c3343e2205b.
Please make minimal checks on what you do when merging!
2017-12-14 20:25:26 +01:00
aa1054acf8 Draw Manager: Edit Curve Mode: Fix "Not freed memory blocks"
`e_data.overlay_vert_sh` was not being freed when quitting blender.
2017-12-14 15:16:09 -02:00
06def089d3 Draw Manager: Recalculate batch of Curves, Surfaces and Texts when a property is changed 2017-12-14 14:44:20 -02:00
6b794565aa Fix crash with DispLists without vertices
Wee must return VertBuffers even when its size is zero
2017-12-14 14:31:08 -02:00
400d59be9b DNA: Add dedicated recalc flag to ID
Currently unused, but this is where LIB_TAG_ID_RECALC* flags will go.

Also modified other DNA to make pointer property being followed by pointer.
Makes it easier to keep track of alignment and extend nested structures without
ruining anything.
2017-12-14 15:25:51 +01:00
14ac709455 Eevee: Support for objects of type Curve, Surface and Text 2017-12-14 12:22:55 -02:00
5b5de35604 Support for Batchs split by material for objects of type Curve, Surface, and Text
**ToDo:**
- add vertbuff for UV (what can be adapted from `dl_surf_to_renderdata`)
2017-12-14 12:21:38 -02:00
bb9d068ccc Depsgraph: Cleanup, use more explicit way to fill in a structure
The possible issue with just listing arguments is that it might not be clear
what particular value is used for. For example, is it a scene itself, or is
it a parent scene?

Not as if it's not very clear now, but better be explicit for the future,
and me reading code in 10 years.
2017-12-14 11:09:18 +01:00
b83b6afe55 Merge branch 'master' into blender2.8 2017-12-14 12:51:26 +11:00
99b7dc60be Fix missing update for particles w/ fluids
D2955 by @GonVas
2017-12-14 12:06:36 +11:00
1f95347882 Fix T53322: Collada export crash w/ shape keys
D2958 by @cmbasnett
2017-12-14 10:59:41 +11:00
Dalai Felinto
f59728b3ea Object selection: Fixing cases where old selection flag was used
Basically these operators (select grouped object hooks and object select mode/less)
were not working in 2.8.
2017-12-13 16:26:46 -02:00
Dalai Felinto
53ea46d36c Outliner: Fix selection drawing
Outliner was using the old selection flag to show selected objects.
So if you selected an object in the outliner it would keep "selected"
(drawn in yellow) even after you selected another object.
2017-12-13 16:26:46 -02:00
3a3587f4b2 Depsgraph: it is still possible to have non-object to use OB_RECALC_DATA tag
Those flags are to be redone...
2017-12-13 16:39:03 +01:00
09838ed24c Comment out and tag unused bit as unused 2017-12-13 16:34:13 +01:00
33c97351fb Depsgraph: Move data update tag to object->data itself 2017-12-13 16:32:08 +01:00
f97d036468 Depsgraph / Object update: Query data update flag from data itself 2017-12-13 16:27:05 +01:00
ac3d477481 RNA: Query is_updated flag from object data ID's rather than from object itself 2017-12-13 16:27:01 +01:00
84c5ccca74 Masks: Remove unused function
It was used by old dependency graph. New one does things differently.
2017-12-13 16:14:08 +01:00
405becec70 Comment out and tag unused bit as unused 2017-12-13 16:05:20 +01:00
92067f7cda Depsgraph / Du[plication: Remove workaround flag from ID
Animation does no longer tag IDs as updated, so flag is not
needed anymore.
2017-12-13 15:56:18 +01:00
118178d176 Depsgraph / Animation: Rmove direct ID tagging from animation code
New dependency graph is supposed to have relation from animation node to
the node which corresponds to a property which is modified by that curve.
This means it is up to dependency graph to flush recalc flags, and no
manual control is needed in the animation code.
2017-12-13 15:53:04 +01:00
ec3d25803e Merge branch 'master' into blender2.8 2017-12-13 15:07:42 +01:00
a621850224 Fix T53550: E hotkey not working after the color-band picker commit
Related to D2886, the color-band picker was lacking a poll function.
2017-12-13 07:00:16 -07:00
81f135677b Depsgraph: Cleanup, use less explicit checks of LIB_TAG_ID_RECALC_DATA
This is a part of ongoing work in Blender 2.8, where we need to replace

  `object->id.tag & LIB_TAG_ID_RECALC_DATA`

with

  `object->data->id.tag & LIB_TAG_ID_RECALC`

Should be no user measurable difference.
2017-12-13 14:43:32 +01:00
3d6cc77cbd Merge branch 'master' into blender2.8 2017-12-13 14:24:44 +01:00
Danrae Pray
32f85c8322 Fix T51461: Outliner: Problems removing multiple collections in sequence
We now select the LayerCollection at index 0 for the active ViewLayer after a
collection deletion operation.

Added some functions to query outliner tree data & get LayerCollection
by index using a similar approach as we do for SceneCollection indexing.

With warning and style cleanups by Dalai Felinto.

Reviewers: dfelinto

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D2942
2017-12-13 10:01:16 -02:00
João Seixas
4838512e7d Fix T53404 - Python API documentation: UI Layout Emboss description wording
Changed the suggested word

Reviewers: #documentation, #python, sergey

Reviewed By: #documentation, sergey

Tags: #documentation, #python

Differential Revision: https://developer.blender.org/D2952
2017-12-13 12:56:38 +01:00
1b371d199e Depsgraph: Ensure dependency graph is allocated for evaluation context
This is something what we would need to ensure anyway, so doesn't seem
to make sense to NOT allocate depsgraph and then worry about this externally.

Steps to reproduce: add cube, change it's size in redo panel.

Found by Campbell during code review session.
2017-12-13 12:55:39 +01:00
ae80835d10 RNA override: Cleanup & small refactor.
Remove unused func from public API.

Make parameters & variables naming more consistent accross the code.

Move RNAproperty validation/'conversion' (for IDProps case) to upper
level in code, this will avoid some useless re-processing.
2017-12-13 12:46:25 +01:00
2ac33b47dc Fix T53547: Metaballs as dupli objects are not updated with the new Depsgraph
Follow relations from old dependency graph.
2017-12-13 10:50:28 +01:00
2c64615438 Fix T53552: Unneeded particle cache reset on frame change
There shouldn't be a time dependency to cache reset operation.
2017-12-13 10:47:59 +01:00
cd845ae509 T53471: Fix crash with blender_icons_update.py
Default DPI of new inkscape caused incorrect image size.
2017-12-13 16:55:51 +11:00
be54868ec3 Fix T53529: Rip crashes w/ wire edge 2017-12-13 16:14:37 +11:00
611752ce33 UI: color-band eyedropper now combines samples
Resulting color-band was too noisy (especially with photos),
use gauss filter to take surrounding samples into account.
2017-12-13 15:38:11 +11:00
52d33d6ab9 Merge branch 'master' into blender2.8 2017-12-12 18:00:36 +01:00
ef8bbc8cba Fix bplayer (c). 2017-12-12 14:23:19 +01:00
56f00db6c9 Correct error in recent merge 2017-12-12 23:19:41 +11:00
99069c8ae2 Revert "Node selection: Stop operator when mouse selection selected a node"
While re-route operator got fixed, node resize became broken.

This reverts commit 43f33ea300.
2017-12-12 10:34:38 +01:00
edd39f6da7 Merge branch 'master' into blender2.8 2017-12-12 16:13:06 +11:00
b3c147a04f Cleanup: split eyedropper into separate files
Each handles separate data-types and didn't share much logic,
better put each in it's own file.
2017-12-12 15:44:59 +11:00
41fc0a0624 Merge branch 'master' into blender2.8 2017-12-12 13:55:09 +11:00
58aa31a9ec Cleanup: minor edits to last commit 2017-12-12 13:37:21 +11:00
f7a1a1a700 UI: rewrite color-ramp re-sampling
Instead of picking evenly spaced pixels color-ramp simplification
now works by removing elements with the lowest cost.
2017-12-12 13:20:56 +11:00
7ae4c3a019 Add eyedropper to color-ramp widget
D2886 by @LazyDodo with edit's by @campbellbarton

The line drawn with the eyedropper is used to fill the color-ramp.
2017-12-12 13:11:38 +11:00
43f33ea300 Node selection: Stop operator when mouse selection selected a node
Previously, hitting Shift-LMB will first invoke selection operator, which
then later on is transformed to mouse tweak used for reroute operator.

This was causing problems extending selection with Shift-LMB when clicking
fast or from a tablet.
2017-12-11 17:38:47 +01:00
Dalai Felinto
1b2ac71f45 Fix workspace ui panel after workspace API change
This was broken since e8c15e0ed1. We can no longer get view_layer
from worspace, we should get it from window instead, now.
2017-12-11 13:18:14 -02:00
7719f7d27a Fix T53528: Empty thumbnails in filebrowser
Bug in recent refactor.
2017-12-11 15:47:52 +01:00
54f7bb4582 Fix for inset when accessed from spacebar search 2017-12-12 01:38:33 +11:00
14655418d1 Add 'Add static override' to outliner's menus. 2017-12-11 12:07:13 +01:00
75fbd60b06 Walk all the overriding chain to try to find a template.
When one creates a new local static override from another linked
data-block already overriding a third one etc., walk the whole
inheritance chain up to the original ancestor to try to find an
overriding template, instead of only checking the immediate reference...
2017-12-11 12:07:13 +01:00
48fe46943e Add a new button in ID template to generate an override, and new icon placeholder.
Note that due to mess with inkscape (see T53516), I cannot generate a new icon
currently. :(

Commit related to T53501.
2017-12-11 12:07:13 +01:00
6475f163ec Manipulator: make grab-cursor a manipulator flag
As with operators, allow manipulators to grab the cursor.
Previously this was enabled for all 3D manipulators.
2017-12-11 21:38:55 +11:00
1218b3fceb Cleanup: whitespace 2017-12-11 19:28:40 +11:00
4737b95b65 Merge branch 'master' into blender2.8 2017-12-11 19:24:37 +11:00
dd4e0cd3e3 DNA/RNA: add 'py_instance' for ID types
Avoid creating new Python instances
every time a scene, object, mesh .. etc are accessed.

Also resolves crashes T28724, T53530
although it's only valid for ID types, not modifiers vertices etc.

Back-ported from blender2.8 branch.
2017-12-11 18:37:54 +11:00
a2f2231014 Fix grab3d manipulator in a 2D group
Was taking scale into account twice.
2017-12-11 17:07:40 +11:00
53394c6018 PyAPI: Correct manipulator template 2017-12-11 16:01:07 +11:00
2e685136c4 WM: update splash size for templates 2017-12-11 12:53:28 +11:00
c568985118 MSVC: Fix compiling with some system languages
Report from @cyaoeu that compiling failed for Japanese system language.
2017-12-10 15:19:50 +11:00
Dalai Felinto
9454359a16 Workspace: Clarifying library remap workaround
WorkSpaceLayout->screen will be made public soon, but meanwhile this makes it
clear why we are not passing layout->screen to CALLBACK_INVOKE in this case.
2017-12-08 13:35:31 -02:00
392c23bdb9 Library remap: Fix issue remapping pointer of object coming from group[s base
We can not store pointer to an object ion temporary variable here, since then
pointer will not be updated in the base itself.

This fixes missing modifiers on objects coming from dupli-group.
2017-12-08 16:07:25 +01:00
34522017de Cleanup, indentation 2017-12-08 16:07:20 +01:00
36e09b5ada Depsgraph: Groups are now covered by dependency graph 2017-12-08 16:07:20 +01:00
7aa022b7a8 Depsgraph: We need to add ID node before getting CoW pointer
Need to split runtime get-cow-pointer with a builder one, and add some asserts
to catch mis-use.
2017-12-08 16:07:20 +01:00
f57317c6e7 Merge branch 'master' into blender2.8 2017-12-08 12:43:52 -02:00
e6838ecc26 Fix T53512: Vertices with index 0 were not being selected
Bug introduced on rB9f5bf197a0c3.
The offset for selection of vertices (`bm_vertoffs`) starts where the offset o edges ends (`bm_wireoffs`).
However, the `bm_wireoffs` depends on the offset of face selection (`bm_solidoffs`).

Before the commit that introduced the bug, the drawn of edges (in backbuff) was always computed along with the `bm_wireoffs`:
```
bm_wireoffs = bm_solidoffs + em->bm->totedge;
```

Now that the edges are not always drawn in backbuff, `bm_wireoffs` has to start from `bm_solidoffs`.
2017-12-08 12:42:00 -02:00
8817faa02d Cleanup, indentation 2017-12-08 15:05:38 +01:00
82c0a54168 Depsgraph: Use dedicated function for group evaluation
It is still based on generic collection evaluation, but the idea is to avoid
having view_layer pointer passed from group to it's evaluation function.

This is essential for copy-on-write, where we need to pass view_layer pointer
from a copied datablock, but that copy is not yet available at construction
time. Also, this is NOT the case where we want to expand datablock at a
construction time, just to keep our life easier.
2017-12-08 15:05:38 +01:00
Dalai Felinto
af47ae0702 Fix group duplication bug
View Layer was not duplicated between destination and source.

This would lead to a crash if you duplicated the group and assigned
the new group to any object.
2017-12-08 12:04:05 -02:00
Dalai Felinto
0d4ab09da7 Code cleanup
Thanks for Sergey Sharybin for spotting this.
2017-12-08 12:04:05 -02:00
6e85c59250 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/interface/interface_templates.c
2017-12-08 14:54:59 +01:00
f39a97fac5 Cleanup: moar busting of nasty C++ keywords-as-varnames. 2017-12-08 14:50:45 +01:00
087997f9eb Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/interface/interface_templates.c
2017-12-08 14:39:17 +01:00
c7ee64b2d9 Cleanup: avoid using C++ keywords as variables, even in pure C code.
This tends to make some IDE unhappy (like QTCreator)...
2017-12-08 14:36:07 +01:00
d46305f741 Merge branch 'master' into blender2.8 2017-12-08 12:44:32 +01:00
2e8914549b Cycles: Fix difference in image Clip extension method between CPU and GPU
Our own implementation was behaving different comparing to OSL and GPU,
namely on the border pixels OSL and CUDA was doing interpolation with
black, but we were clamping coordinate.

This partially fixes issue reported in T53452.

Similar change should also be done for 3D interpolation perhaps, but this
is to be investigated separately.
2017-12-08 12:03:11 +01:00
0467ddc674 Eevee: Fix default shader SSR id. 2017-12-08 11:58:04 +01:00
9aaf75da3d Eevee: Fix SSR ans SSAO for intel GPU.
On my intel GPU there is some issue when rendering to depth only format.
This workaround the issue.
2017-12-08 11:58:04 +01:00
7f48923986 Eevee: Remove unecessary defines. 2017-12-08 11:58:04 +01:00
f31fb4a014 Cycles: Cleanup, split 2D interpolation function 2017-12-08 11:22:04 +01:00
82c779462d Merge branch 'master' into blender2.8 2017-12-08 12:59:51 +11:00
4a734325f7 bl_app_override: support empty UI layout items
Returning None from ui_ignore functions creates empty labels,
allows removing items without breaking layout in some cases.
2017-12-08 12:57:25 +11:00
Dalai Felinto
dc848e9a8b Merge remote-tracking branch 'origin/master' into blender2.8 2017-12-07 15:00:03 -02:00
Dalai Felinto
237df2f860 Fix Collada building
Bug introduced in cc811d1fd6.
2017-12-07 11:51:46 -02:00
00067afa10 Fix T53419: Masking "Add" menu is not present in Image editor, but shortcut is 2017-12-07 14:46:07 +01:00
70957565dd DPX/Cineon: Report orientation when running with --debug 2017-12-07 14:38:20 +01:00
1c0905be0f Merge branch 'master' into blender2.8 2017-12-08 00:21:54 +11:00
efdd8f12a0 CMake: GREATER_EQUAL is from v3.7, use GREATER 2017-12-08 00:20:48 +11:00
bfbcc5e581 Fix T53499: Cannot load DPX files
The issue was caused by unspecified color transfer. New behavior gives same
result as other viewers here, so likely is fine :)
2017-12-07 14:07:57 +01:00
9ea7d0bf44 DPX: Fix wrong flag being checked for debug 2017-12-07 14:04:27 +01:00
1c7cfa025c Merge branch 'master' into blender2.8 2017-12-07 23:53:03 +11:00
2e2e6e3bdb Cleanup: Use BKE_colorband prefix 2017-12-07 15:52:59 +11:00
cc811d1fd6 Cleanup: extract BKE_colorband from BKE_texture 2017-12-07 15:40:11 +11:00
6d31eb015c Array Modifier: option to offset UV's
D2912 by @Zuorion
2017-12-07 04:33:52 +11:00
Daniel Silva
2dfd795bd2 Proposed fix for T53263 -- Blender crashes when rendering with Stabilizer 2D node without movie selected
The program won't crash anymore, but a warning won't be displayed. Anyway, this gives the user the chance to save the project.

https://developer.blender.org/T53263

Reviewers: lukastoenne

Differential Revision: https://developer.blender.org/D2934
2017-12-06 14:54:51 +01:00
46f518e927 Merge branch 'master' into blender2.8 2017-12-06 14:06:49 +01:00
13e9291650 Library: Add flag top keep ID library pointer around
This only applies to ID being copied outside of bmain. Handy for cases when it
is important to check if the copy corresponds to a data block coming from
library.

Example of that is proxy evaluation with copy on write.

Thanks Bastien for review!
2017-12-06 13:00:08 +01:00
6c49b4154b Merge branch 'master' into blender2.8 2017-12-06 12:27:44 +01:00
3ae6a8512d Depsgraph: Cleanup, use less geenric data type 2017-12-06 12:26:10 +01:00
7e344a9531 Depsgraph: Proxy pose bones should be coming from CoW object
This should solve crash on files having proxies, but there will still be
assert failure because proxy_from is expected to come from library, which
is no longer truth for objects which got copied.
2017-12-06 12:13:10 +01:00
8cd4de7c25 Merge branch 'master' into blender2.8 2017-12-06 11:58:13 +01:00
b5be65dc0e Depsgraph: Forgot this in previous commit 2017-12-06 11:57:57 +01:00
e9bbc10578 Merge branch 'master' into blender2.8 2017-12-06 11:55:30 +01:00
5ad3cc4e03 Depsgraph: Ignore text datablocks from nodes
Those are not part of dependency graph, but still could be referenced from
the tree.
2017-12-06 11:54:52 +01:00
674e1d4194 Depsgraph: Owner ID must always be original ID
Missed that in the review.
2017-12-06 11:38:58 +01:00
5389ca1859 Merge branch 'master' into blender2.8 2017-12-06 10:38:34 +01:00
16b9e91bf1 Eevee: Fix sampling direction calculation.
It was causing problems with the visibility filtering on Intel GPU.
2017-12-06 10:47:44 +01:00
1027ddfa2d Depsgraph: Add missing bone properties to proxy rigs 2017-12-06 10:21:33 +01:00
99b9e23ce1 Depsgraph: Add missing NULL pointer check 2017-12-06 10:21:33 +01:00
4c5736a77f Depsgraph: Cleanup, remove unused function 2017-12-06 10:21:33 +01:00
1915c30a42 Depsgraph: Remove workaround of parameters animation in node tree 2017-12-06 10:21:33 +01:00
630ed82ff2 Depsgraph: Remove workaround of parameters animation in lamp 2017-12-06 10:21:33 +01:00
8acca0e9e1 Depsgraph: Remove workaround of parameters animation in camera
This is something what should be done by build_animation().
2017-12-06 10:21:33 +01:00
21ef8e7d29 Depsgraph: Remove workaround for animated geometry component 2017-12-06 10:21:33 +01:00
b552e03716 Depsgraph: Remove workaround for animated modifiers 2017-12-06 10:21:33 +01:00
f348b7924c Depsgraph: Leave armature animation relation to build_animation()
Needs some optimization trick to hook pose init function to animation
instead of a bone. This is how flush will work anyway.
2017-12-06 10:21:33 +01:00
cbb42fcd96 Depsgraph: Use default argument value for relations builder
Follows other function definitions.
2017-12-06 10:21:33 +01:00
18ca793ca0 Depsgraph: Cleanup, line wrapping 2017-12-06 10:21:33 +01:00
abc55bf84a Depsgraph: Use build_animation() to build relations to animated properties
Before that it was up to lots of other places to keep track on whether
something is to be dependent on time or not. Was annoying, and unreliable,
and fragile.

This commit avoids hacks in object builder. Other areas will be adopted
soon.
2017-12-06 10:21:33 +01:00
4a99cc5850 Depsgraph: Add ability to check whether relation exists before adding it
Currently not used, but this is aimed to be used when adding relations from
FCurve to property which is being animated.
2017-12-06 10:21:33 +01:00
8b3aa8ef45 Depsgraph: Cleanup, line wrapping 2017-12-06 10:21:33 +01:00
7de3c8ace7 Depsgraph: Move implementation part of relations header to own file 2017-12-06 10:21:33 +01:00
335343fe93 Fix T53408: Updating Cycles Nodes via Drivers in Material View
This is something what should be supported by the new dependency graph.

Fixed by making it so, build_animation() adds relation between Animation
component and whatever-is-being-animated. In fact, for now, only relations to
ID properties are added. Rest of the relations are kind of hacked in all over
the code and needs to be removed and verified with specific .blend files.
2017-12-06 10:21:33 +01:00
f1ad6b43b3 Depsgraph: Cleanup, split build_animation 2017-12-06 10:21:33 +01:00
9f9b666d9a Depsgraph: Correct fallback for the parameters calculation
We can't use a single component here, sine it might consist of multiple
operations. So, for example, having driver operation will confuse targets
of another driver.
2017-12-06 10:21:33 +01:00
b5a8d0acaf Depsgraph: Cleanup, split driver builder function 2017-12-06 10:21:33 +01:00
3e9cd53687 Depsgraph: Cleanup, deduplicate as much as possible in build_driver 2017-12-06 10:21:33 +01:00
8c4363e3b1 Depsgraph: Remove old comments which are likely outdated 2017-12-06 10:21:33 +01:00
8912e4faef Depsgraph: Replace last obvious part of driver builder with generic RNA code 2017-12-06 10:21:33 +01:00
b26992fe6e Depsgraph: Add criteria for RNA_Key 2017-12-06 10:21:33 +01:00
fe5e8593b7 Depsgraph: Remove confusing ID node criteria
it sometimes overrides all possible other criteria, even tho we might want to
be very specific about what component we are looking for here.
2017-12-06 10:21:33 +01:00
35364e2fb2 Depsgraph: Use generic function for shape key driver target
There was a second place for shape keys.
2017-12-06 10:21:33 +01:00
070c735b13 Depsgraph: Fix wrong relations built for drivers
When target was changed from bone to regular object, new dependency graph was
still trying to build relations as if driver was using bone.
2017-12-06 10:21:33 +01:00
f8fd8b0744 Depsgraph: Use generic function for shape key driver target 2017-12-06 10:21:33 +01:00
235a68d8f3 Depsgraph: Use generic function for modifiers driver target 2017-12-06 10:21:32 +01:00
7586266343 Depsgraph: Use existing utility function to get driver target node
Only done for pose bone for now, but the idea is to go case bu case in
build_driver and move all custom logic from there to find_node_from_pointer().
2017-12-06 10:21:32 +01:00
3795e37c62 Depsgraph: Cleanup, split build_driver function up 2017-12-06 10:21:32 +01:00
52e81de9f7 Depsgraph: Don't see reason to have special case for bone's RNA path 2017-12-06 10:21:32 +01:00
97e92d6f3e Depsgraph: SImplify chjecks in directly address bone 2017-12-06 10:21:32 +01:00
284f106c91 Depsgraph: begin use of RNAPathKey instead of re-implemented checks in driver variables 2017-12-06 10:21:32 +01:00
0cd2303e67 Depsgraph: Cleanup, don't use static qualifier inside of anonymous namespace 2017-12-06 10:21:32 +01:00
aed1320b24 Add utility function to compare PointerRNA with NULL
Thanks Campbell for review!
2017-12-06 10:21:32 +01:00
a68e10be5e Depsgraph: Correct RNA pointer criteria to deal with bone custom properties 2017-12-06 10:21:32 +01:00
7ca8af4cc8 Merge branch 'master' into blender2.8 2017-12-06 16:51:37 +11:00
e6404274a1 Fix T53441: Inset doesn't start at zero 2017-12-06 16:45:51 +11:00
9ab430e9cb Cleanup: line length 2017-12-06 16:42:34 +11:00
2480a190de CMake: remove git found message 2017-12-06 16:37:50 +11:00
2069102c56 Cycles: Fix constness for load_kernels in device_cpu.cpp 2017-12-06 00:00:18 +01:00
858b38f12c Merge branch 'master' into blender2.8 2017-12-05 22:38:13 +01:00
ee120d6293 Fix T53476: File Browser: Selection Issue with 'fill' option.
Fill-selection would only go upward in list of items to find an already
selected one and fill-select all items in-between. Now, in case upward
search fails, it will also intent to go downward, effectiviely allowing
to 'fill-select' from bottom to top.

Note that top-to-bottom keeps priority (i.e. if a top-to-bottom
fill-selection is possible, it will always happen, even if a
bottom-to-top one is also possible).
2017-12-05 22:34:49 +01:00
272973804e Merge branch 'master' into blender2.8 2017-12-05 19:04:34 +01:00
855799ecc1 Fix T53430: Cut at the strip end fails w/ endstill 2017-12-06 04:52:38 +11:00
a580565086 CMake: avoid checking each MSVC minor revision 2017-12-06 03:38:44 +11:00
a65695759c Fix MSVS2017 compiler version
After last update to Visual Studio 2017 15.5.0 the compiler version changed
2017-12-05 17:16:02 +01:00
3959ce0540 Types are to have explicit forward declaration 2017-12-05 16:54:39 +01:00
702c0a01b2 Cleanup: build warning 2017-12-06 02:25:10 +11:00
6734bb1faf Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/editors/mesh/editmesh_select.c
2017-12-05 11:19:47 -02:00
70c2d8a1a2 Fix T53469: Make sure that edges are drawn in the backbuff whenever you are looking for the nearest edge
Caused by rB9f5bf19
2017-12-05 11:13:53 -02:00
4f2dd5ad26 Fix for typo in previous commit 2017-12-06 01:14:20 +13:00
52dde11796 Simplify UI-names for B-Bone Ease In/Out settings
For more consistency with the other settings, and increased readability
when the UI is cramped (and it isn't possible to see the whole names).
2017-12-06 00:58:10 +13:00
5d96bc9c5a Version patching fixes for F-Curves (as required for fixes for T48988 and T52009)
* For the T48988 fix (i.e. separate Ease In/Out properties for Bendy Bones
  in Edit vs Pose modes), old animation data needed to be patched to use
  the new property names. This is needed to partially fix some of the
  issues in T53356 (though the Rigify code itself still needs to be patched).

* For the T52009 fix, old files needed to have the frame_start and frame_end
  properties on the FModifier (base-class) updated to match that of the
  FMod_Stepped type-specific class. This wasn't done in the earlier commit
  since it wasn't worth going through all animation data just for the sake
  of updating these relatively-rare settings, but since we're doing it anyway
  now, it makes sense to include this here.
2017-12-06 00:54:39 +13:00
deaeee8e4d Merge branch 'master' into blender2.8 2017-12-05 11:48:37 +01:00
6ebf244ace Added BKE_fcurves_main_cb(), a wrapper around BKE_animdata_main_cb to make it easier to apply fixes to all F-Curves in a file 2017-12-05 17:16:05 +13:00
41b4b8ded6 Cleanup/Style Tweaks to fit rest of code 2017-12-05 17:14:55 +13:00
7d50f16869 drawobject: use float instead of int in glLineWidth 2017-12-04 16:00:21 -02:00
1802d14394 Fix T53463: Rotation numerical input shows instable behaviour.
Inverting a number in radians when user is in degrees gives rather
unexpected results. ;)
2017-12-04 18:40:33 +01:00
3d473d1632 Edit Mesh Selection: Make sure that the line width is 1 pixel 2017-12-04 15:30:56 -02:00
f340f4a2f4 Eevee: CodeStyle: Separate Shader initialization. 2017-12-04 17:21:37 +01:00
5bd008f4dd Eevee: Irradiance Grid: Allocate needed resources instead of a static chunck.
This commit makes the irradiance pool and render target sizes depend on the number of irradiance sample in the whole ViewLayer.
2017-12-04 17:21:37 +01:00
c370fffc9b Resolve MSVC C2229
Code works as expected, but MSVC disallows
2017-12-05 03:05:15 +11:00
40822ae4e9 Depsgraph: Cleanup, indentation 2017-12-04 15:50:38 +01:00
bdc15061fc Better bevel profile at extreme values of profile.
Patch from Richard Erhardt, with some additions & modifications.
Changes bevel profile shape parameter so that can get arbitrarily
near square profile as parameter -> 1.
Adds code to make profile=0 case work, at least for cube corners,
so changed hard min of profile parameter to 0 from 0.15.
2017-12-04 09:36:14 -05:00
d37d6b5a4d Edit Mesh Selection: Fix wrong glPointSize position 2017-12-04 12:32:45 -02:00
3533e082a0 RNA: Use const qualifier for an utility function 2017-12-04 15:26:43 +01:00
aee3560cce Followup to previous merge conflict resolution 2017-12-04 15:26:17 +01:00
bd062f36c0 WM: disable property update messages for fcurves 2017-12-05 01:31:12 +11:00
3b3e612752 Merge branch 'master' into blender2.8 2017-12-04 15:15:23 +01:00
0f8228a890 Depsgraph: Add parameters nodes for bone custom properties
Currently shouldn't make any difference, but this is something what needs to be
done to sanitize drivers relations )with the idea to re-use some generic code
to get operations for driver variables.
2017-12-04 15:10:14 +01:00
9f5bf197a0 Edit Mesh Selection: Draw the backbuff of edge selection only when requested
And make sure the width is 1
2017-12-04 12:05:06 -02:00
d974d25497 Depsgraph: Cleanup, move RNA key constructor to it's file 2017-12-04 14:17:17 +01:00
d5e491c9a7 Depsgraph: Cleanup, don't use bracers in relations names
Those don't bring any information.
2017-12-04 14:17:17 +01:00
5f86d6e6eb Depsgraph: Cleanup, node from RNA pointer search 2017-12-04 14:17:17 +01:00
6b72d87def Depsgraph: Remove unused property based update tags
Those are unused, and not clear whether we will ever support this.

Seems to be better having more like "component" tags, would be less magic
involved to guess what exactly is to be tagged.
2017-12-04 14:17:17 +01:00
6a6aeaac7d Fix bplayer (c). 2017-12-04 14:14:42 +01:00
47fa3e7b27 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_files_link.c
2017-12-04 14:07:39 +01:00
0868a2b610 Cleanup: link/append: get rid of booleans in func parameters.
One or two are OK, but more make it rather unreadable, and future work
is likely to require more toggle specific behavior here. So switched to
bitflags, switching from short to int and using 16 upper bits for
'internal' ones defined in BLO_readfile.h, combined with 'public' ones
from user interaction, defined in DNA_space_types.h
2017-12-04 13:09:13 +01:00
Danrae Pray
a1df65c9dd Small cleanup from previous commit by Danrae Pray (@spockTheGray)
I (Dalai) messed up the git author from previous commit (68fdcf07a1).
So this is a follow up on that, properly credited.
2017-12-04 07:53:27 -02:00
Dalai Felinto
68fdcf07a1 Fix T53415: Outliner: Crash when deleting collections
Updated collection_delete_exec() so we don't try to delete elements as we search
the outliner tree anymore.

Now we search the whole tree first for the selected nodes that need to be
deleted and delete them afterward.

Reviewers: dfelinto

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D2936
Differential Revision: https://developer.blender.org/D2940
2017-12-04 07:40:23 -02:00
7a8ac1b09b WM: message bus replacement for property notifiers
Use dynamically generated message publish/subscribe
so buttons and manipulators update properly.

This resolves common glitches where manipulators weren't updating
as well as the UI when add-ons exposed properties which
hard coded listeners weren't checking for.

Python can also publish/scribe changes via `bpy.msgbus`.

See D2917
2017-12-04 20:42:34 +11:00
5b6cfa705c Eevee: Irradiance Visibility: Initial Implementation
This augment the existing irradiance grid with a new visibility precomputation.
We store a small shadowmap for each grid sample so that light does not leak through walls and such.

The visibility parameter are similar to the one used by the Variance Shadow Map for point lights.

Technical details:

We store the visibility in the same texture (array) as the irradiance itself (in order to reduce the number of sampler).
But the irradiance and the visibility are not the same data so we must encode them in order to use the same texture format.
We use RGBA8 normalized texture and encode irradiance as RGBE (shared exponent).
Using RGBE encoding instead of R11_G11_B10 may lead to some lighting changes, but quality seems to be nearly the same in my test cases.
Using full RGBA16/32F maybe a future option but that will require much more memory and reduce the perf significantly.

Visibility moments (VSM) are encoded as 16bits fixed point precision using a special range. This seems to retain enough precision for the needs.
Also interpolation does not seems to be big problem (even though it's incorrect).
2017-12-04 10:10:27 +01:00
847f568bf5 Eevee: Irradiance Visibility: Add RNA / Engine properties 2017-12-04 10:10:27 +01:00
d439e87064 Eevee: Irradiance Grid: Fix problem with bounce update.
Before this patch, if one of the grid was updated (moved) only the subsequents evaluated grids had their level reset and had all their bounces recomputed.
2017-12-04 10:10:27 +01:00
eb605c2c2b Eevee: Irradiance Grid: Fix Multibounce baking.
The baking was only recording one bounce because the double buffer setup was buggy.
2017-12-04 10:10:27 +01:00
9dfbd98339 Cleanup: whitespace 2017-12-04 17:20:26 +11:00
1b2f8b2754 Merge branch 'master' into blender2.8 2017-12-04 16:51:07 +11:00
5c27523808 Cleanup: wrap long function args in seqeffects 2017-12-04 16:49:30 +11:00
d47d263b4b Cleanup: style 2017-12-04 16:37:31 +11:00
705d214349 Fix crash w/ template search & invalid property 2017-12-04 16:19:01 +11:00
09cade6ca4 Fix MSVC compilation, there is no 'Designated initializers' in C++!
Looks like gcc is at the very least missing a warning here!
2017-12-02 18:25:09 +01:00
e1eb1fbfca BLI_ghash: Description of GHash, GSet
Also some re-indenting.
2017-12-03 03:35:45 +11:00
9f12eb087f Cleanup: minor change to API use 2017-12-02 22:42:14 +11:00
c2d795ebf8 Cleanup: indentation 2017-12-02 22:35:09 +11:00
d64d8b5be5 Fix Cycles standalone crash when saving output, after recent refactoring. 2017-12-02 05:45:09 +01:00
0c37824bfa Draw Maganer: Cleanup: Remove unnecessary lines of code in draw_cache_impl_metaball.c 2017-12-01 18:25:46 -02:00
Dalai Felinto
aa0c9867b2 unittests: Update (fix) unittests after workspace API change
Tests were broken since e8c15e0ed1.

We now get view_layer from window, not workspace, since the same workspace can
have a different view_layer depending on the window scene.
2017-12-01 16:08:52 -02:00
Dalai Felinto
e9cf3fae8e Fixup for workspace view_layer fix
We do not assume subversion bump until we actually change the subversion.

For example, a branch may have bumped its subversion to 3, yet still require
the new doversion code introduced on 108c4bd502.
2017-12-01 15:28:29 -02:00
Julian Eisel
108c4bd502 Fix crash reading 2.8 files with workspace.view_layer set
Stupid error from e8c15e0ed1.

Also removed WorkSpace.view_layer usage and marked as deprecated.
2017-12-01 18:14:24 +01:00
d10578df46 Depsgraph: Call editors update after everything was flushed
This way we can inform editors about all edits at once. Currently this is not
used, but in the next commits we will inform editors about what exactly has
changed.
2017-12-01 17:59:47 +01:00
bbb86a85fc Cleanup: Proper silencing of unused vars( for now). 2017-12-01 17:58:15 +01:00
3d50722cf5 Fix warnings in release builds. 2017-12-01 17:42:13 +01:00
a5454e8711 Cleanup: forgot to rename RNA prop flag to override_static... 2017-12-01 17:42:13 +01:00
6365ddcab5 Depsgraph: Separate loop for ID node flags clear
This ends up in less number of memory writes, which should have positive effect
on performance.
2017-12-01 17:32:00 +01:00
Dalai Felinto
59e8b72881 Fix update of non-scene owned layer collections
We are using NC_SCENE | ND_LAYER_CONTENT for the shader, however this does not work for groups
unless we manually handle the notifiers.

Otherwise the group id is passed, and the listener never gets the notification since a scene id
is expected, or no id at all.
2017-12-01 14:15:54 -02:00
Dalai Felinto
f91e057786 Groups and collection: editing group collections
Allow users to edit either the object group active collection or view layer one

We can't support users selecting the group collections from the outliner group
because that would be imply having an active group for the scene or workspace.

But the way it is now allows to see and edit the collection values after the
group is instanced.
2017-12-01 14:15:54 -02:00
Dalai Felinto
aeaf87bbeb Groups and collection: create group from collection
You could still create groups as before, with Ctl + G. This will create a group
with a single visible collection.

However you can also create a group from an existing collection. Just go to
the menu you get in the outliner when clicking in a collection and pick
"Create Group".

Remember to instance the group afterwards, or link it into a new scene or file.

The group and the collection are not kept in sync afterwards. You need to manually
edit the group for further changes.
2017-12-01 14:15:54 -02:00
Dalai Felinto
be9e469ead Groups and collection: initial integration
Since we are ditching layers from Blender (2.8) we need a replacement to
control groups visibility. This commit introduces collections as the building
blocks for groups, allowing users to control visibility as well as overrides
for groups.

Features
========

* Groups now have collections
    This way you can change the visibility of a collection inside a group, and add
    overrides which are part of the group and are prioritized over other overrides.

* Outliner
    Groups can inspect their collections, change visibility, and add/remove members.

    To change an override of a group collection, you need to select an instance of
    the group, and then you can choose "group" in the collection properties editor
    to edit this group active collection instead of the view layer one.

* Dupli groups overrides
    We can now have multiple instances of the same group with an original "override"
    and different overrides depending on the collection the instanced object is part
    of.

Technical
=========

* Layers
    We use the same api for groups and scene as much as possible.

Reviewers: sergey (depsgraph), mont29 (read/write and user count)
Differential Revision: https://developer.blender.org/D2892
2017-12-01 14:15:54 -02:00
Julian Eisel
e8c15e0ed1 Workspaces: Store an active view-layer per scene
Instead of storing a single active view-layer in the workspace, one is
stored for each scene the workspace showed before.
With this, some things become possible:
* Multiple windows in the same workspace but showing different scenes.
* Toggling back and forth scene keeps same active view-layer for each scene.
* Activating workspace which didn't show current scene before, the current view-layer is kept.

A necessary evil for this is that accessing view-layer and object mode
from .py can't be done via workspace directly anymore. It has to be done
through the window, so RNA can use the correct scene.
So instead of `workspace.view_layer`, it's `window.view_layer` now (same
with mode) even though it's still workspace data.

Fixes T53432.
2017-12-01 16:15:30 +01:00
983b1a3478 Depsgraph: Cleanup, simplify evaluation flush function
Also avoid once queue push for cases when current operation has multiple
outgoing relations.
2017-12-01 16:05:17 +01:00
Dalai Felinto
a9101b332e Silence warning from object_relations.c 2017-12-01 12:39:55 -02:00
92ff0d562c Depsgraph: Remove legacy recalc flag from DNA 2017-12-01 12:26:32 +01:00
3b706723ac Depsgraph: Remove clear of legacy unused flag 2017-12-01 12:18:19 +01:00
a96e97a83f Depsgraph: Move away from setting old deprecated object recalc flags
Those shouldn't be used anywhere for real now.
2017-12-01 12:17:23 +01:00
9bbffd4e02 Depsgraph: Don't use legacy flags in versioning code
Wondering whether files from 2.37 are still working fine.
Don't have that version of Blender running here, so can't test :(
2017-12-01 12:16:29 +01:00
b2952023b6 Depsgraph: Use per-ID flags to see whether update is needed
This is actually functions which needs bigger reconsideration, but for now let's
try to keep them working as much as possible.
2017-12-01 12:11:38 +01:00
146f2e1d02 Depsgraph: Use new per-ID tags to see whether object in a group needs an update
This wouldn't be less precise than object level flag in theory, and we need to
move away from such a duplicating flags.
2017-12-01 12:09:26 +01:00
ecbdc3f1d4 Transform: Avoid attempt to bypass dependency graph update
It's not possible to bypass new depsgraph, but also flush to other CoW copies
might be needed here.
2017-12-01 12:07:41 +01:00
2ae709d282 Transform: Use new DEG query API to see what's being affected by a changing object
This avoids us from directly calling object update, and doing other type of
update flushing.

Prepares us to get rid of Object->recalc flags.
2017-12-01 11:40:50 +01:00
0591fb17e9 Depsgraph: Add query API to traverse all dependent IDs of the given ID 2017-12-01 11:40:50 +01:00
7270e8cc8f Depsgraph: Move iterator to own implementation file 2017-12-01 11:40:50 +01:00
59d3a17e3a Depsgraph: Cleanup, use enum value rather than a define 2017-12-01 11:40:50 +01:00
27a1bd445b Depsgraph: Cleanup, naming
It makes more sense to stick to DEG_iterator_object order in name, since we can
have functions to iterate over different entities and we want all of them to
have common prefix.
2017-12-01 11:40:50 +01:00
2838a7646b _gawain python module: Add methods "program_use_begin" and "program_use_end"
Required to updade uniforms
2017-12-01 04:25:47 -02:00
605ce90c54 RNA: Fix unreported: Some callbacks called when updating properties were incorrect 2017-11-30 16:53:15 -02:00
1d33843ea6 Removing OMP: legacy ccgsubsurf.
Performances gain is rather low this time, about 5% on average (in whole
affected functions).
2017-11-30 19:48:23 +01:00
Dalai Felinto
58c743f7cc Depsgraph: Add assert to make sure the view layer is part of the scene
Which is not in some cases since workspace is still partly implemented.
2017-11-30 13:44:34 -02:00
f3de312b83 Transform: Fix recent merge conflict resolution fiasco
Why is it called legacy when this is a legit flags which are still to be checked
at a runtime???
2017-11-30 16:36:24 +01:00
a989913dd4 Merge branch 'master' into blender2.8 2017-11-30 15:11:06 +01:00
c241d79dc8 Transform: Use single flag with more meaningful name to prevent snapping to a dependent object
The idea of this flag was to prevent snapping onto an object which depends on
currently modifying ones. Using single flag makes more sense here, and also
makes it possible to replace some ob->recalc based magic with depsgraph query
to set those flags.
2017-11-30 15:03:48 +01:00
47a4a7c8b7 Transform: Remove some legacy code about snapping in particle edit mode
It looks stupid to first force some flag being set and then have workaround
to ignore that flag in snapping code. Let's just not set the flag in the first
place.

The only useful situation where such snapping was usable is to move roots of
disconnected hair, which still works just fine. However, there might be some
other hidden corner case where this workaround was needed.
2017-11-30 14:52:34 +01:00
Dalai Felinto
79bbbf7e20 Fix memory leak when single_obdata_users() fails to copy datablock 2017-11-30 11:08:48 -02:00
Dalai Felinto
ba17d53e59 Fix lightprobe single user not working 2017-11-30 11:08:48 -02:00
edef559808 Depsgraph: Fix crash on playback of animated objects when CoW is enabled
We should keep base_flags after CoW object datablock was updated. Not entirely
happy with current solution, but it fixes crash and allows us to run tests
again.

More proper solution would be to make CoW operation a per-component thingie,
which will only update corresponding parts.
2017-11-30 13:42:56 +01:00
Dalai Felinto
33d2535189 Layer: Copy layer collection properties when doing a full copy of scene 2017-11-30 10:08:26 -02:00
69a7ece389 Depsgraph: Fix wrong remapping of compositor node tree when CoW is enabled 2017-11-30 12:36:37 +01:00
c601ef7d7d Depsgraph: Fix missing objects in viewport when CoW is enabled
Remapping of pointers did not work properly, since it had no pointers yet to
remap base->object to a CoW object.
2017-11-30 12:36:37 +01:00
1c5c3748b5 Depsgraph: Make sure we pass proper base to object builder 2017-11-30 12:36:37 +01:00
60d6cc8fae Depsgraph: Make a note about why is it OK to pass original base in relations builder 2017-11-30 12:36:37 +01:00
83cc73083f Depsgraph: Properly pass flags when COW is not used 2017-11-30 12:36:37 +01:00
d0ed6dff82 Depsgraph: Cleanup spelling 2017-11-30 12:36:37 +01:00
Dalai Felinto
2296b9776a Depsgraph: Tag all id_types on_visible_update
We need all id nodes to be evaluated at least once when opening a file.
This is particuarly required for the upcoming group collection patch.
2017-11-30 09:23:10 -02:00
ced2f3f30e Merge branch 'master' into blender2.8 2017-11-30 11:59:28 +01:00
059b878240 Depsgraph: More full explanation for previous commit 2017-11-30 11:57:21 +01:00
Dalai Felinto
4b9b9dbf93 Depsgraph: Fix DEG_id_type_tag comment 2017-11-30 08:53:11 -02:00
03a5eccc94 Merge branch 'master' into blender2.8 2017-11-30 18:30:41 +11:00
28d2148b09 Haiku OS Support
D2860 by @miqlas

Even though Haiku is a niche OS, only minor changes are needed.
2017-11-30 18:05:21 +11:00
fa3d50af95 Cycles: Improve denoising speed on GPUs with small tile sizes
Previously, the NLM kernels would be launched once per offset with one thread per pixel.
However, with the smaller tile sizes that are now feasible, there wasn't enough work to fully occupy GPUs which results in a significant slowdown.

Therefore, the kernels are now launched in a single call that handles all offsets at once.
This has two downsides: Memory accesses to accumulating buffers are now atomic, and more importantly, the temporary memory now has to be allocated for every shift at once, increasing the required memory.
On the other hand, of course, the smaller tiles significantly reduce the size of the memory.

The main bottleneck right now is the construction of the transformation - there is nothing to be parallelized there, one thread per pixel is the maximum.
I tried to parallelize the SVD implementation by storing the matrix in shared memory and launching one block per pixel, but that wasn't really going anywhere.

To make the new code somewhat readable, the handling of rectangular regions was cleaned up a bit and commented, it should be easier to understand what's going on now.
Also, some variables have been renamed to make the difference between buffer width and stride more apparent, in addition to some general style cleanup.
2017-11-30 07:37:08 +01:00
df7b9fa2ee Fix T53410: 3D Text always recalculated 2017-11-30 17:08:37 +11:00
099a99dbc9 Select similar for bones by group index
D2931 by @col-one
2017-11-30 14:42:18 +11:00
9f1048481c Fix T53420: Vertex Groups: The "-" button gets a hidden function
Guess 'remove all unlocked' is new-ish feature...

To be backported to 2.79a (I think).
2017-11-29 20:19:07 +01:00
José Luis Oliveira Cunha
5ec8a9ac27 Fix T53116: default texture coordinates for volume materials are blank.
Differential Revision: https://developer.blender.org/D2935
2017-11-29 19:21:51 +01:00
84d39ab97b Merge branch 'master' into blender2.8 2017-11-29 18:13:06 +01:00
e4b54f44c1 Cycles: add object level holdout property.
This works the same as the holdout shader and Z mask layer. Combined with
overrides in 2.8 this is intended to replace the Z mask layer bits.
2017-11-29 18:11:40 +01:00
Maxym Dmytrychenko
7e349f2745 Cycles: improve triangle intersection performance.
Reduces render time by about 1-2% in benchmark scenes.

Differential Revision: https://developer.blender.org/D2911
2017-11-29 18:11:40 +01:00
Maikon Araujo
4b4702ab8a Sequencer: add many more color blend modes, and a new color mix strip.
Differential Revision: https://developer.blender.org/D2872
2017-11-29 18:11:36 +01:00
4f7280da40 Fix paint float color blending bugs with alpha 1.0 and vivid light.
For some blend modes there would be no effect with factor 1.0, even if factor
0.999 would give a very different image. Now the result should have no
discontinuity.

Differential Revision: https://developer.blender.org/D2925
2017-11-29 18:01:36 +01:00
baaf81e13e Merge branch 'master' into blender2.8 2017-11-29 17:59:04 +01:00
5b5939c6e6 Depsgraph: Cleanup, use explicit NULL pointer checks 2017-11-29 17:55:28 +01:00
75eb219a2e ID static override: add basic support for overriding animation.
This is very bold right now - you simply can replace (or add) an action
to an override data-block. Actions themselves are not 'customizable'
through override at all currently (we may at least add
'add/remove/replace fcurves' feature in future), and nothing else in
animdata is overridable currently.
2017-11-29 17:23:25 +01:00
20ae4f928c Make basic object & bones transformations overridable.
You can now override loc/rot/scale of objects and posebones.

Also added a basic operator to make an override of active linked object,
but this is very limited/wip/testing feature (you have to manually override
object and its armature, and relink to proper local overrides
yourself...). Final 'make proxy killer' will be much more automated of
course.
2017-11-29 17:23:25 +01:00
bde39e5110 ID static override: Make most Image properties overridable.
First real 'usable' commit, will be needed by the 'virtual data-block'
asset feature (i.e. to be able to link a mere image file as if it was a
linked datablock, and generate automatically an override of it to make
it editable).
2017-11-29 17:23:25 +01:00
c1401a0d49 ID static override: automatically detect new overrides as part of undo step.
We could do that in several different way, e.g. adding some tag during
DEG evaluation, etc. But this is not a critical process (it's main
purpose is user feedback), so current solution seems to work well enough
- and it's dead simple! ;)
2017-11-29 17:23:25 +01:00
0007873645 ID Static Override: add basic generic UI tools to control override of properties. 2017-11-29 17:23:25 +01:00
e36b5f004d ID Static Override: add basic UI feedback.
For now, using a new color for overridden properties (similar to
animated/driven status), UI team will need to work on a better solution
maybe...
2017-11-29 17:23:25 +01:00
638afb9bd4 ID Static Override, part II: RNA changes.
This is essentially a huge refactor/extension of our existing RNA
compare & copy code, since static override needs more advanced handling here.

Note that not all new features are implemented yet, advanced things like
collections insertion/deletion are still TODO (medium priority).

This completes the ground work for overrides, remaining commits will be
about UI and some basic/testing activation of overrides for a limited
set of data-blocks & properties.

For details see https://developer.blender.org/D2417
2017-11-29 17:23:25 +01:00
6d003ef812 Define RNA_STACK_ARRAY (usable everywhere in RNA), and make PYRNA_STACK_ARRAY use it. 2017-11-29 17:23:25 +01:00
39b8a33068 Merge ID static override, part I: core changes in DNA, BKE and .blend read/write.
See https://developer.blender.org/D2417 for details.

Note that since static overrides rely heavily on RNA, this commit is
essentially invisible from user PoV, more in next commits.
2017-11-29 17:23:25 +01:00
a36a47fe15 Preparing merge of id_override_static: add BKE_id_swap().
This function swaps the memory content of two data-blocks (of same type
obviously), while preserving most of the ID 'header' itself.

It is intended to be used to quickly and easily replace the data of an
existing ID by another one, presumably a temporary 'working' one,
without having to suffer from things like name changes,
registering/removing from Main database, etc.
2017-11-29 17:23:25 +01:00
0439733cf8 Merge branch 'master' into blender2.8 2017-11-29 16:32:50 +01:00
1136dee232 Cleanup: De-duplicate code in object update routines 2017-11-29 16:26:16 +01:00
86847bf5ba Cleanup: Split depsgraph uber transform function callback 2017-11-29 16:22:59 +01:00
0af91d7fe6 Cleanup: Remove unused argument 2017-11-29 16:15:52 +01:00
dbde3c78f8 Cleanup: Make object_handle_update easier to follow 2017-11-29 16:12:39 +01:00
aa2ecbf35b Merge branch 'master' into blender2.8 2017-11-29 16:01:07 +01:00
1f9387ef91 Cleanup: Remove unused function 2017-11-29 15:59:51 +01:00
aad711d064 Merge branch 'master' into blender2.8 2017-11-29 15:47:00 +01:00
a02cbb3c3a Eevee: Fix default shader. 2017-11-29 16:02:51 +01:00
60703e45f3 Transform: Avoid use of ob->recalc in snapping code
Do a direct update of object transform instead, without involving
manual trickery of recalc flag.

Shouldn't be functional changes as far as artists are concerned,
but will allow us to get rid of recalc flags in 2.8.

Thanks Bastien for review!
2017-11-29 15:37:09 +01:00
2e47d1a14c Merge branch 'master' into blender2.8 2017-11-29 14:59:48 +01:00
c8b1a83a8c Depsgraph: Fix assert failure 2017-11-29 14:58:37 +01:00
04715b4a76 Draw manager: Cleanup, use lower case prefix for private functions 2017-11-29 12:49:15 +01:00
28a5e2437c External engine: Cleanup, use lower case prefix for private functions 2017-11-29 12:30:55 +01:00
5fb2f92dcf Eevee engine: Cleanup, use lower case prefix for private functions 2017-11-29 12:28:40 +01:00
5a814e83e8 Clay engine: Cleanup, use lower case prefix for private functions 2017-11-29 12:26:59 +01:00
cdaa56ba0d Basic engine: Cleanup, use lower case prefix for private functions 2017-11-29 12:24:36 +01:00
ffbc3a0f2a Eevee: Cleanup, avoid unneeded goto
Ideally this also should be split into smaller functions, but will leave that
for later a bit.
2017-11-29 12:19:57 +01:00
f6afdd576e Eevee: Cleanup, split long probe refresh function
There is no reason to have such a long function, it is really easy to break it
down into a smaller ones, and call them from where needed. Makes them smaller
and easier to follow. Also avoids use of confusing goto's.
2017-11-29 12:15:22 +01:00
e168e0f46f Eevee: Cleanup, avoid too much nested indentation
Just do early `continue`, makes code easier to follow than fewzillion of nested
checks and loops and everything.
2017-11-29 12:00:03 +01:00
28048f75ce Merge branch 'master' into blender2.8 2017-11-29 21:32:16 +11:00
e32cfb0743 Cleanup: rename bpy_util -> bpy_capi_utils
This is for internal CAPI use only, avoid confusion w/ bpy.utils module.
2017-11-29 21:11:29 +11:00
69d33ecdec Eevee: Stop depsgraph update callback form allocating unneeded memory 2017-11-29 11:07:52 +01:00
dc4c9de91a Draw manager: Cleanup, naming
Similar to previous commit in Eevee.
2017-11-29 11:01:08 +01:00
6b9999e3fc Eevee: Cleanup, naming
For functions which will allocate requested data if it does not exist yet
"_ensure" is to be used instead of "_get". "_get" functions should return
NULL in cases when requested data does not exist yet.
2017-11-29 11:01:08 +01:00
73aac1b919 Draw manager: Cleanup, indentation in preprocessor 2017-11-29 11:01:08 +01:00
3478d66b28 Depsgraph: Remove object-specific flag which was storing update tag
There were following issues:

- This was used in a similar way of DEG's ID update callback. No reason to have
  yet-another-way of informing editors/engines about changes. Better to keep
  regular update mechanism usable and fast for those needs.
- It wasn't granular at all, and granularity in flags is something what we
  need to support anyway, even for existing ID update.
- There is no reason to have it per-object. Depsgraph operates on IDs.
- It wasn't clear when and who clears the flag, and was possible to run into
  conflicts.
2017-11-29 11:01:08 +01:00
a6b6689c0a Draw manager: Listen to depsgraph's ID update callbacks
This replaces dedicated flag which wasn't clean who sets it and who clears it,
and which was also trying to re-implement existing functionality in a way.

Flushing is not currently very efficient but there are ways to speed this up
a lot, but needs more investigation.
2017-11-29 11:01:08 +01:00
6208ce2e0a Eevee: Set engine data needs update to false when everything is up to date
Currently this shouldn't cause any differences, but is required for the upcoming
changes in informing draw engines about changes.
2017-11-29 11:01:08 +01:00
3cb19a3d89 Merge branch 'master' into blender2.8 2017-11-29 18:06:24 +11:00
ad7fb1c028 Cleanup: Python imports
Split over lines to diff more easily.
2017-11-29 18:05:41 +11:00
639d49b01f Merge branch 'master' into blender2.8 2017-11-29 16:15:21 +11:00
c17c6557b4 PyAPI: add function to check any mathutils type
Also add CheckExact versions of type checking macros.
2017-11-29 16:13:26 +11:00
ddc7e72fe1 RNA: remove paranoid NULL check
Was added as part of D2666.
2017-11-29 14:29:47 +11:00
0c8265c0a9 Merge branch 'master' into blender2.8 2017-11-29 14:21:03 +11:00
26a64ba23a RNA: sync API changes from 2.8 2017-11-29 14:13:34 +11:00
Julian Eisel
ad625acda8 RNA: Allow structs to define tags for their properties
Adds support for defining a number of tags as part of the rna-struct
definition, which its properties can set similar to property-flags.
BPY supports setting these tags when defining custom properties too.

* To define tags for a struct (which its properties can use then), define the tags in an `EnumPropertyItem` array, and assign them to the struct using `RNA_def_struct_property_tags(...)`.
* To set tags for an RNA-property in C, use the new `RNA_def_property_tags(...)`.
* To set tags for an RNA-property in Python, use the newly added tags parameter. E.g. `bpy.props.FloatProperty(name="Some Float", tags={'SOME_TAG', 'ANOTHER_TAG'})`.
2017-11-29 13:53:34 +11:00
f89563a806 Merge branch 'master' into blender2.8 2017-11-29 13:44:59 +11:00
0b325ba201 PyAPI: PyC_Err_PrintWithFunc utility function
Move function error printing utility into py_capi_utils.
2017-11-29 13:41:10 +11:00
Dalai Felinto
2f80fbbac3 Depsgraph: Fix Camera object showing when not in view layer
If the Scene->camera was not in the active view layer we would still see it in the viewport.
2017-11-28 17:47:22 -02:00
e559a99a04 Eevee: Fix T53413: Crash when using displacement bump relink.
ntree_shader_relink_displacement is creating a transient node that does not have a correct original to point to.
In this case we revert to constant uniform.
2017-11-28 17:22:37 +01:00
701ebb0a64 Draw manager: Pass explicit context to DEG scene update callback
This way it is more clear what is needed to be passed and what is available
in the callback itself.

Thanks Dalai for review and tips about engine type!
2017-11-28 16:47:03 +01:00
e183372f90 Merge branch 'master' into blender2.8 2017-11-28 16:34:43 +01:00
0c7fbc435f Cleanup (remove commented OMP directive). 2017-11-28 16:31:11 +01:00
08e7b5d348 Cleanup: naming 2017-11-28 15:08:43 +01:00
178ea1f798 Cleanup, naming of engine type variable 2017-11-28 15:06:32 +01:00
e5a74f3ad3 Audaspace: Fix -Wreorder warning
Makes building less noisy, helps catching real introduced warnings/errors.

@xeXyon, mind having a look here and possibly apply to upstream? :)
2017-11-28 14:24:56 +01:00
9d6bd665e3 Depsgraph: Wrap context used for editors update callback into a structure
This way we can extend it much easier.
2017-11-28 14:24:56 +01:00
db2a603f6e Depsgraph: Remove workaround for Blender Internal in viewport
This commit effectively reverts fix T45702 done in 067fe2719a.

Reasoning:

- Blender Internal is being replaced with Eevee, and will be removed entirely
  rather soon.

- All render engines are planned to have own depsgraph, so such threading
  conflicts should no longer be an issue.

- We don't want to spend time on porting workarounds for EOL things to a new
  design. Less code -- faster the work :)

- If such notifications will end up needed for some other cases, we would
  need to re-implement this a more proper depsgraph tagging/flushing and make
  it to work with all copy-on-write datablocks and everything.
2017-11-28 14:24:56 +01:00
86bfce6794 Depsgraph: Don't call DEG ID update functions directly
There might be much more logic involved there, also we might not know proper
evaluated CoW pointer there yet. So we leave this to dependency graph to
decide what exactly to do here.
2017-11-28 14:24:56 +01:00
bf5b931d64 Removing OMP: BKE's tracking_stabilize.
Again, 2 times quicker with BLI than with OMP (from about 5ms to 2.5ms
per frame for the parallelized loop, on a rather small video...).
2017-11-28 12:38:10 +01:00
604de7cbe8 Merge branch 'master' into blender2.8 2017-11-28 20:35:24 +11:00
7c64e33b01 makesdna/makesrna: silence output by default
No need to print status for basic & reliable operations,
build systems can output operations they run if needed,
or debug output changed in the source if developers are debugging.

Nice for ninja, so any printed text hints at a problem to fix.
2017-11-28 20:27:40 +11:00
Dalai Felinto
91034646c7 Fix T53291: Deleting objects do not delete them from the blend file
User count was wrong for newly created files. We increase/decrease user count
when we link/delete objects from a SceneCollection.

So we don't want to leave user count of 1 after calling BKE_libblock_alloc in
BKE_object_add_only_object().
2017-11-27 14:52:21 -02:00
Dalai Felinto
14c3ef8253 Fixing alembic unittest after render layer purge 2017-11-27 14:52:21 -02:00
2bf3825711 Fix T53145: bevel tool does not start with amount at zero. 2017-11-27 16:57:14 +01:00
29044cfb12 Depsgraph: Parameters component does exist in objects 2017-11-27 16:34:44 +01:00
f046af4d5d Merge branch 'master' into blender2.8 2017-11-27 16:23:32 +01:00
63bf489734 Cleanup: indentation 2017-11-27 16:22:09 +01:00
9e658b5ebc Remove workaround for loopcut and DM stability
Neither me nor Campbell could redo the issue, lets get rid of this workaround
and fix it properly if still needed.
2017-11-27 15:52:02 +01:00
5191104776 Depsgraph: Sanitize placement of component types in switch statement
Makes it more clear why and what is being ignored.
2017-11-27 15:34:36 +01:00
488b6fa669 Merge branch 'master' into blender2.8 2017-11-27 14:52:31 +01:00
e3f2b1676c Depsgraph: Make sure unexpected configuration does not happen 2017-11-27 14:51:49 +01:00
f54e076ae6 Merge branch 'master' into blender2.8 2017-11-27 14:32:19 +01:00
ef439a1f7e Sequencer: Fix missing FX compositor when starting rendering from frame with DoF disabled 2017-11-27 14:24:16 +01:00
408515810e Merge branch 'master' into blender2.8 2017-11-27 14:08:35 +01:00
9b42b3e114 Sequencer: Add option to render OpenGL preview with DoF
The title says it all actually, controlled with DoF check box next to textured
solid check box.

Thanks Campbell for review!
2017-11-27 12:21:21 +01:00
37fc23dd9e Refactor view3d offscreen drawing to avoid having multiple boolean arguments
This is fully unreadable to have lots of boolean arguments scattered across the
whole argument list. What does `false, true, true` mean in terms of behavior?

Replace those with bitfield which has advantage of having more human readable
meaning.
2017-11-27 12:11:56 +01:00
ff9cf06645 Tracking: Cleanup. make code friendly for multi-column editing 2017-11-27 08:50:01 +01:00
3bd6c8bfa2 WM: don't change selection on workspace append 2017-11-27 18:40:09 +11:00
d4161845b2 Tool System: show manipulators at startup
Support duplicating, switching workspaces too.
2017-11-27 18:36:54 +11:00
ee99d1453a Fix crash duplicating workspace 2017-11-27 17:24:26 +11:00
885e73d387 Manipulator: ignore depth-buffer for scale cage 2017-11-27 15:51:18 +11:00
7b8e89f297 Cleanup: incorrect comment 2017-11-27 15:15:56 +11:00
46d9c5de84 WM: handle widgets before tool keymaps
Allows adjusting on-screen widgets even when a tool is selected.
2017-11-27 15:10:33 +11:00
de09366d57 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/mask/mask_draw.c
2017-11-26 20:29:56 +01:00
440aa2bf70 Cleanup: ImageEditor's mask drawing code was re-implementing BKE_maskrasterize_buffer!
So this deduplicates and simplifies code, yeah.

Also, as an odd bonus, new code seems slighly quicker than previous one
(about 5 to 10% quicker).
2017-11-26 19:18:12 +01:00
06e64058dd Removing OMP: BKE's mask_rasterize.c
Once again nothing much to say here, except that whole mask rendering
process from VSE is about 25% quicker now. ;)
2017-11-26 19:06:26 +01:00
440a49a24c Removing OMP: autotrack BKE code.
Pretty straightforward this time, we already have a single struct
pointer containing all needed data (or nearly).

And we gain about 10-15% speed on tracking! :)
2017-11-26 17:25:41 +01:00
f1ce279903 Removing OMP: bmesh_operators.c
Two more 'not really useful' cases (OMP only shows some noticeable
speedup with above 1M elements, and since this is quick operation anyway
compared to even ather basic operators, gain is in the 1% area of total
processing time in best case).

So not worth parallelizing here, we'll gain much more on tackling heavy
operations. ;)

And BMesh is free from OMP now!
2017-11-26 16:03:29 +01:00
2b6f345558 Removing OMP: bmesh_interp.c
Performances tests on this one are quite surprising actually...
Parallelized loop itself is at least 10 times quicker with new BLI_task
code than it was with OMP. And subdividing e.g. a heavy mesh with 3
levels of multires (whole process) takes 8 seconds with new code, while
10 seconds with OMP one. And cherry on top, BLI_task code only uses
about 50% of CPU load, while OMP one was at nearly 100%!

In fact, I suspect OMP code was not properly declaring outside vars,
generating a lot of uneeded locks.

Also, raised the minimum level of subdiv to enable parallelization,
tests here showed that we only start to get significant gain with subdiv
levels of 4, below single threaded one is quicker.
2017-11-26 16:03:29 +01:00
099bda8875 Removing OMP: nuke last usages in bmesh_mesh.c
Those three ones were actually giving no significant benefits, in fact
even slowing things down in one case compared to no parallelization at
all (in `BM_mesh_elem_table_ensure()`).

Point being, once more, parallelizing *very* small tasks (like index or
flag setting, etc.) is nearly never worth it.

Also note that we could not easlily use per-item parallel looping in
those three cases, since they are heavily relying on valid
loop-generated index (or are doing non-threadable things like allocation
from a mempool)...
2017-11-26 16:03:29 +01:00
Mathieu Menuet
83e80db56e Fix T53349: AO bounces not working correct with OpenCL. 2017-11-26 15:53:00 +01:00
311da4cd16 Cleanup: rename edge -> edges 2017-11-26 20:13:18 +11:00
23252eece6 Minor improvement to last commit
Don't operate on multiple boundaries at once,
instead keep collapsing from the first selected boundary.
2017-11-26 18:38:45 +11:00
329bf8e1bf BMesh: improve edge rotate when edges share faces
Previously outcome depended on order of edges,
now the longest boundary edges are rotated first,
then the faces connected edges.

This gives more predictable results, allowing regions containing
a vertex fan to be rotated onto the next vertex.
2017-11-26 17:51:22 +11:00
5b225c59bb Cleanup: move edge-rotate into own file 2017-11-26 13:42:25 +11:00
941deaca7a Fix T53393: Change from 'd' key to 'draw' panel button causes pencil to be activated immediately instead of upon LMB 2017-11-26 13:06:16 +13:00
3c1f3c02c6 Fix for Fix (c): broken atomic lock in own bmesh code.
That was a nasty one, Debug build would never have any issue (even tried
with 64 threads!), but Release build would deadlock nearly immediately,
even with only 2 threads!

What happened here (I think) is that gcc optimizer would generate a
specific path endlessly looping when initial value of virtual_lock was
FLT_MAX, by-passing re-assignment from v_no[0] and the atomic cas
completely. Which would have been correct, should v_no[0] not have been
shared (and modified) by multiple threads. ;)

Idea of that (broken) for loop was to avoid completely calling the
atomic cas as long as v_no[0] was locked by some other thread, but...
Guess the avoided/missing memory barrier was the root of the issue here.

Lesson of the evening: Remember kids, do not trust your compiler to
understand all possible threading-related side effects, and be explicit
rather than elegant when using atomic ops!

Side-effect lesson: do check both release and debug builds when messing
with said atomic ops...
2017-11-25 23:14:54 +01:00
dd6c918b2c Fix broken atomic_cas lock in own recent commit in bmesh.
Using atomic cas correctly is really hairy... ;)

In this case, the returned value from cas needs to validate *two*
conditions, it must not be FLT_MAX (which is our 'locked' value and
would mean another thread has already locked it), but it also must be
equal to previously stored value...

This means we need two steps per loop here, hence using a 'for' loop
instead of a 'while' one now.

Note that collisions are (as expected) very rare, less than 1 for 10k
typically, so did not catch the issue initially (also because I was
mostly working with release build to check on performances...).
2017-11-25 20:28:12 +01:00
9aece5e1e7 Eevee: Fix Defered AO defines 2017-11-25 17:47:52 +01:00
0c4740735c Eevee: Fix SSS mixing with transparent bsdf 2017-11-25 17:47:52 +01:00
5dfeecf47b Eevee: Add SSS support in probes
Previously the lighting of SSS material was not present in reflection probe or irradiance grid.

This does not compute the SSS correctly but at least output the corresponding irradiance power to the correct output.
2017-11-25 17:47:52 +01:00
Julian Eisel
974ffaa39d Get workspace mode from the workspace view-layer
While this probably isn't the final solution we'll go with, it's nicer
as current one, which was basically broken. So consider this as
temporary solution.

It also allows testing how changing workspace changes mode & active
object, but only by having the workspaces use different view-layers.

Decided to remove WorkSpace.mode for now. If we need to bring it back,
we'll have to version patch it anyway.
2017-11-25 03:42:49 +01:00
7cbc7dd904 Eevee: SSS: Add separated Albedo option.
This option prevent from automatically blurring the albedo color applied to the SSS.

While this is great for preserving details it can bleed more light onto the nearby objects since the blurring will be done on pure "white" irradiance.
This issue is to be tackled in a separate commit.
2017-11-24 22:29:28 +01:00
8d4aa6bf44 GPUFramebuffer: Bump the framebuffer attachement limit to 5 color textures 2017-11-24 22:29:28 +01:00
f591060856 Backgroudn set tests: Correct evaluation order
All depsgraphs are sharing same object state for now, which means doing set
scene evaluation after main scene evaluation will override all modifications
done by the main scene.
2017-11-24 16:55:41 +01:00
8a1a053250 Depsgraph: Tag background scene for base flags update
When setting background object, it might pull new objects in and those objects
will not have proper flags unless on_visible_update() was called afterwards.
2017-11-24 16:55:33 +01:00
6130524d8c Revert "Depsgraph: Remove legacy re-scheduling code"
This reverts commit 90ff88646d.

Can not do this yet, if object is not part of graph yet it will not have entry
taq. Need some more generic solution here.
2017-11-24 16:44:54 +01:00
d211c36c83 Depsgraph: Allow tagging whole scene for base flags flush 2017-11-24 16:34:06 +01:00
20c8c9a3c7 Depsgraph: make it more obvious who's view layer is being updated 2017-11-24 16:33:21 +01:00
a1500fe865 Depsgraph: Do log from newly base flag flush function 2017-11-24 16:07:38 +01:00
90ff88646d Depsgraph: Remove legacy re-scheduling code 2017-11-24 15:46:25 +01:00
3023eb384a Depsgraph: Fix crash when deleting object which is linked both directly and indirectly 2017-11-24 15:46:25 +01:00
71febcbae0 Depsgraph: Make code a bit more robust against tagging indirectly linked objects 2017-11-24 15:46:25 +01:00
a365f1dd65 Depsgraph: Re-schedule pending tags after relations update
It is possible to have situation when we need to both update relations and do
some updates on random IDs. This was only done before for objects using their
recalc field. This means, every update tag which did not fit into there would
have been lost after updating relations.

Now we do some smarter re-scheduling of operations after relations are updated.
2017-11-24 15:46:25 +01:00
dde05cbcc2 Depsgraph: Directly linked objects should be priority for base flags over set scenes 2017-11-24 15:46:25 +01:00
ad288c9c34 Depsgraph: Fix race condition when object is coming from both scene and set 2017-11-24 15:46:25 +01:00
33b8a3f9e8 Depsgraph: Pass base in relations builder 2017-11-24 15:46:25 +01:00
272da2790b Depsgraph: Correct wrong base_flags for objects coming from set scene 2017-11-24 15:46:25 +01:00
81324dbfbf Depsgraph: Use proper link flag for indirectly linked parent object 2017-11-24 15:46:25 +01:00
56367cfeb3 Merge branch 'master' into blender2.8 2017-11-24 15:46:10 +01:00
1caa267ee6 Depsgraph: Cleanup, indentation 2017-11-24 15:45:41 +01:00
c546fb9e85 Merge branch 'master' into blender2.8 2017-11-24 15:40:53 +01:00
5f7981243e Depsgraph: Allow finding operations after construction is done 2017-11-24 15:38:20 +01:00
a8b97b2e41 Depsgraph: Deduplicate operation node finding logic 2017-11-24 15:35:42 +01:00
d232363290 Depsgraph: Use proper return type for find_node method 2017-11-24 15:34:53 +01:00
d80c1e1e11 Depsgraph: Use get_ prefix for function which expect operation to exists 2017-11-24 15:32:29 +01:00
d8f33fc818 Depsgraph: Make has_ prefixed function to return boolean 2017-11-24 15:26:54 +01:00
93e8a045df Depsgraph: Introduce explicit method which finds operation or returns NULL 2017-11-24 15:24:33 +01:00
68654c0be5 Depsgraph: Make more clear what find_operation() is doing for component 2017-11-24 15:21:50 +01:00
Dalai Felinto
dc2ae8fdf2 Unittest: Update background set test to test for proper flag
This test will fail until depsgraph is fixed.
But introduced on 87c821ff26.
2017-11-24 11:42:28 -02:00
Dalai Felinto
4493d0d085 Object RNA: expose base_flag settings:
object.is_from_set
object.is_from_duplicator

We need them for the unittests, and users can benefit from it as well.
Note, this only makes sense when reading objects from depsgraph:

`bpy.context.depsgraph.objects`
2017-11-24 11:41:49 -02:00
Dalai Felinto
1971dd2976 Layers Unittest: Background set
This is an incomplete test since we cannot check for the
depsgraph selection value with the current API, nor can we
see if the relationship lines are being drawn.
2017-11-24 10:54:13 -02:00
121b44698a Depsgraph: Re-build relations when changing set scene
Set scene is a part of dependency graph, so need to tag relations for update
after changing set scene/
2017-11-24 13:02:19 +01:00
6b4a243377 Merge branch 'master' into blender2.8 2017-11-24 10:58:28 +01:00
543945b9e5 Correct sensor fit use 2017-11-24 21:01:04 +11:00
8db63c6a1c Cleanup leftover timing debug prints from own recent commits.
Sorry about that...
2017-11-24 10:43:29 +01:00
87c821ff26 Depsgraph: Flush flags from base to object as an evaluation step
Previously it was done during depsgraph iteration, which is not good at all,
since after evaluation nobody should really modify how object was evaluated.
2017-11-24 10:19:48 +01:00
93f6a9d652 Depsgraph: Add special cases to deal with multiple objects selection update
The idea then is to avoid doing depsgraph tag for each of the object which
selection is changed (which could be tricky to do anyway due to lots of areas
of selection code where this could happen), and simply tag scene's with
selection update tag.

This will involve synchronization of flags from base to objects, which is
rather cheap anyway.
2017-11-24 10:19:48 +01:00
d2679b3e42 Depsgraph: Add base flag flush operation definition 2017-11-24 10:19:48 +01:00
1949ed558b Depsgraph: Pass base to build_object() 2017-11-24 10:19:48 +01:00
c1f690428c Depsgraph: Create CoW copy of scene early on
Originally this only needed for view collections, but it will be needed for
bases really soon as well.
2017-11-24 10:19:48 +01:00
a5d763a11e Depsgraph: Use depsgraph to handle edit mode selection
This is crucial bit since batch cache is stored in the evaluated object,
meaning we can't tag it's hatch cache dirty from the notifier system.
Not easily at least. Better to leave this job to depsgraph, it knows
all the copies of data.
2017-11-24 10:19:48 +01:00
0f5ef668da Manipulator: fix camera lens update glitch
Property range setup initially used values that can change.
2017-11-24 20:28:13 +11:00
cda22ce0e2 Eevee: Fix SSR adding too much light.
Basically the probes were rendered twice.
2017-11-24 06:37:37 +01:00
2302ba2245 Eevee: Refactor of lit_surface_frag.glsl
This cleanup removes the need of gigantic code duplication for each closure.

This also make some preformance improvement since it removes some branches and duplicated loops.

It also fix some mismatch (between cycles and eevee) with the principled shader.
2017-11-24 06:37:37 +01:00
16a2802149 Eevee: SSS: Principled Shader: Add a workaround the lack of scale input
This is a hack to make the user control the SSS radius even though the profile is baked with the default radius values.

This is completly against UI principles since you cannot edit the profile radiuses while there is something plugged into the radius socket.
Better solution will be to either have a dedicated node value for RGB radiuses and a SSS scale socket only for eevee.
2017-11-24 06:37:37 +01:00
f3b384862d Merge branch 'master' into blender2.8 2017-11-24 14:30:36 +11:00
c62e3a05b0 Cleanup: -Wnonnull-compare GCC warning 2017-11-24 14:29:17 +11:00
f8fc77ec84 Cycles: add object level holdout property, to replace Z mask layer. 2017-11-24 00:12:48 +01:00
d992240bfa Fix unneeded legacy OpenGL call in Cycles viewport drawing. 2017-11-24 00:12:48 +01:00
b63442e0b6 Minor cleanup for own recent commits. 2017-11-23 22:43:11 +01:00
a786baa193 Merge branch 'master' into blender2.8 2017-11-23 21:36:27 +01:00
43ddf0e9a7 Getting rid of OMP: first usage of new parallel BMesh items iteration instead.
`BM_mesh_normals_update` was converted from OMP to new parallel iterator code,
basic test with heavily subdivided cube (24.5k faces) gives:
    - old OMP code: average 10ms per run.
    - new BLI_task code: average 6ms per run.

So new code seems to be easily 40% quicker, in addition to getting rid of OMP. ;)

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2930
2017-11-23 21:21:32 +01:00
bc3f0cfd14 BMesh: add limited support for parallelization over some basic iterators.
This merely uses new memloop/task looper over vertex/edge/face mempools.

Quite obviously, only BM_VERTS/EDGES/FACES_OF_MESH iterators are
supported.
2017-11-23 21:19:54 +01:00
cf6e8edda5 atomic_ops: add atomic_cas_float helper. 2017-11-23 21:17:16 +01:00
efb86b712d Add a new parallel looper for MemPool items to BLI_task.
It merely uses the new thread-safe iterators system of mempool, quite
straight forward.

Note that to avoid possible confusion with two void pointers as
parameters of the callback, a dummy opaque struct pointer is used
instead for the second parameter (pointer generated by iteration over
mempool), callback functions must explicitely convert it to expected
real type.

Also added a basic gtest for this new feature.
2017-11-23 21:14:43 +01:00
b84e6dfee4 Add ability to use more than one mempool iterator simultaneously.
This will allow threaded tasks to 'consume' all mempool items in
parallel tasks, each one working on a whole chunk at once (to reduce
concurrency managing overhead).
2017-11-23 21:12:00 +01:00
c947788830 Merge branch 'master' into blender2.8 2017-11-23 20:34:03 +01:00
ff9eab7926 atomic_ops: Copy/adapt static assert macro from BLI_utildefines, and use it.
Checking for type sizes is much nicer with a static assert!
2017-11-23 20:25:55 +01:00
d423e66d34 Add non-gcc variant of static assert macro.
Adapted from http://www.pixelbeat.org/programming/gcc/static_assert.html.

Note that this macro just discards error message, so error when building
is much less nice than with gcc's _Static_assert... But error log will
point to right place in code, so should still be OK.
2017-11-23 20:25:55 +01:00
5e13097dc3 Fix T53145: bevel tool fails when used a second time.
Pixel size was not initial early enough. For first time this was not a problem
because the bevel amount starts at 0 then, and after the mouse moves the pixel
size is initialized. For the second time the bevel amount starts at a non-zero
value, and it failed then.
2017-11-23 20:17:31 +01:00
4f8bffa7bf Merge branch 'master' into blender2.8 2017-11-23 19:16:11 +01:00
debd9f6ea1 Fix T53171: lamp specials strength tweak fails with renamed emission nodes. 2017-11-23 19:13:31 +01:00
56da112ae0 Fix T53360: crash with GLSL bump mapping and missing group output node. 2017-11-23 18:12:32 +01:00
Dalai Felinto
b79b8478ee Cleanup: Rename ViewLayer *sl > ViewLayer *view_layer 2017-11-23 14:58:01 -02:00
f218e6d4da Fix T53276: encoding output quality UI clarification. 2017-11-23 17:55:25 +01:00
6be95f8778 Fix T53357: harmless assert after recent addition of render time pass. 2017-11-23 17:14:35 +01:00
dd04f54e84 Fix inaccuracy when storing material ID pass in half float multilayer EXR.
These and other non-RGB passes should always be stored as full float, the
precision loss is too unpredictable.

Related to T53381, but that one is about file output nodes where we don't
know the type of data being saved currently.
2017-11-23 17:14:04 +01:00
e50ed90e4d Fix T53348: Cycles difference between gradient texture on CPU and GPU. 2017-11-23 17:14:04 +01:00
2f9df08aa8 Merge branch 'master' into blender2.8 2017-11-23 17:09:29 +01:00
e704d8a616 Moar attempt to fix bloody MSVC intrinsic mess... 2017-11-23 16:58:20 +01:00
df06f1c816 Attempt to fix bloody MSVC atomic intrinsic mess... 2017-11-23 16:53:03 +01:00
Dalai Felinto
e314aa1e47 Fix specific 2.8 broken files
Short of checking for types (SceneLayer) this is the only reliable
way of getting all 2.80 files to date.
2017-11-23 13:33:58 -02:00
5330e7fd29 Merge branch 'master' into blender2.8 2017-11-23 16:29:00 +01:00
580b34e52b atomic_ops: add char versions of uint8_t atomic primitives. 2017-11-23 16:24:34 +01:00
497e2b3dfa Cleanup: use signed atomic ops when needed. 2017-11-23 16:24:34 +01:00
105b95835f atomic_ops: add signed versions of primitives.
Reason is motsly that dealing with type conversion in calling code is
not great, makes it less readable, and can generate hidden bugs in case
original type changes and atomic primitive calls are not updated
accordingly...
2017-11-23 16:24:33 +01:00
35e8138c95 Merge branch 'master' into blender2.8 2017-11-23 15:26:53 +01:00
75a87abdc9 Depsgraph: Cleanup, deduplicate code around component registration 2017-11-23 15:23:19 +01:00
f7af770446 Depsgraph: Cleanup, don't use view layer name
Dependency graph is only built per-view-layer now, so no need to store names.
Will speed up operation lookup as well,.
2017-11-23 14:44:14 +01:00
Julian Eisel
641d870b37 Tag properties of transform operators as 'advanced'
Sets the 'advanced' tag for some properties of following transform operators:
* Create Orientation
* Translate
* Resize
* Skin Resize
* Trackball
* Rotate
* Tilt
* Bend
* Shear
* Push/Pull
* Shrink/Flatten
* To Sphere
* Edge Slide
* Vertex Slide
* Edge Crease
* Edge Bevel Weight
* Sequence Slide
* Transform
2017-11-23 14:21:40 +01:00
Julian Eisel
3cdd99767e Tag properties of some mesh editing operators as 'advanced'
Sets the 'advanced' tag for some properties of following mesh edit operators:
* Loop Cut
* Subdivide
* Mark Seam
* Smooth Vertex
* Laplacian Smooth Vertex
* Merge
2017-11-23 14:14:34 +01:00
Julian Eisel
60cbdb0152 Support tagging operator properties as 'advanced'
This will later be used to show advanced operator properties separate from
basic (as in non-advanced) ones in the UI.

Tagging a single operator property in C should be done via
`WM_operatortype_prop_tag()`. It does additional checks for type safety
that `RNA_def_property_tags()` doesn't do.

To avoid having to tag each advanced property individually, multiple
ones can be tagged by wrapping them into
`WM_operatortype_props_advanced_bein()` and
`WM_operatortype_props_advanced_end()` calls. It's also possible to only
call `_begin()`, all properties added after this will get tagged then.
In most cases this last approach should be sufficient.

Example of Python usage:
`my_float = bpy.props.FloatProperty(name="Some Float", tags={'ADVANCED'})`
2017-11-23 13:58:05 +01:00
Julian Eisel
23d148ecaf RNA: Allow structs to define tags for their properties
Adds support for defining a number of tags as part of the rna-struct
definition, which its properties can set similar to property-flags.
BPY supports setting these tags when defining custom properties too.

* To define tags for a struct (which its properties can use then), define the tags in an `EnumPropertyItem` array, and assign them to the struct using `RNA_def_struct_property_tags(...)`.
* To set tags for an RNA-property in C, use the new `RNA_def_property_tags(...)`.
* To set tags for an RNA-property in Python, use the newly added tags parameter. E.g. `bpy.props.FloatProperty(name="Some Float", tags={'SOME_TAG', 'ANOTHER_TAG'})`.

Actual usage of this will be added in a follow-up commit.
2017-11-23 13:54:11 +01:00
545f671b80 Merge branch 'master' into blender2.8 2017-11-23 12:04:57 +01:00
f2842ac65e Depsgraph: Cleanup, split build_object() a bit 2017-11-23 12:01:31 +01:00
7ba1babc90 Merge branch 'master' into blender2.8 2017-11-23 11:47:47 +01:00
f3fa5c1258 Depsgraph: Cleanup, always call full object 2017-11-23 11:39:28 +01:00
Dalai Felinto
99f5180435 New view layers should be named "View Layer" (not Render Layer) 2017-11-23 08:31:15 -02:00
Dalai Felinto
3abe8b3292 Rename any instance of scene layer or render layer in code with view layer
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.

* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started

Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.

Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D2927
2017-11-23 07:48:23 -02:00
fb7d23bdb2 Merge branch 'master' into blender2.8 2017-11-23 16:28:05 +11:00
434ed96dd2 Revert "BLI_utildefines: Support SWAP macro with two args"
This reverts commit d749320e3b.

It's possible the container struct is larger,
we could do sizeof checks that falls back to memmove
but rather avoid complicating things.
2017-11-23 15:21:50 +11:00
3bec70ca60 Use custom SWAP macro for swapping userdef data
Avoids complicating the common case
2017-11-23 15:18:22 +11:00
100ffd3c0f Eevee : Fix error with volumetrics. 2017-11-22 19:04:52 +01:00
Dalai Felinto
94d40aca0c Fix doversion crash with 2.8 files that had freestyle 2.8
Crash introduced on: 3a95bdfc65
We can't decrease user count of freestyle linestyle IDs before linking.

Moving doversion for after linking.
And for the records we are simply removing the freestyle data altogether.
This is only for files created with 2.8, so it should be fine.
2017-11-22 15:42:18 -02:00
73c4ba18d5 Merge branch 'master' into blender2.8 2017-11-23 03:26:00 +11:00
326efb4319 Fix T53274: Saving template prefs overwrites default prefs 2017-11-23 03:12:00 +11:00
d749320e3b BLI_utildefines: Support SWAP macro with two args 2017-11-23 03:11:48 +11:00
Dalai Felinto
15a0ad6027 Fix multi layer/multi pass render
But introduced on the SceneRenderLayer > RenderLayer commit:
3a95bdfc65

Reported by Sergey Sharybin (over irc).
2017-11-22 10:34:19 -02:00
5d2b3a966e Merge branch 'master' into blender2.8 2017-11-22 12:50:17 +01:00
4e6f86942c Depsgraph: Remove debug only code 2017-11-22 12:08:02 +01:00
Dalai Felinto
66c0f041a9 Fixup for last commit: flipped logic for disabling SceneLayer render 2017-11-22 08:53:46 -02:00
Dalai Felinto
5265cfdef5 Layers doversion: Don't set the Viewport created layer as renderable 2017-11-22 08:50:15 -02:00
Dalai Felinto
ed1278b0bc Fix SceneRenderLayer memory leak for files created with 2.8 2017-11-22 08:41:14 -02:00
Dalai Felinto
3a95bdfc65 SceneRenderLayer Removal/Refactor
This patch moves all the functionality previously in SceneRenderLayer to SceneLayer.
If we want to rename some of these structs now would be a good time to do it, before they are in SceneLayer.

Everything should be working, though I will test things further tomorrow. Once this is committed depsgraph can get
rid of the workaround added in rna_Main_meshes_new_from_object and finish whatever this patch was preventing from being finished.

This patch also adds a few placeholders for the overrides (samples, ...). These are obviously not working, so some unittests that rely on 'lay', and 'zmask' will fail.

This patch does not addressed the change of moving samples to ViewRender (I have this as a separate patch and needs some separate discussion).

Following next is the individual note of the individual parts that were committed.

Note 1: It is up to Cycles to still get rid of exclude_layer internally.
Note 2: Cycles still need to handle its own doversion for the use_layer_samples cases and

(1) Remove the override as it is
(2) Add a new override (scene.cycles.samples) if scene.cycles.use_layer_samples != IGNORE

Respecting the expected behaviour when scene.cycles.use_layer_samples == BOUNDED.

Note 3: Cycles still need to implement the per-object holdout
(similar to how we do shadow catcher).

Note 4: There are parts of the old (Blender Internal) rendering pipeline that is still
using lay, e.g., in shi->lay.

Honestly it will be easier to purge the entire Blender Internal code away instead of taking things from it bit by bit.

Reviewers: sergey, campbellbarton, brecht

Differential Revision: https://developer.blender.org/D2919
2017-11-22 07:13:33 -02:00
Dalai Felinto
8ba6103e66 SceneRenderLayer > SceneLayer: Convert Lay
There are parts of the old (Blender Internal) rendering pipeline that is still
using lay, e.g., in shi->lay.

Honestly it will be easier to purge the entire Blender Internal code away instead
of taking things from it bit by bit.
2017-11-22 07:13:33 -02:00
Dalai Felinto
0a6df6b173 Doversion: We should always add the old RenderLayer
We cannot assume a render layer does not have a setting that was needed for
compositing. Even if:

```
(scene->lay & render_layer->lay) != (scene_lay) &&
(render_layer->lay | render_layer->lay_exclude) == 0))
```

Which would mean use the scene layers just as they are.
2017-11-22 07:13:33 -02:00
Dalai Felinto
cb67be3f22 Bitflag tests simplification 2017-11-22 07:13:33 -02:00
Dalai Felinto
d276e45ee6 SceneRenderLayer > SceneLayer: Convert Z-Mask
Note: Cycles still need to implement the per-object holdout
(similar to how we do shadow catcher).
2017-11-22 07:13:33 -02:00
Dalai Felinto
e22ca0fb86 SceneRenderLayer > SceneLayer: Convert samples_override
Note: Cycles still need to handle its own doversion for theses cases and

(1) Remove the override as it is
(2) Add a new override (scene.cycles.samples) if scene.cycles.use_layer_samples != IGNORE

Respecting the expected behaviour when scene.cycles.use_layer_samples == BOUNDED.
2017-11-22 07:13:33 -02:00
Dalai Felinto
05306d9766 SceneRenderLayer > SceneLayer: Convert material_override 2017-11-22 07:13:33 -02:00
Dalai Felinto
f15c63b0c2 SceneRenderLayer > SceneLayer: Remove light_override 2017-11-22 07:13:33 -02:00
Dalai Felinto
9ce2370ce4 SceneRenderLayer > SceneLayer: Remove exclude_layer
Note: It is up to Cycles to still get rid of exclude_layer internally:
RenderLayerInfo.exclude_layer
2017-11-22 07:13:33 -02:00
69b5165902 WM: minor correction to user-pref writing
When saving templates had wrong return value.
2017-11-22 17:11:03 +11:00
846cdf5318 Eevee : SSS : Add Translucency support.
This adds the possibility to simulate things like red ears with strong backlight or material with high scattering distances.

To enable it you need to turn on the "Subsurface Translucency" option in the "Options" tab of the Material Panel (and of course to have "regular" SSS enabled in both render settings and material options).
Since the effect is adding another overhead I prefer to make it optional. But this is open to discussion.

Be aware that the effect only works for direct lights (so no indirect/world lighting) that have shadowmaps, and is affected by the "softness" of the shadowmap and resolution.

Technical notes:

This is inspired by http://www.iryoku.com/translucency/ but goes a bit beyond that.
We do not use a sum of gaussian to apply in regards to the object thickness but we precompute a 1D kernel texture.
This texture stores the light transmited to a point at the back of an infinite slab of material of variying thickness.
We make the assumption that the slab is perpendicular to the light so that no fresnel or diffusion term is taken into account.
The light is considered constant.
If the setup is similar to the one assume during the profile baking, the realtime render matches cycles reference.
Due to these assumptions the computed transmitted light is in most cases too bright for curvy objects.

Finally we jitter the shadow map sample per pixel so we can simulate dispersion inside the medium.
Radius of the dispersion is in world space and derived by from the "soft" shadowmap parameter.
Idea for this come from this presentation http://www.iryoku.com/stare-into-the-future (slide 164).
2017-11-22 04:51:21 +01:00
d77f1d6538 Fix T53313: bevel shader with transmission render artifacts. 2017-11-22 01:59:21 +01:00
5f4058ddbc Removing OMP: get rid of usages in /bmesh/ area.
Just removing it, such cases are not bottlenecks and not worth the
complication of doing real threading with own BLI_task.

Other (remaining) usages may be relevant, need case-by-case check.
2017-11-21 22:25:22 +01:00
7770c2ef87 Removing OMP: get rid of last bit in /editors/ area.
Just removing it, such cases are not bottlenecks and not worth the
complication of doing real threading with own BLI_task.
2017-11-21 22:25:22 +01:00
6c372530b4 Cleanup: We do not use camel case in Blender code
At least not for variables.
2017-11-21 17:34:44 +01:00
6785a2bd66 Fix T53371: Keying Node fails with values above 1
This was expected behavior for over-exposured lamps when the mode was originally
created for Tears of Steel. Turns out, there could be really bad green screen in
real production which will only have green (or rather screen) channel over
exposured.

Tweaked condition now so we use least bright channel to see if the area has
proper exposure or not.

Seems to work fine in tests, but further tweaks are possible.
2017-11-21 17:31:45 +01:00
Dalai Felinto
ff810f08d8 Shows all Cycles panels based on scene, not context engine
This is tricky since we may want granular polling depending on the setting.
Or an option to pick whether we want the context or the scene to drive the
panels to prevent too many panels when mixing Eevee and Cycles for example.
2017-11-21 13:19:36 -02:00
a80b74ab0d Depsgraph: Fix warning with Empty objects 2017-11-21 15:47:47 +01:00
83b3e3fe00 Depsgraph: Use evaluation context to get time from
This way we don't modify scene to get current frame from. Will also let us to
hopefully get rid of Scene stored in ModifierData.

Only did for Wave modifier for now, maybe someone is around to check on another
modifiers? :)
2017-11-21 15:40:24 +01:00
99ffd7b35d Depsgraph: Fix/workaround crash when toggling edit mode 2017-11-21 15:34:13 +01:00
6ee7a02558 Depsgraph: Tag evaluated mesh as such
Helps troubleshooting.
2017-11-21 15:33:48 +01:00
0debe33617 Depsgraph: Report pointer from object evaluation functions 2017-11-21 14:46:02 +01:00
2b1a354d64 Depsgraph: Fix crash removing object when CoW is enabled
Not sure why that check was even done there. Maybe some residue of debug.
2017-11-21 14:23:58 +01:00
528841ba90 Depsgraph: Remove workarounds used for cyclic dependencies
This was dangerous to do such calculations, and now it is solvable by making
dependency graph more granular in this case. Removing the workaround also saves
us a hassle of passing lots of extra arguments down the evaluation routines.

In theory, we can also remove EvaluationCOntext from constraints evaluation as
well now. But probably better to wait with such removal for now.

This commit effectively reverts 1130c53. Will do a proper fix in dependency
graph itself.
2017-11-21 14:23:57 +01:00
Stefan Werner
58a15b2bfe Cycles: Fixed compilation of CUDA kernels. Follow-up fix for my last commit. 2017-11-21 10:43:40 +01:00
d8f80fbe72 Cycles: Fix OSL brick node after recent fix 2017-11-21 04:30:12 -05:00
Stefan Werner
1febc85855 Cycles: Workaround for performance loss with the CUDA 9.0 SDK.
CUDA 9.0.176 apparently caused some slow down on high-end Pascal cards that can be mitigated by increasing the number of registers. See https://developer.blender.org/F1142667 for a detailed comparison.
2017-11-21 10:29:11 +01:00
9325b9bf15 Fix T53365: OpenCL has wrong shading of brick texture
Looks like some weird compiler difference with signed vs unsigned ints.
2017-11-21 00:42:55 -05:00
175e8fdc1e Disable adding scene sequence strips into themselves
D2923 by @spockTheGray w/ edits, see T52586 for details
2017-11-21 16:46:27 +11:00
d3fc5919f8 Eevee: SSS: Fix error in profile computation. 2017-11-21 06:28:38 +01:00
a591bd203e Cleanup: redundant ELEM use 2017-11-21 16:15:19 +11:00
96415cb52a Code cleanup: fix harmless compiler warning. 2017-11-20 23:32:06 +01:00
d089875c4c Fix build with OSL 1.9.x, automatically aligns to 16 bytes now. 2017-11-20 23:24:24 +01:00
0b413e406d Avoid passing context to motion path calculation 2017-11-20 22:33:16 +11:00
51e2844387 Cycles: Fix wrong behavior of sharpness in Cubic SSS
Was giving difference when using sharpness of 1.0 and 0.999 even though the
result was expected to be really close to each other.

This SSS profile will probably be removed in the future in favor of more
physically bases Burley, but for the time being don't see anything wrong
fixing an existing code.
2017-11-20 11:40:55 +01:00
a8777f9058 Merge branch 'master' into blender2.8 2017-11-20 20:45:03 +11:00
f34e03d34d Fix (unreported) Crash: broken RNA accessors to tesselated MCol data.
Regression from rB823bcf1689a3 (VPaint 2017 GSoC, this is not in 2.79 release).

Also cleanup, using fake-array-ification to access struct members is
generally not a great idea, but when we already have a totally confusing
broken struct layout, this is pure evil, as demonstrated here!

Found while investigating T53341.
2017-11-20 10:16:50 +01:00
65af15ad88 UV Cube Project: improve default behavior
- initialize the cube-size from the bounding box when it's not set.
- no longer wrap faces to keep in 0-1 bounds,
  other projection methods don't do this and calculating the scale
  prevents the UV's from being too far outside the view.
2017-11-20 19:51:19 +11:00
ed3b7a5cd4 Fix T53342: Outliner 'select hierarchy' broken
Was using cursor position from within menu,
clicking on the same position for every selected item (toggling).

Now operate on each selected outliner element, without toggling.
2017-11-20 16:02:37 +11:00
c0c696b014 Fix crash accessing line-style 2017-11-20 14:38:22 +11:00
8ba6236c48 Fix crash w/ NULL freestyle config 2017-11-20 14:35:41 +11:00
14e5711d69 Cleanup: line length, right shift 2017-11-20 14:29:50 +11:00
8af3f531b1 Cleanup: BLI headers first
Also move descriptions into doxy header
2017-11-20 14:29:50 +11:00
784614655f Fix T53343: Custom Normal Data Transfer Crashes when some vertexes have no faces.
Odd nobody noticed this earlier, was obvious bug in code logic here... :/

To be backported to 2.79a.
2017-11-19 20:43:59 +01:00
0a69e3b307 Option not to select with un-hide
D1518 from @mba105 w/ edits
2017-11-20 02:28:07 +11:00
92ea281017 Cleanup: remove BKE_utildefines
This was meant to be used for less general macros but was never used.

Rename BKE_BIT_TEST_SET to SET_FLAG_FROM_TEST
2017-11-20 01:47:31 +11:00
d2b03d2364 Fix: Undo pushes were missing for Add/Remove Driver Variable buttons, and Remove Driver button 2017-11-20 03:06:13 +13:00
2317fa6dcc Cleanup - Style 2017-11-20 02:56:40 +13:00
6f578740ef Fix T53300: Bone Extrude via Ctrl + Click is not done from active bone tail 2017-11-20 02:55:17 +13:00
e2585c2342 Fix compiler warning
--> render_result.c:832 - formal parameter 6 different from declaration
2017-11-20 02:08:55 +13:00
cc1253a5d9 Fix: "Lock Markers" option was not being obeyed by the "Sync Markers (when transforming)" option 2017-11-20 01:57:22 +13:00
fc77676f33 Bake Action operator: Added missing Bendy Bones support 2017-11-20 01:57:21 +13:00
c5f59f5854 Tweaks to make it easier to update bone motion paths (without the active bone needing to have any paths itself)
This commit introduces the following changes:
* Modified the poll callback on the "Update Paths" operator for bones
  so that it only checks if there are bones that have motion paths
  (instead of checking whether the active bone has paths).

  This makes it easier to update paths without having to first select one
  that has them - useful when the paths are all on hidden/hard-to-select bones.

* Add a readonly property, "has_motion_paths" to the animviz.motion_path
  RNA struct, providing easier access to the internal flag used above.
  This makes it possible for the UI to display the "Update" button without
  having to check various bones for motion paths.


Notes:
* The flag being used in these changes already existed, and was only really
  intended for internal use. However, since it was already used in many places
  for determining if auto-update of all bone paths was needed (e.g. after certain
  editing ops), it should be safe to use here too.

* The update_paths operator currently bakes all paths when activated, so there's
  currently no loss of functionality with changing to not checking if the active
  bone has any paths (e.g. we couldn't only update the active bone only either).
  That is still listed as a todo in the code.
2017-11-20 01:57:21 +13:00
c01ffefb68 Pasting poses now updates motion paths 2017-11-20 01:57:20 +13:00
cda05639df Fix T53229: "Sample Keyframes" errors with multiple pairs of keyframes selected
There were 2 issues here (first was the one reported):
1) Curve shape changes if multiple consecutive pairs of keyframes
   are selected. The problem is that after the first pair is handled,
   subsequent pairs get sampled on the basis of the modified curve.

2) With multiple separate "islands" selected, unselected points in between
   would get ignored, causing the entire curve to get sampled.
2017-11-20 01:57:20 +13:00
Julian Eisel
7f96323cd0 Merge branch 'master' into blender2.8 2017-11-19 13:16:14 +01:00
Julian Eisel
3133d2d58c Swap priority of system path overrides for dev builds
Suggested by Campbell, thanks!

Also moved the exception into own function and improved comments.

Fixes T53008.
2017-11-19 13:13:37 +01:00
10a112093f Vertex Paint: missed removing settings from UI 2017-11-19 17:00:56 +11:00
a151b46627 Fix T53347: Vertex paint crash on undo/exit 2017-11-19 16:45:27 +11:00
4de142e0b7 Eevee : Fix bug with SSS and SSR active node selection
The bug was affecting the ability to correctly edit the expected SSS profile.
2017-11-18 22:15:08 +01:00
abd5841441 CMake: remove solaris path 2017-11-19 03:46:50 +11:00
83e4e65074 Cleanup: outdated comment 2017-11-19 03:25:52 +11:00
40c8a18229 Cleanup: style 2017-11-18 17:22:54 +11:00
8f56cebe72 Fix BGE sound actuator property access 2017-11-18 17:16:25 +11:00
cd1d9950ab Add select similar custom bone shape
D2820 by @col-one w/ edits
2017-11-18 13:56:35 +11:00
119846a6bb Mikktspace: Speed up the merging of identical vertices
Previously, Mikktspace just bucketed the vertices based on one spatial coordinate and then ran full pairwise comparisons inside each bucket.
However, since models are three-dimensional, the bucketing has a massive false-positive rate, and since pairwise comparison is O(n^2), the merging process is very slow.

But, since we only care about exactly identical vertices, there is a much more efficient approach - we can just hash all values belonging to each vertex and form buckets based on the hash.
Since the hash has 32 bits and considers all values, false-positives are very unlikely - and since both hashing and the radixsort that's used for bucketing are O(n), both asymptotical and
real-world performance (as well as code complexity) are significantly improved.
2017-11-17 18:34:53 +01:00
a96134d794 Depsgraph: Fix assert/crash when transforming from redo system
Redo system will set depsgraph to NULL, so need to ensure it exists.

Reported by Julian in IRC, thanks!
2017-11-17 16:54:06 +01:00
40f528a7da Cycles: Add per-tile render time debug pass
Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D2920
2017-11-17 16:40:24 +01:00
a0c02e4d1b Cycles: Add Volume Direct and Volume Indirect passes for volume-scattered light
No color pass because it's hard to define what to use as color in a volume.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D2903
2017-11-17 16:39:45 +01:00
f78e963858 Cycles: Refactor PassType from bitflag to index in order to allow for more passes 2017-11-17 16:34:19 +01:00
44183a3535 Merge branch 'master' into blender2.8 2017-11-17 15:28:36 +01:00
9c0a38ee33 Depsgraph: Add missing checks from previous commit 2017-11-17 15:27:02 +01:00
2d89b43fd2 Merge branch 'master' into blender2.8 2017-11-17 15:00:55 +01:00
c45afcfa81 Depsgraph: Don't make non-dynamic hair dependent on time
This way hair system used for static forest does not make playblack slow.

A bit dangerous, but let's see how far we can go!
2017-11-17 14:57:57 +01:00
759b50b20b Fix UV Projection Center Calculation
UV project mixed up global/local space,
3D cursor offset didn't take object scale into account.

Minor improvements:

- Match Cube Project 'center' behavior w/ sphere & cylinder.
- Add active-element center.
- Wrap UV's in Cube Project based on center instead of first vertex.
2017-11-17 22:30:28 +11:00
ec2c0c5534 Cleanup: warnings 2017-11-17 19:02:45 +11:00
f60563dd91 Fix error when compiling with msvc
'function': incompatible types - from 'int *' to 'short *'
2017-11-17 00:30:07 -02:00
936ddde35c Eevee: SSS: Add cubic profile for the sake of completeness.
It wasnt really hard except from the wierd sharpness 0.5 multiplication.
2017-11-17 02:00:48 +01:00
fcbb8e71c5 Eevee: SSS: Add SSS to the principled shader. 2017-11-16 21:30:15 +01:00
57c3fbd324 Eevee: SSS: Add Christensen-Burley diffusion profile.
This seems to be a correct implementation of the same diffusion profile as Cycles uses by default.

There are a few bias though:
- We consider _A_ the albedo to be 1 when evaluating _s_.
- We use a factor of 0.6 when computing _d_ to match more or less cycles results.

Note that doing per pixel jittering does bias the result even further (loss of energy).
2017-11-16 21:30:15 +01:00
88c88c4610 Fix T51210: Draw Manager: Support for Metaball Drawing
Differential Revision: D2914
2017-11-16 15:12:32 -02:00
562da211c2 Merge branch 'master' into blender2.8 2017-11-16 12:50:53 +01:00
d697e3d46e BLI listbase: add bytes finding helpers.
Quite similar to string ones actually, except more generic. Used in
id_override_static branch currently.
2017-11-16 12:49:31 +01:00
470b4cb62f Cycles: Fix crash with split branched path tracing
ShaderData memory was getting clobbered in the branched path code paths.

Was caused by 087331c495
2017-11-16 04:59:31 -05:00
ae8130e287 Merge branch 'master' into blender2.8 2017-11-15 23:17:25 +11:00
9c7b89241d BLI_utildefines: sync w/ 2.8 2017-11-15 23:06:34 +11:00
474362b363 Cleanup: use 'uint' 2017-11-15 22:58:39 +11:00
Dalai Felinto
26a72f0852 Cycles: Fix after recent merge from master
random_id() crashes when there is no current dupli object.

We could also throw a Python error when doing it via RNA, but as far as
Cycles is concerned we need to check if instanced.
2017-11-15 09:53:16 -02:00
9cbf374814 GSet: utils to access data stored outside the set 2017-11-15 22:45:37 +11:00
2a7f8d3cb3 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenlib/BLI_math_matrix.h
	source/blender/blenlib/intern/math_matrix.c
	source/blender/blenlib/intern/rand.c
	source/blender/editors/animation/anim_channels_edit.c
	source/blender/makesrna/intern/rna_mask.c
2017-11-15 10:46:19 +01:00
Dalai Felinto
44517c5f21 Merge commit '212a8d9e5ae7' into blender2.8
Considerable non-trivial merge conflict fixes.
2017-11-15 07:40:27 -02:00
Dalai Felinto
258292abc0 Merge commit '212a8d9e5ae7^' into blender2.8 2017-11-15 07:07:27 -02:00
556b13f03e Fix T53309: Remove default 'Clear loc/rot/scale delta transform' shortcuts.
The loc one (shift-alt-G) was same as 'remove selected from active group'
action... Clear delta transform is not a common operation, so we can
live without a default shortcut for it.

Note that using same key (G) in same space for two completely different
kind of operations is probably a rather bad thing, nice topic for future
keymap work. ;)

Probably nice to have in 2.79a.
2017-11-14 22:51:44 +01:00
Dalai Felinto
7549b10212 Cleanup: order from a-z structs in BKE_collection.h and BKE_layer.h 2017-11-14 18:41:20 -02:00
3546636870 Eevee: SSS: Fix SSS with Add Shader node. 2017-11-14 21:34:20 +01:00
e70c563aa3 Eevee: Add SSS objects to probe rendering.
This does NOT do the SSS diffusion when rendering probe but at least you can see your object without SSS in reflections / bounce light.
2017-11-14 21:13:38 +01:00
bc648af4e1 Fix Opengl Error with glBlitFramebuffer
This was caused by 93936b8643

From GL spec :
GL_INVALID_OPERATION is generated if mask contains GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT and the source and destination depth and stencil formats do not match.

So blitting framebuffer with depth or stencil require the SAME FORMAT.
2017-11-14 20:49:33 +01:00
67ddc28055 Smoke: Pass non-trivial arguments by const reference 2017-11-14 17:11:48 +01:00
2868dcbe2b Fix compilation error with clang-5 2017-11-14 17:11:48 +01:00
6f15554af3 Alembic: Fix mismatch in forward declaration with definition 2017-11-14 17:11:48 +01:00
0a3fa9c25c Fix missing SpinLock typedef on macOS 2017-11-14 16:51:34 +02:00
f23a595228 Add stdlib include for utildefines
Ideally we could just declare abort, but this has attributes
based on the platform, so include stdlib instead.
2017-11-14 23:38:53 +11:00
55696b56d9 Fix T53068: AMD Threadripper not working well with Blender
The issue was caused by SpinLock implementation in old pthreads we ar eusing on
Windows. Using newer one (2.10-rc) demonstrates same exact behavior. But likely
using own atomics and memory barrier based implementation solves the issue.

A bit annoying that we need to change such a core part of Blender just to make
specific CPU happy, but it's better to have artists happy on all computers.

There is no expected downsides of this change, but it is so called "works for
me" category. Let's see how it all goes.
2017-11-14 12:21:15 +01:00
7adc698eed Cleanup: order BLI before BKE headers
This was done nearly everywhere already
2017-11-14 17:23:40 +11:00
b5eeec715e Cleanup: remove BLI_blenlib from ghash header
This causes source files to depend on ghash header
for BLI_string/rect/listbase.

Also quiet warnings.
2017-11-14 17:08:34 +11:00
40ad1cf0b1 BLI: sync changes from 2.8 2017-11-14 16:10:48 +11:00
212a8d9e5a Cycles: Make per-object random value output also work for Lamps 2017-11-14 04:17:54 +01:00
d8066fb0f1 Cycles: Refactor closure roughness detection to fix a potential bug with Denoising of specular shaders 2017-11-14 04:17:54 +01:00
289f9f42ff Eevee: SSS: Add Quality settings.
Samples : pretty self explanatory.
Jitter Threshold : Reduce cache misses and improve performance (greatly) by lowering this value. This settings let user decide how many samples should be jittered (rotated) to reduce banding artifacts.
2017-11-14 02:17:34 +01:00
f8b1430566 Eevee: Initial Separable Subsurface Scattering implementation.
How to use:
- Enable subsurface scattering in the render options.
- Add Subsurface BSDF to your shader.
- Check "Screen Space Subsurface Scattering" in the material panel options.

This initial implementation has a few limitations:
- only supports gaussian SSS.
- Does not support principled shader.
- The radius parameters is baked down to a number of samples and then put into an UBO. This means the radius input socket cannot be used. You need to tweak the default vector directly.
- The "texture blur" is considered as always set to 1
2017-11-14 00:49:54 +01:00
89e9f6ea79 DRW: Better stencil support.
A stencil mask is now assigned to each shading group and the stencil test is defined like the depth test via the DRW_STATE_* defines.
2017-11-13 23:33:06 +01:00
93936b8643 GPUTexture: Add for stencil to default depth buffers.
Theses will be used by eevee SSS.

TODO: only allocate stencil if needed.
2017-11-13 23:25:46 +01:00
ab013224ad GPUMaterial : Add sss_data to Closure struct. 2017-11-13 22:09:12 +01:00
Dalai Felinto
f4beb64020 Fix quick smoke getting view_render from the wrong place 2017-11-13 14:15:36 -02:00
Dalai Felinto
f402638211 Cleanup on depsgraph logic 2017-11-13 12:17:14 -02:00
Dalai Felinto
1cb6cea71c Merge remote-tracking branch 'origin/master' into blender2.8 2017-11-13 11:48:48 -02:00
8a03e4d409 Depsgraph: Fix relations for metaballs
Initially spotted and investigated by Dalai and Germano.
2017-11-13 14:43:08 +01:00
d1a761c4d4 Cycles: Fix compilation error of standalone application 2017-11-13 10:49:05 +01:00
42dff6cc2e Cycles: Fix compilation error with OIIO compiled against system PugiXML 2017-11-13 10:42:29 +01:00
e568c1a975 Fix T53289: CUDA missing textures not showing pink, after recent changes. 2017-11-12 20:45:47 +01:00
ebcb880375 Fix T53273: render bake settings properties not showing correct Python path. 2017-11-12 20:30:28 +01:00
5b3c15e336 Fix T53294: bpy.ops.image.open crash 2017-11-12 16:05:28 +11:00
aae8e21100 BMesh Py API: Expose color alpha 2017-11-12 15:48:24 +11:00
f30a2a7862 GPUFramebuffer: Add possibility to blit stencil buffer. 2017-11-11 16:23:55 +01:00
e389ae9dca Cycles: Set error if a split kernel fails to load
To help catch cases where adding a new kernel is missed for one of the
device implementations.
2017-11-11 01:01:14 -05:00
0260fad9ba Manipulator: ruler tool
Add the 3D view ruler as a tool,
the modal operator remains for now
however it may be removed if we use the tool-system for 2.8.

Note that this does copy code from the operator,
its different enough not to attempt to de-duplicate.
2017-11-11 03:27:21 +11:00
63830cd6a9 Manipulator: public highlight utility function
Also utility to find group from a manipulator map.
2017-11-11 03:19:51 +11:00
1bd8a82960 Fix assert failure when trying to draw empty string 2017-11-10 16:29:57 +01:00
8f5e7c3fa9 Merge branch 'master' into blender2.8 2017-11-10 13:02:49 -02:00
Dalai Felinto
58a3057099 Layers Unittest: Hidden flag to quckly update diffs
This is not the commit you are looking for ...

This is not to be used lightly. But sometimes we change the name of the collections,
the initial value they have, ... and this helps to quickly update the tests.
2017-11-10 13:01:05 -02:00
d95eabf0a9 mball_tessellate: Simplify face creation
Faces that have the last two indices equal are considered triangles, and not those that the last index is 0
Improvement of 7% in performance of the `polygonize` function
2017-11-10 12:58:34 -02:00
Dalai Felinto
1122a401b0 Unittest: Layers - include is_disabled for LayerCollection
And remove is_folder since it is not being used.
2017-11-10 12:39:43 -02:00
Dalai Felinto
34c99ee85b Fixup for doversion/layers: disable collections for scene layers 2017-11-10 11:27:30 -02:00
Dalai Felinto
2ec01cc7c5 Layers doversion: Handle hide and hide_render objects
We now created nested collections for the original Collection 1, 2 ...
collections for the "hide" and "hide_render" objects.

Also, remove logic for rename single-collection files, it's now kept as
it was originally (Collection 1, Collection 5, ...).

Thanks Sergey Sharybin and Pablo Vazquez for patch review and suggestions.
2017-11-10 10:37:23 -02:00
7922b62519 Workaround crash rendering font objects
Needs a proper scene layer and dependency graph, which we do not have
yet during render pipeline.
2017-11-10 11:09:10 +01:00
1737887938 Merge branch 'master' into blender2.8 2017-11-10 10:36:46 +01:00
7a6ad2901c Merge branch 'master' into blender2.8 2017-11-10 10:13:19 +01:00
db7a78a2be Cycles: Fix compilation error with latest OIIO
There was some changes about namespaces, which causes ambiguities.

Replaces using namespace with an explicit symbols we need. Is good idea to NOT
pull in the whole namespace anyway!
2017-11-10 10:04:33 +01:00
a466d7ae24 Cycles: better distance sampling for chromatic volume extinction.
Previously we picked one of the RGB channels with equal probability, but this
works poorly in a dense volume after many bounces. Now we take into account
the throughput and single scattering albedo.

This makes it a little more practical to do brute force SSS with volumes, but
is still very inefficient because we do direct light sampling at every volume
bounce even when inside an opaque mesh. In theory there could be a light inside
the mesh so we can't automatically disable direct lighting.
2017-11-10 01:37:10 +01:00
21a535840d Fix T53270: crash with multiscatter GGX after recent refactoring.
In fact this was an existing issue when exceeding the number of available
closure, but it's more common now that we set the number to 0 for shadows
and emission
2017-11-09 20:28:00 +01:00
1ffa01b6f8 Fix (harmless) valgrind warning. 2017-11-09 20:28:00 +01:00
bd4bea3e98 Cycles: avoid reallocating tile denoising memory many times during render. 2017-11-09 20:28:00 +01:00
Dalai Felinto
7defb27f08 Farewell BaseLegacy
Finally, bases are all using the latest, newest SceneLayer bases.
2017-11-09 15:45:19 -02:00
Dalai Felinto
06a7db85bc BGE cleanup: remove Base from KX_Light.h 2017-11-09 15:45:19 -02:00
3dde21f97e Depsgraph: Fix broken copy-on-write draw after ownership changes
Need to build layer collections callbacks using proper CoW pointer.
2017-11-09 16:42:54 +01:00
Dalai Felinto
cec7f1215a Rename Scene macros back to their original _NEW less names 2017-11-09 13:35:46 -02:00
Dalai Felinto
c35f1d05ea Farewell Scene->basact 2017-11-09 13:23:41 -02:00
09d26cab0b Cleanup: Use full name for scene_layer in alembic 2017-11-09 15:45:21 +01:00
a956e7399a Cleanup: Use full name for scene_layer in blenloader 2017-11-09 15:45:21 +01:00
a6951df836 Cleanup: Use full name for scene_layer in depsgraph 2017-11-09 15:45:21 +01:00
240b8b9679 Cleanup: Use full name for scene_layer in draw 2017-11-09 15:45:21 +01:00
acd811278e Cleanup: Use full name for scene_layer in gpu 2017-11-09 15:45:21 +01:00
2466afd089 Cleanup: Use full name for scene_layer in makesrna 2017-11-09 15:45:21 +01:00
859417c657 Cleanup: Use full name for scene_layer in nodes 2017-11-09 15:45:21 +01:00
f7398bc0f3 Cleanup: Use full name for scene_layer in python 2017-11-09 15:45:21 +01:00
e5081a0dae Cleanup: Use full name for scene_layer in render 2017-11-09 15:45:21 +01:00
bd6ab7dd6c Cleanup: Use full name for scene_layer in windowmanager 2017-11-09 15:45:21 +01:00
Julian Eisel
98fc7f6b53 Remove unused screen-name storage in window
Checked in really old revisions, seems like this was never used. So
doesn't matter for compatibility either (tested opening files saved with
this in 2.49).
2017-11-09 15:11:57 +01:00
Julian Eisel
fadbb2fde8 Fix crash using pre 2.5 file as startup.blend 2017-11-09 15:11:57 +01:00
Julian Eisel
5839c73a54 Cleanup: Refactor window matching after file read for readability
Code should hopefully be much clearer now.

Also removing code that's been commented out for a while, and was never
executed in master.
2017-11-09 15:11:57 +01:00
Stefan Werner
df886b178c Moved alignment attributes from my last commit to BLI_compiler_attrs.h for future use. 2017-11-09 14:59:31 +01:00
Dalai Felinto
f8a0754439 Object.layers no longer around, removing from ui 2017-11-09 11:53:18 -02:00
Stefan Werner
83d9f8e379 Compositor: Ensured 16 byte alignment for variables accessed by SSE instructions.
Before this patch, the XBlur/YBlur compositor nodes would crash for me when run in a MSVC 2015 debug build (test scene: BMW27_cpu). I added the compiler instructions to explicitly align the local variables that the SSE instructions are accessing.
2017-11-09 14:38:17 +01:00
92020077e6 Depsgraph: Pass CoW pointer to ID datablocks evaluation functions
The only remaining part is the particle stuff, which needs a pointer to exact
particle system which does not exist yet. Leaving it for later a bit for until
it's more clear what do we do with particles.

Unless i'm mistaken, we've got all proper CoW pointers bound now.
2017-11-09 13:56:43 +01:00
ec0e35f178 Depsgraph: Cleanup, make it more clear what layer is 2017-11-09 11:52:13 +01:00
e30972deae Depsgraph: Cleanup 2017-11-09 11:43:41 +01:00
0ad54b5ba3 Depsgraph: Only build collections for current graph scene layer 2017-11-09 11:43:41 +01:00
Dalai Felinto
08a023d7ca Cycles: Silence warning when building without OSL 2017-11-09 08:39:30 -02:00
Dalai Felinto
f30086b5b6 Merge branch 'master' into blender2.8 2017-11-09 08:32:20 -02:00
Dalai Felinto
ee49ee24c3 Fix: unselectable objects can be selected via the NLA editor
This is not reported anywhere, but it's easy to reproduce. I ran into this
while updating this code for the blender2.8 branch.
2017-11-09 08:27:38 -02:00
f2b4a59be6 Depsgraph: Cleanup, no explicit usage of std in code
Code is supposed to be pure-C-ish with some C++-ism. All specifics are to be
handled in header files.
2017-11-09 11:24:51 +01:00
d325e6f0e8 Depsgraph: Make dependency graph to be built from scene layer
This is a final step of having proper ownership. Now selecting different
layers in the "top bar" will actually do what this is expected to do.

Surely, there are still things to be done under the hood, that will happen
in a less intrusive way.
2017-11-09 11:20:17 +01:00
Dalai Felinto
92b342d30d Fix logic for pinning textures users from context
This was wrong since it's concenption in 28ee0f9218.
The if statement was returning true when pinid was NULL, and false otherwise.

However when scene is pinned we also want to run this code.
Code snippet by Brecht Van Lommel.
2017-11-09 08:19:52 -02:00
c99481b632 Merge branch 'master' into blender2.8 2017-11-09 10:59:15 +01:00
8d7ec519df Depsgraph: Add missing handlers of node IDs
Worst thing was that point density did not pull object into dependency graph,
which could lead to wrong render results.
2017-11-09 10:33:44 +01:00
5e38ee996c Depsgraph: Remove chains of scene being passed all over in relations builder 2017-11-09 10:33:44 +01:00
f424d5b5c9 Depsgraph: Cleanup, remove scene being passed all over
Use the state one instead.
2017-11-09 10:33:44 +01:00
ad986ae29e Depsgraph: Remove bmain from internal builder API
Use the one from state.
2017-11-09 10:33:44 +01:00
887c2e5c0d Depsgraph: Make bmain part of builder state and remove bmain from public API 2017-11-09 10:33:44 +01:00
70e34ac186 Depsgraph: Cleanup, use google style for private members 2017-11-09 10:33:44 +01:00
9f0842bbe8 Depsgraph: Synchronize nodes and relations builders 2017-11-09 10:33:44 +01:00
1018683def Depsgraph: Fix wrong ID type being compared 2017-11-09 10:33:44 +01:00
98425563ed Depsgraph: Cleanup, reduce indentation level 2017-11-09 10:33:43 +01:00
449687d50a Depsgraph: Assert when node uses unhandled ID type 2017-11-09 10:33:43 +01:00
087331c495 Cycles: Replace __MAX_CLOSURE__ build option with runtime integrator variable
Goal is to reduce OpenCL kernel recompilations.

Currently viewport renders are still set to use 64 closures as this seems to
be faster and we don't want to cause a performance regression there. Needs
to be investigated.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2775
2017-11-09 01:04:06 -05:00
Julian Eisel
ffe76ae9f4 Fix crash when loading pre 2.5 files.
Versioning code involving WM wouldn't run then (WM was just introduced
in 2.5).
2017-11-08 23:54:36 +01:00
Dalai Felinto
206c94fea9 Farewell Scene->base
While getting rid of Scene->base we got the following fixes:

* Fix "Convert To" operator
* Fix "NLA allowing to selected objects that are not selectable
* Fix scene.objects (readonly, no option to link/unlink)

Note: Collada needs to use the context SceneLayer for adding objects
however I added a placeholder, so Collada maintainers can fix this
properly.
2017-11-08 18:39:01 -02:00
Dalai Felinto
670e6cab43 Revert "Depsgraph: Fix crash with copy on write when scene has legacy bases"
This reverts commit 00ddbd5848.
2017-11-08 18:36:01 -02:00
Dalai Felinto
3ceb3512f8 Merge remote-tracking branch 'origin/master' into blender2.8 2017-11-08 18:35:31 -02:00
Dalai Felinto
6febe6e725 Silence warning from Collada 2017-11-08 18:33:17 -02:00
2a1e828711 Depsgraph: Use iterator over flat array for depsgraph_query
This way iteration order is much more predictable. This also solves issue with
randomly failing Cycles regression tests.
2017-11-08 15:07:31 +01:00
19c14f0c8a Subject: [PATCH 2/3] Depsgraph: Replace iteration over ghash with iteration over flat array 2017-11-08 15:02:19 +01:00
10f076da2d Depsgraph: Introduce flat list of ID nodes
The idea is to allow iterating over ID nodes in exact order of their
construction, and in order which will not change dependent on memory
pointers or anything.
2017-11-08 15:02:19 +01:00
5c66bbc56f Depsgraph: Remove traces of old single-per-scene dependency graph 2017-11-08 15:02:19 +01:00
20988ed5dc Depsgraph: Move storage from single per-scene depsgraph to a hash storage
Depsgraph itself is still created fer the whole scene rather than for a
single layer, this is to be addressed next.

The storage for those dependency graphs is in scene, but now it is a hash
indexed by layer. In the future we can extend hash key to include extra
information (workspace? window?).
2017-11-08 15:02:19 +01:00
Dalai Felinto
3750dfaa0a Partial Fix T53269: Dupli-verts/dupli-faces not working
This fixes the issue for the Draw Manager, but for Cycles this is still not
working. The iterator bpy.context.depsgraph.duplis seems to be correct though.
2017-11-08 10:49:39 -02:00
5fc1faa737 I18n: add Hausa languages, since we now have a few messages translated. ;) 2017-11-08 10:11:37 +01:00
da4bfb8770 Merge branch 'master' into blender2.8 2017-11-08 01:11:43 +01:00
3f614cda12 Fix blender player build. 2017-11-08 01:11:17 +01:00
7b1d707481 Merge branch 'master' into blender2.8 2017-11-08 00:20:59 +01:00
a0478ebe37 Fix incorrect bevel shader in GLSL (should work as if there is no bevel node). 2017-11-08 00:19:24 +01:00
05b08a3b6d Fix T53092: errors reading EXR files with different data/display window.
Multilayer/multiview OpenEXRs did not read the full data window like single
layer, now it should be consistent.
2017-11-07 23:20:22 +01:00
2a097527f2 Fix various issues with (multiview) OpenEXR file save/load.
* Fix saving a multiview render from the image editor giving invalid files.
* Fix failure to load multiview images with a single view per part.
* Fix loss of multiview metadata when saving/loading a single view.
* Fix Z-Buffer writing option for single layer EXR not being respected.

Multiview EXRs are now always handled as multilayer internally, significantly
reducing the amount of code.

Reviewed By: dfelinto

Differential Revision: https://developer.blender.org/D2887
2017-11-07 23:20:22 +01:00
ed7260071b Fix EXR multilayer compositing result saving issues.
* It was saved as Combined.Combined instead of Composite.Combined.
* It was written even if no compositing was enabled.
2017-11-07 22:35:12 +01:00
e0936e74ab Fix image editor showing pass name when there is only a combined pass. 2017-11-07 22:35:12 +01:00
3dec1de275 Fix incorrect color management when saving JPG previews for EXR. 2017-11-07 22:35:12 +01:00
26f39e6359 Cycles: add bevel shader, for raytrace based rounded edges.
The algorithm averages normals from nearby surfaces. It uses the same
sampling strategy as BSSRDFs, casting rays along the normal and two
orthogonal axes, and combining the samples with MIS.

The main concern here is that we are introducing raytracing inside
shader evaluation, which could be quite bad for GPU performance and
stack memory usage. In practice it doesn't seem so bad though.

Note that using this feature can easily slow down renders 20%, and
that if you care about performance then it's better to use a bevel
modifier. Mainly this is useful for baking, and for cases where the
mesh topology makes it difficult for the bevel modifier to work well.

Differential Revision: https://developer.blender.org/D2803
2017-11-07 22:35:12 +01:00
f79f386731 Code refactor: rename subsurface to local traversal, for reuse. 2017-11-07 22:35:12 +01:00
d0af56fe3b Cycles: antialias normal baking if the mesh has a bump map. 2017-11-07 22:35:12 +01:00
ff34e48911 Cycles: add an extra CUDA synchronize before rendering.
It should not be needed as far as I know, but just in case it fixes any
of the recent issues like T52572.
2017-11-07 22:35:12 +01:00
e74b229342 Fix incorrect MIS weights in Cycles with multiple lights.
This causes some difference in the classroom scene, where ray visibility
tricks are used and break the MIS balance. Otherwise there doesn't seem
to be much effect, but better to use the right formulas. Problem originally
identified by Lukas.
2017-11-07 22:35:12 +01:00
Dalai Felinto
1b18e15802 Sanitize use of BLI_iterator
We now initialize iter.valid as true as part of the main iterator (and manually
when using via Python). And we don't even bother setting iter->current to NULL
if it's invalid. Let's stick to using iter->valid only.
2017-11-07 14:08:34 -02:00
fc789803ca Depsgraph: Remove old unused function which is no longer to be used 2017-11-07 16:54:56 +01:00
16fcf9dfbf Depsgraph: Get away from legacy API used in event loop
A bit tricky for now, needs some clear design about when to do
on_visible_changed().
2017-11-07 16:51:47 +01:00
52e529b82d Depsgraph: initialize scene to NULL 2017-11-07 16:42:40 +01:00
ba1197fe5e Depsgraph: Simplify some workarounds and make API closer to final 2017-11-07 16:36:25 +01:00
5f2be40658 Windows: Add additional crash diagnostic information.
To help diagnose issues like T53259, it is useful to know the module causing the issue (is it us, or some opengl icd, or python module?) and while we cannot do stackdumps on release builds on windows, it is possible to display the faulting module. This commit changes the exception handler to output the following information:

Error   : EXCEPTION_ACCESS_VIOLATION (Type of exception , this we had before)
Address : 0x0000000140193726 (Address of the exception, new)
Module  : k:\BlenderGit\build_windows_Full_noge_x64_vc15_Release\bin\Release\blender.exe (module of the exception, new)
2017-11-07 07:57:59 -07:00
Dalai Felinto
f16199d479 Fix jumps-dependent-on-uninitialized-variable for iterators
We cannot have iter->valid unitialized, but we need to be sure it is set to true on begin.
Bug found by Sergey Sharybin.
2017-11-07 12:50:42 -02:00
98ed20aafd Fix bplayer (c). 2017-11-07 15:35:36 +01:00
3cfbdc2bb4 Merge branch 'master' into blender2.8 2017-11-07 13:57:16 +01:00
1a1fb5a47c Cycles: Cleanup, style 2017-11-07 13:55:58 +01:00
Dalai Felinto
c83b171794 Depsgraph Iterator: Refactor skip logic
This was leading to crashes on Cycles as well as misleading
len(bpy.context.depsgraph.objects)

I can even move the iter->skip as part of DEGObjectsIteratorData instead of
BLI_Iterator, but if I do it will be a separate commit.

Thanks Sergey Sharibyn for the well done sample file and patch suggestion.
2017-11-07 10:05:42 -02:00
c0d01adc44 Depsgraph: Remove forced dependencies update/evaluation from file open
This was originally done as a fix for T37713, but now this workaround becomes
tricky since we don't know which layers to update scene for. Even more, render
engine is supposed to have own dependency graphs amd those ones do not exist
yet at the file open time.

Keep an eye on T37713, since that's where the original workaround is coming
from.
2017-11-07 11:37:45 +01:00
383a763203 Depsgraph: Fix/workaround command line rendering of sequencer
Really hacky, but allows to run regression tests and see if the new design
is working as expected.
2017-11-07 11:37:45 +01:00
60bf1c05e5 Depsgraph: Fix/workaround crash when rendering from command line
Need to ensure Render has proper dependency graph.

While this is a subject of re-design (render pipeline should manage all
dependency graphs it needs, and not demand external users to provide
depsgraph), this is good to have something working, so we can run regression
tests and such.
2017-11-07 11:37:45 +01:00
2440415bd3 Merge branch 'master' into blender2.8 2017-11-07 03:08:24 +01:00
0e3fd70d7a Fix T53129: Cycles missing update when changing image auto refresh.
Previously auto refresh worked, but only if it was already enabled before
starting the viewport render.
2017-11-07 03:05:42 +01:00
Dalai Felinto
83de7c4094 Fix break on duplicated instances since IDNodes depsgraph iterator 2017-11-06 21:18:58 -02:00
956ee5e265 macOS: remove old OpenMP lib stuff from cmake 2017-11-06 23:54:35 +02:00
Dalai Felinto
535adcdaa3 Depsgraph: Iterates over ID Nodes instead of Bases
Although this works by itself, it should actually happen after:

"Reshuffle collections base flags evaluation, make it so object is gathering
its base flags from collections."

Meanwhile we have one single hacky function (deg_flush_base_flags_and_settings)
to be removed once the task above is tackled.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2899
2017-11-06 17:51:16 -02:00
facdc15fdd DRW: Fix compilation error. 2017-11-06 18:41:00 +01:00
91af8f2ae2 Merge branch 'master' into blender2.8
Conflicts:
	intern/cycles/device/device.cpp
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/material.c
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_relations.c
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/util/ed_util.c
	source/blender/windowmanager/intern/wm_files_link.c
2017-11-06 18:02:46 +01:00
9d77b5d591 Eevee: Remove uses of DRW_shgroup_call_dynamic_add_empty in shadows and probe rendering.
This was adding an unecessary high number of DRWCall per objects.
2017-11-06 17:43:14 +01:00
ed555750eb DRW: Use pseudo persistent memory pool for the rendering data structure.
This gets rid of the bottleneck of allocation / free of thousands of elements every frame.

Cache time (Eevee) (test scene is default file with cube duplicated 3241 times)
pre-patch: 23ms
post-patch: 14ms
2017-11-06 17:43:14 +01:00
66a6d160fe Rename ID_IS_LINKED_DATABLOCK to ID_IS_LINKED.
This makes code closer to id_override/assent-engine ones, which
introduce a new type of linked data, and hence reserve
ID_IS_LINKED_DATABLOCK to real linked datablocks.
2017-11-06 17:17:10 +01:00
5d70e847dd Fix T51604: Support Auto-Smooth in Edit-Mesh
and allocate loop_normals in MeshRenderData instead of CustomData

Differential Revision: D2907
2017-11-06 14:14:07 -02:00
b28da9dbf8 Fix T53250: Crash when linking/appending a scene to a blend when another linked scene in this blend is currently open/active.
Inner DAG code would not check against NULL pointer, and in case of an
active linked scene, scene pointer will be NULL here, so we have to
check it ourself. ;)
2017-11-06 15:16:40 +01:00
7082bd1f4c Depsgraph: Cleanup, remove obsolete unused function 2017-11-06 09:24:24 +01:00
f5964e6429 epsgraph: Use explicit graph API for sequencer 2017-11-06 09:24:24 +01:00
ad557da78a Depsgraph: Use explicit graph API for point cache 2017-11-06 09:24:24 +01:00
90738e1441 Depsgraph: Use explicit graph API for audio bake 2017-11-06 09:24:24 +01:00
d0e9352d32 Depsgraph: Use explicit graph API for OpenGL render 2017-11-06 09:24:24 +01:00
bb3024ef12 Depsgraph: Use new API for alembic C-API 2017-11-06 09:24:24 +01:00
45773c1a0a Update comment, reference new API function 2017-11-06 09:24:24 +01:00
031f4ce8a6 Depsgraph: Use new scene update API in preview render 2017-11-06 09:24:23 +01:00
5af1c89269 Depsgraph: Make graph to be per-scene-layer for RNA
New access is C.scene.render_layers.active.depsgraph. This will give depsgraph
for a given layer. In the future there will need to be some extra context to be
passed.
2017-11-06 09:24:23 +01:00
dd79cd189b Depsgraph: Cleanup, remove depgraph_legacy from evaluation routines 2017-11-06 09:24:23 +01:00
1b40243316 Depsgraph: Cleanup, remove depsgraph_legacy from building routines 2017-11-06 09:24:23 +01:00
3330e518dc Depsgraph: Cleanup, remove unused function 2017-11-06 09:24:23 +01:00
17395b6b08 Depsgraph: Cleanup, remove depsgraph_legacy from depsgraph_tag.cc 2017-11-06 09:24:23 +01:00
f867a560d9 Depsgraph: Avoid non-requested allocation of depsgraph 2017-11-06 09:24:23 +01:00
8a72be7697 Cycles: reduce closure memory usage for emission/shadow shader data.
With a Titan Xp, reduces path trace local memory from 1092MB to 840MB.
Benchmark performance was within 1% with both RX 480 and Titan Xp.

Original patch was implemented by Sergey.

Differential Revision: https://developer.blender.org/D2249
2017-11-05 20:48:33 +01:00
c571be4e05 Code refactor: sum transparent and absorption weights outside closures. 2017-11-05 18:13:44 +01:00
2c02a04c46 Code refactor: remove emission and background closures, sum directly. 2017-11-05 18:13:44 +01:00
cac3d4d166 Cycles: fix inefficient attribute map storage, saves 615MB in victor scene. 2017-11-05 18:00:48 +01:00
5801ef71e4 Code refactor: device memory cleanups, preparing for mapped host memory. 2017-11-05 15:22:04 +01:00
5475314f49 Cycles: reserve CUDA local memory ahead of time.
This way we can log the amount of memory used, and it will be important
for host mapped memory support.
2017-11-05 15:22:04 +01:00
58dc114615 Merge branch 'master' into blender2.8 2017-11-06 00:12:28 +11:00
18d7fbe4f5 Cleanup: order buffer length after the buffer 2017-11-06 00:04:46 +11:00
2837a7e198 Cleanup: remove paranoid NULL check 2017-11-05 23:34:40 +11:00
914e3b1645 Cleanup: indentation, line wrapping 2017-11-05 14:50:15 +11:00
43f3cfd584 Cleanup: spelling 2017-11-05 14:33:18 +11:00
d2ea1b2dcd Fix broken macOS build with libsndfile, name is different than in master. 2017-11-04 17:50:09 +01:00
642c1cabe5 Tool System: Don't add duplicate keymap items 2017-11-05 01:38:51 +11:00
fbfda21fe4 UI: show tool-tips for each tools shortcuts 2017-11-05 01:29:52 +11:00
d4fe083b35 Merge branch 'master' into blender2.8 2017-11-04 21:45:52 +11:00
01a3c95609 UI: tool-tip refactor, don't hard code field types
Allow other kinds of tips be created w/o exceeding hard limits.
2017-11-04 21:15:18 +11:00
25f56d7a7b UI: correct flag re-use
Adding ability to show a button as pressed w/o UI_SELECT set caused
other flags to be cleared that shouldn't have been.
2017-11-04 14:13:04 +11:00
33b5e8daff Code refactor: replace CUDA array with linear memory for 1D and 2D textures.
This is a prequisite for getting host memory allocation to work. There appears
to be no support for 3D textures using host memory. The original version of
this code was written by Stefan Werner for D2056.
2017-11-04 02:23:00 +01:00
6ec599c682 Fix T53247: mixed CPU + GPU render wrong texture limits. 2017-11-03 20:32:29 +01:00
10024603ee Scene API: Switch to explicit scene graph update API
This is part of lets-get-rid-of-scene->legacy_depsgraph work
2017-11-03 16:35:12 +01:00
c4501ccb17 Merge branch 'master' into blender2.8 2017-11-03 16:31:53 +01:00
6664ee209e Scene RNA API: More global mains goes away 2017-11-03 16:28:37 +01:00
0c4f69a2bf Merge branch 'master' into blender2.8 2017-11-03 16:17:01 +01:00
f1c78ecc63 Scene RNA API: Main from globals goes away
Bye bye..
2017-11-03 16:15:49 +01:00
f24103d50a Depsgraph: Use explicit depsgraph in object add 2017-11-03 15:46:12 +01:00
0ba0993f18 Depsgraph: Port more areas to direct depsgraph API
This is a lots of changes, but they are boiling down to a simple API
changes where we are no longer relying on implicit usage of scene's
depsgraph and pass depsgraph explicitly.

There should be no user measurable difference, render_layer* tests
are also passing.
2017-11-03 14:36:49 +01:00
95ccaed9e6 Depsgraph: Use explicit graph API in transform code 2017-11-03 14:05:49 +01:00
57ec215677 Depsgraph: Add utility function to tag ID for update within a specific graph 2017-11-03 12:10:04 +01:00
e72dfee66f Depsgraph: Use explicit depsgraph in alembic module 2017-11-03 12:02:39 +01:00
3a7a7ed03b Merge branch 'master' into blender2.8 2017-11-03 21:22:27 +11:00
cd4f925f56 Merge branch 'master' into blender2.8 2017-11-03 20:59:15 +11:00
2a87bd8995 Cleanup: split interface_regions.c
Each region type is quite separate and file was getting too big.
2017-11-03 20:57:09 +11:00
d19d094ca9 Fix incorrect allocation size 2017-11-03 20:52:04 +11:00
4c53f2000f Cleanup: move tool-bar checks into functions
Also support separator in tool-bar sub-menus
2017-11-03 16:30:51 +11:00
fbb9b70484 Fix Blenderplayer (tm) 2017-11-03 00:39:50 +01:00
1555cf758f Freestyle: Fix access freed memory when freeing fresstyle bmain
Some of the uninitializaiton code was leaving bases pointing freed memory.
2017-11-02 17:58:59 +01:00
e0a6582b40 Fix iterator usage from C++ code
Old code was not supported by GCC, see some details and progress

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606
2017-11-02 17:58:59 +01:00
d967a83f49 Freestyle: Keep lines on manageable complexity
Two level;s of casts in a single line, c'mon.
2017-11-02 17:58:59 +01:00
50c129760d Fix Cycles showing empty tiles while they are being denoised. 2017-11-02 15:23:55 +01:00
c1da6c9d7d Merge branch 'master' into blender2.8 2017-11-03 01:16:10 +11:00
25f2abf314 Cleanup: minor comment correction 2017-11-03 01:10:03 +11:00
9ece0ee5fe UI: add UI_SELECT_DRAW flag
Allow to draw as pressed w/o interfering with behavior.

Resolves issue where buttons raised on mouse-over.
2017-11-03 00:47:51 +11:00
f7d59fbc46 Merge branch 'master' into blender2.8
# Conflicts:
#	tests/gtests/alembic/abc_export_test.cc
2017-11-02 14:37:10 +01:00
8a3728800c Alembic: not using global in unit test.
Thanks @sergey for pointing out this fix.
2017-11-02 14:33:21 +01:00
7eb4ef6cac Merge branch 'master' into blender2.8 2017-11-03 00:31:47 +11:00
ff97dcebf3 Fix T53182: cancelling save buffers + denoising render clears image. 2017-11-02 14:31:05 +01:00
6355d98267 UI: free up bit in uiBut.flag 2017-11-03 00:27:29 +11:00
90788adb66 UI: workaround glitch refreshing the toolbar 2017-11-02 23:52:03 +11:00
75490adaff UI: draw operator menus below buttons
Following the down arrow on the buttons
2017-11-02 23:43:51 +11:00
920d09696e UI: store tool index of non-active tools 2017-11-02 23:30:01 +11:00
5cb8730689 Cycles: Add another limit to OpenCL memory usage
Some drivers may report very large allocation sizes, which could cause
unnecessary memory usage. This is now limited to 2gb which should
still be enough to get the needed performance benefits without waste.
2017-11-02 08:14:21 -04:00
1ca3e1a91d UI: support nested tools in toolbar 2017-11-02 23:05:13 +11:00
be5123a0a9 Space clip: Make it more clear that filter track does not use any settings from tool shelf 2017-11-02 12:33:39 +01:00
08141260ff Merge branch 'master' into blender2.8 2017-11-02 18:25:47 +11:00
e32c1bd5d0 UI: use button_operator in operator_menu_hold
Move draw calls into UI_menutype_draw
2017-11-02 18:21:59 +11:00
d2e39edae8 UI: draw active tool pushed in 2017-11-02 15:52:16 +11:00
4a85089abe Merge branch 'master' into blender2.8 2017-11-02 15:45:19 +11:00
765e28948e Cleanup: code style 2017-11-02 15:09:11 +11:00
8bdc391c54 Implement a new automatic handle algorithm to produce smooth F-Curves.
The legacy algorithm only considers two adjacent points when computing
the bezier handles, which cannot produce satisfactory results. Animators
are often forced to manually adjust all curves.

The new approach instead solves a system of equations to trace a cubic spline
with continuous second derivative through the whole segment of auto points,
delimited at ends by keyframes with handles set by other requirements.

This algorithm also adjusts Vector handles that face ordinary bezier keyframes
to achieve zero acceleration at the Vector keyframe, instead of simply pointing
it at the adjacent point.

Original idea and implementation by Benoit Bolsee <benoit.bolsee@online.be>;
code mostly rewritten to improve code clarity and extensibility.

Reviewers: aligorith

Differential Revision: https://developer.blender.org/D2884
2017-11-01 21:57:39 +03:00
88356a2442 Cleanup: use term shape-preset in widget code 2017-11-02 05:48:59 +11:00
a6e1f7560f UI: Option to draw button pressed
Needed to show the active tool
2017-11-02 05:02:56 +11:00
3ec4d0b51b UI: Add UILayout.operator_menu_hold
This is an operator button that opens a menu when the button is held.
2017-11-02 05:01:10 +11:00
cf6e45b522 Eevee: Fix Black volumetrics.
Was caused by a division by 0.
2017-11-01 18:48:55 +01:00
07dbff7dc1 Fix T53217: GLSL principled BSDF black with zero clearcoat roughness. 2017-11-01 17:14:06 +01:00
cd7e43f29f Eevee: Fix crash when using only 1 viewport sample + volumetrics 2017-11-01 16:50:06 +01:00
a62e79022a Eevee: Fix refraction & alpha blend object disapearing 2017-11-01 16:36:05 +01:00
b7d1621477 Eevee: Remove unecessary planar_minmaxz 2017-11-01 16:19:07 +01:00
40adf486d7 Eevee: Do not allocate minz buffer.
It's not needed for now.
2017-11-01 16:17:33 +01:00
71f46bc367 Cycles: Add utility function to distinguish between scatter and absorption volume ID 2017-11-01 11:10:51 +01:00
5d7138c08a Cycles: Cleanup, make it more obvious what preprocessor belongs to 2017-11-01 11:10:10 +01:00
7f45acee80 Cycles: Cleanup, delete trailing whitespace 2017-11-01 11:06:55 +01:00
a819ef65c0 Fix for T48988 - Enabling bbone easing for posemode
This fix enables the usage of bbones easing parameters for edit and pose mode seperately. This allows animators to take advantage of the functionality and may eliminate confusion as the parameters now behave similar to other bbone parameters.

Note that splitting the parameters between the modes effectively creates a new parameter set. Blend files of previous versions do not contain this information and will have the values set to 0 on load. As it broke backwards compatibility for pose mode values anyway, I also took the liberty to rename the easing parameters in some places for consistency (which breaks edit mode values).

Reviewers: aligorith

Subscribers: aligorith

Tags: #animation

Differential Revision: https://developer.blender.org/D2796
2017-11-01 14:42:08 +13:00
2ae6a93f05 Cleanup: style 2017-11-01 11:56:56 +11:00
2fbbc8c643 Eevee: SSR: Use max lod on planar reflections. 2017-11-01 01:17:35 +01:00
a5e8618f48 Eevee: Fix Bad AO on opaque refractive geometry. 2017-11-01 01:17:35 +01:00
345ffe3e4d Eevee: Effects: Split each effect in it's own file.
This also:
- make sure to only compile the shader needed by the active effects.
- same thing for the shading groups.
- disable TAA if motion blur is active (avoid infinite refresh).
2017-11-01 01:17:35 +01:00
d836adb275 Draw Manager: Fix crash when trying to order an empty shading group.
This fix crash when using only the volume output with an alpha blend material
2017-11-01 01:17:35 +01:00
0518577f5d Eevee: Fix Exponent default in versioning code 2017-11-01 01:17:35 +01:00
98cbd4c925 Eevee: Silence warning 2017-11-01 01:17:35 +01:00
59f238ba09 Mesh Auto-Smooth Split Normal Support
From D2906 with few changes
2017-10-31 15:15:14 -02:00
c8de666cbe Merge branch 'master' into blender2.8 2017-10-31 17:38:53 +01:00
4e33d07565 Fix bplayer (c)
Like seriously guys... twice within a few hours, compile full blender please
when you change APIs!
2017-10-31 17:15:16 +01:00
Dalai Felinto
3a72f02d80 Layers: unittest update after workspace > engine changes
All tests working again now.
Remember to update the svn lib/tests/layers folder.
2017-10-31 12:45:41 -02:00
941484ff81 Merge branch 'master' into blender2.8 2017-11-01 01:27:03 +11:00
Dalai Felinto
0dd98af255 Prevent users to be able to override context engine
We expose engine as a string, yet context is dealing with Pointers. To prevent a crash
we may as well just forbid users to override it.
2017-10-31 12:09:06 -02:00
5296c2e099 Experiment with adding output file meta data from render engine
The idea is to make it possible to report extra meta data from
render engine to the file writing. This way we can provide
additional information such as number of samples rendered by
resumable Cycles rendering so we can easily combine files back.

Currently only report number of samples from Cycles when rendering
a single render-layer scene. This is something what was required
here at the studio. We can easily extend that further.

Ideally we would also need to support non-string metadata, but
that's for later.

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Subscribers: sybren, candreacchio

Differential Revision: https://developer.blender.org/D2502
2017-10-31 15:05:53 +01:00
022fd32126 Add ability for render engines to report extra meta data to pipeline 2017-10-31 15:05:53 +01:00
040ea95517 Add ability to specify custom fields to be saved from render result 2017-10-31 15:05:53 +01:00
a6d2fd0215 Stamp info: Use dedicated function to free up memory
This way it's more flexible to extend StampData structure
with additional stuff which might require memory free.
2017-10-31 15:05:53 +01:00
Dalai Felinto
bbb4fa7e47 Workspace cleanup: engine_id is in ViewRender 2017-10-31 12:02:38 -02:00
7fb393f9ba Fix bplayer (c) 2017-10-31 14:52:52 +01:00
Dalai Felinto
7553523af7 Collections: Bring back simple visibility behaviour
If an object is in any visible collection, the object will be visible.
This behaviour has changed in 9ad2c0b615.

If it will change again, it will be for:
https://developer.blender.org/D2878
2017-10-31 11:39:17 -02:00
f1c7243376 Tracking: Create mesh from selected tracks only
Patch by Sebastian Koenig. thanks!
2017-10-31 14:02:32 +01:00
46963f359d Cycles: Bump version number to 1.9.0
This matches Blender Release 2.79.
2017-10-31 13:34:34 +01:00
39671ac504 Fix crash of standalone app after recent refactor 2017-10-31 13:34:23 +01:00
076abf6cd8 MacOS: Use correct Cocoa protocol on any compiler 2017-10-31 11:30:55 +02:00
98052162e1 UI: replace UI_ITEM_O_RETURN_PROPS /w return arg
Means we can have a version of this function that returns the button
and avoids returning a struct that often isn't used.
2017-10-31 17:04:55 +11:00
fe3571b362 UI: avoid double operator type lookup 2017-10-31 12:44:41 +11:00
Dalai Felinto
16f06e9dc9 Introduce "skip" in BLI_Iterator struct
This helps iterators prevent recursion.
2017-10-30 19:34:46 -02:00
Dalai Felinto
7aabe3f66c Fix renderlayers UI removing the wrong renderlayer
Bug introduced on 1c4c288727 (well technically in b48694639a).
We should not remove the renderlayer from the context, but instead the one that
is active from scene.

That said, the UI should make a distinction between the scene active render layer
and the one that is active in the UI (and that should be the one used when
removing it).

But for now this is at least more consistent for the users.
2017-10-30 19:12:27 -02:00
ca006deafe Fix T53191: Python API Reference link wrong in splash screen.
Forgot to update splashscreen links when we switched API doc naming
scheme...
2017-10-30 13:00:32 +01:00
80465ba35a Curve Decimate: new tool to simplify bezier curves
Access from the curve clean-up menu
2017-10-30 22:36:51 +11:00
b7e45b515c Merge branch 'master' into blender2.8 2017-10-30 18:48:39 +11:00
619600a53f CMake: cleanup 2017-10-30 18:48:27 +11:00
8277bee748 Draw Manager: re-enable edit-mesh text overlay 2017-10-30 17:50:47 +11:00
689ad9ade4 Fix manipulator drawing before their refresh callback
Caused glitch with Scale-Cage tool.
2017-10-30 14:26:57 +11:00
ca495381c5 Missing NULL pointer check in poly-build tool 2017-10-30 14:26:57 +11:00
e8daf2e3ea CMake: cleanup 2017-10-30 12:59:36 +11:00
bed3cbdf3d Merge branch 'master' into blender2.8
# Conflicts:
#	build_files/cmake/macros.cmake
#	build_files/cmake/platform/platform_win32.cmake
2017-10-29 18:20:24 -02:00
475ec5269a CMake: use only absolute linker paths for msvc.
cmake's link_directories will supply forward slashes for the search paths, the msvc linker has some issues with that, while it will search for the needed libs just fine, the incremental linker gets fed forward slashes for some libs, while the previous binary has backward slashes in it's metadata, the linker assumes obj files got added and performs a full link instead of an incremental link. This change brings down the link time with newer msvc versions for a trivial edit down from a few minutes to a few seconds.
2017-10-29 13:16:22 -06:00
34859b285a Merge branch 'master' into blender2.8 2017-10-29 17:31:55 +01:00
6099b2620d Alembic: added frame offset property
The offset is subtracted, so that it's intuitive (dragging slider pushes
the animation further that way on the timeline).
2017-10-29 17:23:50 +01:00
bbc7eb8ae5 Cycles: restore SOBOL_SKIP hack, for some cases where it helps still. 2017-10-29 16:44:20 +01:00
405980b1fa Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/alembic/intern/abc_exporter.cc
#	source/blender/alembic/intern/abc_exporter.h
#	source/blender/alembic/intern/alembic_capi.cc
#	tests/gtests/alembic/abc_export_test.cc
2017-10-29 15:38:55 +01:00
89eb05a890 Alembic: exporting MetaBalls as mesh
- Only basis balls are exported, as they represent the resulting mesh.
  As a result the mesh is written to Alembic using the name of the basis
  ball.
- MetaBalls are converted to a mesh on every frame, then an
  AbcMeshWriter is used to write that mesh to Alembic.
2017-10-29 15:21:36 +01:00
7530c54c3c Merge branch 'master' into blender2.8 2017-10-29 15:14:04 +01:00
d9000495e1 Include file for DNA_DEPRECATED macro 2017-10-29 14:36:10 +01:00
0012d54a70 Alembic import: fixed mesh corruption when changing topology
When the mesh changed topology but kept the vertex count the same, it would
result in a corrupt mesh. By checking the face & loop counts too, this has
become less likely.

I've checked IPolyMeshSchema::isConstant(), but it returns true even when
we see that the mesh changed topology.
2017-10-29 14:36:10 +01:00
ab2d1f61a8 BMesh: use heap update for dissolve-decimate 2017-10-30 00:39:00 +11:00
512b879241 BLI_heap: add validation check, improve tests
Also minor readability changes, avoid running both heap_up/down
gives minor speedup too.
2017-10-29 18:23:33 +11:00
560fa6db17 Curve Fitting: heap reinsertion optimization 2017-10-29 16:33:44 +11:00
bd0d41059f Cleanup: move docs out of header 2017-10-29 16:08:10 +11:00
4518c0f3e8 Cleanup: const args 2017-10-29 15:47:10 +11:00
3425732926 BLI_heap: minor changes to the API
Recent addition of 'reinsert' didn't match logic for ghash API.

Rename to BLI_heap_node_value_update,
also add BLI_heap_insert_or_update since it's a common operation.
2017-10-29 15:47:06 +11:00
336885beba Use BLI_heap_reinsert for decimate and beautify
Improves performance for high poly meshes,
~70% faster for decimate, only ~10% for beautify.
2017-10-29 05:28:00 +11:00
4af1af70ad BLI_hash: add BLI_heap_reinsert
Allows avoiding remove/insert calls.
2017-10-29 04:42:58 +11:00
b84e3dc7f3 GTest: initial BLI_heap test 2017-10-29 00:56:56 +11:00
1e07f366e6 Fix T53185: After rendering an animation (Ctrl-F12), pressing F12 no longer renders single frames only 2017-10-29 02:09:57 +13:00
fdae9e1e03 BLI_array_store: correct hashing single bytes
The single byte version of hash_data was casting from unsigned char
instead of signed.

This didn't cause any errors since the result of each aren't compared.
Even so, better keep them matching.
2017-10-28 18:28:55 +11:00
8ac69ff9dc Cleanup: use uint type in BLI 2017-10-28 17:48:45 +11:00
1186dec916 Eevee: Volumetric: Fix Sun lamps not working. 2017-10-27 23:28:17 +02:00
6e0ec8868d Eevee: Unlock volumetric shader nodes. 2017-10-27 22:49:15 +02:00
acdf76668a Eevee: Make Smoke sim panel visible with EEVEE 2017-10-27 22:49:15 +02:00
b4a96d366c Eevee: Volumetrics: Fix "Tile Size" tooltip 2017-10-27 22:49:15 +02:00
bc7c0335dc Eevee: Volumetrics: Support Smoke simulation textures.
It should behave like cycles.

Even if not efficient at all, we still do the same create - draw - free process that was done in the old viewport to save vram (maybe not really the case now) and not care about simulation's GPU texture state sync.
2017-10-27 22:49:15 +02:00
4f7665c844 Eevee: Volumetrics: Add Volume object support.
This is quite basic as it only support boundbing boxes.
But the material can refine the volume shape in anyway the user like.

To overcome this limitation, a voxelisation should be done on the mesh (generating a SDF maybe?) and tested against every volumetric cell.
2017-10-27 22:49:15 +02:00
18ba7e26ad GPUMaterial: Add a domain property.
This let us know efficiently if a material has a dedicated nodetree for each of it's output node input.

Only works for Eevee at this moment.
2017-10-27 22:49:15 +02:00
23f51a4e43 Eevee: Volumetrics: Request aditional frames when no TAA is enabled. 2017-10-27 22:49:15 +02:00
310f1db7bf Eevee: Volumetrics: Add volumetric support to alpha blended meshes. 2017-10-27 22:49:15 +02:00
66d8f82b83 Eevee: Overhaul the volumetric system.
The system now uses several 3D textures in order to decouple every steps of the volumetric rendering.

See https://www.ea.com/frostbite/news/physically-based-unified-volumetric-rendering-in-frostbite for more details.

On the technical side, instead of using a compute shader to populate the 3D textures we use layered rendering with a geometry shader to render 1 fullscreen triangle per 3D texture slice.
2017-10-27 22:49:15 +02:00
1c0c63ce5b DRW: Add 3D texture support. 2017-10-27 22:49:15 +02:00
660eea8cf4 BLI_rand : add BLI_halton_3D 2017-10-27 22:49:15 +02:00
Dalai Felinto
4de8e12ada Showing Clay collection settings when clay is the workspace not the scene engine 2017-10-27 11:25:58 -02:00
1d409defbf Docs: clarify return value for BVH API 2017-10-27 16:14:24 +11:00
9ab67fd31b Hide transform widget when tool widget is used 2017-10-27 15:54:17 +11:00
de7544202a Fix camera lens/ortho manipulator
Update issues remain, require listening to notifiers.
2017-10-27 15:05:33 +11:00
7ffd3490a8 Merge branch 'master' into blender2.8 2017-10-27 13:24:16 +11:00
282af08fe2 Fix T53131: Incorrect vert-edge angle calculation
Vertex w/ a single edge wasn't detected
2017-10-27 13:10:36 +11:00
Julian Eisel
a3313315ba Merge branch 'master' into blender2.8 2017-10-26 22:57:47 +02:00
Julian Eisel
d245d36074 Remove SCREEN_OT_header_flip, use SCREEN_OT_region_flip instead
Basically reverts rB65c4149f203610 and fixes the issue in a better way.

Keymaps using the removed operator will be affected. Switching header
from top to bottom now has the shortcut F5, just like switching other
regions.
2017-10-26 22:40:24 +02:00
1effab7809 Fix T52984. Trackpad rotation to natural direction 2017-10-26 23:11:25 +03:00
Dalai Felinto
6e1fa2b063 Fix small Python/typo on "Outliner Collection Operation" 2017-10-26 11:54:42 -02:00
f9b2a7879b Skip loading tool keymaps in background mode 2017-10-26 22:04:48 +11:00
ef96f36ee9 Move background images into the camera
This moves background images out of the 3D viewport,
to be used only as camera reference images.

For 3D viewport references,
background images can be used, see: D2827

Some work is still needed
(background option isn't working at the moment).
2017-10-26 22:02:40 +11:00
654ee398ff Merge branch 'master' into blender2.8 2017-10-26 12:49:57 +02:00
03a582ceeb Using gtest fixtures in Alembic export tests 2017-10-26 12:43:59 +02:00
d78bbe38bc Cleanup: Remove unused argument from ED_update_for_newframe
This funciton will be extended, so better to get rid of unused arguments before
adding new ones.
2017-10-26 10:18:15 +02:00
f23c966e24 Fix / workaround T53164: Crashes with background scenes
Simple workaround in on_visible_update(). There might be more missing updates or tags.
2017-10-26 09:48:50 +02:00
cd3c31b2c0 Tool System: experimental low-poly construction
Tool for creating polygons, exact usage may change based on feedback.

LMB to add faces at boundaries (tris from edges, quads from verts).
- Ctrl splits edges
- Alt to dissolve edges/verts.

Works well with vertex snap & auto-merge.

This uses selection hover but isn't intended to introduce more widely
pre-selection highlighting, at least it will be restricted to this tool.
2017-10-26 18:40:27 +11:00
4063c7062a Merge branch 'master' into blender2.8 2017-10-26 16:20:34 +11:00
3d904d7650 Manipulator: Use object bound-box for scale cage
Without this, scaling single objects wasn't working usefully.
2017-10-26 16:15:54 +11:00
81f2e68e20 Event System: check_click was left set
Caused by own change 137586a13c
2017-10-26 16:08:45 +11:00
Julian Eisel
f074a6dd2e Merge branch 'master' into blender2.8 2017-10-25 22:04:01 +02:00
171c4e982f Cycles: use AO factor to let user adjust intensity of AO bounces.
We are already using the AO distance, so might as well offer this extra
control over the intensity. Useful when an interior scene is supposed to
be significantly darker than the background shader.
2017-10-25 21:46:23 +02:00
Dalai Felinto
86899c1adf Fix freestyle UI after workspace > engine changes 2017-10-25 12:25:43 -02:00
b90e2607a0 Depsgraph: Remove workaround for infinite recursion in scene update
Was needed for legacy lamp/material drivers.
2017-10-25 15:49:59 +02:00
54ebbe1534 Depsgraph: Cleanup, remove legacy material/lamp driver update functions 2017-10-25 15:49:59 +02:00
025f4a046f Depsgraph: Remove driver evaluation from object update
With new dependency graph this direct call to driver/animation update should
not be needed,
2017-10-25 15:49:59 +02:00
fb896182b1 Depsgraph; Introduce new scene update routines which gets an explicit graph
They are still modifying global state, such as ID recalc tags stored in bmain,
need some solution for this.
2017-10-25 15:49:59 +02:00
Dalai Felinto
6b739bc2dc Fix T53156: VSE not working since Workspace > engine change
This would break if using preview in VSE. We now use the scene engine
not the workspace engine.

That said we could have the preview engine defined as part of the sequence strip
as we had for draw modes in the past. But this is a separated topic for a
separated patch.

This issue in particular was introduced in e4f2b2be26.

Note: VSE preview is still broken in two cases:
* If you have Eevee as the engine in the Scene of the Scene strip.
* If you use Clay, save the file, and re-open.
2017-10-25 11:16:08 -02:00
4353307607 Depsgraph: Make validation to take explicit graph to be checked 2017-10-25 14:51:02 +02:00
db83f41baf Merge branch 'master' into blender2.8 2017-10-25 14:42:49 +02:00
8988f383c1 Depsgraph: Cleanup, remove redundant calls to add_component 2017-10-25 14:40:38 +02:00
40b3d951bc Depsgraph: Don't touch set scenes when evaluating scene
Objects from set scene gets flattened out to the active scene depsgraph, so it
is a big question why do we need to build dependency graph for set scenes.
2017-10-25 14:37:03 +02:00
a08f633aeb Depsgraph: Remove direct call to VSE animation update
This is supposed to be handled by dependency graph now.
2017-10-25 14:30:56 +02:00
8e4b3e916e Merge branch 'master' into blender2.8 2017-10-25 14:22:24 +02:00
50d30cc5fd Depsgraph: Need to tag relations for update after new clip was added 2017-10-25 14:20:20 +02:00
e2e5c9a1ee Depsgraph: Mark TODO as solved
New dependency graph takes care of all datablocks already.
2017-10-25 14:02:51 +02:00
c4991c0971 Depsgraph: Remove bmain from graph
It really should not care about bmain.
2017-10-25 13:28:40 +02:00
4deddfca89 Depsgraph: Pass explicit bmain to graph build finalization 2017-10-25 13:28:40 +02:00
86761a2cd7 Depsgraph: Cleanup, remove unused function 2017-10-25 13:28:40 +02:00
db04cc0f00 Depsgraph: Remove direct relations rebuild from set_background
We wouldn't really know which context we want there.
2017-10-25 13:28:40 +02:00
da78338da0 Depsgraph: Add function to update relations within a given graph 2017-10-25 13:28:39 +02:00
Dalai Felinto
005cb90113 Fix T52392: Node materials (Materials and World) not updated in viewport
Depsgraph was not updated after you used "Use Nodes" to create the nodetree.
2017-10-25 09:24:28 -02:00
220fbddc8b Merge branch 'master' into blender2.8 2017-10-25 12:21:08 +02:00
ea5cf3ff7a Depsgraph: Rework debug relations update function
Make it a tag for relations update function instead, since we will not be able
to easily rebuild relations, and we wouldn't be able to iterate all scenes.

This is a part of mowing depsgraph to be per-workspace/layer in 2.8 branch.
2017-10-25 12:11:49 +02:00
0bbf2f9554 Depsgraph: Add missing forward struct declarations 2017-10-25 12:11:12 +02:00
b4ba1068c1 Depsgraph: Cleanup, trailing whitespace and braces 2017-10-25 12:07:51 +02:00
3fe534eebb Depsgraph: Make depsgraph.debug_stats to return a string
This way we can see result in the python console.
2017-10-25 12:06:56 +02:00
d8da33d21c Merge branch 'master' into blender2.8 2017-10-25 11:48:20 +02:00
6ec8344243 Depsgraph: Add missing movie clip dopesheet invalidation 2017-10-25 11:45:31 +02:00
eb090d0609 Depsgraph: Use explicit opcode for shape key 2017-10-25 11:37:24 +02:00
a2e22c79cb Depsgraph: Cleanup, use explicit cloth modifier opcode
Avoids use of placeholder operation which also was involving some string
comparisons.
2017-10-25 11:34:41 +02:00
3997a157e9 Depsgraph: Cleanup, don't call explicit add_id()
This is redundant, adding components will check for ID to exist.
2017-10-25 11:31:22 +02:00
7771e0b474 Merge branch 'master' into blender2.8 2017-10-25 11:26:53 +02:00
1bdc687e7a Depsgraph: Use explicit parameters eval operation code
This replaces usage of generic PLACEHOLDEWR with string lookup with more
explicit opcode. This should make it faster to build dependency graph by
avoiding string comparisons when it's not needed.

There should be no user measurable different.
2017-10-25 11:25:10 +02:00
11d7445905 Depsgraph: Cleanup, use proper style for macro loop 2017-10-25 11:25:10 +02:00
45329ce319 Depsgraph: Remove unsued node flag 2017-10-25 11:25:10 +02:00
ea29e4c997 Depsgraph: Make operation codes more obvious
This synchronizes al lrelated changes from blender2.8 branch.
2017-10-25 11:25:10 +02:00
f29ff14d6e Depsgraph: Remove bunch of debug code
Was never actually used and implementation seems to be slow: we shouldn't be
doing per-node evaluation hash lookups, adds too much overhead. We can instead
store statistics in the node itself, and maybe even group them somehow.

Ideally such a statistics should be user-friendly so riggers and animators
can see exactly what's happening.
2017-10-25 11:25:10 +02:00
2103194f79 Fix T53004: XWayland ignores cursor-warp calls
There is currently a limitation in XWayland,
the cursor needs to be hidden during warp calls.
2017-10-25 20:12:12 +11:00
1e107fa514 Merge branch 'master' into blender2.8 2017-10-25 10:13:35 +02:00
8dab90915f Eevee: Fix T53095: Black cube on start and no material updates
This was caused by a not bound unused texture. Removing the texture usage fixes the problem.
2017-10-25 10:31:58 +02:00
83877632a3 Fix one more assert being triggered due to recent changes. 2017-10-25 01:22:16 +02:00
34fe3f9c06 Code refactor: remove MEM_WRITE_ONLY, always use MEM_READ_WRITE.
It's unlikely the driver can do useful optimizations with this, and if
we sum multiple samples we are reading from the memory anyway.
2017-10-24 23:53:09 +02:00
Dalai Felinto
0e7113df21 Silence warning in outliner_id_remap_exec 2017-10-24 16:00:26 -02:00
Julian Eisel
03f1b94e02 Fix crash changing settings of operator executed in different scene
Steps to reproduce were:
* Open Blender, create a new scene
* Go back to initial scene, transform object
* Switch back to newly created scene, change operator settings there
* Should cause a crash (at least with asan)

Should behave like 2.7 now, that is, switch scene back to where
operator was executed.
2017-10-24 18:22:42 +02:00
fe253389e0 Fix Cycles gtests build on macOS. 2017-10-24 17:52:20 +02:00
ec49503a33 Fix T53146: incomplete multi GPU and CPU + GPU memory statistics.
Part due to recent changes, part old bug.
2017-10-24 17:40:43 +02:00
3936ba9725 Depsgraph: Avoid explicit relations rebuild calls
We wouldn't know which dependency graphs needs/safe for reconstruction,
so rather use API which tells that relations are out of date. This way
graph evaluation will take care of the rest.

Committing to 2.8 only since it's where we can't reliably know the graph
and is probably not that safe to apply this in master.
2017-10-24 16:47:34 +02:00
d012c9d0f4 Depsgraph: Remove residue of motion path optimization
This needs to be re-implemented in a new fashion, without touching global list
of bases and become compatible with the new dependency graph.

The idea to go here would be to create new dependency graph for motion path
evaluation, bring a single object in there (which will pull all dependencies
at a construction) and use that.

Needs working copy-on-write first tho.
2017-10-24 16:39:26 +02:00
b6560d9fc1 Depsgraph: Remove bunch of debug code
Was never actually used and implementation seems to be slow: we shouldn't be
doing per-node evaluation hash lookups, adds too much overhead. We can instead
store statistics in the node itself, and maybe even group them somehow.

Ideally such a statistics should be user-friendly so riggers and animators
can see exactly what's happening.
2017-10-24 16:04:11 +02:00
86faf8ac84 Depsgraph: Remove shortcut of freeing scene's depsgraph
It will not be possible to do that after depsgraph becomes more context
oriented. Which means, all code will need to explicitly tell which graph
to free,
2017-10-24 16:04:11 +02:00
97b2483a7a Depsgraph: Remove scene from refresh API
Scene is already stored in the graph.
2017-10-24 16:04:11 +02:00
11d8c939cd Depsgraph: Cleanup, remove unused function declaration 2017-10-24 16:04:11 +02:00
1829084da1 Depsgraph: Switch to explicit graph specification for tag flush 2017-10-24 16:04:11 +02:00
72b61763da Depsgraph: Begin bringing API to pass explicit graph
This is a first step towards an updated API where we pass explicit graph rather
than a scene. This is because we can no longer deduct which graph to use since
it will depend on a context.

Will happen in several steps, so bisecting will not be such a pain.
2017-10-24 16:04:11 +02:00
4dbfb130db Depsgraph: Cleanup, remove unused function
It's unlikely we will ever want to flush tags on all possible scenes or
dependency graphs. It wouldn't be thread safe at a best.
2017-10-24 16:04:11 +02:00
56006d9808 Depsgraph: Cleanup, unused function declaration 2017-10-24 16:04:11 +02:00
Dalai Felinto
7484c6c5ee Fix non-instanced groups in no-collection file creating collections
This is a corner-case, but one that is too easy to reproduce:

* Unlink all the collections of active view layer.
* Link a group without "Instancing" it.
2017-10-24 10:28:01 -02:00
Dalai Felinto
bac740085c rna_layer.c cleanup: remove uneeded includes
I have cleaned up the ones before "#ifdef RNA_RUNTIME", and forgot about the ones after.
2017-10-24 10:23:29 -02:00
d92bca186f Depsgraph: Initialize depsgraph as need for update
This way we can delay graph allocation and relations update.
2017-10-24 13:54:12 +02:00
7ea7fd45d0 Merge branch 'master' into blender2.8 2017-10-24 12:19:48 +02:00
e03df90bf3 Cycles: Fix compilation in debug mode
Please check compilation before committing refactor changes!
2017-10-24 12:09:02 +02:00
eccd18a91f Cycles: Fix compilation error without C++11 2017-10-24 11:14:01 +02:00
d0f48d33f4 Cycles: Fix memory leak in test and simplify code 2017-10-24 11:12:28 +02:00
1dd33b2f23 Cycles: Fix test compilation failure after recent refactor
The test will leak CPU devices, but is all passing other than that.
Leak will be fixed shortly.

P.S. Committing code refactor without running regression tests, tsk ;)
2017-10-24 10:48:16 +02:00
136f33b09f Fix T53143: Knife Crash after Grid Fill
BM_ELEM_INTERNAL_TAG flag wasn't ensured to be cleared.
2017-10-24 17:21:25 +11:00
8661ab12a6 Fix BMesh PyAPI internal flag clearing logic
Would leave the flag set on raising an exception.
2017-10-24 16:52:54 +11:00
c93cfcbb61 Fix edge-split bmesh operator giving empty result 2017-10-24 16:31:35 +11:00
c71f2f1404 Fix T53130: NLA Tweak (moved) Tracks + Alt+RMB Select does not work in Graph Editor 2017-10-24 16:27:56 +13:00
a1aad1f8d1 Fix T53134: denoising with CPU + GPU render leaves some tiles noisy. 2017-10-24 04:09:48 +02:00
f5456df095 Merge branch 'master' into blender2.8 2017-10-24 02:05:41 +02:00
070a668d04 Code refactor: move more memory allocation logic into device API.
* Remove tex_* and pixels_* functions, replace by mem_*.
* Add MEM_TEXTURE and MEM_PIXELS as memory types recognized by devices.
* No longer create device_memory and call mem_* directly, always go
  through device_only_memory, device_vector and device_pixels.
2017-10-24 01:25:19 +02:00
aa8b4c5d81 Code refactor: use device_only_memory and device_vector in more places. 2017-10-24 01:25:13 +02:00
7ad9333fad Code refactor: store device/interp/extension/type in each device_memory. 2017-10-24 01:03:59 +02:00
ae41f38f78 Code refactor: pass device to scene, check OSL with device info. 2017-10-24 01:03:59 +02:00
Julian Eisel
254daf8f8c Fix T53141: Assert when using transformation in new 3D View editor
Was actually possible to invoke this assert failure in two ways:
* Transforming in newly created 3D View (like described in the report).
* Transforming in newly appended workspace from default workspaces.blend. Issue was that default workspaces.blend was saved in 2.8.1, but in a branch state that didn't include the transform-orientation changes. So versioning code wouldn't run when needed.

Note that files saved with this bug will still cause the assert to
fail. Can be ignored then.

This is not related to manipulators (as suggested in the report).
2017-10-24 00:38:20 +02:00
Dalai Felinto
23a5726ec2 Refactor: Move rna_scene.c layer/collection to rna_layer.c
rna_scene.c was getting way too big with data that was related to
DNA_layer_types.h.

I tried doing it earlier, but failed. But now with the new changes I think it's
better to do this sooner than later.
2017-10-23 18:18:05 -02:00
4db67aab06 Fix OpenGL extension report in system info operator. 2017-10-23 22:22:22 +03:00
cc96cdd9d4 VSE: draw grid lines at every second
Was hard-coded to 25 frames.

D2893 by @jooert
2017-10-23 22:29:49 +11:00
1aa5b63661 Docs: improve bmesh exception message
Suggested in T53131
2017-10-23 21:57:32 +11:00
c8edac617f Merge branch 'master' into blender2.8 2017-10-23 14:38:22 +11:00
af067f2305 Correct gtest error in recent beautify change 2017-10-23 14:20:35 +11:00
Julian Eisel
7dcf8bebe6 Cleanup: Remove unused function declaration 2017-10-23 02:11:45 +02:00
Julian Eisel
147f9585db Merge branch 'master' into blender2.8 2017-10-23 00:04:20 +02:00
6dfe4cbc6b Polyfill Beautify: half-edge optimization
Was using an edge hash for triangle -> edge lookups,
updating triangle indices for each edge-rotation.

Replace this with half-edge which can rotate edges much more simply,
writing triangles back once the solution has been calculated.

Gives ~33% speedup in own tests.
2017-10-23 01:40:03 +11:00
57a0cb797d Code refactor: avoid some unnecessary device memory copying. 2017-10-21 20:58:28 +02:00
92ec4863c2 Code refactor: simplify image device memory allocation. 2017-10-21 20:58:28 +02:00
0836795a0d Fix issue with resumable rendering in recent changes. 2017-10-21 20:57:52 +02:00
6199a606a6 Cycles: disable progressive refine if denoising or save buffers is used.
Progressive refine undoes memory saving from save buffers, so enabling
both does not make much sense. Previously enabling progressive refine
would disable denoising, but it should be the other way around since
denoise actually affects the render result.

Includes some code refactor for progressive refine render buffers, and
avoids recomputing tiles for each progressive sample.
2017-10-21 20:29:21 +02:00
dc9eb8234f Cycles: combined CPU + GPU rendering support.
CPU rendering will be restricted to a BVH2, which is not ideal for raytracing
performance but can be shared with the GPU. Decoupled volume shading will be
disabled to match GPU volume sampling.

The number of CPU rendering threads is reduced to leave one core dedicated to
each GPU. Viewport rendering will also only use GPU rendering still. So along
with the BVH2 usage, perfect scaling should not be expected.

Go to User Preferences > System to enable the CPU to render alongside the GPU.

Differential Revision: https://developer.blender.org/D2873
2017-10-21 20:13:44 +02:00
Julian Eisel
efd70ab78f Move & rename uiLayoutOperatorButs to interface_templates.c 2017-10-21 16:48:42 +02:00
bf26509855 Manipulator: name remove func's 'unlink_delayed'
Name wasn't right since this only unlinks from manipulator maps.
2017-10-22 00:17:47 +11:00
d3fafa3002 Manipulator: move 'Scale Cage' to its own tool
Was activated with the regular scale manipulator,
move to own tool since they are different ways to access scale.
2017-10-21 23:01:19 +11:00
e1e7b6db2e WM: Initial Tool System
The tool-system it's self is primitive and may be changed.

Adding to 2.8 to develop operators and manipulators as tools.

Currently this is exposed in the toolbar, collapsed by default.
Work-flow remains unchanged if you don't change the active tool.

Placing the 3D cursor is now a Click instead of a Press event,
this allows tweak events to be mapped to tools such as border select,
keeping click for 3D cursor placement when selection tools are set.
2017-10-21 16:39:35 +11:00
b66728d63d Merge branch 'master' into blender2.8 2017-10-21 12:43:17 +11:00
ebb29200d3 Cleanup: use relative imports in bl_ui 2017-10-21 12:41:42 +11:00
Dalai Felinto
a8553c9fa2 Silence warning on subsurf modifier 2017-10-20 18:16:34 -02:00
1beebcb10c Depsgraph: Reduce number of depsgraph_legacy usages outside of depsgraph 2017-10-20 17:01:35 +02:00
4f3d9a09fe Depsgraph: Make depsgraph a part of evaluation context
This way evaluation routines will know which exact depsgraph evaluation
is happening for.

Mainly needed to get evaluation flags associated with ID nodes.
2017-10-20 16:50:58 +02:00
cdd1e86499 Fix/workaround wrong dependency graph being constructed after creating a proxy 2017-10-20 16:15:30 +02:00
3df2e6d76b Fix T53109: denoising variance debug passes not working after recent changes. 2017-10-20 14:41:24 +02:00
c74c72101e Fix compositor node links getting lost on file load for custom render passes. 2017-10-20 14:41:24 +02:00
0fdc0f8bbd Depsgraph: Introduce hash of dependency graphs in the scene level
The idea is following: we do need to have multiple dependency graphs to denote
different scene layers (depsgraph should only contain objects from a specific
scene layer), and we also want to support same scene layer to be evaluated to
a different state in different windows. In order to achieve that we do need to
have a list or hash (for faster lookup presumably) somewhere. To keep things
easier for now, it will be a scene which owns that hash. This seems to make
sense anyway, since dependency graph only points to data which is owned by
scene.

This commit only introduces some basic API and hash itself stored in DNA, there
is no changes in behavior. See this as a first step towards getting rid of
scene-global dependency graph.
2017-10-20 12:28:25 +02:00
86d75d5d98 Depsgraph: Remove redundant call of depsgraph free 2017-10-20 12:10:29 +02:00
e665c3a3f6 Remove unused dependency graph flags from scene 2017-10-20 11:30:39 +02:00
3beea71b07 Remove some residue of old legacy dependency graph 2017-10-20 11:26:00 +02:00
ae72a9206e Fix T46163: NLA properties with drivers aren't displayed as having drivers
While such drivers will generally get evaluated too late to be of much
use during animations, it can still be useful to allow using drivers to
control a whole bunch of NLA strip properties (i.e. syncing NLA strip
timings via a single property/control).

Keyframe insertion however is still not allowed on these properties
(and an error message will now be displayed when trying to do so,
instead of silently failing), as it is useless.
2017-10-20 17:05:50 +13:00
c45b8a65b4 Merge branch 'master' into blender2.8 2017-10-20 14:14:44 +11:00
959a58da9e Cleanup: redundant casts 2017-10-20 14:03:22 +11:00
aa7e76b2e3 Merge branch 'master' into blender2.8 2017-10-20 09:40:08 +11:00
cb957fd8e0 Cleanup: replace gpencil tri vars w/ array 2017-10-20 09:28:12 +11:00
Dalai Felinto
fc10484f7c Fix/properly implement: "make group proxy"
This was never correctly implemented. It now works as expected (ala 2.79 behaviour).
The proxy object is added to all the collections of the original empty.

Before not only this wasn't the case, but it would crash Blender.
2017-10-19 18:04:14 -02:00
4d2416b99c Merge branch 'master' into blender2.8 2017-10-20 00:29:04 +11:00
465b6333cc Correct last commit, use WM_exit
Without this temp directory isn't removed.
2017-10-20 00:19:58 +11:00
9ee8319cd5 Exit with invalid command line arguments
Loading blender with an unknown name would interpret it as a blend file.

This meant passing `--arg` arguments would end up creating new
blend files which could be confusing if you made a typo on a command
line argument.

Now check the string has a blend file extension,
exiting if it doesn't.
2017-10-20 00:10:40 +11:00
0f8a57de68 Merge branch 'master' into blender2.8 2017-10-19 13:58:01 +02:00
335e454db6 Depsgraph: Use new ID copy API to copy scenes
Avoids temporary main and datablock memory from being allocated.
2017-10-19 13:57:49 +02:00
1cddab18de Allow non-initialized memory to be passed to BKE_id_copy_ex
This only applies when LIB_ID_CREATE_NO_ALLOCATE flag is used and guarantees
that non-memset-zero memory can be used (or, that same memory chunk might be
used over and over again without need to clean it from the calleer).
2017-10-19 13:55:08 +02:00
8f495326bf Fix operators adding manipulators multiple times
Running spin or bisect twice in a row added widget groups each time.
2017-10-19 22:44:51 +11:00
529d365b4d Add note about handling of root nodetree in ID copydata.
OUr beloved root nodetrees... Had to check again the code to undersand
why we copy them with bmain even though they are not in bmain, so this
is worth a comment. ;)
2017-10-19 12:33:14 +02:00
910dd7fb1b Cycles: Add extra logging in CUDA device detection code 2017-10-19 11:26:10 +02:00
42dbae5d28 Merge branch 'master' into blender2.8 2017-10-19 17:05:38 +11:00
947bc017aa Merge branch 'master' into blender2.8 2017-10-19 17:03:47 +11:00
2cf1bc3615 Merge branch 'master' into blender2.8 2017-10-19 16:58:30 +11:00
fe9f5fd557 Merge branch 'master' into blender2.8 2017-10-19 16:55:08 +11:00
27ab054bad Merge branch 'master' into blender2.8 2017-10-19 16:30:20 +11:00
7bf7b8af39 Cleanup: redundant comments
Class names are readable, no need for explanations of each one.
2017-10-19 16:19:07 +11:00
351222c26f UI: 3D View, object menu
Changes from D2876 by @meta-androcto /w own edits

- Move "Relations" into own menu.
2017-10-19 16:12:35 +11:00
0aa6d44a79 UI: 3D View, undo menu reorganization
Changes from D2876 by @meta-androcto /w own edits

Move 3x undo items into Undo menu,
these are such common operations they're typically accessed by keys.

Also add to menus which didn't have undo
(seemed random which modes had undo, undo history in their menus).
2017-10-19 15:41:57 +11:00
a8fb08b19c UI: 3D View, minor menu reorganization
Changes from D2876 by @meta-androcto

- Move "Delete" to the first menu item in most toplevel menus.
- Add separators.
- Consistent order of Undo/Redo
2017-10-19 15:10:41 +11:00
b82b55a313 UI: 3D View Mesh "Select" menu reorganization
Changes from D2876 by @meta-androcto /w own edits

- Move "Select Linked" into own menu.
- Move "Select Loop" into own menu.
2017-10-19 14:45:56 +11:00
a6fdec305a UI: 3D View "View" menu reorganization
Changes from D2876 by @meta-androcto /w own edits

- Move view axis & camera selection into "Viewpoint" menu.
- Move render border and clipping into border menu.
- Move Camera operators into own menu.
- View Selected was located in two menus,
  Only expose the "use_all_regions" version when quad-view is used.
2017-10-19 14:07:39 +11:00
c64e515f90 Cleanup: pep8/line length 2017-10-19 11:31:28 +11:00
3859f5ec28 Docs: correct descriptions 2017-10-19 11:09:27 +11:00
d85a0a722e Fix part of T53038: principled BSDF clearcoat weight has no effect with 0 roughness. 2017-10-18 23:35:54 +02:00
32145c4a88 Depsgraph: Use new ID management API to copy ID pointers
This solves issue with user counter on materials, objects and such,
additionally avoids having too much overhead of temporary lock and
datablock allocation.

Still need to do similar thing for scene copy, and look into nested
ID datablocks somehow.
2017-10-18 17:18:12 +02:00
a2f846aa2d Merge branch 'master' into blender2.8 2017-10-18 17:13:37 +02:00
a2b541bd22 Fix mistake in new ID copy code in 'no allocate' case.
Spotted by @sergey, thanks.
2017-10-18 17:11:29 +02:00
264837cb46 Fix wrong comment (leftover from dev time). 2017-10-18 16:55:33 +02:00
651f76b384 Depsgrpah: Fix crash when removing object 2017-10-18 16:43:40 +02:00
47bcd4abad Depsgraph: Make code correct
Was a residue from some debug.
2017-10-18 16:01:08 +02:00
6a17d52f06 Merge branch 'master' into blender2.8 2017-10-18 14:39:22 +02:00
3e8abc0535 Depsgraph: Make Copy-on-Write a command line option
Before it was a compile time option which was not very easy to use or test. Now
the project is getting more mature, so very soon we will be able to call for a
public tests of limited features.

The copy-on-write (which includes animation, modifiers) is enabled using
--enable-copy-on-write command line argument.
2017-10-18 14:35:34 +02:00
46f0b97d20 Depsgraph: Remove declaration of legace removed functions 2017-10-18 12:49:28 +02:00
01a0649354 Cycles: Fix wrong shading when some mesh triangle has non-finite coordinate
This is fully unpredictable for artists when one damaged object makes the whole
scene to render incorrectly. This involves two main changes:

- It is not enough to check triangle bounds to be valid when building BVH.
  This is because triangle might have some finite vertices and some non-finite.

- We shouldn't add non-finite triangle area to the overall area for MIS.
2017-10-18 12:19:53 +02:00
ecf20e7a56 Fix crash accessing enums without a context 2017-10-18 19:46:39 +11:00
ec2bbc90e7 Merge branch 'master' into blender2.8 2017-10-18 17:09:41 +11:00
54f9a6e5da Merge branch 'master' into blender2.8 2017-10-18 16:40:31 +11:00
ab7ebf2b10 Cleanup: Use const for RNA EnumPropertyItem args
Practically all access to enum data is read-only.
2017-10-18 16:04:07 +11:00
92611dada6 Fix T53098, T53079: OpenCL world texture errors after recent changes. 2017-10-18 03:13:25 +02:00
Dalai Felinto
0bcb61b2fe Follow up to engine in workspaces, using clay as default
It would be too slow to use Eevee for files that were not prepared for it.
And at the moment since this is not set, it was falling back to BI.
2017-10-17 20:34:17 -02:00
Dalai Felinto
5aff67fb5e Fix crash when Making Duplicates Real for groups 2017-10-17 20:14:06 -02:00
Dalai Felinto
028a558116 Layers: Fix selected lamp and dupli count for info stats 2017-10-17 19:55:40 -02:00
1cb884be35 Make auto handle placement aware of cyclic extrapolation.
Cyclic extrapolation is implemented as an f-curve modifier, so this
technically violates abstraction separation and is something of a hack.
However without such behavior achieving smooth looping with cyclic
extrapolation is extremely cumbersome.

The new behavior is applied when the first modifier is Cyclic
extrapolation in Repeat or Repeat with Offset mode without
using influence, repeat count or range restrictions.

This change in behavior means that curve handles have to be updated
when the modifier is added, removed or its options change. Due to the
way code is structured, it seems it requires a helper link to the
containing curve from the modifier object.

Reviewers: aligorith

Differential Revision: https://developer.blender.org/D2783
2017-10-17 19:39:10 +03:00
7d3723a54d Fix T52959: Local view looses clip range on exit 2017-10-18 01:41:19 +11:00
0a435d49ba Fix T53074: Use the pybuffer->itemsize to get the corresponding GLtype
It seems that `typestr` does not always define the final size of the element. And it varies by operating system.

Then use the `typestr` only to know the itemtype is `float` type or not.
2017-10-17 12:06:52 -02:00
06ff970f27 Fix T53007: OpenSubdiv + transparency = artefact/crashes 2017-10-17 12:12:15 +02:00
9598bad59c GPU: Report number of compressed texture formats to help nailing crahs down in the future 2017-10-17 11:53:15 +02:00
b65fecd9a0 GPU: Fix memory corruption in GPU_debug on GTX1080
Number of texture formats is 51, which is greater than allowed size of 32.
2017-10-17 11:52:31 +02:00
b53918be39 Added alpha channel check to Alembic unit test
It was broken due to 823bcf1689, which added
alpha information and thus changed tuple size from 3 to 4 items.
2017-10-17 10:59:02 +02:00
bb4c16ef94 Merge branch 'master' into blender2.8 2017-10-17 15:18:12 +11:00
a297e1bb93 WM: move gesture operator callbacks into own file
`wm_operators.c` is near 5k LOC with lots of mixed functionality,
extract gesture callbacks since they aren't closely related.
2017-10-17 15:16:02 +11:00
0ffa64a45f Merge branch 'master' into blender2.8 2017-10-17 14:06:49 +11:00
99520e3f92 Cleanup: use 'e' prefix for enum typedefs
Convention was only followed loosely,
apply to DNA where changes aren't likely to conflict.

(Skipped ModifierType for eg).
2017-10-17 13:49:20 +11:00
dd91d7d09d Merge branch 'master' into blender2.8 2017-10-17 12:42:51 +11:00
57ec19e0e5 WM: immediate line-gesture activation on tweak
Matches border-gesture behavior,
needed for binding bisect to tweak event.
2017-10-17 12:39:42 +11:00
8ffb761387 GPUFramebuffer: Fix recursive downsample exiting early.
I should really proof read my commits a bit more.
2017-10-17 03:06:04 +02:00
d0f4d0df2a Knife Tool: add wait_for_event option 2017-10-17 11:50:59 +11:00
7d71007cfb GPU Extension: Fix AMD Vega + open source driver detection. 2017-10-17 00:53:14 +02:00
Julian Eisel
3b6d7b5152 Docs: Add comments on workspace removal functions 2017-10-16 23:19:15 +02:00
Julian Eisel
d2fc4deb09 Fix warnings for notifier listeners 2017-10-16 22:53:58 +02:00
Dalai Felinto
314542ffd4 Fix for objects trailing in viewport when using BI in scene+Eevee in workspace
Thanks for Clément Foucault for finding where to tackle.
2017-10-16 18:37:40 -02:00
Dalai Felinto
73ca54283c Fixup for recent workspace changes: Python files
I wrongly changed some of these files via sed, and apparently overdid
it in some false positives.
2017-10-16 17:59:13 -02:00
Dalai Felinto
d3e7a737de Silence warning 2017-10-16 17:53:57 -02:00
Dalai Felinto
eae622d2dd Workspace: Call BKE_viewrender_free from the right place
We should call it when we free the workspace, not when removing it.
Patch by Julian Eisel.
2017-10-16 17:52:49 -02:00
Dalai Felinto
e4f2b2be26 Workspace: Move engines to workspace and Properties Editor cleanup
Engine is not stored in WorkSpaces. That defines the "context" engine, which
is used for the entire UI.

The engine used for the poll of nodes (add node menu, new nodes when "Use Nodes")
is obtained from context.

Introduce a ViewRender struct for viewport settings that are defined for
workspaces and scene. This struct will be populated with the hand-picked
settings that can be defined per workspace as per the 2.8 design.

* use_scene_settings
* properties editor: workshop + organize context path

Use Scene Settings
==================
For viewport drawing, Workspaces have an option to use the Scene render
settings (F12) instead of the viewport settings.

This way users can quickly preview the final render settings, engine and
View Layer. This will affect all the editors in that workspace, and it will be
clearly indicated in the top-bar.

Properties Editor: Add Workspace and organize context path
==========================================================

We now have the properties of:

Scene, Scene > Layer, Scene > World, Workspace

[Scene | Workspace] > Render Layer > Object
[Scene | Workspace] > Render Layer > Object > Data
(...)

Reviewers: Campbell Barton, Julian Eisel
Differential Revision: https://developer.blender.org/D2842
2017-10-16 17:29:04 -02:00
Dalai Felinto
e8962f90de Fix compatibility flag for nodetree
NODE_NEWER_SHADING was introduced in e868b459bb however it should have been
added as a bitflag.

BKE_scene_uses_blender_eevee() was used in gpu_shader_output() as a workaround
for compatibility being poorly used.

Anyways this fixes this situation. This is necessary for an upcoming patch, even
though this is considered temporary - since the other NODE_*_SHADING values are
legacy from Blender Internal drawing.
2017-10-16 16:36:45 -02:00
67e0a44e61 Replace freeing checks with MEM_SAFE_FREE 2017-10-17 00:45:14 +13:00
a2758152e2 Merge branch 'master' into blender2.8 2017-10-16 22:28:24 +11:00
870b4b6735 WM: refactor gestures for use as tools
Border and circle select wait for input by default.
This commit uses bool properties on the operators instead of
magic number (called "gesture_mode").

Keymaps that define 'deselect' for border/circle select
begin immediately, exiting when on button release.
2017-10-16 22:21:46 +11:00
6d8f63a834 Fix T53054: Parentless bone + IK crashes 2017-10-16 22:21:45 +11:00
8550c2b922 Cleanup: modal operator border callback names
Use same convention as all others.
Remove 'select' since these are used for zoom as well.
2017-10-16 17:03:08 +11:00
83b60dac57 WM: store modal operator last-properties
Avoids modal operators needing to explicitly store them.
2017-10-16 16:38:02 +11:00
946a4fe85a WM: Don't save mouse-paths to operator history
In preparation for modal operators storing their properties,
no need to keep mouse-paths around.

Also use generic function for lasso properties.
2017-10-16 16:14:07 +11:00
8bda35d2f4 WM: remove hard-coded circle radius memory
Replace with operator type 'last_properties'.

Also use generic function for circle gesture properties.
2017-10-16 15:32:09 +11:00
14af3e485f Merge branch 'master' into blender2.8 2017-10-16 14:31:19 +11:00
137586a13c Event System: Prevent mouse motion in click events
Don't convert mouse button events to click if they include dragging.
Double-click events already checked for this.
2017-10-16 14:27:10 +11:00
201b02f2a7 Cleanup: simplify lasso reallocation
Remove unneeded define, double allocations when increasing.
2017-10-16 14:27:10 +11:00
cae9770954 Cleanup: rename gesture mode to is_active
Wasn't obvious what this did at a glance.
2017-10-16 14:27:10 +11:00
811dbf5525 Code cleanup: deduplicate primitive refit code. 2017-10-15 21:53:58 +02:00
383df45af9 Fix bad 'poll' prop callback API doc.
This was added to all prop types, when it is only available for Pointer ones.
2017-10-15 20:38:29 +02:00
2e50add164 Fix OpenCL performance regression after cubic interpolation.
Reorganize code to reduce register pressure.
2017-10-15 17:46:50 +02:00
a1bb2ae0d7 Merge branch 'master' into blender2.8 2017-10-14 19:29:11 +11:00
49f4ac17bf Edit Mesh/Curve: Median center for click extrude
Was using bound-box center which depends on rotation.
2017-10-14 19:27:21 +11:00
f4b5d0ba3a Add some basic 4K render presets.
This difinition is becomming rather common now, time to add it to our
collection imho (requested in T53064).
2017-10-14 10:08:48 +02:00
8fb2e46193 Edit Mesh: click extrude, ensure inverse matrix
Relied on this being set elsewhere which isn't assured.
2017-10-14 19:05:12 +11:00
0e35c900d8 Merge branch 'master' into blender2.8 2017-10-14 17:58:29 +11:00
8bac5ea0c5 Correct bezier curve assert
Bezier curves should have v-points zero'd.
2017-10-14 17:54:43 +11:00
b0fa10f880 Merge branch 'master' into blender2.8 2017-10-14 17:38:06 +11:00
7cd9926fd8 Cleanup: use const for events 2017-10-14 17:30:15 +11:00
Julian Eisel
61fe8e8aca Hide "Confirm on Release" button from transfor redo options
Hide-flag wasn't set so option shows up in keymap editor. But seems like
that flag is ignored there by now anyway.
2017-10-14 01:12:30 +02:00
a09b8c08fc Eevee: Contact Shadows: Fix remaining artifacts.
There was noise correlation between the rotation random number and the radius random number used in the contact shadow algo.
Hacking a new distribution from the old distribution (may not be ideal because it's discrepency may be high)
Also distribute samples evenly on the shadow disc. (add sqrt)

Fix the "bias floating shadows", was cause by the discarding of backfacing geom which makes no sense in this case.
2017-10-12 17:36:24 +02:00
e416f417e0 Fix scene deletion code to match master's behavior.
Previous code, while more correct than old master one, could still lead
to invalid state in some corner cases (like linked scenes...).
2017-10-12 16:50:53 +02:00
557dc7d343 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/screen/screen_edit.c
2017-10-12 16:40:35 +02:00
a51688d0b0 Fix T53052: ID decrement error when deleting a scene, either python or GUI.
User count of scenes was inconsistant, screens only have 'user_one' kind
of owning over scenes, which means they shall never increment or
decrement their real user count. And usually, scenes have no real user
at all.
2017-10-12 15:54:43 +02:00
3b4f6996a8 Fix T52999: floating (popup) panels/menus could jump around screen in some cases.
Would happen during panel's refresh drawing, if drawing code had to adjust
final panel position compared to the initial one computed based on the
mouse coordinates, and user had dragged the floating panel around.

Issue fixed by adjusting stored mouse coordinates once final panel
position is known, such that they would directly generate those
coordinates. that way, the basic offset applied to those stored mouse
coordinates during panel dragging is valid, and recreating panel based
on those won't make it jump in screen.

Note that panel will still jump in case user dragged it partially out of
view - we could prevent that, but imho it's better to keep that
behavior, since redraw can generate a popup of different size, which
could end up with a totally out-of-view one...

Hopefully this fix does not break anything else!
2017-10-12 14:50:18 +02:00
b29e37ed81 Docs: add note for bmesh face_split_edgenet 2017-10-12 23:36:42 +11:00
5f025a7e5e Object Mode: Grid: Add a non-hard depth test.
This adds a custom depth test that have the benefits to glitch less and be more visually pleasing.
Downside is that it let the grid pass trough the objects a little.

This effect is done in NDC space so that it counteract the logarithmic depth distribution imprecision (read as it's less visible near the camera but more present far away).

This patch also includes some cleanups.
2017-10-12 04:03:42 +02:00
5ea729845d Fix T53048: OSL Volume is broken in Blender 2.79
Was a mistake in optimization commit which was disconnecting closures and nodes
which does not make sense for volume output.

OSL script we can't ignore and can't currently know in advance if it's a proper
volume shader or not. So we never disconnect OSL nodes from volume output.

This is a good candidate for corrective release.
2017-10-11 15:22:40 +05:00
4fce3c7ac0 Cycles: Speedup up tangent space calculation
This patch goes away form using C++ RNA during tangent space calculation which
avoids quite a bit of overhead. Now all calculation is done using data which
already exists in ccl::Mesh. This means, tangent space is now calculated from
triangles, which doesn't seem to be any different (at least as far as regression
tests are concerned).

One of the positive sides is that this change makes it possible to move tangent
space calculation from blender/ to render/ so we will have Cycles standalone
supporting tangent space.

Reviewers: brecht, lukasstockner97, campbellbarton

Differential Revision: https://developer.blender.org/D2810
2017-10-11 13:19:15 +05:00
a421607569 Cycles: Add utility function to calculate triangle's normal 2017-10-11 13:18:59 +05:00
552d15c976 Cycles: Add utility function to remove given attribute 2017-10-11 13:18:59 +05:00
dc95c79971 Merge branch 'master' into blender2.8 2017-10-11 13:14:16 +05:00
4782000fd5 Cycles: Fix possible race condition when initializing devices list 2017-10-11 12:48:19 +05:00
d83bcf7071 Cycles tests: Don't proint braces for empty status 2017-10-11 12:36:18 +05:00
ef1918d312 Gawain: Fix instancing messing next draw.
Everything was fine if one batch is always used with instancing. But problem arise if the next drawcall for this batch is not using instancing as the attrib divisor stays set to 1 in th VAO.

As instancing is less used than normal drawing I prefer to reset the divisor after drawing as it is reset before drawing instances.
2017-10-11 02:15:42 +02:00
d46842108d Eevee: Probe: Add Cubemap Resolution option. 2017-10-11 02:15:42 +02:00
31386afaa1 Eevee: Fix light grid being rendered after delete. 2017-10-11 02:15:42 +02:00
9f3c7c75b7 Eevee: Fix TAA color drifting.
This was caused by small float precision being insuficient. The blue component of R11F_G11F_B10F has lower precision than the other 2 components. This resulted in colors drifting towards a yellowish tone.

Using RGBA16F for the concerned buffer. This double the memory usage of the framebuffers and add subsequent bandwidth usage.
2017-10-11 02:15:42 +02:00
12fa6750f5 Eevee : Add a workaround for bug with AMD RX VEGA Linux + Mesa Driver
This bug (explained here https://github.com/dfelinto/opengl-sandbox/blob/downsample/README.md) is breaking eevee beyond the point it's workable.

This patch workaround the issue by making sure every fbo have mipmaps that are strictly greater than 16px. This break the bloom visuals a bit but only for this setup.
2017-10-11 02:15:42 +02:00
eb734746a8 Eevee: Fix hashed and alpha clip transparency. 2017-10-11 02:15:42 +02:00
5e6329b2f8 Eevee : SSR : Fix incorrect framebuffer issue.
It was cause by a texture without mipmap levels.
2017-10-11 02:15:42 +02:00
99eb13d3f7 Fix T53040: Vertex paint, texure & symmetry fail
Removed old logic for brush texture which was being applied twice.
2017-10-10 23:31:07 +11:00
d2326e888a Vertex Paint: add back missing VertProjHandle free
Also avoid passing large struct as value.
2017-10-10 22:32:30 +11:00
0592ac09ff Correct logic for vertex paint smear
Swapping gave values from the state before the last.
Thanks to @angavrilov for spotting.
2017-10-10 20:38:52 +11:00
582fbda18f Fix Sculpt 2D falloff, missing brush caused crash 2017-10-10 19:52:11 +11:00
8d73ba58b6 Cycles: Fix compilation of sm_20 and sm_21 kernels
Was broken since the bicubic commit for GPU support.
2017-10-10 12:26:02 +05:00
c90ec276b8 Manipulator: add cage3d scale widget
For now only show this when scale manipulator is active.
2017-10-10 03:08:53 +11:00
caba67c2fa Recent check for navigation missed NULL check 2017-10-10 02:43:56 +11:00
Dalai Felinto
fdeb125c7a Fix T53014: Cycles material preview not working
This was introduced on 9ad2c0b615 and partly mended on 8a1d787b89.
2017-10-09 11:41:57 -03:00
6ec43a765b Merge branch 'master' into blender2.8 2017-10-10 01:36:36 +11:00
e9d06f0866 UI: VSE strip menu reorganization
Add Inputs and Transform submenus.
2017-10-09 13:59:49 +11:00
e360d003ea Cycles: schedule more work for non-display and compute preemption CUDA cards.
This change affects CUDA GPUs not connected to a display or connected to a
display but supporting compute preemption so that the display does not
freeze. I couldn't find an official list, but compute preemption seems to be
only supported with GTX 1070+ and Linux (not GTX 1060- or Windows).

This helps improve small tile rendering performance further if there are
sufficient samples x number of pixels in a single tile to keep the GPU busy.
2017-10-08 21:12:16 +02:00
Mathieu Menuet
5aa08eb3cc Fix T53017: Cycles not detecting AMD GPU when there is an NVidia GPU too.
Best guess is that cuInit() somehow interferes with the AMD graphics driver
on Windows, and switching the initialization order to do OpenCL first seems
to solve the issue.
2017-10-08 18:36:02 +02:00
abcda06934 Eevee: Fix bad defines for volumetric shadowing 2017-10-08 18:23:45 +02:00
9ea2a7c02d Fix potential string buffer overruns.
Note that our library path handling is still rather dodgy on this
regards, shall take some time at some point to seriously sanitize it...
2017-10-08 16:08:00 +02:00
f7db1a4366 Gawain: Make common uniforms become builtins
This improves eevee's cache performance by 13% in my test.
2017-10-08 15:49:25 +02:00
cdb0b3b1dc Code refactor: use DeviceInfo to enable QBVH and decoupled volume shading. 2017-10-08 13:17:33 +02:00
4b3e6cb728 Cleanup: --help text
Sync with manual
2017-10-08 18:49:58 +11:00
c3d3483223 CMake: Re-order PYTHON_VERSION check
Missing paths would error first.
2017-10-08 14:05:22 +11:00
f61c340bc1 Cycles: OpenCL bicubic and tricubic texture interpolation support. 2017-10-08 02:55:44 +02:00
c040dedc12 Fix incorrect MIS with principled BSDF and specular roughness 0. 2017-10-07 22:10:02 +02:00
c921c3bcd0 [cmake] Add minimum python version check to cmake to prevent later build errors. 2017-10-07 07:58:54 -06:00
d7eabc6765 Code cleanup: simplify cmake kernel install. 2017-10-07 15:32:20 +02:00
2d92988f6b Cycles: CUDA bicubic and tricubic texture interpolation support.
While cubic interpolation is quite expensive on the CPU compared to linear
interpolation, the difference on the GPU is quite small.
2017-10-07 15:30:57 +02:00
23098cda99 Code refactor: make texture code more consistent between devices.
* Use common TextureInfo struct for all devices, except CUDA fermi.
* Move image sampling code to kernels/*/kernel_*_image.h files.
* Use arrays for data textures on Fermi too, so device_vector<Struct> works.
2017-10-07 14:53:14 +02:00
d013b56dde Actually force accumulate mode for the Smear brush in weight/vertex paint.
Just removing the checkbox from UI isn't enough for proper behavior.
2017-10-07 13:53:54 +03:00
6b8abefcc6 Make weight paint blur thread safe, and fix smear ignoring mirror.
Instead of trying to be clever with swaps and lazy updating the weight
data, simply recalculate one single array. To improve performance, use
threading for that.
2017-10-07 12:45:21 +03:00
adfbf276a1 Cleanup: style, duplicate includes 2017-10-07 15:57:14 +11:00
37b457221e Cleanup: remove Py3.5 compatible code 2017-10-07 15:14:36 +11:00
Dalai Felinto
8a1d787b89 Initial fix for T53014: Cycles material preview no light
This was introduced on 9ad2c0b615.

Although this still doesn't fix the issue, it updates the preview
system to use COLLECTION_DISABLED as intended.

What is missing now is for the flushing to work effectively.
2017-10-06 18:55:48 -03:00
dfcdec914c Eevee: Shadows: Add Contact Shadows
This add the possibility to add screen space raytraced shadows to fix light leaking cause by shadows maps.

Theses inherit of the same artifacts as other screenspace methods.
2017-10-06 23:44:22 +02:00
9ab18d14f6 Eevee: Modify the raycast function to be more flexible.
Make quality a parameter, and modify the ray end to be premultiplied so that the raytrace is done on a range.

This is in order to add contact shadows.
2017-10-06 23:44:22 +02:00
Dalai Felinto
321f773ca6 Merge remote-tracking branch 'origin/master' into blender2.8 2017-10-06 13:09:24 -03:00
83ce02879f Cycles: Fix possible race condition when generating Beckmann table
Two issues here:

- Checking table size to be non-zero is not a proper way to go here. This is
  because we first resize the table and then fill it in. So it was possible that
  non-initialized table was used.

  Trickery with using temporary memory and then doing table.swap() might work,
  but we can not guarantee that table size will be set after the data pointer.

- Mutex guard was useless, because every thread was using own mutex. Need to
  make mutex guard static so all threads are using same mutex.
2017-10-06 21:06:15 +05:00
Julian Eisel
b0ecd2eaaa Fix crash when deleting workspace active in multiple windows 2017-10-06 18:02:15 +02:00
Dalai Felinto
5ec270c20c Merge remote-tracking branch 'origin/master' into blender2.8 2017-10-06 12:21:57 -03:00
837383ac78 Cycles: Cleanup, indendation 2017-10-06 19:33:59 +05:00
a4a5637d7a Gawain: Reduce shader interface bucket size
Tried 101 but it gives colisions.
I think 257 is enough now that we dont have thousands of uniforms.
This gives some noticeable performance improvement.
Could be refined further.
2017-10-06 16:25:50 +02:00
f94f141f24 Gawain: Add UBOs to shader interface. 2017-10-06 16:25:50 +02:00
a950af8e24 Fix T53012: Shadow catcher creates artifacts on contact area
The issue was caused by light sample being evaluated to nan at some point.
This is root of the cause which is to be fixed, but is very hard to trace down
especially via ssh (the issue only happens on AVX2 release build). Will give it
a closer look when back to my AVX2 machine.

For until then this is a good check to have anyway, it corresponds to what's
happening in regular radiance sum.
2017-10-06 17:27:34 +05:00
0d3c8d0701 Cycles: Cleanup, indentation and wrapping 2017-10-06 16:54:37 +05:00
ea606a7847 Merge branch 'master' into blender28 2017-10-06 21:25:33 +11:00
3df139c530 Cleanup: Math lib naming (use v3 suffix) 2017-10-06 21:06:38 +11:00
70aa33f069 Sequencer: Cleanup, use more BLI utilities where possible 2017-10-06 15:00:22 +05:00
00eac066f3 Sequencer: Use BLI math functions where possible 2017-10-06 14:36:41 +05:00
d56f835bff Sequencer: Avoid re-calculation index offset multiple times 2017-10-06 14:36:41 +05:00
5bbe818aeb Sequencer: Use funciton instead of macr oto avoid argument re-evaluation 2017-10-06 14:36:41 +05:00
c756787694 Fix T52940: VSE Glow Effect Strip on transparent images has no blur 2017-10-06 14:36:41 +05:00
55b7adb9e5 Error in falloff_angle range in last commit 2017-10-06 20:20:15 +11:00
471be7e7f5 Vertex Paint: move normal falloff into the brush
All related settings are already in the brush,
so it's inconvenient to switch panels to change this one option.
2017-10-06 20:15:28 +11:00
6c43490616 Vertex Paint: use view normal w/ 2D falloff
When projecting to the view, cull faces pointing
away from the view normal.
2017-10-06 19:10:33 +11:00
8ef757df3d Vertex Paint: use brush front-face setting
Follow sculpt mode more closely by using the brush front-face option.
2017-10-06 18:57:37 +11:00
082987ec74 Sculpt: use tube falloff when calculating normals
Also apply 2D clamping for other tools when the option is set.
2017-10-06 18:34:05 +11:00
3282218983 Sculpt: clamp normal to plane w/ projected falloff
Allows for editing outlines w/o pushing geometry towards/away from
the view.
2017-10-06 17:38:56 +11:00
327bb6e543 Fix ruler access from search pop-up
D2831 by @1xundoredo
2017-10-06 17:13:44 +11:00
c454d816a9 Cleanup: style 2017-10-06 16:56:41 +11:00
d7d32ad452 Gawain: Simplify / optimize the shader interface.
This changes quite a few things:
- Drops the allocation of inputs as a chunk.
- Merge the linked list system into the Gwn_ShaderInput.
- Put name buffer into another memory block, easily resizable.
- Use offset instead of char* to direct to input name.
- Add only requested uniforms dynamicaly to the Shader Interface.

This drops some minor optimisation and use a bit more memory for small shaders (which are fixed count).
But this saves a lot of memory when using UBOs because the names and the Gwn_ShaderInput were alloc'ed for every UBO variable.
This also reduce the Shader Interface initial generation.
The lookup time is left unchanged.
2017-10-06 01:50:51 +02:00
9ab3db11c7 Revert "Gawain: Optimize out extra level on top of ShaderInput"
This reverts commit 5514d2df1c.
2017-10-06 01:50:16 +02:00
c82efd3276 Fix T52514: don't clear filename when dropping directory path in file browser. 2017-10-06 00:18:57 +02:00
64f8cc3e7d Fix T52998: disabled menu entries responding to key shortcuts. 2017-10-05 19:12:05 +02:00
63482a5f2e Fix T53002: Batch-Generate Previews generate empty or none image for large objects.
Camera clipping was left to default values, which won't work well for
very large (or small) objects. Now recompute valid clipping start/end
based on boundingbox of rendered data, and final location of camera.
2017-10-05 18:13:30 +02:00
4537e85584 Fix T53001: more workarounds for crash in AMD compiler with recent drivers. 2017-10-05 17:57:58 +02:00
fb99ea79f8 Code refactor: split displace/background into separate kernels, remove luma. 2017-10-05 17:57:58 +02:00
d8509b349d Sculpt Mode: 2D falloff option
This makes brush influence into a tube instead of a sphere.
It can be used along the outline of a mesh to adjust it's silhouette.

Note that all this takes advantage of changes from vertex paint,
from testing this seems useful so exposing from the brush options.
2017-10-06 01:20:31 +11:00
5514d2df1c Gawain: Optimize out extra level on top of ShaderInput
This is an internal structure, and we don't put it to a list for anything else
that hash collision resolution. No need to have dedicated entry here, saves us
from extra allocation and pointer dereference.
2017-10-05 18:38:23 +05:00
e1e452c062 Draw manager: Avoid unneeded memory malloc/free when attempting to create missing uniform 2017-10-05 17:16:37 +05:00
0b5bdc4265 Gawain: Make builtin uniform lookup to be O(1) 2017-10-05 16:19:14 +05:00
bb9b8b13e5 Gawain: Lookup uniforms and attributes from buckets
This way we reduce number of loops from look-over-all-inputs to
loop-over-collision, which is expected to be much less CPU ticks.

There is still possible optimization: use memory pool of some sort
to manage memory needed for hash entries, but that will only speedup
shader interface construction / deconstruction time.

There are also some trickery happening to speed up process even more
in the case there is no hash collisions detected when constructing
shader interface.
2017-10-05 15:46:15 +05:00
bda3e14f05 Gawain: Force hashing function to be inlined
Makes sure we don't waste CPU ticks on function call in such a time critical
area.
2017-10-05 15:46:15 +05:00
56a07ba706 Vertex Paint: apply when cursor isn't over faces
This behavior makes more sense for sculpt, less so for painting.
Restores non PBVH behavior, adding `BKE_pbvh_find_nearest_to_ray` -
similar to ray-cast except it finds the closest point on the surface.
2017-10-05 21:21:01 +11:00
0badb6c804 Cleanup: rename dist -> depth
Prepare to add code that stores distance to the ray, avoid confusion.
2017-10-05 21:09:12 +11:00
21d91de8e7 Cleanup: remove unused struct member
Merged with soc-2016-pbvh-painting, no longer needed.
2017-10-05 17:52:05 +11:00
82d6a30015 Disable cursor drawing while navigating
Was performing ray-casts in sculpt mode on every update.
2017-10-05 17:35:46 +11:00
775c773cf4 Fix sculpt secondary color missing some brushes
D2841 by @uvwxyz w/ edits
2017-10-05 12:59:22 +11:00
3c67efbbc5 Cleanup: use bool for brush checks 2017-10-05 12:59:18 +11:00
974053f7e9 Fix brush reset (missing notifier)
D2843 by @uvwxyz
2017-10-05 12:32:24 +11:00
57a93b4678 CMake: use restrict w/ gcc, not clang 2017-10-05 12:10:34 +11:00
96477be3b6 PyAPI: fast keyword parsing for bpy modules
No functional changes.
2017-10-05 10:52:18 +11:00
7cc952ac5d CMake: add -Wrestrict for GCC 2017-10-05 10:50:51 +11:00
d27ca066e7 Fix passing the same argument twice to BLI_strncpy 2017-10-05 10:50:51 +11:00
ffb190244c Fix setting the operator name in Py operator API 2017-10-05 10:50:51 +11:00
49199963bf Fix incorrect CUDA remaining time estimate after previous commit. 2017-10-04 23:25:51 +02:00
6da6f8d33f Cycles: CUDA faster rendering of small tiles, using multiple samples like OpenCL.
The work size is still very conservative, and this doesn't help for progressive
refine. For that we will need to render multiple tiles at the same time. But this
should already help for denoising renders that require too much memory with big
tiles, and just generally soften the performance dropoff with small tiles.

Differential Revision: https://developer.blender.org/D2856
2017-10-04 21:58:47 +02:00
31820d0109 Eevee : Fix T52991 2017-10-04 21:31:47 +02:00
77f300e2a9 Fix use of uninitialized memory in Cycles normal baking. 2017-10-04 21:11:14 +02:00
5bb677e592 Code refactor: zero render buffers outside of kernel.
This was originally done with the first sample in the kernel for better
performance, but it doesn't work anymore with atomics. Any benefit was
very minor anyway, too small to measure it seems.
2017-10-04 21:11:14 +02:00
12f4538205 Code refactor: use split variance calculation for mega kernels too.
There is no significant difference in denoised benchmark scenes and
denoising ctests, so might as well make it all consistent.
2017-10-04 21:11:14 +02:00
e3e16cecc4 Code refactor: remove rng_state buffer and compute hash on the fly.
A little faster on some benchmark scenes, a little slower on others, seems
about performance neutral on average and saves a little memory.
2017-10-04 21:11:14 +02:00
5b7d6ea54b Code refactor: add WorkTile struct for passing work to kernel.
This makes sharing some code between mega/split in following commits a bit
easier, and also paves the way for rendering multiple tiles later.
2017-10-04 21:11:14 +02:00
660e8e59e7 Fix T52645, T52645: AMD OpenCL compiler crash with recent drivers.
Work around the bug by reshuffling code.
2017-10-04 21:00:46 +02:00
754f5d39c5 installdeps: Fix building numpy with newer py system...
Many thanks to Jens Verwiebe for investigating and finding this fix.
2017-10-04 20:16:39 +02:00
57d7e5b6ee Fix T42489 and T52936: Loading blend with minimized window results in crash or empty screen on windows.
Reviewed By: @brecht , @sergey

Differential Revision: http://developer.blender.org/D2866
2017-10-04 11:44:22 -06:00
63c472b4f9 Merge branch 'master' into blender2.8 2017-10-04 22:18:05 +05:00
296757804c Fix error copying smoke modifier uv layer 2017-10-05 02:44:02 +11:00
9609828000 Tssst, we use USA english, not Oxford one... :P 2017-10-04 12:42:33 +02:00
a22af1a84b Fix i18n messages extraction script, and a few more UI messages... 2017-10-04 12:39:06 +02:00
b22b2c783d Fix T52982: Join operator with context override crashes Blender 2.79 2017-10-04 15:00:05 +05:00
d1dfed206b Fix T52923: Circle diameter is in fact radius 2017-10-04 18:01:53 +11:00
08f728a3e9 Cleanup: redundant casts 2017-10-04 16:52:55 +11:00
d3f0fa1277 Docs: remove outdated PyAPI guide 2017-10-04 15:57:43 +11:00
92272f56e6 PyAPI: fast keyword parsing for __import__
No functional changes.
2017-10-04 15:54:41 +11:00
728cffa9ce PyAPI: fast keyword parsing for bpy.props
No functional changes.
2017-10-04 15:13:52 +11:00
ad22d29dac Some UI/messages fixes. 2017-10-03 21:32:46 +02:00
9422db7796 Eevee: Some changes to the Render / Render layers settings panel.
- Separate the Post Processes settings into sub panel.
- Rename "Viewport Anti-Aliasing" to sampling & super-sampling as it also reduce the noise of other effects.
- Remove Temporal Anti-Aliasing toggle and make it always active unless the number of samples is 1.
2017-10-03 18:30:56 +02:00
57c323b5d3 Object Mode : Fix probe paralax display. 2017-10-03 18:30:56 +02:00
f40fa55b58 DRW: Fix Feedbackloop warning. 2017-10-03 18:30:56 +02:00
239b38cd64 CMake: avoid naming collision 2017-10-04 01:35:24 +11:00
cbe07d980c Python: bump minimum version to 3.6 2017-10-03 23:50:34 +11:00
7ae02c2ddb Cleanup: remove unused vpaint projection handle 2017-10-03 23:43:30 +11:00
a4721c0504 Weight Paint: blend smear tool 2017-10-03 23:35:30 +11:00
6a7dc3348a Vertex Paint: fix feedback loop w/ smear tool
Was reading and writing from same array,
this also makes smear thread-safe.
2017-10-03 23:07:13 +11:00
314d93838e Fix bplayer (c) 2017-10-03 12:31:51 +02:00
61d5c5a64f Fix T52981: 2D Curve shapes do not render untill extruded
Regression since 9298c53.
2017-10-03 15:29:39 +05:00
Alexander Gavrilov
7c2d5eaacb Change weigth paint accumulate mechanics to fix problems with mirroring.
Restoring weights is problematic when the stroke overlaps its mirror.
It's better to simply compute the new weight based on the saved data
rather than restoring things, and check that the change is monotonic.

This way is also closer to how things worked before the merge.
2017-10-03 12:41:37 +03:00
975ed05edb Vertex Paint: smear got wrong last-location 2017-10-03 20:19:59 +11:00
7640d5e92a Error in last commit, weight must be set for non-accumulate 2017-10-03 19:24:02 +11:00
f4b1f9b925 Vertex Paint: remove accumulate (soc-2017-vertex_paint)
This secondary accumulation option accumulated brush falloff.
The same option in image painting accumulates color
as vertex paiht 'Spray' does.

Giving this option different behavior for vertex paint seems strange.
Also this is basically increasing falloff over time.

Remove the new code, expose existing 'Spray' as 'Accumulate'
to match other paint modes.
2017-10-03 19:09:28 +11:00
2bfa061a15 Merge branch 'master' into blender2.8
Notes:

- Changes in paint_vertex.c were simple to merge, mainly related on passing
  evaluation context.

- Conflicts in EditDM and drawmesh.c are solved using code from blender2.8
  branch. Those areas are deprecated and not to be used in final release.

  However, it's possible that some reference code from master is lost, so
  keep attention when adding alpha support for vertex painting.
2017-10-03 12:59:06 +05:00
515e69999e Weight Paint: don't set weight w/ average brush
Also use 'const' for brush.
2017-10-03 18:43:18 +11:00
2b3ff61d80 Correct int division in last commit 2017-10-03 17:36:55 +11:00
6092ded127 Weight Paint: add some color blending modes
While these mostly make sense for color,
there is no harm in supporting.
2017-10-03 17:24:29 +11:00
2136942916 Eevee : Fix grid black fill. 2017-10-02 22:17:20 +02:00
2bd36338d3 Gawain : Add workaround to fix bad sync of the program_in_use flag. 2017-10-02 22:16:50 +02:00
c548c76804 Eevee : Fix ghosting from probe data when toggling "only render". 2017-10-02 20:02:21 +02:00
5f7192018e Eevee : SSR : Make sure to not apply Specular Occlusion to SSR.
This makes the metals shine more.

Previous behaviour was not correct.
2017-10-02 19:44:44 +02:00
04e4a0db0d Eevee : Probe Grid : Fix Update tagging. 2017-10-02 18:42:18 +02:00
73ab572c0a Eevee : Probe Cubemap : Fix Broken Display data. 2017-10-02 18:42:18 +02:00
21ec254ae2 Eevee : Light Grid : Init grid to black instead of world color.
This was a mistake to use world color because it introduce light bleeding on indoor environement.
2017-10-02 18:42:18 +02:00
dc327e2793 Eevee : Lamps : Change ESM default exponent.
Users are thinking that ESM are not soft because of the default value.
2017-10-02 18:42:18 +02:00
9f8bb5813b Buildbot: Re-enable cuda binaries, those should work 2017-10-02 20:24:58 +05:00
Alexander Gavrilov
88dd45e1e1 Disable multithreaded weight paint when mirroring is enabled.
Mirroring writes to the mirror vertex within the direct vertex
draw function, which violates assumptions required for processing
vertices in parallel.
2017-10-02 17:33:51 +03:00
64afba0244 Remove brush versioning (again!)
Causes crash, see c133927bb

Merging soc-2017-vertex_paint brought this back by accident.
2017-10-03 00:56:45 +11:00
8b1b7e8d10 Depsgraph: Fix/workarounf when tagging light probe for data update 2017-10-02 18:49:49 +05:00
64c1a48c50 Fix T52927: Compositor wrong scale when scale size input is connected to complex node
The issue here is that we can not read scale from socket when determining
dependent area of interest. This area will depend on current pixel. Now fall
back to more stupid but reliable thing: if scale size input is connected to some
nodes, we use the whole frame as area of interest.
2017-10-02 15:55:52 +05:00
b2a10fa615 Vertex Paint: projection options
This makes vertex paint match image painting more closely.

- Add falloff shape option sphere/circle
  where sphere uses a 3D radius around the cursor and
  circle uses a 2D radius (projected), like previous releases.
- Add normal angle option so you can control the falloff.
- Add Cull option, to paint onto faces pointing away.

Disabling normals, culling and using circle falloff
allows you to paint through the mesh.
2017-10-02 22:07:58 +11:00
9d34ae6048 Sculpt: calculate plane instead of point,normal
No functional changes.
2017-10-02 22:07:57 +11:00
1cfee60419 Cleanup: add 'sphere' to sculpt test function name 2017-10-02 22:07:57 +11:00
2a744a9f2e Cleanup: indentation, whitespace 2017-10-02 22:07:57 +11:00
deb16defd5 Math Lib: distance to AABB
Original code by @mano-wii, modified for general use.
2017-10-02 22:07:39 +11:00
ff0938870f Compositor: Fix strict compilation warnings when debug is enabled 2017-10-02 15:18:10 +05:00
f06a60c25d Compositor: Fix compilation error with debug enabled 2017-10-02 15:12:04 +05:00
04704297d2 Fix T52920: Saving Tiff Files type Blender crashes
Was only happening for 3 and 1 channel sources.
2017-10-02 13:44:13 +05:00
864a53e276 Fix gradient tool crash with recent changes
Having gesture automatic free memory isn't practical if this
has it's own allocations.

Add option not to free userdata.
2017-10-02 01:34:51 +11:00
9a6aba2a94 Vertex Paint: use squared distance test
Avoids sqrt for verts that are later ignored
2017-10-02 00:44:04 +11:00
ba67d94258 Compile fixes for MSVC:
* missing include for uint typedef
* macro syntax error

Reviewers: campbellbarton, fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D2863
2017-10-01 15:34:12 +02:00
f1e7891588 Vertex Paint: respect 'normal' option
Recent changes ignored this option.
2017-10-01 23:53:24 +11:00
f55735e533 CMake: support CUDA 9 toolkit, and automatically disable sm_2x binaries.
Fermi cards (GTX 4xx and 5xx) are no longer supported with this version, so
we can keep supporting both CUDA 8 and 9 for a while.
2017-10-01 14:14:53 +02:00
22ecea9e38 Weight Paint: restore non-spray functionality
When painting with spray disabled - we need to re-apply
on top of the original each time.

Applying the soc-2016-pbvh-painting branch removed this.
While I'd added back a simple previous weight array,
this won't work when multiple groups are painted at once.
2017-10-01 21:21:24 +11:00
9139532dc8 Buildbot: Use latest master config from buildbot 2017-10-01 10:34:04 +02:00
29ed5f301d Buildbot: Extra tweaks to packing rules 2017-10-01 10:01:45 +02:00
ca3f7021de Buildbot: Tweaks to current macOS config
Also disable CUDA binaries for now, those would need some extra work.
2017-10-01 10:00:42 +02:00
88a08ef8ad Fix weight paint Blur, Smear and Average breakage in multi-paint mode.
This is most pronounced in Auto-Normalize + Multi-Paint. Unlike
vertex paint, the weights being painted on in weight paint mode
don't necessarily correspond to the weight actually stored in
any one vertex group, and may instead be a computed aggregate.

This restores original code behavior lost in rB4f616c93f7cb.
2017-10-01 10:00:34 +03:00
3349f25502 Eevee : Add a setting for the number of indirect light bounce.
This is used to tweak the overall spread of the lighting. It is a per renderlayer setting.
2017-10-01 02:19:10 +02:00
b03aa6afce LightProbe : Fix UI : display panels. 2017-10-01 01:23:48 +02:00
e249dfd0f6 Cleanup: Remove some old pre 2.5 IPO code 2017-09-30 16:38:53 -04:00
cc772e4bca Eevee: LightGrid: Fix progressive rendering. 2017-09-30 19:37:40 +02:00
1054f65a29 Object Mode : Add probes data outlines and selectability
This required some small changes to the data display shaders so that they match the way the object mode renders them.
Strangely enough, I had to remove the normal attribute from the display code because it was being not bound as soon as I created another rendering call in object mode. The problem may be deeper but I did not have time for this so I derive the normal from the sphere pos.
2017-09-30 19:37:40 +02:00
8249e1ce5e DRWCache: Add a new regular Quad buffer. 2017-09-30 19:37:40 +02:00
49c81e234a Fix vertex paint w/ subsurf drawing
Only use alpha blending when in vertex paint mode.
2017-09-30 19:24:45 +10:00
18965905d0 Merge branch 'master' into blender2.8 2017-09-30 11:00:29 +10:00
e3546a5097 Vertex Paint minor improvement w/ smear
Note that this tool seems like it might need to be rewritten
since results are quite strange.

Projecting on the view vector gives a small improvement though.
2017-09-30 02:58:37 +10:00
a270e61b82 Fix vertex paint smear tool
Checking surrounding verts wasn't working properly.
2017-09-30 02:56:31 +10:00
41e2dbaea9 Weight Paint: accumulate support
- Clamp accumulate so it doesn't exceed brush strength.
- Was multiplying by brush strength twice.
2017-09-30 01:36:41 +10:00
d4f8e4e30c Cleanup: de-duplicate copied code w/ vertex paint 2017-09-29 23:28:54 +10:00
9298c53e4c Fix T52943: don't export curves objects with no faces to Cycles.
Also skip any objects with zero ray visibility and meshes with
zero faces.
2017-09-29 14:54:34 +02:00
d2bbd41b4e Fix Cycles OpenCL compiler error after recent changes. 2017-09-29 14:54:10 +02:00
5553037be7 Cleanup: split out tools & utils from vertex paint
paint_vertex.c was getting too big, move all code unrelated to
mode switching and modal painting into their own files.

Also replace vertex-color operators region redraw tag /w notifiers.
2017-09-29 22:26:11 +10:00
e3fe8128e4 Merge branch 'master' into blender2.8 2017-09-29 19:55:00 +10:00
5a1954a5cb Drop platform support for Solaris & AIX
These platforms didn't see maintenance in years.
This commit just removes ifdef's & cmake check.
2017-09-29 19:16:34 +10:00
04e8a09662 GNUmakefile: add back 'git pull'
Seems this was removed by accident.
2017-09-29 19:02:20 +10:00
9cba119051 Collada: export vertex-color alpha 2017-09-29 18:12:14 +10:00
823bcf1689 RNA: expose mesh vertex alpha
Note that some import/export scripts will need updating
2017-09-29 18:10:25 +10:00
288b2d0aa6 Vertex Paint: Alpha Support
GSOC 2017 by Darshan Kadu, see: D2859.

This is a partial merge of some of the features from
the soc-2017-vertex_paint branch.

- Alpha painting & drawing.
- 10 new color blending modes.
- Support for vertex select in vertex paint mode.
2017-09-29 18:06:52 +10:00
97eefc1fd9 Code cleanup: remove unnecessary buildbot code after macOS library upgrade. 2017-09-28 23:37:57 +02:00
31be6fccf8 Eevee: Probe Grid: Clear Grid buffers with world diffuse coefs.
This make sure the values displayed by the "show data" sphere are initialized.

Also this make the bounce lighting progress more apparent.
2017-09-28 21:17:57 +02:00
12f650623e Eevee: Probe Grid: Add "progressive rendering"
This gives the user a more rapid preview of what the final result will be.

The grid cells are renderer in a series of powers of two offsets.
2017-09-28 21:16:02 +02:00
c10ac1bb5c macOS: officially upgrade to 10.9 libraries from lib/darwin.
This removes a bunch of code that is no longer needed, and running
"make update" will now automatically download the new libraries.

Differential Revision: https://developer.blender.org/D2861
2017-09-28 20:53:06 +02:00
Kim Christensen
2a36ee16c1 Fix T52574: make Cycles rendered tile counter more clear.
Differential Revision: https://developer.blender.org/D2853
2017-09-28 15:18:53 +02:00
400e6f37b8 Cycles: reduce subsurface stack memory usage.
This is done by storing only a subset of PathRadiance, and by storing
direct light immediately in the main PathRadiance. Saves about 10% of
CUDA stack memory, and simplifies subsurface indirect ray code.
2017-09-28 15:18:43 +02:00
9ddee885ae Fix T52086: Graph editor "normalize" drag errors for integers 2017-09-28 17:08:43 +05:00
f6e71fe727 Merge branch 'master' into blender2.8 2017-09-28 16:19:23 +05:00
3801f76b7b Fix T52932: Driver with target of custom property from scene fails to update
Note that this is only supported in new depsgraph.
2017-09-28 16:13:28 +05:00
7fdb9e168d Merge branch 'master' into blender2.8 2017-09-28 16:13:09 +05:00
75e8e3779b Curves: Fix wrong bitset being checked against CYCLIC bit flag
Based on report from Talos Security Advisory.
2017-09-28 14:33:59 +05:00
0ae1a1ed48 CMake: move MSVC warnings to central location 2017-09-28 13:41:54 +10:00
1f18523edf Cleanup: switch fall-through warning 2017-09-28 13:41:54 +10:00
c133927bb8 Adding paint brushes crashes w/ linked libs
While we could skip this for linked files,
convention so far is to only update startup.
2017-09-28 13:41:53 +10:00
64de8c8f0d Missed in last merge from master
Local changes built, but merge-commit needed amending.
2017-09-28 07:35:06 +10:00
fcdc7acd8b Eevee : TAA : Fix conflict with outlines.
The previous view was incorrectly considered valid even if the persp matrix was different. So the history depth was mismatching.
2017-09-27 21:21:39 +02:00
b24ba9b174 Object Mode Engine: Small cleanup 2017-09-27 21:21:39 +02:00
40f5ac4977 Eevee : TAA : Change post process chain to allow more flexibility
This basically do not use hardware blending and do the blending in the shader.
This will allow neighborhood clamping if we ever implement that.
2017-09-27 21:21:39 +02:00
88a3323a47 Eevee: Use fmod instead of floor. 2017-09-27 21:21:39 +02:00
5c6e3ff497 bgl module: extend gl_buffer_type_from_py_format_char function to work with more string formats
Only basic types of character codes were being used
2017-09-27 16:07:06 -03:00
cc8c064f11 Merge branch 'master' into blender2.8 2017-09-28 03:05:46 +10:00
5d23448290 [build_deps.cmd] Turn down logging verbosity to normal. 2017-09-27 10:54:27 -06:00
58f3f9c246 [msvc] treat C4133 as error instead of a warning to mimic gcc's -Werror=incompatible-pointer-types
as requested by @campbellbarton and @mano-wii
2017-09-27 10:11:00 -06:00
6c98859b77 Cleanup: warning 2017-09-28 02:04:58 +10:00
Dalai Felinto
16edfc516e --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.
2017-09-27 18:03:00 +02:00
4f616c93f7 Vertex/Weight Paint: Use PBVH for painting
2016 GSOC project by @nathanvollmer, see D2150

- Mirrored painting and radial symmetry, like in sculpt mode.
- Volume based splash prevention,
  which avoids painting vertices far away from the 3D brush location.
- Normal based splash prevention,
  which avoids painting vertices with normals opposite the normal
  at the 3D brush location.
- Blur mode now uses a nearest neighbor average.
- Average mode, which averages the color/weight
  of the vertices within the brush
- Smudge mode, which pulls the colors/weights
  along the direction of the brush
- RGB^2 color blending, which gives a more accurate
  blend between two colors
- multithreading support. (PBVH leaves are painted in parallel.)
- Foreground/background color picker in vertex paint
2017-09-28 01:47:37 +10:00
2de5e14f53 bgl module: Interpret a buffer as a bgl.Buffer
Differential Revision: https://developer.blender.org/D2857
2017-09-27 11:20:00 -03:00
88520dd5b6 Code refactor: simplify CUDA context push/pop.
Makes it possible to call a function like mem_alloc() when the context is
already active. Also fixes some missing pops in case of errors.
2017-09-27 13:43:21 +02:00
32e453b495 D2830 - 2.8: Fix crash when creating new action
Patch by: Marcelo Mutzbauer (1xundoredo)
2017-09-27 14:16:27 +13:00
9bd40cbce1 Merge branch 'master' into blender2.8 2017-09-27 11:18:23 +10:00
43b4913051 Math Lib: Add non-clamped round_* functions
Replace iroundf with round_fl_to_int, add other types
2017-09-27 11:13:03 +10:00
a24dd6eaba Eevee: Fix bug with cubemap shadows. 2017-09-26 22:30:48 +02:00
540ef7ee8e Eevee: Fix broken World probe. 2017-09-26 21:43:14 +02:00
c1aca25c3b Eevee: TAA: Remove 32 sample limit. 2017-09-26 21:39:25 +02:00
b96c70f9b2 BLI_rand : Make use of BLI_halton and BLI_hammersley 2017-09-26 21:38:23 +02:00
47e6d53c8a BLI_rand : Add new low-discrepency sequences generator 2017-09-26 20:54:27 +02:00
5c45fe2937 Eevee : Fix regression : Refraction not working 2017-09-26 16:48:07 +02:00
772944a6b4 Merge branch 'master' into blender2.8 2017-09-27 00:24:10 +10:00
870dfb1b5a Cleanup: indentation 2017-09-27 00:17:28 +10:00
51c87bbad0 Cleanup: indentation 2017-09-27 00:05:06 +10:00
7593ac2aff Transform: add manipulator aligned bounds
ifdef'd out for now
2017-09-26 23:16:20 +10:00
d6800c1a81 Merge branch 'master' into blender2.8 2017-09-26 22:45:42 +10:00
482b665e02 Cleanup: remove bounds runtime data from scene 2017-09-26 22:33:25 +10:00
30f9cd710b GPUFramebuffer: Enable multisample when binding a Multisample FBO
For some reason it was not working on intel but was working on Nvidia.
2017-09-26 14:01:50 +02:00
496a354d7f DRW : Fix Compiler Warning 2017-09-26 13:59:31 +02:00
f853e724de Eevee : Fix compilation warning on intel. 2017-09-26 13:58:59 +02:00
1eb49f8a2f GPU_immediate_util: add cube drawing function 2017-09-26 17:51:47 +10:00
63dfb5bb97 Cleanup: naming (GPU immediate util) 2017-09-26 15:21:01 +10:00
86b81d25ea Missed from merge commit 2017-09-26 14:57:14 +10:00
24b083c8f3 Merge branch 'master' into blender2.8 2017-09-26 14:52:21 +10:00
aba2f8ea67 Beauty fill was skipping small faces 2017-09-26 12:59:23 +10:00
e40e29cd38 Fix T52871: beauty fill error
Only lock tri's facing different directions.
Needed because scanfill creates zero area faces.
2017-09-26 12:14:46 +10:00
293dc4e084 Revert "Fix T52871: BLI_polyfill_beautify_quad_rotate_calc_ex was mistakenly considering the state as degenerated"
This reverts commit a8f11f5422.

Result is no longer symmetrical, will investigate a different fix.
2017-09-26 12:14:04 +10:00
262ddbfda0 Add missing header 2017-09-26 12:14:04 +10:00
96e84d002a Fix T52901: New Depsgraph - Driver using "self" needs reloading file to work 2017-09-26 13:29:48 +13:00
b0ccf2322b Fix: When transforming GP strokes in "Local" mode, the strokes would get obscured
by the transform constraint lines

Ported over e7395c75d5 from the
greasepencil-object branch. I should've fixed this ages ago, but
couldn't figure out why at the time.
2017-09-26 13:00:38 +13:00
e8a0812a3b deps libs: fix xiph library support on sndfile on macOS 2017-09-26 02:17:39 +03:00
3ae0be45f1 Eevee: Implement Temporal Anti Aliasing / Super Sampling
This adds TAA to eevee. The only thing important to note is that we need to keep the unjittered depth buffer so that the other engines are composited correctly.
2017-09-25 20:14:42 +02:00
198c7d3687 DRW : Add new view_update mechanism.
This makes updates for the viewport cleaner and also add the possibility to add a new callback called when the scene is updated.
2017-09-25 20:14:42 +02:00
98dd2a518b Eevee: Fix SSR in orthographic view.
The problem was that orthographic views can have hit position that are negative. Thus we cannot encode the hit in the sign of the Z component.

The workaround is to store the hit position in screenspace. But since we are using floating point render target, we are loosing quite a bit of precision.
TODO: use RGBA16 instead of RGBA16F. But that means encoding the pdf value somehow.
2017-09-25 20:14:42 +02:00
00955d8d7a DRW : Add AA to non meshes objects.
You can change the amount of samples in the user preferences. You do not need to restart blender to see the effect in the new viewport.

This adds another Multisample Framebuffer and textures (so even more memory required).

It works by blitting the default_fb to the multisample_fb each time the renderer need to render one or more "wire" pass.
It it then blit back to the default_fb so that the rest of pipeline is working as expected.

We COULD lower the GPU memory / bandwidth usage to render everything to the same multisample fbo and change the logic depending on if MSAA is enabled or not, but I think it's a bit too much work for now.
2017-09-25 20:14:42 +02:00
709315a0d7 GPUTexture : Fix Bind/Unbind function so it works with multisample textures. 2017-09-25 20:14:42 +02:00
2a7b747f18 GPUFramebuffer: Fix Blit function so that it works with multisample textures. 2017-09-25 20:14:42 +02:00
e615724221 Fix compilation error after recent merge 2017-09-25 19:02:30 +05:00
98ba302f70 Merge branch 'master' into blender2.8 2017-09-25 18:57:43 +05:00
675cef0a16 Fix T52835: When driven IK influence change, ik animation have 1 frame delay 2017-09-25 18:48:55 +05:00
ce54d25fa9 Fix T52865: Improve wording of error message when saving packed images fails
Make it clear that the packed file could not be saved back out to disk
at the specified path (e.g. destination directory doesn't exist).
2017-09-26 01:25:18 +13:00
0d4e519b74 OpenVDB: Fix compilation error against OpenVDB 4
One crucial thing here: OpenVDB shoudl be compiled WITHOUT
OPENVDB_ENABLE_3_ABI_COMPATIBLE flag. This is how OpenVDB's Makefile is
configured and it's not really possible to detect this for a compiled library.

If we ever want to support that option, we need to add extra CMake argument and
use old version 3 API everywhere.
2017-09-25 14:44:17 +05:00
1d8aebaa09 Add an 'atomic cas' wrapper for pointers.
Avoids having to repeat obfuscating castings everywhere...
2017-09-25 10:40:50 +02:00
01a3c6b204 Tweak to fix for thread concurency in looptri generation.
Even if pointer assignment may be atomic, it does not prevent reordering
and other nifty compiler tricks, we need a memory barrier to ensure not
only that transferring pointer from wip array to final one is atomic,
but also that all previous writing to memory are “flushed” to
(visible by) all CPUs...

Thanks @sergey for finding the potential (though quite unlikely) issue.
2017-09-25 09:56:02 +02:00
cb6f07f59e Cycles: Cleanup, indentation 2017-09-25 11:15:54 +05:00
1c5f5fb95f Mirror Modifier: option to offset UV's
Useful for baking, so UV's can be moved outside the image
and not used to bake pixels (but still used for display).

D2801 by @Zuorion
2017-09-25 14:11:27 +10:00
4e15eddb52 Fix T52890: Crash unlinking sequencer sound 2017-09-25 10:28:17 +10:00
a8f11f5422 Fix T52871: BLI_polyfill_beautify_quad_rotate_calc_ex was mistakenly considering the state as degenerated 2017-09-23 12:59:02 -03:00
Julian Eisel
76444a13c3 Splash: Increase contrast of build info text
Now uses "Text Selected" theme color of "Menu Back" widget colors. Also
repositioned text slightly to have same margin on top and right (measured
by eye ;) ).
Tested with all bundled themes (contrib and no-contrib) and worked fine.

Considering that different splashes may need different colors for
overlaid text, using theme color may not be the best solution. I would
like to try how this works before adding an ugly way to force a certain
text color though.
Also tried different approaches, but this one I find the least ugly :S

As far as longer term plans go, we wanted to get a redesigned multi-page
splash screen anyway. At this point we can rethink how splash colors work
in general (i.e. auto-contrast, own splash theme colors, etc).
2017-09-23 16:02:25 +02:00
c0480bc972 Cycles: Fix compilation error of OpenCL megakernel on Apple 2017-09-23 17:07:19 +05:00
b460b8fb4a Cycles: Fix compilation error of megakernel on NVidia device
It is more readable to explicitly compare to NULL anyway.
2017-09-23 17:03:02 +05:00
874062b6ab Tracking: Followup to previous fix, need to remap frame number for sequence tracking 2017-09-23 16:18:27 +05:00
92aff05a7c Tracking: Cleanup, reuse existing variable 2017-09-23 16:16:22 +05:00
d430c462a3 Fix T52851: Per-frame traking is broken when sequence doesn't start at frame 1 2017-09-23 16:13:23 +05:00
840cce840e Tracking: Fix crash when tracking failed
Was a dangling pointer to a freed memory left behind.
2017-09-23 16:07:32 +05:00
dc86b7a4b5 Remove remaining qtcodecdata
This fixes a mistake in rBefd5e3c25401b43cbd7f909418835bb570db1ab3
2017-09-22 17:13:46 -04:00
efd5e3c254 Remove quicktime support
It has been deprecated since at least macOS 10.9 and fully removed in 10.12.

I am unsure if we should remove it only in 2.8. But you cannot build blender with it supported when using a modern xcode version anyway so I would tend towards just removing it also for 2.79 if that ever happens.

Reviewers: mont29, dfelinto, juicyfruit, brecht

Reviewed By: mont29, brecht

Subscribers: Blendify, brecht

Maniphest Tasks: T52807

Differential Revision: https://developer.blender.org/D2333
2017-09-22 16:40:05 -04:00
0e802fabb4 [cmake/deps_builder] update openjpeg to 1.5.2 to match the version in master/extern , add support for openjpeg in oiio. Mark webp as an optional component. 2017-09-22 13:57:21 -06:00
925f2c8b9d Fix T52875: install_deps.sh - numpy-1.13.1.tar.gz - 404 Not Found. 2017-09-22 18:56:37 +02:00
f2ea8e217b Object Mode : Add Outline FXAA
Adds a FXAA for smoothing out the extracted outlines.
The Post Process Anti Aliasing is only done on the Alpha channel of the outlines.
Because of that we need to add bleed the outline color out of the silouhette so the AA'd alpha can blend the right color and not pick black when the alpha is smoothed out of the silhouette.

Also because of the AA needs to have clear contrast to work with, I decided to ditch the "bluring" or the occluded outlines.

The FXAA adds an overhead of 0.17ms but we gain back 0.22ms * 4 = 0.88ms by removing the blur.

The FXAA Implementation is from Corey Richardson (cmr) (D2717). I had to modify it a bit to only filter the alpha channel.
2017-09-22 17:31:40 +02:00
128c7c3ba1 Merge branch 'master' into blender2.8 2017-09-22 13:26:49 +05:00
f320d0e0a8 Fix T52840: New Depsgraph - Mask editor not working correctly 2017-09-22 13:23:21 +05:00
225e52eaf8 Edit Mesh Mode : Fix GLSL compilation errors 2017-09-22 03:44:06 +02:00
56fd75c856 Edit Mesh Mode: Put AntiAliasing #define into shader include header. 2017-09-22 02:44:40 +02:00
1a4a1447b7 Edit Mesh Mode: Add a facing falloff effect
This let the user keep track of the shape by fading the center of the object.
An Opacity parameter is yet to be added.
2017-09-22 02:44:40 +02:00
406427bd4e Object Mode: Fix outline getting darker during expand steps. 2017-09-22 02:44:40 +02:00
02cd48a087 Edit Mode : Bias Face dot position 2017-09-22 02:44:40 +02:00
4bfa3f4f9b Edit Mesh Mode : Make line smoother.
This introduce some little artifacts on the border of edges because some pixel with very low opacity does not get discarded and then occlude the face rendered behind if it has not been drawn yet.
To fix this. I added an offset in the geometry shader for the edge fixup. This make the artifact only visible on the border of the object if there is a very dense wire region. It's only visible in edge select mode since vertex and face center also hides the artifacts.

We can enable this only if AA is enabled but for now it's always enabled.
2017-09-22 02:44:39 +02:00
b3b3c6d8ae build deps: add support for multiple xcode installs 2017-09-21 23:54:17 +03:00
07ec0effb6 Code cleanup: simplify kernel side work stealing code. 2017-09-21 22:29:18 +02:00
01dfaac77b [cmake_deps/msvc] Move llvm/clang harvest to their individual cmake files. 2017-09-21 13:10:55 -06:00
78345a46c1 deps build: add openjpeg to OIIO 2017-09-21 22:09:52 +03:00
e4f05df206 First development splash screen for Blender 2.8
Introducing a new header using the Blender socket logo,
commit of the source file will follow soon.

Splash committee: Ton Roosendaal, Dalai Felinto, Pablo Vazquez.

Artwork is a screenshot of 'Wanderer', an Eevee sample file
by Daniel Bystedt, available on blender.org (license: CC-BY-SA)
2017-09-21 20:30:28 +02:00
73e1435ab1 DRW: Fix regression
Textures were bound once. But since it was not unbound it's bind_num would not change and considered still bound next time a shader needed it.

Fix T52866
Fix T52855
2017-09-21 19:54:43 +02:00
d97f52f015 Revert "Fix T52855: Eevee: viewport artifacts"
This reverts commit 803c757c2b.
2017-09-21 19:43:53 +02:00
9775c4d68b [cmake_deps/msvc] Move boost harvest to boost.cmake 2017-09-21 11:16:52 -06:00
15ab0e6ddc [cmake/builddeps] update for site-packages on windows to support the new requests version. 2017-09-21 10:16:40 -06:00
Dalai Felinto
803c757c2b Fix T52855: Eevee: viewport artifacts
Partial revert of 9068c0743e.
This commit tried to do two things:

(1) Fix UBO binding logic [good]
(2) "Improve" texture binding logic [bad]

Don't ever mix different fixes and refactors in the same commit.
2017-09-21 17:41:39 +02:00
4808c488c5 CMake: Add extra requests dependencies
Apparently, we already had some code to deal with this. So for now just
added some extra dependencies needed for latest requests.
2017-09-21 18:53:02 +05:00
0c82a6fec8 Cleanup: unused define 2017-09-22 07:23:03 +10:00
Dalai Felinto
a99c64b12f Eevee: Fix wrong MEM_callocN allocation size 2017-09-21 15:52:51 +02:00
Dalai Felinto
9ad2c0b615 Depsgraph and collection enable/visibility
Iterate over invisible objects too, so lamps can still lit the scene.
Also, now you can use a collection to set an object to invisible, not
only to visible.

For example:
Scene > Master collection > bedroom > furniture
Scene > View Layer > bedroom    (visible)
                   > furniture  (invisible)

The View Layer has two linked collections, bedroom and furniture.
This setup will make the furniture collection invisible.

Note: Unlike what was suggested on D2849, this does not make collection
visibility influence camera visibility. I will keep this as a separate
patch.

Reviewers: sergey

Subscribers: sergey, brecht, fclem

Differential Revision: https://developer.blender.org/D2849
2017-09-21 14:45:08 +02:00
77377f0ea8 Depsgraph: Fix bug introduced by wrong merge conflict resolution 2017-09-21 16:09:49 +05:00
f5aa50853c 3D Text: Make Ctrl Backspace/Del delete words
Matches text-editor, console & text-button.
2017-09-21 20:43:49 +10:00
806bc55a34 Fix T52860: 3D Text crashes w/ Ctrl Backspace 2017-09-21 19:14:04 +10:00
50b9d1d019 Install_deps: Raise python and numpy versions (to 3.6.2 and 1.13.1 respectively). 2017-09-21 09:59:07 +02:00
e0f68e5d22 deps build: use pip to install requests 2.18.4 and it's deps 2017-09-21 09:33:00 +03:00
0c019a3ffc Fix T50450: Breakdowner doesn't work in Tweak Mode on translated NLA Strips 2017-09-21 17:38:30 +12:00
fde45132de Fix T52861: Keymap editor filter doesn't show shortcuts using "+" 2017-09-21 16:35:47 +12:00
26f98446b1 fix T52831 removed enforcement of matrix decomposition when animations are exported 2017-09-21 00:06:11 +02:00
a3b8f98913 revert commit c0a7e9b631 because it did not work as expected 2017-09-21 00:04:10 +02:00
c0a7e9b631 D2777: allow blank lines and lines with spaces/tabs in cut/paste 2017-09-20 22:48:38 +02:00
78c2242db5 Revert "Fix T52792: Typo in UI label of a HairInfo node socket."
This reverts commit 8ad479a322.
2017-09-20 22:06:23 +02:00
Stefan Werner
549c4bec9d Added extra "const" to satisfy the strict clang version in Xcode 9 2017-09-20 21:50:30 +02:00
Stefan Werner
ee30a4381f Added extra "const" to satisfy the strict clang version in Xcode 9 2017-09-20 21:47:45 +02:00
8ad479a322 Fix T52792: Typo in UI label of a HairInfo node socket. 2017-09-20 21:06:33 +02:00
692631551f [cmake/msvc] Update python to 3.6 + numpy to 1.13.1 2017-09-20 12:51:36 -06:00
25f28d348f Fix T52852: Assert in looptri calculation after recent changes.
Wrong condition in asserts...
2017-09-20 20:46:51 +02:00
c5491ba874 [cmake/depsbuilder/msvc] Update to python 3.6 / numpy 1.13.1
-No more hardcoded python35/36 tokens in the scripts
-disabled python module for boost, was not used
-Updated patches for python to support building with msvc2013
2017-09-20 12:31:40 -06:00
98d797b67c Fix missing ID remapping in Action editor callback.
Spotted by Joshua Leung (@aligorith), thanks!

Should probably be backported to 2.79a should we do it.
2017-09-20 20:26:40 +02:00
18a353dd24 Fix T52368: Cycles OSL trace() failing on Windows 32 bit. 2017-09-20 19:38:08 +02:00
14223357e5 Fix T52853: harmless Cycles test failure in debug mode. 2017-09-20 19:38:08 +02:00
90d4b823d7 Cycles: use defensive sampling for picking BSDFs and BSSRDFs.
For the first bounce we now give each BSDF or BSSRDF a minimum sample weight,
which helps reduce noise for a typical case where you have a glossy BSDF with
a small weight due to Fresnel, but not necessarily small contribution relative
to a diffuse or transmission BSDF below.

We can probably find a better heuristic that also enables this on further
bounces, for example when looking through a perfect mirror, but I wasn't able
to find a robust one so far.
2017-09-20 19:38:08 +02:00
095a01a73a Cycles: slightly improve BSDF sample stratification for path tracing.
Similar to what we did for area lights previously, this should help
preserve stratification when using multiple BSDFs in theory. Improvements
are not easily noticeable in practice though, because the number of BSDFs
is usually low. Still nice to eliminate one sampling dimension.
2017-09-20 19:38:08 +02:00
b3afc8917c Code cleanup: refactor BSSRDF closure sampling, for next commit. 2017-09-20 19:38:08 +02:00
d029399e6b Code cleanup: remove SOBOL_SKIP hack, seems no longer needed. 2017-09-20 19:38:08 +02:00
d750d182e5 Code cleanup: remove hack to avoid seeing transparent objects in noise.
Previously the Sobol pattern suffered from some correlation issues that
made the outline of objects like a smoke domain visible. This helps
simplify the code and also makes some other optimizations possible.
2017-09-20 19:38:08 +02:00
8289b47e3a Fix Cycles test report not closing files properly. 2017-09-20 19:12:26 +02:00
f54f680a26 Fix T52842: Incorrect description for bpy.types.MeshTextureFace.uv
Tweak rna_info module to generate valid info also for multi-dimensional arrays.
2017-09-20 16:40:11 +02:00
942c5997c1 Expose multi-dimensional array data in properties' introspection data.
Required to generate valid doc for such arrays!
2017-09-20 16:40:11 +02:00
c4bbf1e4b0 Fix rna_info.py module, broken by recent changes in bpy.types presumably.
Hope fix is OK, seems to work with API generation script at least.
2017-09-20 16:40:11 +02:00
adb647fb92 UI: fullstop at end of tooltips
Allows for multiple sentences not to look strange.
Convention not to include in RNA remains.
2017-09-20 23:59:26 +10:00
Dalai Felinto
f2db6cefa0 Layer collection enable flag
Right now this is exposed in the outliner, though all this
(visible/selectable/enable) should be moved to a new panel soon.

This removes objects from the depsgraph when the collection is disabled.

It allows you to "hide" lamps but still having them lighting the scene.
Same for light probes and other support objects.

Pending tasks:

* Have depsgraph to include invisible objects in the DEG_OBJECTS_ITER, and
then have Eevee and other engines to make a distinction between an
invisible and a visible object.

(for example, we probably want invisible objects to not show in the
viewport, but cast shadows and show up in light probes).

* Change how we evaluate collection settings so that an invisible
collection can force an object to be invisible.

Reviewers: campbellbarton

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2848
2017-09-20 14:15:35 +02:00
99c9f17098 deps build: correct sndfile fix 2017-09-20 13:20:23 +03:00
42c174d1a5 Manipulator: fix visibility check w/ 2-axis planes 2017-09-20 18:33:43 +10:00
31fc75ef93 Cleanup: move 3d manipulators into an array 2017-09-20 17:47:34 +10:00
851228766e Merge branch 'master' into blender2.8 2017-09-20 16:10:40 +10:00
a2d246c5c0 BLI_polyfill2d_test: script to generate test data 2017-09-20 13:40:30 +10:00
77dccbf481 deps build: fix sndfile building on macOS 2017-09-20 00:08:32 +03:00
46300a541d macOS: use python version 3.6 when building blender 2017-09-20 00:07:56 +03:00
c87c1ec1da deps build: bump Python to 3.6.2 and Numpy to 1.13.1 2017-09-20 00:04:23 +03:00
f680e42a4c Correct test ifdef in polyfill 2017-09-20 04:57:48 +10:00
16355d545b Fix T52834: Polyfill2D fails with co-linear edges 2017-09-20 04:29:04 +10:00
c4235356c9 BLI_polyfill2d_test: add test for T52834
Commented since it currently fails.
2017-09-20 03:40:13 +10:00
e00bb4d22c BLI_polyfill2d_test: Try flipped x/y axis
In T52834 this makes a difference.
2017-09-20 03:35:06 +10:00
869f0a840f Merge branch 'master' into blender2.8 2017-09-19 13:59:37 -03:00
98ea79cfde transform_snap_object: simplify IGNORE_BEHIND_RAY
`depth_get` is called in most of the time. So not worth going through so many conditions
2017-09-19 13:57:59 -03:00
e2e8f4b9e1 Audaspace: removing old device backend names. 2017-09-19 18:08:42 +02:00
af170839af Merge branch 'master' into blender2.8 2017-09-19 21:08:14 +05:00
b31faac17e Depsgraph: Fix wrong flag being assigned 2017-09-19 20:55:15 +05:00
96ce50449c Fix T52733 Percent mode for Bevel sometimes had nans.
Forgot some initialization.
2017-09-19 09:39:11 -04:00
3241905f40 Fix T52818: Tangent space calculation is really slow for high-density mesh with degenerated topology
Now we replace O(N^2) computational complexity with O(N) extra memory penalty.
Memory is much cheaper than CPU time. Keep in mind, memory penalty is like
4 megabytes per 1M vertices.
2017-09-19 17:50:09 +05:00
2dab6f499c Mikkspace: Cleanup, reduce indentation level 2017-09-19 17:50:09 +05:00
9591b5f618 Fix T52816: regression can't open file in 2.79 (crash).
Tentative fix, since I cannot reproduce thenissue for some reason here
on linux.

Core of the problem is pretty clear though, thanks to Germano Cavalcante
(@mano-wii): another thread could try to use looptris data after worker
one had allocated it, but before it had actually computed looptris.

So now, we use a temp 'wip' pointer to store looptris being computed
(since this is protected by a mutex, other threads will have to wait on
it, no possibility for them to double-compute the looptris here).

This should probably be backported to 2.79a if done.
2017-09-19 14:00:49 +02:00
1a4442b3db Fix T52823: New Depsgraph - Shrinkwrap crashes blender
The issue was caused by threading conflict around looptris: it was possible
that DM will return non-NULL but non-initialized array of looptris.

Thanks Campbell for second pair of eyes!
2017-09-19 16:12:05 +05:00
495d3c8dd7 CMake: update for renamed headers 2017-09-19 20:26:07 +10:00
7b95243240 BLI_utildefines_iter: Use for iteration helpers 2017-09-19 20:22:24 +10:00
60956397ca Cleanup: BLI_utildefines prefix for header-only libs
This allows to have different macro headers without them sharing
similar names to regular C modules.
2017-09-19 20:16:05 +10:00
215651af1b Boolean Modifier: add debug options
Only show & use when running in debug mode.
2017-09-19 18:29:52 +10:00
7177e0ac3e Fix T52811: At any framerate selected, video exported with 1000fps 2017-09-19 11:31:03 +05:00
36f5972ed0 Avoid bias when calculating quad split direction
Some error checks weren't being done in both directions
when calculating the best split direction for a quad.
2017-09-19 15:10:52 +10:00
9a2f7dd77b Correct recent error in boolean quad split check 2017-09-19 14:25:37 +10:00
2cdc2f2a25 Fix compiler warning 2017-09-19 16:20:51 +12:00
bb4a12914f Add some security checks against future bad float UIprecision values.
This commit and previous one should be backported to 2.79a should we
release it.
2017-09-18 20:04:27 +02:00
785e96a11d Fix (irc-reported by @sergey) invalid precision value in a float RNA property.
Maximum allowed UI float precision value is 6 (which means 7 digits).

Will change code checking on that in next commit.
2017-09-18 20:04:27 +02:00
d486b17088 [cmake/dependencies] Update libsndfile to 1.0.28 2017-09-18 10:54:37 -06:00
Dalai Felinto
f84448d4a0 Fix T52813: Audaspace: Leak when loading factory settings
Patch by Joerg Mueller (neXyon) with some touchups by me.
2017-09-18 16:16:03 +02:00
533ec46efb Merge branch 'master' into blender2.8 2017-09-18 23:56:19 +10:00
d0344d7b7d Cleanup: use clamped rounding functions 2017-09-18 23:55:41 +10:00
c4fc9c4a8e Math Lib: clamped rounding utility functions 2017-09-18 23:55:41 +10:00
ad80bfdab9 Merge branch 'master' into blender2.8 2017-09-18 18:10:39 +05:00
a6b156bf57 Color management: When look is applied, we can not consider spaces to match
This should fix T52812 after merge to blender2.8.
2017-09-18 18:09:53 +05:00
e6d5b94e83 Correct error in cage2d draw style enum 2017-09-18 23:02:27 +10:00
Dalai Felinto
d370e6c3ea Merge remote-tracking branch 'origin/master' into blender2.8 2017-09-18 14:44:44 +02:00
d0d9360a66 Fix T52800: fix UI flickering with Mesa on Linux.
Use triple buffer by default now on all platforms, remaing ones where:
* Mesa: seems to have been working well for a long time now, and not using
  it gives issues with the latest Mesa 17.2.0.
* Windows software OpenGL: no longer supported since OpenGL 2.1 requirement
  was introduced.
* OS X with thousands of colors: this option was removed in OS X 10.6, and
  that's our minimum requirement.
2017-09-18 13:19:48 +02:00
4c1ee47707 Merge branch 'master' into blender2.8 2017-09-18 15:54:56 +05:00
ab9079f459 Fix Cycles adaptive compile without volumes broken after recent changes.
Differential Revision: https://developer.blender.org/D2847
2017-09-18 12:52:32 +02:00
6bf3dfbcdb Fix T52801: reload scripts causes Cycles viewport render crash. 2017-09-18 12:52:32 +02:00
c622533fa0 Fix T52432: Blender crashes while using Ghost (new depsgraph) 2017-09-18 15:50:27 +05:00
a0e7dbc66d BMesh: move bridge tools stepping logic into macro
Also use floor division since regular division was giving a bias
on negative error values.
2017-09-18 13:18:54 +10:00
990515a5a7 Math Lib: add divide_floor_i
Integer division that floors on negative output (like Python's).
2017-09-18 13:18:50 +10:00
9134529b9e UI: avoid int cast before clamping number input
Values outside int range would overflow.
2017-09-17 18:00:13 +10:00
d7204aed95 Cleanup: SGI format, remove unused struct members 2017-09-17 18:00:08 +10:00
829916f4e5 Fix SGI foramt reader CVE-2017-2901
Integer Overflow Code Execution Vulnerability.

Reader no longer crashes on corrupt images (from own fuzz testing).
2017-09-17 16:30:34 +10:00
b884188f8a Cleanup: SGI format, avoid overflow
Harmless but causes warnings
2017-09-17 16:30:34 +10:00
a72e609204 Cleanup: SGI format, use uint/short/char types 2017-09-17 16:30:34 +10:00
Hristo Gueorguiev
6798a061b7 Cycles: Fix compilation error with OpenCL split kernel 2017-09-16 12:33:03 +02:00
a850d74312 Fix T51074: Boolean modifier inverts operation
Support for negative scaled objects.
2017-09-16 18:12:24 +10:00
d09c429e30 Fix writing Iris images w/ invalid header
Regression in e142ae77ca
2017-09-16 16:09:02 +10:00
9068c0743e DRW: Fix Ubo binding logic and improve Texture binding logic
Ubo needs to be rebound every times the shader changes.
This simplify the logic a bit.

Also modify texture binding logic to potentially reuse more already bound textures.
2017-09-16 02:16:55 +02:00
7c8e87fc52 Fix T52384: Bridge pair result depends on other loops
When 2x loops have different number of vertices,
the distribution for vertices fan-fill depended on the loop order
and was often lop-sided.

This caused noticeable inconstancies depending on the input
since edge-loops are flipped to match each others winding order.
2017-09-16 05:15:09 +10:00
f565d8c4ae Eevee: Fix T52738: Probes are black.
This fix the crappy binding logic.

Note the current method is doing a lot of useless binding. We should somewhat order the texture so that reused textures are already bound most of the time.
2017-09-15 20:09:09 +02:00
208d6f28c8 Merge branch 'master' into blender2.8 2017-09-15 14:19:22 -03:00
14eadf55fd RNA: expose RegionView3D clip planes 2017-09-15 13:55:52 -03:00
4fae536f60 Merge branch 'master' into blender2.8 2017-09-15 22:44:07 +10:00
378b74f025 Docs: only show versions in changelog side-bar 2017-09-15 22:20:14 +10:00
ec784b06ee Docs: update API changelog to 2.79 2017-09-15 22:06:23 +10:00
1a9217e222 Fix T52763: Boolean problem with vertex group 2017-09-15 16:33:52 +05:00
0c5ff0e558 GPUCodegen: Fix for loop overflow.
Fix asan error.
2017-09-15 11:42:53 +02:00
d120780fed BMesh: use less involved check for edge rotation
Was using function for edge rotation which was doing unnecessary checks
Use the face normal and BLI_polyfill_beautify_quad_rotate_calc directly.
2017-09-15 18:19:04 +10:00
c594087488 Polyfill Beautify: option to rotate out of degenerate state
Needed for 3D iterative edge-rotation to avoid flipping when projected
from different angles,
but could keep zero area faces in 2D polygons.
2017-09-15 18:14:17 +10:00
fdb8e17936 Fix error in recent boolean changes w/ quad split 2017-09-15 18:08:24 +10:00
028c5592cd Merge branch 'master' into blender2.8 2017-09-15 12:35:20 +05:00
8b3ad25862 Transform: Enable recursion dependency check for new depsgraph 2017-09-15 12:25:57 +05:00
95a8e73d40 Fix copy-paste error in recent particles fix
Was intersecting same triangle twice.
2017-09-15 11:35:24 +05:00
2aa2bec43a Fix T52442: bl_app_templates_system not working
Portable builds LOCAL files need to be
treated as system instead of using as a fallback to USER templates.
2017-09-15 05:57:37 +10:00
909da553e3 Fix bpy.utils.resource_path('SYSTEM') output
Would return the test path for developer builds:
{blender-dirname/release}

Now return an empty string when no path is found.
2017-09-15 05:47:23 +10:00
c75bd25cd8 Fix T52732: Particle system volume grid particles out of volume
Use more watertight and robust intersection test.

It uses now ray to triangle intersection, but it's all fine because segment was
covering the whole bounding box anyway.
2017-09-14 19:50:02 +05:00
3c1c3b64c5 Fix T52729: Decimals not showing over 100m or 100 feet
Use same 5 digits precision as we already use for e.g. Object's
location, for Object's dimensions too.

To be backported to 2.79a, should we do it.
2017-09-14 16:35:28 +02:00
a22590a62c Fix T52537: Dyntopo "detail flood fill" doesn't work in some cases
Mainly when object origin is not at the geometry bounding box center.

Seems to be straightforward to fix, hopefully it doesn't break some obscure case
where this was a desired behavior.
2017-09-14 18:56:16 +05:00
fc7ac0bc49 Correct error in last commit 2017-09-14 23:04:01 +10:00
8c21003248 Fix T52748: Select shortest face path fails 2017-09-14 23:01:07 +10:00
7aafa32c09 Fix T51416: Blender Crashes while moving Sliders
The issue here was that removing datablock from main database will poke editors
update, which includes buttons context to free users of texture. Since Cycles
will free datablocks from job thread, it might crash Blender since main thread
might be in the middle of drawing.

Solved by exposing extra arguments to bpy.data.foo.remove() which indicates
whether we want to perform ID user count and interface updates. While scripts
shouldn't be using those normally, this is the only way to allow Cycles to skip
interface update when removing datablock.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2840
2017-09-14 17:03:40 +05:00
ff79406404 Fix T52653: Render output of linked scenes conflicts with other scenes with the same name
The issue was caused by render result identifier only consist of scene name,
which could indeed cause conflicts.

On the one hand, there are quite some areas in Blender where we need identifier
to be unique to properly address things. Usually this is required for sub-data
of IDs, like bones. On another hand, it's not that hard to support this
particular case and avoid possible frustration.

The idea is, we add library name to render identifier for linked scenes. We use
library name and not pointer so we preserve render results through undo stack.

Reviewers: campbellbarton, mont29, brecht

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2836
2017-09-14 16:50:19 +05:00
4bd014e951 Depsgraph: Fix crash in masking, related on T52749 2017-09-14 16:23:16 +05:00
75f36266df Merge branch 'master' into blender2.8 2017-09-14 16:17:22 +05:00
09c6c6c486 Fix T52749: New Depsgraph - Render View Mask is not initialized correctly 2017-09-14 16:12:01 +05:00
3573f49bfd Masks: Split layer evaluation into separate function
This way we can easily re-use bits of code for new dependency graph.

Currently should be no functional changes.
2017-09-14 16:09:06 +05:00
8140b51aa4 Fix T52739: Crash loading corrupted video files
Affects both "normal" open as a video file and thumbnail generation.
2017-09-14 14:56:25 +05:00
c57636f060 Fix failure in our UI code that could allow search button without search callbacks, leading to crash.
Related to (exposed by) T52735, fixes the reported crash but not the
underlying issue.

To be backported to 2.79a should we do one.
2017-09-14 10:58:47 +02:00
d827186c17 Fix T52723: Reset UV layers failed 2017-09-14 17:46:03 +10:00
f7163a7d0a Fix T52741: Follow track with depth object crashes Blender with new depsgraph 2017-09-14 12:31:54 +05:00
bd1f946413 Recent action-bake used Py3.6 syntax 2017-09-14 17:04:41 +10:00
892d304ded Fix T52291: Boolean fails w/ co-linear edged ngons
This means boolean tessellation wont match viewport tessellation
however it's needed to avoid zero area triangles causing problems.
2017-09-14 16:08:03 +10:00
5ae63f03d9 DRW: Fix texture binding logic. 2017-09-14 01:03:19 +02:00
3b080c3f66 GPUCodegen: Add New GPU_SOURCE_STRUCT to be used for Closure Sockets
This way we dont rely on the static array of chars that was causing T52385.

That fixes T52385.
2017-09-14 01:03:19 +02:00
a01fbc6689 Manipulator: use box style for render border 2017-09-14 05:05:28 +10:00
c9be499c31 Manipulator: cage2d expand hotspot
With new style drawing hotspot should be in the middle of the border,
not inside it.
2017-09-14 04:38:48 +10:00
c1ff05e66f Manipulator: disable hover for camera border 2017-09-14 04:10:33 +10:00
3bf36fa33b Manipulator: alternate cage2d draw style
Doesn't rely on hovering, more consistent with 2D drawing tools.
2017-09-14 03:54:32 +10:00
55fb6e7096 GPU_immediate_util: Add x,y radius to circle draw
A version of circle drawing for non 1:1 aspects
2017-09-14 03:54:32 +10:00
d5478e20cc Eevee: Fix AO disappearing when updating Probe Grids. 2017-09-13 19:40:53 +02:00
2d261685a9 Eevee: Fix T52357 : SSRefraction broken after adding probe
I forgot the reset the toggle after rendering the probes...
2017-09-13 19:31:48 +02:00
1fca11d5cb DRW: Fix incorrect Ubo Bind 2017-09-13 17:44:36 +02:00
4088c9fa68 Eevee: Get rid of glitchy black SSR.
Add sanitizer. I wanted to stay away from this because I think we should fix what causes NaNs in the first place. But there can be too much different factor causing NaNs and it can be because of user inputs.
2017-09-13 17:44:36 +02:00
6d359e4498 Cleanup: use explicit 2d suffix for imm utils
Avoid ambiguity between 2d/3d (which were already named).
2017-09-14 01:24:50 +10:00
2a01fb61f8 Cleanup: use safe free macro & comments 2017-09-14 01:24:47 +10:00
e9d8b780ae DRW: Fix leak (2nd attempt) cause by texture "state" tracking
This should get rid of the leak once for all.
2017-09-13 16:55:58 +02:00
2b2277ecbc DRW: Fix memleak in release mode. 2017-09-13 15:42:48 +02:00
37d8d4787c Merge branch 'master' into blender2.8 2017-09-13 23:44:13 +10:00
6f633dec5d Fix T52299: X resolution of 4 causes nodes to collapse
Was caused by numeric overflow when calculating preview dimensions.
Now we try to avoid really insance preview resolutions by fitting
aspect into square.
2017-09-13 18:31:36 +05:00
9abacf38fd Eevee: SSR: Making ray count a define rather than an uniform.
The branching introduced by the uniform caused problems on mesa + AMD in the resolve stage.
This patch create one shader per sample count without branching.
This improves performance of a single ray per pixel case (3.0ms against 3.6ms in my testing)
2017-09-13 15:29:38 +02:00
32449e1b21 Code cleanup: store branch factor in PathState. 2017-09-13 15:24:14 +02:00
9e258fc641 Code cleanup: avoid used of uninitialized value in case of precision issue. 2017-09-13 15:24:14 +02:00
37d9e65ddf Code cleanup: abstract shadow catcher logic more into accumulation code. 2017-09-13 15:24:14 +02:00
f77cdd1d59 Code cleanup: deduplicate some branched and split kernel code.
Benchmarks peformance on GTX 1080 and RX 480 on Linux is the same for
bmw27, classroom, pabellon, and about 2% faster on fishy_cat and koro.
2017-09-13 15:24:14 +02:00
c4c450045d Code cleanup: tweak inlining for 2% better CUDA performance with hair. 2017-09-13 15:24:14 +02:00
76e7c039ec Fix T52140: Align objects centers using origin for text
The issue was caused by operator redo which frees all object's evaluated data,
including bounding box. This bounding box can not be reconstructed properly
without full curve evaluation (need to at least convert font to nurbs, which is
not cheap already).
2017-09-13 17:40:11 +05:00
43858c4197 Cleanup: avoid right-shifted args in RNA register 2017-09-13 21:52:57 +10:00
29a7ad8b1a Node UI: scale cross by pixelsize
Draws a little smaller to fit with 2.8x manipulator.
2017-09-13 21:48:51 +10:00
71c1bd1bd8 Manipulator: cage2d option to grab w/ a center handle 2017-09-13 21:42:13 +10:00
04800ed434 Fix T52113: Compositor doesnt mix unrendered render layers well
Compositor was always defaulting to all-zero s output for missing passes.

This was broken in 4cf7fc3.
2017-09-13 15:46:19 +05:00
f472aea922 Compositor: Cleanup, get rid of nested ternary operators
Having single switch statement is much more readable.
2017-09-13 15:46:19 +05:00
17a117c7a0 Compositor: Cleanup, de-duplicate some code 2017-09-13 15:46:19 +05:00
4fde0910d5 Compositor: Cleanup, reduce indentation level in render layer node
There is absolute no reason to have such an indentation level, it only causes
readability and maintainability issues. It is really simple to make code more
"streamlined".
2017-09-13 15:46:19 +05:00
77eaf5cd7a Manipulator: Only allow negative scale w/ flag set
In most cases we don't want this by default
2017-09-13 18:20:37 +10:00
a5c9f15a0e Manipulator: use solid regions for select drawing
Needed for 3D view selection
2017-09-13 18:06:26 +10:00
0bf8d16d1c Manipulator: cage2d - uniform handle size 2017-09-13 15:46:28 +10:00
86c73ea8d7 Manipulator: fix cage2d scaling 2017-09-13 15:46:18 +10:00
8a5af5202c Eevee: Fix T52713: SSR not working in AMD
This was cause by a fairly funky unitialize buffer (last frame) that was causing NANs during the SSR resolve stage.
They were then propagated to the whole image during the next swap.

Bypassing the SSR completly if no valid history exists fixes the problem. Also disabling SSR data output in this case so we can have correct reflection in the 1st history buffer.
2017-09-12 18:32:29 +02:00
79a1d74c78 Eevee: Fix T52510: assert with volume defines.
This assert was not making sense at all. Removing
2017-09-12 17:50:21 +02:00
07e6e5edfb Eevee: Fix extinction of Light parallel to views.
This was a problem with orthographic views and lights without rotations. This introduce a small bias that should fix most cases.
2017-09-12 16:18:18 +02:00
Mathieu Menuet
659ba012b0 Cycles: change AO bounces approximation to do more glossy and transmission.
Rather than treating all ray types equally, we now always render 1 glossy
bounce and unlimited transmission bounces. This makes it possible to get
good looking results with low AO bounces settings, making it useful to
speed up interior renders for example.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2818
2017-09-12 15:37:35 +02:00
fc42063d1e Eevee: Fix wrong shadow Orco mapping. 2017-09-12 15:06:07 +02:00
1e1d34654b Eevee / DRW : Codestyle 2017-09-12 15:03:34 +02:00
d2202117fe T50354: Action length calculation added unnecessary padding if some F-Curves
only contained a single key (on the last real frame of the action).
2017-09-13 00:53:50 +12:00
a704a66914 Adding some verbose documentation
I thought this was already clear enough, but apparently not.
2017-09-13 00:53:46 +12:00
f2b3e1f712 Eevee: Fix T52480: Can't reproduce Metallic transparency with Principled + Mix Shader
You can now use a transparent shader as a completly transparent bsdf. And use whatever alpha mask in a mix shader between a transparent bsdf and another bsdf.
2017-09-12 14:25:04 +02:00
7a6f9ab587 Eevee: Fix T52546 : 129th light crashes Blender 2017-09-12 14:25:04 +02:00
fadc079740 Fix T52573: Cycles baking artifacts
Synchronize condition for faces split between Cycles itself and baking API.
2017-09-12 16:33:42 +05:00
e7b5bbae6a Cycles tests: Add baking features tests 2017-09-12 16:22:02 +05:00
4aee701f00 Fix T52679: Hole in bake normal
In fact, any type of baking might have caused holes in mesh.

The issue was caused by zspan_scanconvert() attempting to get order of traversal
'a-priori', which might have failed if check happens at the "tip" of span where
`zspan->span1[sn1] == zspan->span2[sn1]`.

Didn't see anything bad on making it a check when iterating over scanlines and
pick minimal span based on current scanline. It's slower, but unlikely to cause
measurable difference. Quality should stay the same unless i'm missing something.

Reviewers: brecht, dfelinto

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2837
2017-09-12 16:20:41 +05:00
de6ecc82ed Fix rare firefly in volume equiangular sampling when sampling short distance. 2017-09-12 12:50:44 +02:00
28532f1867 Cycles tests: add environment variable to update references renders.
This will copy new renders over references renders:
CYCLESTEST_UPDATE=1 ctest -R cycles
2017-09-12 12:50:44 +02:00
cd6c9e9e5f Cycles: improve sample stratification on area lights for path tracing.
Previously we used a 1D sequence to select a light, and another 2D sequence
to sample a point on the light. For multiple lights this meant each light
would get a random subset of a 2D stratified sequence, which is not
guaranteed to be stratified anymore.

Now we use only a 2D sequence, split into segments along the X axis, one for
each light. The samples that fall within a segment then each are a stratified
sequence, at least in the limit. So for example for two lights, we split up
the unit square into two segments [0,0.5[ x [0,1[ and [0.5,1[ x [0,1[.

This doesn't make much difference in most scenes, mainly helps if you have a
few large area lights or some types of HDR backgrounds.
2017-09-12 12:45:29 +02:00
d454a44e96 Fix Cycles bug in RR termination, probability should never be > 1.0.
This causes render differences in some scenes, for example fishy_cat
and pabellon scenes render brighter in a few spots. This is an old
bug, not due to recent RR changes.
2017-09-12 12:43:26 +02:00
467d92b8f1 Cycles: Tweaks to avoid compilation error of megakernel
Also moved code out of deep-inside ifdef block, otherwise it was quite confusing.
2017-09-12 13:33:46 +05:00
74eed8e30e Fix T52705: Lamps shadows are not refreshed when tweaking lamps parameters
Lamp and camera datablocks updates should flush some updates to corresponding
objects. Currently it's done as Parameters -> Parameters relations.
2017-09-12 11:58:30 +05:00
b07ee4e3a5 Update tgz script, remove deprecated GZIP use 2017-09-12 16:25:19 +10:00
f875e396ce Eevee: Fix T52593
Use a placeholder texture to remove problems with sampler with no texture bound to it.
2017-09-11 23:17:33 +02:00
d126ffbea4 DRW: Use static list (array) of texture/ubo to track bound textures/ubos.
This is in order to use the same texture on multiple sampler.
Also texture counter is reset after each shading group. This mimics the previous behaviour.
2017-09-11 23:15:29 +02:00
4757404eef Eevee: Fix performance issue on intel.
I did not checked if it makes a diff on other GPU. This might be change to be intel only.
2017-09-11 14:32:44 +02:00
92ace808db Eevee: Fix shadow copy shader error.
filter() is a reserved function.
2017-09-11 14:09:12 +02:00
35ee9ff7a0 Fix T52682: When hair number=faces number, particles/face = 1 , actually some hair is overlap.
Just using same code for distribution for face/volume as the one
changed/used for vertices since some months.

Note that this change is breacking compatibility, in that distribution
of particles over faces/volume may not be exactly the same as
previously.
2017-09-11 12:38:17 +02:00
7d7741d25f Merge branch 'master' into blender2.8 2017-09-11 16:52:53 +10:00
f56fea3d6b Fix T52701: Mesh shortest path fails at boundaries 2017-09-11 16:45:19 +10:00
7e56879772 Fix T52696: Sculpt - Brush spacing pressure artifacts
Was caused by divide-by-zero in paint_stroke_integrate_overlap()
in paint_stroke.c, as identified by Bob Smith (uvwxyz).

Thanks for the report!
2017-09-11 18:24:39 +12:00
49ba9d02d8 Eevee: Fix shadow bleeding after farclip for cubemaps.
NOTE: We should not check for radial distance. But this is faster.
2017-09-11 01:13:55 +02:00
6d2cd1719b Bake Action: operate on selected objects
Previously only the active object was used.

Use coroutines to support baking frames for multiple objects at once,
without having to playback the animation multiple times.
2017-09-10 17:16:47 +10:00
a4a59d578c PyAPI: Add object argument to bake_action
Avoids having to set the scene's active object first.
2017-09-10 14:30:03 +10:00
d97a5484af Eevee: Shadows: Update cascaded shadowmaps when rendering probes.
This is really resource intensive but there is no other way to correctly handle it.
2017-09-10 03:09:45 +02:00
351f10cd79 Eevee: Shadow: Fix, improve cascade shadow map UI. 2017-09-10 03:09:45 +02:00
90efcd6df7 Eevee: Shadows: Add cubemap filtering and adaptive sample count.
Filter size is constant in world space and not dependant of shadow resolution.
The filter size is limited to the number of precomputed samples.
2017-09-10 03:09:45 +02:00
314739bced Eevee: Shadow: Fix Incorrect shadowing after sun lamp far clip plane.
Reject cascade sample if not in shadowmap volume.
2017-09-10 03:09:45 +02:00
9fdf094b85 Eevee: Shadows: Filtering improvement.
- Replace poisson by concentric samples: Less variance. They are sorted by radius then by angle.
- Separate filtering into 2 blur. First blur is 3x3 box blur. Second is user dependant.
- Group fetches by group of 4.
2017-09-10 03:09:45 +02:00
adeaf37e77 Eevee: Add Cascaded Shadow Map options. 2017-09-10 03:09:45 +02:00
cc6e97d426 Lamps: Remove uper limit of the buffer bias parameter. 2017-09-10 03:09:45 +02:00
716f7859a8 Eevee: Add Cascaded Shadow Map support with filtering.
This brings some data structure changes.
Shared shadow data are stored in ShadowData (in glsl) (aka EEVEE_Shadow in C).
This structure contains the array indices of the first shadow element of this shadow "object".
It also contains how many shadow to evaluate (to be used for Multiple shadow maps).

The filtering is noisy and needs improvement.
2017-09-10 03:09:45 +02:00
6c17348e91 Eevee: Shadow: Add high bitdepth option.
This option is here for reducing the memory usage of shadow maps.

Also lower bitdepth are quicker to process.
2017-09-10 03:09:45 +02:00
f46b908cc5 Eevee: Expose Shadow filter size. 2017-09-10 03:09:45 +02:00
32e96448b9 Eevee: Add Variance Shadow Mapping
This is an alternative to ESM. It does not suffer the same bleeding artifacts.
2017-09-10 03:09:45 +02:00
e2603a6e82 Eevee: Shadows: Add UI buttons for size and method
Only one method is available right now. VSM and PCF are comming.
2017-09-10 03:09:45 +02:00
8b7a83a868 Eevee: Refactor Shadow System
- Use only one 2d texture array to store all shadowmaps.
- Allow to change shadow maps resolution.
- Do not output radial distance when rendering shadowmaps. This will allow fast rendering of shadowmaps when we will drop the use of geometry shaders.
2017-09-10 03:09:45 +02:00
11a9434c2d Resolve T52687: Add node label shows as 'Unknown'
Add type access method, need to extend to other types
for now just get node UI working properly again.
2017-09-09 22:56:58 +10:00
3c3d0898b0 PyAPI: Fix mathutils freeze allowing owned data 2017-09-09 11:08:38 +10:00
30d8829780 Docs: mathutils docstrings 2017-09-09 11:02:26 +10:00
90eb93791f Cleanup: mathutils vector comments
Use doxy markup & correct outdated info.
2017-09-09 10:50:40 +10:00
3930e46e37 Correct last commit 2017-09-09 10:15:16 +10:00
002cc6aef3 Cleanup: Simplify SWIZZLE macro
- Use indices instead of character args.
- Use numbered macros instead of variadic args.

Parsing using rtags used over 11gb of memory. While this should be
resolved upstream (report as #1053), the extra complexity didn't give
any real advantage.
2017-09-09 10:10:05 +10:00
4265d85f8b [msvc/make.bat] mention the msvc-2017 option in the make.bat help text. 2017-09-08 14:24:02 -06:00
ae41a08288 Cycles: Attempt to work around compilation of sm_20 and sm_21
Disabled forceinline for those architectures, which seems to be compiling
successfully more often.

There might be ~3% slowdown based on quick tests, but better be rendering
something rather than failing to compile kernels again and again.

Those architectures will be doomed for abandon once we'll switch to toolkit 9.
2017-09-08 18:37:54 +02:00
5d1a5001f4 Fix T52628: own error in string duplication
Error in 636baa598a
2017-09-09 02:08:58 +10:00
ce1f2e271d Cycles: disable fast math flags, only use a subset.
Empty BVH nodes are set to NaN which must be preserved all the way to the
tnear <= tfar test which can then give false for empty nodes. This needs
strict semantices and careful argument ordering for min() and max(), so
the second argument is used if either of the arguments is NaN.

Fixes T52635: crash in BVH traversal with SSE4.1.

Differential Revision: https://developer.blender.org/D2828
2017-09-08 15:12:37 +02:00
b02ab2e7d9 Fix: Grease Pencil pie menu keymaps were broken after the menus got renamed 2017-09-09 01:03:15 +12:00
c9afc41cfd Fix T52650:Grease pencil selection its not automatically updating in Clip Editor 2017-09-08 11:21:49 +02:00
2a3a747ca2 Fix T52678: Crash editing gpencil w/ frame-lock 2017-09-08 18:51:47 +10:00
5b026486e4 Fix leak caused by wrong ownership flag 2017-09-08 04:22:19 +10:00
a2989b89c3 Fix leak w/ ocio glsl draw 2017-09-08 04:20:58 +10:00
df58d6bf76 Fix T52046: View transform applied twice w/ GL render
Patch from @sergey w/ minor edit.
2017-09-08 03:57:07 +10:00
a133b74709 Merge branch 'master' into blender2.8 2017-09-08 03:18:39 +10:00
60020f57d7 Correct function name in argument parsing 2017-09-08 00:59:27 +10:00
daf7aed849 PyAPI: use bl_rna_get_subclass for node API
Returns a default value instead of an error when the type isn't defined.
2017-09-08 00:03:01 +10:00
e44bf43f6c PyAPI: add function to get an RNA subclass
This is inconvenient in regular Python, add a class-method
to perform the operation, eg:

bpy.types.Node.bl_rna_find_subclass("CustomNodeType")
2017-09-08 00:02:09 +10:00
accc94dd73 Cleanup: remove goto's 2017-09-07 22:53:46 +10:00
f4d46916fa UI: fix memory leak when copy-to-selected failed 2017-09-07 22:15:12 +10:00
1601089ece Merge branch 'master' into blender2.8
This discards node drawing changes which need to be written as shaders.
2017-09-07 14:53:06 +10:00
f1021ee929 Merge branch 'master' into blender2.8 2017-09-07 14:33:59 +10:00
3f8aaec6bd Weight Smooth: remove source option
Use current selection mode instead of an operator option.
2017-09-07 14:14:42 +10:00
5f7de54243 Fix T52639: Weight paint smooth tool crash 2017-09-07 13:20:39 +10:00
c3322603eb Cleanup: custom nodes template
- Use conventional (pep8) prop names
- Simplify class registration
2017-09-07 05:20:29 +10:00
5d65aee07a Workaround node types not being exposed
We might want to have a utility function for this,
for now just keep it working.
2017-09-07 05:17:02 +10:00
8172e8e528 Node UI: Add square and diamond socked draw styles
Currently not used by Blender's node trees

D2814 by @charlie
2017-09-07 04:45:38 +10:00
c10ea88420 Fix T52660: CUDA volume texture rendering not working on Fermi GPUs. 2017-09-06 18:12:45 +02:00
fb2e0592bc Fix crash using arrow manipulator 2017-09-07 01:56:42 +10:00
e2f42ff907 Merge branch 'master' into blender2.8 2017-09-06 17:23:47 +02:00
82ede9de48 Fix mistake in previous fix for T52640. 2017-09-06 17:22:38 +02:00
16fbb47c88 Use normalized project functions 2017-09-07 01:20:59 +10:00
4d8980a690 Fix T52640: crash when opening image file browser in some cases.
There was some invalid state in the screen here, some areas had
sa->full set even though no screen was maximized, which then caused
a restore from the wrong (empty) area, which then led to spacedata
being empty and a crash.

This fix properly clears the sa->full after restore, and also fixes
existing .blend files in such an invalid state.
2017-09-06 16:17:18 +02:00
584523e0ad Screw Modifier: remove doubles option
Vertices on the axis can be optionally merged,
nice for creating objects which close at the end-points.
2017-09-07 00:12:43 +10:00
6e0fd239e3 Math Lib: normalized vector project functions 2017-09-07 00:12:43 +10:00
2d407fc288 Fix T52661: mesh light shader using backfacing not working, after new sampling. 2017-09-06 13:51:48 +02:00
dd8016f708 Fix T52652: Cycles image box mapping has flipped textures.
This breaks backwards compatibility some in that 3 sides will be mapped
differently now, but difficult to avoid and can be considered a bugfix.
2017-09-06 13:51:45 +02:00
56ff14ea63 View3D Remap: skip defmaterial
This isn't library data.
2017-09-06 20:57:25 +10:00
e54caf76cb Fix T52663: Remap used invalid local-view data
Only the camera from View3D.localvd is used,
other pointers may be invalid.

Longer term we should probably clear these to ensure no accidents.
For now just follow the rest of Blender's code and don't access.
2017-09-06 20:52:49 +10:00
b41d34040b Merge branch 'master' into blender2.8 2017-09-06 16:50:59 +10:00
47b7f06d0e Fix error in high bit-depth image tile drawing
From @1xundoredo in D2824
2017-09-06 16:11:19 +10:00
0fd31c53ee Rigidbody: Fix regression introduced in ee3fadd
Baking rigid body cache was broken if some cached frames already
existed.

This is just a band aid for release, the logic need to be looked into
further.
2017-09-05 19:59:46 +02:00
4ad5df8858 Fix T52374: Changes of rigid body related settings during simulation will break the simulation
Revert 9cd6b03, 3edc8c1, b87d10d and do a better fix for T50230.
2017-09-05 19:59:46 +02:00
6c66e1bc83 Fix T52251: Knife cur displaces surface 2017-09-06 01:50:36 +10:00
750e38a526 Cycles: Fix compilation error with CUDA after recent changes 2017-09-05 16:52:45 +02:00
Dalai Felinto
518e768579 Fix T52441: Principle BSDF clearcoat
Since the change to prevent shader recompilation at every update, we got
a regression when clearcoat was used.

Basically at the shader build time we would determine if the shader
needed clear coat, and if it didin't, it would build a different GLSL
program.

However if later the user updated the clearcoat value so that it would
then require the full clearcoat shader, the user wouldn't get it until
manually forcing the shader to recompile, or reopening the file.

We now handle the optimization in the GLSL code. That adds a minimum
overhead due to branching. But the overall performance seems unchanged
(tested on linux in AMD and NVidia).

Reviewers: pascal, brecht, fclem

Differential Revision: https://developer.blender.org/D2822
2017-09-05 16:40:27 +02:00
bffa57e6d8 Manipulator: Fix arrow2d drawing outside hotspot 2017-09-06 00:40:20 +10:00
704f6a5184 Buildbot: Fix paths to sndfile and flac
Need this in 2.79 branch as well, since build rules are based on this files.
2017-09-05 16:17:48 +02:00
16e5b932b7 Manipulator: cage2d initial rotation support 2017-09-06 00:06:53 +10:00
0a1a7323e5 Manipulator: missing exit() call 2017-09-06 00:06:53 +10:00
f01e43fac3 Fix T52433: Volume Absorption color tint
Need to exit the volume stack when shadow ray laves the medium.

Thanks Brecht for review and help in troubleshooting!
2017-09-05 15:48:34 +02:00
572b1a644f Merge branch 'master' into blender2.8 2017-09-05 22:56:03 +10:00
4d85396fe4 Cleanup: use const
Also use assert w/ rotate_m4.
2017-09-05 22:45:44 +10:00
b0bbb5f34f Cycles: Cleanup, style 2017-09-05 12:43:02 +02:00
6859695055 Fix T52649: missing custom (split) normals from FBX exporter.
Own mistake in recent rB25c5928b2b6 (this DOES NOT affect 2.79 release).
2017-09-04 21:04:19 +02:00
4a744727be Fix T52531: Blender 2D stabilisation node issue when autoscale is selected
Threading conflict, should be safe for 2.79.
2017-09-04 16:41:28 +02:00
b07e983b61 PyAPI: Add bpy.utils.register_classes_factory
Avoids having boiler plate register/unregister functions.
2017-09-05 00:24:29 +10:00
71f0c32dad Fix T52522: VSE renders with alpha transparent PNG image incorrectly
Need some extra checks and should be probably end up in 2.79 since that's a regression.
2017-09-04 14:46:17 +02:00
885c0a5f90 Cycles: Fix compilation warning 2017-09-04 13:28:15 +02:00
33249f6987 Fix T52533: Blender shuts down when rendering duplicated smoke domain 2017-09-04 13:14:54 +02:00
3789ab4166 PyAPI: fix rna_info for changes in type access 2017-09-04 16:39:13 +10:00
30d7fbd7a0 PyDoc: update context_type_map 2017-09-04 16:19:27 +10:00
f4fb329808 RNA/PyAPI: Expose Py classes in bpy.types
Operators and their properties are two different types

Previously both operators and their properties are added
causing C operators to access the properties, Python the classes.

Favor consistency in this case so only Python classes are added.
2017-09-04 14:49:27 +10:00
85d53620aa Cleanup: avoid confusing assignment 2017-09-04 14:35:35 +10:00
718af8e8b3 T52534: Compositor artifacts when scaling
Increased the maxx and maxy area of interest when scaling in this case.
2017-09-03 16:47:39 +02:00
4d148471b6 Fix T52634: EditMesh Remove doubles could hang
A single diagonal axis was used for sorting coordinates,
the algorithm relied on users not having vertices axis aligned.

Use BLI_kdtree to remove doubles instead.

Overall speed varies, it's more predictable than the previous method.
Some typical tests gave speedup of ~1.4x - 1.7x.
2017-09-03 23:52:10 +10:00
459d76ec51 BLI_kdtree: utility function to remove doubles 2017-09-03 23:43:14 +10:00
9c1cc35be2 CMake: use Blender's glew by default
Use since it's always bundled to avoid any issues caused
by version mis-match.
2017-09-03 16:36:17 +10:00
b227a3388d Fix: Deleting GPencil keyframes in DopeSheet didn't redraw the view 2017-09-03 12:49:17 +12:00
4f6196a041 Fix: Border select for GPencil keyframes was including those in the "datablock" channels even though those weren't visible
This meant that it was easy to accidentally select too many keyframes
2017-09-03 12:49:16 +12:00
c671973092 Fix: GPencil Sequence Interpolation for thickness/strength was inverted
For example, if you have two keyframes:
  k1 = 1px, k2 = 10px

it was doing:
  1px, 9px, 8px, ..., 3px, 2px, 10px
instead of:
  1px, 2px, 3px, ..., 8px, 9px, 10px
2017-09-03 12:49:15 +12:00
53ec0e5166 Fix T52227: Time Slide tool doesn't take NLA mapping into account
To be backported to 2.79
2017-09-03 12:49:15 +12:00
fcd7ac1451 [deps/msvc] Debug flags for optimized debug libs were inverted for cxx. 2017-09-02 17:14:42 -06:00
32e36a1782 Correct own error simplifying matrix checks 2017-09-03 00:05:11 +10:00
7dfcbe01b0 Merge branch 'master' into blender2.8 2017-09-02 20:08:02 +10:00
3750389ce3 Cleanup: use title caps for labels
Also consistent quoting (single quotes for enums, text uses double).
2017-09-02 16:13:33 +10:00
39f8b245d4 Fixes to cage2d scaling in the node editor 2017-09-02 03:55:45 +10:00
2ca1f29748 BMesh: use predictable order for remove-doubles
Each qsort implementation may give different results when values match.

Now fallback to sorting by index.
2017-09-02 03:30:09 +10:00
ce112cf0df Revert "Manipulator: remove unused event hack"
This reverts commit 134e927965.

Writing into const event is very bad,
but this change broke compositor manipulators.

Will look into better solution eventually.
2017-09-02 00:55:29 +10:00
8d207cdc3b Fix T52472: VSE Audio Volume not set immediately
Audio mixing is done with volume interpolation. A new handle started at
volume 1, now starting at volume 0 for a smooth fade in.
2017-09-01 12:27:21 +02:00
a5cb23c441 Merge branch 'master' into blender2.8 2017-09-01 19:17:14 +10:00
94b7bf3ec2 RNA: demote non-strict class naming to warning
This stops a lot of add-ons from registering,
while this must be resolved but there no need to force error just now.
2017-09-01 17:06:14 +10:00
18b7f05480 Cycles: follow strict class naming convention 2017-09-01 16:08:25 +10:00
c843e84892 Merge branch 'master' into blender2.8 2017-09-01 02:30:48 +10:00
0bbae3f3f6 RNA: strict naming for types in bpy.types
Blender scripts already do this, some addons will need updating.
2017-09-01 01:00:57 +10:00
217fddcb8e Cleanup: strict naming conventions 2017-09-01 01:00:56 +10:00
Dalai Felinto
44e10a5c66 Increase max/min frame range to over a million
For some specific pipelines (e.g., holographic rendering) you can easily
need over a million frames (1k * 1k view angles).

It seems a corner case, but there is no real reason not to allow users
doing that.

That said we do loose subframe precision in the highest frame range. Which can
affect motionblur. The current maximum sub-frame precision we have is 16.
While the previous limit of 500k frames has a precision of 32.

Thanks to Campbell Barton for the help here.

To be backported to 2.79
2017-08-31 16:13:04 +02:00
636baa598a RNA: Limit which classes struct-map contains
Only add subclasses of: Menu, Panel, Header, UIList, Operator

This helps avoid unnecessary naming collisions,

See T52599 for details
2017-08-31 23:49:50 +10:00
018137f762 Cycles: Cleanup, indentation and trailing whitespace 2017-08-31 14:47:49 +02:00
323a7ab944 Merge branch 'master' into blender2.8 2017-08-31 21:57:38 +10:00
8b9e1707a1 Cycles: Fix typo in comment 2017-08-31 13:24:32 +02:00
a35aae9e49 Correct last commit 2017-08-31 19:12:55 +10:00
732f70a151 RNA: existing type check used wrong identifier
Own error in recent type checks, in many cases the 'idname'
is used for the struct identifier, not the 'identifier'
which is the Python class name in this context.
2017-08-31 18:45:00 +10:00
480def9c55 Fix T52591: OpenColorIO not working correct with OpenGL core profile on macOS.
Also remove textureSize() replacement code, is always supported now.
2017-08-30 19:59:07 +02:00
17f26e181f OCIO: use modern GLSL texture functions
small part of ongoing OpenGL upgrade
2017-08-30 13:33:37 -04:00
cc830e2586 Manipulator: correct pivot w/ non 1:1 aspect 2017-08-31 03:07:05 +10:00
eafe96a718 Manipulator: empty image manipulator, use aspect 2017-08-31 02:38:16 +10:00
00ba48a699 Manipulator: replace old cage2d manipulator
Mostly internal changes, keeping both manipulators
could have worked but there was no point long term.

There are still some glitches to resolve, will work on those next.
2017-08-31 02:00:16 +10:00
b448b025c7 Manipulator: rename callback type 2017-08-31 02:00:16 +10:00
4f1b510d75 Cycles: Add tangent attribute tests 2017-08-30 17:42:00 +02:00
29b2a47a8a Fix T52588: Shape key value driver variables of duplicated object sets refer to old objects.
Regression since 2.78, to be backported to 2.79.
2017-08-30 17:24:06 +02:00
Dalai Felinto
698bae05aa Eevee: Fix conditional statement depending on unitialized value
Basically since g_data was malloc'ed (instead of calloc'ed)
g_data->minzbuffer was never initialized.

So when running DRW_framebuffer_init after EEVEE_effects_init, the test
to *g_data->minzbuffer would lead to unpredictable results.

This was caught by valgrind, reported by Sergey Sharybin.
2017-08-30 17:00:00 +02:00
25c5928b2b Refactor 'split faces' mesh code.
Previous version was trying to do a quick and simple process in the case
we were only considering smooth/flat status of faces.

Thing is, even then, the algorithm was not actually working in all
possible situations, e.g. two smooth faces having a single vertex in
common, but no common edges, would not have split that vertex, leading
to incorrect shading etc.

So now, tweaked slightly our split normals code to be able to generate
lnor spaces even when autosmooth is disabled, and we always go that way
when splitting faces.

Using smooth fans from clnor spaces is not only the only way to get 100%
correct results, it also makes face split code simpler.
2017-08-30 16:52:47 +02:00
Dalai Felinto
510651ed72 Attempt to fix OpenColorIO issues on Mac
We cannot have version130 there (should use version 330 instead).
Patch suggested by Brecht Van Lommel
2017-08-30 15:45:11 +02:00
Stefan Werner
68dfa0f1b7 Fixing T52477 - switching from custom ray/triangle intersection code to the one from util_intersection.h. This fixes the bug and makes the code more readable and maintainable. 2017-08-30 11:48:49 +02:00
fbcf05f443 Depsgraph: Copy-on-write component does not depend on itself 2017-08-30 11:15:58 +02:00
998947360b Manipulator: remove inline matrix calculation 2017-08-30 18:13:25 +10:00
8b23549d47 Manipulator: run callback when calculating the final matrix 2017-08-30 18:04:42 +10:00
124ffb45a6 Cycles: Fix build with networking enabled 2017-08-30 00:19:44 -04:00
1457e5ea73 Fix Cycles Windows render errors with BVH2 CPU rendering.
One problem is that it was always using __mm_blendv_ps emulation even if the
instruction was supported. The other that the emulation function was wrong.

Thanks a lot to Ray Molenkamp for tracking this one down.
2017-08-29 22:55:35 +02:00
d34dac1070 Depsgraph: Fix crash when ungrouping node group
We shouldn't tag both COW and shading parameters ocmponents for update at
the same time.
2017-08-29 17:12:43 +02:00
9deccce07d Depsgraph: Fix missing material update when driving property in a group 2017-08-29 17:03:07 +02:00
696f4dc85f Alembic: Fix T52579: crash when replacing slightly different alembic files
Apparently with Maya in a certain configuration, it's possible to have an
Alembic object without schema in the Alembic file. This is now handled
properly, instead of crashing on a null pointer.
2017-08-29 16:58:13 +02:00
852d702da0 Fix possibly missing flushes back to copy-on-write operation
Could have happened if multiple tags per object happens.
2017-08-29 16:28:06 +02:00
Alexander Gavrilov
735e287271 Fix T48079: Maintain Volume constraint overcompensates.
The coefficient has been wrong since introduction for some reason.

Not backwards compatible, should not be merged to 2.7*.
2017-08-29 15:23:47 +03:00
01bdb0c76e Support Copy To Selected and Alt-Click for F-Curves in the curve editor.
This affects the curve display color setting, but is really intended
for future per-curve options.

The id_data reference in the created rna pointers refers to the object
even if the curve is actually owned by its action, which is somewhat
inconsistent, but the same problem can be found in existing code.
Fixing it requires changes in animdata filter API.
2017-08-29 14:30:44 +03:00
f846846941 Depsgraph: Fix missing updates when tweaking node tree parameters
The is following: split copy on write update for node trees, and if we are only
tagging for uniform buffer update we skip whole datablock copy and only invoke
copy default_values form original nodetree to a copied one.

Thing which i'm not sure is: whether we need to use different branches in graph
itself to control such a conditional behavior, or whether we need to store tag
somewhere in the dependency graph. There are obviously cons and pros in both
approaches, and need to think about this. Maybe with more examples it becomes
more obvious which way is better.

This only fixes manual tweaks for now, animation support is coming.
2017-08-29 12:58:55 +02:00
c1582667ca Add utility function to copy default values from one tree to another
The trees should match in nodes layout completely.
2017-08-29 12:55:03 +02:00
9ca03ba410 Manipulator: use cage2d_rotate in UV view
Use when selection bounds isn't a single point.
2017-08-29 20:04:31 +10:00
369cd8521b Manipulator: new cage2d manipulator
Adding alongside the existing one for now,
but it should eventually replace it.

Uses a matrix instead of (position + scale),
written so rotation can be done more easily.

Currently has a primitive handle for rotation, supports corner scaling.
2017-08-29 20:04:31 +10:00
c7f106cbe2 View2D: function to get view to region matrix 2017-08-29 19:36:40 +10:00
83ea224a7f Depsgraph: Fix missing updates when changing node tree topology
There were two issues here:

1. material_update did not do anything, because DEG_id_tag_update was storing
   update tags in original IDs, which had nothing evaluated. Even more, material
   update should have been called with evaluated version of material, Solved
   this by copying update tag from original ID to a copied one.

   However, perhaps DEG_id_tag_update should tag both original and copied ID,
   so updates are never gets lots if some depsgraph is not visible.

2. Tagging material for update should ensure it's copied version of node tree is
   up to date, otherwise material will still use old node tree.

This solves missing material updates when changing topology. Tweaking values is
still broken, because of GPUMaterial using pointer to original node's socket
value, which gets broken after copy-on-write of the node tree (pointers of nodes
are changing).
2017-08-29 11:32:25 +02:00
6b8132a153 Merge branch 'master' into blender2.8 2017-08-29 19:38:01 +10:00
3d56bfbc82 Merge branch 'master' into blender2.8 2017-08-29 16:06:26 +10:00
1c92ffa149 Transform: scale center override by aspect
Needed for image space.
2017-08-29 16:01:16 +10:00
db1ffe11b6 Cleanup: naming (RECT -> CAGE2D)
Make cage2d 'part' defines public (needed to assign operator actions).
2017-08-29 12:53:57 +10:00
156c0ab255 Depsgraph: Don't case ID_Type to short 2017-08-28 11:51:53 +02:00
52dd5c5fcf Merge branch 'master' into blender2.8 2017-08-28 11:44:39 +02:00
b4b1397ad9 Depsgraph: Don't cast ID_Type to short 2017-08-28 11:43:36 +02:00
f9f4e20871 Merge branch 'master' into blender2.8 2017-08-28 11:27:50 +02:00
2e71927622 Make GS macro return proper IDType type
Previously it was returning short, which was really easy to (a) compare against
non-ID type value (b) forget to handle some specific value in switch statement.

Both issues happened in the nearest past, so it's time to tighten some nuts
here.

Most of the change related on silencing strict compiler warning now, but there
is also one tricky aspect: ID_NLA is not in the IDType enum. So there is still
cast to short to handle that switch. If someone has better ideas how to deal
with this please go ahead :)
2017-08-28 11:21:55 +02:00
f4b3678646 Atomics: Use system headers directly, without bad level dependency to BLI
This will make it easier to re-use library as-is in other projects,
such as Cycles standalone repo for example.
2017-08-28 11:06:15 +02:00
49e7b77b19 Depsgraph: Pass copy-on-write pointer to material update
Unfortunately, there is something else wrong going on here, which makes objects
black after tweaking material settings.
2017-08-28 11:00:42 +02:00
6b5d8c29e6 Merge branch 'master' into blender2.8 2017-08-28 10:33:29 +02:00
b11b5b273e Buildbot: Tweak nightly schedule of builds
Basically, schedule linux 64 earlier on, so builds are ready for nightly benchmarks.
2017-08-28 09:12:53 +02:00
7114b5681f Missing from last commit (missed manually resolving) 2017-08-28 16:29:13 +10:00
8cd2b6ca8e Merge branch 'master' into blender2.8 2017-08-28 16:04:42 +10:00
a520e7c85c Transform: center override
Hidden option to override transform center.
Needed for manipulators that define their own center.
2017-08-28 16:00:28 +10:00
af108a2f26 Merge branch 'master' into blender2.8 2017-08-28 14:25:10 +10:00
c8627b9067 EditMesh: set edge-rin subdiv minimum to 1
This only made sense for bridge tool.

D2785 by @mbjorkegren
2017-08-28 14:25:00 +10:00
2f8c8ec8fb Docs: BMesh.from_mesh behavior w/ multiple calls 2017-08-28 14:25:00 +10:00
0f1fc5f50d Fix T51400: Pasting hex code fails
The # prefix is supported,
the button didn't give enough space to paste it.

D2812 by @candreacchio
2017-08-28 14:25:00 +10:00
c16a98bb06 Fix T52498: Deleting force field doesn't remove "Surface" from modifier stack.
Logic in `ED_object_check_force_modifiers` was inconsistent between add
and remove modifier cases.

Should be safe enough for 2.79.
2017-08-28 14:25:00 +10:00
1261a29fc0 EditMesh: set edge-rin subdiv minimum to 1
This only made sense for bridge tool.

D2785 by @mbjorkegren
2017-08-28 13:01:11 +10:00
cb7f1f8160 Docs: BMesh.from_mesh behavior w/ multiple calls 2017-08-28 12:40:36 +10:00
0b5cabdca5 Fix T51400: Pasting hex code fails
The # prefix is supported,
the button didn't give enough space to paste it.

D2812 by @candreacchio
2017-08-28 12:18:39 +10:00
Julian Eisel
e0ce01c3b1 Fix blenderplayer compilation 2017-08-28 02:08:47 +02:00
ddff9d0ea6 Manipulator: support operator per-part
A single manipulator could only assign a single operator to each part.
Now each part can have it's own.

Also modify 2D selection callback, 2D started at 1, 3D at 0.
Now use -1 for unset value, start both at 0.
2017-08-28 00:56:08 +10:00
dcebad773f Fix T52498: Deleting force field doesn't remove "Surface" from modifier stack.
Logic in `ED_object_check_force_modifiers` was inconsistent between add
and remove modifier cases.

Should be safe enough for 2.79.
2017-08-27 12:20:21 +02:00
ca9801bd42 Merge branch 'master' into blender2.8 2017-08-27 16:35:51 +10:00
c90452e111 BLI_rect: Function to calculate a matrix from 2 rctf's 2017-08-27 16:19:34 +10:00
b1f2b69884 Missing from last commit 2017-08-27 15:24:41 +10:00
6178cf8353 Cleanup: use stubs for eigen gtest 2017-08-27 15:21:09 +10:00
2ff7ba2c6c Correct matrix stack assert 2017-08-27 11:22:31 +10:00
b07dcb8fb0 Missed last commit 2017-08-27 03:51:25 +10:00
b6b27b0671 Fix T52515: Crash on BMesh.to_mesh() 2017-08-27 02:44:15 +10:00
79111f9246 Merge branch 'master' into blender2.8 2017-08-27 00:51:54 +10:00
7e43210edb WM: move theme check out of ED_view3d_draw_select_loop
In 2.8x this needs to be in view3d_opengl_select,
so simplest to make in master too.
2017-08-27 00:48:52 +10:00
fa365d5f2f Fix minor Mesh -> BMesh conversion issues
- Vertex only meshes never restored their selection history.
- Select history was cleared on the source instead of the target.

Simple Optimizations:
- Avoid O(n^2) linked list looping that checked the entire list before
  adding elements (NULL values in the source array to prevent dupes).
- Re-use vert & edge lookup tables instead of allocating new ones.
2017-08-26 23:14:18 +10:00
fe71c86888 Fix T52478: Error report "Shrinkwrap: out of memory" on invisible target.
Shrinkwrap must check it does have valid target data.

Safe for 2.79 release.
2017-08-26 14:48:00 +02:00
5c4fc93f67 Fix T52538: Outliner crash when displaying groups and using Show Active on editmode bone not in any groups
There's no guaranty that given ID is found in current outliner tree...

Safe for 2.79, though not a regression.
2017-08-26 12:28:21 +02:00
58d92cefbd [cycles/ctest] fix failing tests when output folder doesn't exist yet. 2017-08-25 17:17:49 -06:00
5121dacf9d Fix for fix (tm): Residue of the debug code 2017-08-25 21:33:44 +02:00
90110d3732 Fix mistake in previous tangent space optimization 2017-08-25 21:30:20 +02:00
12f627cd9f Cycles: Cleanup, naming of variable
Always use b_ prefix for C++ RNA data.
2017-08-25 21:30:20 +02:00
ee61a97632 Cycles: Add assert to catch possibly wrong logic 2017-08-25 21:30:20 +02:00
f9a3d01452 Cycles: Mark pixels with negative values as outliers
If a pixel has negative components, something already went wrong, so the best option is to just ignore it.

Should be good for 2.79.
2017-08-25 17:46:15 +02:00
e2ffad7823 Fix T52481: After making all local, local proxies of linked data get broken after file save and reload.
Issue was nasty hidden one, the dual status (mix of local and linked)
of proxies striking again.

Here, remapping process was considering obdata pointer of proxies as
indirect usage, hence clearing the 'LIB_TAG_EXTERN' of obdata pointer.
That would make savetoblend code not store any 'lib placeholder' for
obdata data-block, which was hence lost on next file read.

Another (probably better) solution here would be to actually consider
obdata of proxies are fully indirect usage, and simply reassign proxies
from their linked object's obdata on file read...

However, that change shall be safer for now, probably good for 2.79 too.
2017-08-25 16:16:32 +02:00
Dalai Felinto
ae04e27bfa Revert "material Glsl: Fix tangent with new orco."
This reverts commit 3888227a7b.

This "Fix" was made while ORCO was broken. Now that orco itself is fixed
this is no longer required, otherwise Tangent node produces different
results in Cycles and Eevee.
2017-08-25 15:40:40 +02:00
d79fa8dc4d Another optimization of tangent space calculation
Don't use quick sort for small arrays, bubble sort works way faster for small
arrays due to cache coherency. This is what qsort() from libc is doing actually.
We can also experiment unrolling some extra small arrays, for example 3 and 4
element arrays.

This reduces tangent space calculation for dragon from 3.1sec to 2.9sec.
2017-08-25 14:54:44 +02:00
52778ce625 Cleanup: missing break (harmless for now) 2017-08-25 22:53:37 +10:00
49717d4971 Optimize tangent space calculation by inlining functions
Brings tangent space calculation from 4.6sec to 3.1sec for dragon model in BI.
Cycles is also somewhat faster, but it has other bottlenecks.

Funny thing, using simple `static inline` already gives a lot of speedup here.
That's just answering question whether it's OK to leave decision on what to
inline up to a compiler..
2017-08-25 14:50:04 +02:00
90299e4216 Cycles: Add utility function to query current value of scoped timer 2017-08-25 14:27:34 +02:00
12d527f327 Cycles: Correct logging of sued CPU intrisics 2017-08-25 14:27:34 +02:00
dfae3de6bd Cycles: Fix stack overflow during traversal caused by floating overflow
Would be nice to be able to catch this with assert as well, will see what would
be the best way to do this/.\

Need to verify with Mai that this solves crash for her and maybe consider
porting this to 2.79.
2017-08-25 14:27:34 +02:00
Dalai Felinto
0feeef89f0 Fix T52528: generated texture mismatch between Cycles and Eevee
Finally orco should be working 100% on Eevee now. Thanks for Sergey
Sharybin for reporting this.
2017-08-25 14:22:21 +02:00
Dalai Felinto
99b1f9f4f4 Revert "Eevee: Fix generated coordinates when no texture coordinates connected"
This reverts commit 0e29a97813.
2017-08-25 14:22:21 +02:00
Dalai Felinto
4e975b6b44 Fix ORCO never used for draw manager (Eevee)
Related to T52528.
2017-08-25 14:22:21 +02:00
8e6c18a98f Merge branch 'master' into blender2.8 2017-08-25 22:22:58 +10:00
de669c3b60 WM: ensure 3D view theme is used in select-loop
Yet another case where theme could be used uninitialized.
2017-08-25 22:10:27 +10:00
f8f6f8f26e Merge branch 'master' into blender2.8 2017-08-25 20:45:16 +10:00
16377abda8 WM: initialize WM and deps before handling events
This avoids obscure bugs where operators could run from
events that happen before the UI and depsgraph have been initialized.

See: D2809 for details.
2017-08-25 20:26:52 +10:00
Dalai Felinto
0e29a97813 Eevee: Fix generated coordinates when no texture coordinates connected
Orco should behave the same if it comes from unconnected vec inputs, or
from the Texture Coordinate -> Generated node output.

Fixup for 11e7e0769a.

This is related to T52528. The coordinates are still different between
Eevee and Cycles, but at least it behaves consistent within itself.

In fact the shader should now be correct, but the orco attributes we are
passing the shader seems to be where the problem is. But it's to be
tackled separately.
2017-08-25 11:47:38 +02:00
2d5935a9c0 This copyright text (copied to binary distros) had a confusing statement about
scripts being "Artwork" which is your sole property and free to license.

I've removed the reference to scripts in this text.

This was from 2002! With our Python scripts becoming part of how Blender runs,
such scripts now are officially required to be compliant with GNU GPL.

For more information; check the FAQ or consult foundation@blender.org
https://www.blender.org/support/faq/
2017-08-25 11:11:19 +02:00
9e762693db Fix manipulator remove tag, it cleared all groups 2017-08-25 15:19:30 +10:00
3f4b3fdfba Manipulator: zero grab offset w/o target property
Some manipulators are used like on-screen buttons,
in this case it doesn't make sense to keep track of their state,
so zero the offset when its unused.

Needed for lamp-target manipulator.
2017-08-25 15:13:11 +10:00
738d942d29 Correct error in recent use of PyC_Long_*
Regression in 46cf33bf0
2017-08-25 02:09:23 +10:00
1b5a690c72 Fix crash handling manipulator events before drawing 2017-08-25 00:20:14 +10:00
33f9b6d016 Depsgraph: Fix crash editing mesh in edit mode 2017-08-24 16:01:08 +02:00
97fadb7b59 Depsgraph: Cleanup typo 2017-08-24 15:52:52 +02:00
9662803833 Fix error using wrong theme settings w/ depth draw
Clicks events before first draw would assert,
unlikely to cause user visible errors but
would assert in UI_ThemeGetColorPtr.
2017-08-24 23:22:55 +10:00
a679457263 Fix T51907: New Depsgraph - Camera constraint is not evaluated properly
This is more a workaround for until we've got proper visibility flush, which
will likely happen in blender2.8 branch.
2017-08-24 14:35:48 +02:00
436d1b4e90 Cycles: FIx issue with -0 being considered a non-finite value 2017-08-24 14:32:56 +02:00
Dalai Felinto
552656611b Merge remote-tracking branch 'origin/master' into blender2.8 2017-08-24 10:41:59 +02:00
Dalai Felinto
1fb2637006 Cycles Bake: Fix overflow when using hundreds of images
We have a hardcored limit of 1000 images to be baked.
However anything anove 100 would be leading to overflow in the code.

Caught by warning from builder bot (my compiler doesn't even complain
about this, but it should).
2017-08-24 10:34:56 +02:00
e20c825b05 Manipulator: modal callback can now cancel & pass events
Re-use operator return flags for manipulator modal & invoke,
this means manipulators can allow navigation or other events to be
handled as they run - see T52499
2017-08-24 17:04:28 +10:00
134e927965 Manipulator: remove unused event hack 2017-08-24 12:02:08 +10:00
76b74a93a8 Fix Cycles CUDA transparent shadow error after recent fix in c22b52c.
Fishy cat benchmark was rendering with wrong shadows. Cause is unclear,
adding printf or rearranging code seems to avoid this issue, possibly a
compiler bug. This reverts the fix and solves the OSL bug elsewhere.
2017-08-24 03:43:02 +02:00
b85d36d811 Code cleanup: remove shader context.
This was needed when we accessed OSL closure memory after shader evaluation,
which could get overwritten by another shader evaluation. But all closures
are immediatley converted to ShaderClosure now, so no longer needed.
2017-08-24 03:43:02 +02:00
e476298084 Docs: rename var and comment how it's used
switch_from_camera wasn't right since it was used for auto-perspective.
2017-08-24 02:11:31 +10:00
Dalai Felinto
efd07aaada Fix blenderplayer (tm) 2017-08-23 17:55:50 +02:00
0671814e3b Merge branch 'master' into blender2.8 2017-08-24 01:07:09 +10:00
0b5b464e82 Correction to last fix 2017-08-24 01:05:20 +10:00
76d695f761 Fix T52490: NDOF orbit doesn't lock in ortho view
Regression in af3f7db caused by own fix for T51324
2017-08-24 00:51:25 +10:00
520ea73ad0 Fix bplayer (c) 2017-08-23 16:43:10 +02:00
3277bd4031 Fix T52396: Crash loading template w/o config dir 2017-08-23 22:06:42 +10:00
579edb1510 Cycles: Add maximum depth stat to bvh builder 2017-08-23 06:54:26 -04:00
2540741dee Fix implementation of atomic update max and move to a central location
While unlikely to have had any serious effects because of limited use, the
previous implementation was not actually atomic due to a data race and
incorrectly coded CAS loop. We also had duplicates of this code in a few
places, it's now been moved to a single location with all other atomic
operations.
2017-08-23 06:54:25 -04:00
5c60721c9e Fix T51805: Overlapping volumes renders incorrect on AMD GPU
We need to make sure we can store all volume closures for all objects in volume
stack. This is a bit tricky to detect what would be the "nestness" level of
volumes so for now use maximum possible stack depth. Might cause some slowdown,
but better to give reliable render output than to fail quickly.

Should be safe for 2.79 after extra eyes.
2017-08-23 12:35:23 +02:00
cb4884f50b Merge branch 'master' into blender2.8 2017-08-23 20:16:47 +10:00
b9513706cb Cleanup: mark VA_NARGS_COUNT as public
Was already used in two other headers, remove underscore prefix.
2017-08-23 20:16:17 +10:00
37cfa44222 Cleanup: move variadic defines to their own header
So we can use in headers without pulling in many other defines.
2017-08-23 20:16:17 +10:00
1a76bc7aeb Fix T52218: Missing update when reconnecting node
If node was connected to output, we tag tree for update no matter where
the node was re-plugged to.

Should be safe for 2.79.
2017-08-23 11:49:20 +02:00
54507234b7 RNA: use string join functions as with operators 2017-08-23 19:40:48 +10:00
917d069cdb Merge branch 'master' into blender2.8 2017-08-23 19:21:52 +10:00
cf8d35edc8 RNA: use string-join to simplify operator register
Also sanity check macro-operator ID's.
2017-08-23 19:18:22 +10:00
81c0e643a0 BLI_string_utils: string joining utility functions
Includes a version that takes a separator and macros for convenience.
2017-08-23 19:17:27 +10:00
55861cb234 PyAPI: avoid instantiating args twice in macro
Would cause problems if args included function calls.
2017-08-23 18:48:32 +10:00
9d6d413c7c RNA: check for duplicate manipulator names 2017-08-23 16:22:48 +10:00
58a4c767a1 Merge branch 'master' into blender2.8 2017-08-23 16:10:45 +10:00
b8d77c44f1 Cleanup: remove space from filenames 2017-08-23 15:50:44 +10:00
46b9f89f5e Tests: fix incorrect check for hidden dir
Copy-pasted mistake in tests and tools.
2017-08-23 15:36:39 +10:00
1e60ac3394 RNA: report error on struct naming collision
Fixes T52463, error instead of crash.
2017-08-23 15:02:21 +10:00
4761dea573 RNA: keep structs_map valid w/ ID duplicate & free 2017-08-23 14:14:55 +10:00
8899ac1550 GHash: BLI_ghash_reinsert_key utility function
Useful when ghash keys are reallocated.
2017-08-23 13:03:35 +10:00
980a8646d8 Fix T52466: Silence search for button_context menu type.
We were showing "search for unknown menutype WM_MT_button_context" messages in terminal which were not helpful for users, so now they are disabled.

To be backported to 2.79
2017-08-22 21:35:09 +02:00
f09dee5aed Fix error in PointerProperty argument list
Regression in a7b3047
2017-08-23 02:14:33 +10:00
4d8e3b649b Fix T52483: Fill is incorrect for interpolated strokes
The recalc flag must be enabled for new interpolated strokes.
2017-08-22 17:43:20 +02:00
9cfb72ff81 Merge branch 'master' into blender2.8 2017-08-22 16:31:33 +02:00
9f40153094 Fix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out when the curve has a parent 2017-08-22 16:27:33 +02:00
f3e02eb32e Depsgraph: Cleanup, make code friendlier to be edited in columns 2017-08-22 16:24:58 +02:00
c80ab62aee Depsgraph: Remove placeholder for path evaluation
Wasn't used in years, if it really needs to be dedicated operation it needs to
be revisited anyway.
2017-08-22 16:12:01 +02:00
4699799288 Fix threading conflict when doing Cycles background render
It is possible to have same image used multiple times at different frames,
which means we can not free it's buffers without any guard. From quick tests
this seems to be doing what it is supposed to.

Need more testing and port this to 2.79.
2017-08-22 15:50:05 +02:00
831e86d539 GPUTexture: Remove Warning. 2017-08-22 14:41:36 +02:00
Dalai Felinto
d7b3e33af4 GL_TEXTURE_2D_ARRAY wasn't handled in GPU_texture_update
Although the problem was exposed in 9457715d9a, the problem was in the
original code that was copied over. To have:

```
} else { /* EXPECTED_VALUE */
```

Without an BLI_assert(value == EXPECTED_VALUE); is asking for troubles.
Yet another reason to favour switch statements with:

```
default:
    BLI_assert(!"value not implemented or supported");
```

Instead of chained if/else if/else /* expected_value */.
2017-08-22 14:37:28 +02:00
5f4066c87d add GPU_glew header 2017-08-22 22:22:21 +10:00
7e6b702e65 Fix T52053: Sculpt missing update w/ clay engine
Leaving sculpt mode wasn't updating the mesh because the update
flushed from the depsgraph ignored edits to vertex location.
2017-08-22 22:10:13 +10:00
2f19559258 Cleanup: naming for mesh dirty flags
- NOCHECK -> ALL
- ALL -> MAYBE_ALL

Where 'MAYBE_ALL' checks to see if the mesh has changed.
This is clearer that `BKE_MESH_BATCH_DIRTY_ALL` is dirty and
going to be updated without any guess-work.
2017-08-22 22:07:25 +10:00
1155fc94fd Fix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
Most likely needs in 2.79 final release.
2017-08-22 12:53:34 +02:00
Dalai Felinto
9457715d9a GPU Texture: Use switch instead of if/else 2017-08-22 12:30:03 +02:00
cc5e90f75d Manipulator: template for Python manipulator
This is an example of a manipulator that defines it's own geometry.
2017-08-22 20:16:22 +10:00
f4fe405da9 Manipulator: Add API target_get/set/range wrappers
Allows Python manipulators access the values of target properties
needed for Python to make use of the general target property interface.
2017-08-22 18:57:38 +10:00
bd935b5aed Merge branch 'master' into blender2.8 2017-08-22 18:21:05 +10:00
ccff7c3c82 PyAPI: Minor gawain corrections 2017-08-22 18:13:19 +10:00
417581636f Eevee: Fix T52486
For that introduce an update function for textures.
2017-08-22 10:22:11 +02:00
691ed21842 PyAPI: replace PyC_FromArray with typed functions
This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.

Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.
2017-08-22 18:10:57 +10:00
049932c4c3 Fix panorama render crash with split kernel, due to incorrect buffer pointer.
Also some refactoring to clarify variable usage scope.
2017-08-22 00:41:07 +02:00
296d74c4b1 Cycles: reorganize Performance panel layout, move viewport BVH type to debug. 2017-08-21 19:05:17 +02:00
81a76469ca Fix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet. 2017-08-21 19:05:17 +02:00
7e87849257 Cleanup: rename manipulator API functions
- WM_manipulatorgrouptype_remove- > free
- WM_manipulator_group -> WM_manipulator_group_type

Naming here is still a bit confusing,
now at least free/remove are differentiated.
2017-08-22 02:06:46 +10:00
be89b95e98 Fix crash re-registering manipulators
Duplicating strings caused problems using strings in
both struct hash and manipulator group types own hash.
2017-08-22 01:55:11 +10:00
37a5fe2d4d Fix T52479: Regression: Motion Tracking no longer works 2017-08-21 17:23:42 +02:00
3e555d3d78 Merge branch 'master' into blender2.8 2017-08-21 15:41:03 +10:00
0033f0e161 Cleanup: uneven/double indentation 2017-08-21 15:38:11 +10:00
592dd9dea6 Modify menu from last commit
Also correct tool-tip.
2017-08-21 15:24:40 +10:00
361c7cbbc5 Fix T52434: Restore mesh center of mass calculation
The new method while improved for solid objects
doesn't work for non-manifold meshes, keep both.
2017-08-21 15:19:08 +10:00
d007828ae7 Eevee: Offset the for each AA sample.
This means we have less overall noise for rendered image.
SSR, AO, and Refraction are affected by this change.

SSR still exhibit artifacts because the reconstruction pattern needs to change every frame (TODO).
2017-08-21 01:39:23 +02:00
43a6cf1504 Cycles: attempt to recover from crashing CUDA/OpenCL drivers on Windows.
I don't know if this will actually work, needs testing. Ref T52064.
2017-08-20 23:18:25 +02:00
fc890cdae2 Fix Windows build error after recent Python changes in a10a7f42. 2017-08-20 23:15:43 +02:00
47d1f67eab Fix T52473: blender internal Fresnel and Layer Weight only work with linked normal.
Please backport this to 2.79.
2017-08-21 00:09:16 +02:00
41e6068c76 Revert "Cycles: remove square samples option."
This reverts commit 757c24b6bc.

We'll revisit this when doing deeper sampling changes.
2017-08-20 23:46:05 +02:00
1d1ddd48db Fix T52470: cycles OpenCL hair rendering not working after recent changes. 2017-08-20 23:32:20 +02:00
1b79d323d9 Cleanup: move gawain header out of GPU_matrix
Avoids requiring glew headers in Python API.
2017-08-21 01:41:20 +10:00
ce0fce2207 Code cleanup: deduplicate some bsdf node methods. 2017-08-20 17:37:22 +02:00
146b0c6b04 Fix T52439: Crash after adjusting lenght of hair particles.
Regression from rBfed853ea78221, calling this inside thread worker was
not really good idea anyway, and we already have all the code we need in
pre-threading init function, was just disabled for vertex particles
before.

To be backported to 2.79.
2017-08-20 17:18:48 +02:00
4f881e0d97 CMake version bump: 3.5 2017-08-20 17:01:27 +02:00
b5f8063fb9 Cycles: support baking normals plugged into BSDFs, averaged with closure weight. 2017-08-20 16:51:53 +02:00
a7362eb219 Manipulator: helper API for drawing custom shapes
This exposes 2 methods for manipulators:
- new_custom_shape
- draw_custom_shape

This can be used for script authors to create and re-use shapes
without dealing with lower level API's.
2017-08-21 00:11:16 +10:00
adabc315e9 PyAPI: add gpu.select (initial module)
This only exposes load_id, it's needed for Python manipulator drawing.
2017-08-20 23:13:42 +10:00
59e10bae3c Manipulator: add read-only matrix_world 2017-08-20 22:44:22 +10:00
0b07c2c8a2 Code cleanup: remove copy of shader graph for bump, no longer needed. 2017-08-20 14:27:51 +02:00
2530ae6c74 Merge branch 'master' into blender2.8 2017-08-20 21:22:00 +10:00
e27a59d411 Replace BLI_INLINE w/ Py_LOCAL_INLINE for Python
Recent inclusion caused build error with the BGE.
2017-08-20 21:14:33 +10:00
cb03cc6600 PyAPI: gpu.matrix.push_pop context manager
Avoid un-balanced push/pop usage (which can interfere with Blender's
internal state) using a context manager.
2017-08-20 19:42:31 +10:00
f6825d333b Fix bpy library load: invalid function signature 2017-08-20 19:04:16 +10:00
8037f3602f PyAPI: Add exceptions to stack push/pop
Raise exception when stack limits are reached.
2017-08-20 17:26:51 +10:00
33b265c4fb PyAPI: use PyC_Long_As... for gawain
Avoids inline overflow checks.
2017-08-20 15:58:37 +10:00
7497488149 Merge branch 'master' into blender2.8 2017-08-20 15:50:15 +10:00
46cf33bf01 PyAPI: Make use of PyC_LongAs... API
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.

Some inline exceptions are kept because they show useful details.
2017-08-20 15:49:10 +10:00
a10a7f42de PyAPI: Integer conversion functions
Python's C-API doesn't provide functions to get
int's at specific integer sizes.

Leaving the caller to check for overflow,
which ended up being ignored in practice.

Add API functions that convert int/uint 8/16/32/64, also bool.
Raising overflow exception for unsupported ranges.
2017-08-20 15:39:08 +10:00
2ff9c8a3bc PyAPI: avoid redundant PyLong_AsLong call
Assigning to an RNA array converted from Python to C twice.
2017-08-20 15:30:14 +10:00
64c7cf2036 PyAPI: correct int range checking 2017-08-20 10:34:21 +10:00
07ca9860e2 [windows/make.bat] add option to automatically download libs.
The thing that most often still goes wrong for new users building blender on windows is checking out the libraries, some skip over the wiki, some check out to the wrong folder, in an effort to reduce the time i spend on this, I added detection of svn and misisng libs to make.bat .

When the user has svn installed, and the libdir is missing he'll be asked if he wants to download them

if svn is not installed, or the user chooses 'no' the current error message is shown.

Reviewers: Blendify, sergey, juicyfruit

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2782
2017-08-19 12:00:45 -06:00
c22b52cd36 Fix T52452: OSL trace broken after shadow catcher recent changes.
We should only early out with any hit in BVH traversal if the only visibility
bits used are opaque shadow. Not when opaque shadow is one of multiple bits.
2017-08-19 18:14:16 +02:00
4218b9367e Cycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
This is useful for testing with different devices, split kernel, OSL,
impact of integrator settings, etc.
2017-08-19 18:14:16 +02:00
cfa8b762e2 Code cleanup: move rng into path state.
Also pass by value and don't write back now that it is just a hash for seeding
and no longer an LCG state. Together this makes CUDA a tiny bit faster in my
tests, but mainly simplifies code.
2017-08-19 18:14:16 +02:00
4e4e872478 PyAPI: Add gpu.matrix API 2017-08-20 00:01:19 +10:00
2332051419 Merge branch 'master' into blender2.8 2017-08-19 21:54:05 +10:00
1cc4033df8 PyAPI: expose matrix parsing function 2017-08-19 21:36:50 +10:00
4437ccf476 Correct error in gawain wrapper for non-gcc compilers 2017-08-19 20:22:15 +10:00
08094e8f23 Audaspace: cmake fixes, lowering to 3.0 minimum required. 2017-08-19 11:46:21 +02:00
4d428d14af Fix T52443: Cycles OpenCL build error after recent mesh lights changes. 2017-08-19 01:02:55 +02:00
d282dc04ef Cycles tests: add light type tests. 2017-08-18 17:09:12 +02:00
5cf36c0f05 Cycles tests: make page less wide, use relative URLs for serving through http. 2017-08-18 17:09:08 +02:00
4e468ceb71 PyAPI: Fix memory leak w/ empty, allocated enums 2017-08-18 18:29:27 +10:00
ac28a4fba7 Fix leak in Python BGE filter & image types 2017-08-18 00:55:16 +10:00
Stefan Werner
7a4696197d Cycles: Fix for a division by zero that could happen with solid angle triangle light sampling 2017-08-17 15:07:59 +02:00
743bacaa6f Fix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
To be backported.
2017-08-18 01:03:28 +12:00
Stefan Werner
8141eac2f8 Improved triangle sampling for mesh lights
This implements Arvo's "Stratified sampling of spherical triangles". Similar to how we sample rectangular area lights, this is sampling triangles over their solid angle. It does significantly improve sampling close to the triangle, but doesn't do much for more distant triangles. So I added a simple heuristic to switch between the two methods. Unfortunately, I expect this to add render time in any case, even when it does not make any difference whatsoever. It'll take some benchmarking with various scenes and hardware to estimate how severe the impact is and if it is worth the change.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: Vega-core, brecht, SteffenD

Tags: #cycles

Differential Revision: https://developer.blender.org/D2730
2017-08-17 12:44:32 +02:00
5492d2cb67 Cycles: Calculate correct remaining time when using a larger pixel size 2017-08-17 02:00:44 +02:00
3563 changed files with 192610 additions and 440066 deletions

View File

@@ -2,5 +2,6 @@
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/blender2.8",
"arc.land.update.default" : "rebase"
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "blender2.8"
}

4
.gitmodules vendored
View File

@@ -3,22 +3,18 @@
url = ../blender-addons.git
branch = blender2.8
ignore = all
branch = master
[submodule "release/scripts/addons_contrib"]
path = release/scripts/addons_contrib
url = ../blender-addons-contrib.git
branch = master
ignore = all
branch = master
[submodule "release/datafiles/locale"]
path = release/datafiles/locale
url = ../blender-translations.git
branch = master
ignore = all
branch = master
[submodule "source/tools"]
path = source/tools
url = ../blender-dev-tools.git
branch = master
ignore = all
branch = master

View File

@@ -45,7 +45,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()
endif()
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.5)
if(NOT EXECUTABLE_OUTPUT_PATH)
set(FIRST_RUN TRUE)
@@ -165,7 +165,6 @@ option_defaults_init(
_init_OPENCOLORIO
_init_SDL
_init_FFTW3
_init_GAMEENGINE
_init_OPENSUBDIV
)
@@ -195,7 +194,7 @@ endif()
# Options
# First platform specific non-cached vars
if(UNIX AND NOT APPLE)
if(UNIX AND NOT (APPLE OR HAIKU))
set(WITH_X11 ON)
endif()
@@ -235,13 +234,6 @@ option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and
option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
mark_as_advanced(WITH_SYSTEM_BULLET)
option(WITH_GAMEENGINE "Enable Game Engine" ${_init_GAMEENGINE})
if(APPLE)
set(WITH_GAMEENGINE_DECKLINK OFF)
else()
option(WITH_GAMEENGINE_DECKLINK "Support BlackMagicDesign DeckLink cards in the Game Engine" ON)
endif()
option(WITH_PLAYER "Build Player" OFF)
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
option(WITH_CLAY_ENGINE "Enable Clay engine" ON)
@@ -253,6 +245,8 @@ option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" _init_OPEN
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)
option(WITH_OPENVDB_3_ABI_COMPATIBLE "Assume OpenVDB library has been compiled with version 3 ABI compatibility" OFF)
mark_as_advanced(WITH_OPENVDB_3_ABI_COMPATIBLE)
# GHOST Windowing Library Options
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)
@@ -287,11 +281,12 @@ endif()
if(WITH_X11)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
option(WITH_X11_ALPHA "Enable X11 transparent background" ON)
endif()
if(UNIX AND NOT APPLE)
option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" ON)
option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" OFF)
option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system" ON)
else()
# not an option for other OS's
@@ -311,7 +306,6 @@ endif()
# Modifiers
option(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON)
option(WITH_MOD_SMOKE "Enable Smoke Modifier (Smoke Simulation)" ON)
option(WITH_MOD_BOOLEAN "Enable Boolean Modifier" ON)
option(WITH_MOD_REMESH "Enable Remesh Modifier" ON)
# option(WITH_MOD_CLOTH_ELTOPO "Enable Experimental cloth solver" OFF) # this is now only available in a branch
# mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
@@ -336,10 +330,6 @@ option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd
option(WITH_ALEMBIC "Enable Alembic Support" OFF)
option(WITH_ALEMBIC_HDF5 "Enable Legacy Alembic Support (not officially supported)" OFF)
if(APPLE)
option(WITH_CODEC_QUICKTIME "Enable Quicktime Support" OFF)
endif()
# 3D format support
# Disable opencollada when we don't have precompiled libs
option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" ${_init_OPENCOLLADA})
@@ -418,16 +408,25 @@ 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_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
set(CYCLES_CUDA_BINARIES_ARCH sm_20 sm_21 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_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")
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
option(WITH_CYCLES_NATIVE_ONLY "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF)
mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
mark_as_advanced(WITH_CYCLES_LOGGING)
mark_as_advanced(WITH_CYCLES_DEBUG)
mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
option(WITH_CYCLES_DEVICE_CUDA "Enable Cycles CUDA compute support" ON)
option(WITH_CYCLES_DEVICE_OPENCL "Enable Cycles OpenCL compute support" ON)
option(WITH_CYCLES_NETWORK "Enable Cycles compute over network support (EXPERIMENTAL and unfinished)" OFF)
mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
mark_as_advanced(WITH_CYCLES_DEVICE_OPENCL)
mark_as_advanced(WITH_CYCLES_NETWORK)
option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime" ON)
mark_as_advanced(WITH_CUDA_DYNLOAD)
@@ -459,7 +458,8 @@ option(WITH_BOOST "Enable features depending on boost" ON)
# Unit testsing
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_OPENGL_TESTS "Enable OpenGL related unit testing (Experimental)" OFF)
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
# Documentation
@@ -498,7 +498,12 @@ endif()
# Experimental support of C11 and C++11
#
# We default options to whatever default standard in the current compiler.
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
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)
@@ -516,10 +521,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
mark_as_advanced(WITH_LINKER_GOLD)
endif()
# Dependency graph
option(WITH_DEPSGRAPH_COPY_ON_WRITE "Build Blender with copy-on-write support for dependency graph" OFF)
mark_as_advanced(WITH_DEPSGRAPH_COPY_ON_WRITE)
if(WIN32)
# Use hardcoded paths or find_package to find externals
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
@@ -533,6 +534,9 @@ if(WIN32)
set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING "password for pfx file used for codesigning.")
mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
endif()
# avoid using again
@@ -568,15 +572,17 @@ endif()
#-----------------------------------------------------------------------------
# Check for conflicting/unsupported configurations
if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_STANDALONE)
if(NOT WITH_BLENDER AND NOT WITH_CYCLES_STANDALONE)
message(FATAL_ERROR
"At least one of WITH_BLENDER or WITH_PLAYER or "
"WITH_CYCLES_STANDALONE must be enabled, nothing to do!"
"At least one of WITH_BLENDER or WITH_CYCLES_STANDALONE "
"must be enabled, nothing to do!"
)
endif()
if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
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)
@@ -586,9 +592,6 @@ if(NOT WITH_AUDASPACE)
if(WITH_JACK)
message(FATAL_ERROR "WITH_JACK requires WITH_AUDASPACE")
endif()
if(WITH_GAMEENGINE)
message(FATAL_ERROR "WITH_GAMEENGINE requires WITH_AUDASPACE")
endif()
endif()
if(NOT WITH_SDL AND WITH_GHOST_SDL)
@@ -596,10 +599,6 @@ if(NOT WITH_SDL AND WITH_GHOST_SDL)
endif()
# python module, needs some different options
if(WITH_PYTHON_MODULE AND WITH_PLAYER)
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PLAYER to be OFF")
endif()
if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
endif()
@@ -630,9 +629,8 @@ if(NOT WITH_BOOST)
set_and_warn(WITH_INTERNATIONAL OFF)
set_and_warn(WITH_OPENVDB OFF)
set_and_warn(WITH_OPENCOLORIO OFF)
set_and_warn(WITH_MOD_BOOLEAN OFF)
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_MOD_BOOLEAN)
WITH_OPENVDB OR WITH_OPENCOLORIO)
# Keep enabled
else()
# New dependency graph needs either Boost or C++11 for function bindings.
@@ -674,6 +672,7 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_X11 OFF)
set(WITH_X11_XINPUT OFF)
set(WITH_X11_XF86VMODE OFF)
set(WITH_X11_XFIXES OFF)
set(WITH_X11_ALPHA OFF)
set(WITH_GHOST_XDND OFF)
set(WITH_INPUT_IME OFF)
@@ -705,8 +704,13 @@ if(WITH_AUDASPACE)
endif()
endif()
if(APPLE)
apple_check_quicktime()
# Auto-enable CUDA dynload if toolkit is not found.
if(NOT WITH_CUDA_DYNLOAD)
find_package(CUDA)
if (NOT CUDA_FOUND)
message("CUDA toolkit not found, using dynamic runtime loading of libraries instead")
set(WITH_CUDA_DYNLOAD ON)
endif()
endif()
#-----------------------------------------------------------------------------
@@ -728,6 +732,17 @@ if(WITH_INTERNATIONAL)
endif()
if(WITH_PYTHON)
# While we have this as an '#error' in 'bpy_capi_utils.h',
# upgrading Python tends to cause confusion for users who build.
# Give the error message early to make this more obvious.
#
# 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")
endif()
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules")
message(WARNING
"Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
@@ -797,6 +812,14 @@ if(WITH_X11)
endif()
endif()
if(WITH_X11_XFIXES)
if(X11_Xfixes_LIB)
list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
else()
set(WITH_X11_XFIXES OFF)
endif()
endif()
if(WITH_X11_ALPHA)
find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
mark_as_advanced(X11_Xrender_LIB)
@@ -1201,7 +1224,7 @@ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
if(WIN32)
set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/src/windows)
else()
set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/src)
set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/include)
endif()
endif()
endif()
@@ -1274,6 +1297,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_TYPE_LIMITS -Wtype-limits)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_FORMAT_SIGN -Wformat-signedness)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_RESTRICT -Wrestrict)
# gcc 4.2 gives annoying warnings on every file with this
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
@@ -1315,6 +1339,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_WRITE_STRINGS -Wwrite-strings)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_FORMAT_SIGN -Wformat-signedness)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_RESTRICT -Wrestrict)
# gcc 4.2 gives annoying warnings on every file with this
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
@@ -1336,6 +1361,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
# 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)
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)
@@ -1347,11 +1373,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(APPLE AND WITH_OPENMP) # we need the Intel omp lib linked here to not fail all tests due presence of -fopenmp !
set(CMAKE_REQUIRED_FLAGS "-L${LIBDIR}/openmp/lib -liomp5") # these are only used for the checks
endif()
# strange, clang complains these are not supported, but then yses them.
# strange, clang complains these are not supported, but then uses them.
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE -Werror=return-type)
@@ -1404,8 +1426,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
# disable numbered, false positives
set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556")
set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556")
set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
# most msvc warnings are C & C++
set(_WARNINGS
@@ -1423,8 +1445,10 @@ 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
# errors:
"/we4013" # 'function' undefined; assuming extern returning int
"/we4133" # incompatible pointer types
"/we4431" # missing type specifier - int assumed
)
@@ -1540,7 +1564,7 @@ if(WITH_GTESTS)
include(GTestTesting)
endif()
if(WITH_BLENDER OR WITH_PLAYER)
if(WITH_BLENDER)
add_subdirectory(intern)
add_subdirectory(extern)
@@ -1565,13 +1589,6 @@ if(WITH_BLENDER)
endif()
#-----------------------------------------------------------------------------
# Blender Player
if(WITH_PLAYER)
add_subdirectory(source/blenderplayer)
endif()
#-----------------------------------------------------------------------------
# Testing
add_subdirectory(tests)
@@ -1585,10 +1602,7 @@ include(build_files/cmake/packaging.cmake)
# Use dynamic loading for OpenMP
if(WITH_BLENDER)
openmp_delayload(blender)
endif(WITH_BLENDER)
if(WITH_PLAYER)
openmp_delayload(blenderplayer)
endif(WITH_PLAYER)
endif()
#-----------------------------------------------------------------------------
# Print Final Configuration
@@ -1622,8 +1636,6 @@ if(FIRST_RUN)
message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"")
info_cfg_text("Build Options:")
info_cfg_option(WITH_GAMEENGINE)
info_cfg_option(WITH_PLAYER)
info_cfg_option(WITH_BULLET)
info_cfg_option(WITH_IK_SOLVER)
info_cfg_option(WITH_IK_ITASC)
@@ -1646,6 +1658,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_INSTALL_PORTABLE)
info_cfg_option(WITH_X11_ALPHA)
info_cfg_option(WITH_X11_XF86VMODE)
info_cfg_option(WITH_X11_XFIXES)
info_cfg_option(WITH_X11_XINPUT)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)
@@ -1685,7 +1698,6 @@ if(FIRST_RUN)
endif()
info_cfg_text("Modifiers:")
info_cfg_option(WITH_MOD_BOOLEAN)
info_cfg_option(WITH_MOD_REMESH)
info_cfg_option(WITH_MOD_FLUID)
info_cfg_option(WITH_MOD_OCEANSIM)
@@ -1706,4 +1718,3 @@ endif()
if(0)
print_all_vars()
endif()

View File

@@ -48,6 +48,11 @@ 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)
endif
# Allow to use alternative binary (pypy3, etc)
ifndef PYTHON
PYTHON:=python3
@@ -231,9 +236,10 @@ help: .FORCE
@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 " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@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."
@@ -418,12 +424,22 @@ icons: .FORCE
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
icons_geom: .FORCE
BLENDER_BIN="$(BUILD_DIR)/bin/blender" \
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
update: .FORCE
if [ "$(OS_NCASE)" = "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
fi
if [ -d "../lib" ]; then \
svn cleanup ../lib/* ; \
svn update ../lib/* ; \
fi
git pull --rebase
git submodule update --remote
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
# -----------------------------------------------------------------------------

View File

@@ -58,7 +58,6 @@ include(cmake/openexr.cmake)
include(cmake/freetype.cmake)
include(cmake/freeglut.cmake)
include(cmake/glew.cmake)
include(cmake/hdf5.cmake)
include(cmake/alembic.cmake)
include(cmake/glfw.cmake)
include(cmake/clew.cmake)
@@ -76,9 +75,11 @@ include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/requests.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/numpy.cmake)
include(cmake/webp.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(WIN32)
include(cmake/hidapi.cmake)
endif()
@@ -94,6 +95,7 @@ else()
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/openjpeg.cmake)
if(BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
@@ -107,7 +109,6 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/schroedinger.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/openjpeg.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)

View File

@@ -72,4 +72,9 @@ ExternalProject_Add(external_alembic
INSTALL_DIR ${LIBDIR}/alembic
)
add_dependencies(external_alembic external_boost external_zlib external_ilmbase)
add_dependencies(
external_alembic
external_boost
external_zlib
external_ilmbase
)

View File

@@ -47,7 +47,10 @@ if(BUILD_MODE STREQUAL Release)
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb32
)
add_dependencies(external_blendthumb_32 external_zlib_32)
add_dependencies(
external_blendthumb_32
external_zlib_32
)
ExternalProject_Add(external_blendthumb_64
CMAKE_GENERATOR ${GENERATOR_64}
@@ -56,6 +59,9 @@ if(BUILD_MODE STREQUAL Release)
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb64
)
add_dependencies(external_blendthumb_64 external_zlib_64)
add_dependencies(
external_blendthumb_64
external_zlib_64
)
endif()
endif()

View File

@@ -37,7 +37,13 @@ ExternalProject_Add(external_blosc
INSTALL_DIR ${LIBDIR}/blosc
)
add_dependencies(external_blosc external_zlib)
add_dependencies(
external_blosc
external_zlib
)
if(WIN32)
add_dependencies(external_blosc external_pthreads)
add_dependencies(
external_blosc
external_pthreads
)
endif()

View File

@@ -40,22 +40,33 @@ if(WIN32)
set(semi_path "${PATCH_DIR}/semi.txt")
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
echo using python : 3.5 : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
type ${semi_path} >> "${JAM_FILE}"
)
set(BOOST_BUILD_COMMAND bjam)
set(BOOST_BUILD_OPTIONS runtime-link=static --user-config=user-config.jam)
set(BOOST_WITH_PYTHON --with-python)
#--user-config=user-config.jam
set(BOOST_BUILD_OPTIONS runtime-link=static )
#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/)
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_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_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
endif()
set(BOOST_OPTIONS
@@ -88,12 +99,16 @@ ExternalProject_Add(external_boost
URL_HASH MD5=${BOOST_MD5}
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_IN_SOURCE 1
INSTALL_COMMAND ""
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WIN32)
add_dependencies(external_boost Make_Python_Environment)
add_dependencies(
external_boost
Make_Python_Environment
)
endif()

View File

@@ -28,8 +28,27 @@ ExternalProject_Add(external_clang
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_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
)
add_dependencies(external_clang ll)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
else()
set(CLANG_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(external_clang after_install
COMMAND ${CLANG_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()
add_dependencies(
external_clang
ll
)

View File

@@ -30,13 +30,14 @@ if(WIN32)
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
)
)
else()
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--enable-static
--disable-shared
--enable-libopenjpeg)
--enable-libopenjpeg
)
endif()
if(APPLE)
@@ -102,18 +103,34 @@ 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
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}
INSTALL_DIR ${LIBDIR}/ffmpeg
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
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}
INSTALL_DIR ${LIBDIR}/ffmpeg
)
if(MSVC)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
endif(MSVC)
add_dependencies(external_ffmpeg external_zlib external_faad external_openjpeg external_xvidcore external_x264 external_schroedinger external_vpx external_theora external_vorbis external_ogg external_lame)
if(WIN32)
add_dependencies(external_ffmpeg external_zlib_mingw)
endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
external_schroedinger
external_vpx
external_theora
external_vorbis
external_ogg
external_lame
)
if(WIN32)
add_dependencies(
external_ffmpeg
external_zlib_mingw
)
endif()

View File

@@ -37,4 +37,4 @@ ExternalProject_Add(external_fftw3
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
endif(MSVC)
endif()

View File

@@ -29,4 +29,4 @@ ExternalProject_Add(external_flac
if(MSVC)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif(MSVC)
endif()

View File

@@ -26,16 +26,12 @@ endif()
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/ &&
# Boost copy lib + rename boost_1_60 to boost
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/ &&
# 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/ &&
@@ -98,8 +94,6 @@ if(BUILD_MODE STREQUAL Release)
# 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/ &&
# llvm
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ &&
# opencollada
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/ &&
# opensubdiv
@@ -108,24 +102,20 @@ if(BUILD_MODE STREQUAL Release)
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# alembic
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5 ${HARVEST_TARGET}/hdf5 &&
# 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}/python35.tar.gz ${HARVEST_TARGET}/Release/python35.tar.gz &&
# requests
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/requests ${HARVEST_TARGET}/Release/site-packages/requests &&
${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}/python35_numpy${PYTHON_POSTFIX}_1.10.tar.gz ${HARVEST_TARGET}/Release/python35_numpy_1.10.tar.gz &&
${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
DEPENDS
)
endif(BUILD_MODE STREQUAL Release)
)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
@@ -154,12 +144,6 @@ if(BUILD_MODE STREQUAL Debug)
${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 &&
# boost
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ &&
# llvm
${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/ &&
# 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 &&
@@ -178,12 +162,12 @@ if(BUILD_MODE STREQUAL Debug)
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python35_numpy_1.10d.tar.gz ${HARVEST_TARGET}/Release/python35_numpy_1.10d.tar.gz &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python35_d.tar.gz ${HARVEST_TARGET}/Release/python35_d.tar.gz
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
DEPENDS Package_Python
)
endif(BUILD_MODE STREQUAL Debug)
)
endif()
else(WIN32)
@@ -289,4 +273,4 @@ harvest(x264/lib ffmpeg/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
endif(WIN32)
endif()

View File

@@ -32,11 +32,11 @@ if(WIN32)
endif()
ExternalProject_Add(external_hdf5
URL ${HDF5_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HDF5_HASH}
PREFIX ${BUILD_DIR}/hdf5
PATCH_COMMAND ${HDF5_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hdf5
URL ${HDF5_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HDF5_HASH}
PREFIX ${BUILD_DIR}/hdf5
PATCH_COMMAND ${HDF5_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hdf5
)

View File

@@ -42,3 +42,20 @@ ExternalProject_Add(ll
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
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/
)
endif()
ExternalProject_Add_Step(ll after_install
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()

View File

@@ -1,40 +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(MSVC)
if(BUILD_MODE STREQUAL Release)
set(NUMPY_POSTFIX)
message("Python_binary = ${PYTHON_BINARY}")
message("Python_post = ${PYTHON_POSTFIX}")
ExternalProject_Add(external_numpy
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build
INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-3.5"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python35_numpy${PYTHON_POSTFIX}_1.11.tar.gz" "."
)
add_dependencies(external_numpy Make_Python_Environment)
endif()
endif()

View File

@@ -25,19 +25,21 @@ if(MSVC)
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif(BUILD_MODE STREQUAL Debug)
endif()
endif()
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/python3.5/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-3.5${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python35_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
${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" "."
)
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 .)
endif()
ExternalProject_Add(external_numpy
@@ -45,11 +47,14 @@ ExternalProject_Add(external_numpy
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ${NUMPY_INSTALL}
)
add_dependencies(external_numpy Make_Python_Environment)
add_dependencies(
external_numpy
Make_Python_Environment
)

View File

@@ -25,6 +25,7 @@ if(BUILD_MODE STREQUAL Release)
-DALSOFT_CONFIG=Off
-DALSOFT_HRTF_DEFS=Off
-DALSOFT_INSTALL=On
-DALSOFT_BACKEND_SNDIO=Off
)
if(UNIX)

View File

@@ -33,5 +33,8 @@ ExternalProject_Add(external_opencollada
)
if(UNIX AND NOT APPLE)
add_dependencies(external_opencollada external_xml2)
add_dependencies(
external_opencollada
external_xml2
)
endif()

View File

@@ -67,4 +67,7 @@ if(NOT WIN32)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
endif()
add_dependencies(external_opencolorio external_boost)
add_dependencies(
external_opencolorio
external_boost
)

View File

@@ -38,4 +38,8 @@ ExternalProject_Add(external_openexr
INSTALL_DIR ${LIBDIR}/openexr
)
add_dependencies(external_openexr external_zlib external_ilmbase)
add_dependencies(
external_openexr
external_zlib
external_ilmbase
)

View File

@@ -32,12 +32,35 @@ endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
endif()
if(WITH_WEBP)
set(WEBP_ARGS
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
)
set(WEBP_DEP external_webp)
endif()
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}
)
else()
set(OPENJPEG_FLAGS
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
@@ -59,7 +82,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
@@ -67,6 +90,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
-DBUILD_TESTING=OFF
@@ -78,6 +102,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
@@ -91,8 +116,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DSTOP_ON_WARNING=OFF
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
@@ -101,13 +125,28 @@ ExternalProject_Add(external_openimageio
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENIMAGEIO_HASH}
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_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
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
add_dependencies(external_openimageio external_png external_zlib external_ilmbase external_openexr external_jpeg external_boost external_tiff external_webp external_opencolorio)
add_dependencies(
external_openimageio
external_png external_zlib
external_ilmbase
external_openexr
external_jpeg
external_boost
external_tiff
external_opencolorio
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)
if(NOT WIN32)
add_dependencies(external_openimageio external_opencolorio_extra)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
endif()

View File

@@ -38,6 +38,27 @@ ExternalProject_Add(external_openjpeg
INSTALL_DIR ${LIBDIR}/openjpeg
)
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL ${OPENJPEG_URI}
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
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openjpeg_msvc after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
DEPENDEES install
)
endif()
endif()
set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif(MSVC)
endif()

View File

@@ -43,7 +43,7 @@ if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=${OPENSUBDIV_CUDA}
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/cl
-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}
@@ -54,6 +54,7 @@ else()
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
)
endif()
@@ -68,4 +69,10 @@ ExternalProject_Add(external_opensubdiv
INSTALL_DIR ${LIBDIR}/opensubdiv
)
add_dependencies(external_opensubdiv external_glew external_glfw external_clew external_cuew)
add_dependencies(
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
)

View File

@@ -61,11 +61,20 @@ ExternalProject_Add(openvdb
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 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
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
)
add_dependencies(openvdb external_tbb external_boost external_ilmbase external_openexr external_zlib external_blosc)
add_dependencies(
openvdb
external_tbb
external_boost
external_ilmbase
external_openexr
external_zlib
external_blosc
)

View File

@@ -19,19 +19,20 @@
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)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
endif()
Message("BuildMode = ${BUILD_MODE}")
message("BuildMode = ${BUILD_MODE}")
if(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
ELSE(BUILD_MODE STREQUAL "Debug")
else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
ENDIF(BUILD_MODE STREQUAL "Debug")
endif()
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
@@ -66,9 +67,9 @@ if(WIN32)
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /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 "/D_DEBUG /D PLATFORM_WINDOWS /MTd /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd /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")
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")
@@ -115,19 +116,24 @@ else()
set(LIBPREFIX "lib")
if(APPLE)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.9)
set(OSX_SDK_VERSION 10.12)
set(OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.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++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
set(PLATFORM_CFLAGS "-fPIC")

View File

@@ -78,10 +78,21 @@ ExternalProject_Add(external_osl
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 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
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
)
add_dependencies(external_osl external_boost ll external_clang external_ilmbase external_openexr external_zlib external_flexbison external_openimageio)
add_dependencies(
external_osl
external_boost
ll
external_clang
external_ilmbase
external_openexr
external_zlib
external_flexbison
external_openimageio
)

View File

@@ -31,7 +31,10 @@ ExternalProject_Add(external_png
INSTALL_DIR ${LIBDIR}/png
)
add_dependencies(external_png external_zlib)
add_dependencies(
external_png
external_zlib
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install

View File

@@ -35,11 +35,12 @@ if(WIN32)
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/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
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/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
INSTALL_DIR ${LIBDIR}/pthreads
)
endif()

View File

@@ -44,20 +44,22 @@ if(WIN32)
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
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
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
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}
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python35${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python35${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python35${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python3.5 &&
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python3.5/pyconfig.h
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}.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} &&
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
)
Message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
Message("POutput = ${PYTHON_OUTPUTDIR}")
message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
message("POutput = ${PYTHON_OUTPUTDIR}")
else()
if(APPLE)
# we need to manually add homebrew headers to get ssl module building
@@ -87,7 +89,7 @@ endif()
if(MSVC)
add_custom_command(
OUTPUT ${LIBDIR}/python35${PYTHON_POSTFIX}.tar.gz
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
@@ -112,10 +114,10 @@ if(MSVC)
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 chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python35${PYTHON_POSTFIX}.tar.gz" "."
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" "."
)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python35${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
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)
@@ -127,12 +129,12 @@ if(MSVC)
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
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python35${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python35.lib #missing postfix on purpose, distutils is not expecting it
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python35${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python35${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
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}.lib #missing postfix on purpose, distutils is not expecting it
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(MSVC)
endif()

View File

@@ -0,0 +1,41 @@
# ***** 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(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
)
else()
set(HARVEST_CMD echo .)
endif()
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
)
add_dependencies(
external_python_site_packages
Make_Python_Environment
)

View File

@@ -1,37 +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(BUILD_MODE STREQUAL Release)
if(WIN32)
set(REQUESTS_INSTALL_DIR ${LIBDIR}/requests)
else()
set(REQUESTS_INSTALL_DIR ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION}/site-packages/requests)
endif()
ExternalProject_Add(external_requests
URL ${REQUESTS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${REQUESTS_HASH}
PREFIX ${BUILD_DIR}/requests
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/requests/src/external_requests/requests ${REQUESTS_INSTALL_DIR}
)
add_dependencies(external_requests Make_Python_Environment)
endif(BUILD_MODE STREQUAL Release)

View File

@@ -38,7 +38,10 @@ ExternalProject_Add(external_schroedinger
INSTALL_DIR ${LIBDIR}/schroedinger
)
add_dependencies(external_schroedinger external_orc)
add_dependencies(
external_schroedinger
external_orc
)
if(MSVC)
set_target_properties(external_schroedinger PROPERTIES FOLDER Mingw)

View File

@@ -16,19 +16,30 @@
#
# ***** END GPL LICENSE BLOCK *****
set(LIBSNDFILE_EXTRA_ARGS)
set(LIBSNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
set(SNDFILE_EXTRA_ARGS)
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(LIBSNDFILE_ENV set ${LIBSNDFILE_ENV} &&)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
#shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
if(UNIX)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
else()
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
URL ${LIBSNDFILE_URI}
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LIBSNDFILE_HASH}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${LIBSNDFILE_ENV} ${CONFIGURE_COMMAND} --enable-static --disable-shared --prefix=${mingw_LIBDIR}/sndfile
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
INSTALL_DIR ${LIBDIR}/sndfile
@@ -38,7 +49,14 @@ if(MSVC)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
endif()
add_dependencies(external_sndfile external_ogg external_vorbis)
add_dependencies(
external_sndfile
external_ogg
external_vorbis
)
if(UNIX)
add_dependencies(external_sndfile external_flac)
add_dependencies(
external_sndfile
external_flac
)
endif()

View File

@@ -23,6 +23,14 @@ 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}
@@ -30,7 +38,7 @@ 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/vs2010/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/${TBB_VS_VERSION}/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
)

View File

@@ -33,7 +33,11 @@ ExternalProject_Add(external_theora
INSTALL_DIR ${LIBDIR}/theora
)
add_dependencies(external_theora external_vorbis external_ogg)
add_dependencies(
external_theora
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)

View File

@@ -34,7 +34,10 @@ ExternalProject_Add(external_tiff
INSTALL_DIR ${LIBDIR}/tiff
)
add_dependencies(external_tiff external_zlib)
add_dependencies(
external_tiff
external_zlib
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install

View File

@@ -104,10 +104,10 @@ set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/6de971097c
set(OPENCOLORIO_HASH c9de0fd98f26ce6f2e08d617ca68b8e4)
set(LLVM_VERSION 3.4.2)
set(LLVM_URI http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz)
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz)
set(LLVM_HASH a20669f75967440de949ac3b1bad439c)
set(CLANG_URI http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.gz)
set(CLANG_URI http://releases.llvm.org/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.gz)
set(CLANG_HASH 87945973b7c73038871c5f849a818588)
set(OPENIMAGEIO_VERSION 1.7.15)
@@ -131,27 +131,37 @@ 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.5.3)
set(PYTHON_SHORT_VERSION 3.5)
set(PYTHON_VERSION 3.6.2)
set(PYTHON_SHORT_VERSION 3.6)
set(PYTHON_SHORT_VERSION_NO_DOTS 36)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH 57d1f8bfbabf4f2500273fb0706e6f21)
set(PYTHON_HASH 2c68846471994897278364fc18730dd9)
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)
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(OPENVDB_VERSION 3.1.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 30a7e9571a03ab7bcf1a39fb62aa436f)
set(REQUESTS_VERSION v2.10.0)
set(REQUESTS_URI https://github.com/kennethreitz/requests/archive/${REQUESTS_VERSION}.zip)
set(REQUESTS_HASH 6ebefdf0210c7f0933f61501334e46c3)
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(NUMPY_VERSION v1.10.1)
set(NUMPY_SHORT_VERSION 1.10)
set(NUMPY_URI https://pypi.python.org/packages/a5/2e/5412784108f5dc0f827fb460ccdeaa9d76286979fe5ddd070d526d168a59/numpy-1.10.1.zip)
set(NUMPY_HASH 6f57c58bc5b28440fbeccd505da63d58)
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(LAME_VERSION 3.99.5)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.99/lame-${LAME_VERSION}.tar.gz)
@@ -192,9 +202,11 @@ set(XVIDCORE_VERSION 1.3.4)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f)
set(OPENJPEG_VERSION 1.5)
#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 60662566595e02104c0f6d1052f8b1669624c646e62b6280d5fd5a66d4e92f8d)
set(OPENJPEG_HASH 3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d)
set(FAAD_VERSION 2-2.7)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.bz2)
@@ -216,9 +228,9 @@ set(LAPACK_VERSION 3.6.0)
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
set(LAPACK_HASH f2f6c67134e851fe189bb3ca1fbb5101)
set(LIBSNDFILE_VERSION 1.0.26)
set(LIBSNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${LIBSNDFILE_VERSION}.tar.gz)
set(LIBSNDFILE_HASH ec810a0c60c08772a8a5552704b63393)
set(SNDFILE_VERSION 1.0.28)
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
#set(HIDAPI_VERSION 0.8.0-rc1)
#set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)

View File

@@ -31,7 +31,10 @@ ExternalProject_Add(external_vorbis
INSTALL_DIR ${LIBDIR}/vorbis
)
add_dependencies(external_vorbis external_ogg)
add_dependencies(
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)

View File

@@ -287,13 +287,13 @@ NO_BUILD=false
NO_CONFIRM=false
USE_CXX11=true # Mandatory in blender2.8
PYTHON_VERSION="3.5.3"
PYTHON_VERSION_MIN="3.5"
PYTHON_VERSION="3.6.2"
PYTHON_VERSION_MIN="3.6"
PYTHON_FORCE_BUILD=false
PYTHON_FORCE_REBUILD=false
PYTHON_SKIP=false
NUMPY_VERSION="1.10.1"
NUMPY_VERSION="1.13.1"
NUMPY_VERSION_MIN="1.8"
NUMPY_FORCE_BUILD=false
NUMPY_FORCE_REBUILD=false
@@ -731,7 +731,7 @@ PRINT ""
# This has to be done here, because user might force some versions...
PYTHON_SOURCE=( "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz" )
NUMPY_SOURCE=( "http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" )
NUMPY_SOURCE=( "https://github.com/numpy/numpy/releases/download/v$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" )
_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" )
@@ -753,8 +753,8 @@ OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION
OIIO_SOURCE_REPO=( "https://github.com/OpenImageIO/oiio.git" )
OIIO_SOURCE_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
LLVM_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
LLVM_CLANG_SOURCE=( "http://llvm.org/releases/$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.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" )
OSL_USE_REPO=false
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
@@ -1152,7 +1152,7 @@ compile_Numpy() {
cd $_src
$_python/bin/python3 setup.py install --prefix=$_inst
$_python/bin/python3 setup.py install --old-and-unmanageable --prefix=$_inst
if [ -d $_inst ]; then
# Can't use _create_inst_shortcut here...
@@ -1254,7 +1254,11 @@ compile_Boost() {
#### Build OCIO ####
_init_ocio() {
_src=$SRC/OpenColorIO-$OCIO_VERSION
_git=false
if [ "$OCIO_USE_REPO" = true ]; then
_git=true
else
_git=false
fi
_inst=$INST/ocio-$OCIO_VERSION
_inst_shortcut=$INST/ocio
}
@@ -1646,7 +1650,6 @@ compile_OIIO() {
cmake_d="$cmake_d -D LINKSTATIC=OFF"
cmake_d="$cmake_d -D USE_SIMD=sse2"
cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
cmake_d="$cmake_d -D OPENEXR_VERSION=$OPENEXR_VERSION"
if [ "$_with_built_openexr" = true ]; then
@@ -1665,6 +1668,7 @@ compile_OIIO() {
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"
cmake_d="$cmake_d -D TXT2MAN="
#cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
#cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"

View File

@@ -0,0 +1,15 @@
--- 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

@@ -32,7 +32,6 @@ SET(_blosc_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/blosc
)

View File

@@ -32,7 +32,6 @@ SET(_cppunit_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/cppunit
)

View File

@@ -21,9 +21,9 @@
# ILMBASE_FOUND - True if IlmBase was found.
# Other standarnd issue macros
include (FindPackageHandleStandardArgs)
include (FindPackageMessage)
include (SelectLibraryConfigurations)
include(FindPackageHandleStandardArgs)
include(FindPackageMessage)
include(SelectLibraryConfigurations)
if( ILMBASE_USE_STATIC_LIBS )
@@ -36,42 +36,42 @@ if( ILMBASE_USE_STATIC_LIBS )
endif()
# Macro to assemble a helper state variable
macro (SET_STATE_VAR varname)
set (tmp_ilmbaselibs ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments (tmp_ilmbaselibs)
set (tmp_lst
macro(SET_STATE_VAR varname)
set(tmp_ilmbaselibs ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(tmp_ilmbaselibs)
set(tmp_lst
${ILMBASE_CUSTOM} | ${tmp_ilmbaselibs} |
${ILMBASE_HOME} | ${ILMBASE_VERSION} | ${ILMBASE_LIB_AREA}
)
set (${varname} "${tmp_lst}")
unset (tmp_ilmbaselibs)
unset (tmp_lst)
endmacro ()
set(${varname} "${tmp_lst}")
unset(tmp_ilmbaselibs)
unset(tmp_lst)
endmacro()
# To enforce that find_* functions do not use inadvertently existing versions
if (ILMBASE_CUSTOM)
set (ILMBASE_FIND_OPTIONS "NO_DEFAULT_PATH")
endif ()
if(ILMBASE_CUSTOM)
set(ILMBASE_FIND_OPTIONS "NO_DEFAULT_PATH")
endif()
# Macro to search for an include directory
macro (PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string (TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATH_SUFFIXES include
${ILMBASE_FIND_OPTIONS}
)
if (${tmp_varname})
mark_as_advanced (${tmp_varname})
endif ()
unset (tmp_varname)
endmacro ()
if(${tmp_varname})
mark_as_advanced(${tmp_varname})
endif()
unset(tmp_varname)
endmacro()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro (PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string (TOUPPER ${prefix}_${libname} tmp_prefix)
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string(TOUPPER ${prefix}_${libname} tmp_prefix)
# 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 )
@@ -89,86 +89,90 @@ macro (PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
${ILMBASE_FIND_OPTIONS}
)
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
select_library_configurations (${tmp_prefix})
list (APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
select_library_configurations(${tmp_prefix})
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list (APPEND ${cachelist_var}
list(APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
mark_as_advanced (
mark_as_advanced(
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset (tmp_prefix)
endmacro ()
unset(tmp_prefix)
endmacro()
# Encode the current state of the external variables into a string
SET_STATE_VAR (ILMBASE_CURRENT_STATE)
SET_STATE_VAR(ILMBASE_CURRENT_STATE)
# If the state has changed, clear the cached variables
if (ILMBASE_CACHED_STATE AND
if(ILMBASE_CACHED_STATE AND
NOT ILMBASE_CACHED_STATE STREQUAL ILMBASE_CURRENT_STATE)
foreach (libvar ${ILMBASE_CACHED_VARS})
unset (${libvar} CACHE)
endforeach ()
endif ()
foreach(libvar ${ILMBASE_CACHED_VARS})
unset(${libvar} CACHE)
endforeach()
endif()
# Generic search paths
set (IlmBase_generic_include_paths
set(IlmBase_generic_include_paths
${ILMBASE_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include)
set (IlmBase_generic_library_paths
/opt/local/include
)
set(IlmBase_generic_library_paths
${ILMBASE_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib)
/opt/local/lib
)
# Search paths for the IlmBase files
if (ILMBASE_HOME)
if (ILMBASE_VERSION)
set (IlmBase_include_paths
if(ILMBASE_HOME)
if(ILMBASE_VERSION)
set(IlmBase_include_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/include
${ILMBASE_HOME}/include/ilmbase-${ILMBASE_VERSION})
set (IlmBase_library_paths
${ILMBASE_HOME}/include/ilmbase-${ILMBASE_VERSION}
)
set(IlmBase_library_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/lib
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION})
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION}
)
endif()
list (APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
set (IlmBase_library_paths
list(APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
set(IlmBase_library_paths
${ILMBASE_HOME}/lib
${ILMBASE_HOME}/lib64
${ILMBASE_LIB_AREA}
${IlmBase_library_paths})
endif ()
list (APPEND IlmBase_include_paths ${IlmBase_generic_include_paths})
list (APPEND IlmBase_library_paths ${IlmBase_generic_library_paths})
endif()
list(APPEND IlmBase_include_paths ${IlmBase_generic_include_paths})
list(APPEND IlmBase_library_paths ${IlmBase_generic_library_paths})
# Locate the header files
PREFIX_FIND_INCLUDE_DIR (IlmBase
PREFIX_FIND_INCLUDE_DIR(IlmBase
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)
if (ILMBASE_INCLUDE_DIR)
if(ILMBASE_INCLUDE_DIR)
# Get the version from config file, if not already set.
if (NOT ILMBASE_VERSION)
if(NOT ILMBASE_VERSION)
FILE(STRINGS "${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h" ILMBASE_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
if(ILMBASE_BUILD_SPECIFICATION)
if (NOT IlmBase_FIND_QUIETLY)
if(NOT IlmBase_FIND_QUIETLY)
message(STATUS "${ILMBASE_BUILD_SPECIFICATION}")
endif ()
endif()
string(REGEX REPLACE ".*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
@@ -178,71 +182,71 @@ if (ILMBASE_INCLUDE_DIR)
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
endif()
endif()
endif ()
endif()
if (ILMBASE_CUSTOM)
if (NOT ILMBASE_CUSTOM_LIBRARIES)
message (FATAL_ERROR "Custom IlmBase libraries requested but ILMBASE_CUSTOM_LIBRARIES is not set.")
if(ILMBASE_CUSTOM)
if(NOT ILMBASE_CUSTOM_LIBRARIES)
message(FATAL_ERROR "Custom IlmBase libraries requested but ILMBASE_CUSTOM_LIBRARIES is not set.")
endif()
set (IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
set(IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(IlmBase_Libraries)
else ()
#elseif (${ILMBASE_VERSION} VERSION_LESS "2.1")
set (IlmBase_Libraries Half Iex Imath IlmThread)
#else ()
else()
#elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
set(IlmBase_Libraries Half Iex Imath IlmThread)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set (IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
endif ()
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
endif()
# Locate the IlmBase libraries
set (IlmBase_libvars "")
set (IlmBase_cachevars "")
foreach (ilmbase_lib ${IlmBase_Libraries})
PREFIX_FIND_LIB (IlmBase ${ilmbase_lib}
set(IlmBase_libvars "")
set(IlmBase_cachevars "")
foreach(ilmbase_lib ${IlmBase_Libraries})
PREFIX_FIND_LIB(IlmBase ${ilmbase_lib}
IlmBase_library_paths IlmBase_libvars IlmBase_cachevars)
endforeach ()
endforeach()
# Create the list of variables that might need to be cleared
set (ILMBASE_CACHED_VARS
set(ILMBASE_CACHED_VARS
ILMBASE_INCLUDE_DIR ${IlmBase_cachevars}
CACHE INTERNAL "Variables set by FindIlmBase.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set (ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
set(ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindIlmBase.cmake" FORCE)
# Link with pthreads if required
if (NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
file (STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
if(NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
file(STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
ILMBASE_HAVE_PTHREAD
REGEX "^[ \\t]*#define[ \\t]+HAVE_PTHREAD[ \\t]1[ \\t]*\$"
)
if (ILMBASE_HAVE_PTHREAD)
find_package (Threads)
if (CMAKE_USE_PTHREADS_INIT)
set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
endif ()
endif ()
endif ()
if(ILMBASE_HAVE_PTHREAD)
find_package(Threads)
if(CMAKE_USE_PTHREADS_INIT)
set(ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
endif()
endif()
endif()
# Use the standard function to handle ILMBASE_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS (IlmBase DEFAULT_MSG
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IlmBase DEFAULT_MSG
ILMBASE_INCLUDE_DIR ${IlmBase_libvars})
if (ILMBASE_FOUND)
set (ILMBASE_LIBRARIES "")
foreach (tmplib ${IlmBase_libvars})
list (APPEND ILMBASE_LIBRARIES ${${tmplib}})
endforeach ()
list (APPEND ILMBASE_LIBRARIES ${ILMBASE_PTHREADS})
if (NOT IlmBase_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE (ILMBASE
if(ILMBASE_FOUND)
set(ILMBASE_LIBRARIES "")
foreach(tmplib ${IlmBase_libvars})
list(APPEND ILMBASE_LIBRARIES ${${tmplib}})
endforeach()
list(APPEND ILMBASE_LIBRARIES ${ILMBASE_PTHREADS})
if(NOT IlmBase_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE(ILMBASE
"Found IlmBase: ${ILMBASE_LIBRARIES}"
"[${ILMBASE_INCLUDE_DIR}][${ILMBASE_LIBRARIES}][${ILMBASE_CURRENT_STATE}]"
)
endif ()
endif ()
endif()
endif()
# Restore the original find library ordering
if( ILMBASE_USE_STATIC_LIBS )
@@ -250,11 +254,11 @@ if( ILMBASE_USE_STATIC_LIBS )
endif()
# Unset the helper variables to avoid pollution
unset (ILMBASE_CURRENT_STATE)
unset (IlmBase_include_paths)
unset (IlmBase_library_paths)
unset (IlmBase_generic_include_paths)
unset (IlmBase_generic_library_paths)
unset (IlmBase_libvars)
unset (IlmBase_cachevars)
unset (ILMBASE_PTHREADS)
unset(ILMBASE_CURRENT_STATE)
unset(IlmBase_include_paths)
unset(IlmBase_library_paths)
unset(IlmBase_generic_include_paths)
unset(IlmBase_generic_library_paths)
unset(IlmBase_libvars)
unset(IlmBase_cachevars)
unset(ILMBASE_PTHREADS)

View File

@@ -32,7 +32,6 @@ SET(_logc4plus_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/logc4plus
)

View File

@@ -23,12 +23,12 @@
# OPENEXR_FOUND - True if OpenEXR was found.
# Other standarnd issue macros
include (SelectLibraryConfigurations)
include (FindPackageHandleStandardArgs)
include (FindPackageMessage)
include(SelectLibraryConfigurations)
include(FindPackageHandleStandardArgs)
include(FindPackageMessage)
if( OPENEXR_USE_STATIC_LIBS )
set( _openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(OPENEXR_USE_STATIC_LIBS)
set(_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
@@ -37,39 +37,39 @@ if( OPENEXR_USE_STATIC_LIBS )
endif()
# Macro to assemble a helper state variable
macro (SET_STATE_VAR varname)
set (tmp_lst
macro(SET_STATE_VAR varname)
set(tmp_lst
${OPENEXR_CUSTOM} | ${OPENEXR_CUSTOM_LIBRARY} |
${OPENEXR_HOME} | ${OPENEXR_VERSION} | ${OPENEXR_LIB_AREA}
)
set (${varname} "${tmp_lst}")
unset (tmp_lst)
endmacro ()
set(${varname} "${tmp_lst}")
unset(tmp_lst)
endmacro()
# To enforce that find_* functions do not use inadvertently existing versions
if (OPENEXR_CUSTOM)
set (OPENEXR_FIND_OPTIONS "NO_DEFAULT_PATH")
endif ()
if(OPENEXR_CUSTOM)
set(OPENEXR_FIND_OPTIONS "NO_DEFAULT_PATH")
endif()
# Macro to search for an include directory
macro (PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string (TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATH_SUFFIXES include
${OPENEXR_FIND_OPTIONS}
)
if (${tmp_varname})
mark_as_advanced (${tmp_varname})
endif ()
unset (tmp_varname)
endmacro ()
if(${tmp_varname})
mark_as_advanced(${tmp_varname})
endif()
unset(tmp_varname)
endmacro()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro (PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string (TOUPPER ${prefix}_${libname} tmp_prefix)
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string(TOUPPER ${prefix}_${libname} tmp_prefix)
# 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 )
@@ -86,89 +86,91 @@ macro (PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
${OPENEXR_FIND_OPTIONS}
)
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
select_library_configurations (${tmp_prefix})
list (APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
select_library_configurations(${tmp_prefix})
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list (APPEND ${cachelist_var}
list(APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
mark_as_advanced (
mark_as_advanced(
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset (tmp_prefix)
endmacro ()
unset(tmp_prefix)
endmacro()
# Encode the current state of the external variables into a string
SET_STATE_VAR (OPENEXR_CURRENT_STATE)
SET_STATE_VAR(OPENEXR_CURRENT_STATE)
# If the state has changed, clear the cached variables
if (OPENEXR_CACHED_STATE AND
if(OPENEXR_CACHED_STATE AND
NOT OPENEXR_CACHED_STATE STREQUAL OPENEXR_CURRENT_STATE)
foreach (libvar ${OPENEXR_CACHED_VARS})
unset (${libvar} CACHE)
endforeach ()
endif ()
foreach(libvar ${OPENEXR_CACHED_VARS})
unset(${libvar} CACHE)
endforeach()
endif()
# Generic search paths
set (OpenEXR_generic_include_paths
set(OpenEXR_generic_include_paths
${OPENEXR_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include)
set (OpenEXR_generic_library_paths
/opt/local/include
)
set(OpenEXR_generic_library_paths
${OPENEXR_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib)
/opt/local/lib
)
# Search paths for the OpenEXR files
if (OPENEXR_HOME)
set (OpenEXR_library_paths
if(OPENEXR_HOME)
set(OpenEXR_library_paths
${OPENEXR_HOME}/lib
${OPENEXR_HOME}/lib64)
if (OPENEXR_VERSION)
set (OpenEXR_include_paths
if(OPENEXR_VERSION)
set(OpenEXR_include_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/include
${OPENEXR_HOME}/include/openexr-${OPENEXR_VERSION})
list (APPEND OpenEXR_library_paths
list(APPEND OpenEXR_library_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/lib
${OPENEXR_HOME}/lib/openexr-${OPENEXR_VERSION})
endif()
list (APPEND OpenEXR_include_paths ${OPENEXR_HOME}/include)
if (OPENEXR_LIB_AREA)
list (INSERT OpenEXR_library_paths 2 ${OPENEXR_LIB_AREA})
endif ()
endif ()
if (ILMBASE_HOME AND OPENEXR_VERSION)
list (APPEND OpenEXR_include_paths
list(APPEND OpenEXR_include_paths ${OPENEXR_HOME}/include)
if(OPENEXR_LIB_AREA)
list(INSERT OpenEXR_library_paths 2 ${OPENEXR_LIB_AREA})
endif()
endif()
if(ILMBASE_HOME AND OPENEXR_VERSION)
list(APPEND OpenEXR_include_paths
${ILMBASE_HOME}/include/openexr-${OPENEXR_VERSION})
endif()
list (APPEND OpenEXR_include_paths ${OpenEXR_generic_include_paths})
list (APPEND OpenEXR_library_paths ${OpenEXR_generic_library_paths})
list(APPEND OpenEXR_include_paths ${OpenEXR_generic_include_paths})
list(APPEND OpenEXR_library_paths ${OpenEXR_generic_library_paths})
# Locate the header files
PREFIX_FIND_INCLUDE_DIR (OpenEXR
PREFIX_FIND_INCLUDE_DIR(OpenEXR
OpenEXR/ImfArray.h OpenEXR_include_paths)
if (OPENEXR_INCLUDE_DIR)
if(OPENEXR_INCLUDE_DIR)
# Get the version from config file, if not already set.
if (NOT OPENEXR_VERSION)
if(NOT OPENEXR_VERSION)
FILE(STRINGS "${OPENEXR_INCLUDE_DIR}/OpenEXR/OpenEXRConfig.h" OPENEXR_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
if(OPENEXR_BUILD_SPECIFICATION)
if (NOT OpenEXR_FIND_QUIETLY)
if(NOT OpenEXR_FIND_QUIETLY)
message(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
endif ()
endif()
string(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
@@ -178,56 +180,56 @@ if (OPENEXR_INCLUDE_DIR)
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
endif()
endif()
endif ()
endif()
if (OPENEXR_CUSTOM)
if (NOT OPENEXR_CUSTOM_LIBRARY)
message (FATAL_ERROR "Custom OpenEXR library requested but OPENEXR_CUSTOM_LIBRARY is not set.")
if(OPENEXR_CUSTOM)
if(NOT OPENEXR_CUSTOM_LIBRARY)
message(FATAL_ERROR "Custom OpenEXR library requested but OPENEXR_CUSTOM_LIBRARY is not set.")
endif()
set (OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
else ()
#elseif (${OPENEXR_VERSION} VERSION_LESS "2.1")
set (OpenEXR_Library IlmImf)
#else ()
set(OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
else()
#elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
set(OpenEXR_Library IlmImf)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
# set (OpenEXR_Library IlmImf-${_openexr_libs_ver})
endif ()
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
endif()
# Locate the OpenEXR library
set (OpenEXR_libvars "")
set (OpenEXR_cachevars "")
PREFIX_FIND_LIB (OpenEXR ${OpenEXR_Library}
set(OpenEXR_libvars "")
set(OpenEXR_cachevars "")
PREFIX_FIND_LIB(OpenEXR ${OpenEXR_Library}
OpenEXR_library_paths OpenEXR_libvars OpenEXR_cachevars)
# Create the list of variables that might need to be cleared
set (OPENEXR_CACHED_VARS
set(OPENEXR_CACHED_VARS
OPENEXR_INCLUDE_DIR ${OpenEXR_cachevars}
CACHE INTERNAL "Variables set by FindOpenEXR.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set (OPENEXR_CACHED_STATE ${OPENEXR_CURRENT_STATE}
set(OPENEXR_CACHED_STATE ${OPENEXR_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindOpenEXR.cmake" FORCE)
# Always link explicitly with zlib
set (OPENEXR_ZLIB ${ZLIB_LIBRARIES})
set(OPENEXR_ZLIB ${ZLIB_LIBRARIES})
# Use the standard function to handle OPENEXR_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS (OpenEXR DEFAULT_MSG
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
OPENEXR_INCLUDE_DIR ${OpenEXR_libvars})
if (OPENEXR_FOUND)
set (OPENEXR_LIBRARIES "")
foreach (tmplib ${OpenEXR_libvars})
list (APPEND OPENEXR_LIBRARIES ${${tmplib}})
endforeach ()
list (APPEND OPENEXR_LIBRARIES ${ZLIB_LIBRARIES})
if (NOT OpenEXR_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE (OPENEXR
if(OPENEXR_FOUND)
set(OPENEXR_LIBRARIES "")
foreach(tmplib ${OpenEXR_libvars})
list(APPEND OPENEXR_LIBRARIES ${${tmplib}})
endforeach()
list(APPEND OPENEXR_LIBRARIES ${ZLIB_LIBRARIES})
if(NOT OpenEXR_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE(OPENEXR
"Found OpenEXR: ${OPENEXR_LIBRARIES}"
"[${OPENEXR_INCLUDE_DIR}][${OPENEXR_LIBRARIES}][${OPENEXR_CURRENT_STATE}]"
)
endif ()
endif ()
endif()
endif()
# Restore the original find library ordering
if( OPENEXR_USE_STATIC_LIBS )
@@ -235,10 +237,10 @@ if( OPENEXR_USE_STATIC_LIBS )
endif()
# Unset the helper variables to avoid pollution
unset (OPENEXR_CURRENT_STATE)
unset (OpenEXR_include_paths)
unset (OpenEXR_library_paths)
unset (OpenEXR_generic_include_paths)
unset (OpenEXR_generic_library_paths)
unset (OpenEXR_libvars)
unset (OpenEXR_cachevars)
unset(OPENEXR_CURRENT_STATE)
unset(OpenEXR_include_paths)
unset(OpenEXR_library_paths)
unset(OpenEXR_generic_include_paths)
unset(OpenEXR_generic_library_paths)
unset(OpenEXR_libvars)
unset(OpenEXR_cachevars)

View File

@@ -32,7 +32,6 @@ SET(_tbb_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/tbb
)

View File

@@ -49,7 +49,7 @@ macro( select_library_configurations basename )
# if only the debug version was found, set the release value to be the
# debug value.
_set_library_name( ${basename} DEBUG RELEASE )
if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
# 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 )

View File

@@ -8,7 +8,7 @@ project(OpenVDB)
# --------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
# --------------------------------------------------------------------------------

View File

@@ -88,6 +88,14 @@ elseif(WIN32)
set(DISABLE_RTTI "/EHs- /GR- ")
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-flifetime-dse=1" SUPPORTS_FLIFETIME)
if (SUPPORTS_FLIFETIME)
add_definitions(-flifetime-dse=1)
endif()
endif()
# Linker export definitions
if (WIN32)
add_custom_command(OUTPUT tbb.def

View File

@@ -1,10 +1,11 @@
--- CMakeLists.txt 2016-11-01 01:03:44 -0600
+++ CMakeLists.txt 2016-12-01 09:20:12 -0700
@@ -454,7 +454,6 @@
@@ -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,3 +1,45 @@
--- 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 @@
@@ -8,19 +50,19 @@
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
@@ -126,7 +126,7 @@
@@ -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%^
-%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
@@ -95,7 +96,7 @@
@@ -130,7 +130,7 @@
rem batch is, shall we say, "lackluster"
echo on
msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^
%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%^

View File

@@ -1,28 +1,5 @@
--- Modules/expat/expat_external.h 2016-12-17 06:51:30 -0500
+++ Modules/expat/expat_external.h 2016-12-17 06:55:29 -0500
@@ -7,9 +7,17 @@
/* External API definitions */
-/* Namespace external symbols to allow multiple libexpat version to
- co-exist. */
-#include "pyexpatns.h"
+/*
+
+ HACK: Fix build breakage on MacOS:
+ *** WARNING: renaming "pyexpat" since importing it failed: dlopen(build/lib.macosx-10.6-i386-3.3/pyexpat.so, 2): Symbol not found: _XML_ErrorString
+ This reverts c242a8f30806 from the python hg repo:
+ restore namespacing of pyexpat symbols (closes #19186)
+ See http://bugs.python.org/issue19186#msg214069
+ The recommendation to include Modules/inc at first broke the Linux build...
+ So do it this way, as it was before. Needs some realignment later.
+
+*/
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
--- pyconfig.h.in 2017-04-05 02:47:52.000000000 +0200
+++ pyconfig.h.in 2017-04-05 02:51:33.000000000 +0200
--- 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
@@ -33,10 +10,10 @@
-/* Define to 1 if you have the `clock_gettime' function. */
-#undef HAVE_CLOCK_GETTIME
-
/* Define if the C compiler supports computed gotos. */
#undef HAVE_COMPUTED_GOTOS
/* Define to 1 if you have the `clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
@@ -338,9 +332,6 @@
@@ -369,9 +363,6 @@
/* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
#undef HAVE_GETC_UNLOCKED

View File

@@ -0,0 +1,42 @@
--- src/Makefile.in 2017-09-26 01:28:47.000000000 +0300
+++ src/Makefile.in 2017-09-26 01:19:06.000000000 +0300
@@ -513,7 +513,7 @@
libcommon_la_SOURCES = common.c file_io.c command.c pcm.c ulaw.c alaw.c \
float32.c double64.c ima_adpcm.c ms_adpcm.c gsm610.c dwvw.c vox_adpcm.c \
interleave.c strings.c dither.c cart.c broadcast.c audio_detect.c \
- ima_oki_adpcm.c ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c \
+ ima_oki_adpcm.c ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c \
windows.c id3.c $(WIN_VERSION_FILE)
@@ -719,10 +719,10 @@
$(AM_V_CCLD)$(LINK) $(GSM610_libgsm_la_OBJECTS) $(GSM610_libgsm_la_LIBADD) $(LIBS)
libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) $(EXTERNAL_XIPH_LIBS)
libsndfile.la: $(libsndfile_la_OBJECTS) $(libsndfile_la_DEPENDENCIES) $(EXTRA_libsndfile_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libsndfile_la_LINK) -rpath $(libdir) $(libsndfile_la_OBJECTS) $(libsndfile_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(libsndfile_la_LINK) -rpath $(libdir) $(libsndfile_la_OBJECTS) $(libsndfile_la_LIBADD) $(LIBS) $(EXTERNAL_XIPH_LIBS)
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -924,7 +924,7 @@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) -c -o libsndfile_la-dwd.lo `test -f 'dwd.c' || echo '$(srcdir)/'`dwd.c
libsndfile_la-flac.lo: flac.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) -MT libsndfile_la-flac.lo -MD -MP -MF $(DEPDIR)/libsndfile_la-flac.Tpo -c -o libsndfile_la-flac.lo `test -f 'flac.c' || echo '$(srcdir)/'`flac.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) $(EXTERNAL_XIPH_CFLAGS) -MT libsndfile_la-flac.lo -MD -MP -MF $(DEPDIR)/libsndfile_la-flac.Tpo -c -o libsndfile_la-flac.lo `test -f 'flac.c' || echo '$(srcdir)/'`flac.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsndfile_la-flac.Tpo $(DEPDIR)/libsndfile_la-flac.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='flac.c' object='libsndfile_la-flac.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@@ -1092,7 +1092,7 @@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) -c -o libsndfile_la-rf64.lo `test -f 'rf64.c' || echo '$(srcdir)/'`rf64.c
libsndfile_la-ogg_vorbis.lo: ogg_vorbis.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) -MT libsndfile_la-ogg_vorbis.lo -MD -MP -MF $(DEPDIR)/libsndfile_la-ogg_vorbis.Tpo -c -o libsndfile_la-ogg_vorbis.lo `test -f 'ogg_vorbis.c' || echo '$(srcdir)/'`ogg_vorbis.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsndfile_la_CPPFLAGS) $(CPPFLAGS) $(libsndfile_la_CFLAGS) $(CFLAGS) $(EXTERNAL_XIPH_CFLAGS) -MT libsndfile_la-ogg_vorbis.lo -MD -MP -MF $(DEPDIR)/libsndfile_la-ogg_vorbis.Tpo -c -o libsndfile_la-ogg_vorbis.lo `test -f 'ogg_vorbis.c' || echo '$(srcdir)/'`ogg_vorbis.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsndfile_la-ogg_vorbis.Tpo $(DEPDIR)/libsndfile_la-ogg_vorbis.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogg_vorbis.c' object='libsndfile_la-ogg_vorbis.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@

View File

@@ -101,8 +101,8 @@ cd %Staging%\%BuildDir%%ARCH%R
echo %DATE% %TIME% : Start > %StatusFile%
cmake -G "%CMAKE_BUILDER%" %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/
echo %DATE% %TIME% : Release Configuration done >> %StatusFile%
msbuild /m "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log
msbuild /m "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log
msbuild /m "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log;Verbosity=normal
msbuild /m "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
echo %DATE% %TIME% : Release Build done >> %StatusFile%
cmake --build . --target Harvest_Release_Results > Harvest_Release.txt
echo %DATE% %TIME% : Release Harvest done >> %StatusFile%
@@ -111,8 +111,8 @@ mkdir %STAGING%\%BuildDir%%ARCH%D
cd %Staging%\%BuildDir%%ARCH%D
cmake -G "%CMAKE_BUILDER%" %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
echo %DATE% %TIME% : Debug Configuration done >> %StatusFile%
msbuild /m "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log
msbuild /m "BlenderDependencies.sln" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps.log
msbuild /m "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log;;Verbosity=normal
msbuild /m "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
echo %DATE% %TIME% : Debug Build done >> %StatusFile%
cmake --build . --target Harvest_Debug_Results> Harvest_Debug.txt
echo %DATE% %TIME% : Debug Harvest done >> %StatusFile%

View File

@@ -5,15 +5,15 @@ include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_full.cmake")
# Detect which libc we'll be linking against.
# Some of the paths will depend on this
if (EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
if(EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
message(STATUS "Building in GLibc-2.19 environment")
set(GLIBC "2.19")
set(MULTILIB "/x86_64-linux-gnu")
elseif (EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
elseif(EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
message(STATUS "Building in GLibc-2.19 environment")
set(GLIBC "2.19")
set(MULTILIB "/i386-linux-gnu")
elseif (EXISTS "/lib/libc-2.11.3.so")
elseif(EXISTS "/lib/libc-2.11.3.so")
message(STATUS "Building in GLibc-2.11 environment")
set(GLIBC "2.11")
set(MULTILIB "")
@@ -21,9 +21,8 @@ else()
message(FATAL_ERROR "Unknown build environment")
endif()
# Default to only build Blender, not the player
# Default to only build Blender
set(WITH_BLENDER ON CACHE BOOL "" FORCE)
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
# ######## Linux-specific build options ########
# Options which are specific to Linux-only platforms
@@ -70,7 +69,7 @@ set(FFMPEG_LIBRARIES
)
# SndFile libraries
set(LIBSNDFILE_LIBRARY "/usr/lib/libsndfile.a;/usr/lib/libFLAC.a" CACHE STRING "" FORCE)
set(SNDFILE_LIBRARY "/usr/lib${MULTILIB}/libsndfile.a;/usr/lib${MULTILIB}/libFLAC.a" CACHE STRING "" FORCE)
# OpenAL libraries
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)
@@ -140,6 +139,10 @@ set(ZLIB_LIBRARY "/usr/lib${MULTILIB}/libz.a" CACHE STRING "" FORCE)
# OpenVDB
set(OPENVDB_LIBRARY
/opt/lib/openvdb/lib/libopenvdb.a
CACHE BOOL "" FORCE
)
set(BLOSC_LIBRARY
/opt/lib/blosc/lib/libblosc.a
CACHE BOOL "" FORCE
)

View File

@@ -1,12 +0,0 @@
# This is applied as an override on top of blender_linux.config
# Disables all the areas which are not needed for the player.
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
set(WITH_PLAYER ON CACHE BOOL "" FORCE)

View File

@@ -1,376 +0,0 @@
# -*- python -*-
# ex: set syntax=python:
# <pep8 compliant>
# List of the branches being built automatically overnight
NIGHT_SCHEDULE_BRANCHES = [None, "blender2.8"]
# List of the branches available for force build
FORCE_SCHEDULE_BRANCHES = ["master", "blender2.8", "experimental-build"]
"""
Stock Twisted directory lister doesn't provide any information about last file
modification time, we hack the class a bit in order to have such functionaliity
:)
"""
from buildbot.status.web.base import DirectoryLister
def get_files_and_directories(self, directory):
from twisted.web.static import (getTypeAndEncoding,
formatFileSize)
import urllib
import cgi
import time
import os
files = []
dirs = []
for path in directory:
url = urllib.quote(path, "/")
escapedPath = cgi.escape(path)
lastmodified = time.ctime(os.path.getmtime(
os.path.join(self.path, path)))
if os.path.isdir(os.path.join(self.path, path)):
url = url + '/'
dirs.append({'text': escapedPath + "/", 'href': url,
'size': '', 'type': '[Directory]',
'encoding': '',
'lastmodified': lastmodified})
else:
mimetype, encoding = getTypeAndEncoding(path, self.contentTypes,
self.contentEncodings,
self.defaultType)
try:
size = os.stat(os.path.join(self.path, path)).st_size
except OSError:
continue
files.append({
'text': escapedPath, "href": url,
'type': '[%s]' % mimetype,
'encoding': (encoding and '[%s]' % encoding or ''),
'size': formatFileSize(size),
'lastmodified': lastmodified})
return dirs, files
DirectoryLister._getFilesAndDirectories = get_files_and_directories
# Dictionary that the buildmaster pays attention to.
c = BuildmasterConfig = {}
# BUILD SLAVES
#
# We load the slaves and their passwords from a separator file, so we can have
# this one in SVN.
from buildbot.buildslave import BuildSlave
import master_private
c['slaves'] = []
for slave in master_private.slaves:
c['slaves'].append(BuildSlave(slave['name'], slave['password']))
# TCP port through which slaves connect
c['slavePortnum'] = 9989
# CHANGE SOURCES
from buildbot.changes.svnpoller import SVNPoller
from buildbot.changes.gitpoller import GitPoller
c['change_source'] = GitPoller(
'git://git.blender.org/blender.git',
pollinterval=1200)
# CODEBASES
#
# Allow to control separately things like branches for each repo and submodules.
all_repositories = {
r'git://git.blender.org/blender.git': 'blender',
r'git://git.blender.org/blender-translations.git': 'blender-translations',
r'git://git.blender.org/blender-addons.git': 'blender-addons',
r'git://git.blender.org/blender-addons-contrib.git': 'blender-addons-contrib',
r'git://git.blender.org/blender-dev-tools.git': 'blender-dev-tools',
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
}
def codebaseGenerator(chdict):
return all_repositories[chdict['repository']]
c['codebaseGenerator'] = codebaseGenerator
# SCHEDULERS
#
# Decide how to react to incoming changes.
# from buildbot.scheduler import Scheduler
from buildbot.schedulers import timed, forcesched
c['schedulers'] = []
def schedule_force_build(name):
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
builderNames=[name],
codebases=[forcesched.CodebaseParameter(
codebase="blender",
branch=forcesched.ChoiceStringParameter(
name="branch", choices=FORCE_SCHEDULE_BRANCHES, default="master"),
# Do not hide revision, can be handy!
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
project=forcesched.FixedParameter(name="project", default="", hide=True)),
# For now, hide other codebases.
forcesched.CodebaseParameter(hide=True, codebase="blender-translations"),
forcesched.CodebaseParameter(
codebase="blender-addons",
branch=forcesched.ChoiceStringParameter(
name="branch", choices=["master", "blender2.8"], default="master"),
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
project=forcesched.FixedParameter(name="project", default="", hide=True),
revision=forcesched.FixedParameter(name="revision", default="", hide=True),
),
forcesched.CodebaseParameter(hide=True, codebase="blender-addons-contrib"),
forcesched.CodebaseParameter(hide=True, codebase="blender-dev-tools"),
forcesched.CodebaseParameter(hide=True, codebase="lib svn")],
properties=[]))
def schedule_build(name, hour, minute=0):
for current_branch in NIGHT_SCHEDULE_BRANCHES:
scheduler_name = "nightly " + name
if current_branch:
scheduler_name += ' ' + current_branch
# Use special addons submodule branch when building blender2.8 branch.
addons_branch = "master"
if current_branch == "blender2.8":
addons_branch = "blender2.8"
c['schedulers'].append(timed.Nightly(name=scheduler_name,
codebases={
"blender": {"repository": ""},
"blender-translations": {"repository": "", "branch": "master"},
"blender-addons": {"repository": "", "branch": addons_branch},
"blender-addons-contrib": {"repository": "", "branch": "master"},
"blender-dev-tools": {"repository": "", "branch": "master"},
"lib svn": {"repository": "", "branch": "trunk"}},
branch=current_branch,
builderNames=[name],
hour=hour,
minute=minute))
# BUILDERS
#
# The 'builders' list defines the Builders, which tell Buildbot how to
# perform a build: what steps, and which slaves can execute them.
# Note that any particular build will only take place on one slave.
from buildbot.process.factory import BuildFactory
from buildbot.process.properties import Interpolate
from buildbot.steps.source import SVN
from buildbot.steps.source import Git
from buildbot.steps.shell import ShellCommand
from buildbot.steps.shell import Compile
from buildbot.steps.shell import Test
from buildbot.steps.transfer import FileUpload
from buildbot.steps.master import MasterShellCommand
from buildbot.config import BuilderConfig
# add builder utility
c['builders'] = []
buildernames = []
def add_builder(c, name, libdir, factory, branch='',
rsync=False, hour=3, minute=0):
slavenames = []
for slave in master_private.slaves:
if name in slave['builders']:
slavenames.append(slave['name'])
if len(slavenames) > 0:
f = factory(name, libdir, branch, rsync)
c['builders'].append(BuilderConfig(name=name,
slavenames=slavenames,
factory=f,
category='blender'))
buildernames.append(name)
schedule_build(name, hour, minute)
schedule_force_build(name)
# common steps
def git_submodule_step(submodule):
return Git(name=submodule + '.git',
repourl='git://git.blender.org/' + submodule + '.git',
mode='update',
codebase=submodule,
workdir=submodule + '.git')
def git_step(branch=''):
if branch:
return Git(name='blender.git',
repourl='git://git.blender.org/blender.git',
mode='update',
branch=branch,
codebase='blender',
workdir='blender.git',
submodules=True)
else:
return Git(name='blender.git',
repourl='git://git.blender.org/blender.git',
mode='update',
codebase='blender',
workdir='blender.git',
submodules=True)
def git_submodules_update():
command = ['git', 'submodule', 'update', '--remote']
return ShellCommand(name='Submodules Update',
command=command,
description='updating',
descriptionDone='up to date',
workdir='blender.git')
def lib_svn_step(dir):
name = "lib svn"
if dir == "darwin":
name = "C++11 lib svn"
return SVN(name=name,
baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir,
codebase='lib svn',
mode='update',
defaultBranch='trunk',
workdir='lib/' + dir)
def rsync_step(id, branch, rsync_script):
return ShellCommand(name='rsync',
command=['python', rsync_script, id, branch],
description='uploading',
descriptionDone='uploaded',
workdir='install')
# generic builder
def generic_builder(id, libdir='', branch='', rsync=False):
filename = 'uploaded/buildbot_upload_' + id + '.zip'
compile_script = '../blender.git/build_files/buildbot/slave_compile.py'
test_script = '../blender.git/build_files/buildbot/slave_test.py'
pack_script = '../blender.git/build_files/buildbot/slave_pack.py'
rsync_script = '../blender.git/build_files/buildbot/slave_rsync.py'
unpack_script = 'master_unpack.py'
f = BuildFactory()
if libdir != '':
f.addStep(lib_svn_step(libdir))
# Special trick to make sure we always have all the libs.
if libdir.startswith("darwin"):
f.addStep(lib_svn_step("darwin"))
for submodule in ('blender-translations',
'blender-addons',
'blender-addons-contrib',
'blender-dev-tools'):
f.addStep(git_submodule_step(submodule))
f.addStep(git_step(branch))
f.addStep(git_submodules_update())
f.addStep(Compile(command=['python', compile_script, id], timeout=3600))
f.addStep(Test(command=['python', test_script, id]))
f.addStep(ShellCommand(name='package',
command=['python', pack_script, id, branch or Interpolate('%(src:blender:branch)s')],
description='packaging',
descriptionDone='packaged'))
if rsync:
f.addStep(rsync_step(id, branch, rsync_script))
else:
f.addStep(FileUpload(name='upload',
slavesrc='buildbot_upload.zip',
masterdest=filename,
maxsize=180 * 1024 * 1024,
workdir='install'))
f.addStep(MasterShellCommand(name='unpack',
command=['python2.7', unpack_script, filename],
description='unpacking',
descriptionDone='unpacked'))
return f
# Builders
add_builder(c, 'mac_x86_64_10_6_cmake', 'darwin-9.x.universal', generic_builder, hour=5)
# add_builder(c, 'linux_glibc211_i686_cmake', '', generic_builder, hour=1)
# add_builder(c, 'linux_glibc211_x86_64_cmake', '', generic_builder, hour=2)
add_builder(c, 'linux_glibc219_i686_cmake', '', generic_builder, hour=3)
add_builder(c, 'linux_glibc219_x86_64_cmake', '', generic_builder, hour=4)
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
add_builder(c, 'win32_cmake_vc2015', 'windows_vc14', generic_builder, hour=5)
add_builder(c, 'win64_cmake_vc2015', 'win64_vc14', generic_builder, hour=6)
# STATUS TARGETS
#
# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# including web pages, email senders, and IRC bots.
c['status'] = []
from buildbot.status import html
from buildbot.status.web import authz
from buildbot.status.web import auth
users = []
for slave in master_private.slaves:
users += [(slave['name'], slave['password'])]
authz_cfg = authz.Authz(
auth=auth.BasicAuth(users),
# change any of these to True to enable; see the manual for more
# options
gracefulShutdown=False,
forceBuild=True, # use this to test your slave once it is set up
forceAllBuilds=False,
pingBuilder=False,
stopBuild=True,
stopAllBuilds=False,
cancelPendingBuild=True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
#c['status'].append(html.WebStatus(http_port=8010))
# PROJECT IDENTITY
c['projectName'] = "Blender"
c['projectURL'] = "http://www.blender.org"
# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.WebStatus page) is visible. This
# typically uses the port number set in the Waterfall 'status' entry, but
# with an externally-visible host name which the buildbot cannot figure out
# without some help.
c['buildbotURL'] = "http://builder.blender.org/"
# DB URL
#
# This specifies what database buildbot uses to store change and scheduler
# state. You can leave this at its default for all but the largest
# installations.
c['db_url'] = "sqlite:///state.sqlite"

View File

@@ -1,151 +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 #####
# Runs on Buildbot master, to unpack incoming unload.zip into latest
# builds directory and remove older builds.
# <pep8 compliant>
import os
import shutil
import sys
import zipfile
# extension stripping
def strip_extension(filename):
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
for ext in extensions:
if filename.endswith(ext):
filename = filename[:-len(ext)]
return filename
# extract platform from package name
def get_platform(filename):
# name is blender-version-platform.extension. we want to get the
# platform out, but there may be some variations, so we fiddle a
# bit to handle current and hopefully future names
filename = strip_extension(filename)
filename = strip_extension(filename)
tokens = filename.split("-")
platforms = ('osx', 'mac', 'bsd',
'win', 'linux', 'source',
'irix', 'solaris')
platform_tokens = []
found = False
for i, token in enumerate(tokens):
if not found:
for platform in platforms:
if platform in token.lower():
found = True
break
if found:
platform_tokens += [token]
return '-'.join(platform_tokens)
def get_branch(filename):
if filename.startswith("blender-2.8"):
return "blender2.8"
tokens = filename.split("-")
branch = ""
for token in tokens:
if token == "blender":
return branch
if branch == "":
branch = token
else:
branch = branch + "-" + token
return ""
# get filename
if len(sys.argv) < 2:
sys.stderr.write("Not enough arguments, expecting file to unpack\n")
sys.exit(1)
filename = sys.argv[1]
# open zip file
if not os.path.exists(filename):
sys.stderr.write("File %r not found.\n" % filename)
sys.exit(1)
try:
z = zipfile.ZipFile(filename, "r")
except Exception as ex:
sys.stderr.write('Failed to open zip file: %s\n' % str(ex))
sys.exit(1)
if len(z.namelist()) != 1:
sys.stderr.write("Expected one file in %r." % filename)
sys.exit(1)
package = z.namelist()[0]
packagename = os.path.basename(package)
# detect platform and branch
platform = get_platform(packagename)
branch = get_branch(packagename)
if platform == '':
sys.stderr.write('Failed to detect platform ' +
'from package: %r\n' % packagename)
sys.exit(1)
# extract
if not branch or branch == 'master':
directory = 'public_html/download'
elif branch == 'experimental-build':
directory = 'public_html/download/experimental'
else:
directory = 'public_html/download'
try:
filename = os.path.join(directory, packagename)
zf = z.open(package)
f = file(filename, "wb")
shutil.copyfileobj(zf, f)
os.chmod(filename, 0644)
zf.close()
z.close()
except Exception as ex:
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
sys.exit(1)
# remove other files from the same platform and branch
try:
for f in os.listdir(directory):
if get_platform(f) == platform and get_branch(f) == branch:
if f != packagename:
os.remove(os.path.join(directory, f))
except Exception as ex:
sys.stderr.write('Failed to remove old packages: %s\n' % str(ex))
sys.exit(1)

View File

@@ -60,7 +60,6 @@ if 'cmake' in builder:
# Config file to be used (relative to blender's sources root)
cmake_config_file = "build_files/cmake/config/blender_full.cmake"
cmake_player_config_file = None
cmake_cuda_config_file = None
# Set build options.
@@ -70,14 +69,12 @@ if 'cmake' in builder:
if builder.startswith('mac'):
# Set up OSX architecture
if builder.endswith('x86_64_10_6_cmake'):
if builder.endswith('x86_64_10_9_cmake'):
cmake_extra_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
cmake_extra_options.append('-DWITH_CODEC_QUICKTIME=OFF')
cmake_extra_options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6')
cmake_extra_options.append('-DCUDA_HOST_COMPILER=/usr/local/cuda-hack/clang')
cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-hack/nvcc')
cmake_extra_options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9')
# Used to trick CUDFA to see CLang as an older version.
# cmake_extra_options.append('-DCUDA_HOST_COMPILER=/usr/local/cuda-hack/clang')
# cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-hack/nvcc')
elif builder.startswith('win'):
if builder.endswith('_vc2015'):
@@ -103,32 +100,30 @@ if 'cmake' in builder:
elif glibc == 'glibc211':
deb_name = "squeeze"
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake"
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_' + deb_name + '_x86_64'
targets = ['player', 'blender']
targets = ['blender']
elif builder.endswith('i686_cmake'):
bits = 32
chroot_name = 'buildbot_' + deb_name + '_i686'
cuda_chroot_name = 'buildbot_' + deb_name + '_x86_64'
targets = ['player', 'blender', 'cuda']
targets = ['blender']
cmake_extra_options.extend(["-DCMAKE_C_COMPILER=/usr/bin/gcc-7",
"-DCMAKE_CXX_COMPILER=/usr/bin/g++-7"])
cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
# Prepare CMake options needed to configure cuda binaries compilation.
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=%s" % ('ON' if build_cubins else 'OFF'))
cuda_cmake_options.append("-DCYCLES_CUDA_BINARIES_ARCH=sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61")
if build_cubins or 'cuda' in targets:
if bits == 32:
cuda_cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=OFF")
else:
# Prepare CMake options needed to configure cuda binaries compilation, 64bit only.
if bits == 64:
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=%s" % ('ON' if build_cubins else 'OFF'))
cuda_cmake_options.append("-DCYCLES_CUDA_BINARIES_ARCH=sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70")
if build_cubins or 'cuda' in targets:
cuda_cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=ON")
# Only modify common cmake options if cuda doesn't require separate target.
if 'cuda' not in targets:
cmake_options += cuda_cmake_options
# Only modify common cmake options if cuda doesn't require separate target.
if 'cuda' not in targets:
cmake_options += cuda_cmake_options
else:
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
cmake_options.append("-DCMAKE_INSTALL_PREFIX=%s" % (install_dir))
@@ -162,9 +157,7 @@ if 'cmake' in builder:
os.chdir(target_build_dir)
# Tweaking CMake options to respect the target
target_cmake_options = cmake_options[:]
if target == 'player':
target_cmake_options.append("-C" + os.path.join(blender_dir, cmake_player_config_file))
elif target == 'cuda':
if target == 'cuda':
target_cmake_options += cuda_cmake_options
target_chroot_prefix = cuda_chroot_prefix[:]
target_name = 'cycles_kernel_cuda'

View File

@@ -101,13 +101,9 @@ if builder.find('cmake') != -1:
platform = builder.split('_')[0]
if platform == 'mac':
# Special exception for OSX
platform = 'OSX-10.6-'
if builder.endswith('x86_64_10_6_cmake'):
platform = 'OSX-10.9-'
if builder.endswith('x86_64_10_9_cmake'):
platform += 'x86_64'
elif builder.endswith('i386_10_6_cmake'):
platform += 'i386'
elif builder.endswith('ppc_10_6_cmake'):
platform += 'ppc'
if builder.endswith('vc2015'):
platform += "-vc14"
builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
@@ -130,7 +126,6 @@ if builder.find('cmake') != -1:
elif builder.startswith('linux_'):
blender = os.path.join(install_dir, 'blender')
blenderplayer = os.path.join(install_dir, 'blenderplayer')
buildinfo_h = os.path.join(build_dir, "source", "creator", "buildinfo.h")
blender_h = os.path.join(blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
@@ -142,18 +137,18 @@ if builder.find('cmake') != -1:
blender_glibc = builder.split('_')[1]
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_squeeze_x86_64'
chroot_name = 'buildbot_jessie_x86_64'
bits = 64
blender_arch = 'x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_squeeze_i686'
chroot_name = 'buildbot_jessie_i686'
bits = 32
blender_arch = 'i686'
# Strip all unused symbols from the binaries
print("Stripping binaries...")
chroot_prefix = ['schroot', '-c', chroot_name, '--']
subprocess.call(chroot_prefix + ['strip', '--strip-all', blender, blenderplayer])
subprocess.call(chroot_prefix + ['strip', '--strip-all', blender])
print("Stripping python...")
py_target = os.path.join(install_dir, blender_version)

View File

@@ -44,9 +44,9 @@ if "cmake" in builder:
"""
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_squeeze_x86_64'
chroot_name = 'buildbot_jessie_x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_squeeze_i686'
chroot_name = 'buildbot_jessie_i686'
if chroot_name:
chroot_prefix = ['schroot', '-c', chroot_name, '--']
"""

View File

@@ -30,7 +30,6 @@ SET(_alembic_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/alembic
)

View File

@@ -20,7 +20,6 @@ SET(_audaspace_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
# Use pkg-config to get hints about paths

View File

@@ -0,0 +1,72 @@
# - Find Blosc library
# Find the native Blosc includes and library
# This module defines
# BLOSC_INCLUDE_DIRS, where to find blosc.h, Set when
# Blosc is found.
# BLOSC_LIBRARIES, libraries to link against to use Blosc.
# BLOSC_ROOT_DIR, The base directory to search for Blosc.
# This can also be an environment variable.
# BLOSC_FOUND, If false, do not try to use Blosc.
#
# also defined, but not for general use are
# BLOSC_LIBRARY, where to find the Blosc library.
#=============================================================================
# Copyright 2018 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If BLOSC_ROOT_DIR was defined in the environment, use it.
IF(NOT BLOSC_ROOT_DIR AND NOT $ENV{BLOSC_ROOT_DIR} STREQUAL "")
SET(BLOSC_ROOT_DIR $ENV{BLOSC_ROOT_DIR})
ENDIF()
SET(_blosc_SEARCH_DIRS
${BLOSC_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/blosc
)
FIND_PATH(BLOSC_INCLUDE_DIR
NAMES
blosc.h
HINTS
${_blosc_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(BLOSC_LIBRARY
NAMES
blosc
HINTS
${_blosc_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set BLOSC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BLOSC DEFAULT_MSG
BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
IF(BLOSC_FOUND)
SET(BLOSC_LIBRARIES ${BLOSC_LIBRARY})
SET(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIR})
ELSE()
SET(BLOSC_BLOSC_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
BLOSC_INCLUDE_DIR
BLOSC_LIBRARY
)

View File

@@ -28,7 +28,6 @@ SET(_eigen3_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(EIGEN3_INCLUDE_DIR

View File

@@ -32,7 +32,6 @@ SET(_fftw3_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(FFTW3_INCLUDE_DIR

View File

@@ -445,7 +445,6 @@ if(NOT GFLAGS_FOUND)
/opt/local/include
/usr/include
/sw/include # Fink
/opt/csw/include # Blastwave
/opt/lib/gflags/include)
list(APPEND GFLAGS_CHECK_PATH_SUFFIXES
@@ -459,7 +458,6 @@ if(NOT GFLAGS_FOUND)
/opt/local/lib
/usr/lib
/sw/lib # Fink
/opt/csw/lib # Blastwave
/opt/lib/gflags/lib)
list(APPEND GFLAGS_CHECK_LIBRARY_SUFFIXES
gflags/lib # Windows (for C:/Program Files prefix).

View File

@@ -129,7 +129,6 @@ list(APPEND GLOG_CHECK_INCLUDE_DIRS
/opt/local/include
/usr/include
/sw/include # Fink
/opt/csw/include # Blastwave
/opt/lib/glog/include)
# Windows (for C:/Program Files prefix).
list(APPEND GLOG_CHECK_PATH_SUFFIXES
@@ -145,7 +144,6 @@ list(APPEND GLOG_CHECK_LIBRARY_DIRS
/opt/local/lib
/usr/lib
/sw/lib # Fink
/opt/csw/lib # Blastwave
/opt/lib/gflags/lib)
# Windows (for C:/Program Files prefix).
list(APPEND GLOG_CHECK_LIBRARY_SUFFIXES

View File

@@ -29,7 +29,6 @@ SET(_hdf5_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/hdf5
)

View File

@@ -35,7 +35,6 @@ SET(_icu_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
# We don't need includes, only libs to link against...

View File

@@ -32,7 +32,6 @@ SET(_jack_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(JACK_INCLUDE_DIR

View File

@@ -32,7 +32,6 @@ SET(_jemalloc_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/jemalloc
)

View File

@@ -32,7 +32,6 @@ SET(_lzo_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h

View File

@@ -65,7 +65,6 @@ SET(_opencollada_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/opencollada
)

View File

@@ -38,7 +38,6 @@ SET(_opencolorio_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/ocio
)

View File

@@ -50,7 +50,6 @@ SET(_openexr_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/openexr
)

View File

@@ -34,7 +34,6 @@ SET(_openimageio_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/oiio
)
@@ -76,6 +75,8 @@ IF(OPENIMAGEIO_FOUND)
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
ELSE()
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
ENDIF()
ELSE()
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)

View File

@@ -32,7 +32,6 @@ SET(_openjpeg_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(OPENJPEG_INCLUDE_DIR

View File

@@ -38,7 +38,6 @@ SET(_osl_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/osl
)

View File

@@ -37,7 +37,6 @@ SET(_opensubdiv_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/opensubdiv
/opt/lib/osd # install_deps.sh
)

View File

@@ -32,7 +32,6 @@ SET(_openvdb_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/openvdb
/opt/lib/openvdb
)

View File

@@ -32,7 +32,6 @@ SET(_pcre_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(PCRE_INCLUDE_DIR pcre.h

View File

@@ -32,7 +32,6 @@ SET(_pugixml_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/oiio
)

View File

@@ -38,7 +38,7 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
ENDIF()
SET(PYTHON_VERSION 3.5 CACHE STRING "Python Version (major and minor only)")
SET(PYTHON_VERSION 3.6 CACHE STRING "Python Version (major and minor only)")
MARK_AS_ADVANCED(PYTHON_VERSION)
@@ -77,15 +77,12 @@ SET(_python_SEARCH_DIRS
# only search for the dirs if we havn't already
IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_LIB_PATH_DEF))
SET(_python_ABI_FLAGS
SET(_PYTHON_ABI_FLAGS_TEST
"m;mu;u; " # release
"dm;dmu;du;d" # debug
)
FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
FOREACH(_CURRENT_ABI_FLAGS ${_PYTHON_ABI_FLAGS_TEST})
#IF(CMAKE_BUILD_TYPE STREQUAL Debug)
# SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
#ENDIF()
@@ -170,7 +167,7 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
UNSET(_CURRENT_ABI_FLAGS)
UNSET(_CURRENT_PATH)
UNSET(_python_ABI_FLAGS)
UNSET(_PYTHON_ABI_FLAGS_TEST)
ENDIF()
UNSET(_IS_INC_DEF)

View File

@@ -34,7 +34,6 @@ SET(_sdl2_SEARCH_DIRS
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(SDL2_INCLUDE_DIR
@@ -43,7 +42,7 @@ FIND_PATH(SDL2_INCLUDE_DIR
HINTS
${_sdl2_SEARCH_DIRS}
PATH_SUFFIXES
include/SDL2 include
include/SDL2 include SDL2
)
FIND_LIBRARY(SDL2_LIBRARY

View File

@@ -32,7 +32,6 @@ SET(_sndfile_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h

View File

@@ -32,7 +32,6 @@ SET(_spacenav_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(SPACENAV_INCLUDE_DIR

View File

@@ -32,7 +32,6 @@ SET(_tbb_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/tbb
)

View File

@@ -32,7 +32,6 @@ SET(_xml2_SEARCH_DIRS
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(XML2_INCLUDE_DIR libxml2/libxml/xpath.h

View File

@@ -61,10 +61,8 @@ def replace_line(f, i, text, keep_indent=True):
def source_list(path, filename_check=None):
for dirpath, dirnames, filenames in os.walk(path):
# skip '.git'
if dirpath.startswith("."):
continue
dirnames[:] = [d for d in dirnames if not d.startswith(".")]
for filename in filenames:
if filename_check is None or filename_check(filename):

View File

@@ -25,10 +25,6 @@ IGNORE = (
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
"extern/carve/include/carve/config.h",
"extern/carve/include/carve/random/random.h",
"extern/carve/patches/files/config.h",
"extern/carve/patches/files/random.h",
"intern/audaspace/SRC/AUD_SRCResampleFactory.h",
"intern/audaspace/SRC/AUD_SRCResampleReader.h",
)

View File

@@ -16,7 +16,6 @@ set(WITH_CYCLES_OPENSUBDIV ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
@@ -34,7 +33,6 @@ set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_LZMA ON CACHE BOOL "" FORCE)
set(WITH_LZO ON CACHE BOOL "" FORCE)
set(WITH_MOD_BOOLEAN ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE)
@@ -52,7 +50,6 @@ set(WITH_SDL ON CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
@@ -66,9 +63,7 @@ elseif(WIN32)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
elseif(APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_CODEC_QUICKTIME OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
# apple_check_quicktime()
endif()

View File

@@ -6,7 +6,6 @@
#
set(WITH_HEADLESS ON CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
# disable audio, its possible some devs may want this but for now disable
# so the python module doesnt hold the audio device and loads quickly.

View File

@@ -9,6 +9,7 @@ set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
set(WITH_SYSTEM_GLEW ON CACHE BOOL "" FORCE)
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
set(WITH_BOOST OFF CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI OFF CACHE BOOL "" FORCE)
@@ -20,7 +21,6 @@ set(WITH_CYCLES_OPENSUBDIV OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
@@ -38,7 +38,6 @@ set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_LZMA OFF CACHE BOOL "" FORCE)
set(WITH_LZO OFF CACHE BOOL "" FORCE)
set(WITH_MOD_BOOLEAN OFF CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID OFF CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH OFF CACHE BOOL "" FORCE)
set(WITH_MOD_SMOKE OFF CACHE BOOL "" FORCE)
@@ -55,8 +54,3 @@ set(WITH_RAYOPTIMIZATION OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE OFF CACHE BOOL "" FORCE)
if(APPLE)
set(WITH_CODEC_QUICKTIME OFF CACHE BOOL "" FORCE)
endif()

View File

@@ -16,7 +16,6 @@ set(WITH_CYCLES_OPENSUBDIV ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
@@ -34,7 +33,6 @@ set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_LZMA ON CACHE BOOL "" FORCE)
set(WITH_LZO ON CACHE BOOL "" FORCE)
set(WITH_MOD_BOOLEAN ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE)
@@ -52,10 +50,9 @@ set(WITH_SDL ON CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
set(CYCLES_CUDA_BINARIES_ARCH sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 CACHE STRING "" FORCE)
set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 CACHE STRING "" FORCE)
# platform dependent options
if(UNIX AND NOT APPLE)
@@ -67,9 +64,7 @@ elseif(WIN32)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
elseif(APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_CODEC_QUICKTIME OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
# apple_check_quicktime()
endif()

View File

@@ -12,9 +12,6 @@ set(WITH_INSTALL_PORTABLE OFF CACHE BOOL "" FORCE)
# no point int copying python into python
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
# dont build the game engine
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
# disable audio, its possible some devs may want this but for now disable
# so the python module doesnt hold the audio device and loads quickly.
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)

View File

@@ -6,7 +6,6 @@
# disable Blender
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_BLENDER OFF CACHE BOOL "" FORCE)
# build Cycles

View File

@@ -107,12 +107,12 @@ def main():
return
# execute
cmd = "make %s %s blender/fast" % (" ".join(args), " ".join(targets_new))
cmd = ["make"] + args + targets_new + ["blender/fast"]
print("cmake building with targets: %s" % " ".join(targets_new))
print("executing: %s" % cmd)
print("executing: %s" % " ".join(cmd))
import os
os.system(cmd)
import subprocess
subprocess.call(cmd)
if __name__ == "__main__":
main()

Some files were not shown because too many files have changed in this diff Show More