1
1

Compare commits

...

6745 Commits

Author SHA1 Message Date
a7910356b0 Mesh Batch Cache: Move index buffer range hack to be more local 2019-07-28 16:29:59 +02:00
b65b93f5d4 Mesh Batch Cache: Refactor: Again
- Use Extract naming convention to name extract functions that fill vbo/ibo
- Separate extract functions into separate file (for clarity)
- Make simpler iter loops to avoid as much overhead as possible
- Separate loose elements looping functions to avoid iteration complexity
  (unfortunately this makes the code more verbose).
- Some iter functions are threadable and tagged as such.
- Add multithreaded iteration for extract functions that supports them.
2019-07-28 15:23:41 +02:00
ef15a45037 GPU: Elements: Put back index tracking in index_buf_set_* functions
There is no threadsafe way of filling the IBOs. So keep filling them
simple and track used indices length.
2019-07-28 15:17:33 +02:00
c3002d51f5 Mesh Batch Cache: Fix threading issue with element buffer objects
Some elements indices can be written by multiple thread at once and
since setting an element is only garantee to be atomic for single verts,
we cannot reliably use GPU_indexbuf_set_line_* in this case.

To avoid this, we create another iteration for the problematic IBOs
2019-07-23 20:02:24 +02:00
c4b27eb46a Cleanup: Remove Printf 2019-07-23 00:10:48 +02:00
76963a7f64 Merge branch 'tmp-batch-cache-cleanup' of git.blender.org:blender into tmp-batch-cache-cleanup 2019-07-23 00:10:02 +02:00
a0ec3b7fd7 Mesh Batch Cache: Fix some threadsafety issue with indices buffers 2019-07-23 00:09:55 +02:00
c63e45c216 Mesh Batch Cache: Fix some threadsafety issue with indices buffers 2019-07-23 00:05:15 +02:00
04a11fa1ba GPU: Make small float normal compression functions inlined 2019-07-22 18:30:10 +02:00
a58548f6f7 Mesh Batch Cache: Fix bitmap test for loose verts 2019-07-22 18:29:31 +02:00
6e06b4f693 Mesh Batch Cache: Add debug timer 2019-07-22 12:48:02 +02:00
e27a478a52 Cleanup: Mesh Batch Cache: Rewrite iterations to prepare for multithreading 2019-07-21 21:27:09 +02:00
f0207be4df Mesh Batch Cache: Speedup: Move the prev edit edge hack for edit uv...
and move it to the only function that needs it: mesh_edituv_data_iter_edit.
2019-07-21 17:38:41 +02:00
c54463b9b3 Mesh Batch Cache: Speedup: Remove the need for memset in index buffer init
Instead of setting the whole IBO to restart index, we only set the restart
indices when we encounter a hidden elem.
2019-07-21 17:24:11 +02:00
7d5e1f61bc Cleanup: Mesh Batch Cache: Remove old unused code 2019-07-21 16:20:10 +02:00
baa34974ef UVEdit: Support Mesh eval cage selection
- Select Vert / Edge / Face support
- TODO : Rect / Lasso / Circle / Loop
2019-07-21 12:01:17 +02:00
711621cac4 Cleanup: Silence warnings 2019-07-21 12:01:17 +02:00
ac0a8fbe71 Mesh Batch Cache: Refactor: Fix subdiv UV edge highligh in vert select mode 2019-07-21 12:01:17 +02:00
f2842babc3 Mesh Batch Cache: Refactor: Fix lnor & vnor display 2019-07-19 18:50:33 +02:00
93f175f279 Mesh Batch Cache: Refactor Part 6
Add back subdiv facedot correct position.
2019-07-19 17:20:46 +02:00
3c95a0c122 Mesh Batch Cache: Refactor Part 5
- Add Vcol support
- Add UV/Tangent support
- Add Orco support
- Add Paint Line Mask support
- Add Adjacency Lines support
- Add EditUV face/line/point/facedot support
- Add EditUV data flag support
- Add EditUV StretchAngle/Area support
- Add Facedots select index support
- Add Weight support
- Add Mesh Analysis support
2019-07-19 17:19:05 +02:00
fcd7de8386 Mesh Batch Cache: Refactor part 4
- Add edge factor support (with less hack + multithread support)
- Add Facedots pos/nor/flag support
- Add Loop normal support
2019-07-19 14:38:32 +02:00
30a68e4d58 Mesh Batch Cache: Refactor part 3
- Add subrange usage for material triangles
- Add loose edges/verts support for Mesh
- Cleanup eval mesh selection
- Add use_hide support
- Add selection index Vbos
- Add edit data vbo
- Add dummy edgefac vbo
2019-07-19 14:38:32 +02:00
ac0d52ee4f Mesh Batch Cache: Refactor part 2
- Add extract_points indices
- Enable tri/line/point extract and pos_nor attrib.
2019-07-19 14:38:32 +02:00
73ca2f702f Mesh Batch Cache: Refactor part 1
- Start refactoring MeshRenderData and mesh_render_data_create_ex
- Add Iter functions
- Add dummy callbacks
- Add some Extract types (not enabled)
2019-07-19 14:38:32 +02:00
520a7ca2f3 Mesh Batch Cache: Refactor start
- Put placeholders vbos/ibos
- Restructure the buffers cache : One cache for final mesh and one for the
  edit mesh cage.
2019-07-19 14:38:32 +02:00
f9e3d7d7eb GPU: Batch: Reverse order of VBO binding
This is to ensure the vbo[0] always has predecence over other VBO.

This is important for overriding attributes by switching vbo binding order.
2019-07-19 14:38:32 +02:00
e02e140ef1 GPU: Vertex Format: Bump max name per attribute to 6
This is to add pos as an alias to UVs.
2019-07-19 14:38:32 +02:00
a97e5be2ae GPU: Add vertex format deinterleaving
This makes it possible to have each attrib use a contiguous portion of the
vertex buffer, making attribute filling much more easy and fast as this is
how they are store in blender Custom Data layers.
2019-07-19 14:38:32 +02:00
7d515f8c90 GPU: Add GPUIndexBuf subrange
This allows to render only a subset of an index buffer.
This is nice as we can render each material surfaces individually and the
whole mesh with the same index buffer.
2019-07-19 14:38:32 +02:00
d5c0a02f86 Fix T67033 EEVEE: Random Flickering Materials
This was a read after free error. This only fix the undefined behavior.
The result is still not correct in certain cases (see T67226).

We want to include this for 2.80
2019-07-19 14:38:09 +02:00
69ba3b98e4 Fix new Text ID usercount handling in add/load cases.
Text datablocks should always have a 'single user' flag set, and they
usually do not have any user (since neither text editor itself, nor
Freestyle usage are text users - the second is odd btw...), the only one
am aware of is the script node (e.g. for OSL).

Add text case was simply not doing anything, so added.

Load text case was doing things in inversed logic (setting user count to
zero in BKE, then setting 'real user' flag in ED code). Made it the
other way around (BKE ID creation code should not care about usercount
usually, this is up to higher-level code to decide what to do
(operators, RNA...).

Note: tried to check all cases, but there might very well be some more
hidden bugs here...
2019-07-19 13:58:26 +02:00
48418ec125 Revert "Fix assert unlinking text"
This reverts commit b0b2546d4a.

Please do not sweept the dirt under the carpet like that! If there is a
bug, either report it or fix it, but do not silence it!
2019-07-19 13:58:01 +02:00
0d3e055bda Cleanup messed-up comment formating from codestyle apply... 2019-07-19 13:58:01 +02:00
fb84ef58c4 Fix T67191: Redo fails for 3D text operations 2019-07-19 19:21:00 +10:00
7fe81fe5a3 Fix T63090: Delete keyframe reports invalid for multiple objects 2019-07-19 18:43:12 +10:00
5f140e61c2 DRW: lattice vertices were too small 2019-07-19 10:44:09 +10:00
1ae4311902 Fix T66492: Divide by zero with cursor to selected 2019-07-19 10:31:51 +10:00
48b4d42bce CMake: Fix WITH_CODEC_SNDFILE detection
D5296 by @frispete
2019-07-19 09:24:08 +10:00
4b2e6d4e22 Fix T67062: Movie Clip Editor does not update Editor Type when changing Editing Context
Previously when switching modes, the code didn't check if we were in the
correct view for the masking mode.

Reviewed By: Sergey

Differential Revision: http://developer.blender.org/D5288
2019-07-18 15:29:03 +02:00
2e6139dfc2 Fix context menu Remove Shortcut not being available for non-keyboard shortcuts 2019-07-18 14:15:31 +02:00
b58a6a3e72 Disable b-bone spline gizmo for now
This wasn't working properly and needs to be finished,
disable for release.
2019-07-18 22:04:21 +10:00
687f1df5db Fix T66811 Eevee: Flickering in weight paint mode
This was caused by TAA offset being computed as the 2nd sample even if the
sampling was reset afterwards.

The fix is to update the matrices after any potential reset.
2019-07-18 12:55:26 +02:00
7a82896fbc Keymap: use number keys to change particle modes
Match behavior for meshes.

Fixes T67161
2019-07-18 20:27:21 +10:00
5c8b1a1266 Fix edit-mode particle vertex draw size
Vertices were hard to see, draw the same size as edit-mesh vertices.
2019-07-18 20:11:18 +10:00
c6c9e168e2 Fix T58447: Unselected bone used for constraint target 2019-07-18 19:12:09 +10:00
20c725ed62 Cleanup: remove redundant preference check
Missing from f2df520698, harmless but confusing to leave
in checks for preferences having asked to skip them.
2019-07-18 16:58:38 +10:00
098f60f1b8 Fix T67105: Missing Update Add Camera Background Image
Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D5284
2019-07-18 08:44:30 +02:00
5d4bd8f1bb Fix T66949: Can't select bones from multiple objects in wpaint mode
This fix relies on 2.7x logic, only de-selecting other armature objects,
making multiple armatures in weight paint mode usable.
2019-07-18 15:45:39 +10:00
bf8393c1c9 Fix weight-paint & pose-select & lock-mode combination
Extend pose object checks to all pose-mode objects
used by the mesh.
2019-07-18 15:42:14 +10:00
8a083ef3b7 Fix weight paint mode setting with multiple armatures
Selecting multiple armature objects and entering weight paint mode
wasn't working.

Entering weight + pose modes at once was only done when
object mode locking was enabled. Now it's done even when
mode-locking is off - because it's still inconvenient to setup
and useful default behavior.

Resolves issues raised by T66949
2019-07-18 15:40:52 +10:00
0b4c0472a3 Fix T61117: Selecting an armature doesn't select the bone
Regression from 2.7x caused by 28dfc47cf0
2019-07-18 14:26:34 +10:00
112f0db40d Fix pose de-selection when selecting from object mode 2019-07-18 14:24:55 +10:00
807b6c4848 Revert "Fix T66949: Can't select bones from multiple objects in wpaint mode"
This reverts commit 9e9fbb39d7.

Adding back object+pose bone selection support removes the need for this fix.
2019-07-18 12:22:39 +10:00
Dalai Felinto
a6b7ee2a1e Fix T66948: Outliner - collections/objects with wrong active state
If the parent collection was out of view we were not taking its
properties into consideration. We need it even when not drawing the
parent to set active/inactive values for its children.

Related Task: T66948

Reviewers: brecht

Subscribers: Zachman

Differential Revision: https://developer.blender.org/D5272
2019-07-17 19:38:54 -03:00
Dalai Felinto
bfa6cb3a7d Fix T64312: Selection inconsistencies when switching collections
Basically layer_collection_sync was calling BKE_base_eval_flags right away while
iterating over the bases.

However when a parent/sibling collection is to influence the collection flag of
an object that exists in more than one collection, it is too late since we
deselect the object in BKE_base_eval_flags right away.

Related to T64312.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D5243
2019-07-17 19:38:16 -03:00
158eb98c22 GPencil: Fix usability problem with curve control points apart
Based on feedback from @matiasmendio

There was a problem with the control points because it was very difficult to know what point move. Now the points are moved apart and makes easy to know what point use.
2019-07-17 22:24:39 +02:00
eee46769ce Fix T66515, T67112, T61607: failure to read EXR files with single, named layer
Like Blender renders without a Z channel. The single layer case assume that channel
names are just R/G/B/A without any layer name prefix, and would not read channels
like "Image.R".

Carefully tested for regressions with the openexr project tests images, so this
should be safe.
2019-07-17 20:55:53 +02:00
709f126e81 Fix T59713: Armature layer dots not updated on changes
`layer_used` runtime data, which controls the drawing of dots in the UI was not getting refreshed properly.
This used to happen in the drawing code, but was no longer working for reasons explained in:
{rB2b09062defa093a243b5fe64b099accb07b440a3}

The solution was to update each layer manually in the operators:
* ARMATURE_OT_bone_primitive_add
* ARMATURE_OT_delete
* ARMATURE_OT_dissolve
* ARMATURE_OT_fill
* ARMATURE_OT_merge
* ARMATURE_OT_separate
* ARMATURE_OT_bone_layers
* POSE_OT_bone_layers

Differential Revision: https://developer.blender.org/D5281
2019-07-17 14:17:34 -03:00
4ddc7e8d1b Fix T66919: Force field does not affect particles
Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T66919

Differential Revision: https://developer.blender.org/D5275
2019-07-17 16:51:02 +02:00
c722c5204f Fix T67075: make object.visible_get() and similar APIs more forgiving
When objects are not in the view layer, just return false rather than throwing
an error. As far as the script is concerned the object is not visible or
selected when it's not in the current view layer.
2019-07-17 16:30:42 +02:00
c1bd5bcbfa Fix T66091: paint curve point slide conflicts with 2D cursor 2019-07-17 16:30:42 +02:00
b69c33aeba Fix T67099: entering color picker hex value #FF results in 1.000001 2019-07-17 16:30:42 +02:00
f17e2f8dac Fix T67127: Crash Missing DEG tag update mask layer
When ng mask layer operations (add, remove, move) the
original mask was not tagged to be updated resulting
in missing data on the copy. The Masking function
assumes that the copy and the original is always
structured the same.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D5283
2019-07-17 16:24:00 +02:00
2e15b72089 Clip editor: Fix missing frame update on undo
It is possible that undo will change current scene frame and that was
not synchronizing current frame from scene to movie clip user.

Reported as a part of T66519.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T66519

Differential Revision: https://developer.blender.org/D5280
2019-07-17 16:05:33 +02:00
58db64a3b6 Revert "Fix T59713: Moving bones between layers in edit mode doesn't show the dot icon in the layers UI"
This commit did not follow the protocol that requires a review first.

This reverts commit 580acab173.
2019-07-17 10:32:50 -03:00
580acab173 Fix T59713: Moving bones between layers in edit mode doesn't show the dot icon in the layers UI 2019-07-17 10:16:17 -03:00
11741ff682 Fix T67001: Studio and Flat lightning in single color do not respect clipping region
`DRW_STATE_CLIP_PLANES` has to be enabled independent of the workbench material.

Reviewers: fclem, jbakker

Differential Revision: https://developer.blender.org/D5278
2019-07-17 08:51:57 -03:00
526272bf7c Fix T67115: Changing the Shape of a Force Field object does not refresh the animation 2019-07-17 08:30:37 -03:00
366865dd02 Undo System: replace with simpler binary diffing buffer storage
Applying/undoing incremental changes didn't fit well when
mixed with periodic snapshots from mem-file undo.

This moves to a much simpler undo system.

- Uses array storage with de-duplication from `BLI_array_store`.
- Loads the buffer into existing text data,
  for better performance on large files.
- Has the advantage that Python operators can be supported
  since we don't depend on hard coded undo operations.

Solves T67045, T66695, T65909.
2019-07-17 21:19:22 +10:00
9e9fbb39d7 Fix T66949: Can't select bones from multiple objects in wpaint mode 2019-07-17 18:39:42 +10:00
f8a70db556 Fix T67047: Can't jump to frame when using jack in A/V sync mode
Similar fix to 495aff7.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T67047

Differential Revision: https://developer.blender.org/D5268
2019-07-17 09:56:47 +02:00
d8cebcfebf Fix object selection when in pose mode
The new selected object was activated but not selected.
2019-07-17 16:57:45 +10:00
Dalai Felinto
d90201aee2 Edge Slide: Fix multi-object for loop early exit
Part of D5274, reviewed by Campbell Barton.
2019-07-16 23:01:42 -03:00
Dalai Felinto
5ca302cb0c Fix T67078: Crash with vertex slide and multi-objects
If one of the objects had invalid selected edges, it would lead to a
crash since none of the for loops were checking for whether the edge
slide data is valid.

We could refactor the macros to create a new
FOREACH_TRANS_DATA_CONTAINER_WITH_DATA

However we are too close to 2.80 final release so we manually skip them
for now.

Note: TRANS_DATA_CONTAINER_FIRST_OK cannot be used either for the same
reason.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5274
2019-07-16 23:01:03 -03:00
4a5e046c92 UI: remove button to enable auto-save after load factory preferences
Based on feedback from T66675, the current interface is confusing,
leading to users accidentally overwriting their preferences.

Now, once factory settings are loaded preferences are not saved
and the save button is shown (as when auto-save is disabled).

Tool tips note that factory settings require manual saving
afterwards.

Also rename preference menu items for better consistency
(settings/state -> preferences).
2019-07-17 09:38:30 +10:00
a36a44bb81 Fix paint curve not drawing selection colors properly
This code is not guaranteed to run with any specific space theme, so pass
it explicitly.
2019-07-16 20:31:23 +02:00
9742fa6668 Fix T66964: sculpting box hide tool can't select multiple areas
Only deselect all on mouse release when no box dragging was done.
2019-07-16 19:10:18 +02:00
35aa13734d Fix T66862: crash with bevel modifier harden normals applied to curve object 2019-07-16 18:06:49 +02:00
8a7dedc9d2 Fix T66011: Transformed objects break sculpt tools
The Pinch, Push, Twist and Clone were not using the object transformation to compute point changes, so the point was way off of the right place.
2019-07-16 17:57:25 +02:00
1f1d302950 Fix T66940, T67005, T60651: append workspace from old startup file fails
Don't try to use old screens as workspaces, just leave them out of the menu.

Differential Revision: https://developer.blender.org/D5270
2019-07-16 17:46:45 +02:00
91f539b384 Fix T66862: crash with mirror modifier applied to curve object 2019-07-16 17:46:42 +02:00
28c684f66b Fix T66999: Blender creates new cache for particles with step 10 instead 1
Update the default init step values to be the same for all caches.
This is actually a small hack as these values are not used on the
creation of the first cache. But the default init value is 1, so this
will not be noticeable anymore.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5271
2019-07-16 17:33:24 +02:00
105ae3be99 Fix T66944: Rigid Body Constraint in duplicated collection is not added to RigidBodyConstraints collection.
We only had a very limited, specific handling of that in collection
duplication code, but this has to be handled at a much more general
level in Object copy code itself, since it makes no sense to duplicate
rigidbody object data without adding new copy to relevant rigidbody
collections...

WARNING: This is a fairly risky rework of rigidbody handling logic
when copying an Object data-block. It is *NOT* considered safe enough
for 2.80 release.

I tried to take into account copy flags to not mess with other IDs
(collections) when we are copying outside of Main, and also not do deg
tags when this is forbidden, but risk of something going wrong here is
too high...
2019-07-16 16:08:32 +02:00
e6e69a28ab Fixed crash when adding/removing custom normals from pinned mesh
When a mesh is pinned in the properties panel, Blender crashes when you
click the "Add Custom Split Normals Data".

The code calls `ob = ED_object_context(C)` which returns NULL when the
mesh is pinned in the properties panel, causing a segfault when trying
to get the mesh via `ob->data`.

A new function `ED_mesh_context(C)` avoids this by first checking
whether a mesh was pinned in the context. If not, it checks the pinned
object's data. If that's not there, or it's not a mesh, it returns the
active object's mesh. Finally it returns NULL if there is no active
object, or if the active object is not a mesh object.

Reviewed By: brecht, mont29

Differential Revision: https://developer.blender.org/D5223
2019-07-16 15:06:25 +02:00
dd3e3474ab fix T66899: Collada: Shininess/Reflectivity not handled correct
Fixed: The Collada Exporter only supports export of
Lambert Shaders. But Shininess is not supported with
Lambert Shaders. The exporter must not add Shininess
to the Shader data!

Fixed: The Collada Importer adds an illegal value of -1
for reflectivity when this parameters is not defined in
the imported collada data. Now reflectivity is only
set when the import data contains a valid value.

Discarded: The Collada Importer handles shininess in a
dubious way. I have discarded import for now.
This needs to be reworked carefully in 2.81.

Differential Revision: https://developer.blender.org/D5262
2019-07-16 13:28:40 +02:00
965bd4c8c3 Fix T66742: Frame selected last weightpaint/vertexpaint stroke not
working

Mouse values [for 'paint_last_stroke_update()'] gone missing in
rB4f616c93f7cb.

Thx @campbellbarton for hinting at convention to get mouse from sculpt
caches.

Reviewers: campbellbarton

Maniphest Tasks: T66742

Differential Revision: https://developer.blender.org/D5267
2019-07-16 13:27:12 +02:00
c4a62493de Fix T66835: Dynamic Paint weight group isn't updated unless weight has been assigned
The dvert layer was not assigned to the mesh data if it had to be
created by the dpaint modifier.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5263
2019-07-16 11:44:08 +02:00
6b3c1192e1 Fix error in app-template image size check 2019-07-16 19:40:23 +10:00
b0b2546d4a Fix assert unlinking text
Interferes with debugging.
2019-07-16 17:27:53 +10:00
c635663e4a Fix T67040: Undo crashes after renaming
Caused by error keeping the first memfile undo step.
2019-07-16 17:14:19 +10:00
d5f725a238 Cleanup: typos in comments 2019-07-16 16:58:04 +10:00
1fa61c8843 Fix typo in background_job template
D5264 by @dimtion
2019-07-16 16:56:25 +10:00
d5fa230736 Fix T67002: Crash redoing an action after ID rename 2019-07-16 15:53:15 +10:00
fdf2d8728a Docs: remove debug value, matching source 2019-07-16 13:26:37 +10:00
af51988115 Fix T67009, T67013: crash with Intel HD Graphics and some older drivers
Add more versions to the workaround list.
2019-07-15 22:44:29 +02:00
f3899c13cd Fix T64827: "Batch-Generate Previews" crashes.
Second completely unrelated issue reported in same task (tssst...),
caused by missing doversion code of some changes in recent-ish 2.80
development (tsst... again).

Proper fix for the issue (reverted rB8a5a8282ce48 was merely sweeping
the dirt under the carpet...).
2019-07-15 22:33:55 +02:00
125e0cfb25 Revert "Fix T64827 (part two): "Batch-Generate Previews" fails with certain files"
This reverts commit 8a5a8282ce.
2019-07-15 22:33:55 +02:00
c42b7f8434 Fix T66986: fix dylib plugins on macOS not working in code signed release
Add more entitlements for code signing.
2019-07-15 22:22:50 +02:00
8faaeef5fb Fix T67016: crash drawing image editor without image 2019-07-15 22:22:50 +02:00
d061154b93 Fix T66983 Wireframe Display in edit mode edges missing when overlays are disabled 2019-07-15 19:55:09 +02:00
4404a0dcd4 Fix T66707 Modifying bone's 'Custom Object' reference shape causes blender to crash
This was caused by an instancing batch not being initialized correctly.
2019-07-15 19:27:54 +02:00
0b25566143 Fix T66955: Cannot delete data from file in outliner.
That switch on ID types had not been updated since quiet some time it’d
seem... Using the ID_Type enum type now, so this should not happen again
(compiler will yell at you if you forget to add here any new ID type ;) ).

Also had to change a bit the code layout then, to deal with fake NLA ID
type...

Note that for now, Screen IDs remain excluded from the ID menu usage,
due to T67004.
2019-07-15 18:10:26 +02:00
9cdd2df277 Fix T66712: A model shows artifacts in the sculpt mode
Was a mistake in normals calculation: need to consider all grids for correct
average in the center of the face.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T66712

Differential Revision: https://developer.blender.org/D5254
2019-07-15 17:38:47 +02:00
ff1b5af307 Fix compositor ignoring mask parenting
There are two aspects to the problem:

- Dependency graph update for compositor preview was missing
  updates flush.

  Apparently, update for new frame style of update will take
  care of flushing, but not the update tagged style of update.

  This goes to a legacy dependency graph and is to be changed
  at some point, but not so close to the release.

- Movie clips were missing from the compositor dependency graph.

This fixes part of T66519.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5256
2019-07-15 17:36:54 +02:00
ee55ac19dc Fix T66870: AutoIK-Len stops working after releasing the mouse
The code didn't check if we should initialize the transform auto IK parameters.
Cleaned up the code a bit too.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5260
2019-07-15 17:30:12 +02:00
daff18dd28 Fix T63349: image texture garbage collection causing freezes
Images were being freed often because the tagging for when the image was last
used was missing.

Differential Revision: https://developer.blender.org/D5252
2019-07-15 17:24:20 +02:00
846e5f1dc0 Fix T66812: Particles + Build Modifier = Crash
Particles can not be used with a destructive modifiers, so we can not
maker such configuration fully reliable.

Not sure this specific setup ever worked in 2.7x, maybe DM index was
somehow reset somewhere in particle system in older Blender version,
or maybe all of Blender version were crashing.

Anyway, seems to be very easy to avoid obvious index past the array
boundary in the mapping,

Reviewers: brecht, zeddb

Reviewed By: brecht

Maniphest Tasks: T66812

Differential Revision: https://developer.blender.org/D5257
2019-07-15 17:03:33 +02:00
69aa5bba4f Fix T66941: GPencil wrong interpolation calculation for last keyframe
The range used for frames was wrong and the last keyframe was way off of the correct place.

Thanks to @MagnumOctopus for catching the bug.
2019-07-15 16:56:54 +02:00
8a5a8282ce Fix T64827 (part two): "Batch-Generate Previews" fails with certain files
Some values (not properly handled by do_versions?) could cause
'rna_backup_restore()' to throw an error resulting in the whole preview
generation not being saved to the .blend file.

I've checked folowwing demo files:
- race_spaceship.blend
- wasp_bot.blend

Here the offending seetings were:
- `UnitSettings` (`length_unit`, ...)
- `FFmpegSettings` (`ffmpeg_preset`, ...)

For now, these are now excluded in `exclude_props`

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5255
2019-07-15 16:38:59 +02:00
70d193203b Fix T66668: frame selected bone not working in weight paint mode
'viewselected_exec()' [which uses evaluated view layer] would query
BASE_SELECTED flag, but it was not set on base_eval, but on its
base_orig.

reason for this is 'ed_object_select_pick()' would modify base flags
[through 'ED_object_base_select()'], but not tag scene
ID_RECALC_BASE_FLAGS.

thx @sergey for hinting.

Reviewers: sergey, brecht

Maniphest Tasks: T66668

Differential Revision: https://developer.blender.org/D5235
2019-07-15 16:20:11 +02:00
914427afd5 Fix T66686: Crash on Particle Edit, then Render
Reviewers: brecht, zeddb

Reviewed By: brecht

Maniphest Tasks: T66686

Differential Revision: https://developer.blender.org/D5259
2019-07-15 15:54:27 +02:00
9db772fe9a Fix T66991 Crash when deleting edit bones when pchan is referenced by bendybone
This was caused by loose pointers.

This diff takes care of clearing the fields of other bones before deleting the pchan.

Reviewers: brecht, sergey

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D5258
2019-07-15 15:13:45 +02:00
e66c3589a2 Fix T66986: errors with add-ons using ctypes in macOS release
Add extra entitlements to allow the kind of unsigned executable memory access
that cytpes does.
2019-07-15 14:20:27 +02:00
ef35dc68d6 Fix T66774 Lookdev: Assert switching from rendered to lookdev
The View was being reused accross different redraw (not allowed).
2019-07-15 13:14:50 +02:00
65a3624877 Fix T66860 Crash on opening .blend file from 2.79
This was caused by the preview render of the material property panel being
1px wide. The computed half buffers width were rounded to 0.
2019-07-15 13:07:42 +02:00
761135a284 Fix showing "__pycache__" in templates menu 2019-07-15 19:40:27 +10:00
d2a4a03890 Fix reading directory as file content on Linux
Reading a directory as a file on Linux was attempting to allocate LONG_MAX,
this happens in template file lists (fix for that coming next).
2019-07-15 19:40:27 +10:00
576963d7c1 Fix crash running GPU shader.format_calc() with attributes like gl_VertexID
When using opengl attributes such as gl_VertexID in a shader its
location is set to -1. This location was used without checking in an
attribute array. This fails big time when called from python. For
example `print(shader.format_calc())` made python crash immediately.

this fixes https://github.com/JacquesLucke/animation_nodes/issues/1141

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5231
2019-07-15 11:24:38 +02:00
872025c4e5 Fix crash HD Graphics 4000 Series On Windows
There was an workaround implemented for specific the Intel HD Graphics
4000 GPU on Windows platform. Other GPU from the same series also need
this workaround.

We will enable the workaround for specific drivers.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5239
2019-07-15 11:22:35 +02:00
8fa50b522a Fix T66587: Can't bake second dynamic paint canvas to image sequence
The issue was the the copy data function didn't copy the active canvas number.
So it would always be 0 and thus use the first canvas when trying to bake.

Also fix not copying unused type data (unused canvas/brush settings).

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5220
2019-07-15 10:47:49 +02:00
bb165d6df1 Fix T66957: GPencil material isolate crash when slot is empty
When the slot of the material is empty, the loop to lock the materials tried to use the material but this was NULL.

Check if material is NULL before using it in other operators too.
2019-07-15 09:53:27 +02:00
986c283c07 Fix T66953: Duplicate items in pose context menu 2019-07-15 14:22:22 +10:00
65168825e0 cleanup: typo in cycles 'min_transparent_bounces' tooltip
Reviewers: brecht

Differential Revision: https://developer.blender.org/D5249
2019-07-14 23:02:51 +02:00
1f57157601 Cleanup: Do not use camel case for "Freestyle" 2019-07-14 15:29:15 -04:00
e3c586e262 macOS: clarify bundle script instructions 2019-07-12 19:50:39 +02:00
1c73b60484 macOS: allow bundle script to re-codesign a Blender.app that was already signed 2019-07-12 19:19:10 +02:00
b94df17ae5 macOS: remove hardcoded paths for code signing python/dylib/so
Differential Revision: https://developer.blender.org/D5234
2019-07-12 18:59:27 +02:00
8d4800990c Fix T66601: Redo Panels are empty the first time a workspace is active
We need to indicate a preferred size to avoid `RGN_FLAG_TOO_SMALL` the first time the region is created.

Differential revision: https://developer.blender.org/D5238
2019-07-12 11:37:18 -03:00
18310ad509 Fix T66773: Active edit-bone isn't updating 2019-07-13 00:20:28 +10:00
3569fdb745 Cleanup: use _orig as a suffix 2019-07-13 00:14:14 +10:00
53a7ce1f8a UI: increase contrast for active bone
Follow up for T66747 fix, active color didn't contrast enough.
2019-07-12 22:30:25 +10:00
f3848e8e1e Fix T66747: Active bone not showing in edit-mode 2019-07-12 22:24:37 +10:00
325501247d Fix AttributeError in mesh properties panel when mesh is pinned
When a mesh datablock is pinned in the properties panel,
`context.object` is `None`. This in turn causes `obj.mode` to raise an
`AttributeError` exception as `None.mode` doesn't exist.

Since there is no (fast/simple) way to check whether the owning object
is in edit mode or not, the properties will be disabled. Not ideal, but
better than spewing an exception on every panel draw.

Reviewed By: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D5237
2019-07-12 14:18:17 +02:00
439777f081 Fix T66689: Viewport isn't updating children hair particle on particle edit
Reviewers: fclem, brecht

Maniphest Tasks: T66689

Differential Revision: https://developer.blender.org/D5229
2019-07-12 14:09:20 +02:00
2048db06d3 Fix T66694: depthdropper (camera focus distance) not working from View3D context menu
Reviewers: campbellbarton, brecht

Maniphest Tasks: T66694

Differential Revision: https://developer.blender.org/D5233
2019-07-12 14:03:58 +02:00
83010c2f02 Fix T66446: UV editor "Deselect on Nothing" not working 2019-07-12 19:19:37 +10:00
f1af8908b3 Fix keymap editor missing tools for UV/Image space 2019-07-12 19:05:03 +10:00
1499994557 Fix T66675: Auto-Save override button has no tooltip 2019-07-12 15:45:52 +10:00
f2df520698 Preferences: disable reading preferences for regular file loading
Although the Auto-Run Python Scripts flag isn't used,
this is still a security risk since exclude paths list is.

Further this isn't what users would expect when loading a file &
only some preferences were being loaded so it's not useful.
2019-07-12 15:04:36 +10:00
7ad21c3876 Fix T66604: Cycles bake crash on specific scene with volume
The issue was caused by un-initialized local storage for volume
intersection hits which are supposed to be stored in per-thread
KernelGlobals.

Fix is to make thread_shader() be the same as thread_render() in
respect of KernelGlobals.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5230
2019-07-11 15:44:09 +02:00
f0b72a776e Fix T66706: crash in viewport shading popover for workbench engine
Differential Revision: https://developer.blender.org/D5226
2019-07-11 15:03:13 +02:00
8a1552545a Fix T66672: auto and manual texture space affected by modifiers
It should be based on the mesh bounds before modifier stack evaluation, but
some modifiers were causing it to be recomputed. The flag to disable texture
space recomputation was not preserved through modifier evaluation.

Differential Revision: https://developer.blender.org/D5225
2019-07-11 14:44:57 +02:00
d663048696 Fix T66691: Ceash trying to render the 2.80 splash image
Was caused by ray direction becoming NaN after some of the bounces.
2019-07-11 13:00:26 +02:00
03d8bfb144 API Doc link: make releases/RC's point to their own version of the doc.
Sounds kind of stupid to have 2.79 pointing to "current" which is now
2.80 API doc... Let's try to avoid that in future.
2019-07-11 12:13:11 +02:00
7c48b6c84c Fix for RC release step to also point at 'current' API doc link.
RC's are supposed to be like "real" releases...
2019-07-11 12:13:11 +02:00
3c4f6399d9 Fix T66628: "Auto Saved Modified Image" not working
Reviewer: brecht
2019-07-11 12:06:21 +02:00
a7ac40888f Text: buffer from text, optional length return arg
No functional changes (currently unused).
2019-07-11 14:19:55 +10:00
676543d91f Fix T66658: Undo steps gets out sync with text/edit-mode 2019-07-11 09:46:47 +10:00
1544b9322c Undo System: add is_final argument (no functional changes)
This is needed step out of undo steps which accumulate changes,
larger changes could be made to handle this but better not
make them at this point.
2019-07-11 09:36:59 +10:00
e60d35153f Cleanup: avoid recursion for undo/redo step skipping
Simplifies making further changes.
2019-07-11 09:22:42 +10:00
d3a8d25fb3 Cleanup: clang-format 2019-07-11 09:22:42 +10:00
de203b26c2 Cleanup: quiet warning 2019-07-11 09:22:42 +10:00
bb7b741d2f Fix T66654: wireframe overlay crash in vertex paint in some cases
Differential Revision: https://developer.blender.org/D5218
2019-07-10 17:05:19 +02:00
91d3b00395 Splash: new image for 2.80 by Andy Goralczyk and the Spring team 2019-07-10 16:48:06 +02:00
53c8fd5447 Fix T66567: Weight painting crashes with specific mesh
Seems the deform group index and deform vertices went out of sync somehow.

Added extra NULL pointer check, which seems to be safe and matches checks
in other places in the neighbourhood.
2019-07-10 16:03:19 +02:00
a6ae53ef49 Fix strict compiler warning 2019-07-10 15:03:57 +02:00
8d8ebc73b6 Splash: put version number in top right, refactor code for easier changes 2019-07-10 14:56:19 +02:00
dc2b562ace Splash: use red heart icon for development fund
Now that the development fund image will disappear from the splash, this
draws a little more attention to this link.
2019-07-10 14:51:30 +02:00
7a431d40e3 Fix splash screen margins not being even and buttons not centered 2019-07-10 14:51:14 +02:00
7695fd9cff Fix release notes not showing in splash without recent files 2019-07-10 14:51:14 +02:00
526876a634 Fix T61770 Multiple Hair Systems Not visible while in particle edit mode
The check was for the whole object instead of individual particle system.
2019-07-10 14:44:09 +02:00
b39d7e484c Fix T66631: Crash when converting objects from Curve to Mesh
When `BKE_mesh_new_from_object()` cannot convert an object to a mesh, it
returns `NULL`. This case was not handled at all in
`BKE_mesh_new_from_object_to_bmain()` or `curvetomesh()`, causing a
segmentation fault.

This commit fixes the segmentation fault, and leaves the curve object as
a curve object.

Reviewed By: mont29, brecht, sergey

Differential Revision: https://developer.blender.org/D5217
2019-07-10 14:13:42 +02:00
Dalai Felinto
d3e1782abc Fix T66530: set_stereo_3d (pageflip) exists Blender
Note: Although this fixes the issue (as in, it prevents a crash)
BKE_reports are not working because of CTX_wm_window_set().

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5210
2019-07-10 09:11:33 -03:00
Dalai Felinto
fde88ad9d2 Fix T66627: Multiobject Edit UV constraint to image bounds
This was broken since the original commit to handle multi-object
editing: rBbfc9d426bb95.
2019-07-10 09:04:24 -03:00
91b4262728 Fix T57489 Eevee: Texture coordinate object reference not working for world 2019-07-10 13:46:28 +02:00
956d38488a Undo System: ensure the text ID for each undo step is used
In practice this wasn't causing errors,
however it could be an issue in the future.
2019-07-10 21:42:17 +10:00
56ec8108e2 Fix T65850 Sculpt: Vertices not hidden if using shape keys 2019-07-10 13:23:54 +02:00
ee4fa41245 Fix T66560 Sequencer: Shortcut keys no showing in menu for 'Move' and 'Refresh All'
The menu shortcut context for 'Refresh All' was wrong and the actual operation
exectuted in the menu for the 'Move' command was different from the shortcut.
2019-07-10 12:57:58 +02:00
12ceea0434 Fix crash when clicking in window while Blender starts
A mouse click in the window will trigger the `VIEW3D_OT_cursor3d` operator
before the viewport is available. This causes a segfault in
`GPU_viewport_engines_data_validate()`.

Other callers of `WM_draw_region_get_viewport()` already check for `NULL`
being returned and handle it gracefully.

Reviewed By: jbakker, fclem

Differential Revision: https://developer.blender.org/D5216
2019-07-10 12:32:10 +02:00
f9232c080d DrawManager: Crash Face Selection
Init the scene of the draw context when selecting. When using face dot selection on
when the subsurf modifier is active on the cage, the scene needs to be
valid. It is read from the context in the
`DRW_mesh_batch_cache_create_requested` and used in the `isDisabled`
method of the SubSurfModifier.

Reviewers: fclem, sergey

Differential Revision: https://developer.blender.org/D5214
2019-07-10 12:18:41 +02:00
6f1190cbf0 Fix T66630 X-Ray + Subdivision surface Face select problem 2019-07-10 12:13:08 +02:00
d3b42fc167 Fix T66626: Crash when using JACK audio device
Restore some context overrides which were originally happening in 2.79.

Made it a bit more paranoid, by storing old values and restoring them
afterwards, so the context is not being changed at the end of the function.
2019-07-10 11:58:37 +02:00
f4b963dbdd Undo: print the undo stack when ed.undo logging is enabled
Print the undo stack on undo/redo when ed.undo logging is enabled.
2019-07-10 19:39:53 +10:00
167f5a61e5 C Logging: add macro to check if logging is enabled 2019-07-10 19:39:53 +10:00
d4d16e7a03 Docs: note about select debug value 2019-07-10 19:39:53 +10:00
2e91fc39ac Fix broken Mesh 'calc_smooth_groups' logic.
We need to check both polygons of a manifold edge to be sure it is
actually smooth...

Reported by Hugo Sales (@someonewithpc) on blender.chat, thanks.
2019-07-10 11:24:37 +02:00
e9d3e056d1 Fix T66571: Unable to change input color space of PSD
Image reader must not override file's color space specification if it
is already specified.
2019-07-10 10:08:18 +02:00
0829bd7b66 Alembic export: avoid BLI_assert() failure when object is not in depsgraph
When the object we iterate over is not part of the depsgraph, we cannot
get the evaluated copy to export. This workaround is temporary to avoid
a BLI_assert() failure getting the evaluated mesh of this object.

This will be handled more elegantly in the new AbstractHierarchyIterator
that I'm working on, but that requires a bigger change than we should
allow this close to the 2.80 release candidate.

This fixes a problem described in T58686.
2019-07-10 09:56:27 +02:00
e927ce8acb Cleanup: avoid line breaks from trailing comments 2019-07-10 14:41:19 +10:00
91b8e57d65 Cleanup: avoid accessing same vars multiple times 2019-07-10 14:01:39 +10:00
31f922bff6 UI: use a label for strip 'frame_final_end'
This is intended for Python access and allows temporary negative frames
which is a problem when accessed from the UI.

This allows:

    seq.frame_final_start, seq.frame_final_end = frame_range

However it allows invalid sequence strips,
using a label is fine since there is a duration property here which
can change the length.
2019-07-10 13:48:03 +10:00
95fcdb0401 Cleanup: reserve single quotes for enums 2019-07-10 13:39:56 +10:00
3b4054cb58 Revert strip start property to strip_start
Using strip_final_start affects strip offset while not moving content.
2019-07-09 15:45:45 -07:00
2893417d67 Fix T62580 Workbench: Shadow glitch due to degenerate threshold
Fix by adding a threshold instead of direct null comparison.
2019-07-09 20:38:46 +02:00
29ebb37419 Fix T66565: crash linking unused light datablock during Cycles preview render 2019-07-09 19:49:09 +02:00
23f1bc7414 Fix T66605: Operation on origins not working correct 2019-07-09 18:52:41 +02:00
3f208ed927 Raise particle count limit for 2.8 release
Blender 2.8 features significant improvements in the creation of particles.
Removed hard limit and increased soft limit.

Patch by Gottfried Hofmann.
Differential Revision: https://developer.blender.org/D5120
2019-07-09 17:43:54 +02:00
b77c01924a Alembic import: fix crash when loading invalid mesh
These were just some missing nullptr checks.
2019-07-09 17:39:02 +02:00
817e2796cb Fix T52814 and T58686: Alembic crashing on fluid sim export
The velocities std::vector was allocated in too narrow a scope, causing
use-after-free errors.
2019-07-09 17:39:02 +02:00
6510ab8676 Fix T66456: UV Editor missing update after selection change in 3D viewport
Reviewers: brecht

Maniphest Tasks: T66456

Differential Revision: https://developer.blender.org/D5207
2019-07-09 15:49:40 +02:00
32f591c0a3 Fix T66610: Planar Track extremely laggy when 3D View is open
The issue was caused by modifications to planar track tagging clip for
copy-on-write, which was invalidating its cache and forcing current
frame in 3D viewport to be re-load.

Ideal solution would be to share movie cache across original and
evaluated movie clips which will reduce memory usage. However, doing
such ownership changes so close to the code freeze is not something
comfortable to do.
2019-07-09 15:46:29 +02:00
fd48ef25a0 Fix (minor) some typos and other errors in UI messages. 2019-07-09 15:30:24 +02:00
b1020ca169 Fix crash on redo applying transforms
When accessing evaluated objects, make sure access to an
evaluated dependency graph is done. This solves possible
access to NULL data on redo.

See https://developer.blender.org/D5209
2019-07-09 14:59:30 +02:00
7bf820fb96 Fix uninitialized loop variable
Fix commit 226c6f086a
2019-07-09 14:55:32 +02:00
977c48b88d Fix T64149: Texture paint can act as a canvas and brush at the same time
I don't know if it was the intended behavior or not, but having brush
and canvas data at the same time with dymanic paint, would lead to the
object trying to act as a brush and a canvas at the same time.

We can't currently handle this with the new depsgraph, and it could
legitimately lead to bad feedback loops.

So now, to be more consistent with the GUI, I've made it only use the
current set type (brush or canvas) as the final type of the object.
That is, you can only have a object be a brush or a canvas, not both at
the same time.
2019-07-09 14:49:08 +02:00
dd84ff212a Fix crash when redoing Set Origin operator
The operator was using a non-evaluated depsgraph to get the evaluated
scene, which caused the crash.

This fixes the crash reported in T66605, but not the problem where
sometimes object origins aren't set.
2019-07-09 14:45:20 +02:00
484794ce67 Eevee: Fix first sample being accumulated without SSR
We check if the previous iteration (sample) was using a valid double buffer.
If it wasn't, we request another iteration.

This fix the issue for viewport,viewport render and image render.

Related to T65761 Eevee render inconsistency between 3D View, Viewport render, and F12 Render
2019-07-09 14:34:56 +02:00
986ff461fb Fix T65761 Eevee: SSRefraction not working on first sample
There is no reason to disable the refraction on the first sample like SSR
does.

This was caussing issues when rendering.
2019-07-09 14:34:56 +02:00
7e34846176 Cleanup: GPU: Correct comment 2019-07-09 14:34:56 +02:00
db45aaafab Fix T61474: laggy interaction on Windows/NVIDIA when gizmos are visible
Thanks to Sergey and Clément for helping to track this down.
2019-07-09 14:03:25 +02:00
89c762dd99 Fix T57652: Multires undo broken with shared object data 2019-07-09 12:12:54 +02:00
25a0acd0a6 GPU: ATI Proxy check
The AMD PRO driver on linux PROXY check also fails. Now the
configuration ATI/Unix/Official driver  will also bypass the
Proxy test.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5205
2019-07-09 12:01:25 +02:00
805cabdf17 Fix T64483: crash when hovering over outliner after closing render window
The `tselem->id` pointer can also be used for non-ID data (according to
this comment in DNA_outliner_types.h:

```
/* XXX We actually also store non-ID data in this pointer for identifying
 * the TreeStoreElem for a TreeElement when rebuilding the tree. Ugly! */
```

As such, I don't mind adding a `NULL`-check in the
`is_object_data_in_editmode()` function. After all, when there is no
object, its data certainly is not in edit mode.
2019-07-09 11:52:16 +02:00
2b43ec56af Fix T66274: Object Texture Coordinate mode not updating in Lookdev / Eevee 2019-07-09 11:24:39 +02:00
516afd0162 Implement Movieclip filter for action editors
Allows to disable keyframes from movie clips in dopesheet.

Reviewers: brecht

Reviewed By: brecht

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D5203
2019-07-09 09:59:34 +02:00
ef5d0a927e Fix T66516: WPaint crash selecting bone with wire & face-mask 2019-07-09 15:14:46 +10:00
05d14c4560 Fix T66359: UV editor ignores face-dot size
D5178 by @deadpin
2019-07-09 12:25:19 +10:00
52cf94eeb5 API Docs: Change handling of Blender Version 2019-07-08 20:53:15 -04:00
75d48c6efd API Docs: Hide Home Icon in Seach Area 2019-07-08 20:53:15 -04:00
ac8c795429 GPU: added debug value to investigate lagging issue in T6147 2019-07-09 01:33:20 +02:00
a42cae1600 Fix T55192: Speed fx applied to scene messed up animation
Don't update animdata after rendering scene
Rendering host scene from sequencer is not supported, removed code is unnecessary.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5199
2019-07-08 15:16:46 -07:00
f04424a15d Fix T66573 Heap Corruption when baking to irradiance volume probe
This is an AMD Proprietary driver bug. Will be reported upstream.
2019-07-08 23:52:06 +02:00
96f5918407 Fix (unreported) UI: useless setting shown for Text data-blocks.
Since we do not have start/end settings for bevel object for Text,
mapping taper to those ends makes no sense here, we can hide that
setting.
2019-07-08 22:48:17 +02:00
fa27d81937 Fix T61401: Failure to register a GizmoGroup after unregistering it
It does not seem right to rely on the python code to fix problems in the C code.
But this already works like this with the other Python Classes.
2019-07-08 13:48:01 -03:00
ff91f605f0 Revert "Fix T61401: Failure to register a GizmoGroup after unregistering it"
Problems with ClangFormat

This reverts commit c1bcde0c0f.
2019-07-08 13:44:03 -03:00
be5911571e Revert "Revert "Fix T63447 Particle system: No particles after switching from hair to ...""
This reverts commit 45761e4c7c.
2019-07-08 13:41:27 -03:00
45761e4c7c Revert "Fix T63447 Particle system: No particles after switching from hair to ..."
Problems with clang style

This reverts commit 8d6a5fb5d3.
2019-07-08 13:40:06 -03:00
c1bcde0c0f Fix T61401: Failure to register a GizmoGroup after unregistering it 2019-07-08 13:37:51 -03:00
8d6a5fb5d3 Fix T63447 Particle system: No particles after switching from hair to ...
... emitter type
2019-07-08 18:09:52 +02:00
3f6e17ddaf Fix T63659 "Viewport render image" don't process corectly "Display As" option 2019-07-08 18:09:52 +02:00
7767e080a0 Fix T66008 Viewport: hidden edges are partially visible
This was a regression from 2.79. The zoffset was doubled for some reason.
2019-07-08 18:09:52 +02:00
1715c396e4 Fix T65534 Eevee don't respect active UVmap 2019-07-08 18:09:52 +02:00
8a7c2c4192 Fix T66351 Wireframe display in sculpt-mode broke when hiding parts 2019-07-08 18:09:52 +02:00
9526e236fc Fix T66348 Eevee: Broken shader if using textures and shader_to_rgb node
Was caused by a missing texture resource.
2019-07-08 18:09:52 +02:00
473259f98b Fix T66475 Spin Modifier: Merge Vert Makes mesh disappear 2019-07-08 18:09:52 +02:00
6b7bc30c64 Fix T66470 Planar track is not adjustable
The issue was that the shader used was expecting GL_LINES and the points
were using GL_TRIANGLE_FAN.
2019-07-08 18:09:52 +02:00
226c6f086a Fix T62941 Subdivision Modifier Showing all face dots
Previously in 2.79 we were using a specialized drawing using derivedMesh.

Now the subsurf modifier tag each center vertex as facedot and let the
DRWManager pick it up.

Some modifiers (deforming ones) do not clear the tag so we can use this
technique even if there is deforming modifiers after subsurf modifiers.
2019-07-08 18:09:52 +02:00
0a16519f5d Fix T61129 Eevee: alpha texture shadow bug
Seems like the AMD pro driver does not consider dead code the same as other
glsl compiler.
2019-07-08 18:09:52 +02:00
9a0a952f72 API Docs: Fix file name 2019-07-08 11:45:25 -04:00
867cd8218a Fix T66556: Noisy drivers relations in certain cases 2019-07-08 17:38:40 +02:00
b2a9627600 Fix T62903: black line in UV editor on 32 bit 2019-07-08 17:34:22 +02:00
50d0a74833 Fix T66538: Menus in popups opening on mouse over
Caused by b708917d94

Solve by restricting this change to popovers
instead of other kinds of menus (enums mainly).
2019-07-09 00:55:26 +10:00
a4bc6aca0e Fix T66554: Measure doesn't snap with Ctrl 2019-07-09 00:18:24 +10:00
6546442f4f Fix (unreported) broken 'compse' feature when editing text.
Looks like that code was not updated when we switched to unicode, it was
still returning axtended ascii codes (iso-8859-15 ones I think)...

That was breaking some chars, which have a very different value in
unicode. Found while working on Text section of the Manual! ;)
2019-07-08 16:11:55 +02:00
9cb1810551 Fix T66431: SE - Audio Caching crash
Moved the caching code from direct calls in DNA to dependency graph.

In fact, not much was needed to be done apart form removing the direct
cache updates. The rest seemed to work fine.

Possible to avoid full sound file re-load, but doesn't seem this is
causing any issues.
2019-07-08 15:57:33 +02:00
8066784ac2 Fix T66499: Parenting a Mask to Plane Track doesnt work 2019-07-08 14:48:42 +02:00
27adc4aa33 UI: Update tooltip of Vertex Selection masking
Since it is now possible to use it in Vertex Paint, not just Weight Paint.
2019-07-08 14:40:48 +02:00
4ca054617b Fix T66526: child's objects move if change their origin position
Reviewers: sergey

Maniphest Tasks: T66526

Differential Revision: https://developer.blender.org/D5201
2019-07-08 14:06:10 +02:00
90dae36213 Fix T66524: Eyedropper in popover crashes 2019-07-08 20:40:34 +10:00
d6ebd04bb3 Fix T66525: Wrong apply scale for children chain
The operator did not behave correct when there was a chain of parents
longer than 1.
2019-07-08 12:23:24 +02:00
118a0df7a7 Fix T66517: Clip editor doesn't respect the 2D cursor
Was caused by 91b768ccb1 which re-defined masks menu with the wrong
invoke type.
2019-07-08 11:46:40 +02:00
08aad00a5d Fix wrong colors when creating a float normal map image in texture paint 2019-07-08 11:05:45 +02:00
f49692f429 Cleanup: Spelling in function name 2019-07-08 10:53:37 +02:00
bb2abacb4b Keymap: Vertex Paint: Add ctrl to temporarily swich colors
This now matches Texture Painting
This was added in rB7d5fb2e103e03046194d69640aadf7e76a700620 but was 
lost probably when migrating to python keymap.
2019-07-07 19:53:44 -04:00
d19d0ff99e Fix T66376: Problem with Gpencil fill tool
The fill material has an alpha > 0, but the show fill is disabled, but as the fill tool is considered the fill as visible and the stroke is not drawn, the fill area had a gap.
2019-07-07 22:28:41 +02:00
ad16af7a7e Cleanup: split enum types, use PF_CMP prefix 2019-07-08 00:43:44 +10:00
1357dd7d3c Cleanup: move enum unto BKE_packedFile.h
Use enum type for functions arguments.

Removed -1 check in switch statement, this isn't needed.
2019-07-08 00:17:40 +10:00
084d545202 Cleanup: use BKE_packedfile prefix for function names
Avoid ambiguity with terms check & compare.
2019-07-07 23:57:35 +10:00
28057d54de Cleanup: clang-format 2019-07-07 23:45:35 +10:00
9e12d762a2 Fix crash running an operator from a popup,
Cell fracture redraw option was crashing.
Change operator popup behavior to close the UI before executing
since the operator may perform operations which change/remove the UI.
2019-07-07 22:35:52 +10:00
414875ce96 Cleanup: unused vars, redundant parenthisis 2019-07-07 22:33:35 +10:00
d7f687c833 Cleanup: use static set 2019-07-07 22:33:35 +10:00
0735c12ca8 GPencil: Hide reference points when use Parallel or Grid guide
These options are not used by these modes. Detected while writing the manual.
2019-07-07 09:38:52 +02:00
cd6b49f995 Cleanup: spelling 2019-07-07 15:38:41 +10:00
a3e2076bc4 Docs: update window/screen introduction
Include global region/areas.
2019-07-07 15:22:16 +10:00
f2a11550b9 Fix T66493: Enable Add-on name not showing in favorites 2019-07-07 14:17:33 +10:00
b1c3038f18 Fix Filter Add-ons panel display for missing add-ons
Check the add-on exists before getting it's info.
2019-07-07 14:15:28 +10:00
e68c8ba24e Cleanup: rename gpencil chess -> checker
Match existing texture name.
2019-07-07 13:54:25 +10:00
7a6c50e79c UI: Correct tooltip 2019-07-06 20:35:52 -04:00
313097c267 API Docs: Fix Links 2019-07-06 19:46:05 -04:00
903b5e1082 UI: Cleanup tooltip format 2019-07-06 19:39:48 -04:00
e106765c96 UI: Cleanup tooltip format 2019-07-06 18:58:03 -04:00
e1fbab12dc API Docs: Update Changlog for 2.80 2019-07-06 17:01:11 -04:00
8933a3bbd0 API Docs: Fix Update changelog script to python3 2019-07-06 17:01:11 -04:00
1f2f5f660b API Docs: Use Opensearch 2019-07-06 17:01:11 -04:00
f702830a79 API Docs: Theme: Prevent Super Long Enums 2019-07-06 17:01:10 -04:00
6fad70d551 Cleanup: API Doc Gen: move copying static dir to own function 2019-07-06 17:01:10 -04:00
df5f06cac2 GPencil: Close Box and Circle primitives with geometry
Before the primitives were closed only with cyclic flag, but this doesn't create geometry for the gap. Now, a new geometry is created using close stroke function to have geometry for sculpt or edit.
2019-07-06 16:10:21 +02:00
741f80864e Fix T66501: Eraser very slow with guides
After testing the file, the problem was related to the fill material. As the fill material had the alpha channel set to 1.0, the fill triangulation was calculated, but the fill was disabled.

Now, the fill flag is checked in order to avoid fill triangulation update.
2019-07-06 13:50:24 +02:00
6c1419d1f4 GPencil: Don't add missing events for Eraser mode
This avoid some code that can delay the easer, but still some problems with the test file.

Related to T66501
2019-07-06 13:10:51 +02:00
a0f3ea7da3 Fix T62101: GPencil: selection order is wrong
Following the advices of @Germano Cavalcante (mano-wii) , I have exposed as a workaround the free function to be called from draw manager for selection.

Now, the free function is not called for selection inside gpencil draw_scene, but it's called from draw_manager.c.

The real fix would be create a new Scene_finish callback in draw manager, but as the release of 2.80 is almost here, we fix this with a workaround that must be removed when new callback is in place.

Differential Revision: http://developer.blender.org/D5193
2019-07-05 23:52:26 +02:00
a7a9c0e50d transform_snap_object: return type of element snapped.
This can be useful for filtering some of the returns.
2019-07-05 18:23:06 -03:00
699193713f Fix T66282: Make Instances Real: Keep Hierarchy option broken with recursive instancing.
Preserving/rebuilding relashionships in recursive instancing was simply
not supported at all, code handling that was assuming a single level of
instancing.

This commit makes the following changes:
* Mixing DupliCollection and DupliVerts/Faces in the recursive chain is
now supported (by using a same GHash in all cases, differences of
persistent_id handling in hashing and comparison is now down inside the
relevant functions).
* When both "keep hierarchy" and "parent" options are enabled, code will
attempt to parent new objects to their version of instancer (instead of
parenting them systematically to the root object). This will preserve
the hierarchy much better.
* Collection is removed from dupli empties that have been made 'real'
(the duplication flag itself was already cleared, but the link to the
instantiated collection was kept).
2019-07-05 18:36:47 +02:00
Dalai Felinto
784121d62a Fix T66327 2/2: Make instance real does not clear collection 2019-07-05 12:24:31 -03:00
Dalai Felinto
68c39e2b41 Fix T66327 1/2: Outliner dupli empty is shown as collection when a different duplitype 2019-07-05 12:24:31 -03:00
7b93aebff9 Transform Snap: Fix dependency cycle between transformed object and object with modifiers 2019-07-05 12:13:08 -03:00
18e619ac69 Fix strict compiler warnings 2019-07-05 16:08:51 +02:00
599626edd5 Fix T64342: Incorrect snapping of focus object in camera view
Use more granular dependency graph traversal, which allows to ignore
dependencies which are not related on transform.

Reviewers: mano-wii, brecht

Differential Revision: https://developer.blender.org/D5184
2019-07-05 16:06:13 +02:00
16307d1e2a Depsgraph: Cleanup, more clear naming 2019-07-05 16:06:12 +02:00
97aa43c364 Depsgraph: Make component traversal more granular
Now it is possible to start traversal from a given component.
2019-07-05 16:06:12 +02:00
9e155eb1f0 Depsgraph: Add dependencies traversal which is aware of component
Sometimes it is required to know which exact part of ID is being
dependent on the given iD. Now it is possible.
2019-07-05 16:06:12 +02:00
03ac94f46a Depsgraph: Add inverse of node type conversion functions 2019-07-05 16:06:12 +02:00
ea05edceaa Depsgraph: Make object component conversion more accessible 2019-07-05 16:06:12 +02:00
609e16339f Fix "child of" constraint "set inverse" problematic with bones
For bone owners we want to do this in evaluated domain since
BKE_pose_where_is() / BKE_pose_where_is_bone() rely on (re)evaluating
parts of the scene and copying new evaluated stuff back to original.

Fixes T66080, T66397

Reviewers: sergey

Maniphest Tasks: T66080

Differential Revision: https://developer.blender.org/D5189
2019-07-05 16:00:52 +02:00
34a0b65ba6 GPencil: Remove select keymap definition for Weight Paint mode
This removes the keymap, but the B key is still available, so in some top level the selection is enabled.

Related to T66458.
2019-07-05 16:00:30 +02:00
5cb3d9df1e Fix T66006: View 3D select enumerate + other options fail
Support other options when using the enumerate option.
2019-07-05 23:55:23 +10:00
9ffb87c629 Fix T66296: Black artefacts on materials with refraction on CPU
The issue was in the optimization code path for opaque shadow rays
which was wrongly considering all primitives in the node to have
same visibility flags.
2019-07-05 15:48:50 +02:00
3c7814d7de Workbench: Disable texture paint drawing for final render 2019-07-05 15:40:48 +02:00
d1349bd0c7 TexturePaint: Force Workbench Texture Color Mode
When in texture paint mode and in solid mode the object that is being
texture painted will be rendered by the workbench engine with textures.
All other objects would render the same. For other cases the texture paint
draw engine will still draw the texture.

The texture mode draw engine now only drawn the masks. The opacity
sliders influences the texture mask.

This change has been implemented conserably. In the future we need to
look into making this better, like adding support that every object
can be colored differently. Currently when rendering in the workbench
we can have up to 3 different color types active (what the user selected,
the fallback in case no materials have been configured and this one,
forcing textures)

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5190
2019-07-05 15:21:11 +02:00
15cc4c4cb3 Cleanup: use doxy comments for WM_types.h 2019-07-05 21:42:21 +10:00
db8c93c02f DRW: add back gl_PointSize for AMD drivers 2019-07-05 21:42:35 +10:00
3640a58b9b Keymap: add V-key to toggle vertex select in vertex paint mode
Match weight paint mode.
2019-07-05 20:20:26 +10:00
4125a330b9 Cleanup: remove redundant gl_PointSize assignment 2019-07-05 20:07:33 +10:00
e7325bedfb DRW: weight-paint wire overlay made vertex selection hard to see 2019-07-05 20:06:47 +10:00
68ec4c26b9 Fix paint modes using edge-selection in non-selection modes 2019-07-05 19:04:37 +10:00
5d75672720 DRW: tweak paint edge drawing to show all unselected edges
32d3bce1ea changed behavior when it shouldn't have.
2019-07-05 18:43:32 +10:00
Alessio Monti di Sopra
1468f77a29 VSE: draw cache on top of markers area
Differential Revision: https://developer.blender.org/D5104
2019-07-05 09:51:12 +02:00
Eitan
baf3887207 UI: Smaller minimum size of scrollbar
Differential Revision: https://developer.blender.org/D5086
2019-07-05 09:46:18 +02:00
c27d70853d Fix T66404: knife tool doesn't use knife cursor 2019-07-05 17:44:47 +10:00
338cbe4ad6 Fix T66453: navigation gizmo doesn't refresh on theme change 2019-07-05 16:36:01 +10:00
31d762c3a8 Fix T66356: runtime assert disabling a collection 2019-07-05 16:28:01 +10:00
66684bdff3 Cleanup: redundant scene access, duplicate flag clear 2019-07-05 16:13:24 +10:00
4a08b974f4 Workaround T61948: Undo steps created for non-paint operations
Changing the brush size for example,
was adding redundant undo steps in paint-modes.

For now, don't store undo steps for property changes
in paint & edit modes.

While not ideal, this is similar to 2.7x behavior.
2019-07-05 13:48:17 +10:00
fdcfc263e9 Use latest/version number for manual links
We want users to go to the current version for their current version 
when possible if not point to latest.

/dev should really only be for development related work. End users 
should not be browsing /dev unless they are reading about upcoming 
features ahead of time.
2019-07-04 18:24:36 -04:00
2740bdfff9 Fix T66362, T66004: Cycles holdout should override indirect only
Now it works again like 2.7, rather than objects disappearing from camera
rays when both options are on.
2019-07-04 18:16:36 +02:00
eed19d9f45 Fix T64253: missing update when moving nodegroup input/output sockets up or down
Reviewers: brecht

Maniphest Tasks: T64253

Differential Revision: https://developer.blender.org/D4959
2019-07-04 18:03:27 +02:00
ab71991a78 Fix T66433: skin resize (Ctrl+A) crashes non-mesh objects
slow poll was altered in rBc252fe7a32ab after recent fix, now be a bit
more specific about meshes only.

Reviewers: brecht

Maniphest Tasks: T66433

Differential Revision: https://developer.blender.org/D5185
2019-07-04 17:39:17 +02:00
178bae9504 GPencil: Fix unreported error with occlude eraser
The option was inverted in RNA and worked opposite of expected.
2019-07-04 17:38:40 +02:00
9ffce6da65 T66266: Grease Pencil Simplify Adaptive is not behaving correctly
Now the simplify code works correctly in 3D space. Before it was trying
to project the strokes down into a local 2D space, but that didn't work
nicely for strokes with overhangs or big changes in the stroke
direction.

The code in question was simplified as well which lead to some nice code
reduction.

Reviewed By: Antonio Vazquez

Differential Revision: http://developer.blender.org/D5183
2019-07-04 16:29:05 +02:00
7ba096e1e7 Fix T63788: Crash if particle system is turned off in particle editing mode
Make sure particle system edit never points to a modifier or particle system
which becomes inactive.

This is needed because copy-on-write will change pointers of them and those
pointers are supposed to be restored from particle system evaluation. But
since the particle system is disabled it never updates pointers.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5180
2019-07-04 15:47:41 +02:00
9e8e479a52 Cleanup: Suppress warning
Introduced by previous commit
2019-07-04 15:44:49 +02:00
88d8f3a765 Workbench: Support for MatCap + Textured models
Now it is possible to enable MatCap lighting on top of textured models
in the workbench engine.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5182
2019-07-04 15:42:46 +02:00
e2bf240cbf GreasePencil: Image render artifacts
When doing image rendering with grease pencil, it reused the view of
workbench or EEVEE. These views might be offsetted due to TAA.

This shifted the view a tiny bit. We will not reset the view in between
render engines.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5171
2019-07-04 15:41:36 +02:00
2ee257e2c3 ImBuf Py API: add crop method 2019-07-04 22:18:30 +10:00
c06eb4ab94 Fix T66414: Brush Color Flip from keyboard (X) does not update color picker panel
Reviewers: brecht

Maniphest Tasks: T66414

Differential Revision: https://developer.blender.org/D5181
2019-07-04 13:39:44 +02:00
c497a7efab ImBuf: add crop function (move out of screendump.c) 2019-07-04 21:15:18 +10:00
b2e3f23bec Cleanup: remove redundant cast 2019-07-04 21:14:12 +10:00
acf26dee5f Fix T66412: crash with displacement and AO node in viewport renders 2019-07-04 13:11:55 +02:00
33987caf3e Fix T63260: Rigid body connect 2019-07-04 13:10:27 +02:00
944458fe6c Industry Compat keymap: Fix keymap conflict related to snapping
There were some keymap conflicts and inconsistencies here. After this change, it works as follows:

Snap toggle on/off: X
Snap pie: Shift-X
Viewpoint pie: V

This is now consistent in all editors and the 3d View conflict should be gone
2019-07-04 13:04:40 +02:00
711960b3c2 node_shader_utils: add possibility to override image colorspace
'is_data'

since the move from 'cycles_shader_compat' (2.79) to
'PrincipledBSDFWrapper' (2.8) we lost the ability to (automatically) set
this colorspace setting for imported textures. This was useful for e.g.
normalmaps to always assume 'Non-Color' data.

This adds the possibility to overide and uses this for normalmaps...

Fixes T66368

Reviewers: mont29, brecht

Maniphest Tasks: T66368

Differential Revision: https://developer.blender.org/D5176
2019-07-04 12:32:25 +02:00
669d50f803 Fix T66405: Python API documentation
removed glVertex from the Python bgl api documentation as they are
deprecated.
2019-07-04 09:19:48 +02:00
d2788510fb API Docs: Update Build Dependencies 2019-07-03 22:47:44 -04:00
66a69fa220 API Docs: Theme Options
- Limit Nav depth to 1
- Turn off stick nav
- Add canonical_url
2019-07-03 22:46:52 -04:00
c252fe7a32 Transform: don't inspect all scene objects in poll
From fix for T66311, c6a199e254

Poll functions should never loop over entire scene,
in this case behave as other transform operators,
only checking the active screen.
2019-07-04 08:34:25 +10:00
cc667854a9 Fix T66372 Convert to mesh with subdivision breaks topology
This was caused by a check that was not taking the restart index into
account.
2019-07-03 21:06:33 +02:00
b8ed75ab6d Fix T61808: remove confusing graying out of workspace that already exist
This was meant to help users see which users are likely useful to add, but
it's not so obvious and there are cases where it's useful to re-append the
same workspace.
2019-07-03 20:44:04 +02:00
0a3e73a91f Fix T65899, T66314, T61808: various issues appending workspaces
This fixes crashes, wrong names and inability to append workspaces in
edit mode. We now bypass the append operator so we can easily return
a datablock pointer and work in any mode.
2019-07-03 20:44:04 +02:00
466cc3fbe4 Fix invalid state after calling append/link operator without any items 2019-07-03 20:44:04 +02:00
771ea2d73f Fix missing update when setting rigid body world collection 2019-07-03 20:44:04 +02:00
4d6172044c Fix T66332: Move gizmo stays in place when vertex is deleted
Reviewers: brecht

Maniphest Tasks: T66332

Differential Revision: https://developer.blender.org/D5177
2019-07-03 19:48:57 +02:00
2866c74208 Fix T59225 Screw modifier not displayed when using single vertex 2019-07-03 18:39:10 +02:00
c6a199e254 Fix T66311: skin resize (ctrl+a) could crash
could happen when used on multiple objects with multi edit, and skin
modifier was not present on all participating objects

Reviewers: brecht

Maniphest Tasks: T66311

Differential Revision: https://developer.blender.org/D5165
2019-07-03 17:51:13 +02:00
5277557755 Fix T66165: RGB Curve node generates too bright color
The issue was that the end point would be extrapolated and it would lead to
very high values if the curve had a near inf slope. Now we use the actual end
point value and only extrapolate values that are outside of the start and
endpoint range.

Differential Revision: https://developer.blender.org/D5151
2019-07-03 17:18:13 +02:00
82990ce2b5 Cleanup: rename variables for easier understanding 2019-07-03 17:11:19 +02:00
eb0142e9af Cleanup debug print left in by mistake.
Thanks to @brecht for noticing it. :)
2019-07-03 16:45:35 +02:00
21668359b7 Fix T66234: Issue on switching material mode between Object and Data
The root of the issue comes to the fact that part of dependency graph
is being removed, without doing any further remapping.
This was happening because only materials used by objects were pulled
in, so when material mode is changed some material became unused and
removed from the dependency graph and freed, causing object or its
data to point to a freed memory in its materials array.

Simplest and safest way to solve this is to pull materials referenced
by both object and object data. This causes somewhat higher memory
usage but keeps evaluated state of scene in an always consistent state,
without any need to tag/update object's data on material mode change.

Don't think it is a problem in practice.

Reviewers: brecht, fclem

Reviewed By: brecht, fclem

Differential Revision: https://developer.blender.org/D5172
2019-07-03 16:32:13 +02:00
5b2705adf6 Fix T66353: VSE: Missing updates when moving strip with animation 2019-07-03 16:31:33 +02:00
c441448359 Fix T66369: Excessive WARN messages in console when opening older files
CDData checking on file load was not taking into account deprecated
CD_MTEXPOLY datatype, which unfortunately shows same weird glitch as
CD_PAINT_MASK and CD_FACEMAP ones...

Note that it was annoying (due to amount of warnings in console), but
totally harmless, since that data type is just deleted anyway.

This commit also generally cleans up the CD_MTEXPOLY deprecation code, we
have a system to handle that, let's use it, instead of defining local
static values to replace it...
2019-07-03 16:05:31 +02:00
3d187a2764 Fix T66377: Applying rotation/scale on a parent changes location of a child 2019-07-03 16:03:17 +02:00
65b2cc2301 Fix T66370: add_relation Message in Console with certain shaders 2019-07-03 14:27:28 +02:00
bad5c379c6 Fix T66374: Crash when adding non-mesh object 2019-07-03 14:06:54 +02:00
f990c23bcf Fix T66366: Multi object edit makes blender crash
Two issues here:

- Evaluated object data is to only be updated for selection only after modifier
  stack is done its job. Otherwise it's possible to have selection batch update
  called on an input data, at the same time as original object data is being
  evaluated.

- If object's modifier stack did not create its own evaluated mesh (in case
  when there is no effective modifiers, for example) can not update selection
  on object's data, as it might cause threading issues between objects sharing
  same data.
2019-07-03 11:54:56 +02:00
055289a95f Fix: failing test gp_workbench 2019-07-03 08:23:52 +02:00
c122bcc182 BKE Particle: Simplify recent changes in distribution code 2019-07-03 00:58:14 -03:00
Dalai Felinto
50ccbe6bb2 Fix T63302: Crash when baking normals from selected to active with no cage
When we create the cage procedurally, we need to remove any edge split
modifiers. Since the new depsgraph in 2.80 we were removing the
modifiers straight from the evaluated object (it is a copy anyways).

On top of that we need to reset its eval data state (BKE_object_eval_reset)
to make sure the call to BKE_object_to_mesh to generate the cage would take the
new modifier stack state into account.

However doing so was freeing the low poly mesh we use later to convert
the normal space.

The solution (and this patch in fact ;) ) as suggested by Sergey Sharybin is to
use BKE_mesh_new_from_object() directly as well as force the modifiers to be
recalculated when any edge split modifier is removed.
2019-07-02 19:33:49 -03:00
2d35fed6f8 GPencil: Fix unreported error in stroke thickness when applies scale.
When apply the transformation, the thickness of the stroke was wrong because the scale was not applied to pressure.
2019-07-02 19:17:38 +02:00
a5b7cf9b5f Fix T53058: Crash when rendering to Quicktime RLE codec
The root cause seems to be an assumption in
[generate_video_frame()](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/writeffmpeg.c)
that we're always using 4 bytes per pixel. This is not true when using
QTRLE in RGB mode, because that uses the RGB24 pixel format (so 3 bytes
per pixel). Just updating the `linesize` property doesn't fix it though,
but just creates a crash somewhere else.

This at least fixes the crash by always forcing RGBA to be written, even
when the user selects RGB.
2019-07-02 18:20:52 +02:00
09ea5dfd09 Fix assert in Alembic tests with constraints
Leave the reader to be created on the CoW object in the depsgraph evaluation,
don't assign the one used for importing to the original object.
2019-07-02 18:09:01 +02:00
2062d649bf Fix workbench render crash in background mode 2019-07-02 18:09:01 +02:00
87c39f1123 Fix T65798: Incorrect auto-tex space for Curves
There are several aspects to the fix:

- Always calculate bounding box for meshes and curves from dependency
  graph evaluation function.

  There is a reason why mesh was tagged for geometry update, so can not
  be spare here in attempts to avoid calculation.

- Copy bounding box and texture space to original object for active
  dependency graph.

  This matches object-level bounding box and allows to remove bounding
  box evaluation from RNA.
2019-07-02 16:51:17 +02:00
65bc59a56d Fix T66340: Missing particles in Grid and Volume distribution.
This solution only alleviates the problem.
2019-07-02 11:44:50 -03:00
57c26453f8 Fix T66295 Collection instance duplicates don't have selection outline
Was cause by shgroup reuse even if select state changed from previous dupli.

Also fixes T64438 Collection Instance object highlight wrong
2019-07-02 16:04:38 +02:00
c362ca3b8a Fix (unreported) untranslatable title of Quick Favorites menu.
Side minor fix found while checking on T66235.
2019-07-02 15:41:20 +02:00
1f65606911 Buildbot: Disable test step for now
It causes some false indication of a failed build on soma platforms
where it times out.

Windows and macOS needs extra work to properly support python paths
and path to the bundle.

This can now happen without poking git every time by doing local
modifications on a builder prior to commit.
2019-07-02 15:39:47 +02:00
e7356bb011 Buildbot: Fix missing configuration for Win ctest 2019-07-02 15:31:06 +02:00
e4df8b005f Fix T64805: Can't generate particle hair edit 'comb cache' in blender 2.8
Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5162
2019-07-02 15:19:02 +02:00
26e6bb3fa3 Fix T65778: Missing selection update with linked objects in edit mode 2019-07-02 15:17:17 +02:00
71099a3d67 Fix T66290: new Node's init api callback was not handling ID usercount.
As Usual...

Note that we have to edit each C-defined of those callbacks that set
Node->id pointer, instead of just moving the generic call to
`id_us_plus()` in `node_init()` below the call to
`ntype->initfunc_api()`, since that one manipulates RNA pointers, which
are supposed to already handle usercounts themselves on assignment.

The C callbacks are moving back to manipulating directly DNA, so it's
their responsability to handle user count then (Py code should do that
automatically through RNA assignement).
2019-07-02 15:12:59 +02:00
163996b681 Cleanup: move comments onto own lines to avoid breaking lines 2019-07-02 22:17:22 +10:00
b708917d94 Fix T66316: "Open on Mouse Over" doesn't work in some popovers
Popovers created from `UILayout.prop_with_popover` opening on mouse-over.
2019-07-02 22:16:33 +10:00
df330ab2bb Buildbot: Fix missing environment for schroot tests 2019-07-02 14:15:44 +02:00
bc0a0a1005 Fix T66322 Object with particle system have expanded selection region
This was caused by wrong pixsize calculation during selection.

Note that this was affecting selectability of lamps too.
2019-07-02 14:06:03 +02:00
ef750790d2 Compositor: Background Fit UI Scale
Make the fit background relative to the UI scale.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5150
2019-07-02 13:35:23 +02:00
5439f682fd Buildbot: Correct previous commit 2019-07-02 12:56:07 +02:00
3cc51cf28c Buildbot: Use correct path to scripts
The `scripts` is to be included into the path, not just the
folder where the scripts are.

Also specify path to datafiles.
2019-07-02 12:52:53 +02:00
6b17b51baa Buildbot: Attempt to make ctest use proper installed scripts 2019-07-02 12:36:07 +02:00
3ff984d746 Buildbot: Enable GTests and test step 2019-07-02 12:07:20 +02:00
10b694877b Cleanup: spelling 2019-07-02 18:05:10 +10:00
a9635c6384 Cleanup: rename set_inverted_drawing, move to GPU_state 2019-07-02 12:34:27 +10:00
1278853849 Fix T61360: Smooth Weights affects all objects 2019-07-02 08:59:40 +10:00
4f321a3373 Fix crash unlinking non-ID types in the outliner 2019-07-02 08:45:28 +10:00
5892233319 Fix submodules hash in previous commit 2019-07-01 23:50:50 +02:00
983ca12d82 Fix T65468 Nurbs: Broken display when hiding control points 2019-07-01 23:49:31 +02:00
9fbfa218e0 Updated tooltips for operators 'Transfer Mix' and 'Join Shapes'. Fixes typo 2019-07-01 23:06:32 +02:00
fcc567b797 GPencil: New python API for closing strokes with geometry
Adds to API the last function created to close strokes in a previous commit.
2019-07-01 23:03:03 +02:00
05a54beb88 GPencil: Add new parameter to python API for activating the new created frame
Sometimes is required to enable the frame created and new "active" parameter allows to do that.

Use: `gpl.frames.new(5, active=True)`
2019-07-01 22:48:48 +02:00
cbc0ad07b3 Fix T65974 Workbench: transparency rendering broken 2019-07-01 22:32:25 +02:00
2002b29ecd Workbench: Combine Xray Alpha with object/material alpha ...
... instead of overiding it (previous behavior).

In practice it's not really noticeable.
This means an object with alpha will never be more opaque when enabling
xray.
2019-07-01 22:29:16 +02:00
c2a762c8e6 Fix T65771 Eevee: Volume Emission not working if density is zero 2019-07-01 20:05:13 +02:00
dcf520cdad UI: increase size of scale gizmo circle
The scale gizmo wasn't working usefully for uniform scale.
2019-07-02 01:48:58 +10:00
016d5cf919 Gizmo: support for filled circle with inner non-zero radius
Needed for changes to the scale gizmo.
2019-07-02 01:48:58 +10:00
4749edccdd Tests: Point ffmpeg data to a new folder 2019-07-01 17:19:01 +02:00
c6d073f6a4 Revert "Rename operator 'Join Shapes' to 'Transfer Mix'."
This reverts commit 741967079c.
We are in UI and API freeze, and this changes both.
2019-07-01 16:53:41 +02:00
510daea545 Linux: add initial 2.80 release information in appdata 2019-07-01 16:53:41 +02:00
69b5a06823 Docs: for release builds, link to specific manual version 2019-07-01 16:53:41 +02:00
9197462e07 Revert "Fix T65798: Incorrect auto-tex space for Curves"
The fix broke a lot of Cycles regression tests. Reverting for now.

This reverts commit 6b9c41719b.
2019-07-01 16:49:12 +02:00
6b3e709feb Theme: minor tweaks to state colors
Use full saturation (since some intensity is lost when blending),
Set blend back to 0.5, made color look dull which isn't good when
some of the colors are similar (faded orange/yellow).
2019-07-02 00:35:27 +10:00
32d3bce1ea DRW: replace edge hash with an edge aligned bitmap 2019-07-02 00:29:31 +10:00
a6fe4d112f Fix: widget states had too low contrast
It was very hard to read the sliders when they had states such as animated or changed.
Slightly increase contrast to alleviate this.
2019-07-01 16:26:06 +02:00
31b2c4c10a Fix T60289: changing gizmo properties causes excessive redraws 2019-07-01 16:15:07 +02:00
bbbb5cad31 Fix T66277: Pinning Fluid Domain properties causes bake error
Reviewers: brecht

Maniphest Tasks: T66277

Differential Revision: https://developer.blender.org/D5161
2019-07-01 15:47:43 +02:00
28fee762ae DRW: Fix Crash in DRW_draw_depth_object when object batch cache is not init
This can happen if the viewport is not redrawn before calling an operator
(frequent in python scripting).

Related to T64805
2019-07-01 15:46:28 +02:00
2698544db2 Fix T66262: slow preview icon loading 2019-07-01 15:36:02 +02:00
3c6260d42d Fix T66301: Crash on vertex slide when the vertex is not linked to a face. 2019-07-01 10:27:26 -03:00
7a4c99de5a Fix T66292: Alpha Blend transparency glitches with volume 2019-07-01 14:44:01 +02:00
809f81cc3a Fix T66207: Invalid depsgraph relation when driver uses object dimension
Would be nice to find a more proper and generic solution instead of name
based comparison, but can not really think a nice way to go currently.
2019-07-01 14:34:23 +02:00
e1cb15c5d6 Fix T66300: GPencil layer context menu not working in topbar layer popover 2019-07-01 13:24:41 +02:00
76aff66301 PaintingModes: Facemask Wireframe Drawing
The wireframe drawing for face masks is intrusive as selected wires
were solid white and always drawn. This made it hard for users to see
the exact color near edges.

This patch draws only the border of the selected faces,
edges between two selected faces are not drawn at all.

Reviewed By: brecht, fclem

Differential Revision: https://developer.blender.org/D5147
2019-07-01 12:47:12 +02:00
6b9c41719b Fix T65798: Incorrect auto-tex space for Curves
There are several aspects to the fix:

- Always calculate bounding box for meshes and curves from dependency
  graph evaluation function.

  There is a reason why mesh was tagged for geometry update, so can not
  be spare here in attempts to avoid calculation.

- Remove texture space evaluation from RNA accessor.

  Such data is to be evaluated by a dependency graph.

  Don't see a reason to be different here: we never force evaluation of
  any kind from RNA.

- Copy bounding box and texture space to original object for active
  dependency graph.

  This matches object-level bounding box and allows to remove bounding
  box evaluation from RNA.
2019-07-01 12:42:42 +02:00
67fc4f4bed Fix T66267: only add DEG cloth collision relations if collisions are
enabled

was detecting unneccessary dependency cycle

Reviewers: sergey, brecht

Maniphest Tasks: T66267

Differential Revision: https://developer.blender.org/D5160
2019-07-01 12:31:41 +02:00
1f79aa602e Fix T66297: Blender on macOS does not open on case-sensitive file system 2019-07-01 12:17:58 +02:00
c64b72998c Fix T66283: Crash on redo/undo during playback 2019-07-01 11:31:53 +02:00
89946834a1 Fix T66279: Strip sound keeps playing after toggling to Camera
Before this change using Sequencer input for the scene strip would
permanently enable sound playing back for that strip. Going back to
Camera would have been still playing sound from the strip, which is
rather misleading since rest of the nested sequencer is not used.
2019-07-01 11:14:18 +02:00
65d770ffa3 Fix T66287: use keyword argument in freestyle text style loading 2019-07-01 09:44:08 +02:00
cf73569d89 UI: run interactive 'Point From Normal' in normal menu 2019-07-01 16:48:47 +10:00
cfea0d9eb8 GPencil: Fix wrong title missing in previous change 2019-07-01 08:40:31 +02:00
c74626c54f Fix keymap editing not tagging dirty
Partial fix for T65629
2019-07-01 16:11:37 +10:00
6f61b6aa44 Fix T66289: Default keymap conflict selecting curve/channels
The default keymap conflicted selecting by curves and channel.

Caused by 325b0ad2ed

Revert to original keys, use click instead of press
to avoid conflicting with box-select.
2019-07-01 16:04:17 +10:00
8eae674eee Fix preferences setting dirty when editing keymap items 2019-07-01 15:16:23 +10:00
fc10a5cf9e Fix T66229: gizmos overlap when switching modes 2019-07-01 13:51:13 +10:00
1a5e1273c1 Fix T66192: Remove gizmos label from topbar 2019-07-01 13:24:57 +10:00
05129ffb3e Cleanup: move screen region find into utility function 2019-07-01 12:10:49 +10:00
26e05cf67a Fix T66246: Key accelerators crashing on save dialog 2019-07-01 11:47:01 +10:00
bbb3500c97 UI: Use Plural Panel Names 2019-06-30 15:51:01 -04:00
ea4b279c32 UI: Use term "3D Viewport" 2019-06-30 15:51:00 -04:00
35045b6135 Fixed compiler warning
`(1L << 31)` can cause an integer overflow on 32-bit systems, `(1UL << 31)`
won't. Fixed as per LazyDodo's suggestion in
https://developer.blender.org/rB956cb4f403dd3a6ddb379202dc1f2770b9820073#238718
2019-06-30 21:49:10 +02:00
789c6e94fb GPencil: Improve Cyclic operator to generate geometry
Now, when close a geometry with cyclic is possible generate new geometry for the gap.

The cyclic operator now supports multiframe edition too. Before only worked with active frame.

Also added the corresponding missing menu options and the new F keymap. All these features were missing, pending of the fix of the alpha glitches in stroke already done.
2019-06-30 21:06:10 +02:00
741967079c Rename operator 'Join Shapes' to 'Transfer Mix'.
The new name is consistent with the 'Transfer Shape' operator.

- Updated the UI descriptions for both transfer operators.
2019-06-30 20:07:17 +02:00
7c8bf77e13 Fix T66204, bevel numeric input respect scene units. 2019-06-30 11:32:38 -04:00
f8f3aca1d4 Fix T66264: UI: Repeated word typo 2019-06-30 11:26:32 -04:00
e40f3f5c48 GPencil: Fix text for Pattern stroke as Stencil Mask
Detected while writting manual.
2019-06-30 09:30:05 +02:00
be060c3990 Fix T65929: multi-object editing for new normals tools.
Leaving the modal point-at as a TODO for now.
All the rest of the new split normal tools converted to
operate on all selected objects.
2019-06-29 16:58:11 -04:00
3994084e6a Cleanup: Fix build warnings with MSVC
gflags emits a few unused variable warnings since the main
CMakeLists.txt raised the warning from w4 down to w3. This
restores it back to w4 in the remove_strict_flags macro.
2019-06-29 09:42:49 -06:00
e981d93fa6 UI: Make Panel Name Plural
This is more consistent with other panels; for example "Shadows"
2019-06-29 11:35:30 -04:00
6f002d1a92 Fix T66250: Repeated word typo 2019-06-29 11:12:50 -04:00
f566212aa2 Fix T66230: delay in the material preview panel after recent changes 2019-06-29 16:01:28 +02:00
1044a3b657 Fix wrong usage of U.ui_scale, drawing code must use U.dpi_fac 2019-06-29 16:01:28 +02:00
8637ff5c96 Fix T66240: clip editor shows Python error about tool header 2019-06-29 16:01:28 +02:00
dd6aff71a7 Fix compilation error without Cycles logging 2019-06-29 13:54:38 +02:00
f021635bd5 WM: support window context override
This makes it possible to take a screenshot from any window in Python.
2019-06-29 18:21:53 +10:00
71086995a5 Cleanup: Fix build warnings with MSVC.
ffmpeg defines some of the math constants if they are not
found before including any of its headers, this lead to
a build warnings about M_E, M_LN2 and M_SQRT1_2 being
redefined once BLI_math_base.h gets included.
2019-06-28 22:53:58 -06:00
97e3af9a05 RNA: Add Screen.is_temporary
Useful to check if the current window is temporary.
2019-06-29 13:39:34 +10:00
b7a03eed8b Fix T66238: Spelling typo 2019-06-28 22:01:26 -04:00
b93e57dcdf Fix T66102: Animation color hard to see when sliders is set to full
Change logic for slider coloring, instead of reducing the blend,
de-saturate the slider and ensure contrast.
2019-06-29 11:24:14 +10:00
4afc9d8e4d Cleanup: de-duplicate button color flag checks 2019-06-29 11:20:09 +10:00
648e8a1f1d UI: Add "(Walk/Fly)" to navigation operator name
Without this, searching for the operator is more difficult.

D5148 by @a.monti
2019-06-29 08:08:02 +10:00
5762137f35 Fix T66224: Grammar in Key Set error messages 2019-06-28 21:44:19 +02:00
daf8e73886 Sequencer: Assign Refresh All to Ctrl-R.
This is needed based on studio feedback to make it quicker to refresh the sequencer clips.
2019-06-28 19:16:04 +02:00
b31af8682c Fix audio not updating when snapping strips in sequencer 2019-06-28 18:02:54 +02:00
c9238e638f Cycles: add back control to render first N bounces with path termination
It's found in the Sampling > Advanced panel and 0 by default. This helps to
reduce noise in some scenes, while making others slower.
2019-06-28 17:47:53 +02:00
4e8c5f4bc8 Fix Cycles OSL assert when running tests 2019-06-28 17:42:35 +02:00
d44aebd3fe Previews: delay icon preview renders a bit for smoother interaction
With Eevee the user interface, 3D viewport and small icon materials previews
are rendered on the same GPU. This can lead to some choppy interaction when
dragging sliders. Delaying the icon preview render until the user is done with
that helps a bit, though it's no guarantee.
2019-06-28 16:47:55 +02:00
e8cb477f8a Creator: Clarify verbosity command line argument
Hopefully it is now clear that verbosity needs to be used with
flags which are enabling debug messages.
2019-06-28 15:45:29 +02:00
0511de99bb Fix non-working verbosity when set prior to --debug
Before this change doing something like `--verbose 10 --debug-cycles`
did not properly set verbosity, only using those arguments in an other
way around was leading to a correct verbosity level.
2019-06-28 15:45:29 +02:00
8401ee24ff Fix issue in Blender 2.7x mask keymap after recent changes 2019-06-28 15:05:36 +02:00
533e267e95 Remove Sticky option from the Floor constraint
This option from the very beginning of its existence needed more work
to make it work correct and this was never done.

This option was working fine during continuous playback, when there
are no skipped frames, but it was failing when AV-sync of framedrop
was enabled.
It was never working correct when jumping between frames, including
rendering on a farm which usually does frame-range based rendering.

With copy-on-write things became even more tricky, since the "stuck"
flag was never preserved between re-evaluations.

Fixes T65683: Sticky Option in Floor Constraint for Bones Not Working
2019-06-28 15:03:24 +02:00
Dalai Felinto
f5e0ae655e Python Templates: Small fix for gizmo custom geometry
The mouse offset was inverted (the widget was going the opposite direction as the
mouse movement).
2019-06-28 09:57:16 -03:00
Dalai Felinto
30d65c326a Python Templates: Update Custom Nodes tooltip
Since we exposed the editors sub-types to the type editor selector, this template
no longer shows in the head, but in the type editor selector.
2019-06-28 09:57:16 -03:00
Dalai Felinto
0519bb584b Python Templates: Silence _MT_ warning in pie menu template 2019-06-28 09:57:16 -03:00
Dalai Felinto
da25748be7 Python Templates: Fix Operator Mesh Add
This was broken since: 06fe2a5e0c
2019-06-28 09:57:16 -03:00
2ffcb80cb6 Python tests: replaced imp with importlib
The `imp` module has been deprecated since Python 3.4, and is replaced
by `importlib`.
2019-06-28 14:37:04 +02:00
dee6fe1441 GPencil: Rename "Clamp Layer" to "Mask Layer"
The old name was not meaning what this option does. Dtected while writting the manual.
2019-06-28 14:24:23 +02:00
4f3f68df30 Fix T66126: Non-active Grease Pencil object stuck in draw mode
Now the modes are reset for grease pencil objects.

Differential Revision: http://developer.blender.org/D5138
Reviewers: @dfelinto
2019-06-28 13:56:16 +02:00
d7d9320f09 Tests: disable keymap hierarchy tests until they are fixed
This is not a critical issue, and it's important to have tests always passing.
Ref T65963.
2019-06-28 13:49:04 +02:00
Dalai Felinto
40a1c67165 Fix T65263: Outliner doesn't display selected object if parent not selected
This works for most situations, however if you have:

```
A
 |-> B
     |--> C
```

And only A and C are selected, C will be shown nested under A, instead
being by its side.

I still have to think on how to address these cases since they are
slightly misleading.

Related: T65263.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5134
2019-06-28 08:38:04 -03:00
782813e463 Fix T65956: node reroute no longer working in right click keymap
It's now always on shift + RMB drag, regardless of the keymap.
2019-06-28 13:06:50 +02:00
980726c1d4 Fix issues with masking tools and RMB/LMB keymaps
This makes things work more similar to 2.79 until there is a toolbar for
mask editing. Select & slide is now always on the left mouse button.

For the LMB keymap the context menu is on the right mouse button. For the
RMB keymap the select & move is on the right mouse button, which is almost
the same as select & slide but for historical reasons there is still a
distinction.

Differential Revision: https://developer.blender.org/D5070
2019-06-28 12:34:02 +02:00
56d52466ef Fix message subscriber using the wrong workspace 2019-06-28 19:38:44 +10:00
f35ef57c8c Revert "Fix invalid area tool being set from message passing"
This reverts commit 9ec8887599.

Causes assert when selection changes modes.
2019-06-28 19:38:44 +10:00
6f0de2328c Fix OpenMP library for tests on macOS 2019-06-28 11:22:33 +02:00
9bcab8050f Fix T63694: Crash using tool gizmos with multiple windows
Gizmo group types now store a user count so they aren't unlinked
while other tools are using them.

The tool system now works with multiple windows.
2019-06-28 18:22:53 +10:00
eac11046a1 Fix T62990: Selecting bones causes pose to be re-evaluated 2019-06-28 10:13:57 +02:00
2110f4a76c Fix T66105: Changing force field does not update simulation 2019-06-28 09:48:44 +02:00
37d5d10849 Fix T66200: Changing workspaces / modes doesn't update tools
Changing the workspace or mode from one window may need to change the
active tool in another window since two different workspaces
may share an object.
2019-06-28 17:43:14 +10:00
9ec8887599 Fix invalid area tool being set from message passing
This wasn't working with multiple windows,
WM_toolsystem_do_msg_notify_tag_refresh could use a workspace
from a different window to the screen that owned the area.

Instead of fixing, remove these since they aren't needed anymore
since changing modes now refreshes the tool system.
2019-06-28 17:38:42 +10:00
bd227d1378 install_deps: Bumped OSL version to 3.4.0_RC2 2019-06-28 08:38:34 +02:00
83d92f55b8 Fix error for tools that share gizmo types doubling up gizmos
Introduced in recent commit c93af8529d
2019-06-28 11:27:11 +10:00
651e574153 Cleanup: unused var, sort structs 2019-06-28 10:07:21 +10:00
5dd8c3f0cb GPencil: Cleanup commented lines from previous commit 2019-06-27 23:28:44 +02:00
d06671b3d9 GPencil: Don't hide Cursor while drawing
This is a partial solution for T62446 while we prepare a way to hide the cursor all the time.
2019-06-27 23:19:05 +02:00
b5a1a2d186 GPencil: Fix missing Fill area when drawing an stroke
There was a mistake in the shading group name.
2019-06-27 19:34:04 +02:00
b2c92d90c8 Cleanup: fix compiler warnings 2019-06-27 19:11:19 +02:00
c187fc09b6 Masking: make image editor UI consistent with clip editor
* Mask Display menu is now part of the header
* Sidebar now has a separate Mask tab
* Add context menu when in mask mode

Differential Revision: https://developer.blender.org/D5102
2019-06-27 19:11:19 +02:00
1cd11c9d75 Fix T66166: NLA invisible source list selection 2019-06-27 18:22:34 +02:00
7ee5ea7751 Fix T65010: Affect options not being displayed in the UV editor snap settings.
Reviewers: brecht, billreynish

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5141
2019-06-27 12:24:03 -03:00
c5eceb3582 Cleanup: EditMode: Remove uneeded shader depth bias
The bias is done using the DRWView now, no need to double it.
2019-06-27 17:02:22 +02:00
19d90c8602 Fix T66119: Assert editing Lattice 2019-06-27 17:02:22 +02:00
4b124143b1 ObjectMode: Fix selection points of LightGrids 2019-06-27 17:02:22 +02:00
c74ccf6a97 DRW: Fix point shaders not using gl_PointSize
All Shaders inside DRW should use gl_PointSize.
2019-06-27 17:02:22 +02:00
58996e3057 Cleanup: GPencil remove DRW_ prefix for internal functions.
The prefix DRW_ must be used only for modules inside Draw Manager and not in the Engines.
2019-06-27 16:42:38 +02:00
91e00bd703 Fix compositor preview not respecting un-keyed changes
This is a part of T66099.
2019-06-27 16:21:18 +02:00
ccfb98511b GPencil: Fix Control points of primitives clampoed by Stencil
The control points were clamped to the stroke thickness due the last stencil change.

Now, the shading group is not clamped.
2019-06-27 16:05:58 +02:00
658aa00718 Build environment: Update OpenSubdiv to 3.4.0 RC 2
Newer OpenSubdiv brings fixes and improvements for non-manifold meshes,
which fixes some crashes we've experienced in the recent past when using
Gregory patches.

Additionally, thing new version of OpenSubdiv brings sparse patches,
which allows to multi-thread topology refinement step.
2019-06-27 15:15:08 +02:00
2a22b8af04 Eevee: Make use of dual source blending for volumetric resolve
This simplify the code and add an example use of dual source
blending.
2019-06-27 14:41:35 +02:00
1f4e9754c0 DRW: Add DRW_STATE_BLEND_CUSTOM
This one enable dual source blending, enabling more fine tuned
blending parameters inside the shader.
2019-06-27 14:41:35 +02:00
7f5a21177a Cleanup: de-duplicate flag checks for button colors 2019-06-27 21:20:29 +10:00
0f983e8540 Fix T65893: Edit Mesh Culling
The edit mesh is culled by object. When the object is not visible on
screen, the edit mesh may still be visible. This change will not  cull the
edit mesh anymore.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5144
2019-06-27 12:53:17 +02:00
5eb156e769 Fix T66171: Cycles OSL trace() crashing in displacement shaders
This is not supported, meshes do not exist in the BVH before displacement.
2019-06-27 12:46:04 +02:00
6f516fcc63 Tests: speed up render tests by running multiple in the same process
Blender startup time and shader compilation is a big factor when running
hundreds of tests, so now all renders in the same ctest run in the same
process.

This was previously reverted due to skipping other tests when one test
crashed. Now if a test crashes, Blender is re-run with the remaining
tests so we get results from them still.
2019-06-27 12:46:04 +02:00
219a10e46a Cleanup: clarify WM_gizmoconfig function naming 2019-06-27 19:58:59 +10:00
1c60f30d04 Fix: Text Location lost X/Y text
Use PROP_XYZ instead, and user Slider=True to make them display as sliders in the UI
2019-06-27 11:15:56 +02:00
c93af8529d Tool System: don't unlink gizmos when changing tools
Needed for tools not to unlink each other with multiple windows.
2019-06-27 18:48:45 +10:00
3366b333e4 Fix switching tools with multiple windows & gizmos
The gizmo would only added if the gizmo type wasn't already linked.
2019-06-27 17:22:05 +10:00
d3f9a722fe Cleanup: error in last commit 2019-06-27 16:48:48 +10:00
4758b4033e Cleanup: remove unused context check in toolsystem_ref_link
Also comment corrections.
2019-06-27 16:40:25 +10:00
3128fe4591 Tool System: don't unlink tools when changing workspaces
Caused gizmos to be lost with multiple main windows whenever one of them
switched workspaces.

Rely on tool gizmos poll function to unlink to gizmo.
2019-06-27 11:13:17 +10:00
155c62b070 Cleanup: GPencil Clarify comment 2019-06-26 21:03:34 +02:00
96af590d58 GPencil: Change HSV modifier to use the same range of parameter that other areas of Blender
The value of the Hue must be between 0 and 1, but the value was between 0 and 2.
2019-06-26 20:58:30 +02:00
69b3c26e75 GPencil: Change "lock_material" tooltip and text
The old name was not clear. Detected while writting the manual.
2019-06-26 20:58:30 +02:00
d93558e914 Make deps: Fix detection/linking of PugiXML on Linux
This time both full `make deps` and final compilation is tested on
a freshly installed CentOS 7.

The thing is: OpenImageIO is not configured to use an external PugiXML
library, so it was compiling its own.
At the same time the OpenShadingLanguage library was commanded to use
an externally compiled PugiXML. This caused some sort of discrepancy
which lead to Blender-link-time errors. Could be linking error, could
be namespace related, could be ABI related. In any case since we do
have PugiXML in the OpenImageIO already lets just stick to it.
2019-06-26 19:50:38 +02:00
a7e32dbcb0 Buildbot: Fix undefined architecture string for CentOS 2019-06-26 19:40:46 +02:00
b98428e046 Buildbot: Fix undefined bits for CentOS based builder 2019-06-26 19:37:17 +02:00
171e0d4283 Fix T66141: missing viewport texture update after find missing files 2019-06-26 19:36:17 +02:00
14de0d6a5d Buildbot: Fix pack stage for CentOS based builder 2019-06-26 19:35:10 +02:00
ae396912fb Buildbot: Fix scl command prefix
Now it should work correct with command passed as an individual
elements of a list.
2019-06-26 18:07:03 +02:00
andreas atteneder
28f472472b Fix typo pratially breaking node shader wrapper (used by IO add-ons).
Reported with patch as D5140 by andreas atteneder (@atti), thanks!
2019-06-26 17:57:07 +02:00
6e016a451e Revert "Fix T63921: Unable to use confirm on release for keyboard shortcuts"
This reverts commit 30bf48c9ca.
2019-06-26 17:55:47 +02:00
81b11b795c CMake: Cleanup, remove explicit Python version
This is now coming from a common CMake configuration.
2019-06-26 16:19:49 +02:00
846b4f1360 CMake: Initial support of CentOS for buildbot configuration 2019-06-26 16:17:08 +02:00
8218fdd89f CMake: Cleanup, remove unused legacy hardcoded paths 2019-06-26 16:12:38 +02:00
93f1703900 Buildbot: Preliminary support for CentOS based builder 2019-06-26 15:42:46 +02:00
3471fde8cc Buildbot: Cleanup, remove unused option
It was originally needed for various migration needs, now CUDA
binaries are always to be built for 64 bit platforms and never
to be built on 32bit platforms.
2019-06-26 15:42:46 +02:00
74ffcad90e PyAPI Doc: Fix presets menu example. 2019-06-26 15:35:34 +02:00
9d79ca24c9 Fix Workbench Memory Leak
Memory leaks happened when using final multi view rendering together with workbench.
Workbench assumed that the textures were always NULL

Reviewers: fclem

Differential Revision: https://developer.blender.org/D5136
2019-06-26 15:15:55 +02:00
11dc736033 DrawManager: Sanatize default_view reset
Grease Pencil already reset the default view so the draw_manager wouldn't assert. During multi view rendering the same assert still happened. This patch will reset the default view when starting to render a new view.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D5137
2019-06-26 15:13:56 +02:00
6d22633a96 Fix T66137: added normal map for painting has wrong color space until refresh 2019-06-26 15:06:49 +02:00
4f386999ea Fix T66111: animated lights not updating in Cycles 2019-06-26 15:06:49 +02:00
6d64565524 Tests: put output of IO tests in subdirectory 2019-06-26 15:06:49 +02:00
51c6dfd7f0 Tests: add navigation links for HTML test reports, and other tweaks 2019-06-26 15:06:49 +02:00
0e327968a9 PyAPI Doc: Minor updates to UIList examples... 2019-06-26 15:06:18 +02:00
310bd2f811 Fix T65942 Eevee: Reflection plane has "show data" checked by default
Disable by default and rename option to "Show Preview Plane".
2019-06-26 14:05:55 +02:00
b3a2de9d18 Fix T65951 Saving project right before rendering (Cycles) causes empty render-preview
Since we are now using the full framebuffer (color+depth) inside the image
editor, we need to disable the depth test by default.
2019-06-26 13:42:47 +02:00
57bb575aa8 Fix T65958: GPencil glitches in line strokes with alpha
Following @fclem comments, I have implemented the use of Stencil for Solid line strokes. For Dots, Boxes and Lines with texture, the stencil is not activated because "kill" some artistic effects.

We have done test in greasepencil-object branch and all it's working as expected and the FPS are equal, so the stencil hasn't any appreciable impact in the drawing time.

The Stencil is used in groups of 255 and the passes are done in the same way. If the stencil is not use for the type of stroke (Dot/Box/Texture), the drawing is grouped as much as possible to reduce GPU overhead and limit the times the stencil bit must be cleared.

For doing this patch I had to add 2 new functions for reading private data to Draw manager. We decided add these function as a temporary solution while the Draw Manager implements the option to clear the stencil by groups. When this option will be implemented, these functions must be removed.

Thanks to Clément for his help and support. It's always a pleasure working with him.

Review by: @fclem
Testers: @mendio @pepeland
See D5126 for more details
2019-06-26 13:38:10 +02:00
9dea69149a DRW: New function to retry stencil_mask value
This function is a workaround to use the stencil in grease pencil and reduce the number of clears.

Reviewed by @fclem.

Note: This function will be removed when draw manager supports stencil clearing by group.
2019-06-26 13:28:26 +02:00
b6cf4a715b Fix missing volume update via scene strip's settings
This is a part of T66117.

The entire sequencer+3d sound was never reliable, so this is as much as i can
fix currently.
2019-06-26 13:00:18 +02:00
5b3530e480 GPU: Add better support for displacement relinking behavior
Previously displacement relinking was trying to be smart and seems to be
broken in some cases. This fixes all cases by brute force.

We copy the whole branch linked to the displacement socket and tag it
accordingly. Then we only relink the nodes that are not tagged.

Moreover, we bypass bump nodes inside the dispacement trees so that the
resulting bump is the same as cycles.

Fix T66000 EEVEE: Unexpected results when displacement interact with nodegroups
2019-06-26 12:03:59 +02:00
e47ce1f2d6 Fix T65755 "In Front" (X-Ray) doesn't work with wire objects
We fix by separating the drawing of wire xray objects.

These wire objects gets drawn before normal wires and set the stencil to
0x0 just like the solid counterparts. Also a prepass is done to "dig"
through non-xray solid.
2019-06-26 12:03:59 +02:00
bf1b00212a Revert "Build script: Don't use external Pugi for OSL"
The change did break compilation on default Ubuntu install for Stefan
and on default CentOS install for myself.

This reverts commit 64671e53d2.
2019-06-26 10:52:24 +02:00
005f90a434 Fix T66132: Unable to move bone in special configuration
Animation needs to wait for the sub-data datablock copy-on-write,
but tagging that copy-on-write should not enforce animation evaluation.
2019-06-26 10:51:17 +02:00
a55aa1a2ca Fix T64796: Default Spacing Smear Brush To 3%
Reviewers: brecht

Differential Revision: https://developer.blender.org/D5129
2019-06-26 10:21:47 +02:00
94af455e37 RNA: only search necessary space types when unregistered panels 2019-06-26 12:50:42 +10:00
545610d3aa Cleanup: un-wrap lines in headers, use doxy comments 2019-06-26 12:44:22 +10:00
abaf6b106d Revert "GPU: Create and use new GPU_texture_read_rect utility."
This reverts commit e061cb4437.
This function is problematic on some operating systems.

# Conflicts:
#	source/blender/draw/intern/draw_manager.c
#	source/blender/gpu/GPU_texture.h
#	source/blender/gpu/intern/gpu_texture.c
2019-06-25 20:26:46 -03:00
9ab0247b6e MSVC: Don't share pch between debug and release builds.
Precompiled headers were sharing the PCH file between debug and
release builds which is 'bad'. Adding the configuration to the
path fixes the issue.

Reported on chat by @mano-wii
2019-06-25 15:27:21 -06:00
Dalai Felinto
7037ff9204 Partial fix to T66126: Non-Active Grease Pencil object stuck in drawmode
This only handles the issue after file load.

To make it an all-around solution we need to deal with
this in ed_object_select_pick, do_outliner_item_activate_tree_element(),
...
2019-06-25 18:03:18 -03:00
f24f70b162 Fix (unreported) missing Scene's GPencil pointer handling in library_query... 2019-06-25 21:18:20 +02:00
0e7187f359 GPencil: Fix User count error when use python to create object
The user count was 2, when the real value must be 1.

The problem was the datablock was created with one user by default.

See: D5131
Reviewers: @mont29
2019-06-25 21:11:49 +02:00
79f9b9083a Industry Compat keymap: LMB-dragging in UV Editor box selects
This makes it possible to drag outside of the Transform gizmo to select
2019-06-25 20:04:09 +02:00
3ea548ef67 Industry Compat keymap: Use Move, Rotate, Scale tools for UV transform, instead of modal operators 2019-06-25 19:28:08 +02:00
Dalai Felinto
a6d2f9ffd0 Fix T65999: Crash when disabling an addon while its panel is visible
Note, the performance of the tests we run here is still bad since we have plenty
of panels around. But better than the crash.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5116
2019-06-25 14:10:31 -03:00
367cd72b23 UI: rename navigation buttons -> controls 2019-06-26 01:46:02 +10:00
72cf239780 Tool System: add UV transform tools 2019-06-26 01:46:01 +10:00
1b064697f1 Cleanup: tweaks to fix for T66065
This fix changed repr() to str().
2019-06-26 01:46:01 +10:00
787e2ddbd7 Fix T66065: Missing text in the UI translations files due to 'fstring' usages.
Am not even sure that it is possible to use fstrings at all when UI
translation is required (that is, is a sensible, reasonable way that
does not make things even more complicated than they already are), but
one thing is certain, this won't be trivial to get it working, so
definitively not a job for now.

Instead just do not use fstrings for UI translatable strings.
2019-06-25 17:26:56 +02:00
24b47c00ea Fix related to T65963: Ctest: Failing test script_load_keymap passes.
Fix things to make test actually fail as expected (one cannot compare
functions to strings, so no more sorting for now).

Not sure how to actually fix the test though, not even sure test make
any sense anymore actually, with all those weirdo gizmos and tools
keymaps thingy...
2019-06-25 16:08:56 +02:00
c8034993ff Fix (unreported) call to wrong func in gizmos' keymaps code.
Found while investigating T65963.
2019-06-25 16:08:56 +02:00
d08312463b Preferences: changes to navigation gizmo
- Add 'Navigation Buttons' preference, used for 2D views
  (previously this couldn't be disabled).
- Add "Off" option for 3D view axis.
- Support minimal axis with navigation buttons.
2019-06-25 22:55:49 +10:00
f472ac391c Fix: Remove 'Separate Images' from Sequencer Movie options
Separate Images does not have any effect on Movie strips, so this removes this option from the Movie menu.

Author: Peter Fog

Differential Revision: https://developer.blender.org/D5130
2019-06-25 14:23:21 +02:00
81e8b8f88a Use prop_factor instead of prop_percentage for Sequencer text placement
Since it goes from 0-1 and not 0-100.
2019-06-25 14:10:15 +02:00
0c2c57167b Sequencer: Fix missing icons for text alignment
Now is consistent with Text objects

Also fix wrong unit for text placement and tooltip-
2019-06-25 14:06:47 +02:00
c186cfe419 GPencil: Add Lattice modifier when use Ctrl+P to Lattice Deform
When parent a Grease Pencil object to Lattice, automatically a Lattice modifier is added.
2019-06-25 14:00:34 +02:00
30bf48c9ca Fix T63921: Unable to use confirm on release for keyboard shortcuts
The issue was that we were still working around a Xorg bug that has been solved since a very long time:
https://bugs.freedesktop.org/show_bug.cgi?id=22515
The second issue was that the global "confirm on release for mouse clicks" was used for keyboard shortcuts as well.

Reviewed By: Campbell

Differential Revision: http://developer.blender.org/D5128
2019-06-25 12:32:00 +02:00
34143592b4 Compress macOS DMG background image
From 2.3 mb to 34 kb

Required adjusting background color. Also fixed blurry Blender logo.
2019-06-25 11:37:02 +02:00
f93d3bd42b Sequencer UI: Move Refresh button from header to the View menus
This button didn't need to be so prominent, and clashed with the Sequencer sidebar
2019-06-25 10:00:20 +02:00
3fa728a98e Fix: Wrong check in Sequencer sidebar
Didn't reflect recent naming changes.
2019-06-25 09:39:40 +02:00
586a044d83 TexturePaint: Fix Shader Compilation 2019-06-25 08:07:50 +02:00
40a396792d Fix T66096: Crash in Cycles versioning 2019-06-25 11:29:17 +10:00
4d42f4b944 Fix building without bullet enabled 2019-06-25 11:29:17 +10:00
c0c1b4542f Fix T65996: metaballs converted to meshes appear to render at an incorrect isosurface.
Not much to be done here really, besides adding yet another hack to that
giant pile of hacks that are mballs...

So to avoid newly created copy of basis of mball to influence to mball
computation, we simply switch it to Empty object for the depsgraph
update run.

Not nice, but working (besides a weird change of basis obflag which
should not happen), and presumably reasonably safe change.
2019-06-24 20:46:07 +02:00
a5ff780065 Fix T63828, T62005: copy/paste or append loses rigid body object
Previously settings were removed, now add to the rigid body world automatically
even if it's a bit ill defined, since this is confusing for users.

Fundamentally the concept of a rigid body world collection could be revised, and
left only as an optional thing.
2019-06-24 18:46:36 +02:00
7d3a28d2d9 Cleanup: clarify branch which shouldn't be possible 2019-06-25 01:16:51 +10:00
b2a20c2d9e Fix T66074: Number shortcut for brushes doesn't work
Add number brush switching for 2.7x map.
2019-06-25 01:08:13 +10:00
4fcc3b8ba2 WM: add operator to set the tool by it's index
Needed for 2.7x brush switching keys.
2019-06-25 01:08:13 +10:00
d61a9b297b Cleanup: use doxy groups 2019-06-25 01:08:13 +10:00
187c696cae Fix T66030: [CRASH] Modifying Normals with Skin Modifier.
clnor editing code was simply not checking at all whether it has
something to work on... Guess nobody had idea to edit custom normals on
a mesh that has no normals before! :P

This should probably be handled in a poll function too, to completely
disable those tools when there are no faces/loops, but let's keep it to
minimal changes at that point.
2019-06-24 16:29:37 +02:00
b617a233aa Fix T66050: Textbox is not updated, when controlled with drivers 2019-06-24 14:58:18 +02:00
4f97e33e90 Fix T66076: crash deleting imported Alembic object 2019-06-24 14:48:32 +02:00
d6d36b9892 Cycles: Cleanup, remove unused argument
Became obsolete/unused after recent fix.
2019-06-24 14:42:20 +02:00
a699a9680b Fix T65812: Image empty has wrong aspect with limit texture size 2019-06-24 22:10:43 +10:00
d51b74f9e3 Fix T66053: hair shape panel shows for emitter particles 2019-06-24 14:02:23 +02:00
6dfdf1f82d Cleanup: use doxy comments for DNA_windowmanager_types.h 2019-06-24 21:41:55 +10:00
1c94030238 Fix T65824: Span property ignored in mesh.fill_grid
The fix for T60777 caused this operator not to work from Python.

Add a repeat_last flag for operator execution.
2019-06-24 21:41:17 +10:00
037956f13f Fix T66075: memory leak in Cycles render tile updates 2019-06-24 13:37:31 +02:00
52b4afacb2 Fix errors raised at generating Python API docs
D5121 by @Nutti
2019-06-24 20:07:20 +10:00
3fb099bf81 Fix T66072: GPencil "stroke placement:surface" uses "stroke placement:stroke"s target parameters
The stroke parameters were used in Surface mode becaus ethe mode was not checked.
2019-06-24 10:14:39 +02:00
829561c03c Fix T66071: Navigation tooltip shows outside of 3D view
Clear gizmo highlight when the cursor leaves the region.
2019-06-24 17:06:44 +10:00
9bc49c051e UI: Rename "Dupli" to "Duplicate" in Spin Tool 2019-06-24 01:29:57 +02:00
59f1eed26b UI: Rename Make Duplicates Real to Make Instances Real
Part of T56648
2019-06-24 00:54:42 +02:00
9c5d54bfaf UI: Rename Dupli-Face to Instance Face
Part of T56648
2019-06-24 00:45:12 +02:00
91069fd47e GPencil: Cleanup code 2019-06-23 17:49:46 +02:00
74ebbafb3e DNA: reduce Object size by 16 bytes
No need to use int for boolean value.
2019-06-23 20:58:24 +10:00
cb817d9f38 Cleanup: unused args 2019-06-23 20:51:07 +10:00
3695513ff7 UI: Only Origins: Correct tooltip 2019-06-23 04:11:16 +02:00
589fa691fd Cleanup: pep8 2019-06-23 11:38:26 +10:00
90d262abe1 Cleanup: unused args 2019-06-23 11:38:26 +10:00
447443e4c4 UI: Rename "Zoom Border --> Zoom Region"
Part of T56648
2019-06-23 03:31:49 +02:00
82c112e4b4 UI: Rename "Viewer Border" to "Viewer Region"
Part of T56648
2019-06-23 03:16:33 +02:00
e7a0f0a993 UI: Rename "Draw Thin" to "Display Thin"
Part of T56648
2019-06-23 01:57:25 +02:00
6182531baf UI: Adjust naming for recent Scene Strip options
- Use Sequencer rather than Sequence
  - Use Camera rather than 3D Camera
2019-06-23 00:19:28 +02:00
a7c4eda3e3 UI: Add Strip Type Icons in the VSE Sidebar Header
This helps users identify the active strip type much more clearly.

Differential Revision: https://developer.blender.org/D5124
2019-06-23 00:16:26 +02:00
ae6300a8b7 Fix T66022: crash adding subdivision surface modifier to some meshes
This reverts commit 7c9f64d008:
"Fix T63766: Multiresolution behavior when using crease edge"
2019-06-23 00:03:36 +02:00
ab94926483 GPencil: Fix Fast Drawing and MSAA disabled in previous commit
The previous commit disable the fast drawing if the background texture was not ready, but it did not detect the Painting mode, so the fast was always disabled.

Now the check is done inside paint mode.
2019-06-22 17:47:00 +02:00
d51ad19f8c GPencil: Don't use MSAA for background texture
This texture has already the MSAA applied.
2019-06-22 17:11:53 +02:00
8bf1977d31 Fix T65955: GPencil: drawing shapes on surface causes intense viewport flickering
There were some problems in the engine because the data was saved inside e_data struct, but this struct is reset sometimes and the background texture is not valid.

Now, the data has been moved to stl->g_data and all creation and free has been moved to use stl->g_data. This fix also some small memory leak for the Buffer GPUBatch data.

The background texture has been moved to texture list because must be available all the time. When is not drawing, the texture is removed to safe memory. Also, if the mode is painting and the texture is not ready because it was removed by Draw Manager, the texture is reloaded with the background image again. This ensure the background image is always visible when painting.

Also I have used this patch to reduce the size of texture used for background to 16F instead of 32F and the blank texture to 1x1 pixels instead of 16x16.

Reviewed by: @fclem

See D5115 for more details
2019-06-22 16:50:01 +02:00
3c8f8a9d24 macOS: tweaks for macOS bundle script
* Follow Blender code style a bit more closely
* Fix mixed tabs and spaces
* Remove old README now that it's part of the script
* Make less tied to specific Blender version numbers
2019-06-22 16:00:06 +02:00
0b988a0aad Nodes: show shader -> other socket type as invalid link 2019-06-22 16:00:06 +02:00
8b633745ff Cleanup: add braces 2019-06-22 23:07:01 +10:00
dc6a6f1828 Keymap: Add Alt-A, Ctrl-I to file-select space 2019-06-22 20:13:56 +10:00
f2e601ebd8 File Selector: add options to select all operator
Add common select options (toggle/invert etc).
2019-06-22 20:10:53 +10:00
dd7e1c23ab Cleanup: use doxy groups 2019-06-22 19:00:09 +10:00
4774657370 UI: remove Visible IPO icons
These are duplicates of HIDE_ON/OFF.
2019-06-22 15:04:46 +10:00
2642ba13b4 GPU_matrix: Add GPU_matrix_unproject_precalc
Pre-calculates values needed for unprojecting to avoid
a matrix invert and extracting projection matrix dimensions for
every call to GPU_matrix_unproject.

Use for gizmo selection drawing.
2019-06-22 13:21:30 +10:00
1b2b9c6b1f Cleanup: redundant static set use 2019-06-22 11:08:12 +10:00
d0fe116dc8 Cleanup: assign strip type to a variable before use (call strip_type)
This was only done in some parts of the sequencer UI,
existing vars were named seq_type & stype.
2019-06-22 11:02:33 +10:00
31d6dc6abf Cleanup: sequencer source panel
Split sound from image/movie branch (since image/movie share logic).
2019-06-22 10:53:52 +10:00
90cb821e23 Fix error in recent UI changes
Image file is meant to be next to the directory in the Source panel.
2019-06-22 10:46:33 +10:00
b555e07585 Fix sub-panel UI offset
The offset for check-boxes in sub-panels wasn't being scaled correctly.
2019-06-22 10:11:15 +10:00
158f799a96 Cleanup: warnings, formatting 2019-06-22 10:11:15 +10:00
953419c641 macOS: install license files inside Blender.app bundle
Since we are planning to install Blender as /Applications/Blender.app without
being contained in a folder.
2019-06-21 23:37:40 +02:00
c553b790fc macOS: rename blender.app to Blender.app
Using a capitalized app name fits the platform guidelines. Since macOS file
systems are case insensitive by default this should not break scripts that
assume lowercase.
2019-06-21 23:37:40 +02:00
ad4f5092ec UI: Remove redundant Running Jobs from Sequencer header.
You would see the running jobs thrice, once in each Sequencer header and in the Status Bar too.
One instance of this is more than enough.
2019-06-21 20:34:24 +02:00
84040b8613 UI: Use enum for Sequencer vs 3D Camera input in Scene panel in Sequencer sidebar
Also move Time and Source below other panels for consistency
2019-06-21 20:01:08 +02:00
e60a01483f macOS DMG bundle, codesign and notarization script 2019-06-21 20:30:17 +03:00
Alessio Monti di Sopra
f9e4568550 UI: use force icon for objects in outliner, fix missing redraw when changing type
Differential Revision: https://developer.blender.org/D5008
2019-06-21 18:29:24 +02:00
9bbd9d9b3b Fix small memory leak in Cycles principled BSDF 2019-06-21 18:15:04 +02:00
5e754b6320 Add macOS disk image background image 2019-06-21 18:10:25 +02:00
Dalai Felinto
dbd3d76447 Rename: Save custom Studio light > Save Custom Studio Light 2019-06-21 13:02:30 -03:00
eeffa8a7f4 macOS: remove blenderplayer.app, don't include Blender Foundation in version 2019-06-21 18:00:48 +02:00
19488ee125 Fix (harmless) Cycles ASAN warnings 2019-06-21 18:00:48 +02:00
a887e1ea43 UI: Restore minimized windows when raising them
Separate temporary windows, like Preferences, should be restored (if minimized) before bringing to top

Differential Revision: https://developer.blender.org/D5105

Reviewed by Brecht Van Lommel
2019-06-21 08:07:12 -07:00
3039d86f8b Fix T65834: Circle Select does not update select_id buffer after orbiting view3d.
This solution checks if `persp_mat` has changed. If positive, the selection buffer is redrawn.

Differential Revision: https://developer.blender.org/D5081
2019-06-21 12:05:47 -03:00
7c9f64d008 Fix T63766: Multiresolution behavior when using crease edge
Switch to Gregory basis patches which are tangent continuous across their
boundaries.

Originally we've used BSpline basis patches to be more compatible with the
old subdivision code, but a lot of things changed anyway.
2019-06-21 15:37:46 +02:00
83a4f5600d Fix T65957: Cycles crash with OSL and UV maps 2019-06-21 14:46:50 +02:00
d6b542b854 Fix T65948: boolean modifier does not merge UV maps with the same name 2019-06-21 14:12:50 +02:00
8691a58a80 UI: Add decorators to Sequencer sidebar
These items you are very likely to want to animate.
Only adding for panels where it makes sense, so not Time or Source.
2019-06-21 13:37:33 +02:00
Alessio Monti di Sopra
99e8346bab Fix T65969: missing update of properties editor for Dyntopo checkbox
Differential Revision: https://developer.blender.org/D5111
2019-06-21 13:31:12 +02:00
4162d0ea3b Fix error in recent sequencer UI update
Use of unset variable, however the value was already assigned
2019-06-21 21:19:59 +10:00
648956b5b5 Fix T65976: switching to workbench engine in lookdev mode shows wrong state 2019-06-21 13:02:58 +02:00
7070e4c15e Revert "Particle system: Move runtime data to runtime field"
This reverts commit 36faf739a7.

Somewhat annoying but this change had some unforeseen consequences,
which lead to an actual bug.

Since this change was not sufficient to get original report fixed
is easier to simply revert for now.

Fixes T65842: Hair disappears when clicking on particle system name
2019-06-21 12:09:45 +02:00
964e319a39 Fix: Alembic import segfault when importing mesh with null UVs
This fixes an issue introduced in 4337bc2e63.
2019-06-21 11:32:57 +02:00
820e431167 Fix: wrong greying out in Sequencer sub-panels 2019-06-21 11:30:11 +02:00
1e7c3a159f UI: Further tweaks to Sequencer sidebar:
- Move strip name to the top (easier to see which strip you are adjusting, and more consistent with other areas)
  - Move Mute next to this, since it affects everything, both audio and video, and completely disables the clip
  - Mute now greys out all the Strip panels, since none of them apply if the strip is disabled
  - Rename Info to Time, since now this panel only includes timecodes and related controls
  - Move Lock to the Time header, since you are locking the time controls
  - Move clip resolution to Source, since it's not related to time
2019-06-21 11:22:56 +02:00
fed6c1a970 Fix T62876: Camera Background Images
Migrate old legacy code to the draw mamager/object mode. The old legacy
version did not work with wireframe. By migrating the code
to modern draw manager code we have mode control on the drawing process.

Still background images do not work with OIT, the cause seems to be that the transparent pixels are treated as background pixels.
Also There are some artifacts when working with Holdouts and DoF, this
is because the draw engines do not pass the correct alpha values.

Reviewers: fclem, brecht

Differential Revision: https://developer.blender.org/D4638
2019-06-21 09:53:51 +02:00
a3a6cda8fb Fix T65745: Bone Selection X-Ray Drawing.
The Pose Bone Selection used normal matric multiplication, but that
mismatched the Depth buffer from all draw engines. They used the
optimized matrices from common_view_lib.

This change will use the optimized version, so the depth buffer matches
and the render artifacts would be correct.

Please note that bone selection is not using shcfg and therefore render clipping is still off.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5100
2019-06-21 09:47:03 +02:00
0c538fc923 Cleanup: spelling, grammar, and other corrections
D5084 by @nBurn with edits
2019-06-21 10:18:53 +10:00
1e050bd08e Fix T65975: Memory leak adding movie sequence strip
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5106
2019-06-20 16:06:29 -07:00
197661c733 Keymap: toggle all gizmos with Ctrl-`
Was only toggling transform gizmos, which is too specific
in cases where users might want to remove gizmos from the view.

This also follows the top-level button which is most prominent in the UI.
2019-06-21 08:36:49 +10:00
d2e474d043 Cleanup: use trailing commas for multi-line arguments 2019-06-21 08:36:03 +10:00
91b8e24db3 Cleanup: don't use plural for forward/backward enum
Match existing enums.

Also use the term 'strip', instead of a 'clip'
(again, follow existing terminology, clip is used for movie-clip strips).
2019-06-21 08:34:27 +10:00
2cad071761 Fix dashed line drawing
The dash_factor wasn't being set in many places, having the graph editor
open for eg, caused box-select in the 3D view not to show dashes.
2019-06-21 08:29:08 +10:00
b30f3f6c19 Fix T65960 Crash on entering Edit Mode of BesierCurve with modifiers 2019-06-21 00:06:46 +02:00
2f3f1f6038 Cleanup: sequencer UI code
- Remove `str()` on strings.
- Remove duplicate layout assignment.
- Don't assigning sub-layouts the name 'layout' (hard to follow logic).
- Spaces around operators.
- Import smpte_from_frame name-space.
2019-06-21 07:59:32 +10:00
04b86c21bf UI: Tweak Sequencer Sidebar panels
Even though we are in UI freeze, we agreed that this should be better, and so we are changing a few things:

  - Clearer separation of controls that affect the image transform vs the video
    - New Transform panel houses Flip X/Y, Offset and Crop
    - Flip X/Y now uses toggle buttons like we do for mirroring elsewhere (clearer + takes up less space)
  - Video panel only includes things that relate to playback, ie Playback Direction, Strobe etc.
  - Backwards/Forwards playback is now an enum rather than a toggle (we should always use enums when it's not an on/off switch)
  - Rename Input panel to Source
    - Just more immediately understandable and correct
    - Move Deinterlace here since it's source file dependent
    - Move Source panel to be a top level panel
  - Merge Info and Timecodes panels
    - Move Lock toggle to Info panel (was previously attached to name field which made no sense whatsoever)
    - Name field now uses full width and doesn't add redundant text in front of it
  - Re-arrange tabs to be Strip, Modifiers, Proxy & Cache, View
    - Strip and Modifiers should be together

Reviewers: brecht, iss

Differential Revision: https://developer.blender.org/D5098
2019-06-20 19:11:39 +02:00
966dbddf3d Fix sequencer sidebar not being wide enough by default to show timecodes 2019-06-20 19:00:51 +02:00
9123595b52 Fix T64705: can't drive object visibility in collection instances
Not the cleanest solution, but should be fine until we add support for driving
collection visibility and revise this system as a whole.
2019-06-20 19:00:51 +02:00
9a88bd5590 Fix T65802: F-curves modifiers in nodes doesn't updates properly
The other built in modifiers, except the generator modifier, seems to
update the depsgraph thought some RNA magic.
However the generator seem to be a bit special and doesn't get included
into this. Now we manually update the depsgraph on value changes to the
generator modifier.
2019-06-20 17:48:36 +02:00
2f77175fec Fix sculpt mask not visible in EEVEE
Differential Revision: https://developer.blender.org/D5092
2019-06-20 17:03:04 +02:00
ce57185ffb Fix T65775: UV projection is dependant of the object position
The rotation matrix included the global object offset too. Now we only
take into account the actual offset that what sent to the function.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5094
2019-06-20 15:15:02 +02:00
Alexander Gordeev
7d83e7a9df Fix T65877: crash when baking in sculpt mode
Also fixes bug where mesh with multires modifier is invisible in render
while in sculpt mode.

Differential Revision: https://developer.blender.org/D5099
2019-06-20 14:38:44 +02:00
e43e278b38 Cleanup: Remove unused depsgraph function 2019-06-20 10:31:05 +02:00
a4c907af77 Fix T65806: Can't Access bpy.context inside Application Timer
Sound synchronization was messing a bit with the context, for, actually,
no reason.

Use more direct queries rather than relying on a context there.
2019-06-20 10:28:52 +02:00
5dcabc4d57 Fix T65770: File Browser missing "Sidebar" in View menu 2019-06-20 14:49:55 +10:00
79bd5174e4 Fix T65922: Custom property error 2019-06-20 14:34:20 +10:00
d30f72dfd8 Fix sculpt not updating on undo with EEVEE enabled 2019-06-19 20:29:25 +02:00
da83f70754 Fix T65398 - Fix frame rate base use in Python SMPTE functions
Differential Revision: https://developer.blender.org/D5064

Reviewed By: brecht
2019-06-19 10:49:37 -07:00
f47c9ad96f VSE: Draw pre-animated (volume) sound strip waveforms. 2019-06-19 10:39:43 -07:00
ccf06c1ff2 Fix T65780: unnecessary GPU image texture reloads after recent changes 2019-06-19 17:49:39 +02:00
da68f31630 GPencil: Remove unreported duplicated Reproject operator in menu
The reproject option was duplicated. Detected writing the manual.
2019-06-19 17:19:36 +02:00
1699de17bd Fix order of modifications for Set Origin.
The logic of parent update is very similar to Apply Transform, so made it
so parents are handled before children.
2019-06-19 16:44:36 +02:00
1fb5453916 Fix T65900: Apply Scale doesn't work correct with parenting
Parents are to be handled prior to their children.
2019-06-19 16:44:31 +02:00
dd89bcc832 Fix T65614: Sequencer render single layer only
Was noticeable when sequencer uses scene with a compositor.

The way it was using render API was forcing a single render layer.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5095
2019-06-19 16:37:07 +02:00
ab60fe2a12 Fix T65914: Workbench Transparency Film
When performing F12 render on a transparent film all solid objects where
a bit transparent. Single Pass AA and no AA passes were not visible at
all.

Issue was that the first frame was not handled correctly making these
artifacts. This commit changes the order of `GPU_state_init` and
`DRW_state_reset` so the state is correct during the first pass.
2019-06-19 16:20:02 +02:00
72690bbeca Bring mask tools back to Masking Tool Area and update Context Menu
The mask tools in the Tool Area of Clip Editor where never brought back,
after decision was made to postpone proper masking tools to 2.81.

This brings back the Mask Tool Panel in the Mask tab of Masking Tool Area.

This Diff also adds a better Context Menu, which respects whether you're
in Masking or Tracking mode. I have added the most important operators
there, with a focus on those that are otherwise harder to access.

Reviewers: sergey, billreynish

Subscribers: sebastian, brecht, hype

Tags: #motion_tracking

Differential Revision: https://developer.blender.org/D5075
2019-06-19 15:06:10 +02:00
11c9702dd4 Fix T65902: save all modified images should not try to save .psd files
We can't save these without data loss, so don't try to do this.
2019-06-19 15:04:05 +02:00
54e6b262a1 Cleanup: Pass explicit dependency graph
Avoids hash lookup on per-object basis when applying transform.
2019-06-19 14:03:23 +02:00
4dc71367c7 Fix T65918 DRW: Crash when add a any modifier to a curve 2019-06-19 12:20:55 +02:00
c2ad29397c Industry Compat keymap: Some curve edit keymap entries were using Click events
This was inconsistent and make the actions seem slow and unresponsive. Change to using Press, like other modes.
2019-06-19 10:29:15 +02:00
d80b0bdc56 UI: show label in tool-tips
When button text doesn't already show the label,
include the label in the tool-tip.

Without this the descriptions for icon-only buttons
don't always make sense.

This also gives a tool-tip for icon-only popovers.
2019-06-19 11:38:06 +10:00
74364a3928 UI: add popover access for button labels
Needed for tool-tips to access labels.
2019-06-19 11:34:54 +10:00
2f5a79b390 Fix button label access returning empty label
The check the buttons string has content (not just that it's non-NULL).
2019-06-19 11:29:51 +10:00
2299e6d9ba Fix active face-dot color
Unlike edge/vert this was blending with the regular selection color.
2019-06-19 10:44:43 +10:00
Dalai Felinto
e73647bf5b Move to Collection: Fix tooltip
Found this while writing the manual page. A scene collection nowadays is simply
called collection.
2019-06-18 20:46:15 -03:00
fc182e3189 UI: add set upper/lowercase to edit-text menu
Lost when toolbar was removed.
2019-06-19 08:21:25 +10:00
7e4de74f25 3D View: draw edit-text selection on-top (x-ray)
This changes behavior from 2.7x, where selection & cursor could be
occluded by other objects.

Doing this without z-fighting in 2.8x isn't so simple because drawing
the text geometry is separated from edit-selection.

Change behavior since this doesn't seem like an important difference.

Fixes assert drawing text edit mode.
2019-06-19 08:05:59 +10:00
dfe2ca26f7 Cleanup: style, indentation 2019-06-19 07:32:21 +10:00
82afc58f91 CMake: cleanup, unset temporary var after use 2019-06-19 07:19:26 +10:00
ba152cc88d MeshBatchCache: Speedup: Do not return valid batch if geometry is empty
There was a huge overhead of batches that had no geometry. The loose
wire batch was the culprit.
2019-06-18 22:28:31 +02:00
82f569d75e Fix T65631 Eevee: Translucent shader broken in Eevee when AO is enabled 2019-06-18 22:28:31 +02:00
f2651bc338 Cleanup: GPU: Fix codestyle 2019-06-18 22:28:31 +02:00
3c1207e730 File Browser: Various fixes and enhancements to 'autoscroll to item' feature.
Initial trigger to this work was T65782, requesting faster autoscroll
when current folder contains thousands of items. That was a fairly
simple change, just needed to make scrolling steps variable based on
'distance' between current position and desired one.

But several other issues showed up while working on this, among the most
annoying ones, the scrolltimer could keep running forever in some cases,
failing to detect properly an 'end condition', we could even get some
'bouncing' in extreme corner cases, edited item was not always properly
visible in the end, etc.

So as usual with UI, this ended up in a frustrating equilibrium game of
finding the optimal solution among several tradeof, taking unexpected
large amount of time... At least new code seems to work OK in
all possible (reasonable) cases, that will do for now.
2019-06-18 21:53:14 +02:00
b10921f0cc Fix Cycles CUDA suboptimal performance on Windows 10 with recent graphics cards
When compute preemption is available we schedule more work which is more
efficient. However the CUDA driver appears to be incorrectly reporting this as
unavailable, even though it should be supported starting with Windows 10 1803
and Pascal and Turing (10x0 and 20x0) graphics cards.

This reduces render time by about a 25% difference on our benchmark scenes. On
Linux compute preemption appears to be reported correctly.
2019-06-18 20:05:36 +02:00
1dab26afb9 Fix T65689 Geometry overlaps axis selector
It seems that in 2.79 callbacks were drawn with depth test off by default.
2019-06-18 16:14:25 +02:00
1a9e698099 Fix T65660 Mirror modifier didn't work with custom normals. 2019-06-18 10:07:53 -04:00
c8e3fe608e Fix T61912, T63297: error baking tangent space normal map with autosmooth 2019-06-18 15:58:30 +02:00
4337bc2e63 Fix T65901: Alembic crash on out-of-bounds UV indices
An Alembic file saved by 3DS Max caused Blender to crash when importing.
Either the UV indices in the file are out of bounds or they are written
in a way we don't expect. In either case, this now no longer causes Blender
to crash.
2019-06-18 15:08:41 +02:00
0b73817c8c Add a new function to recover the next shading group.
After talking with @fclem, we decided to keep this as a workaround function waiting for the clearing operation to be available inside the shgroups.
2019-06-18 14:01:32 +02:00
c11bfb519f Fix T64153: RenderEngine.update_result does not show result immediately 2019-06-18 13:59:55 +02:00
00b10f9c3f Fix T63359: no render preview when save buffers is on 2019-06-18 13:59:55 +02:00
96f0d22e3b Cleanup: remove unused render buffers 2019-06-18 13:59:55 +02:00
8c40bbb15f Fix --help text output 2019-06-18 21:17:38 +10:00
301accd63e Cleanup: improve description wording 2019-06-18 20:59:50 +10:00
d1297e01ac Docs: correct --help text
Also correct description indentation.
2019-06-18 20:59:50 +10:00
af1e94413a TexturePaint: Projection Edit
Disable all overlays except the texture paint overlay. Add alpha to the
resulting image buffer.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4974
2019-06-18 11:14:25 +02:00
f9e0d51e31 Compositor: File output node sockets
When using RNA to alter the type of socket only the type was changed.
the typeinfo was not updated. Internally the File Output Node used RNA
to update the sockettype. making the socket invalid. When users save the
file and reopened the typeinfo was used. Also the color of the node was
determined via the typeinfo.

Another thing that happened was that the socket conversion was ignored
when empty node groups were present. The empty node groups were
optimized away before the needed data conversion was determined.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4938
2019-06-18 11:10:41 +02:00
5e768200c2 Fix T65852: Cmake fails with paths containing special characters.
MATHES performs a regular expression which in this case is unnecessary.
2019-06-17 23:55:01 -03:00
741641f4c3 Fix T65805 Assert "Too many draw engines enabled at the same time" 2019-06-17 23:07:41 +02:00
28b06b6a05 Fix T57650 UVEdit: selection not visible if behind unselected UVs
Use depth buffer to order the uv edges correctly to always draw selected
edges on top.
We still use the double drawing workaround for points to keep the smooth
antialiased display.
2019-06-17 20:32:02 +02:00
be52b25d39 Fix T65357: wrong facemap indices after applying a boolean modifier
Properly initialize custom data layers to default values when copying from
a mesh that does not have all the same layers.

Differential Revision: https://developer.blender.org/D5003
2019-06-17 19:38:19 +02:00
d2f7b93ba0 Inconsistent Percentage Formatting
Percentage formatting of x% (used elsewhere) when using percentage display factor

Differential Revision: https://developer.blender.org/D5050

Reviewed by Brecht Van Lommel
2019-06-17 10:34:09 -07:00
7c229172a6 UI_GetThemeColorShadeAlpha4fv not clamping alpha channel
Fixing small error in UI_GetThemeColorShadeAlpha4fv() clamping blue channel twice instead of alpha

Differential Revision: https://developer.blender.org/D5048

Reviewed by Brecht Van Lommel
2019-06-17 10:23:07 -07:00
Jean First
d8e7d8b82c Fix missing keyframe type operation in dopesheet and timeline context menu
Differential Revision: https://developer.blender.org/D5055
2019-06-17 18:55:07 +02:00
Dan Koschier
4cc98af3a4 Fix T53581: remesh modifier artifacts in sharp mode
Replace relative threshold for pseudo inverse in sharp remeshing modifier with
0.1 as proposed in the original paper.

Also change pseudo-inverse implementation that works with dynamic heap-allocated
matrix to static 3x3 version, for performance

Differential Revision: https://developer.blender.org/D5078
2019-06-17 18:53:49 +02:00
538f2aeaef Fix AV-sync sometimes putting scene one frame back 2019-06-17 17:52:02 +02:00
f827811a42 Fix T65886: Crash when deleting a scene when "New Main Window" is open.
When we delete a scene, we need to update to new scene pointer all main
widows that might be using it, not only the active one from the context...
2019-06-17 16:38:08 +02:00
495aff71ca Fix frame jump with AV-sync enabled
It was possible to have animation player step happening after manual
jump prior to the dependency graph evaluation.

Now we forbid changing scene frame if it was manually requested to
be changed.
2019-06-17 16:35:36 +02:00
c83848722a Fix T59915: Skin modifier produces inverted normals on end-cap faces when vertically aligned edge is assigned root
Sometimes when the end caps pointed strait up (z axis) their faces would
become inverted.

It seems like the code tried to rely on a certain vertex order to always
happen. However this edge case did manage to produce an order that would
produce inverted cap faces.  So now I introduce a normal check instead
so we can be certain that the face will have the normal direction we
want.

Reviewed By: Jacques Lucke

Differential Revision: http://developer.blender.org/D4138
2019-06-17 16:35:21 +02:00
80fb263aa9 DRW: Make stencil state clearer and distinct
Write and test states are now separate and need to be explicit.

Also add asserts when trying to write without test enabled.
2019-06-17 16:13:28 +02:00
6ae2de0266 Cleanup: Fix typo error 2019-06-17 16:12:50 +02:00
e0b8dccd62 Fix T65674: Rigid bodies in duplicated collections are not automatically added to Rigid Body World.
As title says, we need to add back new copies of objects that are RB
items to the RBW collections...
2019-06-17 16:10:18 +02:00
b46c21364a Fix T62384: Grease pencil blank material slot
Now, when you add an slot and then draw, the automatic created material will use the empty slot, instead to add a new slot and leave a empty one.

This fix only works if you add only an empty slot. We could remove any empty slot in the middle, but as this has no impact  in the drawing or file, it does not worth the CPU time to review every time the material list. Anyway, the user can press delete button to remove any empty slot.

If we see this is a big problem in the future, we can reopen the bug and add this cleaning function.
2019-06-17 16:10:01 +02:00
3b8a14a3c0 Fix T65878: "Bpy.ops.object.camera_add" doesn't take the rotation
argument into account

- if a rotation is given, always take it into account [which means
setting alignment to ALIGN_WORLD prior]
- caused by recent rB06fe2a5e0c5d

Reviewers: brecht

Maniphest Tasks: T65878

Differential Revision: https://developer.blender.org/D5085
2019-06-17 16:09:00 +02:00
e52d78978a Fix crash in sequencer after recent audio changes 2019-06-17 15:23:39 +02:00
f1589630a0 Fix T65737: context menu should not have Show Header for topbar 2019-06-17 15:19:06 +02:00
6b63765f1c Fix compilation error after recent changes 2019-06-17 15:13:35 +02:00
729bd7ddd9 Fix T65693: Crash removing higher on special multires objects 2019-06-17 15:12:06 +02:00
7f5c6834f8 Fix T63706: crash in files with custom node trees that contain builtin nodes
Don't make assumptions about which nodes exist in which node trees when loading.
2019-06-17 14:30:16 +02:00
b84085ef1a Fix T63145: nested instancers not respecting Display Instancer setting 2019-06-17 14:30:16 +02:00
e03b717687 Fix T65620: Sculpting brush size jumping.
The PBVHs raycast function calls `isect_ray_tri_epsilon_v3` with epsilon `0.1` which is inaccurate and may result in the problem presented in T65620.
The solution is to use `isect_ray_tri_watertight_v3` instead `isect_ray_tri_epsilon_v3`.
This can positively affect other areas as well.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D5083
2019-06-17 09:16:13 -03:00
5e7e49e00d Fix T65662: Drivers on custom properties doesn't properly update
Happens if custom property is on object data data-block, which doesn't
have translation or geometry components. Not for lights and cameras at
least.
2019-06-17 14:09:01 +02:00
b50de0f8b7 Fix T65651: Crash when changing audio strip source file 2019-06-17 12:55:24 +02:00
96e9caba6e Fix T63867: image sequence not updating in Eevee animation render 2019-06-17 12:12:48 +02:00
4285729d4b Cleanup: Fix comment typo error 2019-06-17 11:46:19 +02:00
0ef473969f Pipeline: Fix memory leak when movie failed to open 2019-06-17 11:10:23 +02:00
7b8d4904d2 Fix T65817: Video Sequencer doesen't render speakers' sounds
Part of the issue was caused by missing speaker objects in the depsgraph
used for post-processing.

Remaining part was caused by missing scene sound update for this depsgraph.
2019-06-17 11:04:17 +02:00
5364e62b05 UI: add back Data-block 'show_hidden_files_datablocks' name
This name didn't indicate items in the ID data-block browser will be hidden too.

Reverts part of:
ad707115d5
2019-06-17 13:02:34 +10:00
a1ef2e4b16 Cleanup: comment, RNA spelling 2019-06-17 12:52:20 +10:00
12da679fa0 UI: remove redundant RNA_TYPE property in the key-map editor 2019-06-17 09:08:17 +10:00
e85635b882 Cleanup: comment spelling 2019-06-17 08:05:58 +10:00
40a8c49088 Revert new grease pencil cursor for paint modes
This reverts commit a412f49e75 and 873c756e5d. The change was only
supposed to affect grease pencil, but also changed the cursor for sculpt mode,
where it's not clearly visible. Since this has not been quickly resolved I'm
reverting the commit.

Ref D5036.
2019-06-16 20:29:22 +02:00
087a489867 Cleanup: simplify GHOST cursor API, no functional changes 2019-06-16 19:58:26 +02:00
5767dcbe60 Fix T65809: Blender crash while using the Normal's "merge" option in edit mode.
Merge code will generate temp normal editing data for affected loops,
but since it will later (by setting some edges/faces to smooth) alter
and extend affected clnor spaces, it will also need temp normal editing
data for some other loops around those vertices...

Using those clnor editing data in that code is a bit of an abuse, but on
the other hand that struct stores exactly what we need.

So simply added an option to generate that editing data for all clnors
of affected vertices.
2019-06-16 18:04:57 +02:00
b1b0781c1e Drivers: shorten the security restriction warning.
A longer string is truncated in the popover, which can't be resized.
2019-06-16 17:14:57 +03:00
3e086af79c Drivers: fix Variable Copy & Paste in the edit popover.
Without these buttons the functionality of the popover is
incomplete compared to the Graph Editor panel. To support
this the operators have to read the active F-Curve from
the context, instead of directly scanning animation data.

Expanding the context would also help Python operators.
2019-06-16 14:16:05 +03:00
985f33719c Fix T65844: wrong eevee hair when vertex colors are used as input
- was using wrong offset [index instead of index * 4]
- also minor correction to variable naming

Reviewers: fclem

Differential Revision: https://developer.blender.org/D5082
2019-06-16 08:34:19 +02:00
87de71a8aa Fix: File browser icons intersecting in thumbnail view
The new icons were colliding in the corners. This moves the ID type icon inside the file box to avoid this clash.
2019-06-16 00:35:22 +02:00
2f12b01c55 Fix Cmake Error.
`LAST_EXT` only works in versions 3.14 or greater.
2019-06-15 19:16:04 -03:00
22b705d2cb Cmake: Add WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS option
This allows grouping files in a filter corresponding to the source files name.

Differential Revision: https://developer.blender.org/D5077
2019-06-15 15:44:47 -03:00
bfd18c471d Cmake: rename WINDOWS_USE_VISUAL_STUDIO_FOLDERS option to WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS.
Suggested by @LazyDodo
2019-06-15 15:35:36 -03:00
e567468ee1 QtCreator/Visual Studio: Group glsl files in Shaders group. 2019-06-15 15:32:41 -03:00
2696c85ba7 Fix: Clicking in empty area in Node Editor was no longer deselecting all.
There was a missing keymap property on the select operator for both the default and Industry Compatible keymap
2019-06-15 20:09:15 +02:00
2db35ff03a Windows: Clear PYTHONPATH variable in various debugging batch files.
The PYTHONPATH environment variable sometimes causes issues,
clearing it in the helper batch files is easier than talking
every user individually though the process of removing it
to see if it resolves the issue they are having.
2019-06-15 11:30:31 -06:00
aaf65749e9 WM: Remove Cmd-LMB for RMB emulation for apple
The default apple keymap now uses Cmd as Ctrl,
so the key isn't free to emulate RMB.
2019-06-15 13:38:43 +10:00
0fd96b4128 Cleanup: spelling 2019-06-15 09:24:38 +10:00
edda93caf9 Cleanup: clang-format 2019-06-15 09:08:46 +10:00
83661a5cfe Outliner - Replacing GP Layer Icon
This only replaces ICON_GREASEPENCIL with ICON_OUTLINER_DATA_GP_LAYER icon

Differential Revision: https://developer.blender.org/D5073

Reviewed by Dalai Felinto
2019-06-14 14:59:44 -07:00
55c379daea UI: Icons - Adding ICON_OUTLINER_DATA_GP_LAYER Icon
This adds the icon intended for Grease Pencil layer data, in SVG but currently marked as blank

Differential Revision: https://developer.blender.org/D5073
2019-06-14 14:49:44 -07:00
23254ce4ee Cleanup: Rename: Static Override -> Library Override.
Better to make internal code naming match official/UI naming to some
extent, this will reduce confusion in the future.

This is 'breaking' scripts and files that would use that feature, but
since it is not yet officially supported nor exposed in 2.80, as far
as that release is concerned, it is effectively
a 'no functional changes' commit.
2019-06-14 23:21:12 +02:00
f640701858 Fix T65814: Copy pasting audio strip from video crash Blender 2019-06-14 22:47:34 +02:00
0707177ab8 Fix T64913 Eevee: shader compilation does not reset TAA
This tracks the number of compiling shaders and just reset the TAA
if previous number mismatch.
2019-06-14 19:17:06 +02:00
486755460a Cleanup: DRW: Remove one useless matrix multiplication 2019-06-14 19:17:06 +02:00
88cce6faea Fix T65569 Eevee: Volumetrics on alphablend surf. not working in renders
The wrong volume buffer was used one frame out of two.
2019-06-14 19:17:06 +02:00
34644f520a UI: Outliner - GP Icon Changes
Changes all GP layer icons to Pencil and highlights selected layer with background color.

Differential Revision: https://developer.blender.org/D5073

Reviewed by Dalai Felinto
2019-06-14 09:55:07 -07:00
e76b223ea3 Outliner - Notify on GP Layer Change
This adds NA_SELECTED to notifier when selecting Grease Pencil layers so Properties Editor will update

Differential Revision: https://developer.blender.org/D5073

Reviewed by Dalai Felinto
2019-06-14 09:48:42 -07:00
Dalai Felinto
f51de2246c Fix T65641: Move to collection - arrow keys work in the opposite direction
Patch my Germano Cavalcante (mano-wii).
2019-06-14 12:58:36 -03:00
648a352bbf Fix T65630: Paste pose doesn't work with motion paths enabled 2019-06-14 17:35:01 +02:00
0cd720e3a5 Fix pose copy storing action/animation in copybuffer 2019-06-14 17:35:00 +02:00
33571be2af Fix T65632: Connected Proportional Editing is affected by Curve Object's Local Scale
Make curve vertex distance take into account the object scale.
2019-06-14 17:26:33 +02:00
a5a0f158e3 Eevee: Fix Contact shadows with Translucent BSDF 2019-06-14 16:20:29 +02:00
6e414b2910 Fix T65647 EEVEE: Contact shadows "Softness" settings darkens objects
This was commited by mistake.
2019-06-14 16:20:29 +02:00
956cb4f403 Fix T65803: MPEG4 unsupported timebase denominator
- MPEG4/DivX has a maximum value of 65535 for the timebase denominator.
- MPEG1 and 2 have a list of supported frame rate ratios. These use
  ratios like 24000/1001 and need those exact numbers.

This fixes an issue introduced in c5b1e7cd4e
where the correct ratio was passed to FFmpeg, but not with the identical
numbers FFmpeg has in a lookup table.
2019-06-14 13:37:39 +02:00
31a99a3ab4 Fix T65763: Reset GPU when exporting annotations
When exporting annotations using `bpy.ops.render.opengl` the annotations
where only correct in the first frame. In the second frame the
annotations was shifted by half the resolution.

This change will reset the GPU matrices when the annotations are
rendered.
2019-06-14 10:49:05 +02:00
3bfd81ce29 Partial revert of "Theme: Blender Light update"
Partially reverts commit 3b58bf3c7e

Green highlights aren't as bright as yellow/orange & were
reverted for the default theme, do the same for the light theme.
2019-06-14 15:15:07 +10:00
fe555a8073 Theme: Update Blender Light 2019-06-14 14:51:05 +10:00
170541c5c7 Cleanup: remove developer panel
Defined whole panel for a single checkbox which is hidden by default.
2019-06-14 13:56:33 +10:00
a4bd3f7d7e Mesh Selection: Move Selection ID Context Utilities to ED_view3d.
This patch does not bring functional changes, but it is a good change if we want to use these utilities in areas other than those using BMesh (eg painting editors).

This is also a step to replace `ED_view3d_select_id_validate`. That function erroneously checks `V3D_INVALID_BACKBUF` which causes it to update unnecessarily.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5072
2019-06-14 00:03:00 -03:00
accd8d005b Docs: minor improvements to --app-template help text 2019-06-14 12:59:14 +10:00
8ac0fef4df Cleanup: sort structs 2019-06-14 10:12:10 +10:00
35d49595c6 Cleanup: minor adjustments to --help text formatting
- Single quote args so they show with string literals in the manual.
- Improve the description of animation playback mode.
2019-06-14 10:10:01 +10:00
5e626e7664 Fix T61768 Eevee Offscreen rendering
The issue was caused by a bad usage of GPUOffscreen.

The Framebuffer was created using a window framebuffer and used
in a viewport callback when another GPUContext was bound.

This change allows up to 3 framebuffers per GPUOffscreen.

Most common case will be using 2 framebuffers (one for init and
one for drawing) but in the case of more (bad usage) it will just
degrade performance a bit.
2019-06-13 21:32:02 +02:00
1688a57a8e Fix T65783: Gpencil Edit mode doesn't round data icon
See D5071 for more details

Thanks to @brecht for his help
2019-06-13 20:38:44 +02:00
0b40af97f4 Fix T59275: generated texture coordinates don't stick to mesh for shape keys
No need for this optimization in Eevee anymore, instead the modifier stack will
only compute CD_ORCO when needed.
2019-06-13 20:26:13 +02:00
45145e746d Fix part of T63595: generated texture coordinates don't stick to deforming mesh
Always compute CD_ORCO undeformed coordinates now for rendering, same as before.
There is still a refresh issue to be fixed, when switching from solid to textured
mode in the viewport.

Computing such undeformed coordinates can be expensive and is not actually needed
if the mesh is only using e.g. UV maps. This was the same in 2.79, at least now we
are skipping the computation when there are no deforming mdifiers on the mesh.
2019-06-13 20:14:19 +02:00
15dd289992 Mesh: don't compute CD_ORCO layer when there are no deforming modifiers
This saves memory and evaluation time for simple static meshes with e.g. a
subdivision surface modifier. If no CD_ORCO layer exists then we assume the
actual vertex coordinates are equal to the original undeformed coordinates.
2019-06-13 20:03:06 +02:00
09cc318fd6 T65783: UI Inconsistency with Grease Pencil icons in Properties and Outliner
Fixed Properties and tab icons
2019-06-13 19:19:57 +02:00
c49f91a3b6 Fix T65669 Bones in Envelope Display break apart after selecting bone
This was because the VAOs were not updated if an instance batch was
reusing a VBO containing instances attributes which was reinitialized.

Now we ensure the Batch will reconfigure the VAOs if the VBO is 0.
2019-06-13 18:11:43 +02:00
30116a5274 Fix T65109: Object deleted when removed from the RigidBodyWorld collection.
While user should never do that, it appears many end up using a 'view
layer' instancing collection as RBW collection, and even worse, have
objects in that unique collection.

Therefore, when removing RB simulation from an object, which among other
things has to remove it from the RBW collection, it would fully delete
the object from the blend file.

This fix merely checks the usercount of RB-removed object, and if it is
at 1 (which means object was in a single collection), it adds it to the
scene's master collection first.
2019-06-13 18:02:43 +02:00
245129e8e2 Fix T65445: wrong defaults when appending workspaces from builtin templates 2019-06-13 17:56:42 +02:00
84936ce0ee Defaults: refactor startup.blend code, more consistely apply to templates
There were various changes only applied to specific builtin templates even
though they should apply to all, since it's possible to do e.g. use grease
pencil objects in the general template or use mesh sculpting in the grease
pencil template.

Also, nearly all changes now apply to builtin templates only. This was
already the case for most, and the distinction seems to have been more by
accident than intent.
2019-06-13 17:56:42 +02:00
242b5932ca Industry Compat keymap: Fix broken Tab key in the Text Editor
Was being used for operator search here, which doesn't make any sense
2019-06-13 16:45:37 +02:00
01bcee7efb Fix: Sequencer timecodes was using wrong properties
- The Start value and the Playhead value both used 'frame_start', which only tells you where the strip was originally inserted. Instead 'frame_final_start' is now used, which results in the correct timeline values.
  - When scaling the sidebar some of the the labels weren't scaling correctly, this has been fixed
  - Use Hold Cut/Cut instead of Hard/Soft Cut, for consistency

Patch by Peter Fog

Differential revision: https://developer.blender.org/D5065
2019-06-13 15:54:45 +02:00
9d269a97be Fix "Fix Deform" not working in Blender 2.8
Need to copy changes to the evaluated mesh before requesting
new deformed mesh.

Tested on a file from T32406.
2019-06-13 15:23:47 +02:00
64b759ba88 Fix "Fix Deform" access evaluated data form original objects
This is part of T60517.
2019-06-13 15:09:46 +02:00
1e8b007d50 Set Node Editor to use Box Select tool by default
This makes Shift and Ctrl work properly to extend and subtract selections.
This also moves Cut Links to Ctrl-RMB, which doesn't conflict with the selection tool.
2019-06-13 14:41:21 +02:00
1f1b638b40 Cleanup: clang-format 2019-06-13 13:43:07 +02:00
6f43541d8c GPencil: Reorganize blend shader
Reorganize code and change some functions to mimic other softwares blend modes. Still need more work.
2019-06-13 13:38:31 +02:00
e0c98e18f9 GPencil: Remove blend_opacity from shader
The opacity was already used and using it in the shader only duplicate the blend.
2019-06-13 13:33:04 +02:00
36faf739a7 Particle system: Move runtime data to runtime field
Allows it to be preserved during copy-on-write update when on-geometry
related update is needed.

This is a required part for T63537, where we need to preserve the entire
evaluation data when object is tagged for only RECALC_COPY_ON_WRITE.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5023
2019-06-13 11:34:01 +02:00
27537daee1 Clear Datablocks Preview: add some more generic options.
Sometimes one may want to nuke all previews altogether, running the
operator for all eight individual ID types would be tedious then...
2019-06-13 11:11:32 +02:00
8556b0da70 Fix T65034: Viewing material calls frame update handler
Use lower level dependency graph evaluation which doesn't run any handlers,
doesn't touch sound system, doesn't inform image editors about changes.

Should probably move such evaluation steps to a helper function in DEG module,
but that is more like a cleanup.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5067
2019-06-13 10:54:01 +02:00
d63438e4d1 Cleanup: correct wireframe xray flag name
Revert part of d56c0a0a6a
2019-06-13 17:33:51 +10:00
41acdac2de Cleanup: clang-format 2019-06-13 12:37:01 +10:00
be1e61b093 Cleanup: tweak logic for skipping modules
Startup is the special case, so match against this instead of 'modules'.
2019-06-13 12:35:18 +10:00
2404220e80 Hide from UI overridable option for custom properties. 2019-06-12 20:00:11 +02:00
04c54dec44 Fix T57489: Texture coordinate object reference not updating in Eevee 2019-06-12 16:58:34 +02:00
db5c8c0393 GPencil: Fix clamp alpha problems when using Regular blend
The problem was the alpha was not premult and the opacity factor was applied two times.
2019-06-12 16:55:24 +02:00
da38558da2 Typos in description 2019-06-12 16:26:58 +02:00
abd240332d Compositor: fix linear feather falloff in dilate/erode node
The bug only affected debug builds.
2019-06-12 15:53:37 +02:00
d788f5231e Fix T65741: Removing a GPencil Object's Material Slot deletes the strokes assigned to it
This was a design decision, but now we have decided to change it using the active material for the strokes using deleted material.

If the material slot is empty a new material is created to keep the strokes visible.
2019-06-12 15:52:03 +02:00
7a50d078fe Fix T64930: FFmpeg Output- no color mode by default
The issue was that the valid color modes was checked on the old image
format, not the new one. So if you switched formats it would not
correctly check if the settings were valid.
2019-06-12 15:20:17 +02:00
21b5af766d Transform Snap: When snapping to curve's vertices, consider only the original elements.
When they are occluded or when the snap is done for the generated meshes vertices, it was inconvenient.
An ideal solution needs to be discussed, but for now, for vertices, keep the behavior similar to the pre 2.8 versions.
2019-06-12 09:49:52 -03:00
d7df962e04 Fix T65751: Mask Parenting does not work 2019-06-12 14:02:57 +02:00
524943fca3 Fix T65750: Masking crash with Add Feather Vertex and Slide 2019-06-12 12:47:01 +02:00
27441c7557 Fix T64710: Rigid body stops simulating when an object is selected
Need to preserve last evaluated time through copy-on-write process.
2019-06-12 12:11:49 +02:00
75958326ad WM: re-enable auto-save after loading the users preferences
Minor change, only apples when loading factory settings,
then reverting to saved.
2019-06-12 17:53:18 +10:00
fd2e143eaf Cleanup: --help doc string formatting
STRINGIFY macro was being split across lines
causing problems extracting the strings for the references manual.
2019-06-12 17:01:15 +10:00
934b3c74f3 Unit System: remove 'm' as an alternate name for mile
Now when using imperial dimensions,
using 'm' suffix is treated as meters instead of miles
(use 'mi' or 'mile' instead).

Resolves T65731
2019-06-12 14:25:05 +10:00
30c431d662 Revert "Keymap: Add additional scrubbing affordance (Alt-LMB)"
This reverts commits
dcec863b2f,
f11929c145.

It wasn't possible to set the cursor without accidentally selecting a
column of keys & (vice-versa).
This conflicts with Alt->LMB to select column of keys.

Shift-RMB is already bound to scrubbing.
2019-06-12 13:50:56 +10:00
aa0cd21da0 Fix T65727: Broken button tool-tips in 3D view
Own error in 6868202899.
2019-06-12 12:58:56 +10:00
fcb534e336 UI: alternate fix for T65702, handling of auto-saving userprefs
The behavior for loading factory settings wasn't clear for users.

This commit changes the behavior:

- Loading factory settings always disables auto-save
  for the current session.
- The internal setting to skip saving on exit is now exposed
  in the preferences (when enabled).
- The menu item "Load Factory Settings (Temporary)" has been removed
  since it's always temporary.

This way users can always reset factory settings without
having to consider the combination of options that might cause their
preferences to be overwritten at exit.

If they want to enable auto-save for the current session
this can be done from the preferences.
2019-06-12 12:30:49 +10:00
2459a1a214 WM: optionally override the context with a module for wm.context_toggle
This may be used with other wm.context_* operators in the future.
2019-06-12 12:18:47 +10:00
017b8dfe47 Cleanup: expand left/right select keymap items
This was meant to simplify the keymap but ended up
not having a significant advantage.
2019-06-12 11:11:39 +10:00
15f0315ab1 Keymap: Add Ctrl-SelectMouse in to box-deselect 2019-06-12 10:42:57 +10:00
6529d20d79 Cleanup: spelling in comments 2019-06-12 09:43:49 +10:00
8ce93ef6ae Cleanup: clang-format 2019-06-12 09:07:03 +10:00
96708701ab Cleanup: unused vars 2019-06-12 09:07:03 +10:00
d93a7290e5 View3D Snap: Don't mix original/evaluated in the same function parameters. 2019-06-11 18:45:46 -03:00
f92bb695c4 Fix T64478: Wrong location Snap Selection to Cursor after set camera Follow the path.
In this case it is necessary to use the `object->parent` evaluated to obtain the correct `parentmat`.
2019-06-11 18:12:54 -03:00
23df1a774b Fix/Cleanup: I18N: Bad usage of IFACE_ instead of TIP_.
Cheap tip: anything that is not "Camel Case" and/or that is more than
a few words long should use `TIP_` translation, not `IFACE_` one.

Also added several missing strings (including the one reported in D5056
by Jean First (@robbott), thanks).
2019-06-11 22:25:01 +02:00
d665d12853 Cleanup: remove unused var. 2019-06-11 21:16:36 +02:00
09c32a15d2 Fix T64430: Removing objects from sub-collection doesn't update instances of parent collection.
Collections are a tad annoying with all their caching of objects... When
we modify content of a children collection, we need to tag DeG for CoW
update of all of the ancestors.

For now keeping that recursive tagging helper private, but would not be
surprised if we found more similar cases and needed to expose it to more
code...
2019-06-11 21:13:37 +02:00
14bd257bb7 Fix (unreported) message wrongly using IFACE_ for its translation.
`IFACE_` is for short strings always shown in UI (like labels of buttons,
menu entries...). Every thing else, especially when more than a couple
of words, must use `TIP_`.
2019-06-11 20:54:43 +02:00
42f4c14732 Fix T64608: DOF Focus object, not linked to new copy, Scen "full_copy".
Note that there are probably many other similar cases... This code is
really legacy, should use library_query helpers and other modern
BKE_library code instead of doing its own dirty cooking...
2019-06-11 20:50:10 +02:00
c058c33864 Edit Mode: Fix face alpha being too strong in xray mode
This make the xray & wireframe follows the same style as the solid
mode.
2019-06-11 17:49:19 +02:00
c84c59c81b Fix T65406 Edit Mode: Edge selection is below wireframe overlay
This was due to a double offset of the wireframe. We also reduce
the wireframe offset. The look of the wireframe overlay changes
a little with on distant wires.
2019-06-11 17:49:19 +02:00
c5b1e7cd4e FFmpeg: Fix integer overflow when writing custom FPS with high denominator
FFmpeg uses a fraction of integers to indicate the frame rate, whereas
Blender uses `int / float`. When a custom frame rate is used with
non-integer base, the FPS and Base settings were multiplied with 100000
before passing to FFmpeg as `int`. This could overflow when a high
enough FPS setting was used, which is the case when importing a video of
almost-but-not-quite-integer frame rate into the VSE. The overflow
caused FFmpeg to return an error "The encoder timebase is not set",
which is rather cryptic for users.

The new solution is to take the max int and divide that by the frame
rate, and use that ratio to pass to FFmpeg. This won't overflow, and
thus allows exporting arbitrary frame rates.
2019-06-11 15:51:39 +02:00
bbba447d54 OpenGL Render: Fix crash when using audio
Was very easy to reproduce by rendering sequencer with sound strip.

Need to use evaluated scene to open movie handle, since that is the only
scene which has proper sound handle with everything else attached to it.
2019-06-11 15:40:03 +02:00
86d229f52c Sound: Fix missing sound sequences length update on FPS change 2019-06-11 15:19:32 +02:00
0767f95a63 Sound: Fix queries of sound info
A lot of areas were querying sound information directly using audio handle
which does not exist on an original sound IDs.

This change basically makes it so it's possible to query information about
given sound ID, without worrying about whether it's loaded or not: if it is
needed to load it first it happens automatically (no automatically-opened
handles are left behind though).

While this seems a bit extreme to open files on such queries it is still
better than the old situation when all sound handles were opened on file
load, no matter if it's needed or not. Besides, none of the changed code
paths are performance critical, just handful of tools.

Fixes T65696: Sequencer fails to create a new sound sequence strip via Python
Fixes T65656: Audio strip - SHIFT K crashes Blender

Reviewers: brecht

Reviewed By: brecht

Subscribers: ISS

Maniphest Tasks: T65696, T65656

Differential Revision: https://developer.blender.org/D5061
2019-06-11 15:11:07 +02:00
3a6f6c87e0 Fix T65671: Armature X-Mirror inconsistencies
Apparently the `rna_Armature_editbone_transform_update` function was incomplete because it didn't copy all mirrored transform values.

I also noticed that the same logic seen in `rna_Armature_editbone_transform_update` is also seen in `ED_armature_edit_transform_mirror_update`.
So the solution is expose and use that logic that updates a mirrored bone. Thus deduplicating and fixing T65671.

Reviewers: brecht, zeddb

Differential Revision: https://developer.blender.org/D5058
2019-06-11 09:41:18 -03:00
f58b97a457 Documentation: Update description with documentation 2019-06-11 14:27:18 +02:00
4419dd3bfd fix T65576 collada exporter duplicates node tree when exported material already uses nodes 2019-06-11 13:56:43 +02:00
43d3572655 Fix T65702: Load factory erases setting without confirmation
It could be argued this was correct behavior, since auto-save
defaults to 'on' nevertheless, auto-saving settings once
the user has disabled auto-save can lead to accidents.

Don't reset the preferences flag when resetting preferences.
2019-06-11 21:52:58 +10:00
c9cc4ddf64 Fix T65715: Instant crash when grouping strips in VSE 2019-06-11 13:22:59 +02:00
10869e2431 Fix T65626: Use Nodes checkbox locks after being checked with "insert keyframe"
Not sure if this is something what is supported by render pipeline, but this report
discovered some actual error in logic.
2019-06-11 11:56:52 +02:00
6ec3f4a628 Sequencer: Fix missing relations and recalc tags in RNA 2019-06-11 11:19:17 +02:00
bcd0b6fb8e Fix T65677: Creating a scene sequencer strip with python crash blender 2019-06-11 11:19:17 +02:00
06dd60761c Fix extend being ignored for left/right sequencer selection 2019-06-11 18:13:19 +10:00
325b0ad2ed Keymap: fix conflict introduced by recent Alt-LMB for scrubbing
Use Ctrl-Alt modifier for select-left/right.
2019-06-11 18:13:10 +10:00
83da21ca4e Fix T65393: Error live editing UI scripts
Disable relative imports for UI scripts.
2019-06-11 16:08:32 +10:00
df57ea7f3b Fix panel-type re-registration with parents
The order of panel types changes when re-registering existing types.
Fixes an error exposed by T65393.
2019-06-11 16:01:19 +10:00
3084b4350b Fix T65470: Scale set to zero after extrude 2019-06-11 13:27:10 +10:00
830cd07a90 Fix gpencil weight paint mode having no active tool 2019-06-11 12:28:40 +10:00
6868202899 Fix T62875: Tooltips behave erratically with view gizmos
Improvements to behavior for gizmo tool-tips.

- 2D gizmos no longer cancel tool-tips on cursor motion
  (matching the behavior of UI widgets).

- 3D gizmos still close on motion since 3D gizmos may have a large
  on-screen area which would cause them to stay visible even after the
  cursor has been moved a large distance. The motion threshold is used
  so they don't close on unintended cursor motion.

- Changing highlighted gizmo now cancels the tool-tip & resets the timer.
2019-06-11 12:04:03 +10:00
a0608340ae Fix T65699: gpencil weight paint unresponsive 2019-06-11 09:38:49 +10:00
8aa87972ca Fix T65295: Convert curve to mesh fails with Keep Original.
This code now expects to wrok from fully evaluated data, however when we
keep original, we are actually working from data just copied from orig
one.

Ideally, we'd do a single depsgraph update/eval *after* we have created
all new required data, but that is tricky to do properly in that code
without risking breaking one thing or another.

So for now, just going for the simple, if not optimal solution, and just
repeatedly re-evaluating whole deg every time we duplicate an object to
be converted. Yep, dummy, but simple and... safe. ;)
2019-06-10 11:16:54 +02:00
f11929c145 Fix: Default keymap was missing Alt-click to scrub in the Graph Editor 2019-06-10 09:28:58 +02:00
030c7df19d Fix T65301: Convert to mesh with Keep Original loses adjust operator panel.
That was a dummy typo in `duplibase_for_convert()` in fact...
2019-06-09 23:43:33 +02:00
a44f5a561f Revert "Fix T65301: Convert to mesh with Keep Original loses adjust operator panel."
This reverts commit rB78bbf374f475 (and part of rB702d85d7cddbf81).

Fix for this is actually simpler, done in next commit.
2019-06-09 23:42:18 +02:00
702d85d7cd Fix (unreported) several issues when converting MBall to Mesh.
Redo panel would be hidden (when 'keep original' was not set), due to
same kind of (un)selected issue as in T65301 (see previous commit).

Further more, not all MBall objects of the family were properly removed.
2019-06-09 22:59:36 +02:00
78bbf374f4 Fix T65301: Convert to mesh with Keep Original loses adjust operator panel.
We need to properly select new objects (and deselect 'source' ones) when
converting to another type while keeping original ones. Otherwise poll
check of the operator fails, and redo panel cannot be shown.

Note that this is actually a design flaw in redo system currently, since
*new* state has to still allow last operator to be ran, when it should
actually be previous step in history that matters here...
2019-06-09 22:59:36 +02:00
5dc9797f0b Fix T65657: crash in float texture painting, after recent changes 2019-06-09 22:15:59 +02:00
6797e80f2e Fix T65638: memory leak - modifiers on curves.
We need to tag the `mesh_eval` of curve as owned, when we generate one,
otherwise freeing code would not free it.
2019-06-09 21:11:37 +02:00
8452673a01 Fix: Build error with clang on windows.
clang does not seem support the static_assert with
message overload.
2019-06-08 18:10:48 -06:00
81b68f7279 Industry Compat keymap: Fix nodes interaction
- Dragging to move, scale and setting links now works normally and correctly
2019-06-08 15:24:47 +02:00
749d53effd Cleanup: use doxygen sections for 2D view operators 2019-06-08 09:24:11 +10:00
Dalai Felinto
6a15564682 Fix T65420: Crash in file saved with edit mesh
Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D5041
2019-06-07 19:16:59 -03:00
Dalai Felinto
e70428c80e Collections: Never change the collection views visibility when unhiding it
How to reproduce: use 1-10 to change the visible collection. If the
collection was globally invisible, it would be set to globally visible.

This was a left over from the previous collection visibility design.

Now that we have a more clear separation between temporary visibility
(i.e., layer collection visibiilty) and a global visibility setting
(i.e., collection visibility) we should keep them separated.
2019-06-07 18:45:41 -03:00
b236c2a0ce Fix T65613: Memory leak in Audaspace with 3D sound 2019-06-07 22:30:21 +02:00
424566239f Fix T62121: Cycles crash with viewport render and smoke/pointclouds 2019-06-07 21:07:23 +02:00
4fb4415172 Cleanup: fix compiler warning 2019-06-07 20:51:43 +02:00
fb03f50e06 Fix T64625: Eevee image textures with alpha have dark edges
Now texture storage of images is defined by the alpha mode of the image. The
downside of this is that there can be artifacts near alpha edges where pixels
with zero alpha bleed in. It also adds more code complexity since image textures
are no longer all stored the same way.

This changes allows us to keep using sRGB texture formats, which have edge
darkening when stored with premultiplied alpha. Game engines seems to generally
do the same thing, and we want to be compatible with them.
2019-06-07 20:51:40 +02:00
d05f27c7b9 Fix T65612: Ungroup in Node Editor Crashes 2019-06-07 17:45:58 +02:00
fd556023cb Cleanup: Reformat GPencil multiedit frame selection 2019-06-07 16:08:04 +02:00
bf417d640b Sound: Fix 3D sound coming from scene strips
Need to pull in speakers from scene strips and make sure they
are properly updated.
2019-06-07 15:55:50 +02:00
bda6f7df48 Set lower minimum drag thresholds
Was 3px, but even lower values work too, so setting minimum now to 1px.
2019-06-07 14:29:34 +02:00
Dmitriy Efimov
8efc781ddc GNUMakeFile: Fix bad command line to generate QTCreator project.
Report with fix in D5035 by Dmitriy Efimov (@DarkDemiurg), thanks.
2019-06-07 14:27:46 +02:00
0cfdc8d182 Eevee: Try to fix NaN caused by normal maps + bentnormals
Should help with T65118.
2019-06-07 13:53:30 +02:00
873c756e5d GPencil: Remove unused Cursor function after add new Paint cursor. 2019-06-07 13:25:59 +02:00
a412f49e75 GPencil: Create new CURSOR for paint modes
This new cursor is used instead of the ARROW because it was too disruptive while you are drawing.

The change affects all paint modes that are used Brushes.

See D5036 for details.

Reviewers: @brecht @billreynish @mendio
Cursor designed by:  @billreynish
2019-06-07 12:59:47 +02:00
1f93f9e982 Cleanup: Rename to avoid shadow variable 2019-06-07 12:49:56 +02:00
ede4f31969 DrawManager: OpenGL State Image Rendering
The OpenGL state was not set to blender defaults when using
`DRW_render_to_image` path. This is only used when doing F12-rendering.
Cause of changes with the `RESTART_INDEX` hair rendering was rendering
the restart_index as an actual vertex index.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5039
2019-06-07 12:04:30 +02:00
7081935a30 Sequencer: Fix missing sound from nested scene strips 2019-06-07 11:59:30 +02:00
d4a5691d0f Sound: Use dependency graph instead of bmain
Allows to move scene sound update to dependency graph evaluation.
2019-06-07 11:59:30 +02:00
6e65cd86c3 Cleanup: Remove unused variable and move definition 2019-06-07 11:51:10 +02:00
05101a6cd6 GPencil: Cleanup multiframe code 2019-06-07 11:46:57 +02:00
3ebee7c496 Fix T65591: GPencil Arrange Strokes operator does not work in multiframe 2019-06-07 11:46:54 +02:00
f765e0cd21 Remove Deform Delay armature option
This option can not be supported by a new granular dependency graph,
and, especially, copy-on-write.

It was always doing full update ever since initial commit of new dependency
graph which we are using here in the studio for the past years and lack of
this option was never brought up.

Fixes T65557: Delay refresh option in armatures is broken
2019-06-07 10:47:22 +02:00
b290695149 Sculpt toolbar: Group new Mask Lasso tool with the Mask Border tool
Also flip Simplify and Mask, so that all the mask-related tools are next to each other.
2019-06-07 10:35:07 +02:00
4de7a7f2fa Forgot this file in last commit 2019-06-07 10:33:01 +02:00
27369c0b06 Add Lasso Mask icon for Sculpt Mode toolbar 2019-06-07 10:24:19 +02:00
a666d1b486 Cleanup: keymaps 2019-06-07 18:14:34 +10:00
8f56620a23 Industry Compat keymap: Fix alt-key navigation over gizmos
This broke recently after recent gizmo keymap changes
2019-06-07 09:59:29 +02:00
19782e4f68 Fix missing autosmooth update when animated
Consists of few simple steps.

Don't tag object data's bounding box as dirty before re-evaluaiton

Most of the time this actually tags evaluated mesh which will be tossed
away few lines below anyway. And this causes issues if the evaluated
mesh is actually owned by the mesh datablock.

The bounding box now has clear separation between original object data
and object data after modifiers, so this should not be causing any
issues.

Free evaluated mesh when owner mesh changes

Ensures that evaluated mesh shares the same settings as its owner when
updates related on animation system happens.

Depsgraph: Update mesh when its geometry settings changes

Allows to have options like autosmooth animated.

Reviewers: brecht, mont29

Differential Revision: https://developer.blender.org/D5030
2019-06-07 09:13:51 +02:00
d8bff8e8f6 Free evaluated mesh when owner mesh changes
Ensures that evaluated mesh shares the same settings as its owner when
updates related on animation system happens.
2019-06-07 09:12:54 +02:00
2a5fcfaad0 Don't tag object data's bounding box as dirty before re-evaluaiton
Most of the time this actually tags evaluated mesh which will be tossed
away few lines below anyway. And this causes issues if the evaluated
mesh is actually owned by the mesh datablock.

The bounding box now has clear separation between original object data
and object data after modifiers, so this should not be causing any
issues.
2019-06-07 09:12:54 +02:00
f24a7fa31d Fix T65558: Crash on adding linked scene to Video Sequence Editor
This commit fixes crash but the possible 3D sound is still missing.
Also, sound from sequencer coming from a scene strip is also missing.

This is partially a regression, at least for F12 case. The editing
was already behaving wrong: it was needed to have scene strip to be
actually rendered in preview.
2019-06-07 09:12:37 +02:00
a232d27bba Sequencer: Typo 2019-06-07 08:39:43 +02:00
9337ba7fa6 Tool System: add sculpt mask lasso tool 2019-06-07 16:08:31 +10:00
a5c4dd6b33 Fix T65229: Crash adjusting last operator after using undo history
Undo history also missed updating the tool system and
calling undo pre/post handlers.
2019-06-07 15:33:39 +10:00
bfb05ee154 Fix T64669: Redo transform fails with constrained axis 2019-06-07 14:11:54 +10:00
5b2907ab69 Fly mode: Enable fancy icons instead of text for shortcuts 2019-06-07 13:01:37 +10:00
16b380d5e3 Fix T63744: Overlapping axis gizmo for 3D view translate & scale 2019-06-07 12:51:06 +10:00
b300b4e9cd Missed removing unused property from last commit 2019-06-07 12:22:30 +10:00
99eb4e9cc4 Keymap: expose gizmo press/drag as a preference
- Right click select always activates on press
  since this was added as a workaround to left click select conflict.
- Left click has the option to set this to drag or press.

Make this change based on feedback on 8778dd0c8b.
2019-06-07 12:16:25 +10:00
6dd9e08051 Keymap: gizmos now use a map that optionally activates on press
The legacy keymap now activates on press.
2019-06-07 12:10:56 +10:00
6bc761a12e Fix T65479: Gizmo drag unusable with tools that activate on press 2019-06-07 11:08:43 +10:00
29526504d7 Cleanup: unused var warning 2019-06-07 11:08:43 +10:00
aa003c7324 FIX: use_proxy strip property state has no effect.
Author: Olly Funkster, Richard Antalík

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2504
2019-06-06 16:23:39 -07:00
9c00605729 VSE: Cache invalidation
Add invalidation to strip add functions
Add invalidation for scene and movieclip strips
Skip invalidation for sound strips

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4989
2019-06-06 16:23:39 -07:00
2175fb0217 Fix T65333: VSE: Playback speed regression
3D engine settings were used to select image scaling method.
Use higher quality scaling only for rendering.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4995
2019-06-06 16:23:39 -07:00
76634a23bb Fix T63729 Eevee: Bump does not follow normal direction 2019-06-06 22:26:27 +02:00
6c5ef42549 Fix T65505: crash applying modifiers in paint and sculpt modes
We need to find a better solution for mixing normal refreshes in some corner
cases. We actually had similar issues in 2.79 anyway, not crashing is more
important.
2019-06-06 18:48:37 +02:00
73252d3f60 Fix T63701 Eevee: High Volumetric end distance darkens the image 2019-06-06 18:47:36 +02:00
Bruno Boaventura Scholl
8db514f81d Fix T60441, T60619: incorrect values for color values > 1.0
Modulo makes no sense here at all, is from an old bugfix to prevent a crash
that is no longer an issue.

Differential Revision: https://developer.blender.org/D4727
2019-06-06 18:06:33 +02:00
2be3a75efd Fix T65383 UI graphics glitches on macOS with Intel HD 4000
glDrawArrays is not supposed to be affected by primitive restart
but osx drivers never cease to surprise me.
2019-06-06 17:21:22 +02:00
2239dca7e9 Sequencer: Viewport Rendering Annotation
When rendering the Sequencer using viewport rendering the annotations
were not scaled to respect the scene render size. This was because the
matrices were calculated based on the output size and not the actual
rendersize.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5032
2019-06-06 17:15:24 +02:00
3a7af37e28 Python API Docs: fix some examples 2019-06-06 17:13:02 +02:00
3abb1695cf Fix T64742 Eevee: SSRefract broken with planar reflections 2019-06-06 16:52:21 +02:00
3c231c3810 cmake/msvc: Add ninja support for precompiled headers
Ninja was unable to see the dependency between the cpp
that generated the pch and the compile units that used
it. Explicitly managing this now makes precompiled headers
work with both msvc and clang, with both msbuild and ninja
based generators.
2019-06-06 08:26:15 -06:00
87fde57b63 Particles: remove unused particle settings from UI
Didn't touch rna to make sure that the Python API does not break.
Maybe I missed some, but these don't seem to be used anywere internally.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5034
2019-06-06 15:57:24 +02:00
93ec2c94e5 Fix T64533: Using "X-Axis Mirror" while posing with auto keyframe on does not keyframe the mirrored bone
Use an additional pose bone flag so we can keep track of mirrored bones that should be autokeyframed.

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D5033
2019-06-06 15:54:49 +02:00
3a20c056e8 Fix T58920: Dyntopo sculpt and snake hook brush artifacts.
This is a mix of solutions rBe60b18d51d58 and rB52af5fa31fbc.
What happened was that when a node of the BVH gets 0 vertices, the batch is untouched and therefore still drawn.
2019-06-06 10:46:47 -03:00
d8ec8a0272 Fix: Build error with ninja on windows
Ninja has issues detecting the implicit dependency on the
precompiled header output for freestyle. Disabled ninja
support for now until a proper solution can be found.
2019-06-06 07:19:58 -06:00
095df1ac21 Python API: allow external render engines to use Eevee for LookDev shading
This is enabled with bl_use_eevee_viewport = True. It allows external engines
to generate an Cycles/Eevee shader node setup to emulate their materials in
the realtime viewport, or to leave it to users to do manually.

Removed bl_use_exclude_layers and bl_use_shading_nodes that did nothing
anymore. This should not break API compatibility, any scripts setting those
should continue to work the same as before.

Also adds descriptions for some RenderEngine settings.
2019-06-06 15:07:09 +02:00
54021da58b Python Templates: fix operator_mesh_uv template 2019-06-06 14:36:08 +02:00
fbd9c09ef0 Depsgraph: Add relations for spline animation
Currently only obvious setting which can be animated is Smooth.

The rest requires more proper support from animation update on
the Curve datablock.

But at least with this change it's not a "dependency graph fault"
2019-06-06 14:21:39 +02:00
9e8e32e117 Fix T59176: Missing Animation Update for Surface Resolution U & V
While fix in dependency graph for those is trivial, adopting underlying
code to become aware of animated settings is quite a rabbit hole: there
are non-obvious hidden inter-dependencies between settings, which are
especially tricky for NURBS.

For until we have more dedicated time for this disabling animation.
2019-06-06 14:19:04 +02:00
a8e5ad9a56 Fix T65490: linked property in object duplicate should not persist
These things are somewhat arbitrary, but since there are separate shortcuts
and menu entries this seems the more expected behavior.
2019-06-06 12:19:05 +02:00
358c71cf2c Fix typo in tooltip (reported in T65555). 2019-06-06 11:58:14 +02:00
3325b19ee7 Fix T64788: Double keymap entry in preferences
A display issue for tools which share keymaps.
2019-06-06 19:06:18 +10:00
0f26332d5d Remove mutex lock from node localization
There is no obvious threading-unsafe code in the localization.
The main source of issues were the new_node/new_socket pointers
which are no longer used during node tree duplication.
2019-06-06 10:39:44 +02:00
2819b60933 Fix T63035: Undoing in pose mode destroys the entire pose
Respect do_time flag in on_visible_update, matching behavior of old
dependency graph and avoids unwanted animation updates.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5026
2019-06-06 09:58:09 +02:00
0afa9d6ae6 Industry Compat Keymap: Update tweak/select for animation editors to follow latest changes
- Proper support for dragging in empty areas using tweak events to either move or box select
  - Avoids transforming immediately on press, same as the built-in keymap
2019-06-06 09:32:47 +02:00
3c4a16acc5 Python: GPU Offscreen Rendering
When using python offscreen rendering the background was not drawn in
EEVEE. Users would expect that when calling the `draw_view3d` method
that it shows the same as in the 3d viewport.

Seems to be a difference between the meaning of draw_background in b279
and b280. In B279 the world background would be drawn. In B280 the
transparency is changed.

Reviewed By: campbellbarton, fclem

Maniphest Tasks: T61768

Differential Revision: https://developer.blender.org/D5022
2019-06-06 08:38:05 +02:00
d7e7452067 Quiet warning creating sculpt brush tooltips 2019-06-06 15:59:27 +10:00
b69ed14ff7 Fix T65108: GPencil Sculpt mode select tools don't work
Move the sculpt keymap from the mode to the tool.
2019-06-06 15:53:11 +10:00
f0ff593d97 Cleanup: indentation
Also add comment to `FRS_precomp.h`.
2019-06-06 14:50:12 +10:00
c257e1a298 Fix use of removed Image.use_alpha property
Change missing from 7aaa7aa9dd
2019-06-06 14:45:11 +10:00
7944a1aede Cmake/Windows: Fix numpy being unpacked every build.
Every time you build cmake it unpacks numpy. It is seemingly
very unhappy with OUTPUTS being directories rather than files.

The creating of the directory is not needed, so that step was easy
to resolve, next problem: was there was not a target that outputs
the tarball so it too was deemed out of date. Losing that dependency
as well, fixes the issue, while this is not great if we ever update
the libs in svn, we are planning to drastically change the way we
package python for windows so this is ok for now, but needs to be
addressed with the next python update, T65547 is the tracking ticket
for this.

Tested with VS2015/2017/2019 with both msbuild and ninja generators
2019-06-05 20:51:00 -06:00
9c76b2c3b6 Freestyle: Use precompiled headers with MSVC.
This brings down the build time for freestyle with MSVC from a
minute to 10-20 seconds.

vs2019 bf_freestyle debug   before: 60464 ms  after: 11028 ms
vs2019 bf_freestyle release before: 56984 ms  after: 20526 ms

Differential Revision: https://developer.blender.org/D2606

Reviewed By: brecht , sergey
2019-06-05 19:05:16 -06:00
8b2b79c210 Cleanup: quiet missing variable declaration warning 2019-06-06 10:27:57 +10:00
5db4608f70 Cleanup: extra-semi-stmt warning 2019-06-06 10:16:18 +10:00
0f6ac1883d CMake: pass link deps to library targets with INTERFACE
Introduced since removing BLENDER_SORTED_LIBS.

This caused building a library to build all it's dependencies.
2019-06-06 10:16:06 +10:00
41ee85115d Fix missing header for gpu_state.c
Failed to build without WITH_LEGACY_OPENGL.
2019-06-06 10:06:54 +10:00
600ca3190a Cleanup: argument sign mismatch warning 2019-06-06 09:55:53 +10:00
8fa65ed31b Fix T65118 Eevee: NaN when using bent normals 2019-06-05 21:33:08 +02:00
94e6526ed0 fix T65480: Collada exporter did not export image texture for Base Color 2019-06-05 21:15:32 +02:00
ce66b22c42 Fix crash when editing shaders on Intel HD 4000.
In the Intel HD 4000 driver a shader has to be deleted in the same context in which it is created.
However, because you can't use a rendering context on different threads, to maintain the multithreaded compilation, the solution was to use the `GL_ARB_get_program_binary` and copy the binary generated for the shader and generate a shader on the main context using that binary.
This solution is limited only to Intel HD 4000 and windows.

Reviewers: fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5019
2019-06-05 13:50:58 -03:00
Dalai Felinto
dd81efa4a3 Tooltip: Fix use_preview_range tooltip (OpenGL > View)
In 2.80 the old OpenGL render is called View render.
Also made the tooltip shorter (it was too repetitive).
2019-06-05 14:44:40 +00:00
365ba6f5a1 Fix T65437: sculpt dyntopo undo not showing correct mesh 2019-06-05 16:30:07 +02:00
806d4fbc5e GPencil: Fix mirror modifier rotation around object
Still pending when the original object is rotated or scaled.
2019-06-05 15:55:28 +02:00
f5908e45d5 Fix T64336: Switching to a Camera which is hidden, does not evaluate the animation data
Changing camera might require more objects pulled into the dependency graph,
so need tag relations for update.
2019-06-05 15:53:26 +02:00
b79976a9bd Dopesheet: drag to box select in dopesheet
This includes refactoring of the `mouse_action_keys` to
make it easier to just detect if there is a key under
the mouse. The refactoring mostly consists of extracting
methods and reducing vertical scope of variables.

Reviewers: billreynish, brecht

Differential Revision: https://developer.blender.org/D5024
2019-06-05 15:48:30 +02:00
fb4ec706cd make.bat: Support optional paths for make format
make.bat now supports optional parameters to restrict
the formatting to a specific folder. Multiple paths
may be given

example:
make.bat format source/blender/blenkernel source/blender/gpu
2019-06-05 07:30:45 -06:00
328f7e1365 Fix T63384: Vertices are moving in different directions 2019-06-05 15:17:53 +02:00
112cd86eb5 Cleanup: Remove unused argument 2019-06-05 15:14:48 +02:00
5f737cc18f Fix T65520: Assigning Material a second time crashes Blender 2019-06-05 14:53:00 +02:00
a73b250fc5 Code Style: Make Format 2019-06-05 14:30:44 +02:00
eeda9369b6 TexturePaint: Missing Texture Depth Test
Depth testing was off as it used the precomputed ModelView matrix. As
draw engines currently use a different approach the depth was sometimes
a bit off making the color disappear.

This change will use a different vertex shader that will write the
correct depth. I expected the same change to be needed in the bone
selection overlay but was not able to reproduce it.

Reviewed By: fclem

Maniphest Tasks: T64615

Differential Revision: https://developer.blender.org/D5006
2019-06-05 14:29:27 +02:00
957c8f1305 Workbench: World Space Cavity
When using the world space cavity shader together with viewport or image
rendering only a single pattern was used. This was that the iteration of
the cavity shader was updated when the cache is initialized.

Now the cavity iteration is updated together when the TAA samples are
updated.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5021
2019-06-05 14:24:58 +02:00
bbaa1bffe9 Sound: Port to a copy-on-write concept
This change makes it so sound handles are created for evaluated scene,
sequencer and speakers. This allows to have properly evaluated animation
on them.

For the viewport playback sound uses regular dependency graph.

For the final render sound uses dependency graph created for render pipeline,
which now also contains sequencer and sound datablocks.

All the direct sound update calls are replaced with corresponding dependency
graph recalc tag.
2019-06-05 14:23:54 +02:00
863b7b3668 Depsgraph: Store recalc tag in ID->recalc
Allows to have more granularity in checks compared to a node-factory
based tagging in a generic tag/flush code.
2019-06-05 14:23:53 +02:00
4674e23220 Cleanup: Make comment around DEG evaluation functions more clear 2019-06-05 14:23:53 +02:00
6d143f3775 Fix T65389 Edit Mesh: Face dots are not shown in Xray mode 2019-06-05 14:21:26 +02:00
f2da21e052 Python GPU Shader: Fix crash when uniform is not found.
Error in string format.
2019-06-05 08:45:12 -03:00
8db6b1e2dd Fix empty name shown for operators opening menus without a title
For some cases like the edit mode context menu we don't currently have a fixed
title since it's dynamic. This should be improved, but we should at least still
show Call Menu if there is no menu title.
2019-06-05 13:27:41 +02:00
eda377c223 update Collada Importer: reworked export and import of Materials
- added import of transparency and emission into principled BSDF Shader
- added support for importing all default collada material parameters

  * diffuse
  * emission
  * index_of_refraction
  * shininess (mapped to BSDF Roughness)
  * reflectivity (mapped to BSDF Metallic)
  * transparency + transparent mapped to BSDF Alpha)
  * ambient (creates unconnected texture node)
  * specular (creates unconnected texture node)
  * reflective(creates unconnected texture node)

- added support for exporting collada material parameters:

  * diffuse
  * emission
  * index_of_refraction
  * shininess (mapped to BSDF Roughness)
  * reflectivity (mapped to BSDF Metallic)
  * transparency + transparent mapped to BSDF Alpha)

- prepared support for exporting the following parameters
  but currently commented out:

  * ambient (creates unconnected texture node)
  * specular (creates unconnected texture node)
  * reflective(creates unconnected texture node)

  Problem: For now we only allow export of principled BSDF based
  materials. I am not sure from where to get ambient, specular
  and reflective as those values are not included in the
  principled BSDF Shader (wip).
2019-06-05 12:42:54 +02:00
98cea7edce Fix T65298 Eevee: Principled BSDF doesn't use specular with metals
This does add some more register pressure as it passes a new vec3 down
the shading function. But for now we care more about accuracy than
efficiency.
2019-06-05 12:20:49 +02:00
cd1ac4d908 Fix T65492: make material slots popover wider 2019-06-05 11:46:27 +02:00
d46aee2982 GPencil: Create new set of brushes for Win32 damaged files when use primitives
Some old Win32 files could have the brushes damaged and this produces a segment fault. Now, if the brush is damaged, a new set of brushes is created.

Related to T61413
2019-06-05 09:57:21 +02:00
Dalai Felinto
e80cbdac33 Fix T65502: Crash when moving Collection into disabled Collection 2019-06-04 19:32:55 -03:00
Dalai Felinto
fa24ec41aa Outliner: Fix drawing of collection with disabled parent
If the layer collection had a parent that was disabled we wouldn't draw
it altogether.

Note: In this case I'm moving any enabled collection with a disabled
parent up in the hierarchy.

All in all I'm happy with this but I would like us to tackle the 1-20
shortcut, Ctrl+H menu and Collections viewport panel to do something
similar.
2019-06-04 19:21:23 -03:00
1324659dee GTests: BLI_task: Add basic tests for BLI_task_parallel_listbase(), and some performances benchmarks.
Nothing special to mention about regression test itself, it basically
mimics the one for `BLI_task_parallel_mempool()`...

Basic performances benchmarks do not tell us much, besides the fact that
for very light processing of listbase, even with 100k items,
single-thread remains an order of magnitude faster than threaded code.
Synchronization is just way too expensive in that case with current
code. This should be partially solvable with much bigger (and
configurable) chunk sizes though (current ones are just ridiculous
for such cases ;) )...
2019-06-04 23:51:03 +02:00
30d9366d17 Fix (unreported) Broken BLI_threadapi_exit().
Function would not clear the static scheduler pointer, which lead to
crash (mem use after free) when trying to re-init and use the task API
again. Should not happen in Blender itself, but could in other cases
(like some future gtests ;) ).
2019-06-04 23:51:03 +02:00
b640265f77 Cleanup: Freedesktop: Use 2.79b release date 2019-06-04 15:08:21 -04:00
d77c2305a3 Fix T65372: Can't turn off Freestyle line anti-aliasing in Eevee
Freestyle was not copying the eevee settings when creating a scene
copy.
2019-06-04 20:08:04 +02:00
2820870a13 Partial revert of e388cd8bb4
The constraint icons are now no longer shown in the Outliner again.

This needs a more robust implementation that also works for bones & pose mode.

The new constraint icons are still shown in the Constraint Properties.
2019-06-04 19:21:11 +02:00
4ddc840314 Fix T65378 Eevee: Glitches in ESM shadowmapping
This happen to be a NaN caused by an infinite sum in the shadow
copy shader.
2019-06-04 18:42:50 +02:00
942a748d5d Eevee: Merge shadow map processing into one drawcall per light
This removes a lot of framebuffer configuration and binding.
2019-06-04 18:42:50 +02:00
ff7401b02c Fix T64214 Eevee: Issue with Emission node and Alpha blending
Emission node was outputing alpha information but is was not
supposed to. Match cycles reference.
2019-06-04 18:42:37 +02:00
2e4d27669b Fix T65042 Eevee: Hair Info Tangent Normal not working correctly 2019-06-04 18:41:19 +02:00
5916b09670 Fix T65032: selection conflicts between motion tracks and masks in clip editor 2019-06-04 18:26:02 +02:00
5158896d7d Fix T65486: Cycles f-stop value from old files not preserved 2019-06-04 18:26:02 +02:00
0dbbc5aac7 Fix status bar and keymap editor showing Call Menu instead of menu name 2019-06-04 18:26:02 +02:00
e388cd8bb4 UI: Add icons to Constraints
Each constraint now has a unique icon, just like modifiers.

Icons are designed by Andrzej Ambroż & Alessio Monti, with user input.

Patch by Alessio Monti.
2019-06-04 18:10:47 +02:00
636751bb36 GPencil: Clarify Target weight tooltip and remove lower limit
The target value was affecting the lower value and this was weird. Now the value is clamped between 0 and target weight.
2019-06-04 17:42:39 +02:00
8b1ca3ec53 NLA Editor: drag in empty region to invoke box-select
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D5010
2019-06-04 16:20:30 +02:00
Pelle Johnsen
ddc19819f3 Fix T60971: Apply visual transform not working
Fix issue with 'apply visual transfrom' not working.
Based on fix for https://developer.blender.org/T55494

Reviewers: campbellbarton, sergey

Maniphest Tasks: T60971

Differential Revision: https://developer.blender.org/D5007
2019-06-04 15:24:41 +02:00
2fb54ef86e Fix T65054: Blender 2.80 crashes when opening a scene created by blender 2.7x with hierarchy duplication set to "group".
Regression introduced by rB7fe3d1e7d718 (fixing T57934).

This effectively reverts rBrB7fe3d1e7d718, since changing the type of an
object is a very bad idea in general, and would need a careful and
complex check of all of its usages (many object usages assume a specific
type of object...).

Instead, we simply remove duplicollection on those objects, and give a
warning in case dupligroup was effectively used (in many reported cases,
dupligroup was a 'mistake setting', without actually instancing
aniything).

Note that the otehr idea to fix that versioning issue (to create a new
empty object for the instancing) is much less easy than it might look
(one would need to take into account potential animations, relations
between objects, etc.). Doable probably, but way overkill for a
corner-case 'bad' usage of the feature in the first place.
2019-06-04 15:24:23 +02:00
5361fc2c33 GPU: High Definition Color Buffer
For offscreen rendering a high definition color buffer is needed.
Without it there are banding issues when doing multi-sampling viewport
rendering.

Reviewed By: fclem

Maniphest Tasks: T65287

Differential Revision: https://developer.blender.org/D5009
2019-06-04 15:15:59 +02:00
19691e3ae2 Image Info
The image information for multilayer openexr files are only shown on the
first draw. In the second draw the render result property is filled of
the image, making blender think the image is a render result and it want
to display information about the renderpasses. Which are not present.

It could be that in the first draw the image data is not requested as
the buttons are drawn, before the main area

This change will display both information. We should investigate how to
actually detect if this is a render result or not as similar code is
present in the `node_shader_buts_tex_environment_ex`.

Reviewed By: brecht

Maniphest Tasks: T65345

Differential Revision: https://developer.blender.org/D4987
2019-06-04 15:14:15 +02:00
7484ed9bdc NLA Editor: box-select was selecting wrong elements
This was missing in rBfa59346c134.
2019-06-04 14:52:31 +02:00
33e8db94b1 Fix (unreported) missing updates in scripts/docs after scene.update() removal.
This should really have been done together with API changes, simple
usage of grep does the trick to catch most places needing updates.
2019-06-04 14:39:51 +02:00
1d2e4c44bd Fix T64827: "Batch-Generate Previews" crashes.
Missed when py API for depsgraph was changed... tsst...

Based on D4917 by @lichtwerk, thanks.
2019-06-04 14:39:51 +02:00
c0c2f8663e Fix T65303: fix and improve autorun-scripts popup
Now, the file does not have to be reloaded in all cases.
Instead, just scripts are enabled and all depsgraphs freed.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5000
2019-06-04 13:37:45 +02:00
f5f1407a7e Fix T65451: Changing driver expression doesn't update relations 2019-06-04 12:10:42 +02:00
30c0d780f9 Depsgraph: Only run editors ID update on manual edits
This is how it worked in 2.79 and it is how it is expected to be working.

Avoids unintended icons update during animation playback.

Fixes T64318: Update of material icons during animation 2x performance penalty
2019-06-04 11:43:27 +02:00
04bac38731 Graph Editor: drag to box select keyframes
There is a keymap conflict with ctrl+tweak.
Therefore, I did not include this yet.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4999
2019-06-04 11:35:57 +02:00
c3f00d7879 Fix T65447: Mask doesn't update in compositor unless there's motion blur on
This is probably just one of the related issues.

Root of the problem was that compositor job was using original scene and node
tree for compositing. It is not guaranteed to have all the evaluated data.

Switched compositor job to use it's own render-pipeline-like dependency graph
which has everything evaluated in it.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4998
2019-06-04 09:41:33 +02:00
b998a7b384 Fix T64247: Crash on playback with special shader node tree
The root of the problem goes to the fact that node tree copying
uses source tree and nodes for a temporary storage.

This makes it so multiple dependency graphs can not be reliably
evaluated from different threads if they are using same original
node tree.

Solved by doing the following:

- Commonly used tree copying function (which is used by library
  manager) keeps source tree, nodes and sockets untouched.

- All the related areas (like node tree's callback) now have
  const qualifier on the input.

- Areas which needs to have those temporary pointers assigned are
  now using explicit function.

  Would be really cool to get rid of those temporary pointers
  completely, but this is a bit tricky due to hairy nature of the
  code. Can happen any time now though: is easy enough to generalize
  the new pointers mapping.

Note that this change is only intended to solve the crash.
The fact that icons shouldn't be updated on playback will be fixed
as a separate change.

Reviewers: brecht, fclem

Reviewed By: brecht, fclem

Subscribers: brecht, fclem

Differential Revision: https://developer.blender.org/D5002
2019-06-04 09:34:35 +02:00
351e68e0a4 Docs: update quick-start
Resolves T64146
2019-06-04 13:12:59 +10:00
0b36780fb4 Revert "Cleanup: Cleanup: style, use braces for GHOST (X11/SDL)"
This reverts commit 935c9ab0de.

Clang-tidy was making unrelated *fixes*.
2019-06-04 11:36:54 +10:00
935c9ab0de Cleanup: Cleanup: style, use braces for GHOST (X11/SDL) 2019-06-04 11:30:31 +10:00
0dbd05ffdd Cleanup: Cleanup: style, use braces for collada (BCMath) 2019-06-04 11:14:59 +10:00
ea3a652fbf Cleanup: style, use braces for draw (fxaa_lib) 2019-06-04 11:14:37 +10:00
271ec9ff53 Cleanup: rename 2D scroll defines
- Use `V2D_SCROLL_` prefix.
- Use more descriptive names.
2019-06-04 11:05:32 +10:00
c13e10a740 Cleanup: clang-format, remove tabs 2019-06-04 10:52:20 +10:00
d62a749fcf Fix T65352: bpy.data.meshes.new_from_object() doesn't increment user count for materials referenced by the mesh.
We cannot do refcount operations in a non-Main ID, this is forbidden.

While that whole func could probably use some love and refactor, for now
sticking to minimal changes and just moving refcounting op after mesh
has been transferred to Main database.
2019-06-03 21:00:44 +02:00
0ee75698d0 transform_snap_object: Ignore occlusion test on curves in edit mode. 2019-06-03 15:17:54 -03:00
EitanSomething
cd90986bcb UI: Prevent scrollbars from getting too small to grab
Differential Revision: https://developer.blender.org/D5001
2019-06-03 18:17:24 +02:00
Dalai Felinto
c39a8657be Fix T65448 - Outliner - Show all inside in disabled collection crash 2019-06-03 13:11:29 -03:00
de0cae29cf GPU: Fix Restart index bug
Restart index can have been changed in another context and the static
var can get out of sync. A better solution is to set the restart index
when binding the VAO. It also have less perf impact.

Fix T65364 Corrupted mesh display on macOS
2019-06-03 17:58:28 +02:00
0efe89bdd8 Cleanup: style, use braces in GPU 2019-06-04 00:42:22 +10:00
97e53d2385 fix collada: get Alpha and Emission from principled BSDF Shader 2019-06-03 16:35:01 +02:00
1f650c402d Cleanup: style, use braces in RNA 2019-06-04 00:24:38 +10:00
e3f2034e7b Cleanup: Cleanup: style, use braces for collada 2019-06-04 00:18:35 +10:00
482f4ca100 UI: Fix wrong use of icons in the Object > Visibility panel when using Cycles 2019-06-03 16:15:12 +02:00
95f5272bda Cleanup: style, use braces in draw 2019-06-04 00:14:05 +10:00
7b28a31f2c Cleanup: style, use braces in makesrna 2019-06-04 00:10:44 +10:00
d5f6e573ed Cleanup: use const arguments 2019-06-03 23:58:10 +10:00
6dca5ff41f Cleanup: remove unused arg to wm_event_add_ghostevent 2019-06-03 23:48:56 +10:00
39919e3532 Fix T65391: Wrong drag threshold for mouse motion 2019-06-03 23:41:57 +10:00
4d8ffa5ac5 Fix T65328: Offset when outliner gains focus
I'm not actually not sure under which circumstances
this code is actually doing something useful.
2019-06-03 14:10:43 +02:00
24f625f345 Cleanup: differentiate drag-and-drop from drag events 2019-06-03 21:42:08 +10:00
ab5219af34 Markers: Click-drag in empty area to box select markers
To make this work, other changes were necessary:
* To select a specific marker you have to click more exactly on the icon.
* Moving markers with click-drag only works when starting on a marker.

Additionally this patch implements that all markers are deselected,
when the user clicks in an empty area.

Reviewers: billreynish, brecht

Differential Revision: https://developer.blender.org/D4975
2019-06-03 11:37:47 +02:00
a2a05acb4a Fix T65399: crash playing animation after applying smoke flow modifier
missing DEG update.

Reviewers: sergey

Maniphest Tasks: T65399

Differential Revision: https://developer.blender.org/D4996
2019-06-03 11:25:41 +02:00
ccc7ebf7b1 Fix T65408: GPencil Weight Paint, strength and falloff are ignored when painting a lesser vertexweight
The value was clamped to minimum value before checking the influence.
2019-06-03 10:00:38 +02:00
3041705c51 Fix T65294: Orbit navigate gizmo fails in paint modes 2019-06-03 17:55:56 +10:00
4fbc71a320 Fix T65439: quick explode error
Material setup for quick explode was assuming a shader with a "BSDF"
output socket connected to the material output node whereas other socket
names are valid ("Shader", "Emission", "BSSRDF", "Holdout"...)
2019-06-03 09:49:58 +02:00
2c18e400e8 Fix return type in recent gizmo key-map refactor 2019-06-03 16:59:22 +10:00
19dcb22a88 fix collada Importer: Set bone transformation type when importing unskinned skeleton 2019-06-02 23:33:22 +02:00
b7bd8d813f feature collada: Allow export/import of skeletal animations as curves 2019-06-02 23:00:57 +02:00
0731b88ddb refactor collada: Added utility functions bc_string_before() and bc_string_after() 2019-06-02 23:00:57 +02:00
820e4d4303 fix T34062 Collada exporter: changed order of export for decomposed transformation.
1.) The Blender order of applying transforms is:

 Scale
 Rotation
 Transformation

Reasoning: This order ensures there is no shearing, which happens
when you do scaling after rotation, see also:

https://blender.stackexchange.com/questions/1806

The Collada exporter now exports in the order how the transforms
need to be applied upon import.

2.) Also removed obsolete #if 0 lines
2019-06-02 23:00:57 +02:00
0bcf29b8cd refactor: use Quat and BCQuat instead of float[4] arrays for Quaternions (wip) 2019-06-02 23:00:57 +02:00
d04622e427 fix: enforce transform export as <matrix> when exporting animated armature"
Currently we can not export Decompsed Transforms in combination with
Armature asnimations. As a temporary workaround enforce export
of transformations as Matrix for armature objects.
2019-06-02 23:00:57 +02:00
b646da8d85 fix: add back changes after last pull from master 2019-06-02 23:00:56 +02:00
122b9478c6 refactor collada: replace bc_sanitize_mat() by static class method in BCMatrix 2019-06-02 23:00:56 +02:00
70bc179c45 refactor Collada: rename BCMatrix.* class files to BCMath.* 2019-06-02 23:00:56 +02:00
e17990bab7 refactor Collada: Add new class Quat (wip) 2019-06-02 23:00:56 +02:00
692edf4301 refactor collada: Moved BCMatrix to its own file 2019-06-02 23:00:56 +02:00
345304058f refactor collada: Moved basic typedefs in own file 2019-06-02 23:00:56 +02:00
a591424268 refactor collada: reorganize class methods in file 2019-06-02 23:00:55 +02:00
04c3692124 Industry Compat keymap: Fix inability to use Ctrl-S to save while in Weight Paint mode
Was a keymap conflict
2019-06-02 22:47:07 +02:00
c91c00ae6c UI: Fix inconsistent use of 'LookDev' vs 'Look Dev' 2019-06-02 20:48:54 +02:00
4ca34e6e34 UI: Fix small naming inconsistency in the UV Editor View menu
Now it's consistent with 3D View
2019-06-02 20:30:55 +02:00
1c28d07065 Fix: Dynamic Paint Image Bake button missing when using certain Surface types
This required doing a very slight UI re-org of a few properties to work reasonably.
2019-06-02 20:24:54 +02:00
fbc11a86c8 FreeDesktop: Add Release information to AppStream
This commit improves Blender's AppStream metadata with minor punctuation and grammar improvements to the description, and a new `<release>` tag for the current release.

The `<release>` tag benefits Blender in the following ways:
- Flathub users get to see the actual release number instead of "stable"
- Make it easy for all packagers to include changelogs, so Blender's users gets to see what's new in 2.79
- Blender gets featured in GNOME software to reward it for having Release information in its AppStream metadata (KDE Discover [[ https://bugs.kde.org/show_bug.cgi?id=389509 | plans do do the same thing ]])

If the prior objection to adding release data to the AppStream metadata was the ongoing maintenance burden, I volunteer to take it on for subsequent Blender releases.

Author: @ngraham

Differential Revision: https://developer.blender.org/D3065
2019-06-02 10:24:03 -04:00
8d1666fc6d Fix T65416: outdated location description for Cycles add-on 2019-06-02 13:23:04 +02:00
2a192624bc Fix T65082, T65084: duplicating workspace does not preserve mode and order 2019-06-02 13:03:13 +02:00
Tomoaki Kawada
99de160340 macOS: fix viewport lagging, by using CAMetalLayer instead of NSOpenGLView
On GPUs that support it, we now present OpenGL contents via CAMetalLayer. This
fixes frame skipping issues found in T60043. If the system does not have a Metal
capable GPU, NSOpenGLView will continue to be used.

Patch by Tomoaki Kawada, with some changes by Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D4619
2019-06-02 12:54:46 +02:00
1418eee5f5 macOS: increase minimum required version to 10.11
This is in preparation of an the upcoming fix where we need to use a Metal
layer to avoid performance issue when drawing with OpenGL. Note that we already
only officially support 10.12+, the difference with this change is that Blender
will not start at all on 10.9 and 10.10.
2019-06-02 12:53:41 +02:00
Tomoaki Kawada
62fe7e9a9d GPU: support default framebuffer with ID not equal to 0 2019-06-02 12:50:50 +02:00
2a5dc454f6 Cleanup: minor comment cleanups in GHOST 2019-06-02 12:50:50 +02:00
01a5e087aa Cleanup: move CocoaOpenGLView into own header 2019-06-02 12:50:50 +02:00
593eab66b5 Cleanup: remove use of deprecated macOS API 2019-06-02 12:50:50 +02:00
e7e52f7cff Fix T65185: Cycles viewport render no refreshing overlays properly
Don't rely on detecting view matrix changes to refresh depth buffer, instead
detect redraw tags coming from progressive render samples.
2019-06-02 12:47:52 +02:00
114973584d Cleanup: better comments and naming for redraw flags 2019-06-02 12:47:52 +02:00
f332a71180 GPencil: Cleanup unused lines
These lines were related to other brushes and were copied in the function by error, but not required.
2019-06-02 12:12:33 +02:00
079c7f918c Cleanup: make.bat remove noge option from help
The noge option has been removed but was still
shown in the help text.
2019-06-01 16:51:31 -06:00
893467a8e2 make.bat: Add convenience option to disable buildinfo
Optional parameter nobuildinfo turns WITH_BUILDINFO Off
which is helpful when doing development.
2019-06-01 16:49:21 -06:00
0360a2920d Fix: Trailing directory separator missing in default font path on windows.
This caused the file browser to open in c:\windows with the fonts
folder selected instead of opening c:\windows\fonts\ and listing
the fonts.

Reported on chat by @blendify
2019-06-01 10:51:19 -06:00
cc600de669 Cycles Denoising: Get rid of halos around bright edges
Previously, bright edges (e.g. caused by rim lighting) would sometimes get
halos around them after denoising.

This change introduces a log(1+x) highlight compression step that is performed
before denoising and reversed afterwards. That way, the denoising algorithm
itself operates in the compressed space and therefore bright edges cause less
numerical issues.
2019-06-01 00:45:03 +02:00
Dalai Felinto
d5b813301a Fix T65330: Blender crash when double click on face
The fix itself is by Germano Cavalcante (mano-wii).

But since I was investigating this with him, I'm including here an
assert in EDBM_select_id_bm_elem_get to help catching this sooner
in the future
2019-05-31 18:41:18 -03:00
Dalai Felinto
6f9518f243 Fix T64990: Isolate collection wrong reaction
Bringing the same logic we do in the outliner restrict column callback
and the menu call.

Also removing the "change depsgraph" logic there. Isolate collections
should not affect depsgraph relations (if it does it is to be tackled
separately anyways).
2019-05-31 15:51:45 -03:00
5902a9cb63 Fix T65265: File > Quit shortcut assign different depending if file is saved 2019-05-31 19:26:20 +02:00
Dalai Felinto
d0258abdd7 Fix Outliner: New collections are hidden
Users could change the master collection flags, but they should not.

That would not effectively affect the master collection objects
(depsgraph flag evaluation ignores master collection flags).

However we use the layer collection flags of the parent collection when creating
a new child collection.

We *could* solve this differently by creating a new RNA type for the
master collection (and layer collection) and hook this with rna refine.
But this patch seems to work well enough and it is simpler.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4981
2019-05-31 14:02:26 -03:00
3f23299403 Fix T65308: edit studio light state stays active after restarting Blender
This is only temporary for editing, should not be preserved.
2019-05-31 18:17:19 +02:00
acab6f7175 Fix T65317: crash applying wave modifier with texture 2019-05-31 18:17:20 +02:00
a55d79ed25 Fix T65311: crash using 3D viewport panning outside viewport 2019-05-31 18:00:08 +02:00
f87bba0368 Fix T62282: multires sculpting does not update smooth normals
It may be good to move the normals update out of the drawing code. But it was
already there for the non-multires sculpt cases, and does not have an obvious
place since we bypass the depsgraph and want to avoid the cost of updating the
normals multiple times when multiple events are handled before a redraw.
2019-05-31 17:17:03 +02:00
151f69a5c2 Fix various missing updates in sculpt mode, when changing modifiers and dyntopo
This restores the code that updates the sculpt session and PBVH from dependency
graph evaluation.
2019-05-31 17:17:03 +02:00
692891f69e Fix sculpt mode drawing with modifiers still being wrong in some cases
Centralize logic for when to use the PBVH for drawing, fix missing tests in
mask drawing, fix missing tests for multiple windows, only do more expensive
update for all viewports at end of the stroke.
2019-05-31 17:17:03 +02:00
9899999e94 Fix crash on certain changes in edit mode
Was missing re-set evaluated mesh to NULL.

Fix T65302: Crash after selecting one of multiple materials
Fix T65346: Blender crashes when selecting material in editing mode and LookDev view
Fix T65344: Blender crashes in edit mode when changing object
2019-05-31 17:06:06 +02:00
4620bd4f79 GPencil: Cleanup some comments 2019-05-31 16:55:06 +02:00
Dalai Felinto
c01e43d024 Update Python GPU example to latest depsgraph API 2019-05-31 11:31:04 -03:00
3a72c9aa33 Cleanup: use static_assert on MSVC versions that support it.
This greatly improves the error message
2019-05-31 08:12:21 -06:00
Dalai Felinto
6eebeb577d Walk mode: Enable fancy icons instead of text for shortcuts
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4988
2019-05-31 10:51:39 -03:00
Dalai Felinto
db67a17d17 Fix T65278: Stats info and instancing "misinformation"
Object could and polygon count should ignore multiple instances of
the same data, yet count it at least once even if linked.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4986
2019-05-31 10:50:37 -03:00
aba4e6810f Cleanup: style, use braces in source/ (include disabled blocks) 2019-05-31 23:22:52 +10:00
72a563cdee Fix bmesh_to_mesh freeing possibly referenced vertices
Fixes Godot exporter issue reported in T65285.
2019-05-31 15:07:15 +02:00
d8dbd49a2f Cleanup: style, use braces in source/
Automated using clang-tidy.
2019-05-31 22:55:15 +10:00
8987f7987d Fix missing file read/write of proxy/transform/crop settings when not used
This was inconsistent with other data handling in Blender.
2019-05-31 14:47:08 +02:00
aec28acc75 Industry Compat keymap: Fix UV Editor shift-click to extend selection
Also set Transform to T key, consistent with 3D View
2019-05-31 13:59:24 +02:00
a9450dbf0d Gizmo: add 2D navigation for image/clip/sequencer views 2019-05-31 21:51:02 +10:00
56a533c071 WM: option to ignore cursor image/clip/view2d zoom
In preparation for view navigation gizmos.
2019-05-31 21:48:43 +10:00
455e14eccd Fix T65200: Crash by hiting "tab" after sculpting with dyntopo
Make sure object is properly evaluated to the new state when
it is expected to.

Reviewers: brecht, mont29

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4985
2019-05-31 12:55:02 +02:00
23064248d7 DrawManager: Color Management
The draw manager used to determine if the view transform should be
applied by checking if the scene was not rendered to an offscreen image.

As the sequencer and texture painting needs to render to an offscreen
image with the view transform applied we need to separate the
`do_color_management` from the `is_image_render`.

Reviewed By: fclem

Maniphest Tasks: T64849

Differential Revision: https://developer.blender.org/D4909
2019-05-31 12:44:18 +02:00
d0fb602e2c DrawManager: Sculpt Mesh Drawing
More accurate determination when to draw the PBVH and when to draw the
regular mesh. PBVH drawing is done for Multires, Dyntopo and normal
sculpting with no active modifiers.

Maniphest Tasks: T62070

Differential Revision: https://developer.blender.org/D4731
2019-05-31 12:39:21 +02:00
2f78bd1d52 Fix build error on FreeBSD
Don't rely on indirect header includes.
2019-05-31 12:14:42 +02:00
aa55581776 EEVEE: Baking + Volumetrics
Missing init cache call to volumetrics during light baking

Reviewed By: fclem

Maniphest Tasks: T65206

Differential Revision: https://developer.blender.org/D4984
2019-05-31 12:12:09 +02:00
77d119a231 Fix T63981: Factory default memory cache limit is 4096 MB
The initialization of default settings and cache limit and audio.
2019-05-31 12:08:10 +02:00
fdb83d98f7 Cleanup: simplify static assert definitions, assuming C11 and C++11 2019-05-31 12:00:31 +02:00
8d95dcd87d Fix: Don't use a slider to control the Background Image Scale property.
It makes no sense to control this with a slider, since it became difficult to scale in normal ranges, and scale factors aren't represented well this way.
2019-05-31 11:19:56 +02:00
9f0107bb14 Fix compilation previous commit 2019-05-31 11:11:57 +02:00
e3dfe29110 Fix T65334: use _Static_assert on clang as well, to avoid macOS build error
Still needs a proper solution for older compilers with custom static assert.
macro that can conflict when there is an assert on the same line in multiple
files.
2019-05-31 10:49:36 +02:00
26d4a2a516 Fix T55494: Apply transforms on parents and children
Fix T63790: Crash when applying Scale of Object with vertex parent

Made apply transform to fully live in the evaluated domain.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4976
2019-05-31 10:33:34 +02:00
963917e1b9 Fix T65285: Crash with Object.to_mesh() in certain conditions
Was happening when modifier stack detected that mesh is not deformed
and is not modified and attempted to share result across multiple
objects.

This was introduced in 2f77119.

Now functions which are supposed to return mesh owned by caller will
do so again. Shouldn't be a huge impact on memory print since the
data layers are referenced.
2019-05-31 10:05:56 +02:00
2c4a9f7718 Keymap: Add back Ctrl-Up/Down for 2.7X 2019-05-31 16:33:39 +10:00
b4071c56ce Fix T65147: Rotate normal not interactive from menu 2019-05-31 16:24:58 +10:00
41dce8af6a Cleanup: clang-format 2019-05-31 15:44:47 +10:00
6b286ca667 Cleanup: undeclared variable warning 2019-05-31 15:44:47 +10:00
b5dc3d43e4 makesrna: quiet re-declared enum warning
Note that BLI_STATIC_ASSERT use in headers is likely to cause this
error again, we could have a version that takes a unique ID
to be used in headers.
2019-05-31 15:44:47 +10:00
451c533e25 VSE: Menu bug fixes
- Return Toggle Meta to Strip Menu
 - Move position of Lock/Mute in Strip Menu to match position in Context Menu.
 - Remove Lock icon.

Author: Peter Fog

Reviewed By: billreynish, ISS, brecht

Differential Revision: https://developer.blender.org/D4957
2019-05-30 15:47:25 -07:00
7ccc7ef61f VSE: don't add crop and transform data for sound strips
This also fixes commit rB1fd7b380f4cf8a0489b405de2819f228a4da5ea2 which
didn't do allocation for effect strips properly.

Reviewed By: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4970
2019-05-30 15:47:25 -07:00
fc336f973d Fix T65319 Crash when selecting vertices in edit mode 2019-05-31 00:28:03 +02:00
846056de6b Fix T64510 Armature: Empty Not Visible as Bone custom shape 2019-05-30 19:34:54 +02:00
493eaaf213 DRW: Fix crash when object has no bounding box 2019-05-30 19:33:48 +02:00
8f4b7083d3 Fix T65049 Crash cause by NULL geom pointer 2019-05-30 18:28:05 +02:00
8a4a05ae85 Selectoin: Remove armature bone filters
They seems to do nothing as the filtering seems to already be
done at a higher level.

This fixes T65022 Tracking Markers are not selectable
2019-05-30 17:54:05 +02:00
f962c701fe Fix T65017 Eevee: Render error if a SSS node is unconnected 2019-05-30 16:13:26 +02:00
b4df509f7b Cleanup: GPUMaterial: Remove unused struct members 2019-05-30 16:13:26 +02:00
05138d2c4e Fix T65231: Null audio device and AV Sync halts playback 2019-05-30 14:22:48 +02:00
296527eab7 Eevee: Fix volumetric shader if nodetree uses a bsdf node 2019-05-30 13:43:34 +02:00
7cdd5ed7bd DRW: Add unit_state to avoid lots of DRWCallState duplication
A lot of drawcalls don't use the object's properties and don't
need a dedicated DRWCallState. We allocate a unique one at
the begining and use it for all calls that uses the default
unit matrix.
2019-05-30 13:43:34 +02:00
9f2e154e02 Eevee: Fix crash caused by visibility calculation 2019-05-30 13:43:34 +02:00
596492e639 DRW: Refactor to use object pointer for drawcall by default
This cleans up a bit of duplicated code and some confusion about
what was culled and what wasn't.

Now everything is culled based on the given object pointer.

If the object pointer is NULL there is no culling performed.
2019-05-30 13:43:33 +02:00
32a2bfddcb GPencil: Remove uneeded storage->unit_matrix
When passing NULL to DRW_shgroup_call(), ModelMatrix is assumed
to be unitmat.
2019-05-30 13:42:21 +02:00
092962cf72 GPU: Enforce Uniform buffer alignment to 16bytes
This seems to be a requirement and remove some errors in
renderdoc.
2019-05-30 13:42:21 +02:00
77f5210f22 GPU: Remove GPU_INDEX_U8
This type of indices is not natively supported on modern GPU and
gives warning on some implementation. The memory savings it
provides is also quite minimal and unlikely to be visible on
nowadays hardware.

This remove some uneeded struct members and makes primitive
restart always enabled by default. This can be broken by addons
if they are not careful enough but many other states have this
problem.

Also leverage GL_PRIMITIVE_RESTART_FIXED_INDEX if
ARB_ES3_compatibility is supported. This removes all API calls
to change restart index depending on indices length.
2019-05-30 13:42:21 +02:00
dc0c490b76 Tool System: Use circle cursor for non-3D circle select 2019-05-30 21:31:42 +10:00
2991713722 GPencil: Add missing blend factor to Regular blend 2019-05-30 13:23:26 +02:00
0f8746e724 GPencil: Rename Blend mode "Normal" to "Regular"
The UI used "Regular" already, but internally the code didn't.
2019-05-30 13:23:26 +02:00
1cb74768c1 GPencil: Remove wrong premult in Blend shader
The process was doing two times the same and the alpha was totally wrong.

Related to T65279
2019-05-30 13:23:26 +02:00
9c00429ee7 Cleanup: use const argument, r_ prefix return arg 2019-05-30 20:37:16 +10:00
671827549a 3D View: Support light probe data clipping 2019-05-30 20:02:05 +10:00
8cc1154aa2 Fix industry compat keymap transform gizmo plane constraint
Modifier keys were disabled, removing support for shift-clicking
on the transform gizmo to constrain to the plane.

The gizmo keymap matches the default, no need to re-define it.
2019-05-30 15:33:37 +10:00
8778dd0c8b Gizmo: activate some gizmos on drag instead of press
Use drag-only keyamp to adjust gizmos which use drag motion
to change a value. By default gizmos still activate on press.

This allows for left click select to be used with transform
without the gizmos getting in the way.

Even though this isn't necessary for right click select
it allows click events to pass through and be used by tools
which can be useful.

Resolves T63996
2019-05-30 15:22:19 +10:00
0c8c160202 WM: use different drag thresholds for mouse/tablet events
Now a small threshold is used for mouse input,
avoiding delay when gizmos are activated on drag.

Tablet input threshold remains unchanged since
it's easier to make small movements when using a tablet.

A larger threshold for non-cursor input is now used (typically keyboard)
which improves usability when the "Pie Menu on Drag" key-map preference.
2019-05-30 15:03:19 +10:00
82e8e5c871 Cleanup: move click/drag events to functions
Simplifies future changes to dragging checks and avoids
each check for drag using slightly different logic.
2019-05-30 15:02:53 +10:00
2437a8b6f0 Cleanup: rename callbacks to match the struct member name 2019-05-30 15:02:49 +10:00
fee600f479 GPencil: Cleanup - Remove storage Grid matrix and replace with local variable
Now the matrix is copied when creating shading group and don't need to be saved in storage.
2019-05-29 20:17:46 +02:00
a8a95806b3 Cleanup: Remove duplicated comment from previous commit 2019-05-29 20:03:40 +02:00
6ef39cbdf0 GPencil: Rename viewmatrix field to parent_obmat
The name of the field was not clear about the use.
2019-05-29 19:59:54 +02:00
7fae3e375a GPencil: Cleanup code to avoid double matrix copy
Thanks @fclem for catching the problem.
2019-05-29 19:52:00 +02:00
9dafc8ee2c Snap: add support for meshes generated from other types of objects.
Curves with modifiers generate a mesh internally.
These can be used for raycasting.
2019-05-29 13:18:29 -03:00
dff24f96f0 Fix T64817: Active tool gizmo doesn't respect toggle
Error in 14884cda1f

D4973 by @cto.abid
2019-05-30 01:20:26 +10:00
b79aeb5ca1 Fix T64995: box and circle select summary in Grease Pencil dopesheet.
The issue is that generic ANIM_animchannel_keyframes_loop can't
handle non-FCurve keyframes, so every selection operator does
its own looping over special key types, and the box and region
select operators didn't have code to deal with the summary.

This adds code to handle that in a similar way to other ops.
2019-05-29 17:50:39 +03:00
0721ee4587 Fix T51133: Bad performance with texture painting depending on multi-thread settings.
This is more of a temp urgent hack than a proper fix, chenages required
for the later are too involved for 2.80 at that point of time and will
be done later.

That commit merely keeps the whole existing logic for 3D painting
textures, but instead of re-creating a pool of threads for *every* (!)
stroke evaluation (i.e. mouse move event during painting), we instead
use Blender's task scheduler.

That remains sub-optimal, there are likely more improvements possible in
that code, but it should address the main issue reported (which is
presumably caused by  windows thread launching being rather heavy process).
2019-05-29 16:29:42 +02:00
68adbf80cf Fix T65275: missing dereference 2019-05-29 16:17:10 +02:00
a63ac425d0 Outliner: Correct outliner width computation
Before it was not possible to see everything in the outliner
when there are e.g. long icon rows. This is because Blender
did not allow panning the view to the right, since it did not
know the actual width.

Most of the code to compute the width correctly was there already,
but there were a couple of issues that made it not work.

* The tree width was computed before the tree was drawn.
This does not work, since the width is only known, after
it is drawn.
* Every `TreeElement` stores its right-most position in `xend`.
However, in the current code, the `xend` of e.g. an object is
the position where the text ends. The `xend` of the icons
is stored in the sub-tree-elements. Therefore, to compute
the maximum width, you may not skip the closed tree elements.
* The current drawing code had an early exit when the icon row
would not be visible anymore. This also skipped the calculation
of `xend`. So it would work correctly, when the icon was visible
a little bit, but not when it was not visible at all.

This patch fixes these issues. So even in more complex files, the
width is computed correcly. At least I haven't found a case, where
it does not.

Unfortunately, some optimizations had to be turned off, to make
it correct.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4887
2019-05-29 16:02:04 +02:00
2069b3b888 DrawManager: Cycles+GPencil
Fix for GPencil and Cycles Render draw type. GPencil objects were only
shown when overlays were turned on. The cause of this is an
optimization we did to not populate any draw engine when an
external renderer was used with overlays turned off.

This will check if there is any visible GPencil object in the scene. if
so it will still perform the loop.

`DEG_id_type_any_exists` can check if any object of a certain type_id is in the
result. This check is also being used to check if there are any
visible grease pencil objects as a precheck in `DRW_render_check_grease_pencil`.

Reviewed By: brecht, fclem, antoniov

Maniphest Tasks: T65191

Differential Revision: https://developer.blender.org/D4962
2019-05-29 14:48:59 +02:00
56176bd19e Keymap: Fix missing start/end shortcuts in Sequencer
Set these in the shared animation editor keymap instead
2019-05-29 14:07:51 +02:00
Stefan Werner
29550f8748 Fix T63383: macOS: Right-clicking the file name on the title bar
doesn't work as expected when the path includes a whitespace character

File path didn't need to be escaped.
2019-05-29 13:17:15 +02:00
b0278b2486 Depsgraph: Fix IDs being remapped in original compositor
Happens with files from T65223.

Caused by CoW scene still pointing to the original compositor.
Happens when scene was referenced for parameters only.
2019-05-29 12:50:04 +02:00
d6b340b999 Cleanup: Group depsgraph building nodes 2019-05-29 12:50:04 +02:00
c592ebaeca Markers: fix error in previous commit 2019-05-29 12:30:59 +02:00
e15bba38d5 Fix: Hair Length was using wrong unit 2019-05-29 12:12:52 +02:00
fdd2917144 Cleanup: Remove unused marker operator wrappers
The wrappers do nothing anymore, because keymaps can
have poll functions now.
2019-05-29 11:50:34 +02:00
f8f43184e2 Sequencer: Fix box select using incorrect rectangles for sequences
Reviewer: ISS

Differential Revision: https://developer.blender.org/D4968
2019-05-29 11:19:57 +02:00
2f7711962a Fix T58251: Cycles ignores linked meshes when rendering
The idea is to share a mesh data-block as a result across all objects
which are sharing same original mesh and have no effective modifiers.
This mesh is owned by an original copy-on-written version of object data.

Tricky part is to make sure it is only initialized once, and currently a
silly mutex lock is used. In practice it only locks if the mesh is not
already there.

As an extra bonus, even viewport memory is also lower after this change.

Reviewers: brecht, mont29

Reviewed By: brecht, mont29

Differential Revision: https://developer.blender.org/D4954
2019-05-29 10:44:11 +02:00
da7e5e861f Keymap: Add back support for Set/Add/Subtract for box selecting in the Sequencer. 2019-05-29 10:34:48 +02:00
07d453dd9e UI: use matching distance checks & define for dragging 2019-05-29 18:13:33 +10:00
8949dfb7a6 Correct error in last commit 2019-05-29 16:59:24 +10:00
e9d07aa4a0 Correct error in last commit 2019-05-29 16:51:56 +10:00
63a7ac8930 Keymap: add drag-only generic gizmo keymap
Allows gizmos clicks to fall through for gizmos which only drag,
currently unused.
2019-05-29 14:30:25 +10:00
2d8584c15f Fix T65027: Snap 3D cursor on hidden faces doesn't work in Edit Mode.
I'm not very fond of adding new types of bvhtrees.
But this is probably the most efficient solution.
2019-05-29 01:02:04 -03:00
d97c841eb8 Fix T65005: Missing "LINES_ADJ" and "TRIS_ADJ" in the GPU Python API. 2019-05-29 00:28:14 -03:00
e087951702 Possible fix for T63685: macOS edit mode selection not working on second display
The idea is to force `glReadPixel` to run in the offscreen context.
And don't rely on any rendering context.
2019-05-29 00:28:13 -03:00
2f06a0b14b Cleanup: move gizmo keymap access into funcitons
Existing functions were written to match the setup_keymap callback.
Add versions that can be called with the window manager for convenience.
2019-05-29 13:01:38 +10:00
2610845250 Cleanup: remove redundant sequencer under cursor check 2019-05-29 11:33:34 +10:00
eaa730ce8c Cleanup: correct private function naming
Use term 'glyph' instead of 'icon' since we already have event icons.
2019-05-29 11:16:11 +10:00
501dd9e231 Cleanup: Remove Dead Code 2019-05-28 21:11:56 -04:00
9bae9b634e Fix T65244: emission node not available for world shader nodes 2019-05-28 23:07:08 +02:00
db0568329e Fix T65175: nodetree animation stays linked after duplicating a lamp
Reviewers: mont29, brecht

Maniphest Tasks: T65175

Differential Revision: https://developer.blender.org/D4956
2019-05-28 21:02:40 +02:00
574e790340 Fix T64123 Eevee: Reflections Not Visible On Alpha Clip Materials 2019-05-28 20:33:19 +02:00
2783945b1b Eevee: Fix assert when displaying transparent film checker 2019-05-28 20:20:09 +02:00
b76ccc7f80 Eevee: Change default shadowmap near clipping distance
And also fix some RNA props defaults and ranges.

Fix T64452 Shadows not appearing in eevee
2019-05-28 20:06:22 +02:00
40207d656b Eevee: Render alpha blended objects when rendering probes
This fix T64553 EEVEE: Emission material not lighting
other objects when blend mode set to alpha blend
2019-05-28 20:06:22 +02:00
08005802cc Tests: make grease pencil tests part of OpenGL render tests
Otherwise tests fail on machines without OpenGL.
2019-05-28 18:05:31 +02:00
4df66dabb8 Fix T65212: Cycles SSS failing on 32 bit 2019-05-28 18:05:31 +02:00
8e125f278c Sequencer: Drag outside of sequence to initiate box select 2019-05-28 17:47:33 +02:00
c4e4b6872a DRW: Fix issue introduce in removal of DRW_STATE_POINT
Fix issue raised by mano-wii in rB97d22e12b521

Fix T65050 knife tool snapping indicator not visible
2019-05-28 17:19:42 +02:00
9e85d4052f Cleanup: DRW: Codestyle 2019-05-28 17:19:42 +02:00
2100dba34b Cleanup: GPU: Move program point size to GPU_state 2019-05-28 17:19:42 +02:00
fbe7c848c2 Fix T64005: GPencil clamping pixels do not always work 2019-05-28 17:11:13 +02:00
e256bc2250 Depsgraph: Add query for whether graph is up to date
Depsgraph: Only invoke callbacks when there are changes

Only affects when an evaluated dependency graph is requested via
context.

Makes it cheap to call when there are no changes made to the graph

Transform: Ensure depsgraph is evaluated when needed

Fix based on D4455 from Campbell, utilizes some recently
introduced functions and allows to not have any extra checks
in the transform code.

Fixes T61904
Fixes T62135

Reviewers: brecht

Maniphest Tasks: T62135, T61904

Differential Revision: https://developer.blender.org/D4967
2019-05-28 17:06:41 +02:00
b683e965ab Depsgraph: Only invoke callbacks when there are changes
Only affects when an evaluated dependency graph is requested via
context.

Makes it cheap to call when there are no changes made to the graph
2019-05-28 17:06:41 +02:00
0cf0cc9873 Depsgraph: Add query for whether graph is up to date 2019-05-28 17:06:41 +02:00
d6643b57bc Cleanup: use doxy comments for wmOperatoType.flag 2019-05-29 01:05:22 +10:00
916c2d0e7f Cleanup: use WM_ prefix for cursor enum 2019-05-29 01:05:22 +10:00
e4ac8ab212 WM: support X/Y axis cursor wrapping
Operator flags to wrap on a single axis.

D4865 by @Gvgeo with updates.

Resolves T64585
2019-05-29 00:52:43 +10:00
a7ebb4b7d9 Cleanup: clang-format 2019-05-29 00:24:16 +10:00
24b2fe50f3 Fix T64829: Active point of Curve objects is not displayed correctly
three issues here:
- when curves had multiple nurbs, the active vert is per nurb
[curve_create_edit_data_and_handles() wasnt taking that into account]
- code could go wrong when points where hidden
- upon selection, tag curve ID_RECALC_COPY_ON_WRITE for batch cache
update

Reviewers: brecht, fclem, sergey

Maniphest Tasks: T64829

Differential Revision: https://developer.blender.org/D4943
2019-05-28 16:08:34 +02:00
f139caa632 Fix T65187: Overlay blend increase wrongly the opacity
The calculation of the mix color was not using the bottom color when the alpha was lower than 1.0.

Also added clamp code to avoid values outside valid ranges.
2019-05-28 15:55:31 +02:00
5778e616e5 GPencil: Minor cleanup 2019-05-28 15:55:31 +02:00
13a90d646a Codestyle: Remove trailing spaces 2019-05-28 15:12:29 +02:00
dee5c1aa40 MeshAnalysis: Disable when XRay is turned on
When XRay is turned on the mesh analysis did not draw correct. This
change won't draw the mesh analysis overlay when xray is turned on.

In terms of giving the user a visual feedback of this limitation we
render the overlay options inactive.

Reviewed By: brecht, fclem

Maniphest Tasks: T65225

Differential Revision: https://developer.blender.org/D4965
2019-05-28 15:09:57 +02:00
94370e23e9 Fix T64536 Eevee: Reflection texco no longer works 2019-05-28 15:00:56 +02:00
433c2d1dea Fix T65226 Crash on entering in Edit mode with ASAN build 2019-05-28 14:37:40 +02:00
e0c1116ce3 Cleanup: DRW: Rename DRW_STATE_BLEND_* for API clarity 2019-05-28 14:22:22 +02:00
2e211d099f Fix T65141 Bevel did not curve.
The previous fix to the spike bug T64582 was not really right.
This fixes that one properly and restores the desired curving
profile in the bug's example.
2019-05-28 07:56:56 -04:00
b2b1aa2f8e Fix T57090: selected node group input sockets circles not drawing in
sidebar UIList

nodesockets were actually drawn, but immediately drawn over by widgets
from the widget draw batch cache.

solution here is to "widgify" nodesocket drawing as well.

Reviewers: brecht

Maniphest Tasks: T57090

Differential Revision: https://developer.blender.org/D4963
2019-05-28 12:22:48 +02:00
fc8547b889 Fix T57483: Driver on grease pencil modifier does not update 2019-05-28 11:11:09 +02:00
1cf27668b9 Fix T65212: Cycles_render_layer test grease pencil crashes.
Theme colors should not be accessed for rendering.

Also some minor cleanups.

Thanks @brecht for catching the bug.
2019-05-28 10:24:51 +02:00
1008d9c735 Cleanup: unused args/vars 2019-05-28 16:37:29 +10:00
7bf8d8b3c8 Cleanup: use time scrub instead of scrubbing
Renaming was only done to ED_time_scrub_ui.h, function names
and struct members used term 'scrubbing' which is ambiguous.
2019-05-28 16:17:15 +10:00
8d81a3da37 Cleanup: clang format 2019-05-28 16:11:49 +10:00
671eb29d43 Cleanup: rename gizmo keymaps
Don't use plural because single/multiple isn't relevant
for keymap definitions and reads badly for specific gizmo types
that only use a single gizmo.
2019-05-28 15:26:18 +10:00
1e51839f1d Cleanup: remove unused modal gizmo keymap
An operator can only have one modal keymap,
there is no use in defining multiple.
2019-05-28 15:18:25 +10:00
13f292d10d Gizmo: only highlight when held modifier keys are used
Check the current events modifiers against the gizmo keymap,
only highlighting when keymap items match.

Needed to resolve T63996
2019-05-28 14:40:12 +10:00
2e22cfd08a Gizmo: changes to internal drag logic
Minor changes to recent gizmo click/drag logic 08dff7b40b

Changing the gizmos highlighted part in the invoke_prepare
callback is too error prone since it needs to run
before it's known which operator will execute.

Add back 'drag_part', since it simplifies click-drag use.
While this isn't essential with custom keymaps per gizmo
it avoids having to define a keymap in the case a drag
event needs a different action.
2019-05-28 13:36:43 +10:00
219e6a98c6 Fix show face-dot check
Match edit-mesh drawing.
2019-05-28 11:46:26 +10:00
c716005322 Docs: correct descriptions 2019-05-28 11:39:49 +10:00
89207df722 cmake: Fix building with clang on windows. 2019-05-27 13:48:40 -06:00
55814cd31f Cleanup: Fix const warning in makesrna
rna_function_string was not const correct leading to
different 'const' qualifiers (C4090) warnings in MSVC.
2019-05-27 11:34:04 -06:00
3a8f543b61 Fix T65190: GPencil stroke not correctly initializated using python API
The value of new gradient fields was wrong.
2019-05-27 19:30:41 +02:00
4778dfa568 Cleanup: Fix warnings in bf_physics
MSVC did not detect the usage of i in the openmp loops
and emitted a unused variable warning.
2019-05-27 11:29:24 -06:00
8a484aca22 Cleanup: Fix build warning in bf_editor_interface
widget_draw_text_ime_underline was not const correct
leading to warnings with MSVC
2019-05-27 10:46:50 -06:00
08dff7b40b Gizmo: add per gizmo keymaps
Remove click-drag support for tweak gizmo,
rely on keymap events instead.

This is needed for some gizmos to use modifiers keys
without having all gizmos use all modifier keys (see: T63996).
2019-05-28 02:41:59 +10:00
d83d376c02 cleanup: Collada exporter renamed 'transrotloc' to 'decomposed'
The collada exporter allows to export transforms either as Matrix
or as a decomposition of Translation, Rotation aand Scale.
The decomposition option was falsely named "TransRotLoc".
I renamed it to the much more descriptive word "Decomposed".
The tooltip already contains sufficient information, so there
is no need to change that.
2019-05-27 18:39:06 +02:00
dee7edffcf Fix tweak/drag event use with gizmos
It was possible to use a drag event for a gizmo
that dragged away from the gizmo, changing the active gizmo.

Now use gizmo located at the location that was clicked on.
2019-05-28 01:36:31 +10:00
58ce4061a8 Cleanup: Fix warnings in bf_intern_elbeem
Truncating a pointer to long gave warnings with MSVC on x64
2019-05-27 09:28:50 -06:00
e472646282 Fix T65080: handle case when View2D has 0 scale 2019-05-27 17:15:29 +02:00
Adam Nydahl
7353e0563e Eevee: Fix Aliasing in Light Probes
Differential Revision: https://developer.blender.org/D4869
2019-05-27 17:13:09 +02:00
7a308e65ef Cleanup: Fix warning in bf_editor_mesh
Declaration and implementation of EDBM_select_id_context_create got
out of sync leading to warning with msvc.
2019-05-27 09:12:11 -06:00
7f1513efc5 Cleanup: Fix warning in blenlib with MSVC
Some versions of the Windows SDK headers have a dbghelp.h that will emit
C4091 warnings, repress them just this once, since the warn can be helpful
in other places.
2019-05-27 08:57:39 -06:00
29a29699f7 Fix T65145: Draw curve draw tool settings in column 2019-05-27 16:55:53 +02:00
635510bc6b Cleanup: Fix warnings in bf_dna
Passing a const char** to MEM_recallocN lead to

C4090	'function': different 'const' qualifiers

warnings with MSVC
2019-05-27 08:49:34 -06:00
392e58afb3 Fix (unreported) invalid handling of IDs usercount in BKE_mesh_new_from_object_to_bmain().
Would have broken usercount of mesh used as texco reference e.g.
2019-05-27 16:48:56 +02:00
270faa4e9c Cleanup: Fix warning in makesdna
passing a const pointer to BLI_ghash_insert causes warning

C4090	'function': different 'const' qualifiers

with MSVC
2019-05-27 08:44:37 -06:00
Dalai Felinto
4ed6b891d5 Fix T63173: Dragging hidden collection inside a visible one unhides it
Same for holdout, indirect only and exclude.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4945
2019-05-27 11:39:32 -03:00
40bde2a95d Fix annotations not drawing correctly on Cycles rendered view 2019-05-27 16:34:21 +02:00
70bb61ba97 Cleanup: Fix warnings in gpu_batch
Passing a const pointer to MEM_freeN/MEM_recallocN lead to

C4090	'function': different 'const' qualifiers

warnings with MSVC
2019-05-27 08:30:53 -06:00
063ebd5836 Cleanup: Fix warnings in bf_gpu
Declaration and implementation got out of sync leading to warnings.
2019-05-27 08:22:38 -06:00
a74041c96c Eevee/GPencil: Fix depth reading after render 2019-05-27 16:14:58 +02:00
380f07d0ee draw_manager: fix warning with msvc.
32 bit shift stored in 64 bit field gave a warning with MSVC.
2019-05-27 08:11:12 -06:00
1885d234b0 Fix (unreported) API doc generation script after removal of some ObjectBase ietms from context. 2019-05-27 16:06:40 +02:00
bc055258d5 fix: collada transformtype must be identical for animation export and object export
When exporting an object we can choose the transformation type 'Matrix'
or 'trans/rot/scale' When exporting an animation we have the same choice
regarding the used transformation type.

However we must make sure that animations and objects use the same
transformation type within one colleda export. The user interface is
now reworked such that the correct settings are always guaranteed.

I also reworked the tool tips
2019-05-27 16:00:32 +02:00
4db3916b60 refactor collada: rename add_node_transform() to add_joint_transform() 2019-05-27 16:00:32 +02:00
b6a0027de3 Gizmo: add event argument to invoke_prepare callback 2019-05-27 23:59:36 +10:00
b1f0e3e4a7 blenloader: Fix warnings with MSVC
these macros are mostly used with size_t types, leading to msvc warning :

warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits
2019-05-27 07:54:56 -06:00
a096fbb32d Fix T65052: "Convert to mesh from curve" fail if the curve has a bevel
Use evaluated object as an input for mesh construction. This ensures
all dependencies are ready.

Reviewers: brecht, mont29

Reviewed By: brecht, mont29

Differential Revision: https://developer.blender.org/D4955
2019-05-27 14:40:06 +02:00
33e792da2f Cleanup: remove redundant assignment 2019-05-27 22:23:31 +10:00
f3fb7c5f22 Fix T65177: Camera frame visible in viewport render 2019-05-27 14:16:40 +02:00
4ad9d93fec Fix T65066 Armature and bone selection is broken on macOS 2019-05-27 13:38:06 +02:00
Mal Duffin
118ac491d2 Fix poor display of time codes in sequencer Info panel
Allow using : in labels inside buttons.

Differential Revision: https://developer.blender.org/D4944
2019-05-27 13:31:27 +02:00
af4feee61c Eevee: Fix render z-depth for orthographic camera
Fix last commit
2019-05-27 13:29:29 +02:00
24ac970624 Eevee: Fix render depth pass being negative 2019-05-27 13:18:47 +02:00
8cfd46a5b0 Wireframe: Make wireframe's Xray slider default to 0
This removes the dither patterns visible in wireframe mode.
This does decrease de depth perception but many users complained
about the visual noise it produces.
2019-05-27 12:58:14 +02:00
5241dd1daf EditMeshMode: Reduce unselected face alpha
Lowering it to 0.071 so that wireframe mode is not so much
distracting.
2019-05-27 12:58:14 +02:00
554af9c689 Cleanup: DRW: Make clipped shader use UBO clip planes 2019-05-27 12:58:14 +02:00
577d3498b4 Cleanup: DRW: Move WorldClipPlanes to builtin uniform 2019-05-27 12:58:14 +02:00
ba75e93c88 Cleanup: DRW: Remove DRW_STATE_OFFSET 2019-05-27 12:58:14 +02:00
f3fc872171 Cleanup: Paint Overlays: Remove DRW_STATE_OFFSET_* 2019-05-27 12:58:14 +02:00
01f5ef82af Cleanup: EditMesh: Remove DRW_STATE_OFFSET_* 2019-05-27 12:58:14 +02:00
5c371cd36a Depsgraph: Fix condition inverted by mistake
Fixes T65165: Weights are not displayed in "Weight Paint" with modifiers
2019-05-27 12:40:22 +02:00
244c39f1ab Revert "Keymap: Drag in empty area to box select in animation editors"
This reverts commit ebf924e0b7. This is causing
the transform tool to start immediately which leads to lots of accidental
changes. We can bring this back when that issue is fixed.
2019-05-27 12:35:23 +02:00
6ac20e9397 Fix T65181: image View as Render should not affect file saving 2019-05-27 11:56:13 +02:00
b40b9195e4 Fix T65160: missing updates when setting origin on a collection instance
Reviewers: sergey, brecht

Maniphest Tasks: T65160

Differential Revision: https://developer.blender.org/D4953
2019-05-27 11:50:21 +02:00
d4f12860aa Python API: Tag for update on object.update_from_editmode()
This call modifies geometry but does not inform anyone about
changes.

After this change it's possible to load edit mesh, then request
evaluated dependency graph and do some interesting things with
the updated object.

This is part of T63244: object.to_mesh ignores object.update_from_editmode
2019-05-27 11:29:22 +02:00
5dbda33462 Depsgraph API: Allow preserving custom data layers
This commit extends dependency graph API with an argument which
denotes that all custom data layers are to be preserved. This
forces modifier stack re-evaluation with more inclusive mask.

Far from ideal, since this might fail in certain configurations
with indirectly used objects which might be missing layers needed
for the current object evaluation. But this is how it worked for
a long time, so should be good enough for until more sophisticated
solution is found.

In order to use this new behavior two things are to be passed:

- Pass keep_all_data_layers=True
- Pass a valid dependency graph.

The dependency graph is only needed if keep_all_data_layers=True
and is NOT to be passed if keep_all_data_layers=False.

If keep_all_data_layers=True the dependency graph MUST be passed.

Reviewers: mont29, brecht

Reviewed By: mont29

Maniphest Tasks: T64994, T64794

Differential Revision: https://developer.blender.org/D4940
2019-05-27 11:00:42 +02:00
07d3d8c2fd Industry Compat keymap: Fix armature extrude
MMB wasn't working to extrude freely for Armature extrude

Also fix an issue with moving down the hierarchy in Pose Mode
2019-05-27 10:55:13 +02:00
27d5d3c2f8 Depsgraph: Use threading guard in context.evaluated_depsgraph_get
This is a part of T65174.
2019-05-27 10:42:30 +02:00
c25164e16d UI: use tool label instead of id-names for quick favorites 2019-05-27 16:30:23 +10:00
552f5da3c4 Mitigate T64346: Quick Favorites items cant be removed
For now don't show missing quick favorite menu items which are missing.

Once menu editing is supported they could be displayed.
2019-05-27 15:33:12 +10:00
ab0e839f9a Fix T65074: Crash on switching color
Make buttons to take active `Paint` from the context.

D4946 by @Gvgeo
2019-05-27 14:00:15 +10:00
d525c76003 Revert "UI: Edit Menu Operator Polling"
This reverts part of commit b7eba20236. Polling
is causing issues in scripts, and the minor usability improvements are not worth
the extra work this may cause at this point in the release cycle.

Fixes T65149
2019-05-27 00:34:24 +02:00
d595382288 cmake/msvc: Repress MSVC template warning C4661
Draco emits about 60 of these, consulted with brecht before
repressing them.
2019-05-26 16:13:31 -06:00
30f3ffce05 Fix building with ninja on windows
Broken by rB161908157d67ee8bcfa0c26917cccdc40e0c67ea
2019-05-26 09:25:17 -06:00
c53f2079b8 Fix T64989 Bevel hangs with Mark Sharp sometimes.
Code for extending sharp edges assumes ADJ pattern and this
example uses TRI_FAN pattern. This change doesn't fix TRI_FAN
mark sharp bug at least won't infinite loop any more.
2019-05-26 10:37:58 -04:00
66ec6c1f50 Fix misleading image color space and alpha tooltips 2019-05-26 12:43:47 +02:00
909b0ac16c Fix Cycles packed images not handling channel packed alpha correctly 2019-05-26 12:21:57 +02:00
f18373a9ab Fix: BLI_task_test deadlock on windows.
This patch makes BLI_task_scheduler_create wait for all worker threads to have started before
returning to caller. For very short workloads (BLI_taks_test) there is the chance that the
worker threads have not fully started yet, and the main thread is calling pthread_join at
the same time as pthread_setspecific is being called on the worker threads which causes a
deadlock on pthreads4w.

Differential Revision: https://developer.blender.org/D4936

Reviewed By: mont29, sergey, brecht
2019-05-25 17:18:17 -06:00
36ae49502b blenlib: Fix build warning with MSVC
The declaration and implementation of BLI_path_name_at_index were
out of sync leading to build warning

C4028: formal parameter 1/3/4 different from declaration
2019-05-25 13:22:25 -06:00
7d3de604c0 cycles_render: Fix unused variable build warning with MSVC 2019-05-25 13:05:59 -06:00
5c9cb98698 bf_intern_opencolorio: Fix unused variable build warning with MSVC. 2019-05-25 13:04:24 -06:00
24024f09c7 ghost/windows: Fix Build warnings with MSVC.
The order of the initializers did not follow the order they were
declared in the class definition leading to warning C5038
2019-05-25 12:58:14 -06:00
817a51f26f blenlib: Fix debug build warning with MSVC.
Wrong printf format specifier was used leading to warning C4477
2019-05-25 12:45:58 -06:00
10e152c590 imbuf/oiio: Resolve build warnings with MSVC.
math.h and oiio's missing_math.h where clashing over the
definitions of common math defines like M_PI.
2019-05-25 12:23:48 -06:00
161908157d CMake/MSVC: Mark headers in the libdir as system headers.
This marks the headers in the LIBDIR as system headers
and changes the warn to /W0 on msvc versions that support it.

This resolves some warnings we would had to completely
repress otherwise.
2019-05-25 12:13:06 -06:00
e1d1899e72 Fix T64582: bevel spikes sometimes
The code to move the profile plane needed to not do that in
a few more cases.
2019-05-25 09:41:29 -04:00
26c317b666 Fix T65106: Add missing Copy Keymap for GPencil Sculpt mode
The Ctrl+C keymap was missing in Sculpt mode
2019-05-25 10:49:46 +02:00
e12f42946f Fix T65092: error with gizmos using freed keymaps
Caused by 5adfc51a0f, sharing keymaps caused changing tools to
unregister gizmos and remove their keymaps.

Workaround for now by not removing the keymap.
2019-05-25 12:45:34 +10:00
8e812504b4 Cleanup: warnings building without ASAN 2019-05-25 11:24:13 +10:00
Dalai Felinto
caf52e3779 Update "Overriding Context" API example 2019-05-24 19:21:30 -03:00
Dalai Felinto
7d44184c85 Fix T65094: Sequencer crashes blender when scene strip has NULL scene
Bug introduced on 930765faa8.
2019-05-24 19:13:01 -03:00
Dalai Felinto
0cb2c20ada Sequencer: Fix UI when scene strip has a NULL scene
Issue introduced on 86eefefdc1.

There was a `if scene:` check in the original code, as it turned out
there was a reason for that. We gotta be careful with these assumptions.
2019-05-24 19:13:01 -03:00
Dalai Felinto
5df4c0a469 Outliner: Fix selecting collections in view layer selecting original objects
Part of T64438.
2019-05-24 17:49:13 -03:00
483ae407d9 Change exhisting studiolight
This removes the soft and warm studiolight.
This tweak the outdoor and studio presets for more contrast.
It also introduces a rim studiolight that add more variation.
2019-05-24 21:34:15 +02:00
6f8a34bde1 StudioLight: Add new centered studiolight setup
This is to have one studiolight that is symetrical and close to
the basic_1 matcap.
2019-05-24 21:34:15 +02:00
a629c74c9c Fix T65081: sculpting workspace no longer has matcap by default 2019-05-24 20:32:02 +02:00
Dalai Felinto
b60c43aabd Outliner: Set View Layer as the default mode for new outliners
This mode was supposed to be the new default since 2 years already.

But apparently, it was tackled only for doversion, but not for new
outliners (see 7f596d39df).
2019-05-24 15:31:34 -03:00
Julian Eisel
6d0a6e380e Fix failing assert on factory settings load
Loading factory preferences from the preferences window and triggering a
redraw then would cause the failing assert.
We shouldn't mess with window-manager data when loading preferences
only.
2019-05-24 19:56:08 +02:00
31333fc193 Viewport: Change default studiolight
Differential Revision: https://developer.blender.org/D4939
2019-05-24 20:26:21 +02:00
203f9a49e2 Edit Mesh: Change color behavior
- Make edges darker in vert & face select mode (making more
  contrast to not loose the topology). Downside is less select
  edges visibility in vertex mode. But I'm confident that it's not
  as painfull as it seems.

- Make select faces less saturated to have more color contrast
  between select faces and edges.

- Make unselected faces white to increase contrast with faces and
  edges. The brightening is negligeable for bright surfaces and
  help readability on darker surfaces. Reminder that if the faces
  overlays are too distracting (i.e: uv mapping, or texturing) they
  can be toggled off in the overlay panel.

Reviewers: billreynish, campbellbarton, brecht

Reviewed By: billreynish, campbellbarton, brecht

Subscribers: brecht

Differential Revision: https://developer.blender.org/D4941
2019-05-24 20:21:55 +02:00
76019139f6 Cleanup: remove unused macOS GHOST OpenGL code 2019-05-24 18:37:38 +02:00
04ad9eab6e Fix: Too many checks for the compositor
Check once as and then re-use
2019-05-24 17:11:53 +02:00
5986160dd0 EEVEE: Volumetrics
When viewport samples are set to 1 simple scenes with volumetrics crash.
EEVEE volumetrics needs to init the post processing buffers. With recent
changes the need for post processing buffers are known after the cache
init. But they are constructed before the cache init. This lead to null
pointers.

Reviewed By: fclem

Maniphest Tasks: T64922

Differential Revision: https://developer.blender.org/D4942
2019-05-24 16:33:59 +02:00
Dalai Felinto
d8f096406b Fix T65028: Eye icon not toggle-able from the outliner for linked objects 2019-05-24 11:02:24 -03:00
c935921091 Collada: Remove property with empty identifier
This is not a valid property.

Additionally, there is very much the same property with a valid
identifier defined few lines below.
2019-05-24 15:39:27 +02:00
Dalai Felinto
be03e678e3 Fix T65060: Outliner - Sort Alphabetically checkbox is not working
Bug introduced on 78f8679cfc. Basically a copy/paste error in my
original collection children implementation.
2019-05-24 10:21:33 -03:00
1b60b6edf1 Fix T65071: Crash when selecting joined tracks 2019-05-24 14:54:58 +02:00
05a9788b25 Fix T64101: Crash entering edit mode with particle system
Explicitly disable particles in edit for now.

Those were not rendered already, but were attempted to be converted
to Cycles structures (if UVs were not needed for hair nothing was
rendered, but if UVs are needed then crash happened).

Would be nice to bring hair in edit mode back, but this is a bit
more involved change, which will be done later.
2019-05-24 14:54:51 +02:00
Dalai Felinto
fae5896249 Fix T65059: Crash in empty scenes for context _bases functions
Bug introduced on 0910932e71.
2019-05-24 09:52:28 -03:00
a875e81674 UI: Tweaks to Compositor header
- Move Auto Render into Options panel in sidebar
  - Move Pin to the right and remove emboss
  - Move Background to the right and use greying out to avoid jumping UI elements

Also remove emboss from pin toggle in Image Editor for consistency
2019-05-24 14:46:37 +02:00
946217e503 UI: Sequencer panel names
Change names again, to be more descriptive

Data > Info
Info > Timecodes
2019-05-24 14:23:50 +02:00
75ac356095 Viewport: don't show transparent checkboard in lookdev shading mode
Keep it for render shading mode only.
2019-05-24 13:40:17 +02:00
dd4a268221 Viewport: add more contrast to default studio light, make it default again
It's closer to the default matcap now, but slightly less metallic and dark. The
reason to use studio lights as default is because the roughness and metallic
parameters of the material then have an effect, and because Texture color mode
does not work for matcaps.
2019-05-24 13:37:02 +02:00
419434a1ad Fix unnecessary decorators showing in compositor sidebar 2019-05-24 13:01:06 +02:00
1fdea49fcc Fix T65053: unhide curve does not refresh the viewport properly
Reviewers: sergey

Maniphest Tasks: T65053

Differential Revision: https://developer.blender.org/D4937
2019-05-24 12:12:00 +02:00
9da88c10b0 Fix T65057: Duplicate from context menu won't work
Wrong operator context was used here.
2019-05-24 12:01:15 +02:00
fa299e669c Fix T65062: Compositor doesn't work when using different scene
Need to preserve all view layers, even for indirectly linked scenes
since they might be used by render layer nodes.
2019-05-24 11:24:16 +02:00
ba58b9d2af Depsgraph: Fixes for render pipeline building
- Need to assign current scene in the builder: it is used to
  route relations for object's customdata.

- Tweak relation from scene to object for the customdaat: this
  didn't work before because the render pipeline scene has no
	view layer component.

Fixes T65044: Crash when Rendering (F12)
2019-05-24 10:58:09 +02:00
db8aa7b851 Depsgraph: Fix violation of evaluated domain
Evaluation must never go to original objects and query them:
this is a huge violation of the entire idea of separating
state across viewports and render engines.

Allowed this to only happen for active dependency graph, where
we at least know order of dependency graph update and user
input.
2019-05-24 10:48:19 +02:00
cd3f856eb8 Depsgraph: Fix render pipeline depsgraph pointing to freed data 2019-05-24 10:43:40 +02:00
d21b346f1c Industry Compat keymap: Properly support Transform tool
Now works consistently with move, rotate, scale tools
2019-05-24 10:09:45 +02:00
5adfc51a0f Keymap: use a generic gizmo keymap by default
While support for gizmo specific keymaps remains, this should only
be used if a gizmo-group is doing something that requires one.

There was also a hidden limitation that meant only the last registered
tweak keymap would ever be used.

For now leave this using the generic keymap since all
tweak modal keymaps were using the same template anyway.
2019-05-24 17:53:24 +10:00
7dd888c0cf Keymap: share 3D view transform keymaps
While internally these are separate gizmos,
there is no reason to have a keymaps for each.

Also prefix the gizmo with "3D View"
since there are other kinds of transform gizmos.
2019-05-24 15:48:08 +10:00
911116e1ba Cleanup: correct function name 2019-05-24 12:58:01 +10:00
16b15aed4e Cleanup: use "_update" suffix for RNA update callbacks 2019-05-24 12:56:14 +10:00
017d89adbb Cleanup: warnings 2019-05-24 12:46:28 +10:00
b3f96da2e6 fix unreported Collada exporter Regression: Added back minimal support for Maya bindpose 2019-05-23 22:37:26 +02:00
fd51d2f97c VSE: minimal cache invalidation 2019-05-23 11:52:28 -07:00
1fd7b380f4 VSE: remove lazy loading for strip crop and transform
Lazy loading prevented showing values in UI.
Now we just gray them out if not used.
2019-05-23 11:50:15 -07:00
a3bc869038 Industry Compat Keymap: Support Transform tool
Using the T key, which is after WER
2019-05-23 18:13:08 +02:00
d8746bf45e UI: Move Transform tool to be after Move, Rotate, Scale in the toolbar 2019-05-23 18:12:14 +02:00
ec664636e7 3D View: add back transform tool
Further changes are planned in T64928,
this is just the initial basic version.
2019-05-24 01:38:07 +10:00
faf48c0f64 Depsgraph: Ensure DOF object is always in the graph
Related in T60961.
Unfortunately, doesn't fix it yet. Needs deeper investigation.
2019-05-23 16:57:39 +02:00
08dd51a7bb Eevee: Ignore COW tag when deciding on auto-bake
This is too generic flag, and it might be used by anything, starting from
changes in transform ending with changes in ID properties.

The check here is to be as specific as possible. If that is not possible
the decision must be documented.

Related on T63111.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4923
2019-05-23 16:45:58 +02:00
ba4e6e59b2 Depsgraph: Don't tag original IDs for recalc
Tagging original ID introduces a conflict of interest when a separate
graph is created and is tagging objects to be re-evaluated with its
context.

This is part of the problem in T63111: tags within a temporary dependency
graph affects viewport and vice versa, which makes logic to wrongly
consider that something did change in the scene and that baking is to
be redone.

This effectively reverts db3bfd0, but this time everything seems to
be updating fine in the viewport.
2019-05-23 16:45:54 +02:00
fd3f75a02c Fix several issues with recent node selection changes.
Root of the issue (beside lack of control over operators evaluation in
keymaps, since tools always get tried first), is that wurrent WM code
only allows one modal op to start from a single event (returning
`PASSTHROUGH` in that case is useless, WM code still considers event as
consumed and does not try any further handling of it).

Solution is then to change trigger events of resize/link operators from
`LEFTMOUSE` to `EVT_TWEAK_L`, which makes more sense anyway, imho, for
drag operations...

Fix T64693: Can't resize selected node.
Fix T64933: "Dots" in node editor can no longer be selected by just clicking on them.
Fix T64660: no access to node connectors when a node is inside a layout frame.
2019-05-23 16:37:08 +02:00
5c0e282a73 Revert "Fix T64660: no access to node connectors when a node is inside a layout frame."
This reverts commit 59b7f3a164, which was
causing T64933.
2019-05-23 16:37:08 +02:00
7db03a6baa Cleanup: Nodes: make it clear that SOCK_IN/_OUT are bitflags. 2019-05-23 16:37:08 +02:00
28ad1e0b1f Fix T65035: Wokbench Material Alpha
When using texture drawing the material alpha was not set correctly, It
used the `shading.xray_alpha` as this was the default set in the forward
renderer.
2019-05-23 16:34:36 +02:00
b432209f63 Render: Use dependency graph for compositor/sequencer
This change makes it so a minimal dependency graph which only includes
compositor and sequencer is built for the render pipeline purposes.

Tricky part here is that it's only compositor itself and sequencer who
to use this dependency graph and IDs from it. Render engines are still
to be provided original IDs because:

- They will create dependency graph for the given scene, and currently
  it is not possible to create dependency graph from CoW scene.

- IDs from the compositor/sequencer dependency graph are "stripped",
  as in, they wouldn't have all view layers, collections or objects
	required for proper final render.

This creates annoying mess of mixing evaluated and original scene
access in various parts of the pipeline.

Fixes T63927: Compositing nodes - drivers don't really work

Reviewers: brecht

Maniphest Tasks: T63927

Differential Revision: https://developer.blender.org/D4911
2019-05-23 16:22:25 +02:00
0ec6fa782b Depsgraph: Allow building scene properties
This is used by driers and this is a first step towards support of
scenes used for only compositor or sequencer.

Fixes T61014: Assert adding a driver that uses a single property of a scene ID
2019-05-23 16:22:25 +02:00
b88f1d3491 Depsgraph: Allow having ID built checks be more granular 2019-05-23 16:22:25 +02:00
026c8ddd2a Fix addon preference registration setting preferences dirty
Setting the `bl_idname` on registration was setting dirty.
2019-05-24 00:01:39 +10:00
028bce8717 Depsgraph: Fix fake dependnecy cycle in proxies
Noticed when was looking into T64764, F7043663.

This is a weird case when proxy group is not a group, but is the
same as linked object.

Remove useless relation which was causing cycle, but had no functional
meaning.

Pair programming session with Brecht.

Reviewers: angavrilov, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4928
2019-05-23 15:30:00 +02:00
George Vogiatzis
352474ced8 Fix T65002: after hiding edit mode object, clicking in wireframe mode crashes
Differential Revision: https://developer.blender.org/D4926
2019-05-23 15:27:31 +02:00
df7f69b873 Eevee: Fix SSS energy disapearing with alpha blended material 2019-05-23 15:32:05 +02:00
44f9a502e7 Depsgraph: Correct relations for proxy group
At some point when the transform evaluation was split into EVAL and FINAL
the b350edc was re-introduced by EVAL being run prior to proxy_group's
matrix is evaluated.
2019-05-23 14:30:37 +02:00
08690be3b5 Compositor: FileOutput
The File output node stores it settings locally, but the stereo settings
were not displayed, making users only able to use the default settings
of the node.

The cause of not displaying the buttons are was a NULL-pointer check in
`uiTemplateImageFormatViews`. The NULL pointer was used to check if
multiview was enabled. in case of the file output node this check was
performed by the node, so the nullpointer check could be ignored.

Reviewed By: brecht

Maniphest Tasks: T62767

Differential Revision: https://developer.blender.org/D4929
2019-05-23 14:17:14 +02:00
07c48c9112 Cleanup: Remove debug print 2019-05-23 14:14:36 +02:00
9f5ec31ac0 Fix T63176: Compositor stipes when scaling 2019-05-23 13:28:03 +02:00
6be9d19951 Collada exporter update
Added new feature: Collada: global axis rotation upon export (UI)

The new feature allows to specify the target rest coordinate system upon export.
This allows for example to export a character that is in Blender orientation (Y forward)
to match the Secondlife orientation where (-X forward)

- Refactor:Added new utility methods to collada_utils
           Made BCMatrix class more powerfull
           moved Blender related structures into new BlenderContext class
           added class wrapper to encapsulate ExportSettings structure
           Added blender context getters to ExportSettings
           added access methods to BlenderContext into ExportSettings class
           Moved class BCMatrix into BlenderContext
           moved utility functions from collada_util into BlenderContext
           replace own function for parenting by a call to ED_object_parent_set()

- Cleanup: removed obsolete parameters from methods
           renamed parameters for better understanding
           cleanup whitespace and indentation
           removed obsolete comments
2019-05-23 12:29:20 +02:00
e9cf9e0a39 Gpencil: Fix assert when rendering with Eevee 2019-05-23 12:58:50 +02:00
481e13a2dd Image space, view menu: Fix access uninitialized variable
Seems to be a copy-paste mistake in 7a2b203, causing menu to be
almost empty.
2019-05-23 11:41:13 +02:00
11e87510ef Fix too dense timeline grid spacing
The default spacing changed when this started using the user preferences,
this makes it work more similar to before that.
2019-05-23 11:27:27 +02:00
7c819b5964 Cleanup: unused import, pep8 2019-05-23 19:10:13 +10:00
37e72822c1 Cleanup: remove redundant separators 2019-05-23 19:10:13 +10:00
e88654c31b UI: change order of Live Unwrap in menu U key still goes to Unwrap first
Also makes it more clear it's related specifically to this type of unwrapping.
2019-05-23 11:04:54 +02:00
49593a2c38 Fix T64528: error in RenderEngine API docs example 2019-05-23 10:33:11 +02:00
8022bd7059 Depsgraph examples: don't assign to names of built-in Python objects
`object` is the superclass of all objects. Old-style code could still be
using `class SomeClass(object)` and assigning something else to `object`
could have unexpected results.

This is now also documented in the
[Python style guide](https://wiki.blender.org/wiki/Style_Guide/Python)
on the wiki.

Differential Revision: https://developer.blender.org/D4922

Reviewed by: sergey
2019-05-23 10:29:49 +02:00
58c4b10a70 Merge branch 'blender2.7'
Conflicts:
	source/blender/blenkernel/intern/library_remap.c
2019-05-23 10:23:11 +02:00
054dbb833e Fix (unreported) missing remapping of proxy_from pointer.
That would break proxy behavior after a library reload.

The usual super-annoying loop-back pointers... At least that one is
easily detectable and can be fixed in-place.

Found while investigating T64764.
2019-05-23 10:19:30 +02:00
8389cc7e67 Fix T65023: Tracking marker color is not updated when using Copy Color
Missing dependency graph update.

Ideally need to introduce more clear ID_RECALC flag, and maybe go over all
of the operators (some of them might not use dependency graph still).
2019-05-23 10:02:37 +02:00
fec9615ea0 Masks: Properly port to Copy-on-Write concept
Masks were not really covered by Copy-on-Write due to mistake
in the dependency graph. After correcting that mistake a lot
of tools became broken, so majority of the patch is related
on making it so access to evaluated/tessellated masks is done.

When accessing evaluated mask state make sure access to an
evaluated dependency graph is done. This solves possible
access to NULL data on redo.

Fixes T64899: Re-doing new point addition causes crash

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T64899

Differential Revision: https://developer.blender.org/D4918
2019-05-23 09:47:13 +02:00
1d48fa2206 Correct last commit (gizmo order was reversed) 2019-05-23 17:21:11 +10:00
ad80dc1c89 Cleanup: replace the visible gizmo linked list with an array
Avoids an allocation per gizmo & simplifies limiting the lookup
past the first intersecting 2D gizmo found.
2019-05-23 16:33:21 +10:00
a521ad7568 Cleanup: allow BLI_Buffer to be used without it's header
Without this any functions declared that take BLI_Buffer
also needed to include the header.
2019-05-23 16:32:58 +10:00
f417a717b1 Gizmo: highlighted gizmo now handles all events first
Only mouse events were handled by the highlighted gizmo,
this allows more flexibility with event handling.
2019-05-23 14:27:28 +10:00
1fef2d2b8d Cleanup: split keymap handling into functions
Move keymap handler logic for keymap and gizmo handlers
into their own functions.

This makes it possible to refactor keymap handling
without large changes or duplicating code.
2019-05-23 14:08:28 +10:00
f16c1abc53 Cleanup: de-duplicate popover_group arguments 2019-05-23 12:29:28 +10:00
a1ad71304c Cleanup: modernize code of new BLE_main_id_refcount_recompute().
No functional change expected!
2019-05-22 23:50:39 +02:00
ceed34aac1 Merge branch 'blender2.7'
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/screen/screen_edit.c
2019-05-22 23:36:02 +02:00
91aafd56e3 Fix (unreported) broken collections after undo/redo, or remapping (leading to crashes).
Those are two cases where keeping infamous backward `parents` pointers
of collections in sync is kind of impossible to do... So rebuilding
those relationships from scratch instead.

Fixes e.g. a crash when undoing, then reloading a library, and likely
many more weird ones like that.

Uncovered while investigating T64764.
2019-05-22 23:33:27 +02:00
d1f96f9b11 BKE Collection: Add new function to rebuild parent relationships.
It's not always possible to keep 'by hand' parent relationships valid in
collections hierarchy. Add functions to remake those
(re-using/factorizing code from `readfile.c` `lib_link_collection_data()`
function).

Can't stress again how painful it is to have those kind of backward
relationships in our data structures, those *always* end up being
serious issues to keep in sync... Should only be generated on the fly
when needed, period. :(
2019-05-22 23:33:27 +02:00
5a3c44937f Fix T64764: 'Reload' on linked libraries disconnects proxy armature datablocks.
Note that this only fixes the core issue reported (caused by own dummy
mistake in rBd0df7fb3b94ea), investigating that report uncovered at leat
two more issues, including a crasher (when reloading after an undo)...
2019-05-22 23:33:27 +02:00
b471e48c30 fix T64873 collada export crashes Blender on Mac 2019-05-22 21:34:43 +02:00
3a702ec028 Fix (unreported) usercount of linked IDs becoming garbage after undo/redo.
Not re-reading linked data-blocks in undo/redo case also means that we
do not touch to their usercounts. Even worse, lib_link process in
readfile will increase those (for cases where local data uses linked
one).

Whole data management code is now heavily relying on valid consistent
refcount of all IDs, so we cannot allow that anymore.

Simple solution here could have been to then not increase that one for
linked IDs in `newlibadr_us()`, but unfortunately that would not be
totally bullet-proof, as some local users of linked data may be added or
removed by an undo step...

So I cannot think of any other solution than the ugly brute force one,
i.e. going over the whole Main database and recompute linked IDs users
count... Should not be a big issue performance wise though, this is
fairly cheap process.
2019-05-22 21:10:36 +02:00
3600e94eba BKE Library handling: add function to recompute usercounts of IDs.
This will be needed in undo/redo case, since we do not re-read linked
IDs, their usercounts become total garbage (especially in 'used by local
ID' cases)...
2019-05-22 21:08:51 +02:00
8fdbd1377e Sequencer: ensure Strip is the default active panel 2019-05-22 19:52:41 +02:00
Dalai Felinto
6539cf3199 Visibility panel: Use "toggle" keyword
No functional nor visual change.
This is a partial revert of 0910932e71.

The toggle option was introduced on 6640bcca74.
This allow us to simplify the outliner draw code so it uses the icon as
defined in the RNA (as oppose to get the value there once again).
2019-05-22 16:22:02 +00:00
5397d8d268 UI: allow shrinking panel height to zero when open.
Currently if a panel becomes empty (draw simply returns), it stays
at the last non-empty height. This seems to be caused by some legacy
checks that may be completely obsolete, but the safest fix is to at
least allow resetting height when the panel is open.
2019-05-22 17:59:22 +03:00
8f2538f4fb Sequencer: Swap Data and Info panel names
Following feedback from Blender Studio animators
2019-05-22 16:42:27 +02:00
521b96fa69 Error in last commit 2019-05-23 00:38:29 +10:00
8ec3b5b7c6 Fix T64679: Missing dirty preferences tag
Use a default update function for user preferences that tags
dirty and redraws (if changed).

This avoids relying on button changes which fail in some cases.
2019-05-23 00:35:37 +10:00
8d20d6b2eb RNA: add fallback update function
Use so we can have a default update function,
that doesn't need to be set for every property.
2019-05-23 00:35:37 +10:00
f309c93f1f Cleanup: disambiguate rna_userdef_update_ui/ui_update 2019-05-23 00:35:37 +10:00
287f1da92a Cleanup: unused vars 2019-05-23 00:35:37 +10:00
04fa0511ca DrawEngines: Depth Of Field Units
The unit system is designed for displaying and editing and not for
rendering. Eevee, Workbench and GPencil used these settings to convert
the focal length and sensor size to world units. Making depth of field
render differently with Cycles.

For now we will remove the scale in the draw engines to match cycles,
until we implemented a camera parameters specific scale.

Reviewed By: brecht, fclem

Maniphest Tasks: T64988

Differential Revision: https://developer.blender.org/D4925
2019-05-22 16:16:20 +02:00
8b52619ff8 DRW/Eevee: Fix camera texture coordinates in renders
This patch fix the issue introduced by recent refactor and fixes
computation when using overscans.
2019-05-22 16:09:10 +02:00
d10bab7160 UI: Sequencer menus
Final small tweaks and fixes by Peter Fog:

  - Remove commented lines
  - Set 'Both' handle selection before Left and Right
  - Small tweaks to Strip and Context menus

Any further tweaks will be postponed for 2.81
2019-05-22 14:59:04 +02:00
083f932a25 Workbench: FXAA Artifacts
When using FXAA when rendering to an image the alpha channel was not
correct what lead to visual artifacts.

These artifacts come from the FXAA function that overwrites the alpha
channel with the original Luma of the texel. In the shader this can be
turned on or off. But at the end it always overwrites the alpha with the
luminance.

We didn't use this feature, but the alpha of the resulting pixel still
contained the luma value what lead to render artifacts.
By overwriting the alpha channel with the original alpha we remove these
artifacts.

Reviewed By: fclem

Maniphest Tasks: T64947

Differential Revision: https://developer.blender.org/D4924
2019-05-22 14:50:23 +02:00
53781d5771 RNA: fix missing depsgraph update tagging in FCurve methods.
Add tags in fcurve.update(), keyframe_point.insert/add/remove(),
fmodifier.control_points.add/remove().
2019-05-22 15:35:00 +03:00
31a73b3b92 RNA: allow 'TIME' on Actions and any IDs with AnimData in ID.update_tag. 2019-05-22 15:34:59 +03:00
12c9a9131f Fix: Auto Merge icon state were wrongly swapped 2019-05-22 14:21:31 +02:00
f05b9dba26 DRW: Only change VAO if geometry changes 2019-05-22 13:29:05 +02:00
60319e25f2 GPU: Refactor GPU_batch_draw_range_ex
Rename it to GPU_batch_draw_advanced and use base instance when possible.

Also add GPU_batch_bind to bind the vao independantly of drawing commands.
2019-05-22 13:29:05 +02:00
55780d9866 Fox drwview 2019-05-22 13:29:05 +02:00
7b3f64e12a Cleanup: DRW: Remove, rename stuffs 2019-05-22 13:29:05 +02:00
6914f7125b DRW: Do not update the view ubo for each pass
Only update if the view changes.
2019-05-22 13:29:05 +02:00
f7c9a33446 Fix T64806 Missing sss_blur pass in EEVEE crashing indirect light bake 2019-05-22 13:29:05 +02:00
9f3010e1c0 DRW: DRWView: Finish refactor 2019-05-22 13:29:05 +02:00
b3601a4687 Eevee: Make lookdev shader use common_view_lib 2019-05-22 13:29:05 +02:00
2d2ff27ce8 Eevee: Make lightprobes work with new DRWView system 2019-05-22 13:29:05 +02:00
800641a77f Eevee: Make Planar reflections work with the new DRWView system
Also get rid of clip_block which did the same as clipplanes inside
common_view_lib.glsl.
2019-05-22 13:29:05 +02:00
742848843d DRW: Add view param to DRW_culling_* functions 2019-05-22 13:29:05 +02:00
925b5823cc Eevee: Use DRW_view_* API instead of DRW_viewport_matrix_* 2019-05-22 13:29:05 +02:00
b944a66986 GPencil: Use DRW_view_* API instead of DRW_viewport_matrix_* 2019-05-22 13:29:04 +02:00
21dc2816d6 BLI_memblock: Refactor for faster iteration and allocation
Remove the clear allocation flag as it has little impact since there should
be very few allocation per redraw.

Make BLI_memblock_alloc and BLI_memblock_iterstep much more cache efficient
removing them almost entirely from performance profiles.
2019-05-22 13:29:04 +02:00
657165db94 Workbench: Fix TAA logic
Having both TAA and FXAA enabled at the same time resulted in conflicts.
The jitter_index was incremented twice before being used instead of once.
2019-05-22 13:29:04 +02:00
774022260a Workbench: Use DRWView instead of DRW_viewport_matrix_*
Continuing the transition to the new API
2019-05-22 13:29:04 +02:00
676e1e7b26 DRW: Remove some usage of DRW_viewport_matrix_get 2019-05-22 13:29:04 +02:00
e1153c6a1a DRW: Remove DRW_state_clip_planes_reset 2019-05-22 13:29:04 +02:00
551bbc87af DRW: Remove DRW_state_clip_planes_set_from_rv3d
This should be handled by DST.view_default
2019-05-22 13:29:04 +02:00
45c085a171 DRW: Add DRWView to improve different view handling
This will have multiple benefit.

TODO detail benefits (culling, more explicit, handling of clipping planes)

For now the view usage is wrapped to make changes needed more progressive.
2019-05-22 13:29:04 +02:00
88a725eff8 Eevee: Lookdev: Make winmat point to negative Z 2019-05-22 13:29:04 +02:00
2b1da51b2f Cleanup: DRW: Refactor code for better readability and simplification
- Remove DST.frontface and DST.backface.
- Separate uniform update into its own function draw_update_uniforms.
2019-05-22 13:29:04 +02:00
b82afb4b01 Templates: updated 2D animation template
From the grease pencil team.
2019-05-22 13:15:40 +02:00
aa0242170a BLI_memiter: unpoison memory before freeing it 2019-05-22 12:33:30 +02:00
c56133c846 Fix T64480: Tweak needed to Audaspace CMake options
The issue was that Audaspace options ended up in the cmake cache though
they should not be there.

Also reverting indentation change by @ideasman42.
Thanks to @mont29 for reporting and helping with the fix.
2019-05-22 12:14:51 +02:00
e59f705308 Fix T64981: background images do not come along with linked cameras 2019-05-22 10:44:02 +02:00
85322737ba Fix T64972: object convert to mesh not working after recent changes
This was the only remaining cases that used a string lookup, which didn't
work anymore now that it's no longer a real value in the context.
2019-05-22 10:33:02 +02:00
d9f4071ac6 Fix T64969: changing color space in image texture node loses changes
Don't allow changing it for painted images until they have been saved, similar
to sidebar panels. This could be solved better, for now the important thing is
not to lose changes.
2019-05-22 10:12:27 +02:00
2e350b4034 Fix T64965: crash using masks in texture paint mode 2019-05-22 10:00:33 +02:00
5bf429b0e4 Fix T64974: misisng multi-object edit for some curve operators, like smooth 2019-05-22 09:52:49 +02:00
c06bd2d184 Fix T64499: edit mode display glitch on Intel HD 4x00 and Windows 7/8
There may well be more vertex shaders that need this, but I couldn't find them
in my testing.

Differential Revision: https://developer.blender.org/D4921
2019-05-22 08:32:39 +02:00
ff3a20d1bc UI: tweak order of shading mode display
Order 'Matcaps' first instead of 'Flat'.
Order 'Material' first instead of 'Single'.

While we don't have to order defaults first, it's strange
to have obscure options first (in the case of 'Flat').
2019-05-22 15:22:02 +10:00
6ca172cdce UI: use term 'Factory Settings' for preference menu
It's not clear what 'Defaults' mean in this context because we have
the defaults the users has saved & factory defaults.
2019-05-22 14:36:16 +10:00
b79ff12e11 Preferences: add handler for loading factory preferences
Allows app-templates to define their own adjustments to preferences.
This matches `load_factory_startup_post`, use when loading preferences.
2019-05-22 14:28:10 +10:00
fc0312f538 WM: call wm_file_read_post after resetting preferences
Also avoid diverging code paths for loading startup & preferences.
2019-05-22 14:20:53 +10:00
ed9273b08b Fix T63852: Invalid keymaps written
Track-pad & NDOF events were using KM_NOTHING which wasn't included in
the RNA enum, causing the value to be an empty string in exported key-map
(which then failed to load back).

Add back 'Nothing' value, keep it last since it's not used often.
2019-05-22 13:29:06 +10:00
350825ed99 Fix WITH_PYTHON_MODULE linking
Also remove bf_blenfont since it's not used by creator directly.
2019-05-22 11:20:40 +10:00
0f98c05c8b Fix WITH_HEADLESS build 2019-05-22 10:34:55 +10:00
fa542237dd GPU_select_buffer_stride_realign: fix crash when one of the rect's dimensions is 0. 2019-05-21 20:57:03 -03:00
73f7ed7ffa dna_genfile: add SDNA struct/elem queries that use alias names
Allow versioning code to use checks which use run-time naming
instead of the old names which are only listed in dna_rename_defs.h.

Addresses T64791.
2019-05-22 09:19:05 +10:00
8accb5a46f Cleanup: minor corrections 2019-05-22 08:53:04 +10:00
Dalai Felinto
0910932e71 Remove "_base*" from context API
We are not exposing RNA_ObjectBase in the 2.80 API.

Thus we can't have operators relying on it (e.g, CTX_data_visible_bases,
CTX_data_active_base, ...). Otherwise users won't be able to override
context for these operators.

This commit keep the CTX_data_.*bases() functions around so we don't
need to change the operators and potentially break things that late into
2.80. However as far as the Python scripters are concerned there is no
base to be overriden, ever.

That also simplify the guessing game addon developers have to play when
trying to override an operatori context. They still need to find whether an
operator requires editables, visibles, selected, ... objects. But at
least they don't need to find out whether the operators need base or
object.
2019-05-21 19:24:04 -03:00
58a75d01a6 UI: Edit Mode Options panel cleanup
- Move Live Unwrap to UV menu
  - Move Auto Merge Threshold into a sub-section of Auto Merge to make the relationships clearer

Differential Revision: https://developer.blender.org/D4919

Reviewers: Brecht Van Lommel, Pablo Vazquez
2019-05-21 22:50:02 +02:00
1036ae2acd Fix T58492: Removes jitter when using adaptive smoke domains
This small fix in the GLSL shader seems do to the trick: now smoke won't jitter when using the adaptive domain.

The previous workaround rB3891ad8e0317 is still needed too, i.e. the bug that caused jitter this time was not related to the previous one.
2019-05-21 22:13:12 +02:00
d5ffa805b2 VSE: Don't store cfra in cache
Strips can move in time. Using cfra may give us erratic results.

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D4898
2019-05-21 12:29:17 -07:00
Dalai Felinto
9be7c831f6 Fix: Reset to the default theme not auto-saved
T64679 mention a desire for a solution that is not in a per-case basis.
However until then we are still better off with this working then not.

Specially since changing individual theme elements works, while reset
theme was not working.
2019-05-21 15:33:38 -03:00
10260fc773 UI: Fix wrong naming and tooltips
Double Threshold -> Merge Threshold
This relates to Auto Merge

AutoMerge Editing -> Auto Merge
No need for redundant 'Editing' here
2019-05-21 20:03:43 +02:00
522320dadf Fix T64738: pick short path seam not doing live unwrap 2019-05-21 18:07:47 +02:00
0aa3f2acde Fix UV editor selection colors not matching 3D viewport 2019-05-21 17:59:20 +02:00
06099f391e Fix T64414: crash deleting collection used for particle group and use count 2019-05-21 17:47:04 +02:00
0977937286 Fix T64903: Freestyle line alpha not working for Eevee 2019-05-21 17:42:45 +02:00
6f893d6f05 GPU: double uniform names buffer size
Adding a constant yields quadratic time complexity which can
have quite a big impact on some scenes.

I used the file from T64901 for testing.
In the test file, the time it took to execute `wm_draw_update`
changed from `0.60s` to `0.51s`.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4916
2019-05-21 17:17:56 +02:00
03ad013c0a Cleanup: remove unused function 2019-05-21 17:06:04 +02:00
4ebb64697a Cleanup: pep8 2019-05-22 00:59:43 +10:00
dfb2db10a0 Cleanup: clang-format, sort structs 2019-05-22 00:59:43 +10:00
a459a590c2 Fix part of T64679: Missing dirty preferences tag
- Editing shortcuts.
- Editing walk mode navigation.
- Adding/removing paths.
2019-05-22 00:59:43 +10:00
Juan Gea
fbae1c9ed5 Particle: optimize threading for many particles and many cores
The maximum particles per task of 256 was outdated and lead to too much thread
contention. Instead define a low fixed number of tasks per thread.

On a i7-7700HQ, creating 4 million particles went down from 31s to 4s.

Thanks to Oscar Abad, Sav Martin, Zebus3d, Sebastián Barschkis and Martin Felke
for testing and advice.

Differential Revision: https://developer.blender.org/D4910
2019-05-21 16:56:34 +02:00
9e82e48937 Fix T64804 crash editing image paint fallof in edit mode 2019-05-21 16:50:37 +02:00
4f6d6f982f python templates: update operator_modal_view3d_raycast to 2.8
Reviewers: JacquesLucke, sergey

Differential Revision: https://developer.blender.org/D4914
2019-05-21 16:39:48 +02:00
a25b8f531a Fix T64936: Grease Pencil point pressure max value too low
The API had an old  limit of 1.0f.
2019-05-21 16:35:24 +02:00
030725a9e5 Viewport: MSAA support during ViewportRendering
When rendering viewport to an offscreen buffer the buffer was
constructed for non anti aliasing (0 samples). This made the objects
that are drawn by the `object_mode` including `wireframe` draw type
non-anti-aliased.

The offscreen buffers will be constructed based on the user setting for
viewport multisampling (`U.ogl_multisamples`). The same setting will
also be used when previewing scene strips in the sequencer. For now
this only improves wireframe drawing in the scene strips. To improve the
Anti aliasing in the scene strips we need to get finer control in the
draw manager. This will be part of a different patch I am preparing.

Please note that this patch also cleansup some unused code in the offscreen rendering (FSAA code was still existing, but never called)

Reviewed By: brecht

Maniphest Tasks: T64849

Differential Revision: https://developer.blender.org/D4907
2019-05-21 16:10:48 +02:00
e425e98475 OffscreenRendering: Fix Incorrect Window Coordinates
When doing offscreen rendering (Viewport Render or Sequencer Scene
strip) EEVEE and workbench used the wrong window coordinates. These
coordinates included the border that was not drawn.

Reviewed By: brecht

Maniphest Tasks: T64505

Differential Revision: https://developer.blender.org/D4864
2019-05-21 16:06:18 +02:00
7fe483b360 GPencil: Set samples to 10 for Soft brush 2019-05-21 15:59:36 +02:00
9ad08c0673 GPencil: Set default Fill brush size to 20 2019-05-21 15:58:26 +02:00
dc67e63acb Mask: Fix missing remap of active spline/point on copy 2019-05-21 15:45:51 +02:00
903e5d3972 python templates: update operator_modal_draw to 2.8
part of T56351

Reviewers: JacquesLucke

Differential Revision: https://developer.blender.org/D4912
2019-05-21 15:36:05 +02:00
91ce3087aa Fix T64842: crash rendering files with bevel curves
This is old logic that no longer makes sense in the new depsgraph, and causes
issues when multiple threads try to modify the same bevel object.

Differential Revision: https://developer.blender.org/D4913
2019-05-21 15:07:01 +02:00
0fc97dc73d CTest: Fix Bli_task_test failing on windows.
The task_scheduler was not being explicitly freed, leading to
unpredictable behavior when the process was exiting. The test
would pass, but would sometimes segfault at process shutdown.
2019-05-21 06:51:24 -06:00
fd7352e5a2 Cleanup: use term pad instead of padding
- Use min/max instead of bottom/top
  (in keeping with the rest of the BLI_rect API).
- Swap args (was passing in max, min).
2019-05-21 22:39:04 +10:00
24607a2940 Fix T64758: crash loading certain DDS textures 2019-05-21 13:00:43 +02:00
ad4dd3ebef Fix T64421: crash using redraw timer benchmark 2019-05-21 12:35:57 +02:00
b03ee4828b Graph Editor: view-selected takes scrubbing and marker region into account 2019-05-21 11:59:15 +02:00
dcec863b2f Keymap: Add additional scrubbing affordance (Alt-LMB)
This adds an additional way to scrub the playhead, by holding Alt and dragging with the left mouse button, in addition to Shift-RMB.

It's easier to do this, especially with pen input. The other method is still kept, in case you have Emulate 3 Button Mouse enabled, in which case Alt-LMB pans the view

And of course, you can still scrub simply by dragging the playhead, without holding any modifier keys.

Right click select is unaffected.
2019-05-21 11:28:46 +02:00
9add99f5ff Remove USE_EVAL_DATA operator flag from Python
After new dependency graph API this is no longer needed: all the access
to dependency graph is done explicitly.

Still leaving this flag for C, but that might also be gone in the future.
2019-05-21 11:05:08 +02:00
9877445ed7 Fix T64927: bad timeline number spacing with scaled UI 2019-05-21 10:57:11 +02:00
5a1c888834 UI: Hide Add Cube from toolbar.
This was still a proof of concept tool needing further development. Hiding this for now.

It can return in future releases with further development.

See https://developer.blender.org/T57210 for details.
2019-05-21 10:56:49 +02:00
52643bb9e7 Fix T64763: 'Make Proxy' creates Proxy within linked Collection.
`BKE_collection_object_add_from()` would not check wether collections
were local or not... Trivial to fix.

Note that here I assume we do not use that function in some special
cases where we would like to edit linked datablocks. Think that is
reasonable stance, though.
2019-05-21 10:31:39 +02:00
21d065af5d Cleanup: rename nr_* to *_len for DNA code 2019-05-21 18:01:33 +10:00
34d7ff76ee Cleanup: make DNA_struct_find_nr_ex function more compact 2019-05-21 17:54:32 +10:00
1f51584167 remove greasepencil userdef from image, node, clip and sequencer spaces
these are about greasepencil vertices and in these spaces we are not
editing greasepencil objects.

Fixes T64861

Reviewers: antoniov

Maniphest Tasks: T64861

Differential Revision: https://developer.blender.org/D4901
2019-05-21 09:38:31 +02:00
bfe7fdedfc Fix T64867: crash when changin image source to Movie
thx @Gvgeo for adding the python/RNA case as well.

Reviewers: brecht

Maniphest Tasks: T64867

Differential Revision: https://developer.blender.org/D4902
2019-05-21 09:34:00 +02:00
2cec669d34 Fix T64912: Crash right clicking on 'Add New Material'
D4904 by @Gvgeo
2019-05-21 16:58:34 +10:00
b2c74c0564 Keymap: Ctrl-Tab toggle pose-mode with 'use_pie_click_drag'
This just enables a default key-binding
even when pie menus are used on drag actions.
2019-05-21 16:13:46 +10:00
91a292ba40 UI: show symmetry popovers next to newly added mirror buttons
This moves symmetry panels to a small popover
next to the mirror axis buttons.
2019-05-21 15:49:36 +10:00
909c0bd043 UI: expose mirror/symmetry options int the tob-bar
D4895 by @billreynish with edits.
2019-05-21 15:18:17 +10:00
6640bcca74 UI: support drawing booleans with icons as check-boxes
Previously, if a boolean happened to use an icon there was no way
to make it display as a check-box from Python scripts.

The previous logic meant we ended up having to edit the RNA.
Since booleans with icons don't work well with the split-property layout
(now used for most of the interface).
Icons were being removed from RNA then added back using awkward Python
ternary expressions in the interface scripts.

The toggle argument now has an unset state (-1).

- toggle=True: no checkbox (emboss).
- toggle=False: always use a checkbox (no icon).
- toggle=(unset/-1): depends on the icon status, default as before.

Since toggle=False was default, this isn't used in existing UI logic.
2019-05-21 15:06:44 +10:00
87fda5bc60 Cleanup: const assignments to simplify code
Also avoids using uninitialized vars.
2019-05-21 12:30:07 +10:00
a08fb46700 UI: move edge-tag option from the scene into the operator
This was a very specific option to display in global tool settings.

Now this is exposed in the operator when edge-select mode is enabled.
2019-05-21 11:15:26 +10:00
e787700393 Fix memory leak in Normals from Faces operator 2019-05-21 08:03:29 +10:00
ee7093689f GPU: Use uint in GPU_batch_uniform_1ui. 2019-05-20 15:45:35 -03:00
12d28b3c4c UI: Outliner - Do not highlight icons of active lights
This removes the extra highlighting of lights that are active as this is not supported

Differential Revision: https://developer.blender.org/D4903

Reviewed by Brecht Van Lommel
2019-05-20 10:55:18 -07:00
907d5eb39b Normal UI: Make Alt-N shortcut to Normals Menu.
See T64324 for discussion of normals ui.
Consensus on blender.chat was to use Alt-N to pull up Normals Menu,
overwriting the old use of that key (Flip normals).
There are still shortcuts for Recalculate Outside and Recalculate Inside
which are likely the more common needs.
2019-05-20 13:38:33 -04:00
9efe117535 Normal UI: for all ops needing autosmooth on, enable it if needed.
Now Normal menu operations and rotate normals (r n) do not need
manual enabling of autosmooth first.
See T64324 for discussion of Normal UI changes.
2019-05-20 12:16:34 -04:00
02238d4d6b Clip editor: make tool/sidebar wider by default, right align movie clip info 2019-05-20 18:15:46 +02:00
d17cb3a3b3 Fix Python error in sequencer scene strip UI 2019-05-20 18:10:12 +02:00
5189bef654 Fix outliner drawing unselected active objects as if they are selected
Now we always draw a roundbox behind the active object icon, and only change
the text color if the active object is also selected. This matches the 3D
viewport better.
2019-05-20 18:10:12 +02:00
b5446f01fd Accidentally overrode changes in 40d5254741 2019-05-20 18:09:25 +02:00
5c9adc1614 UI: Sequencer menus
More updates to Sequencer menus from Peter Fog.

  - Rename Cut operators in the UI to be more clear
  - Re-organize the context menu to be nicer and more useful
  - Select menu is clearer
  - other assorted fixes and changes for clarity
2019-05-20 18:04:35 +02:00
40d5254741 Sequencer: Hide panels when there is no actual sequences
before this the python script would raise an exception due to
attempt to show properties of None data.
2019-05-20 17:51:05 +02:00
af93bb0a24 UI: right align info in image settings panel 2019-05-20 17:30:37 +02:00
64c821bd11 GPencil: Add new default Soft Brush 2019-05-20 17:23:36 +02:00
828efef151 UI: Top bar menu tweaks
* Use icon for Blender menu
* Move Startup/Factory settings to Defaults submenu under File
* Move Preferences under Edit
* Move Quit to File
2019-05-20 16:52:17 +02:00
3f4dd54ff7 GPencil: Fix presets error after changing parameter name
The old use_follow_draw was renamed to alignment_mode
2019-05-20 16:41:16 +02:00
49efb7bdbe Camera: change default f-stop from 5.6 to 2.8
This gives a more noticeable effect by default. Also fixes startup.blend not
having focus distance initialized correctly.
2019-05-20 16:35:34 +02:00
d2e139e44e Color Management: update configuration, remove legacy transforms
* Replace Log view transform with Filmic Log.
* Remove Rec.709, DCI-P3 displays that were incomplete and outdated.
* Remove outdated RRT and Film transforms, replaced by Filmic.
* Remove camera responsive curves that don't work with HDR colors.
* Rename Default view transform to Standard.

We're breaking compatibility now for 2.80, so that we can add future
improvements on a clean config.

Part of the code was contributed by George Vogiatzis in D4782.

Differential Revision: https://developer.blender.org/D4900
2019-05-20 16:35:34 +02:00
b9ce1fee42 Fix broken workbench tests after recent changes 2019-05-20 16:35:34 +02:00
d7ef7d8046 Edit Mesh Select: Fix OpenGL status to use GPU_point_size.
The problem has worsened in rB94db2c1f3243.
Maybe this has contributed to T64779.
2019-05-20 11:08:18 -03:00
9cc795e1df Revert "Fix T64876: Checking Animated checkbox does not do what is documented."
Bad understanding of intents behind that setting, my mistake.

This reverts commit 49f530c7da.
2019-05-20 16:02:30 +02:00
7a2b20349a UI: add entry to show/hide tool settings bar to the View menu 2019-05-20 15:37:04 +02:00
eec47f284a Fix T63443: tool 'builtin_brush.draw' not found for space 'IMAGE_EDITOR' 2019-05-20 15:33:16 +02:00
576e7c82da UI: keep grease pencil stroke placement / guides button always in main header 2019-05-20 15:30:45 +02:00
97047db16c Revert "Theme: match outliner/properties colors with modes in viewport."
While this consistency is useful, green selection in edit mode does not stand
out as much as orange. This can cause problems for some users, it seems to
depend on the person. Overall the risk of making the change at this point in
the release cycle is too high.

This reverts commit 5827a47280.
2019-05-20 15:21:21 +02:00
d5f644c672 Keymap: reinstate Alt-Wheel to scrub from 2.7x map
Animators found this useful, so keep it as a default.
2019-05-20 23:19:45 +10:00
3d4c4fd3a7 Viewport: change default 3D viewport lighting from Studio to Matcap 2019-05-20 15:14:40 +02:00
d00c54c855 Cleanup: reorder report argument for pointer assignment
Most code uses ReportList argument last (or at least not first)
when an optional report list can be passed in.
2019-05-20 23:11:57 +10:00
88d2d82031 Cleanup: unused variable 2019-05-20 23:11:49 +10:00
43500671dc Normal UI: Remove normals toolbar and add/muliply menu options.
See T64324 for discussion re improving normal editing ui.
As next step, remove the face_strength tool settings because
menu operator now includes that. Move face_strenth enum to
better place.
Remove normals toolbar panel because only thing left
(normal_vector) can stay hidden for copy/paste.
Remove add vector and multiply vector menu entries as
they are useless without ui method for specifying operand,
and they are very low utility operations anyway.
2019-05-20 08:51:53 -04:00
49f530c7da Fix T64876: Checking Animated checkbox does not do what is documented.
This property should not be animatable.
2019-05-20 14:51:18 +02:00
0b47d08ef6 UI: integrate Cycles ray visibility and culling in new Visibility panel 2019-05-20 13:47:42 +02:00
Dalai Felinto
785ff8e1d2 UI: add Visibility panel for objects
The outliner should not be the only way for users to change these settings.
The Python API was extended to keep these properties positive and keyframable.

Differential Revision: https://developer.blender.org/D4889
2019-05-20 13:47:37 +02:00
81320ce7f7 Fix T64766: use grid size from user preferences 2019-05-20 11:48:37 +02:00
11d5a1baff Fix T64776: Multiple close file dialogs 2019-05-20 11:41:09 +02:00
bb88485a16 Fix compiling: Forgot this file in last commit. 2019-05-20 10:52:08 +02:00
301fb14fbf Icons: Fix wrong icon names
Some file-related icon names were mixed up.

We have icons for cache, volume, 3rd party 3d files, hidden, backups, drives
2019-05-20 10:38:47 +02:00
f606f58845 Cleanup: add wm_utils.c for generic functions 2019-05-20 16:52:49 +10:00
3184460ff7 3D View: re-use select id buffer for circle select on cursor-motion
The new selection code was redrawing everything for each update.

Use the gestures wmGenericUserData to store the cache between
executions and ensure it's freed.
2019-05-20 16:34:23 +10:00
c09f461e04 WM: add wmGenericUserData utility struct
Useful to have a generic user data with an optional custom free function,
use for wmGesture.
2019-05-20 16:26:37 +10:00
8f73559355 Cleanup: rename buffer select var: bbsel to use_zbuf 2019-05-20 13:49:38 +10:00
d496236f4a Cleanup: move selection utilities into ED_select_buffer_utils 2019-05-20 13:19:24 +10:00
164b6c5b04 Cleanup: remove EDBM_backbuf API 2019-05-20 12:39:01 +10:00
fcee82d19a Cleanup: remove unused G_FLAG_BACKBUFSEL 2019-05-20 12:37:49 +10:00
0e1faba9d0 3D View: use new buffer selection API's for paint vert/face select
Removes EDBM_backbuf use.
2019-05-20 12:36:31 +10:00
c99838f40f Fix missing assignments in object mode select id drawing
The code currently doesn't run, needed for upgrading all selection
code to use the new API's.
2019-05-20 12:14:30 +10:00
eb2937282b Fix error mixing old/new buffer selection API's
Missed from 4f6e252805, the second pass often wont run,
so the error didn't show up on basic tests.
2019-05-20 12:09:29 +10:00
17c15be48f Fix invalid face offset in DRW_draw_select_id_object 2019-05-20 11:36:50 +10:00
d58631afc8 Fix error showing active tool side-bar in the image editor 2019-05-20 10:50:54 +10:00
b4dfae3df7 Industry Compat keymap: Fix deselecting rings
Issue was caused by a keymap conflict
2019-05-19 23:36:47 +02:00
bd41d573be Fix T64832: Industry keymap - Pressing F to View Selected in Node Editor not working via hotkey 2019-05-19 23:16:22 +02:00
7d620d2eec UI: Add back Sequencer sidebar toggles into the header
The properties inside are still hidden when the toggles are off, but we really should use greying out here instead.

That needs changes to DNA/RNA to work though.
2019-05-19 22:47:14 +02:00
8c113eb0c4 Render: Use GHash for storing render parts
Previously, render parts were stored in a linked list and every tile update
searched the entire list for the correct part. As a result, the overhead
of searching tiles increased quadratically w.r.t. the number of tiles.

By hashing the parts based on their location, this operation is much faster,
significantly reducing the tile update overhead for small tiles and/or large
renders.

For example, rendering an empty scene in 1080p at 1spp and 8x8 tiles goes
down from 9.22sec to 1.45sec on my laptop.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D4896
2019-05-19 22:37:45 +02:00
Dalai Felinto
301806a067 Fix build
Issue introduced on b7eba20236.

I'm surprised it compiled elsewhere, but in Linux at least this fix was
required.
2019-05-19 17:34:08 -03:00
b7eba20236 UI: Edit Menu Operator Polling
This patch updates the polling that enable/disables Edit Menu items. Slight Undo History menu changes

Differential Revision: https://developer.blender.org/D4846

Reviewed by Brecht Van Lommel
2019-05-19 13:12:15 -07:00
ec02bc299e Edit Mesh Select: Fix/update to new logic. 2019-05-19 16:03:29 -03:00
289825ee37 Fix T64720: Sequencer UI doesn't draw properly with some strip types
cleanup after rB86eefefdc1aae2a3ab4160770032671abf55aa30.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4891
2019-05-19 11:55:03 -07:00
58bea005c5 VSE: add movie strips on top of audio
- add movies to channel above free slot (no check for 2 free slots),
  add sound to the free slot
- don't override channel settings if `channel` property is set

This is just a hack. Propper implementation should be done along with T59540

Reviewed By: brecht

Differential Revision: https://developer.blender.org/T59540
2019-05-19 11:55:03 -07:00
eee704a83f Fix T64579: Failure to honor anamorphic display
Restore stretching of sequencer preview removed in rB005626b8c6b4

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4879
2019-05-19 11:55:03 -07:00
758c25d89d UI: Icons update
A few icons were missed in the last update.

  - Added dedicated icon for showing hidden objects in the Graph Editor
  - Added new, more descriptive icon for F-Curve snapshots
  - Tweaks for Toggle Full Screen and Collections icons

This should be the final set for 2.80.

Thanks to Andrzej Ambroż for contributing this icon set.
2019-05-19 20:23:58 +02:00
5adb3607dc UI: expand more image editor scope panels by default
Better to show all information about the image at once, there is enough space
since they are in their own category.
2019-05-19 19:55:21 +02:00
bb2d20c545 UI: don't ask for confirmation to save or revert to saved preferences 2019-05-19 19:02:21 +02:00
30935955d6 UI: minor tweaks to image editor panels 2019-05-19 18:56:17 +02:00
2da0d3db80 UI: Use "Viewport" instead of View in Subdivision Modifier.
Cosmetic change for consistency according to the naming guidelines in 2.80.

Also place Render first, Viewport later to match other areas in Blender
such as the sampling panel in EEVEE/Cycles.
2019-05-19 17:19:30 +02:00
36dbd141f0 UI: Align Render and Viewport samples properties for EEVEE.
Matches Cycles and other areas in Blender.
2019-05-19 17:10:02 +02:00
2ff393bb98 UI: use single column layout for image settings panels 2019-05-19 16:24:53 +02:00
7aaa7aa9dd Images: change alpha settings to support channel packing
This also replaces the Use Alpha setting. We now have these alpha modes:

* Straight: store RGB and alpha channels separately with alpha acting as a
  mask, also known as unassociated alpha.
* Premultiplied: transparent RGB pixels are multiplied by the alpha channel.
  The natural format for renders.
* Channel Packed: different images are packed in the RGB and alpha channels,
  and they should not influence each other. Channel packing is commonly used
  by game engines to save memory.
* None: ignore alpha channel from the file and make image fully opaque.

Cycles OSL does not correctly support Channel Packed and None yet, we are
missing fine control over the OpenImageIO texture cache to do that.

Fixes T53672
2019-05-19 14:36:42 +02:00
3b23b5c638 Images: don't (un)premultipy non-color data
The previous behavior here was wrong for some specific combinations of
settings, non-color RGB channels should never be affected by the alpha
channel.
2019-05-19 14:36:42 +02:00
7c78c20b6b Cleanup: refactor image texture node code for coming changes 2019-05-19 14:32:22 +02:00
bb8ed813f3 Cleanup: remove unused image buffer code 2019-05-19 14:16:36 +02:00
ec1c9e3258 Python API: add a Matrix.Diagonal constructor to mathutils.
For some reason there seems to be no way to do the very simple and
obvious task of converting a scale vector to a matrix via mathutils.
The Matrix.Scale constructor does something complicated instead.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4893
2019-05-19 15:03:27 +03:00
d150c893f4 UI: don't use decorators for Eevee material quality settings 2019-05-19 13:22:11 +02:00
255615867c Fix inconsistent toolbar and sidebar sizes in default workspaces 2019-05-19 13:21:24 +02:00
24675eddcb Fix Cycles material settings appearing in the wrong tab in node editor 2019-05-19 13:10:09 +02:00
cf878a0f7c Keymap: Space-L sets "Lasso" with Space tool activation 2019-05-19 19:55:17 +10:00
434acfd904 UI: add Panel.bl_order property to control order of panels for add-ons
This fixes poor Cycles panel ordering, with Freestyle and Custom Properties
appearing at the top.

For most cases order of registration is still the easiest way to control
order and it's recommended to keep using that. This is mainly to solve a few
cases where we want a few built-in panels to appear below add-on panels.
2019-05-19 11:33:27 +02:00
c0352551d2 Fix T64822: curve widget point selection does not take into account DPI 2019-05-19 11:33:27 +02:00
f7b60f878b Cleanup: doxygen parameters 2019-05-19 19:21:45 +10:00
4cdc6d36fd Cleanup: spelling for ghost comments 2019-05-19 19:15:56 +10:00
f2eef45200 Cleanup: use wm prefix for GenericCallback
Without this it's not clear what kinds of data this deals with.
2019-05-19 14:56:49 +10:00
7decb9ad08 Cleanup: rename BLI_appdir_fonts_* -> font
Plural name doesn't fit with textures, sounds & other paths
that may be added.

Also quiet unused warning.
2019-05-19 14:50:02 +10:00
06c4139a68 UI: Remove Hover Highlight When Outliner Loses Focus
This patch removes the hover highlight that can sometimes remain after moving out of the Outliner space

Differential Revision: https://developer.blender.org/D4822

Reviewed by Brecht Van Lommel
2019-05-18 17:09:45 -07:00
5f2578f32f UI: Default Directory for Windows Fonts
This patch gives new Windows users a better default preference for fonts folder

Differential Revision: https://developer.blender.org/D4725

Reviewed by Campbell Barton and Brecht Van Lommel
2019-05-18 16:40:33 -07:00
1fce0460d5 Industry Compat keymap: Switch mode order to Vert, Edge, Face, Object
Due to popular demand, this switches the number key mode order, so that it goes:

 1: vert, 2: edge, 3: face, 4: object, 5: sculpt and so on

This has a number of downsides in practice, because it works less well for objects other than meshes, which now have a gap in the keymap between 1 and 4. I will try this change anyway, due to popular demand.

Also use V for viewport pie, which makes it easier to switch viewpoints on laptops especially.
2019-05-18 19:13:17 +02:00
db3f3d4d23 make.bat: Add option to only update sources from git.
SVN takes a long time to sync even if there are no updates,
the `code_update` parameter gives the option opt out of the
SVN updates.

This is a developer option, people just wanting to build
blender and not do any development are highly recommended
to keep using the `update` method.
2019-05-18 10:34:33 -06:00
94db2c1f32 Edit Mesh Selection Drawing: Make sure the state of point size is enabled. 2019-05-18 12:25:53 -03:00
4f6e252805 Fix T54686: objects don't occlude each other for edit-mesh select (part 2)
The previous fix 8a6414ed46, resolved selection picking but didn't
work for box/circle/lasso select.

- Add ED_select_buffer_utils.h for general select-buffer operations
  unrelated to edit-mesh.

- Circle select still needs to cache select-id's for each update.
2019-05-18 23:58:46 +10:00
eddda5194c Cleanup: remove unused argument 2019-05-18 23:55:58 +10:00
53f77ae722 macOS/Linux: use more standard button layout in quit dialog
Ref D3118. This matches macOS and GNOME.
2019-05-18 14:43:10 +02:00
95a42ccf1c Fix T64762: incorrect textures for non-color images with an alpha channel 2019-05-18 12:54:59 +02:00
8a5effe967 Fix T64791: light sun angle not saved
There is a deeper problem here with DNA_struct_elem_find and Lamp/Light name
aliasing, to be fixed separately.
2019-05-18 12:45:56 +02:00
79cfd5134d Fix image not being marked as modified on texture paint undo/redo 2019-05-18 12:42:22 +02:00
396558b36f Windows: use more standard button layout in quit dialog
macOS and Linux remain the same as before. Ref D3118.
2019-05-18 12:19:27 +02:00
7fd015bb70 Fix for Python error due to file missing from last commit 2019-05-18 11:53:30 +02:00
a82bc70512 Fix use of deprecated DoF distance property 2019-05-18 11:50:55 +02:00
07c67148e3 Mesh: remove Double Sided lighting option, it does nothing in the new viewport
This is legacy option from fixed-function graphics hardware, where per-vertex
lighting meant this had a significant performance impact.
2019-05-18 11:42:31 +02:00
d95ccc2175 Cleanup: remove unused GHOST quit dialog code 2019-05-18 10:35:06 +02:00
14f00e11fe macOS: always use the Blender quit dialog, like other platforms
The same was done for Windows, but some extra changes were needed to make it
work on macOS. This is required because the Blender quit dialog now contains
additional settings for image saving.
2019-05-18 10:31:10 +02:00
4718998578 UI: Sequencer menus
- Rename Frame menu to Navigation, and move to View menu
  - Add missing Zoom entry to View menu
  - Move the Snap/Offset items to the Transform menu
  - Remove Crossfade Sounds from the Strip menu, now that it is in the Transitions menu
  - Added more separators where it makes sense

Suggestions by Peter Fog (tintwotin)
2019-05-18 10:05:13 +02:00
03672e7783 Industry Compat keymap: Sequencer fixes
- Use consistent animation controls
  - Use consistent keys for Select More/Less & Select Linked
2019-05-18 01:36:34 +02:00
40a7ec8375 UI: Sequencer menus
Add missing menu entries:

  - Select Box
  - Sound Crossfade
  - Toggle Meta
  - Gap Remove

Also:
  - Rename menu entries to use Playhead rather than the ambiguous Frame
  - Use icons for the rest of the Add menu categories

Thanks to user tintwotin for pointing out the missing items
2019-05-18 01:11:45 +02:00
3b8ae2c08f Desktop Icons Update
Unify all desktop icons on Mac, Win and Linux to fit with the correct, updated brand guidelines here: https://www.blender.org/about/logo/

This is using :

PANTONE 716 C = #EA7600 (RGB 234 118 0)
PANTONE 647 C = #236192 (RGB 35 97 146)

Thanks to Yevgeny Makarov (jenkm) for compiling this icon update.

See T63623
2019-05-17 23:54:21 +02:00
8af1d1b199 UI: Icons update
New icons from Andrzej Ambroż / Jendrzych:

  - Bespoke icon for creating new Collections
  - Special icons for Rigid Body and Rigid Body Constraints (Physics Properties)
  - New icons for Holdout and Indirect Only toggles in the Outliner
  - New generic Cursor icon for cases that are not related to either Orientation or Pivot

Many other tweaks to existing icons, including:

  - Add & Remove Keyframe
  - Weight Paint & Collision Modifier
  - Tablet Pressure Sensitivity
  - Playback icons
2019-05-17 23:22:22 +02:00
572754f894 Fix T64775: crash loading Eevee files with DoF, after recent changes
Additional fix to ensure Cycles versioning is done after Eevee.
2019-05-17 22:56:29 +02:00
728d99f446 Fix T64775: crash loading Eevee files with DoF, after recent changes
Version after lib linking due to following ID pointers.
2019-05-17 22:51:08 +02:00
3022dd2b27 Images: changes to avoid losing new images that have not been saved
The basic idea is that such new images will be packed into the .blend file
when saving all modified images from the quit dialog. To make this workflow
nicer a number of changes were made to how this type of packed image is
handled.

* "Save Modified Images" now packs generated images into the .blend file.
* "Save As" for packed images now automatically unpacks the image, so that
  it's easy to save automatically packed images. "Save Copy" keeps it packed.
* "Save" for packed images now re-saves the image into the .blend file, so
  that it's effectively the equivalent of "Save" for non-packed images.
* Empty image filepaths are no longer remapped when saving the .blend file.
  Previously it would become e.g. "//../../" which makes no sense for generated
  images with no filepath yet.
* Hide unpack button and filepath for such packed images with no filepath.
  Unpacking does not work in a predictable way without a filepath, better
  to just "Save As".
2019-05-17 20:03:26 +02:00
60a4342557 Cleanup: Eevee: Use dummy texture for GTAO when not enabled 2019-05-17 19:25:01 +02:00
be5fd9c09f Fix T64300: Missing update of original data-block on redo
Dependency graph was not yet set as active when is used by
operator which is being redone.
2019-05-17 19:00:36 +02:00
0920cb650d UI: Small tweaks to the save dialog:
- Add back info icon at the top.
  - Remove icons from the buttons. None of the OS's we support use icons here
  - Remove button align. It doesn't work well with the active default highlighting
  - Center-align the text inside the buttons

To make this look even nicer, we should add more padding all around the edges, but that could be done separately.
2019-05-17 18:58:35 +02:00
Dalai Felinto
e3ea703b09 Outliner: Make restriction icons inactive based on hierarchy value
If the parent of a collection has a setting disabled, the children should have
that setting inactive.

In some cases a column may affect another one. For example, disabling a
collection to render should make holdout and and indirect only inactive.

In View Layer it works for both objects and collections.
For Scenes mode, it works only for collections.

Differential Revision: https://developer.blender.org/D4888
2019-05-17 13:49:45 -03:00
848967c21d Fix meshes.new_from_object() not preserving materials 2019-05-17 18:26:00 +02:00
0c4ce8e55e Eevee / Workbench: Fix hair normals
Hair normals were not behaving correctly. This corrects their looks and
fix the node shader geometry that was showing the flat normal.
2019-05-17 18:17:23 +02:00
ec3940ab0a Cleanup: Eevee: Use DRW_PASS_CREATE macro when possible 2019-05-17 18:17:23 +02:00
97d22e12b5 Cleanup: DRW: Remove uneeded DRWState values
This removes:
- DRW_STATE_TRANS_FEEDBACK
- DRW_STATE_WIRE
- DRW_STATE_POINT
2019-05-17 18:17:23 +02:00
02319549c3 Fix T64759: Pick select selects an incorrect face in edit mode.
Bug introduced in T64759.
2019-05-17 13:02:57 -03:00
2a31e0c812 Images: make it harder to accidentally undo image texture painting changes
Editing properties like generated X/Y size clears any changes to the image,
and it's not obvious that this is destructive. Now if the image has been
painted on or baked to, buttons to Save or Discard changes will appear and
editing the properties will be disabled until doing one of these.
2019-05-17 17:59:26 +02:00
e8238e1123 Images: make image save operator available outside image editor
This includes some refactoring of image operator poll functions.
2019-05-17 17:59:26 +02:00
b38853e89f Cleanup: remove unused image code 2019-05-17 17:59:26 +02:00
d12244cea0 Cleanup: move Image flags into DNA, for consistency with other types 2019-05-17 17:59:26 +02:00
bc3139d792 Cycles/Eevee: unify depth of field settings for cameras
There is now a checkbox to enable/disable depth of field per camera. For Eevee
this replace the scene level setting. For Cycles there is now only an F-Stop
value, no longer a Radius.

Existing files are converted based on Cycles or Eevee being set in the scene.

Differential Revision: https://developer.blender.org/D4882
2019-05-17 17:59:26 +02:00
043299ab69 UI: Use correct icon for saving in the close dialog. 2019-05-17 17:55:14 +02:00
5ce3f69da4 UI: File Close Dialog
This adds a new dialog that is shown whenever a file is closed.
So, either when a new file is opened, or when Blender quits.
The dialog allows to save unsaved changes. Furthermore it also
allows saving images that have been modified in Blender, but are
not saved yet.

Known limitations:
* Images that have no file path and have not been packed before,
  are not saved.
* On MacOS the old dialog is shown when Blender quits.

Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4860
2019-05-17 17:43:36 +02:00
56cdb0cf15 Fix Blender menu not collapsing when Show Menus is disabled. 2019-05-17 16:34:11 +02:00
fa9ab7b5a9 Fix T64595: Mask does not update correctly when changing frames
Is caused by change which made all IDs to have parameters.

Solved by using more explicit relations.
2019-05-17 15:48:01 +02:00
cd78a08a19 Fix compilation error in release mode
Caused by recent fix.
For some reason compiled fine in debug mode, but not in release.
2019-05-17 15:35:57 +02:00
Dalai Felinto
0255cf8126 Set selection column restrict hidden by default
This was discussed in the past, the idea is to get the outliner even more compact.
Also to let users to use the viewport selection restriction further.

It would be nice to haven indication that an invisible column is set, but this is
no particular to the selection column.
2019-05-17 10:16:25 -03:00
fccb42c41f Fix T63981: Factory default memory cache limit is 4096 MB (32bit builds)
very straightforward: initialize default to the same hard limit as the
RNA properties.

Annoying part is that it's not trivial to make RNA to use same BLI functions,
so leaving that behind for now.
2019-05-17 15:02:12 +02:00
34d67601b7 Python: Raise an error even NO_MAIN data is assigned to object
The goal is to prevent assignment of temporary or evaluated meshes
to objects from the main database.

Majority of the change is actually related on passing reports around.

On a positive side there are more error prints which can become more
visible to scripters.

There are still possible further improvements in the related areas.
For example, disable user counting for evaluated ID datablocks when
assignment happens. But can also happen later on as a separate
improvement.

Reviewers: brecht, campbellbarton, mont29

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4884
2019-05-17 14:27:13 +02:00
8b5816e76b Theme: Use blue for Outliner selection highlight. 2019-05-17 13:54:14 +02:00
7778a6d17c UI: Use 'Blender' as label for app menu.
The Blender icon can be confusing with some window decorations.
2019-05-17 13:53:20 +02:00
2bb788d4cd Cleanup: Eevee: Remove custom volumetric matrix
This was the same as using the inverse obmat.
2019-05-17 13:38:42 +02:00
52669dda80 Eevee: Remove the Volumetric Render checkbox
This is to simplify the usage of Volumetrics.

Now it automatically detect if there is any Volumetric material in the
view and allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
b526221315 Eevee: Remove the Subsurface Render checkbox
This is to simplify the usage of SSS.

Now it automatically detect if there is any SSS material in the view and
allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
b23af112d2 DRW: Fix warning on MSVC 2019-05-17 13:38:42 +02:00
89673f0974 DRW: Make fullscreen vertex shader position and uv without attributes 2019-05-17 13:38:42 +02:00
26beaa2d90 Cleanup: Eevee: Use SET_FLAG_FROM_TEST 2019-05-17 13:38:42 +02:00
4856474b16 UI: Sequencer sidebar tweaks for the viewer
- Move the Channels setting to the View panel
  - Remove double separators in the View panel
  - Close the Scene panel by default - it only applies in rare cases
  - Move the Frame Overlay from the header to a sidebar panel
    Previously it used a strange ghost icon, and it make the other controls jump around
    Now uses clearer naming
2019-05-17 13:38:34 +02:00
cf433caa89 UI: Put Sequencer Proxy & Cache panels back into separate category
This works better, because some things are global for the scene and others are per strip
2019-05-17 13:27:21 +02:00
77f92b8cb7 Update for Depsgraph API changes
Reviewers: sergey

Differential Revision: https://developer.blender.org/D4881
2019-05-17 12:38:05 +02:00
39a29d843e Fix: Add back last Sequencer panel that went missing in 86eefefdc1 2019-05-17 12:01:45 +02:00
9c83061b8d Fix: Sequencer Cache panel was accidentally removed in 86eefefdc1
Also fixed one last panel missing a category
2019-05-17 11:31:49 +02:00
dfbbc5067e Fix T64733: Error baking action
scene.update() needs to be replaced with view_layer.update() after
rBe693918d4074

note: will go over other occurances of scene.update() in a different
commit
2019-05-17 10:45:30 +02:00
6864d0b6f1 API Docs: fix mistake in example code 2019-05-17 10:43:31 +02:00
f50cef95ef Report an error when trying to remove non-in-main datablock
After recent dependency graph API changes it became easy to violate
ownership design (since its changed) and request removal of out-of-main
temporary mesh. This confuses Blender and can cause crashes/locks.

Fixes T64731: Blender freezes after assigning result of object.to_mesh()
2019-05-17 10:38:16 +02:00
32b5f24c2a API Docs: add example use cases for mesh functions, fix wrong description 2019-05-17 10:34:20 +02:00
5186cfbea4 Depsgraph: State behavior details more explicitly 2019-05-17 10:24:45 +02:00
e02f68c577 Fix T64713: Link to Collection Textfield does not become active
automatically
2019-05-17 10:01:19 +02:00
d7628d4b7f Mesh Select: use select context instead of static structs
This patch does not bring any functional change, but it does expose
some utilities that can be very useful to correct occlusion and
performance problems of Circle Select and similar.
Creating a selection context still makes it easier to track issues.
2019-05-17 15:02:19 +10:00
1f22a20d5f Fix face mask edge select drawing
All edges were drawing black.
2019-05-17 14:11:22 +10:00
42cd07c28c 3D View: Support texture paint mask clipping 2019-05-17 14:04:59 +10:00
7baddbf818 UI: add tool panel for node editor, use tabs
This follows the 3D view, adding an "Options" tab.
2019-05-17 12:48:51 +10:00
2a9214eaaf makesdna: Fix build error on win32.
Win32 has some special struct alignment rules that makesdna
is not warning about. See

https://developer.blender.org/T63164#652815

for details.
2019-05-16 18:03:20 -06:00
387c1f2e0d Tests: add more descriptive messages when idiff is not available
Based on patch contributed by Diana Picus in D4355.
2019-05-16 20:25:09 +02:00
c83f13d451 Preference: don't autosave preferences when running with --factory-startup
This case is likely intended to be temporary, for manual or automated tests.
2019-05-16 20:15:55 +02:00
d726d7e462 Theme: Update Blender Light to match viewport and default theme. 2019-05-16 20:01:41 +02:00
4c4ac1158b Images: more tweaks to save all modified images
Support showing warning messages before saving for cases that we can detect
in advance, to be used by quit dialog.
2019-05-16 19:58:52 +02:00
0c2add7ca3 Theme: Match new Outliner color settings with viewport. 2019-05-16 19:53:55 +02:00
3324753f15 Theme: stick bones too bright and vertex select too dark. 2019-05-16 19:53:55 +02:00
3076544c8c Fix T64725: light power property dragging uses too small increments 2019-05-16 19:17:32 +02:00
a7542b9e2b BLI_memarena: unpoison memory before freeing it 2019-05-16 18:19:14 +02:00
4878b29b49 Use edit evaluated mesh when creating mesh for object in edit mode
Makes the result of object.to_mesh() and bpy.meshes.new_from_object()
to be the same as what is visible in the viewport.

This makes Cycles to respect modifiers enabled in edit mode, and should
also easy some scripter's work. The final render still needs some work,
which, maybe, will be about forcing objects out of editing modes.
2019-05-16 18:11:47 +02:00
9f6670ca37 Cycles/Eeeve: unify film transparent setting
For existing files, it will use the setting from Cycles or Eevee depending on
the render engine in the scene.

Differential Revision: https://developer.blender.org/D4874
2019-05-16 17:40:13 +02:00
2ee762344f Cycles: Fix missing viewport updates after recent changes
We can not access ensured-to-be-evaluated dependency graph from the
render API: some of it is running from within evaluation which makes
it possible for engines to access list of evaluated IDs.

Solved by passing dependency graph to viewport functions, similar to
the final render functions.
2019-05-16 17:24:16 +02:00
aac95aa1e9 Images: move save modified images operator from Python to C
We will use this for saving images along with the .blend file.

Ref D4861
2019-05-16 16:57:38 +02:00
c1ec6f00f2 UI: Move Recover operators into own menu under File. 2019-05-16 16:56:03 +02:00
8d2c42c9bc UI: Blender and Help menu tweaks and organization.
Blender menu:
- Move Preferences to the top as it is used often.
- Introduce two new sub-menus
  - About - links from Help menu, plus link to license section in blender.org
  - Support Blender - dev fund, store, they used to be in Help menu.

Help menu:
- Add links to Tutorials and Support section in blender.org
- Add link to Developer Documentation (wiki)
- Always show Python API Reference link
2019-05-16 16:56:03 +02:00
32d5d127cb Tweak API to support adding evaluated meshes to main database
One of the usecases is to create mesh from an object is a manner similar to
how Apply Modifiers does it, and have it in the bmain so it can be referenced
by other objects.

This usecase is something what went unnoticed in the previous API changes, so
here is a followup.

Summary of changes:

* bpy.meshes.new_from_object() behaves almost the same as before this change.
  The difference now is that it now ensures all referenced data-blocks are
	original (for example, materials referenced by the mesh).

* object.to_mesh() now creates free-standing Mesh data-block which is outside
  of any bmain. The object owns it, which guarantees the memory never leaks.

  It is possible to force free memory by calling object.to_mesh_clear().

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4875
2019-05-16 16:42:16 +02:00
22a91bb0bd Cleanup: pep8 & remove odd empty string addition 2019-05-17 00:28:22 +10:00
d93a47b7bb EEVEE: Viewport Rendering TAA
EEVEE assumed that the OGL renderer did FSAA, as the FSAA was removed we
needed to revalidate this assumption. The temporal sampling only inited
the matrices during init phase. As now we need to update the matrices
for every sample rendered the code for updating the matrices was
isolated in a new function `EEVEE_temporal_sampling_update_matrices`.

Reviewed By: fclem

Maniphest Tasks: T64646

Differential Revision: https://developer.blender.org/D4871
2019-05-16 16:02:56 +02:00
3b51260387 Revert "Tests: speed up render tests by running multiple in the same process"
This makes finding the crashing tests harder, reverting until there is a
better solution.

This reverts commit 93901e7f0a.
2019-05-16 15:50:47 +02:00
bd0f26e2de Fix T64576: Duplicate option in the header
D4856 by @Gvgeo
2019-05-16 23:21:20 +10:00
9c1ec1d132 Fix: Some Sequencer panels were missing a category, causing warnings 2019-05-16 15:02:15 +02:00
deeb263463 Fix T64652: tool settings is gone from top-bar 2019-05-16 22:57:50 +10:00
db4a3f93cb Fix unintended fall-through in switch statement 2019-05-16 14:56:17 +02:00
8d8f731470 Depsgraph: Make depsgraph.update() safe for threading
This is same as view_layer.update() is doing.
2019-05-16 14:53:38 +02:00
cfac269d25 UI: tweak display of active, selected and edited items in the outliner
* Change circle to roundbox around active icons, so they don't overflow.
* Change text color to indicate selected and active state.

Differential Revision: https://developer.blender.org/D4650
2019-05-16 14:38:51 +02:00
960496f8d1 UI: Tweak naming in Sequencer View menu to match 3D View 2019-05-16 14:38:44 +02:00
e60890075b Cleanup: rename IDP_FreeProperty_ex to IDP_FreePropertyContent_ex
This was missing from rBdb5120603f.
2019-05-16 14:17:50 +02:00
a08a3d8bf0 UI: Match Sequencer Safe Areas with similar Camera Properties panel 2019-05-16 14:14:13 +02:00
db5120603f Refactor: Simplify ID Property freeing
This also makes `IDP_CopyProperty` the "opposite"
of `IDP_FreeProperty`, which is what I'd expect.

Two refactoring steps:
* rename IDP_FreeProperty to IDP_FreePropertyContent
* new IDP_FreeProperty function that actually frees the property

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4872
2019-05-16 14:11:11 +02:00
c0d743238d GPencil: New filter in Onion by keyframe type
This new filter allows to select only some type of keyframe (keyframe, breakdown, etc).

This was a request of artists that are used to work with other 2D softwares.

Also some cleanup to remove aninmatable option to some properties.
2019-05-16 14:01:48 +02:00
86eefefdc1 UI: Video Sequencer sidebar overhaul
- Use single column layout
  - Move the rather obscure Backdrop toggle into the View menu
  - Use correct units for Crop and Offset (pixels)
  - Re-organize the sidebar in 2 main groups: Adjust & Info

Adjust includes Compositing, Offset, Crop, Video, Color, Sound
Info includes strip name, path, start/end and other data

Original changes by tintwotin, with changes and adjustments on top by me
2019-05-16 13:58:04 +02:00
f4755ef695 Fix edit-mesh select crash when using face-dots
The GPUVertBuf was freed but not the GPUBatch.

Old bug exposed by new code from 8a6414ed46.
2019-05-16 21:45:24 +10:00
4cd191aa29 EEVEE: Intel Shader Compiler Bug
When using Intel GPU EEVEE did not display anything. This was due to an
internal shader compilation bug inside the intel drivers. We had fixed
this for other vertex shaders. The same change we have to apply to other
vert shaders that want to limit the need of Matrix multiplications.
2019-05-16 13:35:02 +02:00
b019d8b2fe Fix edit-mesh face-dot drawing check
Since 8a6414ed46 the old logic no longer applies.
2019-05-16 21:17:10 +10:00
469f2ec17a Cleanup: unused vars 2019-05-16 21:17:10 +10:00
a9b393c367 Fix T64678: wrong DDS normal map rendering after recent changes 2019-05-16 12:52:04 +02:00
f30921fc68 Fix T64687: Loop select work only with edges
Regression in recent commit 8a6414ed46
2019-05-16 20:29:05 +10:00
fced0f0437 Cycles: Don't advertise BVH8 being supported on 32bit platforms
The kernel does not use AVX2 vectorization, and trying to use BVH8 was
leading to an empty scenes.

Fixes T64624: Ctest : Win32 + AVX2 fails virtually all cycles tests
2019-05-16 11:51:25 +02:00
e693918d40 Dependency graph API changes
Main goal here is to make it obvious and predictable about
what is going on.

Summary of changes.

- Access to dependency graph is now only possible to a fully evaluated
  graph. This is now done via context.evaluated_depsgraph_get().

  The call will ensure both relations and datablocks are updated.

  This way we don't allow access to some known bad state of the graph,
  and also making explicit that getting update dependency graph is not
  cheap.

- Access to evaluated ID is now possible via id.evaluated_get().

  It was already possible to get evaluated ID via dependency graph,
  but that was a bit confusing why access to original is done via ID
  and to evaluated via depsgraph.

  If datablock is not covered by dependency graph it will be returned
  as-is.

- Similarly, request for original from an ID which is not evaluated
  will return ID as-is.

- Removed scene.update().

  This is very expensive to update all the view layers.

- Added depsgraph.update().

  Now when temporary changes to objects are to be done, this is to
  happen on original object and then dependency graph is to be
  updated.

- Changed object.to_mesh() to behave the following way:

   * When is used for original object modifiers are ignored.

     For meshes this acts similar to mesh-copy, not very useful but
     allows to keep code paths similar (i.e. for exporter which has
     Apply Modifiers option it's only matter choosing between original
     and evaluated object, the to_mesh() part can stay the same).

     For curves this gives a mesh which is constructed from displist
     without taking own modifiers and modifiers of bevel/taper objects
     into account.

     For metaballs this gives empty mesh.
     Polygonization of metaball is not possible from a single object.

   * When is used for evaluated object modifiers are always applied.

     In fact, no evaluation is happening, the mesh is either copied
     as-is, or constructed from current state of curve cache.

  Arguments to apply modifiers and calculate original coordinates (ORCO,
  aka undeformed coordinates) are removed. The ORCO is to be calculated
  as part of dependency graph evaluation.

File used to regression-test (a packed Python script into .blend):

{F7033464}

Patch to make addons tests to pass:

{F7033466}

NOTE: I've included changes to FBX exporter, and those are addressing
report T63689.

NOTE: All the enabled-by-default addons are to be ported still, but
first want to have agreement on this part of changes.

NOTE: Also need to work on documentation for Python API, but, again,
better be done after having agreement on this work.

Reviewers: brecht, campbellbarton, mont29

Differential Revision: https://developer.blender.org/D4834
2019-05-16 11:49:21 +02:00
b679887bd5 Depsgraph: Add queries whether ID is original/evaluated 2019-05-16 11:49:21 +02:00
f51521148f UI: use HIDE_HEADER for active tool in properties editor
Unfortunately this isn't yet compatible with category tabs,
define a duplicate panel only for the properties editor.
2019-05-16 19:46:07 +10:00
59b7f3a164 Fix T64660: no access to node connectors when a node is inside a layout frame.
Note that the same issue actually showed without a frame node, when
trying to click-drag on a socket on its 'inside node' part, you would get
same behavior.

Only solution I can see here is to prevent Node selection to go on when
user clicks on one of its sockets, there is no way afaik to make
drag-from-socket to start if we keep select-node operator running
modal, since both operators (NODE_OT_select and NODE_OT_link) use the
same shortcut, if select (which is checked first, being a Tool) returns
modal, then event is considered handled it seems, even though
Passthrough is also returned...
2019-05-16 11:13:09 +02:00
b05038fef7 RNA: new FCurve.is_empty property that exposes the new empty curve check. 2019-05-16 12:02:26 +03:00
c419f33dd2 GHOST: add header to display manager
Was relying on the header recently removed from GHOST_Rect.h,
for some reason only some systems give issues here.
2019-05-16 18:27:30 +10:00
da37b8c245 Minor change to last commit
Don't show a background for the toolbar.
2019-05-16 18:20:45 +10:00
0e667723d4 UI: Draw background for headerless panels with region-overlap
These were drawing without a backdrop.
2019-05-16 18:07:38 +10:00
6519982876 Fix T64681: evaluate curves with generative modifiers and no keys.
Introduce a new function and use it everywhere, including
automatic curve deletion checks to guarantee consistency.
2019-05-16 09:48:46 +03:00
e097845a6f Cleanup: redundant headers mixed in with code 2019-05-16 14:54:23 +10:00
62ac2fddf7 Fix T64642: Reset to default preferences glitch 2019-05-16 14:43:51 +10:00
74ddf3bd0d Cleanup: use doxy sections for object_add.c 2019-05-16 14:13:51 +10:00
4ba7d4ca9d Cleanup: remove unused identifiers 2019-05-16 13:54:32 +10:00
2896ce7bc7 Fix using non-euler cursor orientation
Missed in 06fe2a5e0c
2019-05-16 13:50:00 +10:00
c9c23a3e44 RNA: add 3D cursor matrix attribute
Avoids having to check rotation modes to get the orientation.
2019-05-16 13:50:00 +10:00
f2144cf298 Fix T64651, T64658: image texture not set to non-color properly
The version check was wrong, only working for older files.
2019-05-16 05:19:35 +02:00
4a766732e6 Fix unreported: Presselection cycle not working in multiple meshes editing. 2019-05-15 23:19:59 -03:00
68c12c80e5 Theme: add color difference for every other row
D4862 by @CandleComet with minor edits.
2019-05-16 12:05:17 +10:00
2384564149 Cleanup: remove 2.4x panel tabs
This makes the code confusing since we now have two other kinds of tabs
(navigation bar and panel categories).
2019-05-16 11:12:41 +10:00
870fc29068 Cleanup: panel layout logic
Workspace was being assigned in a loop, make some vars const.
2019-05-16 10:48:17 +10:00
02a7e57d9c Cleanup: sort DNA renaming defines 2019-05-16 09:47:00 +10:00
e8ed78c884 ClangFormat: remove FAKE_SELECT_MODE_BEGIN from ForEachMacros
This isn't used for looping.
2019-05-16 09:40:15 +10:00
8a6414ed46 Fix T54686: objects don't occlude each other for edit-mesh select 2019-05-16 09:36:15 +10:00
989d854385 Theme: Match edit mode in viewport and uv/image editor.
Also make the grid brighter as it can conflict with mesh wires in wireframe mode.
2019-05-15 23:16:16 +02:00
3b58bf3c7e Theme: Blender Light update
* Align category icons and color use with Default theme.
* Set colors for new properties and regions.
* Fix several issues.

Needs further testing to tackle all editors but this puts it at much more
usable level compared to how it was.
2019-05-15 23:08:31 +02:00
40a69b2ad7 Animation: treat F-Curves with no keys as if muted/not existing.
When normally editing curves, deleting the last keyframe also
deletes the curve. Thus if for some reason it didn't happen,
e.g. maybe due to removing keys directly via Python, skip the
bad curve instead of resetting the channel to zero.
2019-05-15 22:35:15 +03:00
198c00f4ed Armature Constraint: don't calculate the unneeded ct->matrix for solve.
This constraint requires full bone data to evaluate, so it can't
use the generic single target matrix system. Calculating it is
thus useless waste of CPU time.
2019-05-15 22:35:14 +03:00
f9784ea6af Py NodeShader wrapper helper: add support for new Alpha setting of Principled BSDF.
Now that we have real alpha in BSDF, it's much better option for
transparency, than previously used Transmission value.

Related to T64609.
2019-05-15 20:59:58 +02:00
9baf669493 Fix T64649: Deprecated Annotation editing causes a crash
The Edit option was removed from annotations and the buttons must not be in the panel.
2019-05-15 20:26:26 +02:00
fe8f0758c6 GPencil: Invert Fade Object slider
The Fade Objects and Fade Layers parameters had opposite meaning and this was not correct.

Now, both parameters work in the same direction.
2019-05-15 19:31:03 +02:00
1185031cfb Theme: don't use red as hue for shading icons.
It can be confused with an error or something wrong in the UI.
2019-05-15 19:12:27 +02:00
2b8fba0c26 Theme: Darker grid. 2019-05-15 19:12:27 +02:00
5827a47280 Theme: match outliner/properties colors with modes in viewport.
Helps to:
* Make a connection between what we see in Outliner, Viewport and Properties editor
  (clicking on the obdata icon takes us to Edit mode, which shares colors).
* Quickly tell which mode we are in.
* Armatures have now distinct color when in Object, Edit, and Pose modes.

Missing is Pose mode which is currently cyan in the viewport and obdata category in properties,
it would probably need its own special category though as it doesn't match the others.
2019-05-15 19:12:27 +02:00
06fe2a5e0c Objects: new 3D cursor alignment option when adding objects
The choices are now World, View and 3D Cursor.

This breaks Python API compatibility, add-ons that add objects with this
parameter will need to be updated.

Differential Revision: https://developer.blender.org/D4706
2019-05-15 18:10:58 +02:00
ddae9c9232 Fix T64634: Incorrect type casting in versioning code 2019-05-15 17:39:07 +02:00
9c5bec0292 space_file: fix build error with msvc.
Both windows.h and wm_types.h define HKEY, moving wm_types after windows.h
sidesteps the issue, since HKEY isn't used in fsmenu.c it doesn't cause
problems.
2019-05-15 09:13:07 -06:00
39403c1e71 Fix missing separator before Save System Info with Developer Extras on 2019-05-15 16:42:31 +02:00
6dceafbde3 Fix T63748: Long startups after network drives are disconnected.
We need to make those paths validation async, since some infamous OS is
unable to provide a quick way to check whether a path is valid or not...

Not much to say here, this is basic wmJob stuff really... We don’t even
need complex threaded coordination locks or atomics, given how simple
the changes are here.

Fake-tested with some `sleep()` calls to add atificial delay, seems to
work as expected.
2019-05-15 16:26:47 +02:00
e39737f166 UI: make sidebars in 3D view and other editors a little wider and consistent 2019-05-15 16:17:23 +02:00
4124aeee5c Lights: reduce default strength of sun light to 1.0 2019-05-15 16:09:50 +02:00
Tim Stullich
5ba1a6bee0 Lights: change sun light size to be specified as angle
This is the angular diameter as seen from earth, which is between 0.526° and
0.545° in reality. Sharing the size with other light types did not make much
sense and meant the unit was unclear.

Differential Revision: https://developer.blender.org/D4819
2019-05-15 16:07:50 +02:00
2497ee31ec Fix T64650: missing topbar update when changing brush in sculpt mode 2019-05-15 15:22:17 +02:00
630b08c960 UI: remove splash from help menu
Already accessible in the app-menu.
2019-05-15 21:52:58 +10:00
64acb70e7f Remove ability to delete data from the File Browser
This removes the ability to hit X or Del to delete data from inside the File Browser.

This was extremely dangerous because it didn't use the system trash/recycle bin. This made it a very dangerous operation with no way to get data back.

Later on, we should add support for the OS trash through native API's, but until then we will remove this feature from the keymaps.

This addresses T61412 and T64104
2019-05-15 13:46:24 +02:00
Dalai Felinto
70d67de5e5 Fix icon for outliner temporarily hide 2019-05-15 08:18:15 -03:00
Dalai Felinto
5c8df0a742 Fix default open outliner restrict columns
Regression introduced on 777a546c0c.
2019-05-15 08:18:15 -03:00
4965af1b7a UI: add 'App' menu besides the 'File' menu
This uses the Blender icon that previously activated the splash.

Menu items which apply to the application are located here:
startup file, app templates & preferences.
2019-05-15 21:16:28 +10:00
0819013eb4 Eevee: Add per material option to cull backfaces
This is in order to have more flexibility and to have an explicit option
for final renders.
2019-05-15 12:03:49 +02:00
cf1a945e5a Preferences: Default ViewportAA
Due to recent changes the default aa samples in the viewport was set to
16, but should have been 8. This is due to how the old viewport quality
setting was interpreted by the workbench engine. This patch will respect
the same way to version the viewport quality to viewport_aa as the
workbench used to do this.
2019-05-15 11:51:20 +02:00
6f9819e5fd UI: move preferences save options into submenu
Avoid clutter in the UI by moving save/revert options into submenu,
only show the save button when auto-save is disabled.
2019-05-15 18:41:45 +10:00
c2568394dd Fix T57203: Rotation overlaps scale gizmo handles 2019-05-15 16:33:29 +10:00
a9d8474fda Gizmo: add depth bias for 3D selection
This allows some gizmos priority over others even when they're behind.
2019-05-15 16:29:16 +10:00
5005210f40 GPU: Add a matrix unproject function that takes an inverted matrix
This is normally already calculated so add a version that takes the
inverted matrix.
2019-05-15 14:16:35 +10:00
d09289ff7a Cleanup: de-duplicate active tool panel 2019-05-15 12:20:13 +10:00
6eacb626e0 Fix top-bar showing paint popover panels
Regression from 6b082278d1 when panels were moved into the 3D view.
2019-05-15 11:42:47 +10:00
2564f2c1b3 Fix T64604: Changing keymap doesn't tag preferences as dirty 2019-05-15 10:44:43 +10:00
72e484e88f Fix preference dirty tagging for addons & keymaps 2019-05-15 09:47:07 +10:00
Dalai Felinto
a63be6c6c7 Fix T64467: Outliner Rename drawing overlapping restriction column + checkbox
For anyone interesting on polishing pixels, this is still one of the few
places in Blender where when renaming the name "jumps" a tiny bit when
editing. Most of the other places (id rename, UI list rename, ...) have
the text drawing in the exact same place while editing it and drawing.
2019-05-14 20:07:22 -03:00
4e46ed37fc Fix T64618: Cycles crash with point density texture on Windows
A better solution would be to not use the callback mechanism anymore for
cases like this where the dependency graph will free volume data, but
that would be a bigger refactor.
2019-05-15 00:59:31 +02:00
c29ed65f03 UI: adjust preferences save/revert button layout
Also add description for factory preferences.
2019-05-15 08:57:44 +10:00
7f8f362e01 Tool System: avoid redundant refresh
Workspaces refreshes tools multiple times when used by multiple windows.

Also improve comments.
2019-05-15 08:48:20 +10:00
ded8f5cc19 Cleanup: use doxy sections for workspace
Also move function in wrong category.
2019-05-15 08:48:20 +10:00
Dalai Felinto
32c7da1e37 Outliner Tooltips Cleanup: Retrict/Allow > Restrict ; set/unset > set 2019-05-14 19:36:55 -03:00
Dalai Felinto
41858a7311 T64020: Outliner - implement Shift + Click for objects as well 2019-05-14 19:36:55 -03:00
b20cefdab3 Fix T64623: Freestyle procedural noise not consistent across platforms
Use the Blender RNG instead of rand() to solve it.
2019-05-14 23:45:14 +02:00
Dalai Felinto
f4902fa268 Code style cleanup: make format 2019-05-14 18:11:54 -03:00
Dalai Felinto
777a546c0c Outliner Restriction: Naming sanitization and icon
No major API change here, only in the outliner restriction column
variables (e.g., show_restrict_column_selectable > show_restrict_column_select).

* Get rid of _INSTANCE (introduced on b1af682001).
* Differentiate (everywhere but the API) between HIDE (temporary) and VIEWPORT (global).
* Use the expected icon for restrict viewport (same as objects and modifiers).
* selectable > select
2019-05-14 18:10:25 -03:00
Dalai Felinto
903041e1c0 Outliner restriction filter: Unify order
The popup menu was a different order than the drawing in the outliner.
2019-05-14 17:51:08 -03:00
Dalai Felinto
9b80318a28 T64607: Outliner UI Tooltips
In the outliner we don't have yet a clear distinction for the users of when
to use each of the visibility settings.

This changes that by properly naming the property and their tooltips.
I'm also unifying the naming between the rna properties and the outliner
for collections and objects (e.g., so collection and object hide_select
have the same tooltips everywhere).

The API did not change.
2019-05-14 17:51:08 -03:00
913db2e8a4 Fix T64611: Bone Size property is not copied when a bone is copied 2019-05-14 22:44:55 +02:00
08a79fc88b Depsgraph: dependency on B-Bone start handle end roll when inheriting it.
Specifically the dependency is on any drivers that may be affecting
the RNA property of the handle bone, which currently link to segments.
2019-05-14 22:26:49 +03:00
26d2652d6d Armature: implement universal hash table lookup of Bone objects by name.
Since drivers on Bone properties are really supposed to be stored
in Armature data and access bones via its bones[] collection, this
lookup path should work efficiently.

Mass lookup of bones by name was already done through hashes,
but they were built temporarily every time that was needed. This
simply replaces it with a common hash table computed immediately
after file load, copy, or Edit to Object mode switch.
2019-05-14 21:56:57 +03:00
987c6da6c0 Eevee: Fix volumetric shaders compilation error 2019-05-14 19:59:07 +02:00
2f6c4e5bb4 Fix T64455 Texture extension mode 'clip' defaults to 'extend' 2019-05-14 19:59:07 +02:00
eefd68013c Cleanup: isolate image dirty flag access in functions 2019-05-14 18:00:06 +02:00
0ab7e78b85 Fix T64514: wrong grease pencil icon preview renders
This broken when the new Cycles/Eevee preview scene was added, make it work
the same as before for Grease Pencil now.
2019-05-14 18:00:06 +02:00
70f3ff808a GPencil: Rename property Follow Drawing Path to Alignment
The old name was not clear and with new options the new name is more easy to understand.
2019-05-14 17:28:42 +02:00
0d2e708ea4 Fix T60984: Can't perform viewport navigation with left mouse button and active manipulator
This was fixed for active tool gizmos but not viewport gizmos.

Note that this applies only to the Industry Compatible keymap, which is where this issue manifested itself.
2019-05-14 17:24:16 +02:00
e9b282617a Fix T64551 Crash on leaving local view on the shading tab
Was causing by garbage collection free the surf_per_mat_tris array.
The cache validate did not take care of ensuring the array was alloc again.
2019-05-14 17:15:48 +02:00
8437519d02 Fix Shader compilation error on MacOS & some other platform/driver
texture2D() is no longer supported by modern opengl, use texture() instead.
2019-05-14 16:43:37 +02:00
3db428406f Fix T64601 Error division by zero in GPUVertexFormat
The windows compiler use signed int by default for enums so that broke
the bit count I carefully did. Forcing uint fixes it.
2019-05-14 16:31:09 +02:00
af088c2640 Fix T63994: Node Editor: Move All Selected Nodes when dragging.
Left-click select broke that behavior, since it puts both action and
select buttons on the same physical mouse button...

To support this behavior again, we have to split selection process in
two steps, hence make it modal... While I remain rather skeptical about
that global design decision, and complexity it adds to many UI/UX areas,
this solution ends up being OK-ish I think.

Thanks to @brecht for some final tweaks on the patch.
2019-05-14 15:56:17 +02:00
c66a7822ce Interface: Free argument callback for popups
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4858
2019-05-14 15:39:51 +02:00
ffb7993690 UI: Improve naming for Collections Enable/Disable
- Fix 'ddisable' typo
  - Use clearer names for the operators in the Collections context menu

Instead of Set Exclude / Clear Exclude, we now use Enable in View Layer / Disable from View Layer
2019-05-14 15:13:10 +02:00
f0c8afcd5c Fix T64567: Rename Viewport to Viewport Render 2019-05-14 15:08:14 +02:00
b63ffa8919 Fix Cycles build error after recent changes
We need to do aligned alloc of the services instead of globals now since the
concurrent map moved there.
2019-05-14 15:06:23 +02:00
0dd5281ab2 GPU: Windows+Intel Selection Fix
On Windows 10 with a post Februari 2019 Intel driver, the box selection
is not working. It only detects the object centers, but not the drawn
triangles of the basic engine.

Reviewed By: fclem

Maniphest Tasks: T62947

Differential Revision: https://developer.blender.org/D4857
2019-05-14 14:55:12 +02:00
687385b963 UI: Confirm dialog when closing an unsaved file
The complexity in this patch comes from the fact
that the current operator system does not support
multi-step user interactions well.

More specifically, for this to work, we need to show
a confirm dialog and a file browser afterwards.
We decided that it is easier to keep everything in
a single operator, instead of creating separate
operators that invoke each other.

So, now the `WM_OT_open_mainfile` operator invokes
itself in different states. It implements a simple
finite state machine to manage the states.

The dialog itself is expected to be improved in
a future commit. See D4829 for more details.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4829
2019-05-14 14:21:17 +02:00
37f87ae81b Fix zfighting from edit mode face overlays 2019-05-14 14:13:00 +02:00
9bb42de828 Fix T64574 : Weird shadow mesh glitches in viewport
This is not the most clean but this is what is needed to make
point_object_to_ndc equivalent to
point_object_to_world + point_world_to_ndc
2019-05-14 14:07:08 +02:00
8950aa2615 Fix T64574 : Weird shadow mesh glitches in viewport
This is not the most clean but this is what is needed to make
point_object_to_ndc equivalent to
point_object_to_world + point_world_to_ndc
2019-05-14 13:57:41 +02:00
bf45a46f81 GPU: Fixup and add assert to GPU_VERT_ATTR_NAMES_BUF_LEN 2019-05-14 13:54:05 +02:00
6bb7eb1706 Eevee: Fix Auto Tangent not working if active UV layer is greater than 3 2019-05-14 12:39:18 +02:00
6c76975df5 Fix T64592: Assign Shortcut does not autosave preferences 2019-05-14 12:29:38 +02:00
b4909632b0 Fix T63542: Imported FBX doesn't show keyframes in Shape Key editor.
While shapekeys RNA path handling does support keyblocks (ShapeKeys)
with an `id_data` wrongly set to the geometry instead of the shapkey,
this is really not something to promote. ideally it should be removed at
some point. At least, let's not generate such RNA pointer if we can
avoid it.

Here it was breaking proper showing of animated shapekeys in the UI,
since this expects animated datablocks to have their own animation data
(and 'rooting' keyblocks to their mesh instead of their shapekey ended
up defining their animation in the mesh, not in the shapekey).
2019-05-14 12:28:17 +02:00
b50cf33d91 Fix T64515, T60434: crash in OSL and preview render after recent changes
The refactoring of texture handles did not take into account that render
services are shared between multiple render session. Now the texture
to handle map is also shared between render sessions.
2019-05-14 12:24:15 +02:00
9fecac32d9 Screen: replace show footer operator with property
This matches 'show header' internal logic.
2019-05-14 20:21:27 +10:00
4887b771f9 Cleanup: sort struct declarations 2019-05-14 20:21:22 +10:00
6a4c5b67ec Cleanup: quiet warning 2019-05-14 20:21:22 +10:00
254b1a4294 Fix T64441: GPencil textures weird rotation
New option to disable the follow drawing path. Before it had only a switch property, now there is a list of options.

Modes:

Path: Follows drawing stroke and rotate with object.
Object: Only follows object rotation.
None: Don't rotate.
2019-05-14 11:59:19 +02:00
21bfc469ab Cleanup: rename ED_scrubbing.h to ED_time_scrub_ui.h
Also renames the corresponding .c file.
2019-05-14 11:49:15 +02:00
1c106e189a RNA: fix the id_data pointer of PoseBone.bone to point at the Armature.
The owning ID reference of RNA pointers is supposed to point at the
ID container that owns the object, but for PoseBone.bone it wasn't
updated to point at the Armature data ID instead of Armature Object.

This caused issues, like pose_bone.bone.driver_add() adding the
driver to the Armature Object animation data, which violates the
intended design of the animation data structures.

Since RNA code generally assumes that all pointers that don't
refer directly to an ID remain within the current ID, a custom
getter is required to fix this.
2019-05-14 12:39:36 +03:00
02e3bf22ab Depsgraph: detect bbone_segments drivers from Object animation data. 2019-05-14 12:39:36 +03:00
be967c0b3c Fix T64578: Cycles clamps HDR colors for 16bit integer image with colorspace 2019-05-14 11:22:07 +02:00
20421ef952 Cleanup: DRW: Move ModelMatrix declaration to common_view_lib 2019-05-14 10:57:04 +02:00
016fc7f0c2 GPUVertexFormat: Reduce size of structs
With this patch, the size of GPUVertFormat goes from 1240 to 388.
2019-05-14 10:57:04 +02:00
72a5e3f61a Cleanup: DRW: Add and use DRW_shgroup_uniform_vec2_copy 2019-05-14 10:57:04 +02:00
92b4e96afe Cleanup: DRW: Remove unused Uniform types 2019-05-14 10:57:04 +02:00
be5192bbb9 Cleanup: DRW: Remove uneeded _add suffix from DRW_shgroup_call_add 2019-05-14 10:57:03 +02:00
8bc8a62c57 DRW: Refactor: Use DRWCall to accumulate per instance attributes
This is a big change that cleanup a lot of confusing code.
- The instancing/batching data buffer distribution in draw_instance_data.c.
- The selection & drawing code in draw_manager_exec.c
- Prety much every non-meshes object drawing (object_mode.c).

Most of the changes are just renaming but there still a chance a typo might
have sneek through.

The Batching/Instancing Shading groups are replace by DRWCallBuffers. This
is cleaner and conceptually more in line with what a DRWShadingGroup should
be.

There is still some little confusion in draw_common.c where some function
takes shgroup as input and some don't.
2019-05-14 10:57:03 +02:00
20d9cd3a1f GPU: Add GPU_vertbuf_discard and GPU_BATCH_UNUSED
GPU_vertbuf_discard to clear buffer containers in place.
GPU_BATCH_UNUSED to tag batch that are cleared and not immediatly usable.
2019-05-14 10:57:03 +02:00
e5349f14eb BLI_memblock: Add more options
- Use int instead of uint for safety and less conversions.
- Add free callback
- Add cleared alloc option
2019-05-14 10:57:03 +02:00
0e5da91f0a Cleanup: Remove DRWCallType
This simplify the rendering logic.
2019-05-14 10:57:03 +02:00
ed3f05aca9 DRW: Fix threading hazard when rendering and using auto depth 2019-05-14 10:57:03 +02:00
e0420097e3 Cleanup: DRW: Remove unused functions 2019-05-14 10:57:03 +02:00
754ecd61aa DRW: Change Procedural function to use a GPUBatch
This is in order to have VAO handled by thoses batches instead of using a
common VAO. Even if the VAO has no importance in these case using a batch
will help when transitioning to Vulkan.
2019-05-14 10:57:03 +02:00
8406fabc87 Eevee: Replace DRW_shgroup_empty_tri_batch_create by procedural calls 2019-05-14 10:57:03 +02:00
201ebc78e8 Mesh Batch Cache: Fix use of uninitialized variable 2019-05-14 10:57:03 +02:00
b27492d078 DRW: Make Instance count not a pointer
Goal is still to simplify the draw manager.
2019-05-14 10:57:03 +02:00
cf8109d2aa Cleanup: Eevee: Make planar downsampling not use instance drawing 2019-05-14 10:57:03 +02:00
ad0e95688d Cleanup: DRW: Remove pointers to materials 2019-05-14 10:57:03 +02:00
2d28df783a GPU: Move Material index to nodetree evaluation
This removes the need to pass the Material* all over the place in the draw
manager. Cleanup comming right after.
2019-05-14 10:57:03 +02:00
642c8010b2 DRW: Remove ModelViewMatrix and ModelViewMatrixInverse 2019-05-14 10:57:03 +02:00
b13e0568d3 GPU: Remove ModelViewMatrix and ModelViewMatrixInverse usage 2019-05-14 10:57:03 +02:00
49a7031caa Fix T64588: some new theme preferences not saving 2019-05-14 10:42:53 +02:00
153c144053 Fix T64339: Crash with UV sculpt after undo 2019-05-14 17:05:02 +10:00
1f891bbc2c Keymap: add option for tilde key preference
Since the view menu is redundant for people with a numpad,
add a preference for it to switch between gizmos instead.
2019-05-14 15:19:50 +10:00
9c9081d9ef Preferences: file menu item to temporarily load factory settings
It's common to load factory settings as a test without wanting to
overwrite your own settings on exit.
2019-05-14 12:37:07 +10:00
34da7f8fdd Preferences: set dirty flag when dragging 2019-05-14 11:15:38 +10:00
8fe5a28635 Fix property update setting dirty flag 2019-05-14 11:12:02 +10:00
a5b5bd2c24 Fix missing preference dirty tagging
Tagging dirty was failing for UI scale, line width, hinting & others.

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

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

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

Fixes T64091

Reviewers: brecht

Maniphest Tasks: T64091

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

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

Reviewers: campbellbarton, brecht, mont29

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4850
2019-05-13 15:06:50 +02:00
f49feccaa3 Preferences: set dirty when editing quick favourites menu 2019-05-13 22:28:43 +10:00
86650b01d8 UI: Don't display markers in driver editor 2019-05-13 11:55:53 +02:00
44fc8aa221 Fix T64403: crash sampling coloring in texture paint mode 2019-05-13 11:50:21 +02:00
5cd6ffad09 Fix T64041: Vertex Sharp not working.
Broken in rB0ac3d5f7db67 last year...
2019-05-13 11:49:58 +02:00
b5ae049013 UI: rename Load Preferences to Revert 2019-05-13 19:48:42 +10:00
76bf9b766c Fix T64120: Dynamic Paint Doesn't Recalculate Normals with Smooth Shading.
For wome reason, tag to mark normals as needing recompute was commented
out instead of updated to new system, during conversion of DynaPaint
code for 2.8 new evaluation stack... Trivial fix.
2019-05-13 11:38:35 +02:00
9361fea99f RNA: disable undo on OperatorProperties and its subclasses.
Since these are temporary properties, changing them shouldn't cause
undo pushes. There already is a flag to disable that, but since each
operator inherits its own properties from the base, RNA define code
also had to be changed to allow inheriting the flag.
2019-05-13 12:36:54 +03:00
8cdf76fad9 Fix unintended autosaving of preferences in a few cases
* Dirty flag was not cleared on load
* Navigating tabs should not cause save
* Background mode should not autosave (for e.g. render farms and tests)
2019-05-13 10:57:05 +02:00
d2efdaa26c Python API: expose preferences.is_dirty 2019-05-13 10:57:00 +02:00
8cb1de83fc cleanup: typo in comment 2019-05-13 10:14:41 +02:00
422be98c47 Fix T64427: WITH_HEADLESS build option 2019-05-13 17:42:21 +10:00
e61531cb0e Fix T64461: Sub-panels allow pinning 2019-05-13 16:53:40 +10:00
deb5884744 UI: disable decorators for workspace buttons 2019-05-13 16:45:30 +10:00
741f29d499 Preferences: auto-save on exit
Save modified preferences on exit by default,
with the option to disable this.
2019-05-13 16:29:35 +10:00
3d923f3eaf Preferences: tag as dirty for add-ons & loading factory startup 2019-05-13 15:51:49 +10:00
49550d9dd7 UI: add load preferences operators to header
Recent changes only included them in the side-bar.
2019-05-13 13:49:40 +10:00
a279bbbee5 Preferences: support loading factory preferences
Previously it was only possible to load factory startup & preferences.
2019-05-13 13:25:51 +10:00
ac94c219ae Prefernces: support loading last saved preferences 2019-05-13 12:46:15 +10:00
d7eed63b6d readfile: support preferences without loading data-blocks
Needed to support reading preferences without replacing blend file data.
2019-05-13 12:36:14 +10:00
05f1451d72 Fix T64371
Variable stripe_offs used without been initialized

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D4845
2019-05-12 15:25:30 -07:00
eff273c0bc Fix T64463: Visual Artifacts with ColorRamp
This patch fixes an issue with the ColorRamp overflowing its drawing bounds

Differential Revision: https://developer.blender.org/D4843

Reviewed by Brecht Van Lommel
2019-05-12 15:21:43 -07:00
6d89693222 Industry Compat keymap: Fix gizmos overriding view manipulation
Previously, if the cursor was over a gizmo, you could not manipulate the view using Alt-key view manipulation

This addresses T60984 for this keymap
2019-05-12 22:50:44 +02:00
e2b60f858e UI: Reinstate icons in the Physics Properties
These were removed at a time when there were no modifier icons.
2019-05-12 19:57:56 +02:00
8c5585221d Industry Compat keymap: Add support for Grease Pencil Draw mode
- Fix Alt-key navigation (was conflicting with Alt-click to set straight lines)
  - Use consistent shortcuts for brush strength and size
  - Use direct shortcuts for switching tools
2019-05-12 19:22:11 +02:00
643d4b79d5 Industry Compat keymap: Fix midpoint snapping with the Knife tool
There was an issue blocking the the Add Cut step while holding Ctrl
2019-05-12 18:19:38 +02:00
ebc44aae98 Python API: expose more keyframing flags for use in keyframe_insert.
Expose REPLACE and CYCLE_AWARE, and add AVAILABLE for completeness.
These flags are generic and safe to use, and necessary to match
the behavior of certain UI options.
2019-05-11 21:20:21 +03:00
83d35c25d0 UI: Nudge Curve Editor Away from Scrollbar
This patch increases left and right padding of the Curve Editor to avoid scrollbars

Reviewed by Brecht Van Lommel
2019-05-11 11:05:40 -07:00
0e09075e39 Fix T59627: missing COW update tags when joining armatures.
Objects that had constraints or drivers referring to the
joined armatures weren't tagged, and thus evaluated copies
ended up with old bad pointers.
2019-05-11 17:57:08 +03:00
Dalai Felinto
5f84e2d732 Revert API change (hide_viewport > hide_instance)
The change was introduced on b1af682001.

We may still change the name functionality of this anyways -  we are
not really changing only the instancing visibility here at the moment.

So there is no reason to break the API in the meantime.
And in the future we can simply add a new API entry, leaving the old one
to be slowly deprecated.
2019-05-11 11:32:51 -03:00
741e8cc118 Fix (unreported) annoying UI assert for expanded enums.
All buttons will get their own block's `func` by default, this cannot be
considered an error, do not assert in that case either.

Fixes bunch of very annoying asserts e.g. when using FBX exporter...
2019-05-11 15:45:47 +02:00
f28b4c304c DRW: Fix previous commit
PS: I hate my life
2019-05-11 13:16:57 +02:00
3cac530ba6 Fix T64464 App crashes when navigating between UV Editor and Viewport 2019-05-11 13:10:43 +02:00
afe73631a4 Preferences: disable save-on exit until there is a revert button 2019-05-11 21:03:28 +10:00
1ee77eb7f8 Fix error in recent is_dirty preferences flag
Error in b95b6b7966 caused crash changing themes.

Resolves T64444
2019-05-11 19:22:26 +10:00
46f5005c0d GPencil: Apply FBO changes to AA macros
Apply same change done to fix the task T64373
2019-05-11 08:35:03 +02:00
Dalai Felinto
b1af682001 Outliner Visibility Update
See T61578 for discussions and mockups.

Visibility Options
==================
We are adding more granular control over restriction columns in the outliner,
exposing "indirect only" and "holdout" as options, and change the way
users enable/disable collections in a viewlayer.

We also rename the object viewport restriction to hide instance.

So the options we have are:

Collection
----------
* Render Visibility
* Instance Visibility
* Selectable

(View) Layer Collection
-----------------------
* Enable
* Holdout
* Indirect Only
* Viewport

Shortcuts
=========
Isolate Collection
------------------
* Ctr + click isolates the collection.
It turns all its parents and children "visible", and all the other
collections "invisible".

If ALL the collections were already properly set, we re-set the
collections to their default value.

Set Collection Inside Collections and Objects
---------------------------------------------
* Shift + click: Set/unset inside collections and objects.

We only set objects values as well when we are in View Layer mode and
(obviously) when the objects have a matching property.

Icons
=====
Little reminder that we will need better icons for holdout, indirect only, and
probably instanced (nothing wrong with the current, but it differs from
the proposal when it is turned off).

Also, we need to decide where do we want the modifier/bones/... icons to
be (in which column) and ideally make sure their icons match the ones we
use for collections/objects.

At the moment those are using the screen icon, which is not being used
by collections.

Reviewers: brecht, billrey
Subscribers: pablovazquez
Differential Revision: https://developer.blender.org/D4823
2019-05-10 19:48:33 -03:00
de9d846353 Fix T64137 Empty Images flickering graphics when "Auto Depth" is enabled
Also fix T64373 Grid intensity increases in Ortographic when use Circle
Select in GPencil Edit mode
2019-05-11 00:21:35 +02:00
93901e7f0a Tests: speed up render tests by running multiple in the same process
Blender startup time and shader compilation is a big factor when running
hundreds of tests, so now all renders in the same ctest run in the same
process. If a test crashes, the remaining tests in the same category will
be marked as skipped.

Benchmarked on a quad core with ctest -j8.

cycles: 118.1s -> 94.3s
eevee: 66.2s -> 29.2s
workbench: 31.7s -> 8.6s
2019-05-11 00:12:05 +02:00
79b9596c66 Tests: fix eevee and workbench using Cycles in a few tests 2019-05-10 23:45:51 +02:00
30887fc387 Cycles: add function to clear resumable chunk 2019-05-10 23:45:51 +02:00
8096f36796 Audaspace: porting changes from upstream.
- Silence now has an optional sample rate parameter.
- Fix: wrong length reported by modulator and superpose.
- Minor formatting, include and documentation fixes.
2019-05-10 23:01:04 +02:00
243fbf1c4b Tests: Be more explicit about the required location of the tests folder. 2019-05-10 14:19:29 -06:00
414ed446da Cleanup: Use const qualifier for curve utilities 2019-05-10 17:35:09 +02:00
df42994652 Cleanup: Remove unused functions 2019-05-10 17:30:33 +02:00
93aecd2b81 Cleanup: Remove old deprecated DerivedMesh functions
Were ifdef-ed for a long time.
2019-05-10 17:30:33 +02:00
7bf1eca495 Fix T64338: make snap menu in 2.7x keymap use regular instead of pie menu
Differential Revision: https://developer.blender.org/D4835
2019-05-10 17:25:05 +02:00
Alessio Monti di Sopra
e7e14934f8 UI: allow to cancel editing of vector widgets with escape and RMB
Differential Revision: https://developer.blender.org/D4838
2019-05-10 17:21:46 +02:00
George Vogiatzis
1813b26bbc Fix T64434: error with save system info after recent changes
Differential Revision: https://developer.blender.org/D4839
2019-05-10 17:16:29 +02:00
7a3833ed23 Fix T64399 Crash when trying to enter edit mode on instanced objects 2019-05-10 16:51:19 +02:00
1456b41306 Fix T64420 Weight Paint colours not visible 2019-05-10 15:03:18 +02:00
c0b8d071a7 Fix T64284 Mirrored Instances have flipped normals/face orientation
It was a missing invert matrix update and also setting the OB_NEG_SCALE.

This defeats the purpose of not computing it in the draw manager but this
is more local and is have not a dramatic impact on performance.
2019-05-10 14:48:33 +02:00
259ebdd017 Fix failing tests when Cycles is enabled
The --env-system-scripts hack does not work with it, it can't find the cycles
Python module then when importing add-ons.
2019-05-10 13:29:43 +02:00
632e0725d2 Overlays: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
2019-05-10 12:25:16 +02:00
6006f86e07 Workbench: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
2019-05-10 12:25:12 +02:00
7f87e6e18f GPencil: Use common_view_lib.glsl 2019-05-10 12:14:41 +02:00
0d8ab0eac6 DRW: Remove ModelViewMatrix Usage 2019-05-10 12:14:41 +02:00
a298dde5d7 Eevee: Update matrices operations to not use combined matrices 2019-05-10 12:14:41 +02:00
fdddea676d Cleanup: DRW: Renaming of glsl utility macros 2019-05-10 12:14:41 +02:00
196dbc0f31 Add ability to create a keyboard shortcut for more mode settings.
This adds the ability to assign shortcuts to boolean settings and enums
via the right click menu.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4808
2019-05-10 11:55:52 +02:00
4d6919bdda Cleanup: split setup_app_data into two functions
Allows for skipping either preferences or data-blocks.
Previously setup_app_data was used for both.
2019-05-10 18:46:13 +10:00
688e3fed4c Preferences: write preferences on exit
This avoids the issue where user added shortcuts or quick favourites
are lost on exit.
2019-05-10 18:29:58 +10:00
b95b6b7966 Preferences: add is_dirty member
Tag preferences as dirty when changed (prepare for adding auto-save).
2019-05-10 18:27:02 +10:00
b607d16292 Cleanup: move preference saving logic into blendfile.c 2019-05-10 18:27:02 +10:00
44ecea1ccb Fix T64304: Objects in appended scene from 2.79 file disappear after saving.
Versionning code generating collections from old 2.79 scene layers was
setting new collections' library from scene, but it also needs to
properly set the `LIB_TAG_INDIRECT` tag, otherwise localizing code does
not know what to do, and most of append process fails.
2019-05-10 10:09:23 +02:00
6b082278d1 UI: expose tool settings in the 3D view side-bar
Internally tool settings have been moved to the 3D view.
Added the ability for to draw panels from another space/region
so they can be mirrored in the properties editor.
2019-05-10 13:48:25 +10:00
a287153ee4 Cleanup: use more explicit check for buttons context 2019-05-10 12:51:04 +10:00
427c75e4c2 Cleanup: avoid some floating point divisions in drawing code 2019-05-09 19:55:10 +02:00
Harley Acheson
42b462ddd7 UI: improve timeline playhead scrubber drawing
Minimum width, always centered on the vertical frame line, antialiased.

Differential Revision: https://developer.blender.org/D4830
2019-05-09 19:55:10 +02:00
Harley Acheson
98b67d30ff Fix T64076: color ramp overlaps scrollbar
Differential Revision: https://developer.blender.org/D4831
2019-05-09 19:55:10 +02:00
60ca2fe338 UI: dim icons in inactive tabs, similar to text
This makes the properties editor navigation bar less saturated. Internally
the icon theme coloring was refactored a bit to move more towards the button
drawing code.
2019-05-09 19:55:10 +02:00
6148ed8cf9 Cleanup: reduce number of UI_icon_draw variations 2019-05-09 19:55:10 +02:00
5f7eebda23 Themes: add setting to draw border around icons, use for Blender Light
Monochrome colored icons don't work well on a dark background, so now we can
add a border around them. Note that most icons in the interface will remain
without a border, just the outliner and properties editor navigation have
colored icons and those will get a border. Other icons continue to be drawn
in the text colored without a border.

Differential Revision: https://developer.blender.org/D4787
2019-05-09 19:55:10 +02:00
9b924d73da Themes: add scene icon color category, for consistency in properties tab bar
The icons here still need to be dimmed when the tab is inactive.
2019-05-09 19:55:10 +02:00
930ae8e3c4 GPencil: Lock rotation of textures
By default the texture is locked and only the box is aligned when Follow Drawing Path is enabled.

Before, when the Follow was disabled, the texture was always aligned to top and it was not affected by object rotation. Now, the texture always is rotated with object rotation.
2019-05-09 19:53:25 +02:00
6ef48b1318 DrawManager/GreasePencil: Select Correct ViewLayer
The DrawManager assumed that the first render layer was the render layer
where GP needed to render on. In viewport this is always the case as we
only have a single view layer. When rendering this can be multiple when
multiple layers are rendered and composited in the compositor.

In stead of the assumption that the first render layer is the render
layer we need to draw on, we search for the render layer with the same
name as the viewlayer.

Reviewed By: fclem, brecht, antoniov

Maniphest Tasks: T63099

Differential Revision: https://developer.blender.org/D4818
2019-05-09 15:13:11 +02:00
0764cfe3de Workbench: Viewport AA Preferences
In recent changes the viewport_quality setting was not working what
users expected. This change will separate the anti-aliasing method that
is being used.

We now have three settings:

* scene.display.render_aa: Will be used during `Render Image`.
* scene.display.viewport_aa: Will be used during `Viewport Render Image`.
* userpref.viewport_aa: Will be used in the 3d view.

The viewport_quality setting has been replaced by the viewport_aa
setting as it was the only thing in currently controlled.

Reviewed By: brecht

Maniphest Tasks: T64132

Differential Revision: https://developer.blender.org/D4828
2019-05-09 14:45:45 +02:00
54ec0559c8 Fix T64384 : Crash when switching to wireframe on tree_creature blend
Was missing NULL pointer check
2019-05-09 14:37:01 +02:00
39f78413fc Tests: add tests/report.html that links to all HTML test reports
Currently this is for Cycles, Eevee and workbench tests.
2019-05-09 14:09:55 +02:00
3f37787c80 UI: rename Look Dev 'Ball' to 'Sphere'
D4813 by @Gvgeo
2019-05-09 21:37:20 +10:00
8342a124c4 DepsGraph: Multi ViewLayer Selection
When using multiple viewlayers and switching between them the selection
gets buggy. The reason for this is that the select_id is updated based
on the index in the viewlayer. This makes the select_id not unique as
objects might be shared or not shared at all.

This fix will update the select_id on all objects in main. This will be triggered in all the selection operators.

Reviewed By: sergey, brecht

Maniphest Tasks: T55617

Differential Revision: https://developer.blender.org/D4824
2019-05-09 13:27:23 +02:00
f877022956 Fix T64363 Eevee: Texture coordinates node turns material color to pink
Sorry for that :(
2019-05-09 12:46:29 +02:00
209c01a6ba Fix T64329 Crash when switching to Texture Paint 2019-05-09 12:22:12 +02:00
d2520511d2 3D Grid: Use View UBO & small cleanup 2019-05-09 12:22:12 +02:00
7c9e649015 I18n disambiguation: Drag (physics force vs. mouse action).
Part of T43295.
2019-05-09 11:38:54 +02:00
b2a8019f16 I18n disambiguation: setting particles' parent/children appart.
Looks like in some languages common generic parent/child relationship
does notn apply well to those.

Part of T43295.
2019-05-09 11:38:54 +02:00
1b753acd89 I18n disambiguation: Translation (of UI vs. moving something).
Part of T43295.
2019-05-09 11:38:54 +02:00
895c41ec5d Fix Crash with armature using custom shapes 2019-05-09 11:35:52 +02:00
5ab57f7ba4 Move out pose edit options into the pose data
Move pose edit mode booleans out of the armature data into the pose data

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4832
2019-05-09 11:21:34 +02:00
Lucas Veber
ffb3226d27 Fix T64308: bake animation not working after recent bendy bone changes
Differential Revision: https://developer.blender.org/D4820
2019-05-09 11:18:16 +02:00
c74e9273a9 Fix T64366 DRW: Crash opening Mr Elephant scene since recent commit 2019-05-09 11:16:54 +02:00
a951aa5f62 Fix T64296 Z-axis overlay vanishes at scene origin in 3D Viewport
Grid shader was still using deprecated eye vector.
2019-05-09 10:59:25 +02:00
dea8fb2bea Fix: Nav_bar context menu in preferences
Also merge the keymaps for header/footer/navbar.

D4736 by @Gvgeo with edits
2019-05-09 18:40:42 +10:00
f09aead64a UI: minor improvements to font menu
D4814 by @RedMser with edits
2019-05-09 17:19:54 +10:00
630e94791f Keymap: automate using OSKey for Ctrl on macos
Replace hard coded use of oskey with a function.

Add checks to avoid conflicting bindings with the OS.
2019-05-09 16:18:50 +10:00
6e33729462 Fix crash displaying UV's 2019-05-09 14:46:44 +10:00
be7031bee3 Fix bpy.utils.script_paths ignoring user_pref arg 2019-05-09 13:23:05 +10:00
33f495bd52 Cleanup: unused bpyml module
Was for declarative style UI definitions,
but never ended up being used.
2019-05-09 13:15:21 +10:00
7465a5db3b Cleanup: unused args/vars/imports in modules 2019-05-09 13:11:36 +10:00
fc37238b17 Cleanup: unused args/vars/imports in bl_operators 2019-05-09 12:42:05 +10:00
bc39fa947a Cleanup: redundant function call 2019-05-09 12:42:05 +10:00
8af8b1862f Cleanup: use __doc__ instead of bl_description
In keeping with other Python operators,
also assign object a variable.
2019-05-09 12:42:05 +10:00
8f1951f555 UI Particles: Move message about parting inside Parting panel.
Grayout parting settings if using virtual parents, and minor layout
adjustment: align min and max sliders together.
2019-05-09 01:54:07 +02:00
60aede44ba Cleanup: DRW: Remove DRW_pass_free 2019-05-09 01:08:17 +02:00
e2d04229c3 DRW: Remove support for NormalMatrix 2019-05-09 00:27:11 +02:00
1a99b6fc7e Fix T64158 Eevee: Mixed SSS shader becomes brighter and brighter
This change the logic a bit, when 2 bsdfs using SSS are mixed, we use the
one with the biggest radius (on a per pixel basis).

This change from previous behavior which was to select input 1 if radius
was greater than 0.
2019-05-09 00:10:29 +02:00
558017d6a6 Fix T64334: T-key error-message in Dopesheet source list
The Dopesheet doesn't have a toolbar, yet the source list region still had a keymap entry for it
2019-05-08 23:34:10 +02:00
c995eb1f9f Cleanup: GPUShader: Remove unused edge fancy shader 2019-05-08 23:28:07 +02:00
9489fea07b GPU: Refactor some shader for a bit more efficiency
Remove matrices multiplication and use more correct codestyle for variables
2019-05-08 23:28:07 +02:00
7ec7888ff3 Eevee: Fix Tangent vectors using NormalMatrix and make them world space
Making them world space by default remove a lot of legacy conversion from
viewspace.
2019-05-08 23:28:06 +02:00
c9537ee5c3 Overlay: Remove use of NormalMatrix 2019-05-08 23:28:06 +02:00
8204675689 UI messages: Rename 'Light' to 'Lite' for compression method.
While not exactly optimal, that's the only disambiguation solution I
found doable for translations (i18n). ID names tend to sneak
everywhere, including in places where we have no access to i18n context
currently (like menu labels e.g.).

Other alternative would have been to use 'Lightweight', but that is a
tad too long, we love short UI messages as much as possible.

The genius who decided that it was critical to rename ID lamp to light
in 2.8 is welcome to find a better solution...

Part of T43295.
2019-05-08 22:30:25 +02:00
1ac0254cfa I18n: Disambiguation for 'Cycles' used also by some anim modifier.
Part of T43295.
2019-05-08 22:30:25 +02:00
733811330c Workbench: Use common_view_lib and remove NormalMatrix usage
This is in order to lower the number of matrices to compute.
2019-05-08 22:08:20 +02:00
a8a11d3537 Mesh Batch Cache: Fix crash when comming from eevee to wireframe mode
And add check in debug build.
2019-05-08 22:01:34 +02:00
f2f62b184c DRW: Remove WorldNormalMatrix 2019-05-08 20:13:32 +02:00
bb41626ab3 Eevee: Remove uneeded normalization 2019-05-08 20:13:32 +02:00
7e380fd46a GPU: Remove GPU_INVERSE_NORMAL_MATRIX
The end goal for this is to lower the number of needed matrices.

This also cleanup some uneeded transformation.
2019-05-08 20:13:32 +02:00
24aeb479be Overlay Mode: Use common_view_lib
This is in order to centralize all matrices transformations.
2019-05-08 20:13:32 +02:00
c358da6b21 Defaults: change default settings in a few editors
* Timeline has summary collapsed to show only one row of keyframes.
* Cavity default is screen space curvature (faster).
* Scripting workspace text editor uses syntax highlight and line numbers.
* Marker lines enabled by default in all animation editors.
* Movie clip editor pivot point default to median.

Ref T63986.
2019-05-08 18:19:26 +02:00
275218b205 Theme: tweak source list background color for animation editors.
Helps to avoid blending with the timeline out-of-range area, match region
background and scrubbing area as well.
2019-05-08 18:10:07 +02:00
3d759e2b09 Cleanup: DRW/GPU: Remove eye vector uniform 2019-05-08 17:52:49 +02:00
901026c493 Cleanup: Remove BKE_MESH_BATCH_DIRTY_MAYBE_ALL 2019-05-08 17:52:49 +02:00
55173b1583 Cleanup: draw_common: Use switch instead of ifs 2019-05-08 17:52:49 +02:00
aec717cd61 Cleanup: Mesh Batch Cache: Remove unused BKE_MESH_BATCH_DIRTY_SCULPT_COORDS 2019-05-08 17:52:49 +02:00
cca941f614 Cleanup: GPUShader: Use switch instead of ifs 2019-05-08 17:52:48 +02:00
e053f6b1d8 DRW: Copy matrix in case of ModelMatrixInverse being used
ob->imat is garanteed to be valid by the depsgraph.
2019-05-08 17:52:48 +02:00
8c5c02932f Wireframe: Refactor vertex shader to use less matrices
This means less matrices needs to be prepared by the CPU.
2019-05-08 17:52:48 +02:00
8d3e2ffa07 DRW: Speedup: Only do batch cache request and validation once for duplis 2019-05-08 17:52:48 +02:00
bb4b6cddcb Mesh Batch Cache: Speedup: Only alloc gpu_attrs if needed and don't clear
No need to clear since GPU_material_vertex_attrs is overriding
2019-05-08 17:52:48 +02:00
7bfe70f2ba Mesh Batch Cache: Speedup: Use flags to early remove unecessary checks 2019-05-08 17:52:48 +02:00
0030e4da70 DRW: Make batch validation run first during iteration
This reduces the cost of querying the batches to the batch cache.
2019-05-08 17:52:48 +02:00
05b0f52aa7 DRW: Move all batch request functions to own header
This is in order to using BLI_INLINE for thoses functions and keep headers
cleany separated.
2019-05-08 17:52:48 +02:00
0b88cd5032 DRW: Change function orders to improve CPU cache efficiency
These changes seems to impact cache efficiency as it uses shgroup just
after creating a DRWCall before shgroup.
2019-05-08 17:52:48 +02:00
6df7946f73 Object Overlay: Add dupli fast path 2019-05-08 17:52:48 +02:00
9bfdc4826a Wireframe: Create dupli fast path using DRW_duplidata_get 2019-05-08 17:52:48 +02:00
b6b3a57c22 DRW: Add DRW_duplidata_get to create fast path for duplis
This is in order to create less shading group when using duplis.

Data for dupli objects keep in draw manager state until the source object
changes so retrieval is fast.

Note that this system could be extended to all meshes.
2019-05-08 17:52:48 +02:00
1ae2385106 GPUViewport: Fix possible hash colision with enabled engines
Also fix engine data validation that was not previously not working.
2019-05-08 17:49:28 +02:00
ac2e23c739 DRW: Remove uneeded calls to drw_viewport_engine_data_ensure when iterating
This remove a bit of overhead specially in scene with lots of objects.
2019-05-08 17:49:28 +02:00
820a64b9e5 DRW: Replace BLI_mempool by BLI_memblock
This remove a avoid the big overhead present in BLI_mempool when it is
cleared.
2019-05-08 17:49:28 +02:00
9fea65a93d DRW: Speedup: Don't call GPU_shader_uniform_vector if not needed
This seems to remove a bit of overhead of going into the function even if
the uniform is not needed.
2019-05-08 17:49:28 +02:00
45caba3733 BLI_memblock: New memory allocator
This is really close to BLI_mempool but uses an array to keep track of the
chunks of memory. There is no tagging necessary to clear the whole
structure so reuse is fast.

Naturally supports iteration but does not support freeing.
2019-05-08 17:49:27 +02:00
f273141556 Fix T64302: objects disappearing when disabling overlays
Only happened for Cycles, after recent changes.

Differential Revision: https://developer.blender.org/D4826
2019-05-08 16:55:43 +02:00
5aaa00ed55 Revert "UI: Dynamic region size for file browser options"
This breaks the user interface of exporters, so revert for now until there
is a solution for this.

This reverts commit ee0d8426ab.
2019-05-08 16:55:43 +02:00
58bfe93db6 Spline IK: fix a scaling hiccup as bones roll off the end of the curve. 2019-05-08 17:17:15 +03:00
44d4fdec7e Fix T64266: Incorrect modifier object target after making duplicates real for instanced collections.
Not sure why newid was set in evaluated object instead of orig one,
makes no sense to me, since we want to operate remapping of ID pointers
on orig data? Looks like that was something overseen when that code was
ported to new COW system.
2019-05-08 15:54:39 +02:00
3b9813fe50 UI: Move scrollbars to the right in animation editors
The text, that was in the scrollbars, stays on the left.

Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4821
2019-05-08 15:16:05 +02:00
adea6146f6 UI: Make File Browser bookmarks panels unparented again
Also open Recents again by default
2019-05-08 15:07:07 +02:00
503ced78f3 Keymap: Make Clip Editor Graph view consistent with regular Graph Editor
Still missing a context menu here for now though
2019-05-08 14:54:05 +02:00
4a98e33785 Fix heap buffer overflow in tabs to spaces
Need to count string terminator.
2019-05-08 14:37:05 +02:00
c79fc710b3 Keymap: Special keymap for clip editor scrubbing area
Reviewers: sergey

Differential Revision: https://developer.blender.org/D4825
2019-05-08 14:10:09 +02:00
6950faa24e Normals Menu: fix Average to be able to specify type.
Also removed some rogue debugging printfs from normal selection code.
2019-05-08 07:44:15 -04:00
ebf924e0b7 Keymap: Drag in empty area to box select in animation editors
This is a patch for the default keymap in Blender.
It relates to the Dopesheet, Timeline, Graph Editor, NLA and Sequencer
Currently, in these editors, dragging outside of your selections does nothing.

This patch makes it so dragging outside the selection does a box select operation.
It is consistent with how the Node Editor works, as well as the 3D View, if you use the gizmo overlays.

Differential Revision: https://developer.blender.org/D4799

Reviewers: campbellbarton
2019-05-08 13:11:04 +02:00
0d43d0bcab CMake: Add support of Ninja's pools to ease building on limited amount of RAM.
Many modern computers support a lot of threads (parrallel building
jobs), but are somewhat restricted in memory, when some building jobs
can require several GB each.

Ninja builder has pools, which extend the usual `-j X` make
parallelizing option, by allowing to specify different numbers of
parallel jobs for different targets.

This commit defines three pools, one for linking, one for usual compile,
and one for compiling some 'heavy' cpp libs, when a single file can
require GB of RAM in full debug builds.

Simply enabling WITH_NINJA_POOL_JOBS will try to set default sensible
values for those three pools based on your machine specifications, you
can then tweak further the values of NINJA_MAX_NUM_PARALLEL_ settings,
if you like.

On my system (8 cores, 16GB RAM), it allows to build a full debug with
all ASAN options build with roughly 7GB of RAM used at most, pretty much
as quickly as without that option (which would require up to 11GB of
available RAM at some points).

Review task: D4780.
2019-05-08 11:54:17 +02:00
27b9a0cd67 Copy Scale: support raising the copied scale to an arbitrary power.
Since scale is multiplicative, the appropriate way to partially copy
it is to use power. However, the influence slider of constraints uses
linear interpolation. Thus, there is no way to correctly split scale
via constraints without adding this feature.

In addition, this allows inverting scale by using negative powers,
fulfilling the function of Copy Rotation's Invert checkboxes.
2019-05-08 12:17:00 +03:00
08012ebeec Disable Constraint and Keep Transform
A 'Disable and Keep Transform' button for constraints was added. This
allows animators to disable a constraint without moving the constrained
object/bone, making it easier to toggle constriants on and off without
any visual consequence. Typical usage would be a character picking up an
object (enable 'Copy Transform' constraint) and placing it somewhere
else (disable the constraint).

Note that there could still be movement when there are muliple
constraints active. For example, when using this constraint stack

- #1: Copy Transform from Empty.001
- #2: Copy Rotation from Empty.002

and disabling constraint #2, constraint #1 is still active and will
still modify the visual transform of the object. According to our
in-house animators, this is expected behaviour.

Reviewers: campbellbarton, dfelinto, sergey

Reviewed By: campbellbarton

Subscribers: brecht

Tags: #animation

Differential Revision: https://developer.blender.org/D4677
2019-05-08 10:57:17 +02:00
951396a9bd Fix T64274: Crash with more than 1 subdivision with the Multiresolution Modifier
Update more relevant fields in the sculpt session. Really becoming annoying, but
was also annoying in the old code as well.
2019-05-08 10:42:21 +02:00
8287f31876 Fix T64298: Overlapping scrubbing area in clip editors dopesheet 2019-05-08 10:29:17 +02:00
01555d29fa UI: Remove Filters toggle in the Clip Editor Graph view
This was trying to emulate the 2.79 Graph Editor.

The toggle took up more room that the filter toggle it revealed, and it made the header buttons jump around

Better to just have the filter toggles showing immediately.
2019-05-08 09:10:29 +02:00
370345573e Cleanup: tabs to spaces for generated theme
Update along with generation utility.
2019-05-08 17:06:35 +10:00
700c69ad08 Fix T64283: Gizmo doesn't update after click-extrude 2019-05-08 15:14:23 +10:00
f8def6db50 Cleanup: unused var, doxy syntax for math_matrix.c 2019-05-08 09:33:06 +10:00
3dc9da3a74 Fix: default keymap entry for Sequencer context menu
Own mistake in previous commit
2019-05-07 21:17:11 +02:00
d4ea2df603 UI: Add copy/paste icons to Sequencer context menu 2019-05-07 21:12:22 +02:00
bea5d9db84 UI: Add initial context menu to Sequencer
Add to both Blender and Industry Compat keymap
2019-05-07 21:07:52 +02:00
9b4a57f74c UI: Add copy/paste icons to Graph and Dopesheet editor context menus
Consistent with others
2019-05-07 20:52:41 +02:00
0c0254018c UI: Add initial context menu to NLA
Adding to both default and Industry Compat keymap
2019-05-07 20:49:53 +02:00
37eb109014 Spline IK: support using both original scaling and volume preservation.
Add a new option that makes the Spline IK solver apply volume
preservation on top of the original scaling, considering the
pre-IK scale of the bone as the goal volume to be preserved.

This basically works similar to the Stretch To constraint, and
allows easily rigging a stretchy chain that uniformly follows
its parent's scaling.

Since the Stretch To behavior is more familiar, the new option
is on by default for newly created Spline IK constraints.
2019-05-07 19:54:36 +03:00
b1a7711718 UI: Remove redundant titles in animation filter popover
It's clear what these do without and takes up much less space
2019-05-07 18:09:15 +02:00
50889ba6ef Implement Push/Relax from rest pose.
Perviously it was only possible to interpolate from the breakdown poses.
Now you can Push/Relax in regard to the rest pose as well.

For this only one keyframe is needed while the old modes needs two.
2019-05-07 17:37:05 +02:00
f08ee1fc40 Tests: add Cycles image texture colorspace tests 2019-05-07 17:26:27 +02:00
109ef278cc Fix deadlock in recent Cycles colorspace changes
This code is not used yet so didn't affect anyone.
2019-05-07 17:26:27 +02:00
0d29a4fa7a Fix compilation error 2019-05-07 17:23:50 +02:00
a488a21f4f Fix T64257: Scrubbing in the Clip Editor Graph Editor doesn't work
While intent of such action is not very clear, there is no real
reason to forbid it.
2019-05-07 17:08:06 +02:00
9c41ff4d46 Industry Compat keymap: Support for dragging markers in marker region
Now that there is a dedicated scrubbing area, the markers area can be used again for manipulating markers on drag.
2019-05-07 16:16:45 +02:00
2eb217b155 Keymap: Use right-click for context menus in the animation editors
- This only applies to left click select. Right click select and the legacy keymap are unaffected
  - You can still set the playhead from anywhere, using Shift-RMB, just like how you set the cursor in the 3D View
2019-05-07 16:12:17 +02:00
c04e4b1974 UI: Rename "Scrubbing Region" to "Scrubbing/Markers Region".
Share theme setting since they serve similar purposes by sitting on top/bottom
of the animation/vse editors.

Reviewers: billreynish
2019-05-07 16:00:10 +02:00
76c6f38ae4 UI: Use scrubbing theme setting for markers background.
The hard-coded transparency of just 16 made it hard to see the markers
when the background was busy with keyframes (or strips in VSE).

The rename of the setting is in the following commit.

Reviewers: billreynish
2019-05-07 15:59:57 +02:00
cbcc2c22d9 Fix Bevel T64107 - width/depth value wrong for vertex only.
Code fix from George Vogiatzis (Gvgeo), via D4811.
Needed to initalize vert_axis.
2019-05-07 09:28:34 -04:00
f2b7582b27 UI: Animation editor scrubbing area
The main reason for this change is to allow setting the
active frame with the left mouse button, while still being
able to select e.g. keyframes with the same mouse button.

The solution is to introduce a new scrubbing region with
a specialized keymap. There are a couple of related todos,
that will be handled in separate commits.
Those are listed in D4654.

This solves T63193.

Differential Revision: https://developer.blender.org/D4654

Reviewers: brecht, billreynish
2019-05-07 15:09:14 +02:00
e4669199bf Normals menu for face strength improved.
Now cascading menus in Mesh > Normals set and select face
strength with explicit choices of Weak / Medium / Strong.
2019-05-07 08:45:01 -04:00
c041e10c9a Depsgraph: provide more granularity to PoseBone property links.
Most properties aren't altered by the evaluation of the bone,
and can be read immediately from its input operation. B-Bone
properties can be evaluated at the last possible moment.

This provides more freedom in using drivers to connect bone
properties: for example, it is now possible to read raw local
transform values via drivers from a bone that depends on the
reader bone via constraints.
2019-05-07 15:00:38 +03:00
5968826562 Industry Compat Keymap: Allow panning and zooming while using the Knife tool
Previously you could only orbit.

Apparently the order of the keys in the modal keymap makes a big difference.

Thanks to users Znio.G and Oskar on Devtalk who provided this solution.
2019-05-07 13:52:31 +02:00
090545158a Fix T64223: missing volume panel for Eevee world 2019-05-07 11:57:55 +02:00
2b9965122e Sound: Revert all the recent changes to sound
This happened to be a bigger rabbit hole to hell than it originally seemed,
and there are higher priority design tasks to be handled (at this point high
priority design task is more important than high priority bug fix).

After talking to Brecht the decision was made to revert to the known isolated
issue, which will allow everyone in the studio work same as prior to last
Friday.

The remaining bits will be worked on after all the design tasks are out of
the way.

This commit reverts:

4cdb4b9532 Fix T64161: Crashing using undo and multiple windows
064273a4ae Sound: Port more cases to be a part of dependency graph
2e582f8ab5 Sound: Fix access wrong dependency graph
5fc49d9c91 Sound: add stubs to build without audaspace
c68c81a870 Sound: Make sure spin lock is initialized for new sound datablocks
c02534469a Sound: Delay creating sound scene handle for until is needed
9f681bea68 Fix T64144: Crash when displaying audio waveforms in VSE
2f79286453 Cleanup: unused vars
bed8ad6f95 Fix crash in background rendering after recent sound changes
773691310f Fix T64143: Crash when scrubbing in the graph editor
888852055c Sound: Fix for being unable to jump to a frame during playback with A/V sync
6ab7b38464 Sound: More fixes for access of original scene
35db119545 Sound: Fix access original scene during playback
211c4fd2e9 Depsgraph: Make comment about evaluation more obvious
c5fe16e121 Sound: Make sound handles only be in evaluated datablocks
b4e1e0946b Depsgraph: Preserve sound and audio pointers through copy-on-write
4eedf784b0 Depsgraph: Store original sequencer strip pointer
6990ef151c Sound: Move evaluation to dependency graph
d02da8de23 Sound: Delay opening handlers for until really needed
3369b82891 Depsgraph: Add scene audio component
e8f10d6475 Depsgraph: Tag sequencer for update on changes
6e4b7a6e4d Depsgraph: Initial work to cover sequencer
17447ac5a6 Depsgraph: Make sound ID part of the graph
2019-05-07 11:50:38 +02:00
90a9ff4408 Viewport: add better reflection checking matcaps
Contributed by Manny Hise.

Differential Revision: https://developer.blender.org/D4816
2019-05-07 11:39:42 +02:00
c6168ace64 Industry Compat keymap: Use Alt-Double-Click to select edge rings
You can also add Shift or Ctrl to add or subtract to selections

Based on user requests
2019-05-07 11:32:05 +02:00
d8e435a73a Fix T64210: crash using Live Unwrap without UVMap
Reviewers: brecht

Maniphest Tasks: T64210

Differential Revision: https://developer.blender.org/D4817
2019-05-07 11:23:17 +02:00
7ebe5b76dc Cleanup: Make comment more readable and avoid wrapping 2019-05-07 11:12:41 +02:00
fd90334751 Cleanup: Simplify access to read-only render settings
Will allow to avoid confusion about original/evaluated scene used
to access those in the nearest future.
2019-05-07 11:12:41 +02:00
7e5193e335 Cleanup: Use more const pointers in render pipeline 2019-05-07 11:12:41 +02:00
1a57c94c09 Cleanup: Make Render finalization function more generic
Allows to extend that code more easily.
2019-05-07 11:12:41 +02:00
1bb740f95c Cleanup: Remove remaining parts of frameserver 2019-05-07 11:12:40 +02:00
1bcec52991 Cleanup: More clear naming for rendering functions 2019-05-07 11:12:40 +02:00
036e95bb21 Fix T57767: Pivot point broken after scaling to 0 in a dimension
matrix inversion was changed in rB01c75c3765eb from own code to EIGEN
for performance reasons. EIGEN would return a zero matrix on failure
(resulting in the pivot always being at the object origin).
This brings back the "old" matrix inversion code (which has the benifit
of providing a partial solution which makes the local transform center
appear correct)

Reviewers: campbellbarton

Maniphest Tasks: T57767

Differential Revision: https://developer.blender.org/D4804
2019-05-07 10:47:19 +02:00
3f788eacee RNA: provide access to the vertex index array of the Hook modifier.
This allows creating hooks completely without the use of operators.
Also fix subtarget to actually recompute the inverse matrix.

In order to follow the vertex_indices_set function naming convention,
it is necessary to fix makesrna to avoid a naming conflict between
the function wrapper and the property accessor by adding a tag.

Differential Revision: https://developer.blender.org/D4798
2019-05-07 10:55:34 +03:00
86e14463d2 Fix T64232: crash on Weight from Bones redo 2019-05-07 09:49:51 +02:00
5ba6dbfb18 Fix graph editor selection tolerance ignoring DPI 2019-05-07 17:33:04 +10:00
4d78f5a4a7 DrawManager: External Engines + Overlays
Do not iterate over degsgraph when overlays are turned off and
rendering via an external engine. External engines sync data
from Blender differently. The external engine
draws the depth buffer, but that is only needed for overlays.

Reviewers: fclem, brecht

Differential Revision: https://developer.blender.org/D4791
2019-05-07 09:26:44 +02:00
3482aebf8d Theme: set dark grey for line number background
This color is also used for the right margin,
so use a color that contrasts with the background.

Also use 2x width line.
2019-05-07 17:18:18 +10:00
73e7c9d589 Fix T64230: Crash on weight paint gradient redo 2019-05-07 15:14:30 +10:00
0e2bafccf7 Cleanup: improve transform data sorting function
Replace comments on caller with more meaningful name.
2019-05-07 13:08:18 +10:00
fb26b6ac86 Fix T64130: Bezier curve vanishes on transform 2019-05-07 12:59:47 +10:00
fe5491898b Clanup: clang-format 2019-05-07 12:34:32 +10:00
bfef3bce1a Keymap: double click to close cut
Restore from 2.7x (lost when migrating to migrating keymap to Python).
2019-05-07 10:16:45 +10:00
619b9e9d81 Cleanup: typo, tweak proportional edit check 2019-05-07 10:06:00 +10:00
ddb71e8c20 DRW: Remove is_negative_m4 per draw call
This had some cost in perf and is not needed most of the time. If the
drawcall really needs it, it should use a correct ob pointer.
2019-05-06 22:33:05 +02:00
ff90589966 Cleanup: Eevee/Workbench: Remove non-needed matrix inversion
Theses are garanteed by the depsgraph now.
2019-05-06 22:33:05 +02:00
55bf2adbea DRW: Attempt to fix slowdown caused by gizmo drawing 2019-05-06 22:33:05 +02:00
bd340a0e1f Cleanup: GPUMaterial remove unused struct members 2019-05-06 22:33:05 +02:00
8b6afcb67b Cleanup: Eevee: Remove comment about vcol support in sculpt mode 2019-05-06 22:33:05 +02:00
50999f7fb0 Maintain Volume: introduce an option switching between modes.
After a lot of thinking about this, I decided that all operation modes
that I've tried over the past couple of years, including the original
2.79 one, have their uses after all. Thus the only reasonable solution
is to add yet another option.

The modes are:

- Strict: The current 2.80 mode, which overrides the original scaling
  of the non-free axes to strictly preserve the volume. This is the most
  obvious way one would expect a 'Maintain Volume' constraint to work.

- Uniform: The original 2.79 mode, which assumes that all axes have been
  scaled the same as the free one when computing the volume. This seems
  strange, but the net effect is that when simply scaling the object
  uniformly with S, the volume is preserved; however, scaling the non-
  free axes individually allows deviating from the locked volume.
  This was obviously intended as a more or less convenient UI tool.

- Single Axis: My own variant of the intent of the Uniform scale, which
  does volume-preserving if the object is scaled just on the Free axis,
  while passing the non-free axis scaling through. I.e. instead of
  uniform S scaling, the user has to scale the object just on its
  primary axis to achieve constant volume. This can allow reducing the
  number of animation curves when only constant volume scaling is needed,
  or be an easier to control tool inside a complex rig.
2019-05-06 21:55:20 +03:00
df1d990b68 UI: Offset checkbox in the Outliner filter popover
Aligned with the other checkboxes
2019-05-06 20:54:35 +02:00
0f064144f3 Node select: refactor, fix some inconsistent behaviors in socket selection.
Refactor a bit node selection code, mostly in the socket selection in
one place 'extend' logic usage was inverted, deselection of other
sockets/nodes was not working properly.

Also now make node active when selecting a socket, this makes more sense
and makes the NODE_OT_link_viewer macro much more useful (this is the
only user of the 'socket select' feature currently, afaics).
2019-05-06 20:37:12 +02:00
6da953ad1d GPencil: Verify Brush has GPencil data
This avoid errors in old files.
2019-05-06 20:34:24 +02:00
fb3e138cee Tests: add Eevee reference images, and add workbench tests
Being able to compare Eevee reference images is useful for refactoring I'm
working on so might as well add them now, even if we can still improve them.

Workbench tests are just rendering the same files as Cycles and Eevee. This
doesn't really tests many workbench settings until we add tests specifically
for them, but does cover how it it handles the different object types.
2019-05-06 20:10:08 +02:00
51f222f91d Fix: T64213 Properties Editor Icon Colors are wrong for Text and Light Probes 2019-05-06 19:44:33 +02:00
89724c03dc Fix T64111: add a NULL check to avoid crash with bad constraint subtarget. 2019-05-06 20:31:22 +03:00
c0432c2385 Fix T63046, T61413: crash reading paint slots from 32 bit .blend on 64 bit
Thanks to matc for helping to find this, it was writing the paint slots wrong.
2019-05-06 18:39:33 +02:00
1854cccad7 Drivers: add an Average Scale option to the Transform Channel driver vars.
Unlike location and rotation, there is a meaningful definition of
overall/average scaling via the total change in the volume. This
adds an option to retrieve that via a single driver variable,
instead of having to use three and an expression.

Using the determinant to compute the volume scaling also allows
detecting flipping due to negative scale - this is impossible
to do via the three variable approach.

The volume_scale functions are added purely for code readability:
'volume scale factor' is easier to understand than determinant.

Differential Revision: https://developer.blender.org/D4803
2019-05-06 19:03:26 +03:00
11d2c0b6f4 UI: Outliner Filter popover: Remove wrong use of icons
Missed this file from prior commit.
2019-05-06 17:33:04 +02:00
c07b9e23c8 UI: Add tooltips to the select tool modes
Especially needed now that they are just icons
2019-05-06 16:47:13 +02:00
4cdb4b9532 Fix T64161: Crashing using undo and multiple windows
It is possible that dependency graph was not yet initialized,
so need to do NULL pointer check.
2019-05-06 16:40:23 +02:00
958e00cebf UI: Use expanded icon row for Select tool modes 2019-05-06 15:59:34 +02:00
a23647e51b Industry Compat Keymap: Accept Knife tool with double-click
Suggested by users on Devtalk
2019-05-06 15:03:40 +02:00
6a0c31af8a improve tooltip of ViewLayer.use
thx @Zoot (Gavin Scott) for spotting and providing better wording

Fixes T64157
2019-05-06 14:24:33 +02:00
578ead77f9 remove unused T_LOCAL_MATRIX
- was introduced in rB844a17a3d9d2 but apparently never used
- spotted while looking into T57767

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4805
2019-05-06 13:48:07 +02:00
e9160eae95 Fix T64164: Resetting a curvemap could result in a mirrored curve
A template_curve_mapping with brush=True was always resetting the curve
to a positive slope (descending from left to right).
Behaviour is now changed so that specifying "use_negative_slope" is
taken into account as well.

Also use this for:
- paint "cavity_curve"
- gpencil "curve_sensitivity" / "curve_strength" / "curve_jitter" /
"interpolation_curve"

Reviewers: brecht

Maniphest Tasks: T64164

Differential Revision: https://developer.blender.org/D4809
2019-05-06 13:44:22 +02:00
d7ffb5cb0b UI: Remove wrong use of icon for Rename Active Item 2019-05-06 13:42:06 +02:00
0f3f78e2b9 UI: Outliner Filter popover layout
- Use checkboxes with aligned text
  - Use icons next to the checkboxes
  - Remove wrong use of icons
  - Better grouping
2019-05-06 13:40:51 +02:00
064273a4ae Sound: Port more cases to be a part of dependency graph
Mainly covers RNA callbacks which were still doing direct scene update,
which was causing crashes. Now corresponding ID_RECALC flags are used,
so all scenes can update accordingly.

Also tested animated volume/pitch on strips, which now works as well.

Fixes T64133: Assert after changing FPS
Fixes T64154: Immediate crash when changing the current frame on the timeline
Fixes T64185: Client Crashes when the frame position value is changed
Fixes T64190: Blender Crash using Timeline Editor
Fixes T64128: Click to close bug type on timeline
Fixes T64147: Crash when setting current frame from Python
Fixes T64152: Blender Auto-Close on timeline change
2019-05-06 12:54:16 +02:00
2c0da4a3db Color management: add functions to detect scene linear and sRGB color spaces
Same as the ones in Cycles, but intended for GPU textures.
2019-05-06 12:05:44 +02:00
8794779a2d Fix error running Eevee render tests 2019-05-06 12:04:08 +02:00
b6bf4bda27 UI: disable colored icons in menus for now
Only a few icons are colored, which caused some random icons to be colored and
others not. We can add it back for specific menus later (like add object or
modifiers).
2019-05-06 11:58:47 +02:00
defc901467 UI: File Browser bookmarks panels
- Group these together in sub-panels
  - Use much clearer naming
  - Close Volumes and Recents by default
2019-05-06 11:56:55 +02:00
de430dd1ec UI: Icons update
New icons from Andrzej Ambroż / jendrzych:

  - New icons for select tool modes
  - Brought back screen icon for viewport visibility toggles
  - Added new Instanced visibility toggle (unused currently - meant for forthcoming updates to the Outliner)
  - New Gizmo icon for the header
  - Many tweaks and alterations to existing icons. Full list on Devtalk
  - Use correct icon when Proportional Editing is disabled
2019-05-06 11:54:46 +02:00
2e582f8ab5 Sound: Fix access wrong dependency graph
Due to some fields in the context being NULL access was happening
to the default view layer, not the active one.

Simply re-arranged context initialization, so it happens before
accessing dependnecy graph.

Fixes T64183: Crash in BKE_sound_scene_playing due to Scene NULL
Fixes T64192: Crash opening a file with a non-default View Layer active
2019-05-06 11:32:01 +02:00
22e9365e8b Depsgraph: Fix wrong comment 2019-05-06 10:12:23 +02:00
09181540b5 Implement mirroring in pose mode (absolute and relative)
Added working X-mirroring in pose mode with an optional relative mirror
mode.

Reviewed By: Campbell Barton

Differential Revision: http://developer.blender.org/D4765
2019-05-06 09:47:45 +02:00
f999c40d77 Fix T64178: Invisible image 2D cursor
Own error in 928becec60, move cursor drawing to single location.
2019-05-06 12:55:54 +10:00
0ddec50944 Cleanup: clang-format 2019-05-06 11:59:03 +10:00
90f8f5cb06 UI: Tooltips
- Add missing tooltips to Quick Effects and Subdivide Edge Ring
  - Add proper tooltip to the Bevel operator
  - Clearer tooltips for the extrude operators

Plus a few other tweaks

Suggested by users on Devtalk.
2019-05-05 21:36:12 +02:00
1dd78a3f57 Industry Compat keymap: Remove ability to cancel knife with right click.
Was too easy to do by mistake while attempting to zoom.

Unfortunately it seems like it's not currently possible to add zooming to the Knife modal keymap, so this is still missing here.
2019-05-05 20:49:25 +02:00
c7ec6bb748 RNA: add an Object method to clear all shape keys for completeness.
This matches bpy.ops.object.shape_key_remove(all=True) in behavior.
2019-05-05 19:34:30 +03:00
2c92900a47 Industry Compat Keymap: Fix Select All operators in the Info Editor
Patch by Valentin (Poulpator)

Differential Revision: https://developer.blender.org/D4746
2019-05-05 17:42:18 +02:00
1c58604070 Depsgraph: fix Bone property drivers stored in Object animdata.
This can easily happen if adding drivers through Python via
pose.bones[...].bone.driver_add(), e.g. in Rigify code: the
bone field doesn't change id_data, so the driver is associated
with the object ID.

To handle this it's necessary to skip from Object to data in
RNA_Bone-specific code both for generic RNA and in the custom
code for drivers. The latter also had to be changed to use the
proper parsed RNA pointer instead of string matching on paths.
2019-05-05 10:44:41 +03:00
47df163b6c GPencil: Verify brush is valid for grease pencil
Usually the brush type is correct, but for some old files the brush could be a not valid type. In this case, returns the object active material.

This is related to T61413
2019-05-05 09:10:44 +02:00
ab9731ccea Cleanup: fallthrough attribute warning
Fall-through without label or default after it.
2019-05-05 12:34:24 +10:00
5fc49d9c91 Sound: add stubs to build without audaspace 2019-05-05 12:33:51 +10:00
d32a103d53 Fix T63789: Precision issues in glsl noise texture
There is a significant precision loss when converting large float values to int.
2019-05-04 16:46:02 -03:00
c68c81a870 Sound: Make sure spin lock is initialized for new sound datablocks
Should have been done as a part of 9f681bea68.
2019-05-04 20:34:56 +02:00
c02534469a Sound: Delay creating sound scene handle for until is needed
Solves crash loading volume Cycles regression files.
2019-05-04 19:20:41 +02:00
9f681bea68 Fix T64144: Crash when displaying audio waveforms in VSE 2019-05-04 19:15:15 +02:00
773691310f Fix T64143: Crash when scrubbing in the graph editor 2019-05-04 18:53:59 +02:00
7595c9ecda Cycles: Fix NULL instead of false
Not really noticeable for users, since the compiled code is the same,
but semantically this is incorrect.
2019-05-04 18:49:37 +02:00
Julian Eisel
94a064c0e9 Fix T64045: Crash activating fullscreen workspace
See d83a72ec10.
2019-05-04 15:33:02 +02:00
Julian Eisel
d83a72ec10 Fix crash activating a fullscreened screen
Steps to reproduce were:
* Duplicate some area into new window (shift-click corner triangle)
* Make it fullscreen
* Close the window again
* Activate the added screen from the menu (the one without the
  -nonnormal prefix)
-> Crash (you may have to press "Back to Previous" first though)

When activating a screen, code should check if there's a fullscreen
variant of it and activate that instead. From what I can tell that's
what the code tried to do, but incorrectly.

Same issue as T64045, but things are a bit different for 2.7.
2019-05-04 15:12:55 +02:00
aa8e3e6fbe UI: Add Split and Separate to the mesh editing context menus 2019-05-04 15:12:20 +02:00
e718b9712e UI: Add color and blending to paint mode context menus 2019-05-04 15:03:42 +02:00
8d8e8caa9d Industry Compat Keymap: Set Proportional Editing to B key
Same as popular DCC app.

This means having to change Bevel to Ctrl/Cmd-B

Also fix missing shortcut for Extrude in Curve Edit mode.
2019-05-04 14:35:40 +02:00
George Vogiatzis
b8d806caf7 UI: Add Look Developer Balls Size option
Note: Some adjustments were made compared to the diff mainly for code
readability and made the default ball size 150px.

Reviewed By: fclem

Differential Revision: http://developer.blender.org/D4793
2019-05-04 14:11:04 +02:00
e474549da5 Cleanup: GPU_buffers: Remove obsolete debug drawing 2019-05-04 14:11:04 +02:00
f302224e16 Cleanup: Eevee: Remove Flat normal shader variation
Was use by sculpt mode but that's not used anymore.
2019-05-04 14:11:04 +02:00
fb3b2ab709 Cleanup: Remove unused code in sculpt_mode, workbench and draw manager 2019-05-04 14:11:04 +02:00
b2f1a65874 Sculpt: Refactor draw manager sculpt drawing mechanism
Workbench/Eevee now displays multiple multi-materials correctly.

Iterate over pbvh nodes when doing object iteration. This makes the
rendering process more streamlined and allow for using different materials.

This change will make possible to:
- Add culling pass of each pbvh leaf node. (speedup if zoomed on a small
area)
- Reduce number of lead node iteration.
- Reduce code complexity
2019-05-04 14:11:04 +02:00
1d8ed6dcd7 GPUBuffers: Save / expose material index per buffers 2019-05-04 14:11:04 +02:00
80cd292381 Fix T64102: Can't add X-Mirror to quick favorites 2019-05-04 10:56:47 +10:00
2f79286453 Cleanup: unused vars 2019-05-04 10:56:47 +10:00
Julian Eisel
ee0d8426ab UI: Dynamic region size for file browser options
Makes the file browser operator property region (lower left) dynamically
sized to content. Previously, the default size would work really badly
for file browsers opened in small windows, e.g. to install Add-ons from
the preferences window. It would be mostly empty but use lots of space
then.
2019-05-03 23:09:47 +02:00
bed8ad6f95 Fix crash in background rendering after recent sound changes 2019-05-03 19:44:49 +02:00
3c07967ef2 Fix Cycles crash when trying to load image that does not exist
It was crashing due to array out of bounds access. This is not a great fix,
but brings back behavior the same as before now. Perhaps images that failed
to load should be stored separately somewhere.
2019-05-03 19:08:27 +02:00
d23869eefa GPencil: Add stroke color to Materials Popover
This makes more easy to manage the color, specially for advanced brushes with pinned materials.

Reviewers: @pepeland, @mendio
2019-05-03 18:43:11 +02:00
633c773fe4 UI: color icons in the properties editor tabs
Still can use more tweaks and icon reorganization, but this gets us closer
to the intended design so we can evaluate it. Ref T61561, T63521.
2019-05-03 18:33:23 +02:00
a5c89574a3 Fix Cycles assert on exit after recent changes 2019-05-03 18:04:47 +02:00
888852055c Sound: Fix for being unable to jump to a frame during playback with A/V sync 2019-05-03 17:50:43 +02:00
712fe561d5 UI: Fix crash when region becomes too thin 2019-05-03 17:42:45 +02:00
6ab7b38464 Sound: More fixes for access of original scene
Same as previous commit, just few lines to the bottom.
2019-05-03 17:27:13 +02:00
35db119545 Sound: Fix access original scene during playback
Was required to have AV-sync enabled. and then simply play playback
would have triggered an assert.

In release builds the sync would have happened to a wrong frame.
2019-05-03 17:19:24 +02:00
21f8e75ddb fix image_changed() doing unneccessary texture updates when texture wasnt
using an image

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4789
2019-05-03 15:53:19 +02:00
a460e97212 Cleanup: Selling in comment 2019-05-03 15:50:40 +02:00
211c4fd2e9 Depsgraph: Make comment about evaluation more obvious 2019-05-03 15:50:40 +02:00
c5fe16e121 Sound: Make sound handles only be in evaluated datablocks
Quite straightforward change, which makes it so audio handles are
only created inside of evaluated datablocks.

Exception is adding sound strip to the sequencer, which needs an
audio handle to query length and number of channels. This is done
by temporarily loading sound file into an original datablock, and
then tossing it away.

There is an assert in sound.c which verifies that audio system is
used from an evaluated domain, which should help porting all the
cases which are likely missed by this commit.

Some annoying parts:

- `BKE_sound_update_scene()` is iterating over all bases, and does
  special ID tags to see whether sound has been handled or not
  already. This can not be done the old fashion now.

  Ideally, this will be done as a speaker datablock evaluation,
  but seems that would require a lock since audio API is not safe
  for threading. So this is not a desired way i'd say.

  Possible solution here would be to iterate over ID datablocks
  using dependency graph query API.

- Frame jump needs to call `BKE_sound_seek_scene()` directly
  because there might be some flags assigned to the scene which
  could be clear after operator execution is over.

  Need to verify if that's the case though. This is a bit hairy
  code, so sticking to a safest and known to work approach for
  now.

- Removed check for format when opening new sound file.
  Maybe we can have some utility function which queries channel
  and duration information, leaving the caller's code clean and
  tidy.

Tested following cases:
- Adding/removing/moving sequencer's sound strips.
- Adding/moving speakers in viewport.
- Rendering audio.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4779
2019-05-03 15:50:40 +02:00
b4e1e0946b Depsgraph: Preserve sound and audio pointers through copy-on-write
This allows to have scene and speaker copy-on-write executed without
interrupting the playing sound.
2019-05-03 15:50:40 +02:00
4eedf784b0 Depsgraph: Store original sequencer strip pointer
Allows to identify where the strip came from.
2019-05-03 15:50:40 +02:00
6990ef151c Sound: Move evaluation to dependency graph
The sound handles are still in the original datablocks, so it's easier
to test since there should be no functional changes.
2019-05-03 15:50:40 +02:00
d02da8de23 Sound: Delay opening handlers for until really needed
Needs to be done in order to localize sound handlers to the evaluated
IDs only. This commit might not be fully optimal, since it does more
things on every scene update request, but that will be solved by the
upcoming change which will put those updates to a dependency graph.
2019-05-03 15:50:40 +02:00
3369b82891 Depsgraph: Add scene audio component
The idea is to make that responsible for dealing with
things like audio update on frame jump and such.
2019-05-03 15:50:40 +02:00
e8f10d6475 Depsgraph: Tag sequencer for update on changes
Currently only adding, removing and transforming strips. Most likely more
tags is needed.
2019-05-03 15:50:40 +02:00
6e4b7a6e4d Depsgraph: Initial work to cover sequencer
Just adds sequencer operation and links possible sound ID to it.

No functional changes, just moving towards sound system integration
into the dependency graph.
2019-05-03 15:50:40 +02:00
17447ac5a6 Depsgraph: Make sound ID part of the graph
Currently those IDs are not covered by copy-on-write mechanism since
that ruins the current design of BKE_sound, But this change allows to
move towards system where sound handlers are only valid for an evaluated
ID datablocks.
2019-05-03 15:50:40 +02:00
e6697d0127 Fix compiler warning/error after recent changes 2019-05-03 15:50:01 +02:00
e185a6afa3 Fix width of compact buttons with icons, e.g. layout.menu().
As mentioned in the comment, the icon width computation relies on
big enough margins; however in compact mode they aren't big enough
and the label gets truncated.
2019-05-03 16:49:30 +03:00
1006767678 Fix crash opening file saved in editmode with a brush image texture
started with recent UV Sculpt tool-system integration rB928becec60d1

Fixes T64094

Reviewers: brecht

Maniphest Tasks: T64094

Differential Revision: https://developer.blender.org/D4788
2019-05-03 15:44:53 +02:00
Nathan Craddock
f437b958c3 UI: remove bone only constraints from object constraint menu
This is better than showing an error after trying to add them. Ref T61560.

Differential Revision: https://developer.blender.org/D4767
2019-05-03 15:42:49 +02:00
68b15fc3ad Cycles: support loading images from arbitrary OpenColorIO color space
These are the internal changes to Cycles, for Blender integration there are no
functional changes in this commit.

Images are converted to scene linear color space on file load, and on reading
from the OpenImageIO texture cache. 8-bit images are compressed with the sRGB
transfer function to avoid precision loss while keeping memory usages low. This
also means that for common cases of 8-bit sRGB images no conversion happens at
all on image loading.

Initial patch by Lukas, completed by Brecht.

Differential Revision: https://developer.blender.org/D3491
2019-05-03 15:42:49 +02:00
dba4684f82 Cycles: add colorspace manager class and utilities based on OpenColorIO
This is the groundwork for supporting loading image textures with arbitrary
color spaces through OpenColorIO.

Initial patch by Lukas, completed by Brecht.

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

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

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

Reviewers: brecht

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

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

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

This causes MSVC2019 build to fail with error C2059

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

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

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

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

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

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

Reviewers: fclem, brecht

Maniphest Tasks: T60847

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

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

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

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

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

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

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

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

Reviewers: brecht, fclem

Maniphest Tasks: T63525

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

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

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

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

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

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

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

Reviewers: brecht

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

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

Also remove redundant extra zero byte from strings.
2019-05-02 10:52:53 +10:00
e7ce9b9bb8 Cleanup: unused warning 2019-05-02 10:37:42 +10:00
a372e5e426 Fix T61619: Some VSE attributes with keyframes are not sensibly evaluated
when the scene is referenced as a strip from another VSE scene

Fix T49658: Evaluation / animation of f-curves does not correct
for a scene's position within another scene

Solution: Evaluate animdata before rendering scene seqbase.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4755
2019-05-01 09:58:35 -07:00
fc040335b7 Fix T63980: only copy selected curves in Copy Keyframes from Graph Editor.
Otherwise things can become confusing due to copying unwanted curves,
especially if "Only Selected Curve Keyframes" is enabled, and thus
selected keyframes from other curves may not be visible.

Now Copy Keyframes behaves exactly like Paste Keyframes.
2019-05-01 19:25:24 +03:00
a9e546f57d UI: add pixel units for some theme settings 2019-05-01 18:05:48 +02:00
George Vogiatzis
a8bdb357b4 UI: move object origin size preference to themes
Differential Revision: https://developer.blender.org/D4657
2019-05-01 18:05:48 +02:00
Harley Acheson
5b7806510f UI: remove outliner vertical separators
This removes the vertical bar separators between items and subitems (for closed
rows), and the vertical lines between the columns of restriction icons.

The vertical bars and lines don't really serve any useful purpose and add some
visual fuzziness and confusion. Best to concentrate the eye on the items of
content, not the separators between them.

Differential Revision: https://developer.blender.org/D4743
2019-05-01 18:05:48 +02:00
Harley Acheson
f597cb6d03 UI: remove outliner highlight selection gap
When rows were highlighted - for selection, hover, or search - the highlighted
bar would not take up the entire vertical space but instead leave a gap.

That gap generally looks like a separator between items, adding complexity and
fuzziness for no real benefit.

Differential Revision: https://developer.blender.org/D4742
2019-05-01 18:05:48 +02:00
Harley Acheson
3747282932 UI: use Mac key symbols in menus on macOS, instead of text like "Cmd"
On Windows "Cmd" is also replaced with "Win".

Differential Revision: https://developer.blender.org/D4689
2019-05-01 18:05:01 +02:00
Harley Acheson
0a80be40e3 UI: make outliner hierarchy line width take into account DPI
Differential Revision: https://developer.blender.org/D4744
2019-05-01 17:21:02 +02:00
George Vogiatzis
df712d74a2 UI: improve readability of Normals menu in edit mode
Also rename operators to match names in the menu.

Differential Revision: https://developer.blender.org/D4659
2019-05-01 17:17:22 +02:00
89826e0a0d Alembic: integrate cache file into the dependency graph
* The cache file datablock is now evaluated as part of the dependency graph,
  creating/freeing the Alembic file handle matching the current frame.
  Modifiers and constraints depend on this evaluation.
* Cache file handles and readers now only exist on COW datablocks, never the
  original ones.
* Object data paths are flushed back to the original for the user interface.
* The cache file keeps a list of all readers associated with its handle, and
  automatically frees them when the handle is freed. This kind of sharing of
  data across datablocks is weak but we have no better mechanism for it.

Fix T62720: Alembic sequences not working and crashing

Differential Revision: https://developer.blender.org/D4774
2019-05-01 16:02:27 +02:00
a72a831570 Eevee: Fix crash when rendering due to recent lookdev refactor 2019-05-01 15:45:54 +02:00
df8e5d66e3 Modifiers: support parallelism in Armature and Lattice Deform.
This partially mitigates the performance drop in Spring
02_055_A.anim caused by dependency changes in D4715.

Differential Revision: https://developer.blender.org/D4753
2019-05-01 16:34:54 +03:00
4d043b5c17 Fix crash on unlinking scene
Fix crash when unlinking scene and "Use Sequence" property is set.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4756
2019-05-01 05:16:55 -07:00
fa3da4d23d Use cache only in current scene
Disable cache use, when rendering another scene seqbase.
Now cache limit applies only to one scene, so it can be overshot.
Cache of other scenes can be filled manually still.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4757
2019-05-01 05:16:29 -07:00
bc597eb487 Fix T49589: 2.78 VSE no longer caching Node Editor scene strips
Sequencer cache was cleared when rendering compositor output.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4758
2019-05-01 05:16:01 -07:00
07b223a873 ClangFormat: enable ReflowComments 2019-05-01 21:44:48 +10:00
c47d669f24 Cleanup: comments (long lines) in cycles 2019-05-01 21:41:07 +10:00
177a0ca131 Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
5bbf9029ce Cleanup: comments (long lines) in dualcon 2019-05-01 21:00:56 +10:00
c985876b19 Cleanup: comments (long lines) in rigidbody 2019-05-01 20:48:34 +10:00
649e5fb955 Cleanup: comments (long lines) in mikktspace 2019-05-01 20:41:33 +10:00
a91717d2ad Cleanup: comments (long lines) in atomic 2019-05-01 20:34:12 +10:00
8a10da1cf8 Cleanup: comments (long lines) in string 2019-05-01 20:32:38 +10:00
59fb13c2b1 Cleanup: comments (long lines) in utfconv 2019-05-01 20:32:38 +10:00
5b1fcf8833 Cleanup: comments (long lines) in ghost 2019-05-01 20:32:38 +10:00
1cb091ae7a Cleanup: correct arg wrapping from recent cleanup 2019-05-01 20:32:38 +10:00
928becec60 UV Sculpt: improve tool-system integration
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).

Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.

- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
  select different brushes.
- Make UV sculpt use paint paint tool slots
  (using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
  S/P/G keys to switch tools.
2019-05-01 20:32:38 +10:00
5fd69f6bd8 UI: show UV sculpt panels in the image editor 2019-05-01 20:32:38 +10:00
7aeb94686f Fix line width for image sample size display 2019-05-01 20:32:38 +10:00
e66629c128 Eevee: Lookdev: Cleanup implementation & support for Bloom and TAA
Make Lookdev works with bloom and TAA by rendering it before TAA and fixing
the motion vectors of the lookdev balls.

Rework Lookdev to remove much of its complexity. Use simpler matrices with
more understandable setup code.
2019-05-01 12:09:18 +02:00
b581f19292 Eevee: Add support for alpha background in viewport
Viewport now displays alpha checkerboard pattern like Cycles does when
film alpha is set to "Transparent".

Some small workarounds were necessary for Depth of Field and correct TAA
support.
2019-05-01 12:09:18 +02:00
47717060af DRW: Draw checkerboard alpha pattern for Cycles
Add checkerboard alpha pattern like it was in 2.79
2019-05-01 12:09:18 +02:00
e6705fad33 DRW: Add DRW_STATE_BLEND_PREMUL_UNDER
Just basic alpha under operation with premultiplied source.
2019-05-01 12:09:18 +02:00
28ada66f38 Cleanup: long function call in interface_draw.c 2019-05-01 12:08:06 +02:00
60e71cba5b Industry Compat Keymap: Support recent feature to deselecting by clicking in empty areas
Same as default keymap
2019-05-01 11:24:48 +02:00
35214885c7 Cleanup: Redundant struct specifier 2019-05-01 10:51:19 +02:00
7191f66aa4 Cleanup: use BKE_pchan_mat3_to_rot / rot_to_mat3 utility functions 2019-05-01 13:55:50 +10:00
5915d1f453 BKE_pchan: add BKE_pchan_rot_to_mat3
Useful to get the un-scaled rotation from a pose channel.
2019-05-01 13:17:10 +10:00
340c564020 UI: move image paint panels into the image side-bar
- Move painting brush panels into the image side-bar.
- Add active tool panel to the image side-bar.
2019-05-01 12:35:00 +10:00
3ae872d9ab Fix T64049: Unset space type crashes 2019-05-01 11:48:39 +10:00
909665a0d4 ClangFormat: run with ReflowComments on source/
Prepare for enabling ReflowComments.
2019-05-01 11:13:14 +10:00
f70470b540 Cleanup: comments (long lines) in ikplugin 2019-05-01 11:01:20 +10:00
c7041403d0 Cleanup: comments (long lines) in compositor 2019-05-01 10:51:13 +10:00
63f0e150ed Cleanup: comments (long lines) in draw 2019-05-01 10:51:10 +10:00
480a09a92f Cleanup: redundant lookup 2019-05-01 08:49:35 +10:00
3482e136bf Fix error storing proportional editing for redo
Missed in recent changes to proportional edit mode.
2019-05-01 08:31:18 +10:00
Dalai Felinto
b7277aac72 Outliner: Fix "Unlink" not working for parented objects
How to reproduce it:
* Parent an object to another in the same collection.
* RMB the child object and try to "unlink" it.
2019-04-30 19:20:53 -03:00
910b886747 Cleanup: comments (long lines) in modifiers
Also remove duplicate comments in headers.
2019-05-01 08:04:52 +10:00
163fb251b9 Cleanup: comments (long lines) in compositor 2019-05-01 07:58:27 +10:00
1e8697cd80 Cleanup: comments (long lines) in freestyle 2019-05-01 07:58:27 +10:00
5ca8ac51d0 Cleanup: indentation from braces in '#if 0' 2019-05-01 07:58:27 +10:00
Dalai Felinto
ab33692bc2 UI: Collections Visibility panel tweaks
1. No need to repeat the title inside the panel (this was needed when we
had this as a popup menu).

2. No need to call it "Collections Visibility" since we are already
under the "View" category. It is "Collections" now, short and sweet.
2019-04-30 18:21:58 -03:00
20a8b07561 Fix broken build from recent rBae7db030dab0. 2019-04-30 22:17:32 +02:00
Dalai Felinto
d4126238b4 Cleanup/update comment on flag_legacy values 2019-04-30 16:48:07 -03:00
Dalai Felinto
1aa093ce9c Fix T63343: Duplicated object is hidden whereas it should not
We were mixing ob->flag and ob->base_flag.
We shouldn't be using ob->flag & SELECT in 2.8x.
2019-04-30 16:48:07 -03:00
Dalai Felinto
ae7db030da Stop using deprecated ob->flag & SELECT
We still have base->flag_legacy & BA_WAS_SEL for the few cases we really
need to have a per-object selection check (used in the transform code).
2019-04-30 16:48:07 -03:00
Dalai Felinto
2d32372c59 Remove BKE_scene_object_base_flag_sync_from_object
Note the fix for T62865 is still working fine.
2019-04-30 16:48:07 -03:00
Dalai Felinto
088d59c3d3 Refactor: Use object select API - ED_object_base_select
We had a mix of BKE_view_layer_base_select (harmless), and places where
we simply set the BASE_SELECTED flag with no regard to its selectable
state.
2019-04-30 16:48:07 -03:00
Dalai Felinto
c7452f14c5 Grease Pencil: Fix using wrong flag for selecting objects on convert
The correct fix should be to use ED_object_base_select() but I'm leaving
this to a separate pass.
2019-04-30 16:48:07 -03:00
Dalai Felinto
7388856318 Cleanup: Object base syncing already happening as part of ED_object_base_select
No functional change.
2019-04-30 16:48:07 -03:00
22cc69ace8 Industry Compat Keymap: Fix Knife tool
Was adding new cuts automatically.
2019-04-30 20:56:13 +02:00
2fd6e855a5 GPencil: Small tweak to Dot minimum thickness
This was changed in a previous commit to 1.0, but a value of 0.5 works better.
2019-04-30 17:49:28 +02:00
9a4fd6da0f Fix T63864 Duplicate Data options don't exist for Light Probe and Grease Pencil
See revision D4766
2019-04-30 17:37:16 +02:00
d48a2f4a37 Select: Add 'deselect on nothing' to NLA editor.
Should be last part of T63995.
2019-04-30 17:20:21 +02:00
26bc7414f7 Tweak to previous 'deselect on nothing' commit for Graph editor.
Better code, more in line with the one from action and NLA, and less
verbose.
2019-04-30 17:17:34 +02:00
a5df2a9b63 Fix (unreported) two memleaks in clic-select ops of Action and NLA editors. 2019-04-30 17:05:34 +02:00
b1f7647236 Select: Add 'deselect on nothing' to Action (dopesheet) editor.
Also removed annoying console error when clicking outside of valid range
of channels, that is no error at all. ;)

Part of T63995.
2019-04-30 16:51:44 +02:00
de38778535 Select: Add 'deselect on nothing' to Graph (fcurves) editor.
Part of T63995.
2019-04-30 16:26:31 +02:00
86ff61f853 Select: Add 'deselect on nothing' to UV editor.
As with mask, when this is enabled there is now a maximum click distance
from an item to actually select it.

Part of T63995.
2019-04-30 16:09:58 +02:00
40b66ac2a6 Fix proportional editing always enabled if the property exists in the
operator

Fixes T64010, T64011

Reviewers: brecht

Maniphest Tasks: T64010, T64011

Differential Revision: https://developer.blender.org/D4764
2019-04-30 15:29:31 +02:00
34944a2035 Refactor markers drawing
This will make it easier to move the markers area somewhere
else (to the top) in a separate step.

There should be no functional changes, only minor UI changes.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4745
2019-04-30 14:17:53 +02:00
7f0b122b66 Refactor: Separate scrollers from text drawing in API
This is a continuation of rB7fdffd735ff24, where I separated the
e.g. frame number drawing from scrollers internally.
This patch changes the API, so that space draw handlers
have to draw these numbers explicitely.

This greatly simplifies the scrollers API for all spaces
that just need scrollers without any frame numbers.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4747
2019-04-30 14:10:53 +02:00
2445d5abc2 Fix T63393 Eevee: Specular Shader's Clear Coat does not function 2019-04-30 14:07:22 +02:00
d1f6ea2793 Sequencer: Scene Strip Performance
- Merged SEQ_OFSDRAW with V3D_OFSDRAW and define in the
       DNA_view3d_types: Due to this FSAA always kicked in making the
       rendering slow.
     - Removed `Texture Solid` and `DOF`.
     - Now when chosing Solid rendering the settings
       of the original scene is used.
     - Added a global override to use scene specific shading. In the
       Future we will need to enhanced this so user can change the
       settings.
     - Added support for LookDev. LookDev crashed as it needed the
       `evil_C` what was not set
     - LookDev mode will always show the scene + world lights.

Reviewed By: brecht, fclem

Maniphest Tasks: T62517

Differential Revision: https://developer.blender.org/D4738
2019-04-30 14:01:22 +02:00
3e780507bd Fix T63759 Vertex Bevel works for width and depth offset types.
From D4719 by George Vogiatzis (Gvgeo).
2019-04-30 07:13:22 -04:00
e15c8ee447 Fix T64003: cannot enter object dimensions above 10000
When this button was still RNA based it was FLT_MAX (that changed to
10000 in rB1b8c3774a86e)

Reviewers: brecht

Maniphest Tasks: T64003

Differential Revision: https://developer.blender.org/D4763
2019-04-30 12:58:35 +02:00
e8daa61570 DRW: Add debug utility for batch cache requests 2019-04-30 12:55:03 +02:00
782917648f Fix T64009 Normal Maps not working on EEVEE
Was missing a flag from recent refactor.
2019-04-30 12:55:03 +02:00
Harley Acheson
395fa5eb4c Fix T63912: don't collapse menu separators for pie menus
Differential Revision: https://developer.blender.org/D4748
2019-04-30 12:40:24 +02:00
80c3501d19 Fix T63865: Animated Influence slider of NLA Strip doesn't update
Add special case to construct PointerRNA from evaluated NLA strip
to an original one when flushing animation back to the original ID.

Reviewers: brecht

Maniphest Tasks: T63865

Differential Revision: https://developer.blender.org/D4762
2019-04-30 12:10:18 +02:00
73e8d1096a Depsgraph: Store pointer to original NLA strip
Similar to modifier data and particle systems.
2019-04-30 12:10:18 +02:00
56fd032393 T63854: Grease Pencil strokes appear too thick in the viewport when using texture mode
There was an arbitrary size limit of 4 pixels.
2019-04-30 11:59:48 +02:00
7a0b3f927c Select: Add 'deselect on nothing' behavior to tracking editor.
Part of T63995.
2019-04-30 11:34:22 +02:00
7f4836a0a7 Cleanup: typo in func name. 2019-04-30 11:34:22 +02:00
7f75017635 Cleanup: make 'deselect_all' properties PROP_SKIP_SAVE.
Forgot to do that for some in previous commits, that kind of props are
better with 'skip save' behavior (simpler to handle in keyconfigs).
2019-04-30 11:34:22 +02:00
080d72a257 Select: change Sequencer to match new behavior of 'deselect on nothing'.
Note that unlike some others, this is always enabled for sequencer,
since previous (2.7x) code was already deselecting everything when
clicking in an empty area...

Part of T63995.
2019-04-30 11:34:22 +02:00
e4b9836c53 Cleanup: Remove pre-2.5 ifdef'ed piece of code. 2019-04-30 11:34:22 +02:00
ab62a5db49 Select: add 'select on nothing' to Outliner.
Althought this has limited usability currently (only 'nothing' area in
Outliner are empty lines below last entries), better for consistency to
have it here too.

Part of T63995.
2019-04-30 11:34:22 +02:00
a17d1e4bc8 Cleanup: use bool literal for booleans. 2019-04-30 11:34:22 +02:00
3d0864200d Cleanup: make outliner_item_do_activate_from_cursor() static.
This function is only used in one place in one file, no point exposing
it in internal header currently...
2019-04-30 11:34:22 +02:00
3644fef07c Select: Add 'deselect on nothing' to nodes selection.
Part of T63995.
2019-04-30 11:34:22 +02:00
aa6a0409eb Select: proper handling of 'deselect on nothing' for GPencil edit mode.
Was unconditionnaly behaving that way, now use proper common setting to
control whether we should deselect everything when clicking on an empty
area.

Part of T57918.
2019-04-30 11:34:22 +02:00
9586c23d75 Select: support 'diselect on nothing' for masks.
Also moved that operator option from 3d-view op to generic
WM_operator_properties_mouse_select() helper, and renamed its label
(since 'Deselect' is already in use).

Part of T57918.
2019-04-30 11:34:22 +02:00
d7e2fe275d Depsgraph: build bbone operation if bone segments has animation
This is a part of T61296: Crash with animated b-bone segments.

Consider animated/driven bendy bones segments as something what requires
special bendy-bones operation and relation in the dependency graph.

This is because it is more beneficial from a performance point of view
to not build operations if they are not needed. But if the property is
animated it is not possible to make any reliable decision based on just
a property value.

Differential Revision: https://developer.blender.org/D4739
2019-04-30 11:32:02 +02:00
6bbb82cf79 Depsgraph: Use new animation cache for visibility check
Should be no functional changes, just switching code to use more
generic checks now.

One thing which goes a bit deeper than that is check for whether
base is a part of dependency graph. This is now done by explicitly
tagging corresponding ID node (of an object) rather than doing
animation check again.
2019-04-30 11:32:02 +02:00
c8f3377d03 Depsgraph: Add generic animated properties cache
Allows to speed up lookups like "is property FOO of data BAR animated".
Can be used to optimize object's visibility check, but also allows to
check animation on bones without too much of time penalty.

The cache is shared between both nodes and relations builder.

Currently is not used, just a boilerplate for an upcoming changes in
an actual logic.
2019-04-30 11:32:02 +02:00
587ee46d88 Depsgraph: Expose set type available
Is way easier to use than a GSet and less proone for errors.

If we really want GSet to always be used, should make some C++
wrapper.
2019-04-30 11:32:02 +02:00
4d889897ba Fix T63592 issue with control points.
This is a missing fix in previous commit of this task.
2019-04-30 11:27:33 +02:00
546e20f5a2 UI: show transform options in image header when topbar is hidden
Matches 3D view behavior.
2019-04-30 15:04:07 +10:00
e83d4d9637 UI: reorganize proportional editing options
- Move connected & projected into individual toggles.
- Top-level proportional editing button now only toggles.
- Use popover for proportional edit-mode falloff and options.

Note that it's no longer possible to toggle connected via key bindings,
although this could be supported again if it's needed.

Resolves T58081
2019-04-30 14:48:39 +10:00
95a9646c00 Cleanup: comments (long lines) in physics 2019-04-30 14:48:18 +10:00
5d7ee02b17 Cleanup: comments (long lines) in collada 2019-04-30 13:41:21 +10:00
d9fb06f876 Gizmo: display axis in camera view
User request to see axis even when in camera view,
it's also useful when the camera is locked to the view.
2019-04-30 10:51:14 +10:00
0470818411 Fix T59848: precisely represent the dependencies of Armature modifier.
When the modifier uses vertex groups, the set of the bones it actually
needs is precisely defined by the set of the group names. If envelopes
are enabled, this refinement is not available, because any bone can
potentially be used.

This can be used in the dependency graph construction to allow objects
deformed by a part of the armature to be used in constraints on other
bones, e.g. for placing cartoon-style face elements on top of the body
mesh via Shrinkwrap constraints.

Since the list of vertex group names is now used as an input by
the dependency graph, adding/removing/renaming groups should now
be triggering a graph rebuild.

Differential Revision: https://developer.blender.org/D4715
2019-04-29 20:52:11 +03:00
413ffd4606 DRW: Batch Cache: Add Loop normals calculation flag and cleanup style
Improve selection time since it bypass BM_loops_calc_normal_vcos when mesh
uses auto-smooth.
2019-04-29 18:51:07 +02:00
c7767f1bcf DRW: Improve edit mode selection time when using auto-smooth
Unfortunately it does not concern paint mode.

Related to T63946
2019-04-29 18:51:07 +02:00
88e20c663c DRW: Speedup: Improve time to validate batch cache
This is a small improvment but is does scale up with the number of objects.
This improvement *does not* speedup geometry update.
2019-04-29 18:51:07 +02:00
fa5dd59f98 Industry Compat Keymap: Small fixes
- Use W for Move in Sequencer
  - Use correct shortcut for sidebar in Sequencer
  - Remove inconsistent shortcut for adding nodes
2019-04-29 17:21:38 +02:00
a494be2f2e Fix T63979: GPencil control points hidden in orthographic mode 2019-04-29 17:20:54 +02:00
11b65b4ade GPencil: Improve Fill Tool speed (6 times faster) in complex files
There was a double loop when drawing the offscreen data for the fill tool. This loop did an exponential drawing, slowing a lot the process.

For example, one file was using 7.39 seconds and now use 1.20 or less to do the same process.

The fix is more noticeable with big files, reducing exponentially the time used by the tool. For very simple files the speed change can be unnoticeable.

Aso fixed a hidden bug with stroke opacity that it was unnoticeable due the double loop.
2019-04-29 16:24:41 +02:00
98a717eb20 UI: move properties panel into 'Item' category 2019-04-30 00:14:40 +10:00
7ae47e58cb Cleanup: Spelling in comment 2019-04-29 15:52:39 +02:00
a03e16224b Missed last commit (workspace template checks) 2019-04-29 23:48:39 +10:00
17a4decfea UI: top-bar reorganization
This hides the top-bar by default for everything
besides paint/sculpt workspaces.

- Use the top-bar mainly for active tool settings &
  popovers panel options.
  (transform / snap settings are an exception for this convention).
- Only show the top-bar (by default)
  in paint work-spaces (sculpt / texture-paint / grease-pencil).
- Add an active-tool panel to the sidebar.
- Split 3D view tabs into (Item / Tool / View).

D4721 with minor changes.

Further work is needed for the top-bar and image-editor.
2019-04-29 23:35:13 +10:00
1c4fa32db6 Fix: Dopesheet context menu was referencing easing_type
This only exists in Graph Editor.
2019-04-29 15:12:42 +02:00
e65216c622 Industry Compat Keymaop: Clear use of Tab in remaining editors
This makes it possible to use Tab for operator search everywhere.
2019-04-29 15:11:33 +02:00
d055b48e31 Fix T63592: Grease pencil - Guides still active in Fill mode
Enable guides only for Draw tool.
2019-04-29 13:20:25 +01:00
f9ee08610a Cleanup: comments (long lines) in misc libraries 2019-04-29 22:06:26 +10:00
bbbf166430 Cleanup: comments (long lines) in alembic 2019-04-29 22:06:26 +10:00
ee192a35e8 Cleanup: comments (long lines) in bmesh 2019-04-29 22:06:26 +10:00
d17e07274a Cleanup: comments (long lines) in nodes 2019-04-29 22:06:26 +10:00
a57fec986d Depsgraph: fix dependencies for drivers and animation on Bone properties.
The driver code was almost there, but didn't work because ID nodes
have no outlinks - and using links won't be safe anyway because of
ordering issues. Instead, just loop over all IDNodes.

Animation is fixed simply by referring to ARMATURE_EVAL instead of
BONE in construct_node_identifier - the bArmature ID doesn't have
BONE components in any case, so the old identifier can't work.
2019-04-29 13:32:11 +03:00
788bbac5bd Depsgraph: fix handling of driver variable dependencies with proxies.
During driver var evaluation, the code directly skips to the proxy
object if present, so the dependencies should reflect that, instead
of inventing extra relations to pretend as if the values were
first copied from the proxy - they actually aren't.

The invented dependencies can't work without cycles in complex but
meaningful cases, e.g. drivers on armature data that depend on pose.

This alters the changes from 72cbf966fb to be more correct.
2019-04-29 13:09:20 +03:00
778542fd8f Cleanup: comments (long lines) in python 2019-04-29 20:01:10 +10:00
c7f67d60fb Cleanup: comments (long lines) in editors 2019-04-29 19:29:41 +10:00
9bb47c512f Industry Compat Keymap: Use correct keys for transform in the Dopesheet
Support WER inside this editor.
2019-04-29 10:51:49 +02:00
ea940bcb53 New BLI_NOINLINE macro
This macro is handy in at least two occasions:
* When you want to check the optimized generated assembly for
some small function that would get inlined otherwise.
* The marked function will be visible in profiling results.

I can't test the implementations for other compilers now,
so I did not include them.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4754
2019-04-29 10:46:04 +02:00
383fef9f10 Fix T63616: applying armature modifier with another modifier under it doesnt apply right.
Some deform modifiers (like armature) use passed Mesh parameter to
retrieve some extra data (vgroups in our case), and default to obdata
when it is not available.

This should be fine in theory in the 'apply modifier to obdata' case,
since this is always the first modifier, but here upper-level code
passes **evaluated** object, not orig one, so ob->data is not orig
anymore, and might miss some stuff...

Note that am quiet unsure whether the way evaluated data is passed
around in that apply modifier operator code is actually OK, but for now
it seems to work at least...
2019-04-29 10:08:16 +02:00
f54192e09a Cleanup: internal apply modifier code: make it clear we use eval modifier and object. 2019-04-29 10:03:58 +02:00
564ffc060b Fix T63963: Top-bar not showing for some files 2019-04-29 17:32:39 +10:00
94b7e1dcc6 Fix T63112: Gizmos fail to restore last cursor 2019-04-29 16:43:51 +10:00
c8bcddedff Fix T63977: UV select linked has no attribute 'extend'
Also enable undo + register for select linked.
2019-04-29 16:00:39 +10:00
90a06259ee Fix T63503: Set parent menu shown twice
When the 'type' property is set,
execute the operation instead of showing the menu.
2019-04-29 15:42:36 +10:00
d2859237fa Fix T63898: "Open on Mouse Over" causes inconsistent draw-style 2019-04-29 15:25:56 +10:00
14897fb653 Cleanup: spelling 2019-04-29 14:14:14 +10:00
8821757d0d Fix region action zone not working when hidden
Introduced in recent fix for T61554
2019-04-29 13:47:11 +10:00
dc2ce40c95 Docs: expand action-zone type comments 2019-04-29 13:45:49 +10:00
8b11b8b3cf Fix shift-click to select multiple reports
D4751 by @Poulpator
2019-04-29 12:56:45 +10:00
bdefce0b21 GTest: BLI_path_util tests
Unit tests for:

- BLI_path_extension_check
- BLI_path_frame_check_chars
- BLI_path_frame_range
- BLI_path_frame_get

D4749 by @zazizizou
2019-04-29 12:51:33 +10:00
f2acf3bab6 Cleanup: use 'use_' prefix for RNA booleans 2019-04-29 11:26:17 +10:00
337cac760b VSE: Cache rewrite
This patch implements new cache system.
Aim is to give user more control over cache, so it can be maximally
utilized. This is done through sequencer timeline side panel
in category proxy & cache.
Cached images are also visualized in timeline, controled by
sequencer timeline view->cache menu

Functional changes:
 - NOT use IMB_moviecache API
 - refactor names of cached image types
 - each scene owns 1 sequencer cache
 - merge preprocess cache into per-sequencer cache
 - cache links images rendered per frame in order as they are created
 - add cache content visualization tool
 - add RNA properties to control the cache

More info can be found in design notes in blenkernel/intern/seqcache.c
and in https://developer.blender.org/D4443

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4443
2019-04-28 14:50:48 -07:00
1b65ec0a9b GPencil: Cleanup - Rename annotation drawing function names
Actually, the static functions had the same name used for grease pencil.

Now, the annotation functions have a different prefix.
2019-04-28 20:14:20 +02:00
Tomoaki Kawada
9e3246ce6e Fix T63794: duplicating an armature clears B-Bones' custom handle references.
This patch fixes T63794 by updating duplicated bones' custom handle references
to point to the new armature's bones.

The problem occurs because B-Bones of a duplicated armature keep pointing to
the old armature's bones. The references are cleared upon entering Edit Mode
because there are no matching `EditBone` for such bones, and `find_ebone_link`
just returns `NULL` in such cases.

Reviewers: mont29, angavrilov

Maniphest Tasks: T63794

Differential Revision: https://developer.blender.org/D4726
2019-04-28 17:05:37 +03:00
91bb8da59f Cleanup: clangg-format for rB157cc54ed521 2019-04-28 11:48:55 +02:00
d2f1705b15 Fix T63936 GPUSelect: Read depth in the end
fix T63936 introduced  in 86914e7133.

Reviewers: fclem

Reviewed By: fclem

Tags: #bf_blender

Maniphest Tasks: T63936

Differential Revision: https://developer.blender.org/D4750
2019-04-27 20:37:29 +02:00
6cb90d180f Fix T63937: unconfirmed grease pencil strokes not visible in ortho suface
The value of the z-depth was too high. Now the value is valid for perspective and orthographic view.
2019-04-27 19:27:20 +02:00
19ebee657e GPencil: Cleanup derived frame code
This is a previous step to move away the derived frame logic to be used in edit modes.
2019-04-27 12:02:26 +02:00
aa42da0385 Cleanup: comments (long lines) in blenkernel 2019-04-27 12:07:07 +10:00
fd1dd1134b Cleanup: unused vars 2019-04-27 10:00:43 +10:00
157cc54ed5 Fix T63899: Can't get sound.factory on Windows 2019-04-27 00:13:43 +02:00
1fa7d51f34 Eevee: Noise Texture: try to fix floating point accuracy issue
Cycles check for infinity and return 0.0 otherwise.
2019-04-26 18:37:24 +02:00
941575b1f7 Fix T63853: BLI_current_working_dir did not return utf8 encoding on windows.
When running blender in paths with special characters this caused issues.
2019-04-26 09:53:55 -06:00
0fddc48fb2 Minor cleanup in data transfer code. 2019-04-26 17:21:10 +02:00
8973d1e769 Fix T63660: Data Transfer of normals No Longer Working.
Logic about computing of poly normals in final stage of modifier stack
evaluation was broken, giving also wrong loop normals.
2019-04-26 17:21:10 +02:00
8192bcd7c1 Fix T63886 Crash in UV Editing after faces display turn off / on
This patch also improve cache locality of the IBO filling. I did not benchmark if it made
any difference.
2019-04-26 17:03:25 +02:00
fe7605b710 Cleanup: Armature 2019-04-26 16:47:26 +02:00
7a48e25003 Armature: Speedup by removing unecessary check
drw_batch_cache_generate_requested() is only needed when the geom needs to be
created.

Went from 37fps to 47fps with artificial testcase (lots of bones with one custom shape). Baseline 2.79 is 24fps.

Also fix the drw_shgroup_bone_custom_wire.
2019-04-26 16:37:15 +02:00
d4827cfa81 Fix T58966 Sculpted changes dissapear visually when selecting a second object
Display sculpt mesh if there is a sculpt session.
2019-04-26 16:17:35 +02:00
86914e7133 GPUSelect: Don't read depth on every draw
If the draw uses the same id as the previous draw, there is no need to read the depth
buffer at this point, avoiding a CPU-GPU sync bubble.

Fixes T62511 Selection is significantly slower in production scenes.
With this patch glReadPixels is not the bottleneck. Regular drawing Is still very
slow so I would suggest fixing the regular drawing first before trying to
improve the selection algorithm.
2019-04-26 15:33:49 +02:00
50d75cd528 Fix T62880 Severe FPS drop with multiple bone shapes
Fix instancing batches not being reused by custom bone shapes.

Drawing thoses is now faster than 2.79 (40fps instead of  30fps)
2019-04-26 15:33:49 +02:00
03d482d212 Fix T63896: Removing Drivers in Python Leads to Crash
Adding and removing drivers must always tag relations for update.
2019-04-26 15:31:13 +02:00
7440f98f98 Fix T63897: GPencil Material Presets showing error
This error was introduced in a previous commit with the rename of the parameter.

Also added some missing values.
2019-04-26 10:14:50 +02:00
513b71c89a Keymap: Support shift-click to select multiple reports
Also support drag for box-select, matching the outliner.

D4660 by @Poulpator with edits.
2019-04-26 16:00:27 +10:00
20c5f677d7 Cleanup: clang-format 2019-04-26 13:04:23 +10:00
e10884323e Cleanup: unused variable warning 2019-04-26 13:02:44 +10:00
16639c6f1a Fix T63784 Eevee : Black Diffuse with Principled BSDF and Mix Shader
This was cause by the SSS energy being lost when using SSRefraction. Also the mix
shader did not merge the discarded SSS light into the radiance.
2019-04-26 00:14:28 +02:00
ce148c1374 Cleanup: Node shader texture image 2019-04-25 23:23:27 +02:00
e85eb51a28 AVI: Fix buffer overflow
That was causing crashes when loading uncompressed avi files created with blender 2.79.
2019-04-25 23:23:26 +02:00
56b0cd1db6 Fix T63605: Assert squeezing a template_curve_mapping in a panel to
almost zero horizontally

Reviewers: brecht

Maniphest Tasks: T63605

Differential Revision: https://developer.blender.org/D4690
2019-04-25 21:59:05 +02:00
Bruno Boaventura Scholl
b4c14faeaf Text editor: convert tabs to spaces on paste
If the Tabs as Spaces settings is enabled for the text block. This avoids
issues with inconsistent indentation when pasting Python code from another
source.

Differential Revision: https://developer.blender.org/D4512
2019-04-25 19:25:58 +02:00
George Vogiatzis
4d1128872e UI: keep timeline collapsed to header size when resizing window
This restores functionality lost with e8c9e85401.

Differential Revision: https://developer.blender.org/D4714
2019-04-25 18:19:54 +02:00
George Vogiatzis
7f45e79e1a Cleanup: remove unneeded screen_refresh_headersizes
screen_geom_vertices_scale already checks if areas are too small for header.
And header size will be set in region_rect_recursive from ED_area_initialize.

Differential Revision: https://developer.blender.org/D4711
2019-04-25 18:19:54 +02:00
Harley Acheson
5a10552745 Fix small outliner drawing performance regression
Differential Revision: https://developer.blender.org/D4712
2019-04-25 18:19:54 +02:00
Harley Acheson
b89cabb300 UI: hide redundant menu separators automatically
Differential Revision: https://developer.blender.org/D4682
2019-04-25 18:19:47 +02:00
905f2d84af DRW: Use culling when selecting
The culing still seems to be off but at least it is enabled now.
2019-04-25 17:27:21 +02:00
21aa4d73bf DRW: Cleanup: use iter_flag const for readability 2019-04-25 17:27:21 +02:00
c04dcde0ba Fix T63846: In Orthographic View, unconfirmed Grease Pencil strokes do not appear in front of Reference Images
In orthographic, the z-depth was wrong.
2019-04-25 17:11:58 +02:00
dedd3338d6 Cleanup: remove verbose debug print 2019-04-25 16:31:02 +02:00
4c14d820e3 Tracking Pie Menus for Blender 2.8
This patch adds 4 pie menus to space_clip.py, as discussed in T57912.

Differential Revision: https://developer.blender.org/D4284
2019-04-25 16:07:15 +02:00
7c6c5b40ca Sequencer: use Alpha Over blend mode by default
Reviewers: ISS, brecht

Differential Revision: https://developer.blender.org/D4737
2019-04-25 15:23:53 +02:00
2947888eae Industry Compat Keymap: Support box select for more tools with gizmos
-Extrude Region
-Spin & Spin Duplicates
-Shear

Again, MMB is used here to execute the tool outside the gizmo perpendicular to the view
2019-04-25 15:08:33 +02:00
b77c10b45c Merge branch 'blender2.7' 2019-04-25 14:31:45 +02:00
10c4bde792 Fix T63494: linked scenes missing from sequencer Add > Scene menu
Differential Revision: https://developer.blender.org/D4674
2019-04-25 14:29:26 +02:00
Harley Acheson
0d26bb7672 Fix inconsistent collection/object hide icon brightness in outliner
Differential Revision: https://developer.blender.org/D4679
2019-04-25 14:29:26 +02:00
eda7e84aac GHOST: remove OpenGL depth buffer, remove code for other unused buffers
Viewport drawing has moved to offscreen buffers, and we no longer need to have
depth, stencil, aa samples, sRGB buffers as part of the window. So all that
code is removed now. The depth buffer was the only one still being allocated,
its removal save a bit of memory.

Code by Germano and Brecht.

Differential Revision: https://developer.blender.org/D4708
2019-04-25 14:29:26 +02:00
9408023a81 Fix T63344: broken topology after sculpting with clay strips brush
Differential Revision: https://developer.blender.org/D4710
2019-04-25 14:29:26 +02:00
deb9d03fc9 Fix T63859: outdated info editor description
Contributed by EitanSomething.

Differential Revision: https://developer.blender.org/D4735
2019-04-25 14:29:26 +02:00
92f5e52af3 Industry Compat Keymap: Support box selecting while the transform tools are active
Similar to many apps:
  - Use left click and drag to box select
  - Hold modifiers like Ctrl and Shift to remove or expand selections
  - Use MMB-drag to use the tool outside of the gizmo area

In the future it would be nice if the transform tools would have this increased flexibility built-in so you could configure it more easily, but this setup seems to at least make it do the most commonly useful thing by default.
2019-04-25 14:12:17 +02:00
Alex Fuller
2adf4b401e Fix for Cycles UV adaptive subdivision after float2 changes.
Differential Revision: https://developer.blender.org/D4717
2019-04-25 14:05:33 +02:00
7e18aa4250 Fix T63524: crash selecting an object in texture coordinate node
Using mat4 in a uniform buffer object was not properly supported.
2019-04-25 12:13:26 +02:00
38a0896f15 Overlay: Mesh Analysis
Enabling the drawing of the mesh analysis overlay.
Currently the settings are part of the scene toolsettings. What makes sense,
for 3d printing, but does not fit well with the per viewport blender 2.80
overlays.

Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D4707
2019-04-25 11:25:22 +02:00
486d9356ba Fix opening files from splash screen 2019-04-25 11:03:09 +02:00
6d09fa3577 DynamicPaint: Remove Previews
Modifier previews should be implemented by a more generic system.
The current system is already a hack and needed a lot of work
to get it working again in 2.80 and even so that would be replaced by
another system in the near future.

For Vertex Colors we have a work around in place by using Workbench
Vertex Colors. For Vertex Weights we loose the previewing. Not sure
targetting weight is working (even for 279).

Reviewed By: brecht

Maniphest Tasks: T63857

Differential Revision: https://developer.blender.org/D4734
2019-04-25 08:02:18 +02:00
Dalai Felinto
78f8679cfc Outliner parenting hierarchy: Sort for children when not a-z sorting
We always keep the children that are not in a collection listed in the
end of the children list due to design. This way we can visually draw
them with dashed vertical lines.

This was already working for alphabetical sorting, however whenever
sorting was disabled, we would end up with a list of children ordered
regardless of their state (whether the child itself is in the collection).
2019-04-25 01:47:24 -03:00
Dalai Felinto
edff789292 Fix T63869: Crash in new outliner show parenting hierarchy
As known as outliner parenting hierarchy take two.
Implemented suggestion by Brecht Van Lommel:

```
The problem is that it's iterating over te_parent->subtree,
while at the same time removing elements from it as tree_to_remove_objects_from.

Further there is a linear lookup to find tree elements corresponding to a child
object, which causes O(n^2) time complexity overall and so poor scaling for many
objects in a collection.

The more efficient solution that also fixes the crash could be:

* Build a map from Object* to a list of TreeElement* matching the object.
* For all objects in the tree lookup the parent in this map, and move or add
  tree elements as needed.
```

I removed the grouping of the children not in collection in the end of
the children list when sorting was not enabled. If we think we really
need it back it can be tackled separately.

That said, despite due to performance reasons, I can't see why would
someone not have the a-z sorting enabled. And if they do, it is not the
end of the world to have interleaved children that are in the collection
or not in the parent subtree.
2019-04-25 01:23:41 -03:00
fbb03f67ec Fix T63528: Alembic export always showing error on macOS, even on success
tellp() is not valid to check if the string stream is empty. Just get the
string directly as there is no obvious efficient method to check otherwise.
2019-04-25 03:46:11 +02:00
2fabbe3108 Cycles: tweak preferences text when no compatible GPUs are found
Try to make it more clear that this only affects Cycles, many users seem to
miss the panel title.
2019-04-25 03:46:11 +02:00
d966c2f0c2 Fix T63869: disable outliner show parent hierarchy temporarily
This is likely to cause crashes in many file, so disable this feature until
it is fixed.
2019-04-25 00:25:06 +02:00
78e3a7b353 Cleanup: fix compiler warning 2019-04-25 00:24:17 +02:00
5d9d32fd1f Fix T63841: armature with X-axis mirror does not mirror bbone scale
Reviewers: brecht

Maniphest Tasks: T63841

Differential Revision: https://developer.blender.org/D4733
2019-04-24 22:29:17 +02:00
a14735d11d Fix T61184 linked curves with curve modifiers arent drawn correctly
Force Displist to Mesh conversion if there is any modifier.

This is until we find a better way to store the batches per objects.

Also fix draw cache functions that were not returning final mesh edges.
2019-04-24 19:11:36 +02:00
c265e25bb1 Correct switched values in the previous commit. 2019-04-24 13:31:35 -03:00
fa4201f82d Fix T62701: Hair edit mode crashes on some old AMD Radeon drivers.
The crash is related to the format, but the real reason is unknown.
2019-04-24 13:19:02 -03:00
ca41548626 UI: Simple confirm dialog when loading new file
I also had to make the "New" operator a submenu in the
`File Context Menu`, so that you can still select the template.

This partially solves T61599. Currently the confirm dialog
is not shown when an already existing file is opened.
Implementing that requires a bit more work and will be
done in a separate patch.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4732
2019-04-24 17:45:34 +02:00
ea80264381 Refactor: allow event handlers to have a poll function
Previously only a fixed bounding box could be used.
This was not flexible enough.
T63193 will benefit from this refactor.

Reviewers: brecht, campbellbarton
2019-04-24 17:34:48 +02:00
7a92b8820b Cycles: remove hair minimum width support.
This never really worked as it was supposed to. The main goal of this is to
turn noise from sampling tiny hairs into multiple layers of transparency that
do not need to be sampled stochastically. However the implementation of this
worked by randomly discarding hair intersections in BVH traversal, which
defeats the purpose.

If it ever comes back, it's best implemented outside the kernel as a preprocess
that changes hair radius before BVH building. This would also make it work with
Embree, where it's not supported now. But it's not so clear anymore that with
many AA samples and GPU rendering this feature is as helpful as it once was for
CPU raytracers with few AA samples.

The benefit of removing this feature is improved hair ray tracing performance,
tested on NVIDIA Titan Xp:

bmw27: +0.37%
classroom: +0.26%
fishy_cat: -7.36%
koro: -12.98%
pabellon: -0.12%

Differential Revision: https://developer.blender.org/D4532
2019-04-24 14:39:47 +02:00
Dalai Felinto
5f888e65c3 Outliner: Show parenting hierarchy in view layer view
If the "Object Children" filter is enabled, we nest the object children inside
the object. If the child itself is not in the collection, it is grayed out,
connected by a dash line, and its restriction flags and contents are not shown.

If "Object Children" filter is disabled, it works as before.

Note: This is not super fast, but at least we traverse the tree only once to get the
children of an object. That said, there is a lot of loops going on here.

Task T63526.

Development notes:
I could use the GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR shader, but
that would mean I would need to iterate over the tree twice (once for
each shader) - or do some bigger refactor.

Also I could not get that shader to work. This shader expects float
vertices while the current one is using integers, so converting the code
would make the dash line drawing to diverge from the regular lines even
further.

Differential Revision: https://developer.blender.org/D4696
2019-04-24 11:42:55 +00:00
cc5a75d572 Cycles: move shader node versioning code to C
Shader nodes are now shared with Eevee, so makes more sense to have it in
the core and not be Cycles specific.

Fix T62415: issues with append/link of old Cycles settings.
2019-04-24 12:44:27 +02:00
d730e512ac Nodes: avoid slow and unecessary node group updates on file read
On file read we need to update group nodes in case the group they refer to
has changed its inputs and outputs. This had O(n^2) time complexity and was
updating all datablocks even if they did not change.
2019-04-24 12:44:27 +02:00
62421470ee Nodes: remove group node forward compatibility with version 2.66
Forward compatibility with that version is already long gone, and removing
it means we can avoid running some complicated code on every file read/write.
2019-04-24 12:44:27 +02:00
1978066e04 Nodes: better integrate node init and versioning in file reading
Node versioning code was added before there was a mechanism to do versioning
after lib linking. Now integrate with that system and make it less of a strange
exception. Node versioning is now skipped on undo, like other versioning code.
2019-04-24 12:44:27 +02:00
bde1561fc1 Fix T63566: Pop-up closes before mouse-over
Closely spaced buttons caused the curve clipping popup to close
before the cursor could mouse-over it.
2019-04-24 20:27:47 +10:00
cfe9c7b3bd Refactor: Separate template selection from read_homefile operator
This is a first step towards T61599.
This way the invoke function can be used for the confirm
dialog in a separate patch.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4723
2019-04-24 11:59:22 +02:00
8955ec6776 Fix T55326: Massive slowdown when animating material in a highpoly mesh
This is a dependency graph part, which is the last required bit to get the
issue solved after all the rest of the work done by Clement.
2019-04-24 11:29:45 +02:00
8ba4c38643 GPencil: Disable Stroke Textures in Solid mode
When solid mode is enabled, but Texture mode is disabled, the color of the stroke must not use the texture.
2019-04-24 11:27:34 +02:00
75919c9223 GPencil: Add small offset to follow the drawing path for single points
The offset added allows to generate a vector to determine direction. This direction will be used when rotate the object to rotate texture.

The solution is not 100% perfect, but it's far better that having an unpredictable rotation.
2019-04-24 10:45:08 +02:00
d7672ad0f7 Fix tool settings showing in the top-bar
Each spaces top-bar wasn't showing it's own active tool,
Remove RNA access to the workspaces tool since using it is error prone.
Eventually this should be completely removed.
2019-04-24 16:11:16 +10:00
2753959ed7 Cleanup: sort CMake include paths 2019-04-24 14:41:12 +10:00
1b839e85e1 Haiku: build fix
D4693 by @miqlas
2019-04-24 12:30:35 +10:00
200ba76495 Cleanup: remove unused transform tool
D4695 by @kamran
2019-04-24 12:08:07 +10:00
4312b47e83 Fix T63822: Sidebar tabs active area dead-zone #2
Take the entire gutter used for panel tabs into account.

Introduced in recent fix for T61554
2019-04-24 12:05:21 +10:00
411b5f3b10 Fix T63822: Sidebar tabs active area dead-zone
Clip on one axis for aligned regions to avoid tabs being clipped out.

Introduced in recent fix for T61554
2019-04-24 06:57:36 +10:00
2ffc3dfc09 Fix action zones getting out of sync with panel size
Change to recent fix for T61554
2019-04-24 06:16:47 +10:00
211c5b4429 Cleanup: correct rst string literals 2019-04-24 05:45:21 +10:00
ec57ff2800 Fix building with asan option and OSL.
When OSL is enabled, Cycles disables RTTI in some of its modules, which
then breaks vptr sanitizer (part of the 'undefined' sanitizer).

thanks to @brecht for helping tracking down the issue.
2019-04-23 21:00:40 +02:00
148c0aa0fa Fix T63178 Eevee animation render crash
If image buffer is not loaded and blender attempts to reload it (during
`BKE_image_acquire_ibuf`) over and over for each frame rendered.
When attempting this reload, image_load_image_file is calling
`BKE_image_free_buffers` and tag the Image to the (GPU) image_free_queue
(because this run on the rendering thread).

If the main thread decide to redraw the UI and go through `GPU_free_unused_buffers` they all get deleted and if that happens before the rendering thread use them ... segfault.

If I replace the environment textures with correct ones (the file does not seems to contain them), there is no crash when rendering.

I used a list of GPUTexture from blender Image to increase and decrease the
reference counter correctly.

This add very little memory and computation overhead.
2019-04-23 20:35:02 +02:00
d10205c1a7 GPUBuffers: Fix wrong assert
For good this time...

forgot to commit it in the previous commit rBedde48f57844.
2019-04-23 20:35:02 +02:00
f32902e6da Fix T63813: crash saving images on Windows
The danger of void pointers...
2019-04-23 19:06:17 +02:00
fe08e51094 Merge branch 'blender2.7' 2019-04-23 18:55:15 +02:00
c07bce5bf2 Fix T63796: Cycles OSL shader with closure not working in final render. 2019-04-23 18:53:37 +02:00
Dalai Felinto
1ab1d987fa Outliner draw: Fix using wrong flag to tag object on visibility change
Note: This doesn't fix any bug we know of, but it is the correct flag to
tag in this case.
2019-04-23 12:56:04 -03:00
80b036afab Depsgraph: make the dependency cycle report more readable.
Since it is a continuous cycle, there's no need to repeat the
name of the previous bone. Also, dot is a common symbol in object
and bone names, so use '/' instead for node nesting.
2019-04-23 18:29:41 +03:00
40baa2e2b3 GPencil: Add support for gradient to Box strokes
Before this options was only available to Dots mode.
2019-04-23 17:26:01 +02:00
8e861725dc Space_node: Add draw backdrop callback.
Add a callback to allow custom node editors to draw their own
backdrop.

Differential Revision: https://developer.blender.org/D4709

Reviewed by: JacquesLucke
2019-04-23 09:15:45 -06:00
58a1eb9a00 Depsgraph: fix standard IK target dependencies.
Targeting a different object always requires its transform,
and normally dependencies should go to the solver node.

ITASC is quite broken so special case it until fixed.
2019-04-23 17:47:17 +03:00
5a144c797a Fix T63816: Crash opening file with multiple view layers
Dependency graph will not be crated for view layers which were never visible.
2019-04-23 14:31:21 +02:00
7625fad9e9 B-Bones: remove hard limits on curve/roll/scale/ease properties.
I don't see any reasons why soft limits wouldn't be enough here.
2019-04-23 13:45:04 +03:00
ae054af14f Cleanup: rename the curveInX etc bbone DNA fields to curve_in_x etc. 2019-04-23 13:45:04 +03:00
624e93bbef B-Bones: split the Scale In/Out properties into X and Y values.
As far as I can tell, there is no technical reason why the B-Bone
segment thickness scaling can't be separated into two axes. The
only downside is the increase in complexity of the B-Bone settings,
but this is inevitable due to the increase in flexibility.

Updating the file is somewhat complicated though, because F-Curves
and drivers have to be duplicated and updated to the new names.

Reviewers: campbellbarton

Subscribers: icappiello, jpbouza

Differential Revision: https://developer.blender.org/D4716
2019-04-23 13:45:03 +03:00
c043ab1cf3 Fix T63233: Set default blur kernel radius to 2.
Reviewers: jbakker

Differential Revision: https://developer.blender.org/D4722
2019-04-23 12:31:37 +02:00
32fe79b9ee Cleanup: Fix comment for ImBuf->encodedbuffer 2019-04-23 12:27:55 +02:00
ee701baff8 Workbench: Support Active Vertex Color
Currently it is not possible to view the vertex colors of an object. To
optimize the workflow, workbench will need to support Vertex Colors.

The Vertex Colors is a new option in `shading->color_type`. When objects
do not have vertex color, the objects will be rendered with the
`V3D_SHADING_OBJECT_COLOR`.

In order to support vertex colors in workbench the current texture/solid
shading structure is migrated to a primary shaders and fallback shaders.

Fix: T57000

Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D4694
2019-04-23 12:05:33 +02:00
c9ed39925a Fix T63649: Action group expand setting for graph editor missing
I did not rename the other property to `show_expanded_dopesheet`
yet (as suggested in the report), because:
* Would break compatibility (haven't found any addon using it though).
* I'm not sure if this really only affects the dopesheet.
2019-04-23 11:24:55 +02:00
532f4366a5 Cleanup: minor changes to scrollbar checks
Remove some redundant comments & declare vars in for loops.
2019-04-23 17:16:18 +10:00
be3adb51de UI: ignore events in empty region overlap areas
- Resizable areas use 2D view bounds.
- Header uses the button bounds.
- A margin is added to avoid clicking between buttons.
- Region resize edges clamp to the 2D view bounds.

Resovles T61554
2019-04-23 16:51:00 +10:00
310f288bb0 UI: add ui_window_to_block_rctf, ui_window_to_region_rcti 2019-04-23 16:39:14 +10:00
4d5e83f608 UI: move auto_open clearing out of ui_region_contains_point_px
Prefer explicit call for menu buttons since it's confusing if only some
queries clear auto open.
Also queries shouldn't modify data.
2019-04-23 15:44:31 +10:00
3302fbaeb1 Cleanup: style, use braces for compositor 2019-04-23 11:22:25 +10:00
64b4b719eb Cleanup: style, use braces for imbuf 2019-04-23 11:22:22 +10:00
ac53291e1f Fix T63772: Movie clip toggle toolbar fails
D4718 by @Gvgeo
2019-04-23 10:00:48 +10:00
f2dc78f13f App Template: match screen names to workspaces
Doing this makes versioning workspace screens simpler.

This was already done for the default startup file.
2019-04-23 08:52:14 +10:00
36c2162660 Correct braces with ifdef's 2019-04-23 08:36:57 +10:00
Dalai Felinto
0e4e1d257c Rename: Separate: By loose parts > By Loose Parts 2019-04-22 10:10:19 -03:00
7d6a9b5517 Cleanup: style, use braces
Add braces for modules already using braces almost everywhere.
2019-04-22 19:48:17 +10:00
b102472551 Cleanup: style, use braces for nodes 2019-04-22 19:48:17 +10:00
735515a3f9 Cleanup: style, use braces for blenkernel 2019-04-22 19:48:17 +10:00
14a49950ff Cleanup: style, use braces for gpu 2019-04-22 19:48:17 +10:00
620b960d3d Cleanup: style, use braces for editors 2019-04-22 19:48:16 +10:00
bba60bb564 Cleanup: style, use braces for gpencil modifiers 2019-04-22 19:48:16 +10:00
775c8ce332 Cleanup: style, use braces for makesdna, makesrna 2019-04-22 19:48:16 +10:00
a25a7714c5 Cleanup: style, use braces for modifiers 2019-04-22 19:48:16 +10:00
6cc09d006a Cleanup: style, use braces for blenloader 2019-04-22 19:48:16 +10:00
6b3bf9e2a8 Cleanup: style, use braces for avi 2019-04-22 19:48:16 +10:00
67454a282d Cleanup: style, use braces for blenfont 2019-04-22 19:48:16 +10:00
f24bb62fc2 Cleanup: style, use braces for render 2019-04-22 19:48:13 +10:00
797539e76c Cleanup: comments (long lines) in render 2019-04-22 06:30:08 +10:00
380ce86a7f Cleanup: comments (long lines) in avi, blf & blt 2019-04-22 06:30:08 +10:00
c5862e0a06 Cleanup: comments (long lines) in gpu 2019-04-22 06:30:08 +10:00
024d40b504 Cleanup: comments (long lines) in makesrna 2019-04-22 06:30:08 +10:00
66c3a7c550 Cleanup: comments (long lines) in makesdna 2019-04-22 06:30:08 +10:00
e9a01c1d2f Cleanup: comments (long lines) in imbuf 2019-04-22 06:30:08 +10:00
faabf92a7e Cleanup: comments (long lines) in blenloader 2019-04-22 06:30:08 +10:00
cda4cd0705 Cleanup: comments (long lines) in blenlib 2019-04-22 06:30:08 +10:00
0ac990d088 Cleanup: comments (long lines) in editors 2019-04-22 06:30:04 +10:00
f8b2268f4f Fix error renaming Lamp to Light
Introduced in batch rename 3051e2f4ae.
2019-04-22 06:24:07 +10:00
c8fc23fdbe Fix T63698: Eevee crash after recent clang-format changes
Some GLSL compilers seem to not have problems with \ to break preprocessor
directives. I couldn't find other places with similar code, but fixing this
case by case is not ideal and the same issue may come up again.
2019-04-21 11:39:04 +02:00
93c19a5a2c Cleanup: comments (mainly long lines)
Comments after code can cause awkward line breaks.
2019-04-21 14:27:35 +10:00
9d72efe108 Merge branch 'blender2.7' 2019-04-21 03:08:58 +02:00
8982f0cfee Fix T62408: Cycles viewport adaptive subdivision hangs after updates
Backporting fix from the master branch.
2019-04-21 03:05:38 +02:00
1de3c81d26 Fix T63431: crash adding driver to a keyframed property with Ctrl+D 2019-04-21 02:35:50 +02:00
543614a17d Fix T63415: no Cycles displacement update when updating OSL code 2019-04-21 02:20:02 +02:00
a5d5f152dd Fix T63681: bad clipping of very long tooltips 2019-04-21 01:25:07 +02:00
92d93dd935 Fix T63686: missing data path for 3D cursor location and rotation. 2019-04-21 01:11:12 +02:00
b8bb0391d6 Fix T63764: error when using library.users_id() function
Fix suggested by Vilem Duha.
2019-04-21 01:03:29 +02:00
33df4b78d0 make.bat: remove --expand-tabs from "make format" on windows.
following the change on linux.
2019-04-20 13:10:30 -06:00
d37e530de5 Correct error in last commit 2019-04-21 04:58:52 +10:00
9a77fb553c UI: remove redundant row for header template
If it's members need to be aligned the template can handle it.
2019-04-21 04:50:47 +10:00
2fb9c8ef12 Cleanup: add missing macros to clang-format 2019-04-21 04:40:16 +10:00
6b9ce24338 GNUMakefile: disable tab expansion for 'make format'
This was only needed for initial migration.
2019-04-21 04:36:16 +10:00
d11d5403f0 UI Overlays: Align checkbox with slider for Wireframes, X-Ray, Shadows. 2019-04-20 19:01:46 +02:00
ae85eeda3e UI Overlays: One line layout for Mask opacity.
Saves one line of space and matches Wireframe, X-Ray, Shadows.
2019-04-20 19:01:03 +02:00
40d8a407d7 Fix invalid stack memory use with GPencil drawing 2019-04-20 15:13:40 +02:00
b24dfff9b7 Fix error in recent image preference change 2019-04-20 15:13:40 +02:00
f22397206f NLA: check that properties are animatable. 2019-04-20 14:59:52 +03:00
7cbb8f20a4 GPU: automatically draw images with GLSL shader depending on resolution
This adds a new "Automatic" image display method which uses GLSL shaders for
most images. It only does CPU side color management for higher res images
where sending big float buffers to the GPU is likely to be a bottleneck or
cause memory usage problem.

Automatic is the default now, previously it was 2D Texture.
2019-04-20 13:32:36 +02:00
ed0c9654dd Cleanup: remove unused OpenGL functions, rename some for clarity 2019-04-20 13:32:36 +02:00
3d26d1938a UI: correct accidental removal of TOPBAR_PT_name
Mistake in 9573bf432c
2019-04-20 13:28:16 +02:00
857b63f1d4 Cleanup: re-use test for ELEM & STR_ELEM
Avoid having same test running at the end of each macro.
2019-04-20 13:03:49 +02:00
83b0e975b9 Cleanup: quiet warning for NULL pointer use
Warning was false positive but avoid repeating the same check.
2019-04-20 12:32:47 +02:00
f2792e91f0 3D View: add opacity for sculpt mask display
This matches vertex/texture paint opacity options.

Useful because 0.75 is sometimes too dark to see the surface shading.

Resolves T63746
2019-04-20 12:03:57 +02:00
08f4cdebe4 Cleanup: de-duplicate flag setting macro 2019-04-20 11:39:25 +02:00
bbc5c1e36f Cleanup: quiet extra-semicolon warning 2019-04-20 11:30:19 +02:00
20bc30706b Fix T63732: GPencil Onion now working with multiwindows
If you had several windows or, after last changes in topbar, several areas, the swith of overlays or Onion Skin was not working by area, but as whole switch, so it was impossible to have different status by window.
2019-04-20 10:27:08 +02:00
e17e119a31 Cleanup: comment line length (tests) 2019-04-20 10:08:59 +02:00
e63eb6ed26 Cleanup: comment line length (windowmanager) 2019-04-20 10:02:28 +02:00
44ca116ca2 Cleanup: formatting, unused args 2019-04-20 09:15:06 +02:00
Dalai Felinto
2a39f2595b Outliner: Simplify logic for parent nesting 2019-04-19 22:27:44 -03:00
bc8b884e53 Edit Mode: Make edit edges black by default
This is in order to have better contrast now that
the edges are half transparent if not
in edge selection.
2019-04-19 19:39:44 +02:00
3368df4ab6 DRW: Expose VBO garbage collection timings
This adds user side options to tweak the behavior
of the vbo garbage collection.
2019-04-19 18:52:38 +02:00
7e4db169f2 T63644: Editing while parented is not rotating correctly
This commit tries to fix the rotation problem when the parent is at layer level.

The problem was the object location was not used, so all object not in origin got weird transformations.
2019-04-19 17:08:37 +02:00
8f4ba1c046 Fix T63669: Particle editing bypassing occlusion.
The problem occurs because status changes between BackBuffer and Offscreen.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D4703
2019-04-19 11:49:17 -03:00
b6a9e88aff Fix T63648: Missing update when changing particle force fields
Force fields requires relations update in the dependency graph.
2019-04-19 15:41:32 +02:00
03c81a4fff Cleanup: Remove dead code
There is no more sorting happening, so the comment is out of date
by manu reasons. If something extra is needed there it would need
to be done differently anyway.
2019-04-19 15:41:31 +02:00
4c4adeaa65 Edit Mode: Reduce Selected face alpha
This is to be less intrusive when doing UV mapping. They remain enough visible
in every select mode
2019-04-19 15:19:43 +02:00
6c83c92862 Edit Mode: Change face mode edges display
This improve visibility in edit face select mode by using the face select color
instead of the edge select color (which is in default theme a bit more red). Also
makes the selected edges in this mode a bit more opaque (0.75 instead of  0.4).
Full opacity is still reserved for edge select mode.
2019-04-19 15:19:43 +02:00
223f7e79f9 DRW: Add batch garbage collection
This is only working for shading batches for the moment and only if some Custom data layer are not needed anymore.

The collection rate is hardcoded at 60 sec but could be exposed to the user.

This system can be extended and discard most unused batches in the future.

This commit is in prevision of removing BKE_MESH_BATCH_DIRTY_SHADING when changing shader parameters.
2019-04-19 15:19:43 +02:00
973e64cf9c DRW: Make shaded batch validation more correct
This is in order to support garbage collection of unused Custom data layer uploaded to the GPU.

Actual Garbage Collection is not added by this commit.
2019-04-19 15:19:43 +02:00
0ebf43b4d0 Cleanup: Remove image preview code
Was commented out for literally 10 years.
2019-04-19 15:16:33 +02:00
fd05d7bbcb Cleanup: Remove unneeded compositor update function
Similar to previous commit.

Compositing with animation on socket values and image sequences
still works fine.
2019-04-19 15:16:33 +02:00
81e0973dec Cleanup: Remove unneeded texture nodes update function
The function was calling update() on the time curve, but there
is no update callback on that node. So, effectively the function
was doing nothing.
2019-04-19 15:16:33 +02:00
d892f1037c Fix error in recently added STR_ELEM macro
Very bad oversight, using pointer comparison instead of strcmp
for all but the first item.
2019-04-19 14:52:58 +02:00
9ade9d247d CMake: fix Cycles linking with OpenCL 2019-04-19 14:00:16 +02:00
eb844fc1da CMake: fix building without smoke enabled
Was removed when removing sorted libs however it's needed for stubs.
2019-04-19 13:55:31 +02:00
60d733c563 Fix/workaround crash using ED_area_do_msg_notify_tag_redraw
Temporary workaround for crash when refreshing the active tool.

Currently ED_region_tag_redraw fails, use notifiers until
this is resolved.
2019-04-19 12:44:28 +02:00
98e2713e94 UI: minor layout tweaks to 3D viewport gizmo menu 2019-04-19 12:27:16 +02:00
a277804c25 UI: tweak header context menu, gray out items when they have no effect 2019-04-19 12:26:45 +02:00
d297927958 Keymap: add 'Adjust Last Operation' as F9
Adding this back was a frequent request.

Now the panel can be hidden - some users may prefer only to access this
via a shortcut.

Unfortunately this uses an F-Key we'd intended to keep free for users.

This still keeps the middle block of F-Keys (5..8) free.
2019-04-19 09:57:15 +02:00
65e21888b5 Keymap: add set start/end shortcuts to graph editor 2019-04-19 09:36:44 +02:00
f604e46780 Keymap: restore Ctrl-Tab in the dopesheet (removed by accident)
Mistake in 6aef124e7d
2019-04-19 09:35:53 +02:00
a1feea48be Correct cleanup marking keyword args unused 2019-04-19 08:29:38 +02:00
54d8faa93a Cleanup: remove redundant poll functions 2019-04-19 08:13:56 +02:00
ad4cbc5a58 Cleanup: logical checks in UI scripts 2019-04-19 08:10:39 +02:00
548fb81035 Cleanup: trailing commas 2019-04-19 08:07:46 +02:00
fb9fcaa507 Cleanup: unused vars 2019-04-19 07:52:53 +02:00
082d7e8d5f Cleanup: use staticmethod where appropriate 2019-04-19 07:51:14 +02:00
ba44602b23 Missing from last commit 2019-04-19 07:49:49 +02:00
3633a79789 Cleanup: correct misleading classmethod arg 2019-04-19 07:36:07 +02:00
5b0f0421ef Cleanup: mark unused arguments in UI scripts
Quiet's pylint W0613 warning, also remove some unused args.
2019-04-19 07:32:24 +02:00
9573bf432c UI: move top-bar into the spaces header
Currently this is only in the 3D viewport however all spaces
that use the tool-system will have this region added.

D4680 by @brecht with own updates.
2019-04-19 06:53:38 +02:00
638938e5a8 Armature: remove remains of the object-level deformation data cache.
Now that B-Bone shape data is kept in bPoseChannel_Runtime, the
armature level cache only holds one quaternion value per bone.
It can also be moved to runtime, and the structure removed.

This has an additional effect that, as far as I can tell, now
the Armature modifier can run as soon as all of the bones it
actually needs are done, thus making T59848 a purely depsgraph
level problem.
2019-04-18 23:19:44 +03:00
e8c9e85401 UI: Revert fix T37463: Y-clamp for header-only spaces
This reverts 91d8519c47 since I can't redo the reported error
which was in the old header-only info space.
2019-04-18 21:29:22 +02:00
bd7d39f0b9 PyTests: do not load addons in load_py_modules test.
It makes no sense to load add-ons here, we already do that (in a more
complete way) in load_addons test, this is only adding overhead and
doubling code to maintain).

Also do not try to load-as-modules add-ons that are not 2.8-ready, and
some other misc fix.

load_py_modules test should be passing again now.

Thanks to @sergey who did part of the work here as well.
2019-04-18 21:14:14 +02:00
7ec6bca92f Fix T63332: backup and restore bPoseChannel_Runtime data during COW. 2019-04-18 21:32:17 +03:00
64bcdd65bf Images: support packing edited images as OpenEXR or PNG.
This way float and multilayer images can now be packed without data loss. This
removes the as_png option and always uses the appropriate file format depending
on the image contents.
2019-04-18 20:07:55 +02:00
690ed63eb5 Cleanup: unused region init functions 2019-04-18 20:02:09 +02:00
da1b519d82 UI: collapse 3D view collections visibility panel by default. 2019-04-18 19:53:18 +02:00
8326d59dbb OpenEXR: add support for writing EXR files to memory. 2019-04-18 19:42:20 +02:00
624d010fe5 Cleanup: deduplicate single/multiview image packing code. 2019-04-18 19:42:20 +02:00
54f420ec46 Cleanup: move image saving code to blenkernel. 2019-04-18 19:42:20 +02:00
c2f75c7008 Cleanup: make image saving code reusable outside operator. 2019-04-18 19:42:19 +02:00
0a4cded91e Cleanup: deduplicate image user initialization, make consistent. 2019-04-18 19:42:19 +02:00
4dce18fb51 GPencil: Add option to mix color with texture
This was already supported in Fill, but not in Strokes. This adds more artistic options when use textured strokes.
2019-04-18 19:33:06 +02:00
4439e5d0ba Cleanup: add trailing commas to avoid right shift 2019-04-18 17:19:44 +02:00
098f75897e PyTests: do not try to load non-2.8-ready add-ons. 2019-04-18 17:14:51 +02:00
d6f9379149 GPencil: Fix Drawing Path follow error while drawing
The strokes was aligned to drawing path only when the stroke was completed. Now, the stroke is aligned while drawing too.
2019-04-18 16:59:18 +02:00
84d237ee97 GPencil: Initialize variable to remove console warning 2019-04-18 16:59:18 +02:00
364ec17fb3 Missing 2.7x keymap update from last commit 2019-04-18 16:42:02 +02:00
cfed33f738 UI: replace toggle header with a property 2019-04-18 16:39:46 +02:00
9954cce59f Alembic: catch weird exceptions from library instead of aborting Blender.
Similar to what is done e.g. in AbcMeshReader::read_mesh()...
2019-04-18 16:20:19 +02:00
7d78474941 AMD glitch: missing changes in f41ab375f3
It was committed an earlier version of the patch which missed these changes.

Differential Revision: https://developer.blender.org/D4700
2019-04-18 10:54:03 -03:00
4c11e57316 Cleanup: add 'if 0' comment why code is repeated
Avoid potentially adding back the problem in the future.
2019-04-18 15:19:47 +02:00
f41ab375f3 Fix T62792: AMD glitch when clipping region in edit mode.
The `AMD Radeon HD 7600M` compiler is usually buggy for Geometry Shaders.
In this case, indexing was causing problems in `gl_in[i].gl_ClipDistance[0]`.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D4700
2019-04-18 10:09:34 -03:00
dc8dd24351 PyAPI: remove support for importing text blocks as modules
Allowing direct import of text blocks isn't especially useful,
instead add `text.as_module()` script authors can do this
explicitly if it's needed.

Now the text "Register" option executes
instead of loading as a module.

This removes the need to keep track of the current Main,
and C code to override Python's import & reload.
2019-04-18 15:00:43 +02:00
6f087be9f9 Fix T63590: Blender crashes when deleting particle hair keys 2019-04-18 14:43:45 +02:00
5cfeba72f1 Python API: allow passing integer to some BGL functions instead of bgl.Buffer
These parameters can be both pointers and offsets into a bound buffer, so we
need to support both even if it's possible to cause crashes this way.
2019-04-18 14:28:37 +02:00
Maruf Sarker
713f961727 Fix Embree link error after recent cmake changes
Differential Revision: https://developer.blender.org/D4704
2019-04-18 14:28:37 +02:00
8587679a25 UI: option to toggle 'Adjust Last Operation' 2019-04-18 14:02:08 +02:00
6154d07f40 Cleanup: comments, wrapping 2019-04-18 14:02:08 +02:00
2d171d873c UI: Expand Enum Items Over Multiple Rows
Expanding enum items in a small area would render the names with
dots, what is a bad solution. When you use expand directly on a
`grid_flow` or `column_flow`, it will render the items on multiple
lines, giving more control to the developer.

Reviewers: campbellbarton, brecht, mont29

Differential Revision: https://developer.blender.org/D4698
2019-04-18 13:35:14 +02:00
a05b6199fc Cleanup: correct comment 2019-04-18 12:52:50 +02:00
6aef124e7d UI: move region toggling to properties
Each space had separate operators, duplicating logic.

Use RNA properties instead so adding the ability to toggle other
region types (floating redo region for eg) doesn't need to have an
extra operator per space type.

It's also nicer to show a check-box for something which can be toggled.
2019-04-18 12:44:17 +02:00
d55a9cac2c CMake: correct bad change to ceres linking
Revert part of 45055199a2
2019-04-18 12:44:17 +02:00
96e10dc2a5 Fix T63513: Gpencil - Circle guide activation with shortcut "C" is not working properly
Only add missing events after first point is added.
2019-04-18 11:39:13 +01:00
e5c5b990c6 Disable clang-format for Libmv
This is an odd-ball: it's a library which has own style and
guidelines, and just happened to be developed by Blender developers
and also happened to rely on some functionality of intern/ for its
C-API.

Might consider using Google's clang-format in the future (this is
what the style is supposed to be in this library).
2019-04-18 12:33:04 +02:00
b92d777d16 Fix compilation error when using SDL dynamic loading 2019-04-18 12:10:08 +02:00
3bc73c1b61 Merge branch 'blender2.7' 2019-04-18 11:57:44 +02:00
cc9528d3c8 Buildbot: Attempt to fix wrong branch in buildinfo
For some reason the buildinfo header was not re-generated. The root
reason is not really clear to me, so simply remove the header similar
to the CMake cache.
2019-04-18 11:52:34 +02:00
a9e34f58bc Fix T63663: Object mode proportional editing affects objects which are disabled for selection
Objects which are not selectable are no longer affected by
proportional transformations.
2019-04-18 11:52:00 +02:00
90b2fceca2 Cleanup: remove last bits of WITH_LEGACY_DEPSGRAPH CMake option.
Legacy depsgraph has been removed from Blender since several months
already...
2019-04-18 11:35:39 +02:00
63bae864f4 Overlay Engine: Option to Disable AA Ortho Grid
When in Axis alligned orthographic view a grid was always displayed.
With this change the user can enable/disable this grid.

The Grid is always visible and editable, but only rendered active when user is in quad view, or axis aligned ortho view.

Reviewers: brecht, fclem

Maniphest Tasks: T63517

Differential Revision: https://developer.blender.org/D4699
2019-04-18 11:22:08 +02:00
f7a28f0e11 Fix mistake in recent commit.
Needed to remove footers and not headers
2019-04-18 08:11:11 +02:00
99510e8b09 clang-format: add statement macro
Disabled for now but corrects syntax when we switch to v8.
2019-04-18 08:04:03 +02:00
42513146d4 Cleanup: indentation from braces in '#if 0' 2019-04-18 07:59:30 +02:00
333cdbb410 Cleanup: comment blocks 2019-04-18 07:59:28 +02:00
93e876c4f8 UI: don't expand selection tool option enum
This was taking too much space.
2019-04-18 06:52:05 +02:00
74c34c065c Cleanup: move region manipulation to utility functions 2019-04-18 06:52:05 +02:00
dbf4a67af4 Cleanup: warnings 2019-04-18 06:52:05 +02:00
b46245470f cmake: Fix python linker issues on windows.
Recent cmake work made the debug build link both python37.dll and python37_d.dll
2019-04-17 13:26:02 -06:00
1a4b60c30d Edit Mode: Rework display to differentiate selection modes
This removes the large edges and instead use colors to hint in which
selection mode the user is.

The component in each individual selection mode is more prominent to add
more emphasis. The other components are less prominent and dimmed.

A minor default theme changes needed to be made to keep clarity in all
combinations.

Forcing old behavior (no selection mode hit) could be done quite easily
by just making the 2 booleans true (selectFaces and selectEdges).

Reviewers: campbellbarton, billreynish

Reviewed By: campbellbarton, billreynish

Subscribers: ThinkingPolygons

Maniphest Tasks: T1234

Differential Revision: https://developer.blender.org/D4526
2019-04-17 19:37:12 +02:00
106aea0c93 ClangFormat: disable for generated theme 2019-04-17 19:24:38 +02:00
3fe6eebf20 Cleanup: line wrapping caused by comments 2019-04-17 18:50:53 +02:00
81ce3801bf Animation: Refactor storage usage during fcurve modifier evaluation
Previously, when a fcurve modifier used storage,
many heap allocations were done.
This caused major slowdowns as described in T63656.

Furthermore, the storage usage was a special case only
used by the Cycles modifier. This refactor makes
storage usage the "normal" case.
That reduces the overall complexity.

The storage is stack allocated now.

The framerate on the provided test scene went up from ~5 fps to ~16 fps.

Reviewers: angavrilov

Differential Revision: https://developer.blender.org/D4701
2019-04-17 18:09:33 +02:00
5f5a22970b Tests: Fix Alembic regression test 2019-04-17 17:39:17 +02:00
035b455f6c Tests: Fix ID properties test
Simply adjust to Python API changes done in 2.8.
2019-04-17 17:32:36 +02:00
5461a68852 Avoid autosave name collisions
When the same .blend file was open in two instances of Blender,
the autosaved files would overwrite each other.

The solution is to put the pid into the filename.

The exact pattern is the result of a discussion with @pablovazquez.
2019-04-17 16:54:28 +02:00
12aa9b2108 Fix T63678 Link error of tests with MSVC.
Ideally OCIO removes their log2 implementation from the global namespace
but for now this linker tweak will have to do.
2019-04-17 07:58:48 -06:00
edde48f578 GPUBuffers: Remove wrong assert
The assert was not true if the pbvh node had no triangle.

Also update the comment to reflect that.
2019-04-17 14:32:18 +02:00
f3b7b7eb0c Fix T63673: Wrong api documentation for Quaternion.dot(other) 2019-04-17 13:49:30 +02:00
6770f76bd4 Fix T60982: don't allow editing group properties in linked actions. 2019-04-17 14:43:27 +03:00
nBurn
05b8b54018 Fix T63674: Incorrect poll methods in node category classes
Differential Revision: https://developer.blender.org/D4697
2019-04-17 13:38:31 +02:00
f73255c1be editorconfig: correct indent size 2019-04-17 13:34:46 +02:00
c3a11a5671 Fix T63247: edbm_rip_invoke__edge rips unselected verts on mesh borders
Ripping edges would in some cases rip verts on unselected edges. This is now fixed so that we only rip verts from the actually selected edges.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4646
2019-04-17 12:33:33 +02:00
43e84e3326 Fix Change when re-running clang-format 7.
This was the only broken case for me, hopefully we have nailed all of
those down now.
2019-04-17 11:32:21 +02:00
1cb9612d73 Disable clang-format for objective-C bits in GHOST.
Pre-8 versions of clang-format do not handle objective-C very well,
leading to unwanted changes when re-running the edits.
2019-04-17 11:23:22 +02:00
8afb13019d Cleanup: Silence compiler warning with release builds 2019-04-17 10:54:56 +02:00
1961c61d20 ClangFormat: re-run (#if 0 caused noise) 2019-04-17 09:34:15 +02:00
ac2317f980 ClangFormat: remove '#if 0' to fix bmo_inset.c indent 2019-04-17 09:28:06 +02:00
37c76a7ec6 Cleanup: replace comments with meaningful variable names 2019-04-17 09:17:55 +02:00
600f12002b ClangFormat: adjust '#if 0' to fix gpu_buffers.c indent 2019-04-17 08:58:35 +02:00
a54bdd76cb ClangFormat: format '#if 0' code
Previous cleanups didn't account for space after '#'.
2019-04-17 08:52:59 +02:00
223f931095 Cleanup: comment length in transform 2019-04-17 08:44:58 +02:00
6b26024ea4 Cleanup: comment length in interface 2019-04-17 08:44:38 +02:00
41d4a19865 ClangFormat: format '#if 0' code in source/ 2019-04-17 08:24:14 +02:00
108045faa0 ClangFormat: format '#if 0' code in intern/ 2019-04-17 08:17:13 +02:00
3076d95ba4 Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
91a9cd0a94 ClangFormat: manually format sobol.cpp
Disabled because it uses a lot of memory and is mostly data.
2019-04-17 06:35:07 +02:00
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
b3dabc200a editorconfig: update for new clang-format config 2019-04-17 06:12:55 +02:00
18e4a4c48a ClangFormat: add configuration files
Prepare for applying clang-format, see: T53211
2019-04-17 06:11:16 +02:00
53e3fcdce4 Cleanup: use 2 space indentation for shell scripts
Already used by install_deps.sh
2019-04-17 06:08:01 +02:00
ca245b2b40 ClangFormat: disable for most of sobol.cpp 2019-04-17 06:00:20 +02:00
5d8030b8f3 Industry Compat keymap: Fix loop selection
- Extending loops wasn't working correctly. This is now fixed.
- Also added ability to deselect loops by holding Ctrl and double-clicking
2019-04-16 22:13:25 +02:00
Dalai Felinto
d29bd6c6b7 Selecing a pose bone in outliner deselect others
This mimics what is now the behaviour for edit bones as well.
See e6151bc4c1.

And it also matches what we do in the viewport when selecting bones.
2019-04-16 16:10:04 -03:00
Dalai Felinto
e6151bc4c1 Fix T63066: Outliner crash when selecting object being in armature editmode
While fixing it, also reproducing multi-object selection logic we have
in the viewport. If you select one bone from an armature, it deselects all
bones from the other armatures currently in edit mode.

Inspired by proposed fix by Philipp Oeser (lichtwerk).

Code explanation
================

CTX_data_edit_object(C) may be NULL here. In the few cases where it is
not we use it for the notifier (in the other cases we call the notifier
with NULL, so no harm done).

This code is called during outliner drawing, and it is called, for
instance every time you mouse hover a bone.

If you have a mesh object in edit mode and mouse hover the bones of an armature
it is plain obvious we can't rely on CTX_data_edit_object() for anything
armature related. And that the original assert was asking for troubles.
2019-04-16 15:42:32 -03:00
e2e3a61310 Cleanup: avoid adjacent C-style comments
Causes clang-format to give different results on a second run.
2019-04-16 17:55:11 +02:00
58233e980e Cleanup: avoid adjacent C-style comments
Causes clang-format to give different results on a second run.
2019-04-16 17:50:17 +02:00
ad9275ed4e Spline IK: support changing individual bone length via Y scaling.
Previously Spline IK provided only two choices: either scale the
length of the bone chain to fit the length of the curve, or don't
scale the bone in the Y dimension at all (ignoring effects of
actually fitting to the curve due to curvature and curve object
scale).

This patch adds a new option to use the pre-IK Y scale of the
bones to adjust their length when fitted to the curve, allowing
individual posing control over the length of the segments.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4687
2019-04-16 18:41:57 +03:00
752edc0a15 Cleanup: simplify comments
clang-format reformatted when running a second time.
2019-04-16 17:37:04 +02:00
2a891842af Clang-format: Speed up detection of clang-format
Don't construct the full build environment, following
feedback from Ray.
2019-04-16 17:10:02 +02:00
49e4182b6c ClangFormat: add comments to ignore formatting 2019-04-16 17:03:11 +02:00
24edd49818 Fix T63312: Crash XRay + clipping
Outline shaders were only selected when no checker depth was available.

Reviewed By: fclem

Maniphest Tasks: T63312

Differential Revision: https://developer.blender.org/D4661
2019-04-16 17:02:07 +02:00
2986bc1d6e ClangFormat: add comments to ignore formatting 2019-04-16 16:57:47 +02:00
e0fe719997 Fix BLI_path test of BLI_path_frame_strip.
Ensure that returned string buffer is always properly initialized with
NULL char...
2019-04-16 16:52:20 +02:00
65aebd0c11 GNUmakefile: move clang format utility
Makes more sense to place in 'utils_maintenance'.
2019-04-16 16:49:32 +02:00
dbc058301b Cleanup: trailing commas 2019-04-16 16:40:47 +02:00
d217b23f73 Cleanup: use keyword only args to rna_idprop_ui_create 2019-04-16 16:00:24 +02:00
40dd91561d Python: add a utility function for creating custom properties.
Creating a fully functional custom property requires also setting up
its limits, description, default value and static override status.
It is complex enough to warrant providing an official utility.

Currently boolean properties are technically int, but the utility
pretends they are separate in case that eventually they are.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4620
2019-04-16 16:49:00 +03:00
d5a76451c0 GNUmakefile: add 'make format'
Convenience access to clang_format_paths.py utility.
2019-04-16 15:43:42 +02:00
fc32f98bbc Initial support of make format for Windows
There are couple of caviats currently:

- The script requires system-wide Python 3 available in the current
  search PATH as python.exe.

  This will get addressed soon by distributing unpacked Python binary
  in our libraries.

- Since the libraries folder is to be known, this requires to have
  MSVC detected. Not too bad, since formatting is still way slower
  than detection, but still doesn't feel ideal.
2019-04-16 15:41:32 +02:00
f45b91a1c5 Fix tool system Python errors if there is no active object. 2019-04-16 15:33:20 +02:00
0ca9ce21ab Fix T63641: transform snap invert keymap item has an effect when disabled. 2019-04-16 15:33:20 +02:00
11175eb8a8 Fix T63617: Bone groups (de)select operators not immediately refreshing
was missing DEG updates

Reviewers: brecht

Maniphest Tasks: T63617

Differential Revision: https://developer.blender.org/D4691
2019-04-16 15:21:01 +02:00
Dalai Felinto
e017d89eae Fix T63204: Toggle collection visibility with shift
Shift was always turning the collection visible. It now toggles, similar
to what we had in 2.79.
2019-04-16 09:58:44 -03:00
157872922a CMake: fix building WITH_CYCLES_LOGGING=ON 2019-04-16 14:56:34 +02:00
a12bc43b26 UI: Move Collection Visibility popover from 3D View header into the Sidebar
It's more practical to use this from the Sidebar, and takes away one item from the crowded header.

See T63527
2019-04-16 14:52:44 +02:00
b53728b1d2 Fix broken build when using system Glew on linux. 2019-04-16 14:44:14 +02:00
7fdffd735f UI: Refactor View2D number drawing
This also fixes alignment issues in many editors.
E.g. the frame numbers were badly aligned to the grid lines
in the timeline.

Checkout the images in D4681 for more examples.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4681
2019-04-16 14:19:06 +02:00
45055199a2 CMake: fix building without libmv 2019-04-16 14:11:17 +02:00
8535f4d073 Fix T63619: Fill Tool is misaligned when 'Gradient' is enabled
Reviewers: brecht

Maniphest Tasks: T63619

Differential Revision: https://developer.blender.org/D4692
2019-04-16 14:03:08 +02:00
e7e05ba5fa CMake: fix linking with gtest & cycles enabled 2019-04-16 13:57:33 +02:00
423d9086e6 Fix T63429: Random deselect function lost
Add back the ability to choose the select operation for random select.
Now we allow the operator to specify if the select operation should be
visible in the GUI or not.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4665
2019-04-16 13:16:04 +02:00
2e3bc99590 GPencil: New Normalize All operator
This operator works similar to mesh operator but for Stroke and Points data.

Also minor cleanup in Normalize operator.
2019-04-16 13:10:10 +02:00
5494926ee5 GPencil: Add lock icon to Vertex Groups list
Also check this flag in operators.

Note: This is required for the development of the new Normalize All operator.
2019-04-16 13:10:04 +02:00
a8852ade8a GPencil: New Normalize Weights operator
This works similar to mesh operator, but using Stroke and Points data.
2019-04-16 13:09:58 +02:00
31c2e69d49 CMake: remove BLENDER_SORTED_LIBS
Use CMake's target_link_libraries instead of manually maintaining
library dependencies in a single list.

In practice adding new libraries often ended up being guess-work,
now each library lists the libraries it uses.

This was used for the game player executable so libraries
could optionally link to stubs.

If we need this functionality it can be done using target-properties
as described in T46725.
2019-04-16 12:36:44 +02:00
616597e7ea CMake: fix WIN32 linking without sorted libs 2019-04-16 12:35:57 +02:00
758bb8c70d Clenaup: odd use of ternary operators 2019-04-16 12:09:34 +02:00
f37a27b074 Cleanup: comment 2019-04-16 12:01:55 +02:00
c9b8db74dc Industry Compat Keymap: Use F-keys for viewpoints
Following user suggestion

  - Similar to some apps
  - Works better on laptops and desktops without numpads
  - Also fix some small inconsistencies with select more/less in Dopesheet
2019-04-16 11:01:23 +02:00
0d686ccc52 GPencil: Disable G/R/S transformations in Sculpt and Weight Paint mode
These transformations must be only available in Object and Edit mode.

Reviewed by: @mendio @pepeland
2019-04-16 10:04:20 +02:00
777446ed7d Fix T63492: CTRL+click on an image in a UV or Image Editor crashes
Blender

Crash was introduced in rB48e48653c297, rB90f4ff95ed3a

`image_sample_invoke` is used for both `IMAGE_OT_sample` and
`IMAGE_OT_curves_point_set`. IMAGE_OT_curves_point_set didnt have
property `size` defined...

Now defines `size` for `IMAGE_OT_curves_point_set` as well

Reviewers: brecht

Maniphest Tasks: T63492

Differential Revision: https://developer.blender.org/D4675
2019-04-16 09:38:01 +02:00
8a9b5e644e Fix T63642: Light Probe object.data defined as UNKNOWN 2019-04-16 09:15:39 +02:00
a948147977 Fix T63646: Box/Lasso select fails to de-select
Select 'New' wasn't de-selecting when there was nothing selected
in some cases.
2019-04-16 09:01:00 +02:00
edc1b01675 CMake: add libs needed for gtests 2019-04-16 08:07:01 +02:00
2f94b170e4 Cleanup: move motion paths into editors/animation
Having this in blenkernel caused bad level calls to bf_editors_anim,
causing tests that use 'blenkernel' to require almost all libraries.
(complicating gtest linking & causing large binaries).
2019-04-16 07:35:17 +02:00
5498e7f193 CMake: add library deps to CMakeLists.txt
Tested to work on Linux and macOS.

This will be enabled once all platforms are verified.

See D4684
2019-04-16 06:20:52 +02:00
813e470eac CMake: cleanup, arg rename, add definitions last 2019-04-16 06:15:18 +02:00
bb6b7dd4ad CMake: re-order openvdb/osl linking
Needed for building without sorted libs.
2019-04-16 06:10:00 +02:00
941206559e Fix DDS failure ignoring message argument 2019-04-16 05:51:25 +02:00
db80d5c560 Fix T62852: crash reading corrupt DDS file. 2019-04-16 03:41:17 +02:00
6a50a3d140 Fix T63346: Cycles OSL shader with closure not working in final render. 2019-04-16 03:03:24 +02:00
3d744dff58 Fix T63562: wrong viewport updates after editing group node sockets 2019-04-16 02:29:22 +02:00
fb0acb1947 Fix T63401: add Object (Without Inverse) to Set Parent menu
Previously it was bound to a shortcut.

Differential Revision: https://developer.blender.org/D4673
2019-04-16 02:16:54 +02:00
e760d37733 Fix T62913: datablock append removing unrelated rigid body objects. 2019-04-16 01:55:17 +02:00
6830adaaab Fix proxy remapping on make local failing for more than one object. 2019-04-16 01:51:32 +02:00
5ac7675f4c Fix T62849: crash entering particle edit mode with hair dynamics 2019-04-16 01:42:16 +02:00
d0cb98790e Fix T63189: missing double click for UV loop select and emulate MMB 2019-04-16 01:32:50 +02:00
9d06dc1496 Fix T63439: too many 3D viewport redraws due to fading scrollbars.
Only redraw the regions, not the entire editor.
2019-04-16 01:24:38 +02:00
e2102e9917 Spline IK: fix continuity issues with influence and curve end rolloff.
Mainly, scaling needs to be continuously faded out in these cases.
Plus, in the case of end roll-off, it seems better to integrate into
this general fading system, instead of ad-hoc interpolation of tail.
2019-04-15 21:53:35 +03:00
2f2ba04c60 Fix T63574: missing implicit parent bone dependency in proxies.
Although technically evaluating the proxy copy nodes doesn't require
the parent bone to be copied, other nodes that depend on the bones
sometimes expect the parent to be ready. To meet this expectation
it's necessary to add the dependency to the graph.
2019-04-15 19:54:03 +03:00
10bf1d9ac1 Fix T63284: Eevee: Crash when subsurface pass is enabled
Was caused by a NULL texture used as uniform.
2019-04-15 18:02:08 +02:00
ab1d82e41e GPencil: Hide UV factor for Dots and Boxes
This parameter is not used with these modes.
2019-04-15 16:08:16 +02:00
25efa970d6 UI: move gizmo popover next to the overlay buttons
In paint modes this was the only button in the middle.
2019-04-15 15:56:50 +02:00
bcefceb200 Fix T63598: "child of" constraint "set/clear inverse" ops not working
was missing DEG updates

Reviewers: sergey

Maniphest Tasks: T63598

Differential Revision: https://developer.blender.org/D4685
2019-04-15 15:23:35 +02:00
8d3af588a2 Fix T63377: "Principled Volume" node not working anymore in EEVEE
I'm not sur how it ever worked before. There was no texture bound to these
sampdensity and sampflame when no volume simulation was happening.

This fixes the issue using 1x1x1 dummy textures.
2019-04-15 15:22:27 +02:00
935417bee7 cleanup: typo in comment 2019-04-15 11:44:56 +02:00
d688ce9a62 Cleanup: Add missing comma 2019-04-15 11:04:08 +02:00
414566dbde Industry Compat Keymap: Tool shortcuts
- Use C for Cursor tool
- Use D for Annotate tool
- Use tool shortcuts in UV Editor (although it's weak here still - waiting for Move, Rotate & Scale tools here)
2019-04-15 10:58:52 +02:00
240940c58c GPencil: New Dots gradient
This commit adds support for drawing Dots strokes with a gradient factor to get artistic effects like watercolor.

Currently, the option is only supported by Dots materials, and in the future will be added to line strokes, but now there is a limitation on drawing engine and we will keep disabled on Line materials.

Also, added the option to align Dots and Boxes strokes textures aligned with the drawing path to get more fluid strokes.
2019-04-15 10:32:25 +02:00
7c79455297 Industry Compat Keymap: Panning consistency
- Allow orbiting while using Knife tool
- Use consistent panning keys in properties lists
- Also fix warning related to empty View 3D Generic keymap
2019-04-15 10:23:33 +02:00
efd319f543 Industry Compat Keymap: Remove Ctrl-click for context menu
This was conflicting with some tools such as the select tools which used it for deselecting.
2019-04-15 09:37:06 +02:00
3849e02369 CMake: fix WITH_PYTHON=OFF 2019-04-15 08:40:29 +02:00
bdeb6743e3 CMake: sort file list 2019-04-15 07:13:41 +02:00
0a90b8bbcf CMake: resolve issue building without sorted libs
Linking empty libs gave an error.
2019-04-15 06:42:24 +02:00
860a9f979d Fix copy & paste mistake in assert. 2019-04-14 22:18:00 +03:00
3731729b96 Depsgraph: fix hard CTD on dependency cycles through POSE_INIT.
As reported in T63582, it can cause chan_array to be not ready.
To reliably avoid crashing, the only easy way seems to be to
create the index during COW -- maybe @sergey has a better idea.
2019-04-14 21:55:30 +03:00
f5ea1fc4fb Render: new material preview
* EEVEE support through irradiance volume and light probe.
* New shader ball shape (designed by Robin Marin).
* New cloth and liquid shapes, removed monkey.
* Replace world sphere by toggle to use world for any shape.
* Slight bevel on cube.
* More subdivision for displacement preview.
* Fixed and improved UV mapping for all shapes.
* Material icon / asset preview now uses specified shape instead of always
  a sphere. So for example hair material can be displayed as hair.

Ref T57683
2019-04-14 20:09:02 +02:00
8b0102b443 Fix Alembic using wrong visible/selected flags, fix warnings. 2019-04-14 19:54:51 +02:00
91d611b7cb Cleanup: remove deprecated grease pencil object property. 2019-04-14 19:54:51 +02:00
427f4c2321 Cleanup: fix compiler warnings. 2019-04-14 19:54:51 +02:00
f73b3178f7 Fix T63599: fix the zero ease hack for the B-Bone end matrix.
Negate the second derivative, because it's effectively stepping back.
2019-04-14 20:30:33 +03:00
6a59e12364 Fix T59622: dependency problems with Spline IK.
The bug is caused by problems in the dependency graph. Unfortunately,
fixing is not just a matter of fixing the graph, because correct
dependencies would cause a cycle here and in other reasonable use
cases. The real fix thus requires refactoring Spline IK to require
curve data only in the actual evaluation phase, and not in POSE_INIT_IK.

In addition, this separates the normal bone evaluation loop from
Spline IK computations for two reasons:

- That still needs to be done even if spline IK can't evaluate
  due to missing curve data.

- It should reduce issues with induced shearing, as Spline IK now
  controls how parent-child relations are handled in the chain, and
  can take care to only carry over rotation and location.
2019-04-14 18:59:27 +03:00
3380fb3646 Complete the set of matrix multiplication functions.
Also, mul_m3_m3m4 was named incorrectly.
2019-04-14 18:14:06 +03:00
Miguel Porces
9abcae1fda Fix add_search node operator to show custom nodes
Differential Revision: https://developer.blender.org/D4667
2019-04-14 16:59:01 +02:00
Sharan Ranjit
6efac431a3 UI: Remember the last display mode in file browser
See also T57688.

Differential Revision: https://developer.blender.org/D4479
2019-04-14 16:33:59 +02:00
14e1a4e9cf UI: Do not show full action range
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4563
2019-04-14 16:18:48 +02:00
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
eee5a880f1 Dopesheet: enable Show Keyframes and Interpolation by default.
Make the option enabled by default, and enable it in old files,
unless Show Extremes is enabled.

However, suppress it for the Timeline, because its View menu
doesn't include the option.

Reviewers: billreynish, brecht

Differential Revision: https://developer.blender.org/D4678
2019-04-14 16:34:06 +03:00
00b966b83a Explain the Local With Parent coordinate space better.
Just saying "parent transformation added" doesn't really explain
what this coordinate space does. Thus it seems almost nobody used
it and serious bugs like T61981 went unnoticed.
2019-04-14 16:26:47 +03:00
b42ae4b972 Fix T61981: Local With Parent broken as constraint own space.
Specifically, matrix multiplication order in Local With Parent
to Pose space conversion was wrong, compared with Pose to LWP.
2019-04-14 15:50:57 +03:00
1d70b9009b Missed version bump in recent commit 2019-04-14 13:29:06 +02:00
31096ba9b6 Keymap: toggle context gizmo instead of the tool gizmo
When a tool is activated in many cases the gizmo is needed so toggling
them isn't so useful.

Change behavior to use the active object instead so users who prefer
to enable gizmos in the popover can toggle them.

Also remove duplicate keymap item.
2019-04-14 13:25:17 +02:00
2120c5af03 Gizmo: individual toggles for 3D view gizmos
The popover for displaying gizmos now has options for
empty, light & camera gizmos.

Transform toggles are now checkboxes, which has the advantage that it's
more obvious they can be mixed however changing from one to another now
uses 3x clicks instead of a single click-drag action.
We might need a faster way to switch between transform types.
2019-04-14 13:17:55 +02:00
90e760270a Depsgraph: fix debug print crash on IK constraint without target. 2019-04-14 13:49:35 +03:00
fc416c3175 Cleanup: rename 'ObData' to 'Object Data' 2019-04-14 11:19:09 +02:00
61d71fdde5 Fix T63587: 3D View clipping region crashes 2019-04-14 11:04:34 +02:00
eff8cc9ccc Cleanup: doxy comments
Use doxy references to function and enums,
also correct some names which became out of sync.
2019-04-14 10:48:42 +02:00
b7e5433890 Cleanup: move operator constants out of DNA
Also use doxy struct member references.
2019-04-14 09:58:40 +02:00
14884cda1f Gizmo: move transform to a persistent option
Based on feedback from animators, this is useful to keep as a view
option (as in 2.7x).

Now the transform gizmos can be enabled from the popover,
the tools still work for location/scale/rotation.
The transform tool has been removed.

See T63518
2019-04-13 20:58:25 +02:00
6815efc3ff Keymap: warn when running poll on empty keymaps 2019-04-13 19:26:01 +02:00
3d8790faf1 Fix T62048: crash when turning off curve path animation with Spline IK.
Both fix missing depsgraph flag, and gracefully give up on missing data.
2019-04-13 17:36:57 +03:00
51c8a6f491 Fix T37500: implement Bendy bone segment deformation interpolation.
Previously B-Bone deformation mapped every vertex to just one
B-Bone segment. This results in abrupt transformation differences
between the sides of each threshold plane, reducing the quality
of B-Bone deformation and making the use of shape keys impractical.

This commit replaces this approach with a linear blend between
the two closest segment transformations, effectively representing
the B-Bone as two weight-blended plain bones for each vertex.

In order to distribute the interpolation more evenly along the
bone, segment matrices for deformation are now computed at points
between the segments and at the ends of the B-Bone. The computation
also uses the true tangents of the Bezier curve for the orientation.
The nodes at the end of the bone require some special handling to
deal with zero-length Bezier handles caused by a zero ease value.

The Copy Transforms constraint now also smoothly interpolates
rotation and scaling along the bone shape when enabled.

The initial version of the patch was submitted by @Sam200.

Differential Revision: https://developer.blender.org/D4635
2019-04-13 16:27:42 +03:00
f7e35d61f8 Cleanup: add View3D_Runtime struct
Also remove 'matcap_icon'
2019-04-13 15:24:28 +02:00
70cbd0a6bd readme: separate development links
Add development links and place under own heading.
2019-04-13 14:45:51 +02:00
f110daa2c9 Fix T63563: Grease pencil not visible when contained in a collection instanced in a foreign scene.
The check of DUPLI object was used, but as the original object was not in the scene, the VBO data was not available and the draw was empty.

Now, the function checks if the original data is in the scene, and set the object as not Dupli to generate the VBO data.
2019-04-13 13:03:37 +02:00
65b0312904 3D View: move gizmo draw options out of overlays
Gizmo's now have their own popover in preparation
for making transform gizmos accessible without having to use tools

See: T63518
2019-04-13 12:45:02 +02:00
cd60843aef Cleanup: add trailing commas to wrapped args 2019-04-13 12:45:02 +02:00
William Reynish
f98b6ace5d UI: remove popover button text in viewport header
Makes room in the header for other buttons to be added.
2019-04-13 12:19:56 +02:00
789d242fa7 GPencil: Implement Opacity transform
Add Shift+F to transform points opacity in Edit mode
2019-04-13 11:19:03 +02:00
a43b373c42 readme: initial minimal readme
Useful to link official resources when the repository is accessed via
3rd party hosting.
2019-04-13 10:53:56 +02:00
28fc919464 GPencil: Remove script console warning when object is None 2019-04-13 09:47:43 +02:00
73c7aaba22 Cleanup: style, use braces for the window manager 2019-04-13 09:15:15 +02:00
45b810e1f8 Fix T61935 Crash when importing Alembic from Meshroom
The Alembic importer can now deal with XForm-less objects. Apparently
MeshLab exports point clouds without parent transformation matrix (XForm in
Alembic-speak). We shouldn't warn about this, but handle it properly
instead.
2019-04-12 14:52:09 +02:00
2396d7faa5 Build system: disable Draco when not installing python.
Draco py binding needs to be installed somewhere, when not installing
Python itself it's breaking the installation (since it creates a fake
empty py install, which will crash when trying to start Blender).

We could fix that in some smarter way maybe, but for now it's simpler to
just not care about Draco when we are not installing Python.
2019-04-12 14:29:17 +02:00
f3fc8271b8 Fix T63504: Python Template 'ui_previews_dynamic_enum' error
thx @nacioss for the fix
2019-04-12 14:10:10 +02:00
a96d42b2e8 Rename Label instead of Name in Node editor using F2 key
Previously reverted change without RNA changes.
2019-04-12 13:50:33 +02:00
f3c313e779 Revert "Rename Label instead of Name in Node editor using F2 key"
This reverts commit 98b06c20a0.

RNA properties should give predictable results,
the desired behavior can be added only in operator logic.
2019-04-12 12:58:31 +02:00
684e76181e Cleanup: add back semicolons to DefNode
Causes extra-semicolon warning,
we'll need to disable clang-format for this file since it
won't format properly.

Reverts b389bb5ef8
2019-04-12 20:41:14 +10:00
59f87eb198 UI: Re-order Properties tabs to follow the data hierarchy
- Group tabs together based on the data-flow
- Puts Physics and Particles next to Modifiers, with which they interrelate

See D4612

Reviewers: pablovazquez
2019-04-12 12:04:59 +02:00
0ee23d0f5f Fix T63452: View Port/render artifacts while camera movement in
Patch provided by @matc
2019-04-12 09:09:37 +02:00
d1cda823e0 Fix T63341: Xray mode makes some shading popover options grayed out despite them working
Do not gray out shading items if the xray alpha value is 1.
They are rendered correctly in viewport so there is no reason to mark
them as disabled in the shading menu.
2019-04-11 19:43:06 +02:00
adaa7688ee Fix T63467: Edge/vertex selection isnt working properly with X-ray set to 1
Edit mode shows the mesh elements in X-ray mode even if alpha is set to
1. Now the code takes this into account so that you can still select
visible mesh elements in X-ray edit mode.

view3d_draw_legacy need to be updated with the new XRAY flag macros to
avoid crashes. Additional cleanup of the XRAY macro flags were done.
2019-04-11 18:28:20 +02:00
6b06440ed8 Fix 'static override' message showing in ID template tooltip.
We only want to show that when library overrides are enabled.
2019-04-11 17:47:38 +02:00
a0a08c643e Fix (unreported) potential infinite loop over collections' parents pointers.
It is crucial to properly tag as loopback that kind of pointers,
otherwise some users of libquery's foreach_ID might end up in infinite
loops.
2019-04-11 17:47:38 +02:00
986329b4c4 Cleanup: comments 2019-04-12 01:01:50 +10:00
8091e39d22 Cleanup: remove unused code
This variable was never used.
2019-04-12 01:01:50 +10:00
6478f90cc2 curve_fit_nd: fix assert caused by too small epsilon
Curve decimate would assert in some cases.
2019-04-12 01:01:49 +10:00
8e774b3ae4 Alembic export: free depsgraph after use 2019-04-11 16:22:55 +02:00
0576f4ca9b Fix T62664: Exporting Metaballs as Alembic crashes Blender
The `AbcMetaballWriter` now subclasses `AbcGenericMeshWriter` instead of
wrapping an `AbcMeshWriter`. `AbcGenericMeshWriter` was created for this
purpose (writing non-mesh objects as mesh to Alembic) and performs the work
in a cleaner and, more importantly, not crashing way.
2019-04-11 16:22:55 +02:00
7509d0bbf1 Alembic export: always consider metaballs animated
The metaball 'mesh' is animated whenever any of its components are animated.
However, it's not easily possible to visit all its components (AFAIK it
requires a full scan of all objects in the scene and comparing names), so
due to the blobby nature of the metaballs I now simply assume they'll be
animated.

This fixes an issue where a metaball was considered static when the base
ball was static. For example, MBall static but MBall.001 animated would
be considered 'not animated'.
2019-04-11 16:22:55 +02:00
73e06ef256 Fix: Build issue with draco on mac.
somehow missed mac in my last commit
2019-04-11 07:47:33 -06:00
f01c71e1d9 Fix: Build issue with draco.
DRACO_LIB_NAME was undefined, better use the proper cmake variable for it.
2019-04-11 07:20:14 -06:00
9cdc3483ca Fix: Build error with msvc2019. 2019-04-11 06:56:40 -06:00
98b06c20a0 Rename Label instead of Name in Node editor using F2 key
See D4631 for more details

Reviewers: @brecht @billreynish
2019-04-11 14:47:35 +02:00
6fed1525a1 3D View: Show the camera frame when Extra's is off 2019-04-11 14:01:18 +02:00
Harley Acheson
c642474704 Fix T63451: selected objects not highlighted in outliner scene view.
Differential Revision: https://developer.blender.org/D4668
2019-04-11 12:58:27 +02:00
Benjamin Schmithüsen
4bad4bfc6a glTF: add Draco shared library for mesh compression.
Draco is added as a library under extern/ and builds a shared library that is
installed into the Python site-packages. This is then loaded by the glTF add-on
to do mesh compression.

Differential Revision: https://developer.blender.org/D4501
2019-04-11 12:04:53 +02:00
a9d6356fee Cleanup: suppress some warnings in external libraries. 2019-04-11 12:04:53 +02:00
87f07af737 Fix T63464: Multi UV Maps limited to three with eevee
this was very similar to T60684 (and the UV case was actually reported
back then as well), so the fix goes hand in hand with rBbd8039399575

Reviewers: fclem

Maniphest Tasks: T63464

Differential Revision: https://developer.blender.org/D4672
2019-04-11 10:30:33 +02:00
a3b88c9172 Annotations: Make all 2D editors locked to View
Before, there was a hacky code for Image editor when the image was empty.

Now, all 2D editors are locked to view and when you Move or Zoom, the stroke moves.

This is a fix of T63402.

Still pending if we add more options to 2D editors, but at least now,  we have something consistent.
2019-04-10 17:33:01 +02:00
b9e6f9b9c5 Industry Compat Keymap: Add Sculpt Mode keys 2019-04-10 16:10:07 +02:00
William Reynish
b932635bfd Industry Compatible Keymap: initial keymap
This is the initial implementation.

It's fully functional for object and edit mode,
but requires more work in Sculpt and Paint modes.

See T54963
2019-04-10 12:52:57 +02:00
a1a8578d5c Fix T62449: Subsurf+hidden faces
When using subsurf (and other modifiers) the edit flags are not
propagated correctly. Currently we assume to read the edit flags
from the original object which is kind off hinding the real issue.

Modifiers use `mesh_new_nomain_from_template_ex` to create a copy
from an existing mesh. this method is only used by modifiers. So
by placing this we will make sure that editmesh is propagated.

Reviewed By: fclem, sergey

Maniphest Tasks: T62449

Differential Revision: https://developer.blender.org/D4666
2019-04-10 12:44:31 +02:00
1a12c9edab Keyframing: add operators that use keying-set ID's
Unfortunately we can't use insert/delete_keyframe operators in keymaps
because the enums aren't known at the time of keymap registration
and the keying sets are dynamic and use a poll function.

Add a version of insert/delete operators that takes a string
instead of an enum. Needed for D4626.

Also extract int to keying-set into a utility function.
2019-04-10 11:47:43 +02:00
99f1e3d57f Fix T63455: Legacy GPencil settings in Annotations 2019-04-10 11:31:37 +02:00
f9e0836147 Fix T63347: No longer supported disable-ffserver option in install_deps script.
FFMPEG removed ffserver and that option alltogether three years ago.
2019-04-10 10:19:25 +02:00
b7a09114f6 Fix T63441: Cycles applies modifiers twice
Was a mistake in df26f28835, which caused access uninitialized variable.
2019-04-10 10:06:16 +02:00
e8fc6f6946 Cleanup: rename old -> versioning
The term 'old' isn't very meaningful, follow naming for existing
code that updates data.
2019-04-10 10:00:38 +02:00
a358f6bb69 Cleanup: use STR_ELEM macro 2019-04-10 09:36:06 +02:00
54af7cbf4b BLI_string: Add STR_ELEM macro
A string comparison version of the ELEM macro,
add to avoid verbose & repetitive strcmp/STREQ usage.
2019-04-10 09:25:53 +02:00
55c152164f Cleanup: order simple check before function call 2019-04-10 09:05:39 +02:00
b9eac0bb44 Cleanup: spelling 2019-04-10 08:40:49 +02:00
0c3500e068 Cleanup: style, shadow warning 2019-04-10 08:34:24 +02:00
009dbc2bc9 Fix T63427: Annotations don'twork with 2.79 settings
The problem was the colors were not converted and the annotation flag was not enabled.

Note: For Scene data (View3D) there is a convert operator.
2019-04-09 20:12:21 +02:00
10f724cec5 Fix: Build error with msvc.
Unused label spawned a warn but bmesh builds with warns as errors.
2019-04-09 10:45:39 -06:00
59955a297e Cleanup: Use higher level function
This kind of abstracts OpenGL details, and this is what is used in
other areas as well.
2019-04-09 17:06:32 +02:00
b5d1e0ad1e Cleanup: spelling 2019-04-10 00:38:47 +10:00
e49da07184 Cleanup: style 2019-04-10 00:06:13 +10:00
32f3d47990 Image draw: Fix/workaround image corruption on draw
Was mainly visible with high-res image. Not entirely clear why it is
only happening on macOS. While the entire function should be re-written
to make float images displayed faster, still nice to fix the drawing.

Reviewers: fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D4664
2019-04-09 12:54:20 +02:00
cc74020b5a Fix T62114: Wireframe mode selection: selects backside objects when clicking frontside object in 3d-window
Now the depth order of objects when trying to select them is only used when not in X-ray mode.
Before, this was only the case in wireframe mode regardless of X-ray settings.

I've also unified the usage of V3D_XRAY and XRAY_FLAG as they were basically copies of each other.

Reviewed By: Clément

Differential Revision: http://developer.blender.org/D4504
2019-04-09 12:29:02 +02:00
f55026d468 Cleanup: BKE_gpencil naming
- The ambiguous term 'handle' was used where 'ensure'
  is typically used (get or add when missing).
- Rename `current` to `active`, all `current` functions which were
  also ensuring.
- Clarify what is being operated on, using `BKE_gpencil_object_*` for
  objects, `BKE_gpencil_brush_*` for brushes.
2019-04-09 10:09:13 +02:00
eb9237eb20 Cleanup: style 2019-04-09 08:44:06 +02:00
86a44d2b07 Mistake in 1be2888bf0
String compare renderengines.
2019-04-09 08:37:00 +02:00
Arno Mayrhofer
2a79e34631 Fix T63326: absolute shape keys inserted from Python in wrong order. 2019-04-08 23:54:37 +02:00
George Vogiatzis
7655b32999 Fix T63386: text editor footer added multiple times.
Differential Revision: https://developer.blender.org/D4663
2019-04-08 22:51:30 +02:00
df26f28835 Fix T63399: Obj exporter does not respect "Apply Modifiers" settings 2019-04-08 21:21:09 +02:00
12417fcbf6 Fix T60821: highlighting issues in Dope Sheet
replaced check for (obsolete in 2.8) objects 'SELECT' flag with check for
bases 'BASE_SELECTED' flag

Reviewers: brecht

Maniphest Tasks: T60821

Differential Revision: https://developer.blender.org/D4606
2019-04-08 20:34:05 +02:00
1f1eedf8ad GPencil: Mark Object gpd field as Deprecated
This field is only used to read old files, but it's not used anymore, so it's better mark as deprecated to avoid wrong uses.
2019-04-08 16:24:30 +02:00
d6f02cd1d7 Fix T63340: Transform Snap Object: Simulate occlusion only when use_occlusion_test is true.
And cleanup.
2019-04-08 10:49:15 -03:00
b8a442b202 cleanup: typo in comment 2019-04-08 12:42:43 +02:00
e944835aa5 GPencil: Cleanup unused code 2019-04-08 11:28:53 +02:00
75f551faca GPencil: Fix wrong Brush texture for pinned materials
If the Brush had a pinned material with texture, but the material slot was in a different material, the texture was not working.

The material was not recovered from brush, but from object.
2019-04-07 17:02:13 +02:00
13eb2e9640 Quick Explode: update for recent eevee shadow refactor
see rBd6747f310f12 'transparent_shadow_method' -> 'shadow_method'
2019-04-07 12:46:49 +02:00
0d3195c811 Cleanup: add comments about dual quaternion scale handling.
Ref T63327
2019-04-07 11:30:03 +02:00
e031ace3d1 Merge branch 'blender2.7' 2019-04-07 11:24:28 +02:00
Robert-André Mauchin
d780409156 Fix for GCC9 new OpenMP data sharing
GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using
default clause or when using default(shared), this makes no difference, but
if using default(none), previously the choice was not specify the const
qualified variables on the construct at all, or specify in firstprivate
clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need
to be specified on constructs in which they are used, either in shared or
in firstprivate clause. Specifying them in firstprivate clause is one way to
achieve compatibility with both older GCC versions and GCC 9,
another option is to drop the default(none) clause.

This patch thus drops the default(none) clause.

See https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2019-04-07 11:20:50 +02:00
c536b61961 GPencil: Set layer channel custom color to all line in Dopesheet
See D4645 for more details
2019-04-07 09:37:35 +02:00
d2d84132dd Merge branch 'blender2.7' 2019-04-07 02:43:08 +02:00
44b54baf96 Fix build error with Visual Studio, appears to be a compiler bug
It's not clear that "if (0 &&" was introduced intentionally, but this test
only seems to have been an insignificant optimization anyway.

Fixes T63329
2019-04-07 02:41:46 +02:00
cc73d59ad5 Fix T59014: black/corrupted viewport with Intel HD on Windows 7/8.
Work around bug in the Intel driver:
https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/550740
2019-04-06 14:26:23 +02:00
4dfa134899 GHOST: tweak warning message about OpenGL 3.3. 2019-04-06 14:26:23 +02:00
f12040e088 DRW: Opti: Fix hotspot in DRW_mesh_batch_cache_get_surface_shaded
The hotspot was generated by mesh_cd_layers_type_overlap who was testing
way more data than it should have.

Here we reduce the whole CD layer mask to a 32bit bitflag that is easily
or'ed and tested.

Bonus point: We use atomic operation to merge the mask in order to allow
future multi-threading. (this was a TODO)

In the scene attached to T58188 this removes 5% of CPU time.
2019-04-06 01:55:21 +02:00
542725d3e9 GPU: Fix typo 2019-04-05 21:15:25 +02:00
fefc9c95e4 DRW: Opti: Replace bound tex/ubo tracking array by bitfields
release_texture_slots() and release_ubo_slots() were one hotspot when
drawing taking ~9% of total CPU counters for no reason.

This was because of the loops using GPU_max_textures that was overkill and
slow.

Replace those by a simple 64bit bitwise OR operation.
2019-04-05 21:15:25 +02:00
2219f28a68 Cleanup: Fix compiler warning 2019-04-05 18:50:13 +02:00
e559074c4e Fix T61035 Draw manager crash opening file with curves
Move free callback call to GPU_batch_discard to prevent the crash.

The issue was that clearing can happen after referencing to an instance
buffer and that's perfectly legal.
2019-04-05 17:48:56 +02:00
d140e597a6 Fix T63281: Drivers inside nodegroups inside nodegroups don't show up in Driver Editor
Recurse into node groups when looking for drivers.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4653
2019-04-05 16:31:19 +02:00
df99c54b5b EEVEE: Fix compilation
Introduced by f0d6879f5c
2019-04-05 15:03:43 +02:00
d220a87b47 Fix T63283: Second subdivision modifier does not ignore crease
This is something where there is no single correct behavior,
sometimes it's needed to ignore the crease to make mesh more
smooth. But sometimes crease is to be considered after first
subdivision surface: for example, when adding extra subdivisions
for render-time displacement.

Made it an option whether modifier needs to take crease into
account or not.

Existing files should be openable in the 2.7 compatible way,
to re-create an old behavior the options is to be manually
disabled in the modifier settings.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4652
2019-04-05 14:50:24 +02:00
6de0da70de GPU not able to allocate texture
In the case of the report a GL_PROXY_TEXTURE_2D_ARRAY of 2509x2509x1 failed to be allocated.
This is a work around as the GL_PROXY_TEXTURE_* is not reliable.

Reviewed By: brecht, fclem

Maniphest Tasks: T63223

Differential Revision: https://developer.blender.org/D4651
2019-04-05 14:40:54 +02:00
f0d6879f5c Fix T62892 EEVEE HDRI lightning glitch
Clamp the texture at sampling time. This is not the best way to do it but
this is the fastest/simplest. The cost is rather negligeable.
2019-04-05 14:38:27 +02:00
George Vogiatzis
a180b754eb Interface: New region type 'Footer', used by text editor
* It can be hidden by dragging it up/down.
* It can be at the top or bottom, independent of the header.
* It uses the color theme from the header.
* It does not change its color, when the area becomes active.

Currently, it is used in the text editor to display the file path.

Differential Revision: https://developer.blender.org/D4601
2019-04-05 13:48:26 +02:00
Simon
fce469a30c Cleanup: Replace deprecated finite with isfinite
Differential Revision: https://developer.blender.org/D4649
2019-04-05 13:41:28 +02:00
2bd8f2dfad Cleanup: Spelling 2019-04-05 12:53:12 +02:00
b3b335c398 Fix T60390: add Cycles texture node mapping settings to node editor sidebar
These were missing from the UI previously.
2019-04-05 12:50:12 +02:00
a6efbe95cf Fix T63292: Crash Workbench Texture Drawing 2019-04-05 11:28:04 +02:00
d40581a714 GPencil: Improve drawing feeling in big files
When drawing in big files, the first points of the stroke were not smooth because the system was doing a copy of the depsgraph datablock.

Now, the depsgraph is not updated at the beginning and the feeling is far better, especially for big files.

To avoid the copy, the original datablock is used while drawing, because it's faster the lookup of the original data, than a full datablock copy.

Also some cleanup of the code.
2019-04-05 11:26:04 +02:00
b2e2db94bd Fix T60379: Cycles viewport adaptive subdivision hangs after updates.
The camera world to raster computation was using wrong values. Also fixes
update when changing subdivision scene settings.
2019-04-04 21:22:31 +02:00
59d0582a75 Workbench: Support Transparency + Textures
When texture drawing was enabled the fallback materials were not transparent.
The reason was that the solid material was requested. This patch will requesting
in this case the material from the forward renderer.

Fix: T63077

Reviewed By: fclem

Maniphest Tasks: T63077

Differential Revision: https://developer.blender.org/D4641
2019-04-04 19:02:11 +02:00
b26164ded5 Fix T63108 Eevee: Wrong Reflection plane matrix if camera view is not centered
Invert X axis of the Window Matrix (AKA Projection matrix) instead of the
View matrix.
2019-04-04 18:08:42 +02:00
c2f3ba64ce Fix T63198 Eevee: Indirect lighting settings arent not updating in Lookdev
This was caused by a missing check for those option.
2019-04-04 17:59:57 +02:00
9fdc16e204 Fix T63278 Eevee: LookDev: Volumetric on even if Scene World is off 2019-04-04 17:59:57 +02:00
3b2ea26554 Fix segfault when audio system cannot be initialised
`PyInit_aud()` can return `NULL` for variour reasons. When that happens,
we shouldn't continue.
2019-04-04 17:59:46 +02:00
ceded86de3 Fix T61830: Remove option to add new keymap item in search mode
This was not working well, because the search text was removed
after pressing this button. Finding the item that was inserted
was not easy.

Removing the option seems to be the best solution for now.
2019-04-04 17:38:31 +02:00
01d0903f1e EEVEE+Workbench: Show partsys in final rendering
In final rendering mode the display type was tested for
visibility flag. This should only occus when doing viewport
rendering

Reviewed By: fclem

Maniphest Tasks: T63056

Differential Revision: https://developer.blender.org/D4643
2019-04-04 16:44:10 +02:00
df3c1dde04 Fix T63256: Make Dupli Face was broken since there are collections 2019-04-04 16:37:55 +02:00
3c7a538c9b Fix T60891: bgl docs still include deprecated opengl functions
In a separate step, all new functions should be added.
However, the best way to do this, is not clear yet.
A list of functions, that have to be added is available
in D4280.

Differential Revision: https://developer.blender.org/D4280
2019-04-04 16:14:59 +02:00
59f6371a85 Fix T63252: Bind in Mesh Deform Modifier fails
A regression since 64c8d72ef1.

The solution is to force modifier evaluation for an evaluated
object, and let it to copy binding data back to original when
is being evaluated for binding.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4642
2019-04-04 15:49:30 +02:00
c81eca3d98 Fix T63276: crash deleting object with alembic constraint. 2019-04-04 15:16:31 +02:00
3c6deb69f7 Fix ply import tests.
The function for clearing out objects in the startup file
needed updating for 2.8 collections api.
2019-04-04 08:50:17 -04:00
12fe0b79ce Fix part of T62720: crash loading alembic mesh that has no vertices. 2019-04-04 14:47:10 +02:00
af3f4f29e4 DRW: Fix hair count being limited by recent refactor
This was making Autumn being half naked.

Issue was introduced by rBe72dc667c4d3
2019-04-04 14:44:19 +02:00
3ab3f893a9 Eevee: Add property update for render settings
This was preventing the viewport update when the properties were changed
via scripting.
2019-04-04 14:44:19 +02:00
2bc3418884 Fix T63000: Don't use original file name for autosave
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4609
2019-04-04 14:38:18 +02:00
1ffa7462a2 Avoid flow to avoid the collection textfield from becoming too small
The collection instance field is currently using flow.column(), which makes the name of the collection instance unreadably small. {F6898084}
I get that we want to save vertical space to avoid scrolling, but in this case it generates a new problem, so I'd rather avoid flow here.

Patch by sebastian_k

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D4614
2019-04-04 14:01:57 +02:00
0298f1d634 Fix T62870: progress in taskbar not updated when cancelling render 2019-04-04 13:47:41 +02:00
Benjamin Meyer
c384b5ddbd Fix: Erratic collision response when using constraints on colliders
Missing dependency, which made collission to access object transform
prior it was evaluated.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4636
2019-04-04 11:05:52 +02:00
aa00019de0 Cleanup: remove B-Bone shape pointers from bPoseChanDeform.
They are pointless copies from pchan->runtime by now.
2019-04-04 11:25:21 +03:00
Harley Acheson
0e78e3038d Separation lines for Quad View
Reviewers: brecht, billreynish, fclem

Reviewed By: billreynish, fclem

Differential Revision: https://developer.blender.org/D4633
2019-04-04 01:27:42 +02:00
3464a53477 Fix T63255: Crash when circle select performs selection outside the viewport's bounds. 2019-04-03 20:05:59 -03:00
ef91df608a Fix T61870 Eevee: Object's go completely black if they have a normal map
The problem was that tangent layers (being computed on demand in the batch
cache generation) were generated but if MR_DATATYPE_LOOPTRI was not present
(in some cases) and the looptri_len was 0, leaving the CDATA layer cleared.
2019-04-04 00:51:03 +02:00
c6de149ee7 DRW: Mesh Batch Cache: Fix error in loop custom data layer checking 2019-04-03 23:51:00 +02:00
d0c418b10a Cleanup: redundant casts 2019-04-04 08:15:26 +11:00
22bc9fb4a9 Cleanup: style 2019-04-04 08:13:13 +11:00
Christopher Peerman
2933fd6c7c Fix T55589, T60967: Windows pen pressure issues at start/end of the stroke.
The new implementation uses WM_POINTERDOWN, WM_POINTERUP and WM_POINTERUPDATE
and the pointer API to process stylus events. This avoids the delays that comes
with the WM_MOUSE and WM_xBUTTON events. The implementation should work on
Windows 8, and Windows 10 with both legacy and new pen interaction.

It also changes how the pressure is reset when the Windows Ink implementation
is enabled. The previous version reset the pressure to full when the pen left
the screen, however for some hardware implementations this allowed a small
window where Blender may process the final move event and read the pressure
as full leaving a dot on the last event.

Differential Revision: https://developer.blender.org/D4314
2019-04-03 18:04:03 +02:00
6a9a2b5133 Windows: use Wintab by default if it's available and a device is detected.
Previously Automatic tablet API mode would handle both Windows Ink and
Wintab events. This is unpredictable and causes problems with the fix
coming in the next commit.

Instead assume that in most cases where Windows Ink is desired there
will be no Wintab. If that's not the case, it can be adjusted under
Preferences > Input > Tablet.
2019-04-03 18:01:03 +02:00
aa0bb47576 Fix T63257: Grease Pencil renders incorrectly when in edit-mode 2019-04-03 19:58:49 +02:00
322abc1428 Audaspace: merging modulator effect from upstream. 2019-04-03 19:56:25 +02:00
acc20b117d fix for freetype download link and llvm/clang header harvesting 2019-04-03 18:51:42 +02:00
c6d1ae2f8a Fix T62780 , T59802, T57648: fullscreen window issues on Windows.
This fixes popups and preferences appearing behind the main window, as
well as flickering artifacts when Blender is in fullscreen.

Patch contributed by phocomelus.

Differential Revision: https://developer.blender.org/D4634
2019-04-03 16:01:20 +02:00
Harley Acheson
27a239864f UI: remove close button from Windows console window.
This way you can't accidentally close Blender when toggling the console
window to be visible. When Blender is started from the command promt the
close button remains.

Differential Revision: https://developer.blender.org/D4627
2019-04-03 15:51:48 +02:00
4f26d2348c Multires: Make topology cache to work with copy-on-write
Allows to preserve topology cache even when copy-on-write is
fully re-copying the object. For example, toggling edit mode
in and out does no longer causes full topology to be re-created.
2019-04-03 16:14:02 +02:00
b2d68b53df Fix export_obj_cube test.
Verified that current export files for all_quads.blend are good,
then updated expected MD5 hash to match current files.
2019-04-03 10:05:47 -04:00
07b91c62cb Reset background alpha for probe rendering.
Possibly fixes T63005.

Reviewers: fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D4637
2019-04-03 15:57:38 +02:00
b1995e6451 Fix T63217: Curve Modifier skipped in Cycles
Only mesh objects have all modifiers applied on the evaluated
object's data, other object types are to apply modifiers during
the conversion process.
2019-04-03 15:38:17 +02:00
Victor Seiji Hariki
2f8b7030d4 Fix T62939: Incorrect cursor position when exiting UI slider
Differential Revision: https://developer.blender.org/D4629
2019-04-03 15:14:57 +02:00
George Vogiatzis
822c67364e UI: Fix odd behavior in region sizing, simplify code
* When resizing sidebars, don't collapse when the region becomes too big but
  instead clamp the region size to the available space.
* Fix clicking the tab to expand sidebars no working if the sidebar is too
  wide to fit. Instead make it less wide so it does fit.
* Fix incorrect limit on tool properties region height, for example in the
  file browser.

Differential Revision: https://developer.blender.org/D4611
2019-04-03 15:01:05 +02:00
e2d5ccf598 deps_builder : copy llvm headers to lib folder.
Were not needed previously, but the functions branch needs them.
2019-04-03 06:57:16 -06:00
ba2a81bcf1 Fix T62817: Can't drive modifier property with another one
Random place in the modifier stack can not be referenced,
so it doesn't make sense to sue GEOMETRY component as a
FROM operation.

So now drivers on modifiers are driving GEOMETRY component,
but are using PARAMETERS as a source for variables.
2019-04-03 14:50:21 +02:00
382b2a9c66 GPencil: Implement custom channel color in Dopesheet
A new parameter in the layer adjustment panel allows to define the color of the channel in Dopesheet.

This is needed when there are a lot of layers.

See D4623 for more details.
2019-04-03 10:25:49 +02:00
a813e259d6 Fix T63220: Cannot make object single user after Duplicate Scene with Link Object Data.
Caused by own recent rB17c15798c35f33e (already a fix in that code).

We cannot erase immediately master_collection's childrn list, as it is
used in sub-code to check in how many scenes an object is instanciated.
Further more, we only want to do the remove old/add new children
collections in case we are actually duplicating them.

Makes me even more eager to nuke that whole piece of code and rethink
from scratch that kind of ID handling. Some day...
2019-04-02 21:53:20 +02:00
Damien Picard
cf7dc769af Python API: expose text object kerning.
Differential Revision: https://developer.blender.org/D4621
2019-04-02 19:15:42 +02:00
1d365374e8 Merge branch 'blender2.7' 2019-04-02 17:51:44 +02:00
4c2b79a1d5 Constraints: Use RNA update instead of block update
Allows to have more control over which tags are done for which
properties.

This is a part of T62960 which fixes the issue in the 2.7 series.
2019-04-02 17:44:18 +02:00
4e2667ddf6 Constraints: Mark proxy lcoal as not editable
This can not work reliably anyway.
2019-04-02 17:43:33 +02:00
e9aa0d1e48 Cleanup: Remove space at the end of description 2019-04-02 17:42:30 +02:00
96de11c2c6 Fix T62434: EEVEE not using correct World Output node
We were already getting the designated output node in
'ntreeGPUMaterialNodes()' but this wasnt used in 'ntreeExecGPUNodes()',
instead whatever node was tagged NODE_DO_OUTPUT was executed.

note: this is just the bare minimum to fix the bug, other improvements
previously done in D4482 might follow as a separate commit.

Reviewers: brecht, fclem

Maniphest Tasks: T62434

Differential Revision: https://developer.blender.org/D4630
2019-04-02 17:09:27 +02:00
aaae21245e Cleanup: Fix compiler warning 2019-04-02 17:02:10 +02:00
Robert Guetzkow
f54db0fa05 UI: Collapsed nodes have the same width as uncollapsed nodes
Fixes T63079.

Differential Revision: https://developer.blender.org/D4617
2019-04-02 16:39:48 +02:00
459daf1648 Fix Linux build error after recent changes. 2019-04-02 16:30:51 +02:00
95a9a3e6c0 Cleanup: Scene Copy: remove scene's camera remapping in core func.
This is useless at that point, since no object has been duplicated yet...
2019-04-02 16:21:55 +02:00
0554b2e177 Fix T62970: Scene Copy: remove 'linked objects/obdata', add 'linked collections'.
'Linked objects' option was not behaving correctly before, effectively
linking in collections, so this one has been renamed to just 'Linked Copy',
and gives a fully shallow copy of current scene.

'Linked Obdata' was not really useful, kind of confusing, and was
painful to maintain, so dropping it now.
2019-04-02 16:21:55 +02:00
d986b04bd3 Fix broken BLI_STATIC_ASSERT on Visual Studio.
The old trick seems to no longer work in newer VS version.
2019-04-02 16:00:52 +02:00
4f4cea727e Fix T63164: DNA size mismatches on 32bit, causing memory corruption and crashes.
Some alignment rules from Visual Studion on 32 bit are not taken into
account, this fixes the structs to confirm. We now have static asserts
to catch when such breakage happens in the future.
2019-04-02 16:00:52 +02:00
b0037cd0b4 Fix T63219: error in previous commit for makesdna mismatch detection 2019-04-02 13:38:51 +02:00
964b5f02ca DNA: add error for DNA computed struct sizes and member offsets mismatch.
Ref T63164, there was a hidden bug like this on Windows 32 bit.
2019-04-02 13:42:13 +02:00
1abd909a92 Cleanup: remove DNA_PRIVATE_WORKSPACE hacks.
This is just not practical to do for the code as a whole, and having it as an
exception for one specific data structure is not that helpful. This has only
been in the way for me when refactoring code.
2019-04-02 13:32:25 +02:00
60090384f5 Cleanup: Fix compiler warning 2019-04-02 13:13:23 +02:00
dbccbc51fb Fix T63120 Select random in particle edit mode is broken
Fix coding snafu where the variable keeping track of changes only took
the state of the last element into account.
2019-04-02 12:37:45 +02:00
62811c3ba1 Fix T63211: Can't move camera in viewport while realtime render mode on
The issue is that Eevee directly evaluates animation on a datablock which
is a part of active dependency graph.

This is a broken logic by design and requires a complete revamp to support
more real life cases when camera is parented to a camera rig, but it is
beyond of what i can do with a simple bugfix.
2019-04-02 11:38:55 +02:00
0a2e59a726 Fix T61598: Python error from connect rigid body feature
needed update to 2.8
2019-04-02 10:15:04 +02:00
0df17bc9c9 Fix T60199: Icon Viewer addon causes internal errors and slows text editor
this just removes unused icon definitions [for which no icons exist
anymore]

Reviewers: billreynish, brecht

Maniphest Tasks: T60199

Differential Revision: https://developer.blender.org/D4628
2019-04-02 10:01:58 +02:00
6470056a0d Cleanup: empty expression statement warning 2019-04-02 17:54:04 +11:00
17c15798c3 Fix T63101: Blender crashes on adding any object to collection duplicated with added scene.
Issue was that (deep) duplication code of scene ended up leaving
children collections of new master one without any parent.

Note that even though I think that fix is OK for now, we should really
make 'deep' duplication of IDs part of the generic ID management code.
Am less and less happy with current handling of this, done half from
/editors code, half from some semi-specialized helpers from /blenkernel,
with sometimes nearly the same logic replicated several times for
slightly different needs, etc. Unfortunately this would not be a small
refactor, so it will have to wait...
2019-04-01 21:15:43 +02:00
b5382c92cf Edit Mesh Selection: Clear out buffer that indicates out of bounds pixels.
This prevents the use of uninitialized buffer.
In addition, use `memset` instead of assigning in a loop.
2019-04-01 11:53:04 -03:00
fa6c2c7dba GPencil: Handle vertex groups weights correctly
In extrude operator when the point was added, the weight data pointer was wrongly connected to old pointer.

Now, when move the data, the pointer is moved, but when a new point is added, the memory is duplicated to keep separated copies of the pointer.

This is related T62872

Thanks to @sergey for his help fixing this bug.
2019-04-01 16:48:01 +02:00
af6df8416e Cleanup: Indentation
Got broken in the previous commit somehow.
2019-04-01 16:33:28 +02:00
9ddf0c9d38 Fix memory leak in armatures with no bones
The cleanup operation was never run for such armatures.
2019-04-01 16:09:26 +02:00
e8c3c92248 Cleanup: Spelling 2019-04-01 15:33:09 +02:00
46eb5a0b8a Tweak behavior of object.to_mesh()
- Passing original object with apply_modifiers=false will give a
  non-modified non-deformed mesh.
  The result mesh will point to datablocks from the original "domain". For
  example, materials will be original.

- Passing original object with apply_modifiers=true will give a mesh which
  has all modifiers applied.
  The result mesh will point to datablocks from the original "domain". For
  example, materials will be original.

- Passing evaluated object will ignore apply_modifiers argument, and the
  result always contains all modifiers applied.
  The result mesh will point to an evaluated datablocks. For example,
  materials will be an evaluated IDs from the dependency graph.

Fixes T62916: Applying boolean modifier does not set material properly

Differential Revision: https://developer.blender.org/D4604
2019-04-01 14:49:23 +02:00
4370d00b0b Modifiers: Proper fix for the Apply Modifier
It is up to the operator to pass valid object to the modifiers
evaluation.

Fixes T62916: Applying boolean modifier does not set materials properly
2019-04-01 14:43:45 +02:00
64c8d72ef1 Modifiers: Use object passed to evaluation
This was wrong and violating design to force modifiers to query
evaluated objects and IDs. It is up to the caller to make sure
the object is properly evaluatable.

Effectively, reverting changes from de491abf99 (and possibly
other related changes).
2019-04-01 14:43:45 +02:00
a2a571987c Fix T62960: Expanding/Closing Constraints/Modifiers causes re-render
Mark specific properties as no-dependency-graph tag.

This is needed to avoid a centralized Copy-on-Write tag from RNA
pointer update.
2019-04-01 14:30:42 +02:00
90638d850d Remove evaluated RNA pointer lookup in interface
Since there is a flush of evaluated values back to the original
for an active dependency graph we don't need this lookup anymore.

Not only it slows interface drawing down, but also is becoming
in a way of the upcoming fix.
2019-04-01 14:30:42 +02:00
61fa6165df Fix T63071: Bevel inconsistent results toggling harden_normals.
Some iterations in bevel were over a hash table, which leads
to possibly different results run-to-run, especially when
loop_slide is enabled. Changed those iters to go over all verts
of BMesh, which leads to consistent order run-to-run.
2019-04-01 07:58:34 -04:00
dd4108545a Fix T63169: 'Duplicate Current' entry in new workspace menu is not translated. 2019-04-01 11:31:34 +02:00
d3367f3ca2 GPencil: Redesign soft eraser logic
The old logic was working if the eraser was moved towards the end of the stroke, but got ugly results when the eraser was done towards the start of the stroke.
2019-04-01 11:24:17 +02:00
48b1ba02e5 GPencil: Remove low limit for soft eraser
The low limit was not needed in the loop.
2019-04-01 11:24:17 +02:00
b936d7b16c Fix T62996
Reviewers
    Brecht Van Lommel (brecht)
    Clément Foucault (fclem)

Differential revision: https://developer.blender.org/D4618
2019-03-31 14:52:47 -07:00
a41008964c Fix: Buffer overflow in StudioLight
sl->light_ambient is a float[3], copy_v4_fl4 overwrites sl->free_function with a bogus
pointer on 32 bit.
2019-03-31 13:45:26 -06:00
a4869df4c9 I18n messages extraction: add 'generic' handling of Tools. 2019-03-31 18:49:11 +02:00
79c178b015 18N for tools definitions: make them resilient to None context.
Dynamic callbacks generating lists of tools should accept None context,
not crash on it.

Similar to what we do with dynamic RNA enums, when NULL/None context is
given, assume we are in 'introspection' mode and return as many things
as possible.

This is currently essentially used by i18n messages extraction tool
(where getting all possible entries is kind of mandatory ;) ).

Also add some initial missing tranlations for complex cases that cannot
be automated, there'll likely be more of that kind...
2019-03-31 18:47:54 +02:00
54943e319a Fix/Cleanup bad usage of RNA_def_parameter_clear_flags() on RNA properties. 2019-03-31 16:52:23 +02:00
700346d377 Fix T63137: crash pressing enter to confirm menu, after recent changes. 2019-03-30 20:37:45 +01:00
2c5a919212 Cleanup: remove unused modifier methods. 2019-03-30 19:17:05 +01:00
03bd024c07 GPencil: Uses same random seed for render in Noise modifier
As the random seed was calculated in the copy data, the render could be a little different. Now, the data is saved in the original data.
2019-03-30 17:06:49 +01:00
Author Name
4b6a4b5bc2 GPencil: Fix segment fault when use F3 search menu.
Author of the patch: Robert Guetzkow (@rjg)
2019-03-30 16:06:45 +01:00
127ad4fa4a GPencil: Improve soft eraser for low pressure strokes
For very thin strokes with low pressure, the low limit value was too high.
2019-03-30 10:43:52 +01:00
de0dab66ff Fix T63086: Navigation problem with Background/Reference Images
The issue was the manipulated depth for images would be used when doing distance depth checks.
Now we will use the actual depth of the image object when doing such tests.

Reviewed By: Clément Foucault

Differential Revision: http://developer.blender.org/D4616
2019-03-30 08:22:43 +01:00
024d02256e Fix T63115 crash upon switching to textured/rendered mode 2019-03-30 04:20:35 +01:00
98f00a3eb5 UI: Icons update
New icons from Andrzej Ambroż / jendrzych:
-Adds separate icons for 3D Cursor orientation and pivot
Also, many dozens of tweaks and updates - too many to mention here.
Full list is on Devtalk
2019-03-30 01:02:15 +01:00
25ec4b437f Cleanup: style, use braces for the Python API 2019-03-30 07:14:28 +11:00
18d06e8d21 Cleanup: style 2019-03-30 07:14:28 +11:00
d6747f310f Eevee: Material: Decouple transparent shadows from blend mode
This makes it easier to exclude a surface from casting shadows and can be
used to manipulate the shadows even for opaque surfaces.

Versionning ensure that old behavior is transfered to new rendering logic.
2019-03-29 19:18:19 +01:00
f0a20ae1c9 Fix T61129 Eevee: alpha texture shadow bug
This was due to some shading resources not being bound for the shadow
shader. This commit completely remove the shading part when in a shadow
shader. Thus making it a bit more lightweight and removing the needed
sources.
2019-03-29 19:18:19 +01:00
21f35661c1 Fix cramped display of tool setting enums in workspace tab. 2019-03-29 17:56:42 +01:00
b9b3b4a957 Fix part of T63102: wrong Python API Reference link in Help menu. 2019-03-29 17:56:42 +01:00
5aca73e774 Fix header text for muted collapsed nodes not being greyed out. 2019-03-29 17:56:42 +01:00
dec9c7d87e Eevee: Implement Texture coordinate from object
First try to implement T57489. But unfortunately, there is a missing
dependency in the depsgraph that does not trigger the shader update.
2019-03-29 17:41:06 +01:00
c14e6ee9a4 Cleanup: Line wrapping 2019-03-29 15:41:13 +01:00
fb86d09195 GPencil: Improve soft eraser for last stroke points
Now, the last point is managed separately in order to get smoother transition.
2019-03-29 15:39:47 +01:00
a942d8859c Cleanup: Spelling in comment 2019-03-29 15:33:44 +01:00
d66ed7d540 Fix T63042: Grease pencil and armature will sometimes copy successfully because of the put in Collection order, sometimes fail.
Remove remapping to new IDs from `BKE_object_duplicate()` itself, doing
it here will break later remapping done after all desired objects have
been duplicated, preventing complete remap of ID pointers used in obdata
and other sub-data of duplicated objects.

Checked, the only two usages of this function were already doing
separated later step for this anyway.
2019-03-29 14:57:32 +01:00
d9829efb0a Cleanup: BKE_object_duplicate.
Comments, code consistency, remove disabled code...
2019-03-29 14:57:32 +01:00
2182ae5c0f Cleanup: Fix comment. 2019-03-29 14:57:32 +01:00
0cd36ccfaf Fix T63075: edit mode crash with deforming modifiers, after recent changes. 2019-03-29 14:53:56 +01:00
800aeaba72 GPencil: Cleanup code
Reduce double function calling.
2019-03-29 12:51:46 +01:00
7fc7e325ef Fix T63082: Outliner allows assign grease pencil materials to mesh
The grease pencil materials only can be assigned to objects of grease pencil type.
2019-03-29 11:58:28 +01:00
1def03d797 Fix T62938: Rigid body crash with surface effector
Missing dependency graph relation from geometry to simulation,
which made simulation to use evaluated mesh while it is being
evaluated.
2019-03-29 10:27:57 +01:00
9f55beb971 Cleanup: Make it obvious which relations are used
Relation in dependency graph is something else. So make it clear
that those are the effector ones.
2019-03-29 10:21:36 +01:00
d724363a39 Fix T62908: Missing update when inserting keyframe from dopesheet 2019-03-29 10:01:55 +01:00
99d4321fef Fix T63063: solidify modifier crash after recent changes.
It should not assume there to be an origindex layer. Checked other modifiers
and they all seem to explicitly create it or verify if it's NULl.
2019-03-29 01:43:30 +01:00
6d4d7c7ca3 Cycles: reduce number of synchronizing object prints.
Do it only for meshes/curves since those are potentially slow and need user
feedback to see things are not stuck. For object instances and lights assume
it's fast enough.

Printing too much can have a performance impact on slow Windows command
prompt or when logging complex scene renders.
2019-03-29 01:42:38 +01:00
cefc058dd8 Build environment: update comment about required packages. 2019-03-29 00:39:19 +01:00
7cbd1b0c98 Eevee: Render: Reduce debug print amount to not decrease perf
This is to fix the slowdown issue experienced on windows when rendering
from command line.

Fix T59649 Eevee in command-line batch mode is slow with particles/duplis
2019-03-28 23:24:25 +01:00
4d71b655ec GPU: Fix color difference when rendering to gpu_py_offscreen
Now we do the color management inside the Draw manager and output CM byte
buffer.
2019-03-28 22:38:55 +01:00
42dd888b98 Fix T62178 Eevee: Texture Box mapping not matching Cycles if object is scaled
The wrong transformation was used. Add a new matrix specially for this case.

This also fix the Node texture coordinate that was suffering the same issue.
2019-03-28 22:08:54 +01:00
d027df3add Fix T58387 Voronoi(Cells) does not work on eevee (amd + windows)
Thanks to Gabor Fekete for helping finding the issue.

Was caused by uninitialized variable. Also took the oportunity to use comp
swizzling instead of multiple assignment.
2019-03-28 22:08:54 +01:00
a89780abb5 DRW: Fix Memory leak introduced by previous commit 2019-03-28 22:08:54 +01:00
ec0eeb918b DRW/Eevee: Add correct support for Orco
Until now, Orcos were computed by the gpu (GLSL) and were not taking into
account the modifier stack (breaking orco for deformed mesh).

Now Orco is now computed on CPU but only if a modifier stack is present.

Tagging that an ORCO layer is present is done via a 4th component, which is
a waste of memory/bandwidth. Best would be to do the same as auto attrib
color space and save a bool uniform somewhere but for now it's too
disruptive.
2019-03-28 22:08:54 +01:00
Nathan Craddock
1ef59026e4 UI: tweak display of report messages in the status bar.
Remove fading away the color, share theme colors with info editor.

Differential Revision: https://developer.blender.org/D4197
2019-03-28 20:02:59 +01:00
Robert Guetzkow
56428a46b9 Fix T60719: muted nodes are not clearly visible.
Now the entire node gets greyed out, instead of using a red header that is
hard to distinguish from other nodes with similar header colors.

Differential Revision: https://developer.blender.org/D4597
2019-03-28 20:02:59 +01:00
a016ad2ea8 Fix part of T60735: invalid CD_ORIGINDEX data in some modifier stack evaluations.
BKE_mesh_new_nomain automatically added a CD_ORIGINDEX layer initialized to 0,
which was never filled in correctly. In 2.7 the equivalent function used to
modify the source derivedmesh and add valid original indices to it, but this
is no longer possible in the new design and was quite unpredictable anyway.

Now instead rely on mesh_calc_modifiers and the depsgraph to determine when
CD_ORIGINDEX should be added.
2019-03-28 20:02:59 +01:00
0680525147 Fix T60735: Cycles render hangs with vertex instancing.
This should not use the original index as a unique instance index, with for
example an array modifier the same original index may be used multiple times.
2019-03-28 20:02:59 +01:00
7b95d64d2f Cleanup: better naming, comments, variable scoping in mesh_calc_modifiers. 2019-03-28 20:02:59 +01:00
c39d82daf4 Cleanup: remove unused derivedmesh code. 2019-03-28 20:02:59 +01:00
fbfa5890bf Fix build errors
From rBd5cb425b8745
2019-03-28 16:00:37 -03:00
7b62c61d6e UI: Theme: Make selected text stand out
Previous selected text color was almost invisible against the dark background.
Use same selected/highlight color as in other places in the default theme.

Issue reported on Devtalk by user Symstract
2019-03-28 19:59:46 +01:00
d5cb425b87 Possible fix for T62999: Crash when select in edit mode.
Apparently some drivers don't allow `glReadPixel` read out pixels of texture boundaries.
Intersect `rect` to avoid such cases.
2019-03-28 14:19:21 -03:00
dfa470ec33 GPencil: Fix error in previous commit 2019-03-28 17:17:04 +01:00
eeefea86cd Fix T63054: Crash on "Grease Pencil Unlink"
This operator was used only by annotations and it was part of the old legacy code.

Now, the operator is limited to annotations and cannot be used with grease pencil objects.

Also changed the tooltip to clarify it's only for annotations.
2019-03-28 17:07:49 +01:00
1dddb47e48 Fix T63052: Crash on "Grease Pencil Fill" without Grease Pencil Object
Changed poll function to verify if the context is valid.

Also cleanup return values.
2019-03-28 16:48:32 +01:00
1be2888bf0 Fix T62717: Switching Shading Modes During Sculpting
Switching shader modes to material or render during a sculpting session
showed the model when the sculptsession was started. The user needed
to click that forced an update of the sculptsession.

In `sculpt_flush_update` the eevee drawing mesh is not updated when
workbench engine is used.
2019-03-28 16:10:15 +01:00
87ac695106 Fix T63032: Increase camera properties precision in UI
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4610
2019-03-28 15:56:53 +01:00
e2995b29a9 Fix T63015: Crash when using circle select tool in lattice edit mode
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4608
2019-03-28 15:04:09 +01:00
aa0c864d48 Fix T62874: Crash Texture shading+Transparency
When texure shading is enabled, the transparency accum shaders were not set/updated.
This resulted into a crash when transparent objects were rendered when shading mode
was set to texture.

This patch will add the V3D_SHADING_TEXTURE_COLOR to the modes for OIT so the
shaders are set.

Reviewed By: fclem

Maniphest Tasks: T62874

Differential Revision: https://developer.blender.org/D4592
2019-03-28 14:59:00 +01:00
fe9c9a313f Fix T63040: Resizing node has offset
This broke in rB6500b31728d870506207d9d70837b171cbef32ea.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4607
2019-03-28 14:56:55 +01:00
deb3b8301a DrawManager: Add Edge Detection To DisplayLists
Objects that internally uses DispList do not cast shadow in the workbench.
Their outline is also not visible in object mode. The reason for this is
that edge detection was not implemented for Display Lists. This patch will
implement the edge detection.

Reviewed By: fclem

Maniphest Tasks: T62479

Differential Revision: https://developer.blender.org/D4605
2019-03-28 14:52:25 +01:00
f916b43256 Fix T60421: Bone heads are hidden when non-connected parent is hidden
The root point of a bone is now always drawn unless it is connected to an other bone.

Reviewed By: Clément Foucault

Differential Revision: http://developer.blender.org/D4194
2019-03-28 13:09:16 +01:00
0403a2f785 Fix T53997: island_margin in bpy.ops.uv.smart_project seems to have no effect
Now island margin acts as a percentage instead of being the actual distance.
So the margin distance will always be the same regardless of the actual size of the geometry.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4514
2019-03-28 12:55:47 +01:00
5a8dcdd24e Fix T62944: Memory leak in animation playback
Missing memory free in the early output of particles distribute
initialization.

Seems it was always there.
2019-03-28 12:07:58 +01:00
9d1cab2eba Fix T63030: Edge crease is not applied for boundary edges
Caused by missing vertex sharpness comparison in the topology
comparator.
2019-03-28 11:49:08 +01:00
33b43dd933 Fix T63031: Keyframing Annotations doesn't work
By design the annotation parameters must not be animatable.

Annotations are designed to take notes, not to create animations, so any animatable parameters have been flagged as non-animatable.

Note: As some properties are shared with grease pencil, I had to duplicate one property (adviced by @mont29) to keep grease pencil animatable but annotations don't.
2019-03-28 11:43:32 +01:00
5bcca7ae92 Depsgraph: Fix dependency cycle when adding rigid body
Was a mistake in the recent change.

The idea here is: manual should invalidate point cache, but
rigid body simulation should only happen after point cache
was ensured to be in the correct state.
2019-03-28 11:04:00 +01:00
fdf92b923a Fix T63037: Accelerator keys fail when another key is highlighted 2019-03-28 16:44:27 +11:00
02ff600620 Cleanup: add doxy sections to view3d_draw,header 2019-03-28 15:20:39 +11:00
cd92f8ea46 Fix bpy.msgbus.subscribe_rna argument parsing
Also enforce all arguments are keywords and update docstring.
2019-03-28 11:40:17 +11:00
a58a4f48be Edit Mesh Selection: Clear buffer before using in glReadPixel.
Areas out of bound are not written.
2019-03-27 20:34:05 -03:00
c11a317ee1 Cleanup: style, use braces for makesdna, datatoc 2019-03-28 10:11:54 +11:00
e80527ec4d DRW manager: Always assume that the GL_DITHER and GL_SCISSOR_TEST should be disabled if not used.
This may fix a glitch detected when you perform edited mesh selection.
See comment in rB00bdb5cdf08f
2019-03-27 19:36:12 -03:00
c263ccf250 Fix T63023: wrong Eevee window coordinates for background. 2019-03-27 22:32:13 +01:00
f589b28f80 Fix part of T63023: wrong Cycles window coordinates for background. 2019-03-27 22:21:23 +01:00
780219f868 Eevee: Fix reflection plane weird behavior when comming from lookdev mode
The reflection was set to use the 1x1px texture as rendering target and was
considered valid reflection texture.
2019-03-27 22:02:31 +01:00
37e3b89506 Fix T63017: selection via lasso does not work properly in X-ray.
Probably missed in rB40f8ddf8297a.
2019-03-27 16:48:49 -03:00
52d5d53b5e Fix T55956: Transfer Weights: Source Layers can't be set to Active Layer.
Behavior of source/destination options was rather flaky in reversed
mode...

Note that even though this mode is a bit annoying and cumbersome, the
only alternative (defining a specific transfer weight operator) would be
much more verbose, so think that for now we'd rather keep what we have
here.
2019-03-27 20:47:56 +01:00
05201c75e3 Cleanup: minor comments fixes. 2019-03-27 20:47:56 +01:00
f9a69a481e Fix T62566 Eevee: Cubemap doesn't bake from current frame of animation
This was technically a feature request but it was quite simple to implement
so I did it quickly. Also it is much more consistent now.
2019-03-27 20:47:15 +01:00
afaa832a85 Fix T62680 Mirrored objects have flipped binormal vectors in LookDev
Pass binormal sign via object info.
2019-03-27 20:21:10 +01:00
2add370096 Eevee: Modify tooltip about transparent shadow
Mention that this option is only for shadow mapping and not contact shadow.
2019-03-27 19:41:35 +01:00
96d200775a Fix T62997 Eevee: visual artifacts during irradiance volume baking
Seems to be a problem with Nvidia drivers. glFlush does not work but
glFinish does ensure correct multithreading.
2019-03-27 19:15:32 +01:00
6d1921dd81 Fix T62862 Eevee: Glitchy reflections in ortographic view
This was caused by sign(cubevec.xy) returning 0.0 when one component was 0.
Thus making the resulting component component 0.0 instead of 0.0.
2019-03-27 19:15:32 +01:00
021333ae3a UI: Add missing separator in object context menu 2019-03-27 17:04:47 +01:00
99c98aa306 Python API: tweak RenderEngine example to be a bit more efficient.
Suggested by Germano Cavalcante.
2019-03-27 16:25:19 +01:00
532536bf52 Fix T61559: show object constraints also when in pose mode, remove warning.
This was originally added in 6feddb8b61, but the warning is quite clumsy
and we also don't limit editing object transforms that way. The add constraint
button at the top now also indicates if it's for objects or bones, which was
not the case before and probably was part of the confusion.

If it does still cause issues we can always change back or hide the tab.
2019-03-27 15:41:06 +01:00
00bdb5cdf0 Edit Mesh Selection: make sure that GL_SCISSOR_TEST is disabled.
Possible solution for T62999.
2019-03-27 11:35:32 -03:00
9624df5d1e Fix T63004: Make Links operator would still allow collection instancing
for objects other than Empties

In 2.8 support for dupli-group instancing for non-empty objects was
removed (rB2eca054e14b1), so better prevent operators from setting
this...

Reviewers: brecht

Maniphest Tasks: T63004

Differential Revision: https://developer.blender.org/D4599
2019-03-27 15:27:49 +01:00
73b55a5508 Cleanup: style, use braces for draw 2019-03-28 01:14:03 +11:00
56b06ee83a Fix T62901: Bad handling of missing addon category 2019-03-27 15:13:14 +01:00
34c2185af4 Fix debug error on recent commit. 2019-03-27 11:06:15 -03:00
5a1a633d04 UI: minor change to active-default logic
Don't attempt to activate default button if it's already active.

Also expand on the flags comment.
2019-03-28 00:59:50 +11:00
57de9581e8 UI: use active-default button flag for operator confirmation 2019-03-28 00:54:55 +11:00
27b73f0c5b GPencil: Remove legacy ED_gpencil_draw_view3d code.
Differential Revision: https://developer.blender.org/D4598
2019-03-27 10:53:15 -03:00
c87e467e39 Fix T62935: Missing tag when copying constraints 2019-03-27 14:50:09 +01:00
a8c1b792da UI: use active-default button flag for the file selector 2019-03-28 00:46:13 +11:00
2d34420648 UI: support an 'active default' button for pop-ups
Use this for the save confirmation dialog so it has a default action
when pressing enter which draws with a highlight so it's clear what the
default action is (the dialog was just closing before).

Resolves T57686
2019-03-28 00:26:00 +11:00
e3b83e2921 Cleanup: remove unused menu bl_spacetype 2019-03-28 00:26:00 +11:00
b4d19c2ec1 Fix T62978: grease pencil 3D view header layout broken after recent changes. 2019-03-27 13:59:54 +01:00
db4a522249 Revert "RNA: error on register when classes use invalid identifiers"
This reverts commit b24a255ca6.

The warning wasn't being printed, so many add-ons weren't yet updated.

Re-enable now warnings are printed to allow addon developers to update.
2019-03-27 23:29:53 +11:00
6387fdda74 Fix T62926: allow using shift click drag to extend selection in file browser.
Standard behavior on most operating systems.
2019-03-27 13:13:05 +01:00
8d7005d715 Cleanup: style, use braces for bmesh 2019-03-27 17:14:36 +11:00
e26b67fa1e Fix popovers from enums failing on drag-release 2019-03-27 15:35:49 +11:00
69a77a1b83 Fix class registration ignoring info/warnings
Only errors were displayed in the console.
2019-03-27 14:03:40 +11:00
9f2665b526 PyAPI: utility function to print reports 2019-03-27 14:03:40 +11:00
fb7f157ff8 Cleanup: unused variables 2019-03-27 13:19:02 +11:00
9ba948a485 Cleanup: style, use braces for blenlib 2019-03-27 13:17:30 +11:00
337eb8c1de Python API: add more detailed example for RenderEngine. 2019-03-26 19:57:51 +01:00
85915ae1aa Python API: allow passing None to some BGL functions instead of bgl.Buffer
Many OpenGL functions take NULL pointers, passing those was quite complicated
with some addons even using ctypes to manipulate internal bgl.Buffer pointers.
2019-03-26 19:56:43 +01:00
c515ea2e93 Fix vertex array leak in Cycles viewport drawing. 2019-03-26 19:56:43 +01:00
6e3331990f DRW manager: Use existing viewport instead of creating a viewport in DRW_draw_depth_loop. 2019-03-26 12:29:12 -03:00
d67122e027 Fix T62952: remove lamp as camera using the lamp clip start/end.
Eevee and Cycles don't use these clipping distances the same as Blender
Internal did, or at all in most cases. Just remove this since it makes no
sense anymore.
2019-03-26 16:11:48 +01:00
9b39a71793 Fix T62958: Improve exponential easing formula
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4596
2019-03-26 15:43:51 +01:00
16a04dccd5 Fix T62955: Missing panels in workbench engine
Afaik all the panels in the scene settings are render
engine independent. So it does not make sense to have
this extra complexity in every panel class.

Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4594
2019-03-26 15:43:12 +01:00
8e0eb4125d Fix T62626: Python errors when pinning particle settings. 2019-03-26 15:41:43 +01:00
32c9b3a0ff Merge branch 'blender2.7' 2019-03-26 15:30:52 +01:00
7574f90a71 Fix Cycles standalone build, needs OpenJPEG libraries with OIIO now. 2019-03-26 15:29:01 +01:00
52aa35ec1e Fix T62189: Wires Occluded When Edit Mesh Faces Disabled
Reviewed By: fclem
Maniphest Tasks: T62189
Differential Revision: https://developer.blender.org/D4593
2019-03-26 15:19:47 +01:00
51f8e51d78 Edit Mesh: Fix interpolation of gradient on edit edges
This fix some issue with the AA on edit mesh edges.
2019-03-26 15:11:31 +01:00
3aeb44cd79 Fix T62260 edges display bug on big geometries when looked up close 2019-03-26 15:11:31 +01:00
33a759a39c Revert "DRW Manager: create and use new DRW_framebuffer_depth_read utility."
This reverts commit 40f8f445a3.

There are many paths that lead to uninitialized depth buffer where the
depth read would fail.

Fix T62965
2019-03-26 15:07:05 +01:00
fb96dcd713 UI: Avoid double separators in some circumstances in the object context menu
Also make placement of Rename more consistent between object and bones.
2019-03-26 14:48:35 +01:00
a29446da52 Cycles: sync various master changes to blender2.7.
Many of these were left out accidentally. We will only do important bugfixes
in blender2.7 for Cycles from this point on.
2019-03-26 14:42:26 +01:00
5d455a7a90 Fix (unreported) crash when making object single user in some cases.
Issue would happen in case affected object is linked to collections that
are shared between different scenes' ViewLayers. When switching back to
another scene after making single user, you'd get immediate crash.
2019-03-26 14:41:37 +01:00
6f7392312c Fix T62929: Linked To Scene Object cannot be made single user.
Code was still 2.7x one here, Object's IDtemplate in properties editor
is now based on current view layer's collection of objects, not scene's
one anymore.
2019-03-26 14:41:37 +01:00
8754ad4dc1 UI: Make naming clearer for the motion paths commands in the pose context menu 2019-03-26 14:37:10 +01:00
982a80e6d8 UI: Add rename to object and bone context menus 2019-03-26 14:36:15 +01:00
b2656a6ee4 Fix T62887: When searching for fonts, thumbnail display mode will crash Blender
We do not support special color fonts (like colored emoji fonts), so
don't crash when trying to create a preview for unsupported fonts.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4590
2019-03-26 14:11:35 +01:00
c2c6083c14 Fix T62957: Camera frame returns zeros 2019-03-26 22:53:42 +11:00
f786861820 Fix T62756, T62131: moving stencil texture fails after moving stencil mask 2019-03-26 12:36:47 +01:00
b33005c1f4 Fix T62925: shift+F1 append shortcut not working in Blender 2.7 keymap. 2019-03-26 12:13:14 +01:00
67516b93d8 Fix T62515: crash when rendering finishes with mouse over progress bar.
Tooltip should be copied entirely, not just the the argument because then the
function and argument don't always match.
2019-03-26 12:04:14 +01:00
ce3b78c73a Cleanup: style, use braces for editor/spaces 2019-03-26 21:16:47 +11:00
5279d118c2 Cleanup: style, use braces for editor/metaball 2019-03-26 21:16:26 +11:00
1bde690e91 Cleanup: style, use braces for editor/interface 2019-03-26 21:16:13 +11:00
fe7812f7c2 Cleanup: style, use braces for editor/curve 2019-03-26 21:15:47 +11:00
14e013758d Depsgraph: Standardize parameters nodes
Makes it possible to handle them the same from drivers
relations builder.

Solves missing operations errors printed when opening
autumn character.
2019-03-26 11:05:18 +01:00
40f8ddf829 3D View: move deselect all logic into an option
This removes `VIEW3D_OT_select_or_deselect_all`, adding a
deselect_all option to the `VIEW3D_OT_select` operator.

- Add utility functions to simplify de-selecting all.

- Return true from selection functions when they change the selection
  to avoid redundant updates.

- Use arrays of bases when passing objects between selection utility
  functions since some users require bases.

- Fix logical error in box selection that updated all objects after
  the first hit.
2019-03-26 20:25:25 +11:00
30fbf905ef Fix T62774: Respect Show Overlays
Some draw code did not respect Show Overlays option. These were:

 * All mode based drawing engines (edit mode)
 * Wireframe drawing

This change make them respect the Show Overlays Option.

Reviewed By: fclem, billreynish

Maniphest Tasks: T62774

Differential Revision: https://developer.blender.org/D4572
2019-03-26 07:58:54 +01:00
2bbfaa1c94 Fix use of uninitialized variable in grease pencil materials. 2019-03-26 04:26:47 +01:00
6944228027 Fix T62946: function abs() not working in driver expressions. 2019-03-26 04:11:34 +01:00
6618a19fa9 Fix T62946: missing warning when Python driver expression execution is disabled. 2019-03-26 04:11:34 +01:00
da4dc6847b Cleanup: remove unused function 2019-03-26 12:51:52 +11:00
adfdae3fc2 Cleanup: style 2019-03-26 10:15:46 +11:00
a750dea74e Cleanup: warnings, correct assert 2019-03-26 10:15:36 +11:00
82de58b318 Fix T62927: Assert when opening default 2.79 startup file in 2.80.
Not sure why that was asserted on instead of handling the flag properly,
if base is not selectable, then just do not select it...

Have the feeling this code handling sync of flags between bases and
objects could use some cleanup, but that will be for another day.
2019-03-25 21:10:02 +01:00
e59a2fcc35 Fix T62856 Toon BSDF and viewport/UI oddities
This was caused by the material not tagged to use Diffuse lighting data.
2019-03-25 20:36:31 +01:00
c602ec74fd GPU: State: Replace GL_BLEND by GPU_blend 2019-03-25 20:26:52 +01:00
c41e8b8f6f GPencil: Remove unused var 2019-03-25 20:24:02 +01:00
420f30efe7 Fix T62930 Eevee: Wireframe input node not working with certain compiler 2019-03-25 19:44:44 +01:00
7021bd5273 GPencil: Only brushes with pinned materials have materials
Using GP_BRUSH_MATERIAL_PINNED to switch between active material and brush material, instead of updating all brushes on active material changes. This will allow brushes to have no material and therefore to not inflate the user count.

This fix T62465.

Patch contributed by @matc
Reviewers: @brecht @antoniov @billreynish @mendio
2019-03-25 17:06:07 +01:00
84240ebb3e Fix T62776: Face maps are initialized incorrectly
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4586
2019-03-25 16:32:01 +01:00
9cd970734b Fix T62536: incorrect context when selecting particles
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4566
2019-03-25 15:54:48 +01:00
1638204ad4 Fix T62865: Make Single User after Objects to Scene must be done twice.
Selected status was not properly moved from new object to new created base.
This prevented next steps (making obdata, materials etc. local) to ever
happen.
2019-03-25 15:23:56 +01:00
0195aad6da Fix T61577: collapse nodes hide arrow hit zone overlaps with node sockets.
Patch by EitanSomething.

Differential Revision: https://developer.blender.org/D4423
2019-03-25 14:28:29 +01:00
489c015e70 Fix T62891: particle even distribution is not even.
CD_ORCO coordinates are stored normalized by convention, this code path did
not store them correctly.
2019-03-25 14:28:29 +01:00
a6f9e0d644 UI: Add Copy/Paste to top level Outliner context menus 2019-03-25 13:40:55 +01:00
c97e291580 Keymap: Add support for the Cmd key on macOS for copy/paste in the Outliner.
Consistent with other areas.
2019-03-25 13:30:21 +01:00
a74b571dde Merge branch 'blender2.7' 2019-03-25 11:23:00 +01:00
0f9792507d Cleanup: Spelling in comment 2019-03-25 11:19:50 +01:00
Stephen Hassard
ede1ca0b3f Change remaining FTP server URIs to HTTP(s)
Most of the source tarballs are retrieved via http, but a few remain
that are still downloaded via ftp. This causes some pain with corporate
firewalls, so moving the last two URIs to http helps ease the build process.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4192
2019-03-25 11:19:14 +01:00
13839860d4 Merge branch 'blender2.7' 2019-03-25 11:05:03 +01:00
d46cb486ed Include blosc, embree and opencollada into BUILD_NOTES.txt file.
For custom path selected during 'install_deps.sh' using '--source'/'--install', paths for blosc, embree and opencollada are not printed/inclued into BUILD_NOTES.txt file.
As '/opt/lib/<package>' paths are hardcoded into CMakes's Find* modules, this error is not noticeable, but for custom paths it is.
This patch includes those fixes/prints for those packages.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D4574
2019-03-25 11:04:26 +01:00
ccf7630a6d Fix T62912: Blender 2.7 keymap missing ctrl+tab select mode switching. 2019-03-25 10:47:52 +01:00
5aaf67c196 Merge branch 'blender2.7' 2019-03-25 10:46:20 +01:00
cfe044b4ef Fix T62175: Crash on Undo.
Again nodetree broken code... as usual...
2019-03-25 10:34:56 +01:00
a3e9b61a2f RNA: add UILayout.prop_with_menu function
Matches prop_with_popover, supporting menu types,
useful if we want to control behavior of enum switching.
2019-03-25 20:34:47 +11:00
d8d06120e4 RNA: rename prop_popover_enum to prop_with_popover
A version for menu's is going to be added next and we already have
UILayout.prop_menu_enum.

This name indicates the popover is added behavior instead of a
different kind of widget.
2019-03-25 20:34:30 +11:00
14b60c3a1c Cleanup: UI messages of copy/paste in 3DView.
Remove references to buffer or temp file, some other minor edits.
2019-03-25 10:19:56 +01:00
94388d69bb Add copy/paste of any IDs in Outliner.
This adds entries to copy/paste (selected) IDs in the Outliner, as well
as usual ctrl-C/ctrl-V shortcuts.

Note that the clipboard is shared with other IDs copying (currently, the
one for objects in 3DView).

Reviewers: brecht, dfelinto, billreynish, pablovazquez

Differential Revision: https://developer.blender.org/D4568
2019-03-25 10:09:57 +01:00
c1f8b9753a Copy/Paste: refactor to be able to paste any kind of IDs, by type.
This commit does not add anything new from user perspective, but make it
possible to paste any kind of IDs, not only objects/collections.

Will be used by new copy/paste in the outliner in next commit.
2019-03-25 10:09:03 +01:00
6d8a945f06 UI: replace popovers with prop_popover_enum 2019-03-25 19:30:59 +11:00
a5bbfd9fca UI: add icon_only option to prop_popover_enum 2019-03-25 19:21:55 +11:00
2fa0a9a329 Error in last commit 2019-03-25 19:08:02 +11:00
e583642312 UI: add UILayout.prop_popover_enum function
Support for RNA enum buttons that activate popovers when clicked.

This means we get useful tooltips, shortcuts and Ctrl-Wheel cycling
over enum items.

It also avoids inconvenient & slow access of enum values currently done
via RNA type lookups on the type to get the name & icon to use for a
regular popover button.

Resolves T57738
2019-03-25 19:05:13 +11:00
ca0cc0518f Cleanup: simplify toggle button logic 2019-03-25 16:21:13 +11:00
dec9e34361 Gizmo: use fill select for scale/transform center
Resolves T58072
2019-03-25 15:41:24 +11:00
b67c3a0db9 Gizmo: add option to move & dial gizmos to select as filled
Draw as an outline while using solid selection.
2019-03-25 15:40:43 +11:00
f3cff06087 UI: Material slot selector for the shader editor
D4583 by @HooglyBoogly
2019-03-25 14:49:44 +11:00
b24a255ca6 RNA: error on register when classes use invalid identifiers
Ensure conventions are met since we're in beta and all instances should
be updated before release.
2019-03-25 14:48:28 +11:00
2ed3fbf106 Fix T62859: UV circle select options don't work 2019-03-25 14:13:09 +11:00
Alex Strand
7bfd3130fb Fix T62866: 3D text not filled by default
Regression in bc5b0f7a09

See D4581
2019-03-25 13:33:13 +11:00
6dbe96757b Cleanup: return argument naming 2019-03-25 12:19:55 +11:00
07f6be87a9 Cleanup: style (render module) 2019-03-25 11:55:36 +11:00
abd18f6ec0 Cleanup: style 2019-03-25 11:42:28 +11:00
e86e0aad55 Cleanup: use braces for interface code 2019-03-25 11:16:46 +11:00
72ede30d0f Cleanup: pass const image data to IMB_ibImageFromMemory 2019-03-25 09:08:29 +11:00
a38313c3bd Cleanup: style, array wrapping
Add trailing comma for clang-format.
2019-03-25 09:02:04 +11:00
ff8c32fa6b Fix uninitialized variable use for right aligned checkbox 2019-03-25 07:34:06 +11:00
2691dd28e7 Fix T49979: HSV/HSL 'Far' interpolation in colorbands when both stops have same hue.
When two stops had the exact same color, 'Far' interpolation would
behave like the three others and generate constant colors, instead of
generating expected 'full turn' in Hue space.

Note that this will break the 'constant' color between two stops with
same value in the 'Far' interpolation mode, but think that change is
OK/expected.

This fix also exposed that 'early out' case when we are after last stop
was not working properly, still triggering actual interpolation
computation in all cases, thus the refactor in `BKE_colorband_evaluate()`
itself. We also now avoid computing factors in constant case, and get
out early in all interpolation cases but the 'spline' ones (where color
ramping can start before first stop, and end after last one).

Work initiated by patch from Charlie Jolly (@charlie) in T49979, thanks.

Reviewers: brecht, sergey

Subscribers: charlie

Differential Revision: https://developer.blender.org/D4556
2019-03-24 18:20:25 +01:00
b48e6799f1 Fix missing version patching from lamp/light and subsurface changes. 2019-03-24 14:49:49 +01:00
16694ed408 Cleanup: redundant use of string formatting functions 2019-03-24 16:09:46 +11:00
79f67acccb Cleanup: redundant NULL initialization 2019-03-24 11:06:18 +11:00
106551b9ad Cleanup: use shader config for worldspace clipping lib 2019-03-24 11:01:28 +11:00
809101e69e UI: support Ctrl-C copy for popover buttons
Match menu logic that sets the Python expression to call the popover.
2019-03-24 10:52:23 +11:00
72c323d50c GPU: State: Replace GL_LINE_SMOOTH by GPU_line_smooth 2019-03-23 23:54:01 +01:00
53cd37d510 GPU: State: Disable polygon smooth and line smooth when running --debug-gpu
This might prove usefull when debugging some driver perf issues.
2019-03-23 23:47:12 +01:00
ed9af18c76 GPU: Replace glEnable/glDisable but GPU_state calls 2019-03-23 23:43:26 +01:00
ee5e7a006e GPU: Remove unused and deprecated GPU_line_stipple() 2019-03-23 23:42:30 +01:00
0f8da4f014 Fix T62884 Missing control point in unselected mask handles
The fix is a bit dirty. Force alpha 1.0 for these colors by using
immUniformThemeColorShadeAlpha with 255 as alpha_offset.
2019-03-23 22:46:15 +01:00
e77dc3e7ff Fix T62869 Transparent background not working in Xray Mode / Wireframe
This was due to the forward part of the engine not supporting rendered
alpha channel.
2019-03-23 22:13:57 +01:00
13832988ad Fix T62873 GPUShader: compile error (when clipping in viewport)
Props to @matc for the fix
2019-03-23 19:31:20 +01:00
16087eb911 Fix T62097 Bone transparancy not enabled when Xray enabled
This forces bone transparency / wireframe display when Xray is enabled.
This makes sense as the bone transparency is a kind of Xray and should
be linked to the Xray display.
2019-03-23 19:28:13 +01:00
839fe4e01c Eevee: Opti: Don't consider lights that have no power
This may be usefull if power is animated ans is to be activated at one
particular point in time.
2019-03-23 19:18:51 +01:00
b40aa83910 Cleanup: Remove printf 2019-03-23 19:16:55 +01:00
0a89c3954f Fix T62845 VSE preview crash when setting rendered (EEVEE/Workbench) 2019-03-23 19:09:25 +01:00
d057dea7ae Edit Mesh: Rework "in front" + "hidden wire" drawing
Instead of doing some fancy stencil buffer tricks, just clear the depth
buffer before the "in front" meshes.

Fix T58841 Hidden Wire when in Edit Mode disables In Front Option
2019-03-23 18:46:45 +01:00
7454fa927b Fix workbench object outline ignoring clipping
Workbench forward engine wasn't recompiling shaders when clipping
changed, use GPUShaderConfigData when creating shaders.
2019-03-23 14:30:38 +11:00
0093ad643a Cleanp: remove redundant clipping uniform
workbench_material_shgroup_uniform handles this.
2019-03-23 14:26:33 +11:00
045a615f9a UI: show camera sensor 'Width' as 'Size' for 'Auto' fit 2019-03-23 12:29:49 +11:00
f7ec9a5d3a Fix auto sensor size for camera gizmo 2019-03-23 12:29:03 +11:00
23a76491eb Cleanup: style, use const args where possible 2019-03-23 12:16:38 +11:00
ce658d2485 Cleanup: add doxy sections to interface_ops.c 2019-03-23 12:10:23 +11:00
4dc6259cfe Cleanup: doxy sections & function name 2019-03-23 12:10:23 +11:00
Dalai Felinto
faecac0b5e Fix T62815: Camera frame shift issue + stereo frame working
While I broke the non-stereo camera frame in rBf1fef41863b I came to
realize after further tests that the stereo camera frame was NEVER
correct.

It is now, regardless of the camera shift, the camera pivot, if you are
looking through the left, right or stereo eyes.

In the end all that was missing was to multiply the shift we needed to
offset the frame, by the frame width.

I also took the opportunity to perform some cleanup/refactor regarding
names. It was too confusing even for me.

Note: Non-uniformally scaled cameras still draw slightly wrong.
2019-03-22 18:47:24 -03:00
Dalai Felinto
4015d162df Viewport Refactor: Move camera tracking reconstruction in own function
I'm going through my own messy stereo code, and came to realized that
this should be out in its own function a long time ago (as we have in 2.7x).
2019-03-22 17:31:50 -03:00
967364dc3e Cleanup: fix compiler warning. 2019-03-22 20:36:30 +01:00
ac643aa881 Fix COLLADA build after recent changes. 2019-03-22 20:36:29 +01:00
Dalai Felinto
820be185bc Silence false positive uninitialized warning
Techically we would never get to the part where we would use the
uninitialized value due to an assert.
2019-03-22 16:31:23 -03:00
c2b2f9baa8 Merge branch 'blender2.7'
Conflicts:
	CMakeLists.txt
2019-03-22 16:23:23 -03:00
edcb5415a2 MSVC: add C4115 and C4189 warnings.
This matches the warnings of the other compilers commonly used in Blender.
2019-03-22 16:15:46 -03:00
Dalai Felinto
243a9254ea Fix warning for uninitialized icon_only
Warning/issue introduced on rBcaa357dae70322e.
2019-03-22 16:03:38 -03:00
Dalai Felinto
74b47e4181 Fix: VSE preview not showing stereo drawing (unreported)
SpaceSeq main stereo drawing is for ar->regiontype RGN_TYPE_PREVIEW, but
the drawing code was assuming RGN_TYPE_WINDOW was the only one to be
considered for all the regions.

SpaceSeq still needs stereo drawing in RGN_TYPE_WINDOW but only when
backdrop is enabled.

Bug introduced on rBe01cadd657c76267.
2019-03-22 15:55:32 -03:00
dcbc46dacb Fix T60969 Eevee: Volumetrics broken with dupli objects
The volumeObjectMatrix uniform was referencing memory from the temp dupli
object. Create temp storage to store the matrix.
2019-03-22 19:43:08 +01:00
3a516f7555 GPU: Cleanup: Code Style 2019-03-22 19:43:08 +01:00
7b3e114975 Fix T57617 Volumetrics doesn't work on the Orthographic Camera
common_data.view_vecs were not updated before use.
2019-03-22 19:43:08 +01:00
6c0bd89047 Fix T58392 Texture limit size not working
It was removed by inadvertence.
2019-03-22 19:43:08 +01:00
8b4e0eb88e Fix T59962, T60130: error adding image sequence with node wrangler.
The region should be restored correctly, there is already a similar test for
areas to be preserved.
2019-03-22 18:59:40 +01:00
9c5c91cc7c Merge branch 'blender2.7' 2019-03-22 18:18:37 +01:00
9e3e92a908 Revert "Cleanup: remove legacy mesh save support"
Fixes T62793. Leave this in the blender2.7 branch for those that still rely
on it, but it will remain removed in master.
2019-03-22 18:16:46 +01:00
Ish Bosamiya
da5b6ed75b Modifiers: add minimum number of vertices to triangulate modifier.
This lets you only triangulate n-gons when setting the number to 5 or more.

Differential Revision: https://developer.blender.org/D4367
2019-03-22 18:11:14 +01:00
8e6f765964 Fix T62844: Cycles crash with bevel and degenerate geometry. 2019-03-22 17:30:36 +01:00
c89dcc89e6 UI: move stereo panel above output.
Otherwise clicking the stereo panel moves it.
2019-03-22 17:30:00 +01:00
Dalai Felinto
5f45cbb26e Fix T58517: Multi-view issues with OpenGL render + scene settings
Patch by Shinsuke Irie.

* * *

Note from reviewer/committer (dfelinto):

OpenGL render from the VSE preview window is working, while the VSE
preview window itself does not show stereo.

That said the patch is ok, and I was able to test that the VSE preview
OpenGL still works. I will tackle VSE preview itself separately myself.
2019-03-22 13:20:54 -03:00
Dalai Felinto
193b708a48 Silence warnings 2019-03-22 13:20:54 -03:00
be8eac840a Fix overlay being ignored in functions that read the depth buffer.
This corresponds to the behavior of blender 2.79.
2019-03-22 13:08:03 -03:00
40f8f445a3 DRW Manager: create and use new DRW_framebuffer_depth_read utility. 2019-03-22 13:08:03 -03:00
e061cb4437 GPU: Create and use new GPU_texture_read_rect utility. 2019-03-22 13:08:02 -03:00
a96ccf20b6 NodeEditor: Connect Viewer To Socket Selection
Request from the Spring team. When compositing the CTRL-Shift Click on a
node cycles the viewnode with an output socket. When you have many
render layers you spend time cycling to the desired socket. This patch
allows the user to CTRL-Shift Click on a socket to connect directly to
that socket.

Reviewed By: brecht

Maniphest Tasks: T62785

Differential Revision: https://developer.blender.org/D4564
2019-03-22 17:03:28 +01:00
Adrian Newton
530e7cc799 UI: Rename editor "Compositing" to "Compositor"
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4480
2019-03-22 16:47:53 +01:00
Dalai Felinto
9a49a26eb3 Fix T62348: Cycles - Viewport rendering not update on switching viewlayer
It updates only the main window you edit and the non-main window
children of this main one.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D4528
2019-03-22 12:46:39 -03:00
043dd64c26 DRW: minor optimization accessing the loop between a face and edge 2019-03-23 02:45:55 +11:00
Dalai Felinto
a17df6d91e Fix T62841: Hidden collection shortcut should be work in edit mode
This is a full revert of b6c61945ae.

But ammended to include the object.hide_collection() operator to the
pose keymap as well.

While trying to expose the shortcuts to pose mode, I ended up exposing
them for all the modes. It is now only available for object and mode
modes.
2019-03-22 12:03:42 -03:00
fcff2a5751 Fix T61816: Crash No Face Index Array Modifier
Differential Revision: https://developer.blender.org/D4576
2019-03-22 15:23:53 +01:00
4f9451c044 Camera: change how the minimum near clip depth is set
do_clip wasn't working for its intended purpose,
replace with a simpler method.
2019-03-23 01:16:06 +11:00
33d322873e RNA: Camera.view_frame no longer uses near clip for the camera frame
Use the same values used for drawing.
2019-03-23 01:16:06 +11:00
6c4b9dd963 Style: describe code using comments instead of preprocessing directives. 2019-03-22 10:35:17 -03:00
f6a6770f06 Fix T62839 object scale changes normal map output in eevee
Was using the wrong vector length.
2019-03-22 14:30:43 +01:00
b0c40de5ee Fix/workaround some types of black dots in denoising with bright speculars.
This is not a real solution and colored dots still remain, just rejecting some
pixels that seem clearly wrong.
2019-03-22 14:25:28 +01:00
0b98b7ed57 EEVEE: Memleak Volumetrics Rendering
Volumetric textures were not freed when doing final rendering.

Maniphest Tasks: T62356

Differential Revision: https://developer.blender.org/D4573
2019-03-22 14:23:25 +01:00
be750e2aee Cleanup: minor UI code changes
- Rename ui_but_find_active_in_region -> ui_region_find_active_but
- Remove ui_but_is_active (use ui_region_find_active_but instead)
- Re-order ui_but_* functions take the button as their first arg.
2019-03-23 00:18:16 +11:00
8f3ecd08e1 Fix checkboxes being right aligned when property split is disabled 2019-03-23 00:03:48 +11:00
caa357dae7 Cleanup: typo in variable name 2019-03-23 00:01:00 +11:00
2d60618746 UI: refactor queries into interface_query.c
interface_handlers.c is quite large (over 10k lines),
move general button utility functions into a separate file.
2019-03-22 23:38:24 +11:00
c2584c1fad Fix incorrect hard limits on motion blur shutter time. 2019-03-22 12:09:02 +01:00
1e70639ed5 UI: Move Adjust Strength for Spacing next to the stroke Spacing control
These items are related.
2019-03-22 11:27:56 +01:00
3f852e00f9 Fix T62835: Color picker template value slider does not scale correctly with UI scale
Missing multiplication with UI_DPI_FAC.
2019-03-22 10:59:12 +01:00
177623dd40 Implement Stencil Mask Drawing for Texture Painting
Stencil mask drawing was not implemented yet. This commit will implement this for texture painting.
It brings the state back to how it was for B279.

Reviewed By: fclem

Maniphest Tasks: T58727

Differential Revision: https://developer.blender.org/D4570
2019-03-22 08:21:12 +01:00
5cd3e1b5d1 Cleanup: move widget enum into source file 2019-03-22 17:56:58 +11:00
6e7e6832e8 Fix T62814: Camera frame invisible with large near-clip value 2019-03-22 17:28:53 +11:00
813694e07b UI: use checkbox text for property split layout
Use right aligned checkboxes when 'use_property_split' is enabled
instead of a separate label.
2019-03-22 15:43:23 +11:00
bd2299aae5 UI: support for showing checkboxes after text
Needed so the new layouts that show right aligned checkboxes can have
clickable text (as left aligned checkboxes do already).
2019-03-22 15:43:23 +11:00
27da43ba86 UI: refactor color picker flags out of buttons
These are specialized color picker options which don't need to be
stored in the button (frees of flags for buttons too).
2019-03-22 15:43:23 +11:00
00f7dcd5be DRW: show clipping border for solid mode
Solid + xray is still not supported.
2019-03-22 15:43:23 +11:00
78ce2063d3 Cleanup: use 'use' as prefix for booleans 2019-03-22 15:43:23 +11:00
c0f96855e4 Fix T57580: Update windows installer package to have the GPL3 as EULA. 2019-03-21 21:25:20 -06:00
c49a70bcd1 Eevee: Add small optimisation for Curve Mapping nodes
This remove the RGB texture lookups if the curve is only used for "Luma"
correction and does not affect individual RGB channels.
2019-03-22 03:53:21 +01:00
875b50f94f UI: Fix curve extention filling on curve widgets 2019-03-22 03:53:21 +01:00
6a65bb4955 GPU Matrix: Increase precision of GPU_matrix_unproject. 2019-03-21 22:23:50 -03:00
2b42b8b779 BLI Math: Add and use new projmat_dimensions utility. 2019-03-21 22:23:49 -03:00
1ae6aaad43 Eevee: Cleanup
Remove unneeded normalization.
2019-03-22 00:13:18 +01:00
8b00712b55 Eevee: Fix tangent vector not normalized before interpolation. 2019-03-22 00:13:18 +01:00
27109fd209 Eevee: Normalize Tangents after transform to world space
Fix T62621 without breaking everything else.
2019-03-22 00:13:18 +01:00
cc1b193ddf Revert "Fix T62621 object scale changes tangent node output in Eevee"
This reverts commit 86646dab7c.
2019-03-22 00:13:18 +01:00
1f1e90a013 Fix T59890: regression of the precision when projecting the cursor.
Basically the framebuffer size was different from the glViewport size.
This made the depth read in glReadPixel not corresponding to the center of the pixel.

Another thing that reduced precision compared to blender 2.79 is the `GPU_matrix_unproject` that now computes using `float`s instead of `double`s.
But this may be for another commit.
2019-03-21 17:04:35 -03:00
c1da8d8986 UI: Use better flow layout
Flow layout needs columns defined to work properly
2019-03-21 18:25:01 +01:00
b6ad98729b UI: Spelling: fix wrong apostrophe 2019-03-21 16:36:29 +01:00
ad8566db9b UI: Fix wrong spelling
Effect vs Affect
2019-03-21 16:31:46 +01:00
a3b9f20b1b UI: make UI label clearer for Affect Rotation 2019-03-21 16:30:55 +01:00
82507ecf5a UI: align header to the left
Since it's a header, this makes the hierarchy clearer
2019-03-21 16:30:09 +01:00
56c940988f Fix flow layout for camera data Viewport Display panel.
Flow layout needs sub-layouts to properly identify 'cells' of its grid.
2019-03-21 16:24:02 +01:00
196e3920f7 Use 'show_' prefix convention for composition guides 2019-03-21 16:05:32 +01:00
6f38d2782a UI: Correct tooltips for composition guides 2019-03-21 15:09:11 +01:00
a0c9095620 UI: Put camera composition guides in standard sub-panel
Before we were using a very inconsistent toggle-menu for this. Just use standard UI here instead.
2019-03-21 15:01:07 +01:00
e4694c057b UI: replace button open event with activate on init
No user visible change.
2019-03-22 00:55:24 +11:00
2b21e7ab9a Fix T62768: Softbody cache still not updated correctly
There was missing flush from transform update to the point cache
reset. Caused by the fact that when update happens in the "middle"
of component all the component operations will be tagged for update
(since the intermediate state is not stored), but that will not
flush updates to other operations since that would cause too much
of updates.

This now we tag point cache for reset after evaluation operation
but before final transform and before rigid body world.
2019-03-21 14:41:41 +01:00
b832f6f915 Fix T62810: AA reversed in workbench
Due to recent changes the AA was not rendered in the viewport when not
interacting. When interacting it was. This was due to incorrect
detemination to perform TAA.
2019-03-21 14:35:28 +01:00
9a09246dc0 WM: enable activate on init for wmOperatorType.prop
This enables popups to edit text when displayed,
use for new collection popup.
2019-03-22 00:32:01 +11:00
19dc7f7fdf Install_deps: add clang-format packages.
Even though that one is not really useful just to build Blender, we can
as well explicitely include it here, since all 'default' Blender builds
will include full clang/llvm stack anyway (for Cycles and deps)...
2019-03-21 14:12:30 +01:00
dd1132416e Docs: update examples for 2.8x
Use fields for properties
2019-03-22 00:07:06 +11:00
bd1299f6a4 Keymap: Use F4 for file context menu
- Replace Window context menu with File menu.

  This was recently removed however artists in the studio use
  link/append often.

- Add preferences to this menu so `F4, PKey` can still be used as a
  quick way to access preferences.
2019-03-21 23:03:17 +11:00
75b14db6a9 Fix T62808: Hair shape cut crash
Reviewers: sergey

Differential Revision: https://developer.blender.org/D4565
2019-03-21 12:38:07 +01:00
fbceac9708 Cleanup: Outliner: remove warning about no undo of ID deletion.
ID deletion is undoable nowadays...
2019-03-21 11:17:21 +01:00
8314c3188c Fix clipboard copying collections when copying objects from 3DView.
This was inherited from 2.7x behavior with groups, but in 2.8
collections are also used as 2.7x layers, which turns to be a problem
when pasting back clipboard content, since it would instantiate
collections instead of objects, quickly leading to tens of new
collections in the viewlayer...

Instead, we only copy selected objects from the 3DView now. On paste
time, those will be added to the active collection.

Last part of fixes related to T61670.
2019-03-21 09:47:50 +01:00
b346a7c0df Fix T62802: Layer order inverted in Outliner 2019-03-21 09:29:16 +01:00
b98fe9e707 Cleanup: move functions into doxy sections
Also use const args for queries.
2019-03-21 14:19:45 +11:00
9b3818762a Cleanup: use doxy sections for interface_handlers 2019-03-21 13:53:27 +11:00
0bbff8a711 Cleanup: move scroll step into own function 2019-03-21 11:58:03 +11:00
06585e0b13 UI: popovers scroll now changes offset directly
Mouse wheel on menus changes the selected item item which doesn't work
well for popovers since buttons aren't always stacked vertically.

Resolves T62777
2019-03-21 11:37:44 +11:00
83753d1d29 Cleanup: split menu scrolling function
The same function scrolled to a location and button (depending on args).
2019-03-21 11:36:51 +11:00
9105e1d084 Fix T62782: Edge slide crashes with mirror enabled 2019-03-21 09:53:57 +11:00
f71e8617e0 Viewport: Draw loose edges in edit mesh mode if there is a modifier stack 2019-03-20 22:43:30 +01:00
c2f0bd6aed Fix DEG warning from T52873: Proximity WeightVG modifier can use empty as target too.
Only create DEG_OB_COMP_GEOMETRY relation to target object when it has
some, and we use it.
2019-03-20 21:12:34 +01:00
1cf592e62e Fix T58748 Mirror modifier: edges/verts invisible unless face is present
It was due to the mapped mesh not being used if no face was present in the
cage mesh.
2019-03-20 20:07:22 +01:00
da1350acdc Fix T60815: drag & drop crash when search menu is opened immediately after.
Patch by matc, some further refactoring by me.

Differential Revision: https://developer.blender.org/D4250
2019-03-20 19:50:21 +01:00
6500b31728 Fix T62788: drop image into node editor puts node at wrong location.
It should be under the mouse cursor but was wrong for high DPI. Also put the
cursor in the header now so it's easy to reposition.
2019-03-20 19:18:51 +01:00
e0d95b7f79 Merge branch 'blender2.7' 2019-03-20 18:40:10 +01:00
eb94a0db4f Fix assert after recent changes.
Mark as localized immediately, so that functions that edit the node tree can
verify they are being used under the correct conditions.
2019-03-20 18:39:56 +01:00
d7cecc2ba3 Fix cycles.merge_images not merging correctly for some channel layouts. 2019-03-20 18:39:26 +01:00
b6d1946c2e Merge branch 'blender2.7' 2019-03-20 17:33:54 +01:00
b06d32e4be Cycles: make cycles.merge_images work with incomplete layers and passes.
If layers and passes are not exactly the same in all files, we make a best
effort to merge them instead of failing.
2019-03-20 17:26:25 +01:00
c4908c8e8c Fix T62758: hair curves with UV mapped textures renders wrong.
Differential Revision: https://developer.blender.org/D4562
2019-03-20 17:26:21 +01:00
bff472d2ff Fix T61326 "In Front" option not working on edit curves
Create a new pass for them and draw them separately.

Beware of the double multisample resolve when multi-editing a mix of curves
with and without the "in front" option enabled.
2019-03-20 17:26:14 +01:00
15d6521de9 Fix assert on vertex parent
The evaluation was done on an original object, which is not allowed.
2019-03-20 17:20:10 +01:00
afd9e87f8d UI: Make paint context menus more contextual
- Only show Radius for tools with radius
 - Add more sliders here depending on active tool
2019-03-20 17:04:57 +01:00
2f4bd63239 Fix T56778: Alembic Override Frame does not update on playback 2019-03-20 16:48:35 +01:00
980b61a22c Fix error in UI of empty image due to last commit 2019-03-20 16:48:00 +01:00
f06dc36c35 Select Similar: use kdtree de-duplication
Avoids redundant tree traversal when finding nearest.
2019-03-21 02:42:31 +11:00
3602071e47 BLI_kdtree: add deduplicate function
Function to remove exact duplicates from the tree before balancing.
2019-03-21 02:42:24 +11:00
dce5695f8e Fix missing free in recent kdtree changes 2019-03-21 02:40:10 +11:00
099a410478 Depsgraph: Fix cycle with rigid body and Weight Proximity
The issue is a feedback loop with point cache reset operation.

Solved by introducing extra node which ensures object's transformation
is ready for simulator input. Allows to route relations without causing
a fake dependency cycle now.
2019-03-20 16:37:15 +01:00
c5fc861172 Fix T58550 Dragged in images dont overlap properly
This patch adds a new "Use Alpha" option on image empties to avoid ordering
issue of reference images.

If ordering is not important, "Use Alpha" can be enabled to provide
transparency and alpha blending support.
2019-03-20 16:33:49 +01:00
3508ffc34c Fix T59449: Particle system creates error in rigid body
Is a dependency cycle problem. Fix is similar to what is done in 024f5ba2bd.
2019-03-20 15:18:47 +01:00
f08910e7b2 UI: relocate rename menu item
This was in between operator adjust/search.

Also remove line accidentally added in last commit.
2019-03-21 01:06:08 +11:00
4e0b5a0baf Cleanup: style 2019-03-21 01:01:27 +11:00
08efcefb47 Fix T61759: Dynamic paint smudge crash
The issue was caused by mesh needed for dynamic paint brush being
stored in the modifier. That make it to be freed and set to NULL
when running copy-on-write.

Solved by moving the mesh to be stored in modifier's runtime data.
2019-03-20 14:57:31 +01:00
1f97f6c531 UI: Accumulate name was being overridden in Sculpt Mode 2019-03-20 14:56:48 +01:00
72ff1ff305 Modifiers: Never copy runtime data pointer 2019-03-20 14:53:06 +01:00
f391362f8c Fix T60190 Z-fighting with (Culled) Backface
Create a separate pass for backface culled objects.
2019-03-20 14:51:06 +01:00
6d60207537 Fix renaming the pose bone
The name from the pose bone needs to be changed in pose mode.
2019-03-21 00:34:19 +11:00
91914320ca Fix T62711: Incorrect motion path update
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4560
2019-03-20 14:21:25 +01:00
52e344a770 Fix T62770: Changing Constraint.mute does not update pose
Missing dependency graph tag. Is only happening for scripts, since
the interface is handling this from do_constraint_panels().

Fix is suggested by Edmund Kapusniak (@edmundmk), thanks!
2019-03-20 14:19:30 +01:00
f39a4a4a4e Cleanup: More C++ like nature for word split test
While it looks more longer, but also contains more comments
about what's going on.

Surely, this function almost never breaks and investing time
into maintaining its tests is not that important, but we should
have a good, clean, understandable tests so they act as a nice
example of how they are to be written. Especially important to
show correct language usage, without old school macros magic.

Doing this at a lunch breaks, so will be series of some updates
in the area.
2019-03-20 14:14:56 +01:00
de535fdd52 UI: Change name Airbrush back to Accumulate
'Airbrush' didn't make sense for Sculpt mode.
2019-03-20 14:14:06 +01:00
e4320e2ce0 UI: Consistent naming and ordering of paint Symmetry and Options panels 2019-03-20 14:09:55 +01:00
daa4d4dd25 Fix T62248: Infinite Hotspot Size Crop Node
When the area of the crop node is zero the hotspot margin becomes infinite.
This makes the gizmo by default think the translate mode hotspot is everywhere.

This fix will return a state if the INFINITY is detected so we can
return the hotspot drawing.

The cage2d gizmo is still not usable for sizes of 0 by 0 as now it won't
draw anything. the issues of the gizmo should be re-designed so we can
mitigate these limitations. But that is out of scope for this fix.

Reviewed By: campbellbarton

Maniphest Tasks: T62248

Differential Revision: https://developer.blender.org/D4516
2019-03-20 14:00:18 +01:00
d3ee995eaf Cleanup: return early in BLI_path_frame_get
Instead of making the entire body of the function conditional, it now
returns early, unindenting the entire function and preventing the reader
from searching for a non-existent `else` clause.

No semantic changes.
2019-03-20 13:45:14 +01:00
0333cf00ba Fix BLI_path_frame_strip
The `BLI_path_frame_strip` function was completely broken, unless the
number of digits in the sequence number was the same as the length of
the extension. In other words, it would work fine for `file.0001.abc` (4
digit `0001` and 4 char `.abc`), but other combinations would truncate
to the shortest (`file.001.abc` would become `file.###.ab` and
`file.00001.a` would become `file.##.a`). The dependency between the
sequence number and the file extension is now removed.

The behaviour has changed a little bit in the case where there are no
numbers in the filename. Previously, `path="filename.abc"` would result
in `path="filename.abc"` and `ext=""`, but now it results in
`path="filename"` and `ext=".abc"`. This way `ext` always contains the
extension, and the behaviour is consistent regardless of whether there
were any numbers found.

Furthermore, I've removed the `bool set_frame_char` parameter, because
it was unclear, probably also buggy, and most importantly, never used.

I've also added a unit test for the `BLI_path_frame_strip` function.
2019-03-20 13:42:45 +01:00
8b9b3422eb UI: popup panel for renaming the active item
In 2.79 there was an "Item" panel with only to give access to rename
from the 3D view.

Add this functionality for context sensitive renaming.
Currently this works for objects/bones/sequence strips & nodes.

This uses F2 for a window level shortcut, replacing the file-io menu.

See: T61480
2019-03-20 23:39:50 +11:00
1b1b604596 Fix T62678: better glyph clipping test
Reviewers: billreynish, brecht

Differential Revision: https://developer.blender.org/D4550
2019-03-20 13:33:52 +01:00
d6bf6744fc Fix T60211: MemLeak Convert Curve To Mesh
Ownership flag was not set, but was it was meanted to be. So the set
runtime data to NULL disconnected the Mesh with no ownership.
2019-03-20 13:30:41 +01:00
a1addc5c63 UI: support for popups starting with buttons activated
While this could already be done from C,
this is now exposed to Python
2019-03-20 23:10:34 +11:00
Stefan Werner
69fb859909 Merge branch 'blender2.7' of git.blender.org:blender 2019-03-20 12:51:32 +01:00
Stefan Werner
63cb789551 Cycles: Made Embree ignore curve intersections with SSS. 2019-03-20 12:30:33 +01:00
Stefan Werner
5eb38df4af Cycles: Performance optimization for Embree, resizing arrays once instead of per object. 2019-03-20 12:30:33 +01:00
ef09aff61c Preferences: add threshold for cursor motion
A hard coded threshold was used to ignore cursor motion,
make this a preference since tablet users may want to increase it
since a pen hovering isn't as easy to keep still as a mouse.

Resolves T56278
2019-03-20 22:19:16 +11:00
454b90483d Fix missing refresh when subdividing hair strand
This is a part of T62730.i
2019-03-20 12:03:15 +01:00
1d5c85ffd9 Fix T62750: Deleted Keyframe Still Affects Scene
Missing ID recalc tag.
2019-03-20 11:49:07 +01:00
Dalai Felinto
0c44b7e177 Fix T61670: Copy -> Paste - Pasted elements are not selected
The first part of this patch is just a way to improve performance a bit
by not calling BKE_scene_object_base_flag_sync_from_base() twice.

The second is the proper fix for the reported issue.

That said, the report can be re-opened since there is still discussion
about whether or not to bring the collections with the objects.

Reviewers: mont29

Subscribers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4558
2019-03-20 07:45:24 -03:00
3e790e7607 UI: Add context menus to Metaball Edit, Lattice Edit and Text Edit modes 2019-03-20 10:51:37 +01:00
21cd575e88 Fix (unreported) Copy/Paste: orig object being instantiated in active collection on pasting.
When copy/pasting an object in same .blend file, orig object would be
instantiated into the active collection when pasting, along with the
content of the paste. Was missing a clear of LIB_TAG_DOIT on objects...

Found while investigating T61670.
2019-03-20 10:30:50 +01:00
a23197655c Cleanup: spacing in space_view3d 2019-03-20 10:17:55 +01:00
1d42b27fac UI: Add mirror consistently to to contextual menus
After recent changes, the mirror operators are now much nicer to execute from menus.
2019-03-20 10:17:10 +01:00
9138c761e4 Cleanup: un-indent NDOF operator body
This was needed for C89 compatibility,
avoid having most of the operator logic in an else block.
2019-03-20 18:42:10 +11:00
7c2ac7950a Cleanup: Use doxy groups for NDOF operators 2019-03-20 18:41:46 +11:00
4fa904e91c Cleanup: use lowercase for dimensions in function names
Most API's already use this convention.
2019-03-20 18:25:27 +11:00
db5a82302c Error in last commit 2019-03-20 18:13:11 +11:00
18b98fdd6f Fix T62682: Inconsistent NDOF camera auto-key
Some view operations auto-keyed when locking the camera to view
but some NDOF operators didn't yet support it.

Auto key during animation playback for recording camera motion.
2019-03-20 18:09:28 +11:00
f889050aea Fix T62757: Mirror operator fails for non-modal execution
Unlike most transform operators that use an orientation and values,
Mirror uses the constraint axes to define which axes are mirrored.

Now constraint axes are shown in this case.

Other changes:

- Use 'EXEC_DEFAULT' for mirror menu items.
- Show mirror on local axis when not in edit-mode since this is useful
  in object mode too.
- Remove mirror vertex groups since this is in the vertex group menu and
  this menu isn't currently used for general symmetry operators which
  are currently in other menus.
2019-03-20 16:50:48 +11:00
dc800154b6 3D View: snap cursor to world origin now resets rotation 2019-03-20 15:45:10 +11:00
fe7c7d2820 Fix T62736: Inconsistent behavior bpy.utils.user_resource()
If a subfolder was specified which didn't exist, logic would fallback
to get_path_user (instead of get_path_environment).

Now always use the from the environment variable if it's set and exists.
2019-03-20 15:38:23 +11:00
4e2aea5efe DRW: minor optimization for edit-mesh conversion
Finding visible connected elements is often a direct lookup
when they're not connected to hidden geometry.

Add inline wrappers that avoid a function call,
gives minor speedup creating GPU edit-mesh data.
2019-03-20 15:05:25 +11:00
47ba487e05 UI: center floating popovers
Tweak placement so useful items are more likely to be nearby,
centering horizontally and align vertically to the first button.
2019-03-20 12:34:22 +11:00
53f4fc7da9 Cleanup: style 2019-03-20 10:44:13 +11:00
310a1f728c Cleanup: unused vars 2019-03-20 10:44:01 +11:00
603a37fa89 Fix T59719 Bake Indirect Lighting doesn't update env map reflection 2019-03-19 23:55:26 +01:00
2eead48688 UI: Remove UI name overrides for Reveal Hidden.
Makes the consistent operator names shine through into the UI.
2019-03-19 22:25:25 +01:00
953c8b0548 UI: Use 'Render Image' for image rendering in the viewport
This is more consistent with the main Render menu, and more descriptive
2019-03-19 21:41:12 +01:00
edf029d4b9 Fix: Inconsistent spacing in Python file after recent changes 2019-03-19 21:34:20 +01:00
Dalai Felinto
540f50a4da Unify "Hide Selected / Reveal Hidden" operator names
All edit mode related operators are now "Hide Selected / Reveal Hidden".
Before we had different variatons of them:

Hide Selection:
* MESH_OT_hide
* GPENCIL_OT_selection_opacity_toggle

Hide Selected Bones:
* ARMATURE_OT_hide

Hide:
* MBALL_OT_hide_metaelems

Hide Selected:
* CURVE_OT_hide
* PARTICLE_OT_hide
* POSE_OT_hide
* UV_OT_hide

Reveal Bones:
* ARMATURE_OT_reveal

Reveal:
* MBALL_OT_reveal_metaelems

Operators not renamed:
* Hide Curves (GRAPH_OT_hide)
* Hide (OUTLINER_OT_hide)

Note we can do a step further and mass rename them to match their UI
names. Where Reveal Hidden is Show Hidden. But for now at least they are
all unified.
2019-03-19 17:26:09 -03:00
Dalai Felinto
7cf1b81b3c Fix T62735: hiding curves doesnt hide in viewport
Copying what we do for mesh objects.
2019-03-19 17:26:09 -03:00
21f3c95f22 Fix T62749: random mesh selection crashes.
This was an off-by-one error in the initialization of tbuf, but refactored the
code a bit more to be less obscure.
2019-03-19 20:04:46 +01:00
f0770b8578 Fix: Make sure color panels only appear in modes where they are supported 2019-03-19 19:42:17 +01:00
b525ecfcfb UI: Rename GPencil Brush 'Appearance' panel to 'Display'
Makes it consistent with other paint modes
2019-03-19 19:32:57 +01:00
770b1188e9 Fix: Color Picker and Color Palette panels were appearing for non-color tools in Vertex Paint mode
Use correct poll method for both modes
2019-03-19 19:31:36 +01:00
d555c92e3c Cleanup: fix debug warnign due to tooltip ending in dot. 2019-03-19 19:16:39 +01:00
bdf7843571 UI: Make Brush Display panel consistent between Image Editor and 3D View texture painting
-Slightly simplify in both places too
2019-03-19 19:03:51 +01:00
fa59c6a3e7 Merge branch 'blender2.7' 2019-03-19 18:54:17 +01:00
e7f535cd4c UI: Remove redundant separator 2019-03-19 18:41:33 +01:00
bd017dae28 UI: Make Stroke panel consistent between Image Editor and 3D View texture painting
This should probably become de-duplicated, but at least they look consistent now
2019-03-19 18:39:08 +01:00
b4a0dd1296 Fix: own wrong path to image paint tool settings in recent commit 2019-03-19 18:37:51 +01:00
83de13f75a Cycles: add cycles.merge_images operator for combing EXR renders.
This is only available through the API, mainly intended for render farms to
combine rendered multilayer EXR Files with different samples. The images are
currently expected to have the exact same render layers and passes, just with
different samples.

Variance passes are still simply a weighted average, ideally these should be
merged more intelligently.

Differential Revision: https://developer.blender.org/D4554
2019-03-19 18:23:19 +01:00
83fc8342d8 UI: Re-organize Brush Properties
- Consolidate each brush section (Color, Palette, Gradient) and make them distinct
 - Remove the lock icons and move these items into an Options sub-panel, together with other toggles
  - They now have more descriptive names
  - Use an enum for view vs scene brush unit
 - Use Property Split layout and sub-panels in line with the rest of 2.8
 - Rename Curve panel to Falloff

Reviewed by: campbellbarton, pablovazquez

Maniphest Tasks: D4529

Differential Revision: https://developer.blender.org/D4529
2019-03-19 18:17:50 +01:00
c590e80466 Units: Use PROP_PIXEL for grad_spacing 2019-03-19 18:10:00 +01:00
5b7b7101c8 Cycles: Implement function to format and parse human readable time
Gives value in seconds for a string which is encoded in format HH:MM:SS.hh.
2019-03-19 17:38:43 +01:00
matc
2cc303700b Fix: Add poll methods for quick effects operators
Differential Revision: https://developer.blender.org/D4259
2019-03-19 17:21:30 +01:00
3b04a867b9 Cleanup: correct comment 2019-03-20 03:14:50 +11:00
5739506104 UI: scale cursor motion threshold by DPI
This was using hard coded values of 2-3px.

Move both drag and motion thresholds to defines.
2019-03-20 02:52:55 +11:00
bd80393995 Fix T60684 Fourth and subsequent vertex color / UV layers displayed black 2019-03-19 16:25:59 +01:00
899fc0331c BLI_kdtree: use 1d tree for select similar 2019-03-20 02:06:07 +11:00
7a937436ab BLI_kdtree: add 1d kdtree support
Some users only use the tree to store a single value.
2019-03-20 02:06:07 +11:00
08fe29e52f Fix T62715: Grease Pencil Apply Armature Modifier Issue
@sergey wrote: "The reason it was failing is because md points to an original armature, which doesn't have runtime data needed for deformation. That data is to come from evaluated armature."

Thanks to @sergey for his help.
2019-03-19 16:04:03 +01:00
85685c7bdc Fix T62622: Animating vertex does not update viewport
Missing dependency graph update due to wrong relation.
2019-03-19 16:00:58 +01:00
e226460dd3 Workbench: World Clipping For Specular Transparent
When Specular Transparent materials are used the world clipping
did not work on the transparent materials. The reason was that the
accum shaders did not vary on the existance of the clipping planes

This patch will variate the accum shaders when clipping planes are
active.

Reviewed By: fclem

Maniphest Tasks: T61023
2019-03-19 15:43:49 +01:00
9b8eef9d9c Fix T62558: Certain IES file causes crash
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4551
2019-03-19 15:33:28 +01:00
1cb325fc22 Cleanup: name 3D/4D trees in similar selection code
Do this so trees have matching & logical names.
2019-03-20 01:16:04 +11:00
e7b4bbd294 UV: Use BLI_kdtree_2d for 2D data 2019-03-20 01:07:28 +11:00
d1b9b838be BLI_kdtree: add 2D kdtree support
Some users of the 3D versions were storing 2D data in it.

Using a 3D tree for 2D data adds a spatially redundant branch
every 3rd level, as well as some extra memory use, best avoid this.
2019-03-20 01:07:07 +11:00
84fe4cdcb3 Workbench: Support Odd Number Of AA Samples
Workbench render engine did not work when an odd number of AA samples
were used. A user could enter these values by disabling AA or set the
number of AA samples in the Render/Film panel to an odd number.

This commit will not perform TAA passes when AA is disabled.
For supporting the setting of 5 or 11 samples the bitmask was replaced
by an if statement as this was making the odd number not render
correctly.

As extra introduce the jitter samples of 5 and 11 so the images will
be more clean. a jitter sample of 11 used to read outside the allocated
space of the jitter samples.

Fix T60820

Reviewed By: fclem

Maniphest Tasks: T60820

Differential Revision: https://developer.blender.org/D4546
2019-03-19 14:57:55 +01:00
109cbdf2e1 Cleanup: use BLI_kdtree_3d prefix
Use prefix now there isn't only the 3d version.
2019-03-20 00:48:51 +11:00
e8777a7290 Fix T62732: Bpy/Python is letting create inputs at the node level for node groups that make blend file unsaveable.
Group nodes should not allow to add IO sockets to themselves directly,
in that case we actually want to add IO sockets to their underlying
node tree. Fairly straioght forward to support actually.
2019-03-19 14:45:05 +01:00
3b9b324bf6 Fix T62595: Select co-planar faces fails 2019-03-20 00:34:40 +11:00
0719d5fa0c BLI_kdtree: refactor to support different numbers of dimensions
This moves logic into kdtree_impl.h which is included in a source
file that defines the number of dimensions - so we can easily support
different numbers of dimensions as needed
(currently 3D and 4D are supported).

Macro use isn't so nice but avoids a lot of duplicate code.
2019-03-20 00:30:45 +11:00
e72dc667c4 Fix T61475 Particle edit does not render children if path step > 7
Gives 2 more bits to the segment count. Also subtract 1 because segment
count cannot be negative.
2019-03-19 14:26:30 +01:00
58e27cca97 GPencil: Include gpencil objects in BKE_object_minmax
Also remove redundant check for meshes.
2019-03-20 00:12:16 +11:00
8a125e3b55 Cleanup: remove unused for gpencil bounds calculation 2019-03-19 23:55:04 +11:00
c001a9c3b6 Fix T62743: GPencil dimensions are large when no geometry exists
Use fallback when no data exists
matching bound-box for other kinds of geometry.
2019-03-19 23:52:35 +11:00
0aca8b0174 EEVEE/LookDev: Fix Cache In Quad View
When using LookDev in Quad view the cache was only updated for the first
Q-view. The evaluation data of the last cache was not stored with the
lightprobe textures. As the evaluation data was reused between the
Q-views only the lightprobe textures of the first view was updated.

With this patch the evaluated data is stored amongside the actual
lightprobe textures.

Fix T59046

Reviewed By: fclem

Maniphest Tasks: T59046
2019-03-19 13:29:51 +01:00
b0c6c9f11d Fix view selected ignoring all non-grease pencil objects
When the grease pencil was active no other objects were taken into
account. There is no need for a special case here since objects
bounding boxes are used.
2019-03-19 23:15:44 +11:00
12716e6b9f UI: Make UV Editor contextual menu more consistent with 3D View
-Use same ordering of Add, Modify, Remove
-Add back Remove Doubles here
2019-03-19 13:14:35 +01:00
142096a2ed UI: Make EV Editor UV menu more consistent with 3D VIew
-Transform, Mirror, Snap at the top
-Remove redundant Proportional Editing entry from this menu - we already have it in the header
2019-03-19 13:13:32 +01:00
f4b57b0190 Fix T62713: Paste Normal Vectors - needed better selection handling.
Existing code was not really handling well cases were only edges or
faces were selected (with match select modes).

In those cases, we can assume user want to only affect loop normals of
selected faces/edges, not all lnors of all (indirectly) selected verts.

Also refactored the code a bit to move whole 'loop to edit' selection
process into its own single function.
2019-03-19 12:31:50 +01:00
d29dd5916f Minor cleanup/refactor of EditMesh custom normals copy code.
Do not compute temp helper data when we do not need it (even though in
that case it was totally cheap to compute).
2019-03-19 12:31:50 +01:00
a73afc7eeb readfile: add off64_t typedef for __APPLE__ 2019-03-19 21:59:26 +11:00
8f790720b0 GPencil: Rename annotation functions
The annotation drawing functions were using gpencil prefix and it's better to keep all annotation code separated to avoid confusion.
2019-03-19 11:03:55 +01:00
8aeb1dbb27 GPencil: Cleanup unused code 2019-03-19 11:03:55 +01:00
da373c1f0d GPencil: Rename functions to annotation prefix
This code was used only in annotations.
2019-03-19 11:03:55 +01:00
34d6c04003 Fix T62734: Crash when annotations are rendered from the VSE .view menu.
The render was using the old grease pencil code and not the new annotation code for render.
2019-03-19 11:03:55 +01:00
40ecb2ded8 Windows: use int64_t instead of off_t
Avoids 2gb file size limit.
2019-03-19 20:29:45 +11:00
7ba82f3f0a Fix T62707: opening blend files over 2gb on win32 fails
Regression in 358e07f447 for ms-windows since off_t is an int32_t
even on 64bit systems causing files over 2gb not to load.

Poison off_t so this doesn't happen again.
2019-03-19 20:18:03 +11:00
4db7842a72 BLI_math: use fallback for compatible quaternion calculation
Copy the new value when the compatible quaternion isn't usable.
2019-03-19 17:43:35 +11:00
40e85a603c Fix pose slide interpolation
- Quaternions weren't normalized before interpolating
  causing incorrect results & assert.

- Make the newly calculated quaternion compatible with the previous
  to avoid axis-flipping & setting values with large changes compared
  to existing key-frames.
2019-03-19 17:23:10 +11:00
e2ec045cc9 BLI_math: add utility to calculate compatible quaternions 2019-03-19 16:54:37 +11:00
e7fd6c8f30 Cleanup: comment blocks 2019-03-19 15:17:46 +11:00
5ef4b0438c Cleanup: trailing space 2019-03-19 15:08:16 +11:00
7e6263095d Docs: group debug/disable args in --help output 2019-03-19 14:32:15 +11:00
e2abb1bf5c Fix T61872: Sculpt key shortcut assignment fails 2019-03-19 13:50:32 +11:00
ce066f9da7 Fix assigning keys to paint operators
Comparing context mode with object flag (decade old bug from 2.5x).
2019-03-19 13:48:33 +11:00
48ad55a03d Cleanup: use enum for CTX_data_mode_enum
Exposes errors in some cases when compared against incompatible values.
2019-03-19 13:46:32 +11:00
d731ee4960 Fix T61368: Brush texture preview ignores rotation 2019-03-19 13:07:48 +11:00
d47f827019 Cleanup: unused warning 2019-03-19 08:39:48 +11:00
ce09b93955 Fix T61104 Compositing two scenes with different output scales crashes
Was due to incorrect output size. Use engine->resolution_x/y instead of
computing the size on the fly from the scene specific settings (which are
not overwritten by the rendering scene).
2019-03-18 21:40:04 +01:00
fd63be0610 UI: Use 'Display' instead of 'Draw' for show_particles 2019-03-18 21:33:01 +01:00
a764a3cd1c Units: Use PROP_DISTANCE for emitter_distance 2019-03-18 21:32:02 +01:00
52e38fae42 UI: Particle Edit Mode Tool Properties
-Use property split
-Use sub-panels for Options panel
-Slightly re-organize Options panel
-Remove redundant Deflect Emitter from Options panel (it was already in the tool settings for the Comb tool)
2019-03-18 21:30:56 +01:00
9249e53f92 Scale waveforms & show clipping
Scale waveforms in sound strips by volume.
If any drawn line exceeds value 1 or -1 it is drawn by red color so user can see point, where clipping occurs.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4515
2019-03-18 13:11:33 -07:00
3d1138840c Fix strip text hiding behind scrollers
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4506
2019-03-18 13:11:33 -07:00
a761a93d41 Fix VSE color picker
Fix VSE color picker mouse coords calculation

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4396
2019-03-18 13:11:33 -07:00
9c99292a16 Fix T54117 Movie clip undistorted - proxy not working
Add movieclip fallback render option, for case, when proxies are not enabled or built

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4219
2019-03-18 13:11:32 -07:00
b0752cd7a0 Fix T57590: assert with zero length array buttons. 2019-03-18 19:56:14 +01:00
10d1edbffb Fix T56183: flip matcap not working for workbench as render engine. 2019-03-18 19:26:01 +01:00
a29186efb4 Merge branch 'blender2.7' 2019-03-18 19:06:21 +01:00
01df4818a6 Fix Cycles curve UVs wrong after recent changes. 2019-03-18 19:02:59 +01:00
d76fb8ec67 Fix T62712: Cycles world light path node not working. 2019-03-18 18:46:14 +01:00
b29790a953 Fix T62587: Particle instances Use Count not saved correctly
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4544
2019-03-18 17:53:14 +01:00
8e54ef69c6 Fix T62700: Disconnect hair bug
Need to use evaluated mesh from evaluated modifier data.
2019-03-18 17:50:29 +01:00
ad3d925682 Fix T62636: Overlapping scrollbar in driver editor
Instead of only `ymin` and `ymax`, `ANIM_channel_draw_widgets`
has a rectangle as input now.
This allows the caller to set a custom width for the channel.

Some space types need the extra space for the scrollbar
(drivers, graph), but the other don't have a scrollbar.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4543
2019-03-18 17:28:52 +01:00
8fb0b9aebb Subdiv: Enable topology cache in edit mode
The general idea of this change is to have a runtime data pointer
in the ModifierData, so it can be preserved through copy-on-write
updates by the dependency graph.

This is where subdivision surface modifier can store its topology
cache, so it is not getting trashed on every copy-on-write which
is happening when moving a vertex.

Similar mechanism should be used by multiresolution, dynamic paint
and some other modifiers which cache evaluated data.

This fixes T61746.

Thing to keep in mind, that there are more reports about slow
subdivision surface in the tracker, but that boils down to the
fact that those have a lot of extraordinary vertices, and hence
a lot slower to evaluated topology.
Other thing is, this speeds up oeprations which doesn't change
topology (i.e. moving vertices).

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T61746

Differential Revision: https://developer.blender.org/D4541
2019-03-18 17:11:43 +01:00
91ffd39e77 Fix T62706: Orphan Data : I have now to save a file, close and reopen it, only then I can purge previous deleted meshes.
libquery code has some specific handling for IDs tagged as 'no_main',
among which to never consider them as refcounted/refcounting other IDs.

This is fine, but it also means we have to be careful when moving an ID
from main to out-of-main status, to do all id remapping we need
//before// we tag it as no_main.

That was a bit tedious to track down, we'll have to be careful that all
the corner cases we have to take care of, do not end up in a giant soup
of expections to exceptions, where nobody can find its way anymore...
2019-03-18 16:51:48 +01:00
dff88a92a4 Fix AMD OpenCL build error after recent changes.
Always use native function since this was already the case due to
__CL_USE_NATIVE__ not being defined in time, and seems to have caused no
known issues.
2019-03-18 16:39:57 +01:00
d1f04658d8 Fix: Cycles Subdivisions panel was showing, even when using Eevee 2019-03-18 15:56:54 +01:00
6490626077 Depsgraph: Store original modifier pointer
Currently not needed that much, but will ease some further
development which is related on preserving runtime modifier
data.
2019-03-18 15:53:18 +01:00
01c5335422 Cleanup: Comments 2019-03-18 15:53:18 +01:00
c5fe6ed96b Fix T62633: Model normals not updating in a modifier stack after a deform modifier.
A deform-only modifier that needs access to normals need a copy of
evaluated mesh with those normals updated, when it is not the first one
in the stack.

That issue had been partially fixed in Object mode a long time ago
(see T23673), but it was still broken for deform-only stacks cases.

And it was also completely missing from the Edit mode code
(`editbmesh_calc_modifiers()` function).
2019-03-18 15:50:12 +01:00
Dalai Felinto
b7255d33da Silence sorted function declaration/const warnings 2019-03-18 14:40:29 +00:00
8162a6c51d Cleanup: fix compiler warnings. 2019-03-18 14:56:08 +01:00
94f55d14c3 Fix (unreported) broken Py API doc after adding gpencil to buttons_context... 2019-03-18 14:42:44 +01:00
29039e5c74 Cleanup: remove compare_len_squared utility
There isn't any advantage to this over comparing the squared length.
2019-03-19 00:37:58 +11:00
606f3c74d3 Fix T62643: ID user decrement error, likely related to custom material PointerProperty.
We are in a totally out-of-main context here, so no refcounting of any ID...

Note that this whole 'render preview' area could use some refactor with
modern ID management API, but that would go way beyond a mere bugfix,
and it is not the time to do such things.
2019-03-18 13:57:07 +01:00
2b79f274e3 Fix T61226: Make hair editing (more?) thread safe
This replaces the global `PEData->dist` with a thread local variable
that is passed into the callback functions separately.

There are two new function types which have `Hit` in the name.
Those take the distance to the mouse as an additional parameter.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4538
2019-03-18 13:31:54 +01:00
4d2672ca7f Cleanup: C++ style of structure definition 2019-03-18 12:47:18 +01:00
4070bb242d Merge branch 'blender2.7' 2019-03-18 12:03:22 +01:00
7c5be750a3 Cycles: Cleanup strict compiler warnings 2019-03-18 12:02:41 +01:00
6d99b2c021 Cleanup: we now have a way to tag 'from' ID pointers in libquery code.
So no need to have custom verbose own detection cases for those guys...
2019-03-18 11:47:54 +01:00
07355ff74b Fix mistake in previous commit. 2019-03-18 11:42:35 +01:00
Miguel Porces
1b06e3378a Fix T62670: insert_link() method not working for ShaderNodeCustomGroup.
Allow Python to override this method.

Differential Revision: https://developer.blender.org/D4537
2019-03-18 11:37:31 +01:00
d0e28721b0 Cleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.
We don't want to use flow control like `break` statement into the basic
`FOREACH_MAIN_ID` macro, as this is a nested loop.

When refined behavior is needed (like breaking whole iteration, or just
skipping to next ID type), FOREACH_MAIN_LISTBASE and
FOREACH_MAIN_LISTBASE_ID macros should be used instead.

Based on D4382 by @campbellbarton
(Other potential solution, using flow control macros: D4384).
2019-03-18 11:36:50 +01:00
66932a2c81 Add-ons: disable 3ds add-on in all existing preferences.
Silences warning when running with --debug. If/when this add-on is ported,
users that need it can enable it again.
2019-03-18 11:10:28 +01:00
76277e7402 Cleanup: fix compiler warning. 2019-03-18 10:42:56 +01:00
8ecc4d4f16 Fix noisy console messages about unported add-ons by default.
* Make those single-line warning, there is really no reason to raise
exception (i.e. error) for that.
* Only show them when `--debug` option is set.
2019-03-18 10:38:12 +01:00
3a8099c45c Cleanup: unused vars in last commit 2019-03-18 20:30:05 +11:00
794aef3f25 Fix T58763: Sample color fails with mirror modifier 2019-03-18 20:16:21 +11:00
1d1e06b376 Cleanup: rename color band to color ramp 2019-03-18 18:26:14 +11:00
b749e43cd3 Fix color ramp eyedropper menu item
This couldn't be accessed because the poll function was checking the
active button.

Add a "color_ramp" context pointer which is set by the menu.

Alternative fix to D3984
2019-03-18 17:50:18 +11:00
8f5ba8e1a1 Cleanup: spaces around operators in DNA headers 2019-03-18 14:23:34 +11:00
317cb1dd65 Cleanup: style, duplicate include 2019-03-18 14:13:06 +11:00
6c0240e84a UI: clarify "Remap Relative" tooltip
Resolves T62612
2019-03-18 13:58:01 +11:00
c7a50d84b6 Fix T62684: Crash transforming w/ snap enabled 2019-03-18 13:42:53 +11:00
e1364b21fa Fix T62685: Rename 'Align' to 'Only Origins'
The RNA name didn't match the name used in the UI,
making the quick favourites menu show this as 'Align'.
2019-03-18 13:30:16 +11:00
9099305771 Cleanup: rename BLI_kdtree vars & args for clarity 2019-03-18 10:25:15 +11:00
4b3aafd44f BLI_kdtree: refactor boids specific logic into callback
Logic to for boids to avoid head-on collisions was in BLI_kdtree.

Move this into a callback which is now defined in boids.c
so the kdtree code can be kept generic.
2019-03-18 09:40:38 +11:00
df96455c55 UI: add light/world settings in shader node editor.
Material was already there. Implementation was changed so it's just a
single line of code to adapt a panel to the node editor.
2019-03-17 21:53:13 +01:00
f79ad42808 GPencil: Cleanup extra lines 2019-03-17 20:04:09 +01:00
6577618d5b GPencil: Changes in Fill and new 3D Cursor View Plane
This commit groups several options that were tested in grease pencil branch:

- Changes to fill algorithms and improves, specially in small areas and stroke corners.
  New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.

  Kudos to @charlie for coding this fill improvements.

- New 3D cursor view plane option.

  Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.

- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.

Changes reviewed by @pepeland and @mendio
2019-03-17 19:47:56 +01:00
887d052e56 Fix T62570: Append Particles System not working properly.
T62570 and T61796 show that we need two slightly different behaviors in
post-linking collection process:
* For linking, we never want to instantiate indirectly-linked
collections or objects.
* For appending however, since all collections and objects will become
local and hence need instantiation, we want to 'link to scene' all
collections first, better than instantiating the objects in the master
collection opf current scene.
2019-03-17 18:07:13 +01:00
94507a7fa7 Fix T62589: Particle system Instance Collection option fails to set a user for a linked collection.
Forgot to tag properly RNA property in rB439437fa3a44.
2019-03-17 16:02:00 +01:00
0a25cea2cf Fix T62240: Bleed artifacts with degenerate triangles
This makes degenerate triangles be ignored, as they cause artifacts and
don't contribute to the result anyway. There is an extra cost for
all triangles, to check if they are degenerate. Though not ideal, this
seems to be the safest solution at the moment (see code comments).

This commit also changes the clamp value for the bleed len_fact from 5
to 10, to give good corner results with some sharper angles, considering
they will be rounded later.

A lot of the texture paint initialization code could be optimized
by caching the results throughout the session, instead of rerunning it
for each stroke. Stroke initialization is way too expensive at the
moment, and does many redundant computations.
2019-03-17 15:44:41 +01:00
cfd909f184 Fix T62678: Wrong text clipping
There are two issues at play here.
First, BLF_width computed a width that was not wide
enough to actually hold the text.
Second, blf_glyph_calc_rect_test computed an incorrect
rect->xmax when the glyph was moved to the left a bit.
We ignore the overlap on the left, but the right side
should still be adjusted accordingly.
2019-03-17 14:15:26 +01:00
b28bd7c5a4 Cocoa: Fix missing key window after closing "About"
The cause of this issue goes deeper inside of the custom nature of
the event loop. In short, when not using [NSApp run] closing "About"
window does not make previous key window a key again.

The solution is quite similar to other projects, but we only force
key window from handler when closing one appears to be "About" window.
In all other cases we leave it up to Blender's window manager to make
decision and do not interfere with it.

Test plan:
- Open Blender application
- Go to Blender -> About Blender menu item
- Close About window
- Note that Blender's window does not become active again.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4534
2019-03-17 13:24:38 +01:00
e691929686 Merge branch 'blender2.7' 2019-03-17 12:54:19 +01:00
0af22625c9 Fix bl_pyapi_idprop unit test.
Scenes can now have a 'cycles' key when starting, so account for that.
2019-03-17 07:36:26 -04:00
ef66aa2005 GPencil: Cancel all transformations in Draw mode
Actually, when you press G/R/S in Draw mode, the transformations can be done, but this is annoying in draw mode and must be captured an cancel.

This patch capture the transformation and cancel it.

Reviewed by @brecht
2019-03-17 12:20:34 +01:00
9d2397c710 Cleanup: remove unused buildbot code. 2019-03-17 12:01:19 +01:00
0676badb80 Fix Windows 32bit buildbot trying to use CUDA, should be disabled. 2019-03-17 12:01:19 +01:00
7778a1a0a1 Cycles: optimization for constant background colors.
Skip shader evaluation then, as we already do for lights. Less than
1% faster in my tests, but might as well be consistent for both.
2019-03-17 12:01:19 +01:00
9c7517fb63 Fix Cycles OpenCL compile waiting unnecessarily for background shader.
Makes preview kernel appear quicker when background color is fixed.
2019-03-17 12:01:19 +01:00
9873005ecd Cleanup: simplify kernel features definition.
No functional changes, logic here got too complex after many changes over
the years.
2019-03-17 12:01:19 +01:00
2d8aa2e6ad Cleanup: remove unused code. 2019-03-17 11:39:17 +01:00
5ad2302413 Fix Cycles not doing versioning for some files saved in 2.80. 2019-03-17 11:39:17 +01:00
e04d5a8106 Fix string size passed into name prefix function 2019-03-17 21:14:43 +11:00
69bf4e5e36 Cleanup: unused variables 2019-03-17 21:14:43 +11:00
ad9addbf46 Cleanup: unused imports 2019-03-17 21:00:56 +11:00
a19e78aa2d Cleanup: redundant layer access 2019-03-17 21:00:56 +11:00
8214712b19 Cleanup: use braces for BLI_kdtree 2019-03-17 21:00:56 +11:00
6cbd2e5c4d Cleanup: remove redundant check 2019-03-17 21:00:56 +11:00
d23452897b Remove 3DS add-on from factory startup. 2019-03-17 09:43:32 +01:00
37358114e2 GPencil: Fix missing guide topbar menu
This bug was introduced in previous commit
2019-03-17 09:33:23 +01:00
e17f7af0ce Cleanup: remove Cycles advanced shading features toggle.
It's effectively always enabled, only not on some unsupported OpenCL devices.
For testing those it's not useful to disable these features. This is replaced
by the more fine grained feature toggles that we have now.
2019-03-17 01:58:39 +01:00
cc5bdf0293 Cleanup: rename DEPRECATED to UNUSED
While the flags have been deprecated they're currently unused.
Rename for clarity.
2019-03-17 10:34:59 +11:00
cf5097d71f Cleanup: improve comments. 2019-03-16 18:20:57 -03:00
8b62f203d9 ED View3d: Fix possible bug when subtracting unsigned ints.
Related to rB681661dbed12.
2019-03-16 18:10:44 -03:00
Miguel Porces
9e152f919f Python API: add Python-defined node groups for shaders and compositing.
This was already supported for Cycles shader nodes, but now also works for
Eevee and compositing nodes. Instead of a generic NodeCustomGroup, now
there is ShaderNodeCustomGroup and CompositorNodeCustomGroup that can be
subclassed and registered.

Differential Revision: https://developer.blender.org/D4370
2019-03-16 20:36:35 +01:00
Miguel Porces
5797a5fc65 Fix ID user counting issues with NodeCustomGroup.
User counting now happens before init() and after free() methods, so that
the ID users are in a valid state when Python might modify them. ID user
counting was moved into node.c and simplified.

Patch by Miguel with further refactoring by Brecht. Ref D4370.
2019-03-16 20:21:16 +01:00
b9af4efe41 Cleanup: fix compiler warnings. 2019-03-16 20:21:16 +01:00
ad390f514b GPencil: Fix compiler warning
The fill flag was wrong and it was checking the color, not a flag.
2019-03-16 20:05:15 +01:00
2d3fbadfe3 GPencil: Fix layers topbar panel
After a previous commit to fix the pin panels, this line was not working as expected. As this variable is not used, the line can be removed.
2019-03-16 19:21:19 +01:00
9a4192277b GPencil: Disable Pressure for Block brush 2019-03-16 18:56:07 +01:00
e5e6c3b52c Fix T62576: The remaining two unported official add-ons: X3D and 3DS.
X3D has been (basically) ported in rBAe8da70ab73d2dd5ff46, and 3DS has
been downgraded to 'community' support, so we can get rid of that ugly
'slience warning' hack.
2019-03-16 13:02:34 +01:00
03ee447dd2 UI: Remove redundant 'settings' from GPencil Tool Properties panel titles 2019-03-16 12:54:08 +01:00
cabb53effa Correct error in 6aebb5a4d5 2019-03-16 21:49:33 +11:00
37af7ce779 DRW: support clipping for armature bone axes
Also minor changes to make empty axis match armature axis.
2019-03-16 18:43:36 +11:00
c55fb58e8a DRW: support clipping for envelope armature draw type 2019-03-16 18:26:16 +11:00
6aebb5a4d5 DRW: support clipping for relationship lines 2019-03-16 17:37:08 +11:00
dbfbd6b904 Fix T62555 Viewport borders flicker when splitting said viewport 2019-03-16 03:58:00 +01:00
0c10374faf CMake: disable jemalloc when building as a Python module 2019-03-16 13:06:47 +11:00
d438120fe3 Fix T61526 hair doesn't render in workbench but does with openGL 2019-03-16 02:48:19 +01:00
bd1d80d0cf Cleanup: use return args last 2019-03-16 11:45:22 +11:00
3600bb79d0 Fix T60803 Artifacts with SSR + Reflection Plane + 0 roughness
Tweaked the tracing parameters again to avoid rays terminated before first
iteration.
2019-03-16 00:51:38 +01:00
44301175bb Fix __func__ being passed as an output string, also warnings 2019-03-16 10:12:47 +11:00
795bddf2bd Fix T55620 Artifacts with SSR and planar reflection
Was caused by 0 pixel extent rays which did not trace at all. Bumping the
threshold for degenerate rays fixes it.
2019-03-15 23:31:41 +01:00
86646dab7c Fix T62621 object scale changes tangent node output in Eevee
Normal Matrices were not normalized, leading to non-normalized vector
rotations results.
2019-03-15 22:33:03 +01:00
1d6009d7aa Eevee: Fix tangent being renormalized after interpolation 2019-03-15 22:33:02 +01:00
66225e84cf Eevee: DOF: Optimization: Move some operations out of the shader 2019-03-15 22:33:02 +01:00
fe40e184a6 Fix T61857 Eevee DOF not working if the camera is in orthographic mode
It was just a bad mapping of the ogl depth to scene linear depth.
2019-03-15 22:33:02 +01:00
efdde88dfc Particle: Remove Billboard Particle code
The billboard particles were only used by Blender Internal. So until it is
supported by Cycles of Eevee there is no reason to keep it in the code and
UI.

Fix T61695 Billboard particles not displaying in Eevee viewport, render
2019-03-15 22:33:02 +01:00
Dalai Felinto
aaa35d1092 Silence warning from recent GPU simplify commit
Said commit introduced warnings and build problens. Let's be more
careful in the future. Warnings are not to be treated lightly either.
2019-03-15 18:15:31 -03:00
ddd28bad90 Fix compiling after last commit 2019-03-15 22:07:09 +01:00
681661dbed GPU: Simplify select shaders.
The shaders are: `GPU_SHADER_3D_FLAT_SELECT_ID` and `GPU_SHADER_3D_UNIFORM_SELECT_ID`.
This commit allows the drawing of the mesh select ids to be done on a 32UI format texture.
This simplifies the shader that previously acted on the backbuffer and had to do an uint to rgba conversion.

Differential Revision: https://developer.blender.org/D4350
2019-03-15 17:02:48 -03:00
Dalai Felinto
4510f88d00 Remove object hide_* operators from outliner keymap
We already have dedicated outliner visibility operators that not only
take precedent over those ones, but also unhide collections as well.

No change for the end user. That said, since I added the outliner
hide/unhide operators I assumed that newly visible objects are to be
selected. That can change in a separate commit, but it should be done
by changing OUTLINER_OT_unhide_all.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4527
2019-03-15 16:19:37 -03:00
Dalai Felinto
b7d942446f Fix T62438: Unhide all doesn't set newly visible objects to selected
The select option in the operator was never working because we were
trying to select an object considered unselectable (since it was hidden).

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4527
2019-03-15 16:14:21 -03:00
Dalai Felinto
713010bd77 Fix T62313 - No way to remove object from master collection in 3d view
This introduces a new iterator, FOREACH_COLLECTION, that unlike the
FOREACH_SCENE_COLLECTION it iterates over all the Blender file
collections, including the scene master collection, as well the database
ones (bmain).

Reviewers: brecht
2019-03-15 16:09:32 -03:00
Dalai Felinto
fcffbe1d1b Fix T62320: Outliner collection disable not propagating to other view layers
The moment you switched to another view layer the visibility was still
outdated.
2019-03-15 15:36:42 -03:00
fb4bb61155 Fix T62608: many tools in the toolbar not working.
The keymap names still use the label, so use that again for looking up the
keymap so things work again after recent changes.
2019-03-15 19:31:43 +01:00
99fe774298 Fix T59943 Color banding present in Workbench render but not in viewport
I don't really like forcing RGBA16F for Albedo render but that's ok since
the texture is shared with the effect_fb.
2019-03-15 19:28:10 +01:00
52a7636c29 Tests: remove unnecessary _test postfix on test names. 2019-03-15 19:11:33 +01:00
9ad9d38786 Fix T62601: parenting to curve (follow path) causes offset
Similar to T60623 / rB2894e75121d7.
Issue (when parenting with 'Follow Curve') is that the curves
CU_FOLLOW flag is set on the original, but not the
evaluated curve (yet), leading to misbehaviour in 'ob_parcurve()'.
Setting this on both now.

Reviewers: sergey

Maniphest Tasks: T62601

Differential Revision: https://developer.blender.org/D4524
2019-03-15 18:49:13 +01:00
bc8bd87dff Merge branch 'blender2.7' 2019-03-15 18:31:48 +01:00
65d95879f7 Cycles: upgrade to CUDA 10.1 as the one officially supported version.
This version fixes various bugs, and there is no need anymore to use both
9.1 and 10.0 for different cards.

There is a bug related to WITH_CYCLES_CUBIN_COMPILER and bump mapping in the
regression tests, so that remains disabled same as it was for CUDA 10.0.

Fix T59286: CUDA bake failing on some cards.
Fix T56858: CUDA 9.2 and 10 issues.
2019-03-15 16:52:28 +01:00
56a8c2a320 Fix cycles preferences.get_devices() not returning all devices as before.
It only returned those for the active device type. For backwards compatibility
return them all again, but still avoid enumerating them from our own code on
startup or opening preferences.
2019-03-15 16:52:28 +01:00
5051e580e4 Merge branch 'blender2.7' 2019-03-15 16:28:33 +01:00
2f6257fd7f Cycles/OpenCL: Compile Kernels During Scene Update
The main goals of this change is faster starting when using foreground
rendering.

This patch will build kernels in parallel to the update process of
the scene. When these optimized kernels are not available (yet) an AO
kernel will be used.

These AO kernels are fast to compile (3-7 seconds) and can be
reused by all scenes. When the final kernels become available we
will switch to these kernels.

In background mode the AO kernels will not be used.
Some kernels are being used during Scene update (displace, background
light). When these kernels are being used the process can halt until
these become available.

Reviewed By: brecht, #cycles

Maniphest Tasks: T61752

Differential Revision: https://developer.blender.org/D4428
2019-03-15 16:18:21 +01:00
86ea76254d Fix T62614: Copy eevee settings when scene is copied
Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D4520
2019-03-15 16:06:30 +01:00
ac147872cc Fix T62594: Truncated text in UI
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4518
2019-03-15 15:12:42 +01:00
Dalai Felinto
2e043c266b Fix: "Jump To Target" showing up in workspace context menu
Issue introduced on d227c58e3e.

This was affecting WorkSpaces as well as background scene and probably
other places. We use the operator poll to decide whether to show it.

Reviewers: brecht, mont29

Differential Revision: https://developer.blender.org/D4488
2019-03-15 10:53:35 -03:00
d5d518b96c Fix T62592: GPencil layer activation from outliner needed two clicks
For some reason, the code was commented and we missed to enable it again.
2019-03-15 14:38:48 +01:00
e583e86a9a Fix T62284: apply a retroactive fix for T57366 to old files. 2019-03-15 14:58:16 +03:00
9a499636df UI: rename object Boundary back to Bounds, it's not the same thing. 2019-03-15 12:16:35 +01:00
e775ad6c1b Correct tool name (missed in recent update) 2019-03-15 20:35:30 +11:00
98af74b936 Fix T62297: Grease Pencil dots drawing crashes Blender
Fix again this bug. Maybe it was introduced when change how wireframe mode by object works.
2019-03-15 10:07:18 +01:00
41b289be30 Cleanup: unused imports 2019-03-15 19:45:21 +11:00
6237743111 Cycles/OpenCL: Added missing opencl programs
The functions that determine the program name + filename of kernels
were missing some base kernels like denoising and base. For completeness
I added those kernels so the function returns the correct results.
2019-03-15 08:11:28 +01:00
f29b80ff79 Tool System: add tool registration API
This mimics RNA style class registration,
keeping the same internal data types.

Currently there is a template which shows an example of adding a tool
group with a keymap.

Icon generation still needs to be exposed for general use.
2019-03-15 17:05:18 +11:00
d4156b46d7 Tool System: use categories for tool identifiers
Tools that come with Blender use 'builtin' or 'builtin_brush' prefix.
2019-03-15 16:48:01 +11:00
3400fe3ece Tool System: split UI label from tool identifiers
Prepare for exposing tool registration to the Python API.

- Generated tools can use their own prefix so naming collisions
  won't happen between hard coded & generated tools.
- Add-on authors can use the add-on name as a prefix.

Currently the names match, renaming will happen next.
2019-03-15 14:53:08 +11:00
388ff003e2 UI: rename brush "Overlay" to "Display"
Brush cursor display options are more closely related to other
data-block display options than per-3D viewport overlay.

Rename to avoid confusion.
2019-03-15 11:41:14 +11:00
ee3d8cafdd Fix T59155: Can't select light in-front of other objects
Enable depth picking by default.

This adds new 'gpu_flag' since it's not so relevant to add GPU drawing
options into uiflag & uiflag2.

This resets the recently added smooth edge flag.
2019-03-15 11:22:42 +11:00
18e0c5ea5b Cleanup: deprecated flags to named DNA flags 2019-03-15 10:42:39 +11:00
35b78d9807 Cleanup: indentation, wrapping
Mostly functions wrapping args, not confirming to our style guide.
2019-03-15 09:54:30 +11:00
395a0acdb8 Cleanup: style, use doxygen for comments 2019-03-15 09:50:02 +11:00
23272ee099 GPencil: Invert Texture for Line Strokes
Invert the texture of the stroke if the random UV is activated. Before, this parameter only affected to dot mode, but not to line strokes.

The texture is inverted vertically.
2019-03-14 19:54:07 +01:00
81a03e17f7 Merge branch 'blender2.7' 2019-03-14 19:00:10 +01:00
9d4fd25735 Fix T62460: undo doesn't work in files that have a paint curve. 2019-03-14 18:59:11 +01:00
f3a3d74bcf Fix T62425: topbar showing wrong buttons at some UI scales. 2019-03-14 18:59:11 +01:00
57b5852bc8 Fix T62120: number button editing outside of soft max range jumps. 2019-03-14 18:29:42 +01:00
55e79d8f36 Tests: BLI_heap_simple test fix build error with MSVC.
BLI_heap_simple.h uses types from BLI_sys_types.h causing a build error on windows.
2019-03-14 11:14:44 -06:00
7b38ad7286 Fix T57138: Cycles CMJ failing with viewport samples set to 0.
Can't use INT_MAX, CMJ runs into precision/overflow issues before that.
2019-03-14 17:39:00 +01:00
3ab879ed5a Fix T58793: Volumetric Clouds in Eevee not working | MacOs
Fix missing attribute in vertex shader. Theses are optimized out if using
volumetric shader but on MacOS they seems to be needed.
2019-03-14 17:18:32 +01:00
f7d415ab42 Fix T58610: EEVEE: camera motion blur renders only one viewport sample
This fix saves the camera matrices in order to not call
BKE_animsys_evaluate_animdata during each draw loop. This function tags
the view as dirty even if the camera does not move.
This effectivly, avoids the constant reset of TAA.
2019-03-14 16:53:05 +01:00
81531d452c Fix T58694 Eevee: Wrong result when using normal map and face is flipped 2019-03-14 16:53:05 +01:00
bf8a414237 Fix T62551: Limited Hair editing (no grab, scale, rotate)
This is actually re-introduced T59963 which got broken by 6752022310.
Use less obscure recalc flag now.
2019-03-14 15:55:41 +01:00
7bfdf35711 Fix T61300: First letter truncated
The main problem was that the character `J` has "negative kerning".
It was cut off because it started outside of the clipping rectangle.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4513
2019-03-14 15:45:21 +01:00
96db46d17c Fix T62321: Crash on motion tracking when dopesheet open and deleting track
Need to ensure all dopesheet are properly tagged for update.

The tricky part here is that due to the animation we need to keep
movie clips covered by copy-on-write, but the interface uses an
original clip to draw dopesheet.

Use same idea of an active dependency graph as is done in other
similar cases.
2019-03-14 15:18:43 +01:00
c65be83df0 GPencil: Change Brush defaults for Block and Marker
Still pending the change in default 2D template.

Changes reviewed by @pepeland and @mendio
2019-03-14 14:03:04 +01:00
5e0069e09a Fix some unreported issues with image sequence updates, clean code.
Lamp and world nodes were missing, nested node trees were updated twice,
remove some legacy code.
2019-03-14 12:40:15 +01:00
c6ca842e23 Fix T61937: image sequences not updating in workbench display mode.
Need to pass the image user along to get the frame number.
2019-03-14 12:37:51 +01:00
Stefan Werner
d8f1b18d9b Merge branch 'blender2.7' of git.blender.org:blender 2019-03-14 11:47:27 +01:00
Stefan Werner
47da8dcbca Cycles: Improved thread order for better CUDA performance.
This patch puts threads that render the same pixel closer together,
as opposed to threads that render the same sample. Thus threads
within a warp are more coherent in memory access and control flow,
leading to performance improvements.

Example benchmarks on a Quadro RTX4000 (WDDM) on Windows 10:
Koro:                 4:23 ->  3:46
BMW:                  1:18 ->  1:25
Barbershop Interior: 17:52 -> 14:55
Classroom:            4:37 ->  3:45

Performance differences on OpenCL/AMD were hit and miss, some scenes
became faster, others lost significantly. Therefore, this is kept as
CUDA only change for now.
2019-03-14 11:45:58 +01:00
bcc66136c2 Fix T62528: data transfer modifier error.
Stupid mistake in previous 'fixing' commit, I put the call computing
extra required source cddata masks into the callback used to get
destination (current object) cddata masks...
2019-03-14 09:48:35 +01:00
687e4b42d5 Merge branch 'blender2.7' 2019-03-14 09:31:20 +01:00
4887baf7d6 Fix T62145: Geometry.Backface Node Renders Black
The NODE_GROUP_LEVEL of the Geometry node should be bumped to 1
when Backface is connected. Backface uses `NODE_LIGHT_PATH` that
is part of NODE_GROUP_LEVEL1, the rest of the geometry ndoe is
NODE_GROUP_LEVEL_0.
2019-03-14 09:20:11 +01:00
05fbb0d50e Fix separators use within tool groups 2019-03-14 17:27:55 +11:00
3b3eac3d4b Keymap: tweak keymap loading type checks
For full keymaps, ensure keymap items are lists to allow predictable
manipulation at runtime.

When calling `keymap_init_from_data` directly, allow any sequence type
to allow tools to define their keymaps as tuples.
2019-03-14 15:53:48 +11:00
0bd45a2d51 Cleanup: unused imports 2019-03-14 15:34:14 +11:00
c567dd5ad9 Keymap: remove select linked deselect
This didn't do anything useful (always de-selected all).
2019-03-14 15:34:13 +11:00
5c2cef2c91 Cleanup: match WorkSpace and WorkSpaceTool capitalization 2019-03-14 14:38:38 +11:00
ff752f6dbc Cleanup: remove redundant UV select linked options 2019-03-14 14:09:24 +11:00
8b1dcd3b25 Cleanup: doxy sections 2019-03-14 13:36:48 +11:00
87aca8bd02 UI: disallow splitting of temporary screens
D4510 by @harley
2019-03-14 11:12:52 +11:00
3ddd7e9704 Cleanup: style 2019-03-14 11:08:48 +11:00
a38205fbd8 Fix "Follow Active Quad" poll function
Since this uses the active face this only makes sense in edit-mode.
2019-03-14 10:56:25 +11:00
e63642f9cd Fix T60172: UV smart project fails for unselected active object
Support multi-object edit-mode too.
2019-03-14 10:53:09 +11:00
3a58e97aed Fix T62526: Can't scroll redo panel 2019-03-14 09:59:03 +11:00
daaabd076d Comments: correct ARegion.sizex/y comment
Also remove unused 'fsize'
2019-03-14 09:53:07 +11:00
7fb7d20c19 Eevee: Fix black mesh when tangent is not present
In this case, the generic vertex attribute is {0,0,0,1}. So we look for
this case.

This fixes black text objects with a normal map applied. Also this could
help porting sculpt mode drawing to Eevee without supporting normal
mapping.

Note that will just fix black meshes due to T61870 but objects will not
show their normal map. So it's not a fix for this issue.
2019-03-13 23:15:11 +01:00
d0fb0d0a9d Fix T60170: Eevee: smoke color does not apply permanently
This was because color is not present in the density texture if there is
only one constant color. Adding it as a uniform.
2019-03-13 23:15:11 +01:00
bbc3ee09e4 Fix T59445: top bar hides everything when there isn't enough space.
Left and right aligned regions get hidden when there is not enough space,
and the main center region was empty. Now remove the left region and put
its contents in the center region, so that it always remains.
2019-03-13 20:14:49 +01:00
2d4a4fa0c1 Merge branch 'blender2.7' 2019-03-13 18:37:09 +01:00
18a9e0776c Fix T62156: Hair particle only shows up in final render when visible in viewport
Draw manager was checking for particles being enabled in viewport, but
actual evaluation was happening for render. Now the check in draw manager
properly follows current evaluation mode.

Additionally, de-duplicated some check, by moving everything needed to
a single place.

Annoying part is the const-cast, that could be cleaned up later by
modifying some underlying functions.
2019-03-13 18:35:32 +01:00
6eeac735f2 Build environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.
Otherwise we can silently build an OpenAL that can't actually playback audio.
2019-03-13 18:33:26 +01:00
1be16466e7 Fix T60434: crash with OSL and viewport + preview render at the same time.
Don't free LLVM JIT memory until process exit, there might be multiple OSL
instances using it.
2019-03-13 18:31:12 +01:00
6a8d87db18 Build environment: backport master changes to blender2.7.
We can keep these in sync for now.
2019-03-13 18:31:12 +01:00
1c9e898e8f GPencil: Cleanup code 2019-03-13 17:42:41 +01:00
4e17197597 Fix T62521: Fake dependency cycle with spline IK
The core was hooking up relation to a wrong operation, in an
attempt to cause proper full update of the pose (since there
is no intermediate state stored anywhere). This is now done
as a part of flush_handle_component_node(), so can properly
route more granular relation.

This fixes the crash which was caused by an access of partially
evaluated data by solving the fake cycle. However, if there
is a real cycle involved the code will still not survive, but
this is more generic issue (which also includes modifiers
for meshes and curves).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4509
2019-03-13 17:26:17 +01:00
f990a1a6cc T62446: Mouse cursor disappears on Grease Pencil stroke
Before the cursor was only visible after the cursor moves over side areas, but not in viewport area.

Now, as soon the drawing is completed, the cursor is reset in order to get again the icon in the viewport.
2019-03-13 17:13:53 +01:00
107c94c338 UI: New option to display factors as percentages
The option can be changed in the Preferences
in `Interface -> Editors -> Factor Display Type`.

Reviewers: campbellbarton, brecht, billreynish

Differential Revision: https://developer.blender.org/D4462
2019-03-13 16:58:00 +01:00
17e0565cc5 Fix T58668: Misaligned text when editing multiple values
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4503
2019-03-13 16:26:34 +01:00
3952fd199a Fix T59448: Eevee broken Area Light shadows for square and rectange shape 2019-03-13 16:06:34 +01:00
0e9ea707b5 Fix T58721: Keyframing one transform option reset other transforms
Use dedicated flag to tag animation just for copy-on-write synchronization,
which makes it so copies of the original data blocks gets in sync with the
original ID. This will not flush the animation update to all objects which
depend on that animation.

If such flush is required, use ID_RECALC_ANIMATION.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4508
2019-03-13 15:51:44 +01:00
Alex Strand
bc5b0f7a09 Curves: change default fill mode to full, increase bevel resolution.
Ref D4438.
2019-03-13 15:24:58 +01:00
Jose C. Rubio
76437b903d Fix T60185: Crash on adding Inverse Kinematics
When having loops in a kinematic chain and also a IK constrain,
the solve_cycle function removes graph relations necessary to ensure
the cleanup operation was running at the very end.

Due to his Blender was crashing when some operations (the bone
constraints) accessed a pointer that was already freed.

Solved by adding more relations between crucial nodes.
2019-03-13 15:16:28 +01:00
Adrian Newton
eb1580961a UI: put Armature constraint in alphabetical order in the menu.
Differential Revision: https://developer.blender.org/D4492
2019-03-13 14:47:18 +01:00
ffa29194bb Fix use of uninitialized variable in undo system. 2019-03-13 13:50:41 +01:00
d555f6a4ab WM: pre-fill bug-reports
D4507 by @LazyDodo w/ edits & moved into own module.
2019-03-13 23:20:48 +11:00
1f39b8b228 Build environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.
Otherwise we can silently build an OpenAL that can't actually playback audio.
2019-03-13 13:00:03 +01:00
3afc77655e Fix T57305: NDOF frozen w/ lock view to camera
This effectively reverts 030297209f and 785e8a636a,
which caused this issue.
2019-03-13 22:21:23 +11:00
52d31b4894 BMesh: make edge winding from face optional
Broke uv-sphere creation, further it might be a problem
for script authors expecting matching edge order for duplicated content.

Now only apply this when duplicating via the operator.
2019-03-13 19:57:52 +11:00
9984c6494a Fix Cycles interface after 3017d88aec 2019-03-13 09:53:07 +01:00
432750f7cf Fix T62487: Flipped normals extruding edge loop 2019-03-13 19:21:10 +11:00
ef04513925 BMesh: utility function to swap edge verts
Needed so we can control the winding of extruded faces.
2019-03-13 19:12:26 +11:00
e6371019e5 Fix T62484: Mesh undo ignores selection mode 2019-03-13 17:37:43 +11:00
2bc6858021 Fix T62524: Popover w/ keep-open moves on cursor motion 2019-03-13 16:41:46 +11:00
1abd120e70 Cleanup: rename uiBlock.mx,my to bounds_offset
Use a name that related to block bounds calculation
(mx/my are typically used for mouse x,y).
2019-03-13 16:41:35 +11:00
f1a65f5750 Cleanup: use unpacking & generators to build classes
No reason to make a classes tuple then manipulate it when
everything can be declared inline.
2019-03-13 13:32:10 +11:00
fac39dc160 UI: avoid sub-classing mix-ins for user-prefs
Also remove redundant staticmethod use.
2019-03-13 13:32:10 +11:00
100854c17c UI: rename PresetMenu to PresetPanel, move to bl_ui.utils
Confusing to call a menu a panel when subclasses need to define
panel specific variables.

Avoid having bl_ui depend on bl_operator module too.
Since this isn't an operator, add utils modules for shared types.
2019-03-13 13:32:10 +11:00
88fe48b56a UI: tweak check for sequence length
Slightly less work to check if it's None
(no need to inspect the listbase).
2019-03-13 13:32:10 +11:00
a4b6ef30dc Cleanup: redundant staticmethod use
staticmethod shouldn't be used unless it's necessary,
in that case a comment should be included especially when
subclassing non-staticmethods from RNA.
2019-03-13 13:32:10 +11:00
d6e6a0f906 Cleanup: redundant bpy.context access 2019-03-13 13:32:10 +11:00
de6f047389 Cleanup: remove unused menu 2019-03-13 13:32:10 +11:00
16b6b03969 Cleanup: pass context to draw method instead of accessing from bpy
Allows for context overrides/mocking.
2019-03-13 13:32:10 +11:00
e24de17b8d Fix typo in grease pencil UI 2019-03-13 13:32:10 +11:00
bf9904ec80 Fix T59501: Eevee doesn't use integer node sockets
This is a hacky fix. We just convert the int as a float and use it as such.

This works ok for small int but will not be correct for numbers greater
than 4194303.

Correct support would require deeper change for UBO creation and socket
conversion.
2019-03-13 01:20:51 +01:00
af0ab15e1d Fix T62436: New added Torus won't appear in Local View
Add Object.local_view_get/set

Alternate fix which supports removing from local view & checking
if an object is in local view.
Also avoids redundant refresh.

Matches 2.7x Object.layer_local_view capabilities more closely,
without exposing the flag directly.
2019-03-13 10:52:25 +11:00
3ea7a5d869 Revert "Fix T62436: New added Torus won't appear in Local View"
This reverts commit 9054b39b27.

Using the region data to find the screen & space-data doesn't make sense
since local-view is space-data there is no reason to pass in a region
argument, then lookup the space-data.

There was no way to remove an object or check it's local view state
as there was in 2.7x.

This can be made closer to 2.7x API and simplified.
2019-03-13 10:52:25 +11:00
3146a07e3e Fix T60005: Eevee: Volume material doen't write alpha 2019-03-12 23:16:17 +01:00
31fba57677 Fix T60802 Eevee: No diffuse when using Clearcoat + Add shader 2019-03-12 23:16:01 +01:00
7187ae5ee1 Fix T62510: Crash resetting space type to default 2019-03-13 09:11:50 +11:00
07b8be9514 RNA: support enum defaults which don't exist in the item array
Allow dynamic defines to have defaults which don't exist in the
static array, this is an exception that's only allowed when the item
array is set to DummyRNA_NULL_items.
2019-03-13 09:10:34 +11:00
df179e5e78 GPencil: Fix merge duplicate 2019-03-12 23:09:05 +01:00
c3174f5924 GPencil: Fix compiler warning 2019-03-12 23:02:19 +01:00
e0dd4f464f Fix T62491: Wrong tooltip for lock/unlock strips 2019-03-13 08:54:04 +11:00
ebcea5b9f5 Cleanup: warning 2019-03-13 08:54:04 +11:00
Dalai Felinto
868a6797e0 Fix T62377: Crash hiding Armature in edit mode and switching to pose
The poll function accepts hidden objects, so they are not stuck in pose
mode, but the operator itself expects a valid base, which we don't have.

When called from OBJECT_OT_mode_set() it will fallback to object mode.

It is the same that happens when in Edit Mesh mode with a hidden active
object and trying to change to Vertex Painting mode.
2019-03-12 18:47:59 -03:00
41cb565880 Fix T60902 Eevee: Environment texture partially visible on transp. render
This was due to environement not being rendered with alpha blending. So
color was still written and contributed to the final render color. Now
we multiply by background alpha so that it removes any background pixels
intensity.

For this reason this made the (incorrect) final premult unecessary.
2019-03-12 22:02:39 +01:00
f16bdf1075 Fix T61380 Geometry normal node incorrect for backfacing faces in Eevee 2019-03-12 22:02:39 +01:00
Dalai Felinto
e37e105fed Fix Hook to New Object won't appear in Local View
Reported as part of T62436 (although the bug was a different one).
2019-03-12 17:44:06 -03:00
Dalai Felinto
9054b39b27 Fix T62436: New added Torus won't appear in Local View
I had to add a region3d.local_view_add(ob) for the API.
2019-03-12 17:28:45 -03:00
Dalai Felinto
db5ca11d80 Silence warning in greasepencil code 2019-03-12 16:49:12 -03:00
2e1e250676 Fix T62508: Annotations Placement default value is not the same as factory default 2019-03-12 20:29:33 +01:00
480ee612de GPencil: Restrict new data operator to object mode
The operator was only accessible from search menu, and this was wrong. The operator must be only used in object mode.
2019-03-12 19:58:43 +01:00
6eaaa9c3d3 Fix T62507: Removing Annotation layers removes layers option
Now, when the layer is removed, the Annotation title is removed too to get the same situation when you start using annotations.
2019-03-12 19:49:46 +01:00
649001e439 Fix T62506: Erasing blank annotation layer activates Move operator
If you try to erase empty annotations, the operator is canceled.

The message is necessary to avoid the keymap is captured by the next keymap in the stack.
2019-03-12 19:36:24 +01:00
cae89a6889 Python/ViewLayers: add object.hide_get/set(), and optional view layer parameters.
These new functions control the per view layer object hiding state, similar to
the selection state. All these object state checking functions now also optionally
take a view layer to use instead of the active view layer.

Fixes T62062.
2019-03-12 18:52:56 +01:00
4572354fe5 Windows: Add convenience logging batch files.
To make triaging a little easier these batchfiles generate the
debug log and sysinfo files and instruct the user how to attach
them to their bug report

Differential Revision: https://developer.blender.org/D4505

Reviewers: brecht, zeddb
2019-03-12 11:36:57 -06:00
75424b296d Cleanup: comment on GPU_pass_compile. 2019-03-12 14:29:50 -03:00
c427590c4e Fix T62388: object.visible_get() not affected by object.hide_viewport.
After recent changes BASE_VISIBLE was not always disabled properly when the
object is hidden. This refactors the code a bit to hopefully be more clear.
2019-03-12 18:28:49 +01:00
834d3962b9 Use the same string for DNA enum and CLI argument for EXR image format setting
The `--render-format` CLI option takes `EXR` and `MULTILAYER`, whereas
the DNA image format render setting uses `OPEN_EXR` and
`OPEN_EXR_MULTILAYER`. This commit adds the DNA values to the CLI
argument, so that it is possible to take the selected value from DNA and
pass it as-is to the CLI. This is used in Flamenco, for example.

The `OPEN_EXR` and `OPEN_EXR_MULTILAYER` are now aliases, so both the
existing and the new options keep working.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: fsiddi

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D4502
2019-03-12 16:17:59 +01:00
e28f0f179d Fix T62279: Rendering simple geometry corrupts with greasepencil layer
This was caused by a missing state reset. Also adding safety state reset
before and after drawing (might not be necessary).
2019-03-12 16:01:23 +01:00
aaeca5d872 Eevee: Planar Ref.: Invert view matrix to remove triangle front face flip
This was the cause of some issue with normal mapping. This way is cleaner
since it does not modify the state of the drawcalls and other ad-hoc
solutions to fix the problems down the road. Unfortunately, it does require
to fix every sampling coordinate for this texture.

Fix T62215: flipped normals in reflection plane
2019-03-12 16:01:23 +01:00
ccb4484ea3 DRW: Fix missing state reset before draw pass
This is needed before any drawcall. If not, undefined behavior can happen.
2019-03-12 16:01:23 +01:00
4b5570533d Fix (unreported) Outliner could add (link...) a collection to a linked scene/collection.
Think that's the last case... At least for now.
2019-03-12 15:48:24 +01:00
9778b0a5bc Fix T62488: Can delete collection from indirect linked library.
Same issue as with previous commits for other Collection Outlier's
operations, checks are always different though...
2019-03-12 15:48:24 +01:00
07c8b829b5 Fix (unreported) Outliner's New Collection adding local collection to linked IDs.
Similar issue to the one about Duplicate operation...
2019-03-12 15:48:24 +01:00
d5576d3b0f Cleanup: Outliner's Collection duplicate: don't check for visualization type in exec function.
This has already been ensured by poll callback...
2019-03-12 15:48:24 +01:00
33dd01fc69 Fix (unreported) duplicated collection from linked scene would be parented to that scene.
In other words, Duplicate Collection could link local ID into a linked
one... Nasty. ;)

Add checks that found parent is not a linked data-block (and try to
find a fall-back one if this is the case).
2019-03-12 15:48:24 +01:00
913b1fd29a BKE Collections: add helper to find the scene of a master collection. 2019-03-12 15:48:24 +01:00
c10d011cc5 Fix T62457: Crash with rigid body and disabled objects
Need to always ensure objects form rigid body wortld are part
of dependency graph.
2019-03-12 15:27:43 +01:00
936014ea8c Fix missing metadata for multilayer exr sequences 2019-03-12 14:53:03 +01:00
645cc3e871 Merge branch 'blender2.7' 2019-03-12 14:22:53 +01:00
8ba1c3072c API Doc: Gotcha: add section about 'exceptions to the rules' known crashing cases.
As exposed in T62406, we can have some rare cases of crashes due to
memory re-allocation happening outside of expected scenarii.

Ideally this should be re-designed, but at least keep track of those
known exceptions to general rules...
2019-03-12 14:12:46 +01:00
e3b1ae9a81 Fix T62481: Cycles crash rendering with UV pass after recent changes. 2019-03-12 14:11:36 +01:00
298dabc79b Cycles/OpenCL: Reduce How Often Kernel Recompilations Are Needed
This patch will reduce the number of times that we need to
recompile kernels. It does this by (en/dis)abling features
by default. So when the user needs them that the kernels are
already available.

Other features are enabled by default for background and foreground
rendering. When in background rendering the user wants the best
render performance. When in foreground rendering the user wants
the least amount of recompilations.

Enabling volumetrics or subdivision evaluation will still trigger
a recompilation during foreground rendering.

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D4485
2019-03-12 14:06:45 +01:00
d9c5436cf4 Fix T62485: wrong tooltip text 2019-03-12 13:45:28 +01:00
ca06b84900 Fix T62470: instanced object does not preserve bounds display type.
Inheriting the display type from the instancer should only happen if it's
a simpler one.
2019-03-12 13:40:31 +01:00
84ac6b72c0 UI: Adjustments to Texture Paint Projection Paint panel 2019-03-12 11:07:43 +01:00
0bb57c5acc Make B-Bone deformation code more robust with bad cached segment data.
Various dependency graph problems can cause obsolete data to reach the
armature modifier, so add checks to reduce the chance of crashing.
2019-03-12 12:38:31 +03:00
5582452567 GPencil: Set wire mode when object is set to wire
When the object view is set to Wireframe, the display must be set as wireframe view with x-ray on.

Now the x-ray switch is handled by object.
2019-03-12 10:23:33 +01:00
784f7cb6ca Cleanup: use doxygen sections for BLI_utildefines 2019-03-12 17:45:25 +11:00
873f8b13ec Cleanup: BLI_utildefines struct macros
Use the term "AFTER" instead of "OFS" since it wasn't obvious these
macros operate on everything after the struct member passed.

Avoid casting to non-const types when only reading.
2019-03-12 17:44:35 +11:00
d8daeeb930 UI: Avoid redundant text argument to UnifiedPaintPanel methods
Now when the text argument is omitted, use the default name
matching how regular properties work.

Avoids passing in the same name which RNA has,
matches UILayout.prop behavior.

Also use keyword only for optional arguments.
2019-03-12 16:31:02 +11:00
5234ced102 RNA: support None text argument to UI functions
Without this there isn't a convenient way to write wrapper UI functions
that forward a text argument that optionally uses the default text.
2019-03-12 16:31:02 +11:00
819c00483d Cleanup: use UnifiedPaintPanel for context menu 2019-03-12 15:32:20 +11:00
ee01b660eb Fix use of uninitialized stack memory
The matrix multiply uses x,y values so both must be initialized.
2019-03-12 15:31:54 +11:00
022ad41670 DRW: use object color from instancer
Otherwise it's impossible to set the color of instanced library objects.

Follows convention of instancer controlling draw options.
2019-03-12 12:28:01 +11:00
6b39dc7672 Fix T61531: can't select same material in multi edit mode
D4441 by @zazizizou w/ edits.
2019-03-12 12:08:24 +11:00
3017d88aec Cleanup: rename specials -> context_menu
In keeping with convention to match code & UI naming.

- No user visible changes.
- Include 'menu' in the name since context is an overloaded term.
- While a few of these are panels, from a user perspective they are
  still context menus.
2019-03-12 11:05:28 +11:00
e6eb7b9cce Tools: Only show cursor tool in wpaint mode when a pose object exists 2019-03-12 10:54:39 +11:00
bf1a3fee7c UI: Restore orient/pivot UI for wpaint & pose mode
This was removed since 2.7x (by accident?)
2019-03-12 10:46:31 +11:00
2ba35ea7c2 GPU: Avoid access violation while reading the pass->shader. 2019-03-11 20:32:31 -03:00
6ad91be5d7 Fix overlay pose panel context check
Displayed pose options when weight-paint armature wasn't in pose mode.
2019-03-12 10:28:38 +11:00
a71891085d Context: add pose_object
Needed for UI scripts to detect mixed weight paint + pose mode.
2019-03-12 10:22:53 +11:00
26216332b8 UI: Remove Sculpt Direction from context menu
It didn't work well in here - the menu would close and re-spawn as you hovered over this control.
2019-03-11 23:47:24 +01:00
5ae8b1da02 Fix wrong memory handling in own rB93633efe69ca.
`BLO_library_read_struct()` actually takes care for us of nearly
everything, makes things much simpler...
2019-03-11 23:37:54 +01:00
cb14138b5a UI: Remove incorrect usage of ellipses in menus
We only use ellipses when a popup appears, not for regular submenus.
2019-03-11 23:33:13 +01:00
0f20696846 Icons: Add Links Cut icon to Node Editor, plus other tweaks
- Tweaks to Paint Mode Fill and Sample tool icons
- Tweaks to GP Add Primitive icons
2019-03-11 23:22:41 +01:00
34781e06b7 UI: correct context menu edge selection check 2019-03-12 08:22:38 +11:00
fd76b8d825 Cleanup: style 2019-03-12 08:21:13 +11:00
815a9df70c Cleanup: trailing space 2019-03-12 08:16:55 +11:00
8add03c3b9 UI: correct typo
Also odd parenthesis.
2019-03-12 08:08:48 +11:00
d7e7e9af02 Add WorkSpace to list of ID types that are not supported by standard copy mechanism for now.
Am not sure whether we want to support that at some point, but at least
if we don’t, make it safe and get out of copy code early, previously
trying to duplicate workspace through BKE_id_copy() would have given a
very bad a broken result...
2019-03-11 20:45:24 +01:00
057117de78 GPencil: Add support to display the material name in selected strokes
2D artists have requested a way to see in viewport the name of the material assigned to a stroke. This is a special request for 2D animation and required to manage complex drawings with multiple materials on it. We don't need add a separate option for this in the panel.

Now, when enable Name option in the Viewport Display panel, when you select a stroke in edit mode, the name of the material is displayed near the first point selected.

Design reviewed by @mendio and @pepeland
2019-03-11 17:42:45 +01:00
84cb5f3b5c GPencil: Add visual feedback for darwing in Bound mode
As the final stroke is not visible in Bound mode, at least display the current stroke while drawing to get a visual hint of what are you doing.
2019-03-11 17:27:14 +01:00
c49f407f7b UI: Add back frame operators to GPencil Draw and Sculpt mode contextual menus
Maniphest Task: T62130
2019-03-11 17:25:10 +01:00
958f34dd03 GPencil: Add support for Bound Box
The bound box was not calculated for grease pencil objects.
2019-03-11 17:13:51 +01:00
93633efe69 Fix (unreported) broken ID previews reading.
Recent changes to blendfile reading adding deferred reading of actual
data broke it, we cannot use the nifty `bhead + 1` to access data
anymore, since there is no guaranty that that block hass been fully
read.

Note that there is still one case in `read_file_thumbnail()`, however
loading of blendfile preview itself seems to be working fine... Maybe
@campbellbarton can double check that point (or knows of hands whether
it is OK there)?
2019-03-11 17:08:30 +01:00
1bc8ddbc6c Fix T62310: Batch generate data-block previews broken.
Some uninitialized colormanagement data was breaking RNA acces for them,
exposed in batch preview management when generating previews for scenes
because we have to backup/restore scene and all its settings
before/after rendering it...
2019-03-11 17:08:30 +01:00
19af5bd57e Fix: Remove unnecessary check in previous commit 2019-03-11 16:51:04 +01:00
01dec326ed Fix T62366: Grease pencil material color keying
Do proper tagging for material changes, and avoid grease-pencil hack
in the relations builder.

The dependency graph code was forcing animation to be run for any
copy-on-write change of material. However, animation is not supposed
to be run on copy-on-write changes.
2019-03-11 16:49:52 +01:00
4879d8001c Add missing Add Face and Fill commands to Edit Mode Edge contextual menu 2019-03-11 16:48:39 +01:00
3c81572e3d UI: Move UV Editor Cursor Position to sidebar
Consistent with the 3D View
2019-03-11 16:37:57 +01:00
Pablo Vazquez
17f4fe05fc UI: Use 'None' instead of 'No' for cache compression method. 2019-03-11 16:35:58 +01:00
251c3e9a81 Sculpt: Fix undo when shape keys are used
Can not use undo node's total vertices count, it only contains
single PBVH node vertex count. Need to pass an entire key block
number of vertices.
2019-03-11 16:31:01 +01:00
005084ef62 GPU: Make the creation of opengl shaders more stable.
This commit possibly fixes the T58938.
The crash happens when a shader that is created in a rendering context is deleted and another shader with the same name/program of the deleted one is created in the same context and used in another context.
2019-03-11 12:23:04 -03:00
2703c405a4 UI: Add missing transform operators to Transform menu
- Consistent with other editors and modes
- Allows users to discover G R S keys

Maniphest task: T61556
2019-03-11 16:18:34 +01:00
81d5f15a2a Fix T61253: Wrong syntax highlighting when @ is used as multiplication
This is obviously not a perfect solution. However, to do proper
highlighting a more advanced Python parser would be necessary.
I think this patch implements a good heuristic to differentiate
between the cases when `@` is used for a decorator vs for
multiplication.

When `@` is directly followed by an identifier, it is interpreted
as decorated. Otherwise not.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4495
2019-03-11 16:15:46 +01:00
a65b068f6e UI: Add missing All Transform to Object > Apply menu
Reported on Devtalk
2019-03-11 16:12:29 +01:00
836f3494d7 Fix T62059: Driver not updating in Color Ramp
Reviewers: sergey

Differential Revision: https://developer.blender.org/D4497
2019-03-11 16:10:22 +01:00
89840b5917 Fix T62423: Wrong sculpting with shape keys and modifiers
Need to use original mesh to get virtual modifiers list, otherwise
key datablocks will not be properly taken into account (since evaluated
mesh doesn't have key datablock).
2019-03-11 16:09:34 +01:00
cd32acefec UI: Add brush controls to contextual menu for GPencil Draw and Sculpt modes
Maniphest task: T62130
2019-03-11 15:51:54 +01:00
1f8738a398 Fix T59928: 'Radius' option does nothing when adding light probe 2019-03-11 15:36:25 +01:00
422d4541f4 Depsgraph: Add missing parameters for node trees
This allows to have drivers on node trees.

Probably now it will be better to simply add parameters for any
ID node, to avoid such amount of manual work.

Initial idea was to not have nodes if it's not needed to avoid
any possible overhead. Having more robust system is probably more
valuable. We can always optimize overhead in one way or another.
2019-03-11 15:33:57 +01:00
2ed0f08106 UI: Add brush controls to contextual menus for Texture Paint, Vertex Paint, Sculpt Mode
Maniphest task: T62130
2019-03-11 15:01:07 +01:00
4302342287 Fix T62359: Flip colors for Fill Tool missing
Reviewers: brecht

Maniphest Tasks: T62359

Differential Revision: https://developer.blender.org/D4486
2019-03-11 14:36:22 +01:00
f608964549 Merge branch 'blender2.7' 2019-03-11 14:34:17 +01:00
403ae48063 UV editor: automatically show image assigned to active face.
When manually selecting a different image, this image will become pinned and
continue to show. The material node is not automatically modified as it was in
old Blender versions, only the image displayed in the UV editor.

Fixes T61239: confusing behavior when unwrapping non-square images. By showing
the relevant image by default it's more clear why it does aspect correction.
2019-03-11 14:34:13 +01:00
b5349d967f Fix T60855: workspace duplicate does not preserve addons filters. 2019-03-11 14:34:13 +01:00
57777b9542 Fix T61906: crash rendering softbody with Cycles and timeline visible.
Make sure we don't reallocate arrays in the pointcache when not needed, the
size of a memory allocation can be slightly bigger than the requested size.

Also, use consistent check for shared cached in copy and free functions.
2019-03-11 14:34:13 +01:00
2cb181d478 Cleanup: fix warning about unused parameter. 2019-03-11 14:34:13 +01:00
cbc8ffa601 UI: Add brush controls to contextual menu in Weight Paint mode
Maniphest task: T62130
2019-03-11 14:34:07 +01:00
2c8bd1d8cb Fix T61053: crash baking to float image after file save.
This is the wrong flag to check, no other code actually reads it.
2019-03-11 14:31:59 +01:00
56a633fd2c Fix T61103: Cycles bevel wrong on objects with negative scale. 2019-03-11 14:26:06 +01:00
6503b4f90f Fix T61831: Denoising Clean pass not scaled correctly with samples. 2019-03-11 14:26:06 +01:00
9f4ec02bb4 View3D: Fix object without bounds displaying bounding boxes 2019-03-11 14:16:51 +01:00
0142c825b5 View3D: Fix Empties displaying bounding boxes 2019-03-11 14:03:31 +01:00
729a1ab6a0 Despgraph: Make dupli objects inherit the parent's display type
Fix T61152 Instanced Collections Don't Honor Viewport Display Setting
2019-03-11 14:03:31 +01:00
d5a024c72d Tools: Add Selection tools to Texture Paint toolbar when Face Selection is enabled.
Consistent with the other paint modes.
2019-03-11 13:45:15 +01:00
a808b58e07 Eevee: Update LTC code
Main change are:
- the fresnel LUT is separated from the main GGX LUT.
- LUTs use sqrt(1.0 - NV) as roughness remapping. Improving precision and
  removes needs for acos().
- LTC LUT is normalized by matrix middle component. Improving precision.
2019-03-11 13:12:48 +01:00
881782213d Merge branch 'blender2.7' 2019-03-11 11:31:17 +01:00
0152bf2edf Color management: Fix/workaround broken getDefaultDisplay()
This is something what is caused by OCIO library. The patch
has been submitted there:

  https://github.com/imageworks/OpenColorIO/pull/638

For until it is refined and checked we do workaround from
our side.
2019-03-11 11:27:04 +01:00
c603a755bd Color management: Query default view from display
Solves weird situation when default display name is queried
from OCIO, but Default view being assumed to be set for it.

Now view is initialized to a default view of that display.
2019-03-11 11:26:51 +01:00
a4958aa8cc GPencil: Fix unreported problem with input samples
The parameter was not working because it ws testing for guides only.
2019-03-11 11:12:32 +01:00
5be35ad7c9 GPencil: Cleanup comment text 2019-03-11 10:44:56 +01:00
0889fea790 GPencil: Fix unreported UV error when use subdivide modifier
When the subdivide modifier was used, the UV was not recalculated and the texture of the stroke was wrong.
2019-03-11 10:42:39 +01:00
6fd11a21f5 Fix T62255: Blender defaults to "OpenAL Soft" in sound settings, regardless of saved preferences
- Default device (index 0) was hard coded.
- Also fixing crash with invalid device passed to blender via -setaudio.
2019-03-10 23:28:51 +01:00
1cc8f9d463 Fix T62393: Materials made from 'Make Single User' have linked animation.
`id_single_user()` was still code from older ID management, now we can
use modern code to handle animdata duplication for us (which allows to
keep handling of nasty sub-data ID horrors like nodtrees in a single
place, much safer and simpler).
2019-03-10 15:23:59 +01:00
81a7f6c848 Fix T62125: snapping not working if invisible object is between you and the target
If we were not in x-ray/wireframe mode, the snapping would treat all
objects like they were in solid mode. This were not desirable if you
had objects that were in wire or bounding box display mode.

Now objects that are in bounding box mode is ignored (unless the object
is in edit mode) and objects with wire display mode is treated as if
they were in x-ray mode.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4493
2019-03-10 12:06:55 +01:00
81958a1393 GPencil: Fix user count for autocreated materials
The user count was 2 when the value must be 1.
2019-03-10 11:18:52 +01:00
b7bcc30329 GPencil: Set brush material after copying a material
This change updates the brush material in the topbar when a new material is created using copy button.

Related to task T62384

Thanks to @matc for suggesting the fix.

Still pending a problem whith user number.
2019-03-10 08:55:38 +01:00
9ad156374f Fix T60171: Hair Particles Not Displaying in Viewport
This patch fixes T60171 by adding a dummy read from the `dummy` vertex attribute to `hair_get_pos_tan_binor_time` in `common_hair_lib.glsl`. Confirmed to work on my machine (macOS 10.14.4 Beta, Radeon R​9 M295X).

According to my experiments regarding this issue, the problem is triggered when all of the following conditions are met: (a) the shader has no vertex reads; (b) the index buffer is ≥ 256KiB. I can't really give an explanation of this misbehavior because of the video driver's closed-source nature.

Reviewers: fclem

Reviewed By: fclem

Subscribers: zeddb

Maniphest Tasks: T60171

Differential Revision: https://developer.blender.org/D4490
2019-03-10 03:57:27 +01:00
d77b7b097d Fix T58890: Sculpt Mode not updating in LookDev or Rendered
This fix is a hack and will slow down update performance. But at least,
all shading features are supported. This is only in "normal" sculpt mode
(no dyntopo, no multires).
2019-03-10 03:35:53 +01:00
Julian Eisel
4041249943 Merge branch 'blender2.7'
Conflicts:
	intern/cycles/blender/addon/properties.py
	intern/cycles/device/opencl/opencl_split.cpp
2019-03-09 17:19:52 +01:00
Julian Eisel
0a28bb1422 Fix stashed full-screens returning to wrong layout
Steps to reproduce were:
* Maximize area (Shift+Spacebar in 2.7, Ctrl+Spacebar in 2.8)
* Open temp file browser (Ctrl+O)
* Cancel file browser (Esc) - should return to previous full-screen
* Press "Return to Previous" button
The previously maximized area would turn into a file-browser.

Note that the issue will still happen when opening old files saved while
in maximized area full-screen.
2019-03-09 16:58:13 +01:00
ba4d07cc5c GPencil: Material panel is hidden after adding new material
This bug was introduced by previous Pin fix commit. Maybe it's not the best solution, but this bug is critical and need a quick fix.

This commit fix the problem, but not totally sure this is working fine with pin.

@dfelinto Could you review and adapt if required.
2019-03-09 16:50:10 +01:00
9c43520010 GPU Extension: Add OS defines
This makes possible to have os specific workaround inside the shaders.
2019-03-09 16:43:05 +01:00
Julian Eisel
7e5d1a9560 Fix T57655: Crash opening 2.79 file saved with maximized area
During screen to workspace/workspace-layout conversion, the first layout
of each workspace would be activated. For temporary full-screens, this
used to be the full-screen layout (IIRC), apparently it's now the
the layout to return to on "Back to Previous". So the 'previous' layout
would be activated, not the full-screen one.
When actually pressing "Back to Previous" now, the operator would first
free the active layout (which it assumes to be the temp full-screen -
wrongly in this case) and then try to activate the non-full-screen one,
causing use-after-free.
2019-03-09 13:11:00 +01:00
36cd31060b Fix T62104: VertexGroup.add() doesn't push depsgraph update for the mesh.
When adding and removing weights from the python api, no depsgraph
updates were triggered.  This would cause the mesh geometry to be out of
sync in the viewport if there were any modifiers that used the vertex
groups in question.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4439
2019-03-09 11:45:31 +01:00
fede272d2c Fix T61737: Gizmo refresh issue
When using a transform.select_orientation keyboard shortcut, the
orientation change would not update the viewport.
So if you had the move gizmo visible, it would not change transform
orientation.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4386
2019-03-09 11:41:04 +01:00
9fdbffb4b2 Fix T62162: Bones set to unselectable can be fully selected through the viewport in edit mode.
Bone selectability in edit mode now matches the behavior of pose mode
(can no longer be selected).

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4469
2019-03-09 11:35:13 +01:00
Dalai Felinto
a0f2923fd8 Fix active workspace changes when deleting workspace
Tested for multi-window as well, which failed with the previous code even
before we introduced ordered workspaces.
2019-03-08 18:52:32 -03:00
Dalai Felinto
aa49444c29 Fix crash when deleting workspaces too fast
Delete workspaces via the menu was not refreshing the workspace tabs
drawing. This way if you deleted the non-active workspace  with the "e" shortcut
from the workspace tab context menu and clicked on the workspace tabs again, it
would crash.

A few notes:
* Deleting a non-active workspace is changing which workspace is then active,
  which is really strange.

* Even when deleting the active workspace which workspace then becomes active
  seems random.

* Using notifiers (ND_WORKSPACE_DELETE) to delete the workspace seems rather
abusing notifiers in my humble opinion.

This is not an important bugfix anyways, people probably would rarely
run into this. I just ran into it while investigating another bug.
2019-03-08 18:52:32 -03:00
Dalai Felinto
2ada9c5bc8 Final fix for greasepencil materials assign/select/deselect in edit mode 2019-03-08 16:48:19 -03:00
Dalai Felinto
4ccaf56814 Fix T62349: Grease Pencil top material list not working
This is a fixup for my own: 92d185faeb.
I'm also fixing the poll of the EEVEE_MATERIAL_PT_context_material
which would fail when we had no context.material available.
2019-03-08 15:36:31 -03:00
cee7c36cbd Depsgraph: Fix missing relation when driving image offset
Related on T61937.
2019-03-08 18:13:26 +01:00
457ecc6825 Partially revert "Collection duplication from Outliner: add a 'duplicate hierarchy' operation."
This partially reverts commit a77feabb51,
removing the shallow 'duplicate hierarchy' option from outliner.

Core changes from that commit in BKE_collections are kept.
2019-03-08 17:53:31 +01:00
13978f7ff6 Followup to T62318: Fix on-the-fly that kind of .blend file cddata corruption.
Remove cddata layers which are not supposed to be written in .blend file,
when reading it.

This is a cheap and simple check, which also gives us forward compatibility
in case we decide some day to make a currently un-written layer type
to be written in .blend files.
2019-03-08 17:53:31 +01:00
18d470e5e4 Fix T62318: Blender crash whith 'corrupt' customdata (CD_BWEIGHT).
Mistake in rBab0bc65c24bd, in conversion of static 'common' sets of
masks, BWEIGHT slipped in CD_MASK_MESH (probably from copy/paste from
CD_MASK BAREMESH).

Note that having it in CD_MASK_BAREMESH but not CD_MASK_MESH looks rather
counter-intuitive, but this is not the time for that kind of cleanup.

Went over whole conversion again, and found two other mistakes, should
really have recheck that before committing...
2019-03-08 17:53:31 +01:00
8730984c70 Fix (unreported) datatransfer code could still modify source mesh in some cases.
Source (i.e. other) mesh should not be modified in any case in modifier
evaluation case (this is forbidden by design and can lead to all kind of
threaded locks and crashes), and doing so even in operator case was
never a good idea either.

Now that we can specifically request needed data (poly and/or loop
normals) from evaluation code, we can finally get rid of those
computations inside data transfer/mesh remapping area.

This is hopefully the last remaining bit of this 'bad crashing code' in
datatransfer area.
2019-03-08 17:53:31 +01:00
cdba2bc0fc BKE mesh remap: add utils to add needed cddata mask for source mesh.
In some cases (currently, only when using avanced mapping of loops),
code needs access to some cddata of the source mesh (CD_NORMAL...).

We need a way to inform calling code about that (actual issue requiring
this change is fixed in next commit).
2019-03-08 17:53:31 +01:00
2a40c6ee2b Modifier eval: add support for request poly normals layer.
Ensure we do get poly normals if they are requested in given cddata mask.
2019-03-08 17:53:31 +01:00
a8acf31181 Fix potential bad behavior, and cleanup/refactor a bit BKE_mesh_ensure_normals_for_display().
This is merely making behaviors of this function a bit more explicit,
and avoid re-adding another CD_NORMAL layer to polys in the (unlikely)
case it would already have one.

It also handles CD_MASK_NORMAL in cd_dirty_poly, but this is more like
future-proof thing, this is not used anywhere currently afaik.
2019-03-08 17:53:31 +01:00
83ca280d15 Fix T59407: remove outdated right click select info in readme, other updates. 2019-03-08 17:37:32 +01:00
bfebb494f6 Fix T61961; Smooth brush distorts multires
The issue was caused by lack of proper accumulation for
averaging. Doing it incrementally introduced a bias.
2019-03-08 17:02:22 +01:00
aac7d53d58 GPencil: Add basic edit support for Hook and Array modifier
These modifiers were not included in previous commit.
2019-03-08 16:36:11 +01:00
02a7e875d7 Cycles OpenCL: Remove single program
Part of the cleanup of the OpenCL codebase.
Single program is not effective when using OpenCL, it is slower
to compile and slower during rendering (when used in for example
`barbershop` or `victor`).

Reviewers: brecht, #cycles

Maniphest Tasks: T62267

Differential Revision: https://developer.blender.org/D4481
2019-03-08 16:31:35 +01:00
e64f6e0e4c Cleanup: Spelling in comment 2019-03-08 16:21:04 +01:00
7d3979884c GPencil: Make visible Armature modifier in edit mode
This change displays the stroke in the deformed position, but the edition is done in rest position.

This is no the final solution, but at least we have some visual feedback in edit mode.

The real solution is to create a full system to manage derived strokes in Edit mode, but this needs a lot of work and we haven't resources now to do it.
2019-03-08 16:09:20 +01:00
Pablo Vazquez
5c630f8256 UI: Rename 'Use Lib Path' to 'Use Library Path' in particle settings.
Also align items in the column since they work together.
2019-03-08 15:50:43 +01:00
50a8a95ce3 Fix T60086: missing update when removing fcurves from Python API. 2019-03-08 15:41:03 +01:00
Pablo Vazquez
4831dd5f38 UI: Naming and tooltip for the new high-resolution smoke simplify setting.
* Rename "Use Smoke Highres" to "Use High-resolution Smoke"
* Use 'Display' instead of 'Draw', following the naming conventions in 2.8
* Drop the 'Use' prefix in the UI, a "High-resolution Smoke' checkbox sufficiently communicates what it does.
2019-03-08 15:30:51 +01:00
fee0593f35 cmake/windows: Set LLVM_INCLUDE_DIRS variable. 2019-03-08 07:19:48 -07:00
cfd23f014a build_environment/Windows: Copy llvm debug headers.
llvm generates some header files at build time that differ between
debug/release causing linker errors when you used the release headers
for a debug build.
2019-03-08 07:19:48 -07:00
12a32d1bf1 Codestyle: comments 2019-03-08 07:19:48 -07:00
7ecbf9b409 cmake/windows: Set LLVM_INCLUDE_DIRS variable. 2019-03-08 07:18:17 -07:00
285577a378 build_environment/Windows: Copy llvm debug headers.
llvm generates some header files at build time that differ between
debug/release causing linker errors when you used the release headers
for a debug build.
2019-03-08 07:18:17 -07:00
35e33b7451 Cleanup: remove debug prints. 2019-03-08 15:16:08 +01:00
89fa6a7a06 Fix T60900, T61111, T61963: node values stuck after clearing keyframes.
This removes special dependency graph code that was intended to avoid GPU
shader recompiles by preserving the node tree and GPU material in specific
cases. This is no longer needed now that we have a general shader pass
cache that compares the generated shader code. The GPU material is already
being freed in material and world eval as well, so there's no point.

Note also that GPU materials are now safe to free from threads, actual
OpenGL buffer freeing happens delayed.
2019-03-08 15:16:08 +01:00
6cab5abbc3 Tools: Re-order Weight Paint toolbar
-Group gradient with the other paint tools
-Nest the two Sample tools together
-Keep painting tools first, secondary tools after
-Make sure toolbar doesn't jump when selection is enabled
2019-03-08 15:07:18 +01:00
6752022310 Fix T62327: Multires with Particles: Undo not working
Modifier stack was forced to be re-evaluated when it was not
supposed to. Should also improve sculpt performance.
2019-03-08 14:38:28 +01:00
a749d7d8fa Fix T59304: boolean modifier does not preserve UV textures.
In the old derivedmesh function it was merging customdata layers, added
that back for mesh conversion too.
2019-03-08 14:19:45 +01:00
da73f56917 Fix T62355: Running blender 2.80 headless broken in recent builds 2019-03-08 14:32:04 +01:00
a3ae53b99e Bevel: revert idea of always starting in offset mode.
Commit 208fafb to fix bevel tool units included a change to always
start modal in offset mode. This was may or may not be right but
broke a way in which users could set percent mode and then subsequently
start a modal that bevels in that mode. So going back to old way.
2019-03-08 07:47:25 -05:00
af53c3b135 Fix crash reloading images used in compositor node
Similar to what Brecht committed in
38f0d5f75a.
2019-03-08 13:43:12 +01:00
0d395ebb6c Icons: Desktop icons update for Mac
Previous desktop icon was clipped on one side, and file icon used cropped icon.
2019-03-08 13:23:59 +01:00
f4d2144960 Icons: Add GPencil Extrude and Radius icons (take 2)
Also, revision of icons for paint modes, based on suggestions by Aslam Cader.

Previous commit accidentally included an extra file.
2019-03-08 13:11:23 +01:00
1b31859243 Revert "Icons: Add GPencil Extrude and Radius icons"
This reverts commit a44d75a964.
2019-03-08 13:07:20 +01:00
a44d75a964 Icons: Add GPencil Extrude and Radius icons
Also, revision of icons for paint modes, based on suggestions by Aslam Cader.
2019-03-08 13:02:46 +01:00
49b9b159e4 Fix T62317: missing Cycles viewport update when changing active camera. 2019-03-08 12:11:42 +01:00
cf09a2443c Fix T60978: crash toggling window fullscreen on macOS.
GHOST event handling does not need a window in the context, and restoring
it to the previous value is problematic if the window was deleted in the
meantime.
2019-03-08 10:24:59 +01:00
1caa5b14bf Cleanup: remove unused test break code for handling cancels. 2019-03-08 10:24:59 +01:00
76442e676e Codestyle: comments 2019-03-08 08:56:16 +01:00
252e0d35ee GPencil: Fix field type error in initialization 2019-03-08 08:49:25 +01:00
eb8e656b2b Cleanup: spelling 2019-03-08 17:48:49 +11:00
4185b3e36d Cleanup: style 2019-03-08 17:16:30 +11:00
a9f0f48f7b Cleanup: use doxy sections for node select API 2019-03-08 17:03:49 +11:00
87b3ea1cbc Cleanup: use doxy sections for mask select API 2019-03-08 16:22:38 +11:00
2a1e3db3c9 Cleanup: use doxy sections for object select API 2019-03-08 15:56:55 +11:00
6db49261cc Cleanup: make modal event double click handling more straightforward 2019-03-08 14:19:27 +11:00
96af595f63 WM: fix double click handling in modal keymaps
Model keymaps wasn't matching double-click events with press
as is done in regular keymap handling.
2019-03-08 13:35:48 +11:00
0ba143a1d6 Fix T62095: OpenGL render camera image alignment 2019-03-08 12:37:22 +11:00
a3906edcaf Fix: Info window select all toggle broken
D4477 by @Poulpator
2019-03-08 11:55:52 +11:00
e9373495a9 Cleanup: use macro for listbase collection begin functions 2019-03-08 11:40:37 +11:00
5af85d904e RNA: rename bpy.data.grease_pencil to grease_pencils
All other sequences are plural here.
2019-03-08 09:55:40 +11:00
8f817de0cb Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f we agree its
best to change the convention.

Names now mostly follow RNA.

Some exceptions:

- Use 'nodetrees' instead of 'nodegroups'
  since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
  since 'gpencil' is a common abbreviation in the C code.

Other exceptions:

- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
2019-03-08 09:50:00 +11:00
e68ac2827d fix D4476 collada exporter: in Blender 2.80 we no longer have a specular color.
Specularity is not a color but a factor.
I have replaced the original export code with
a correct export of the Specularity factor.
2019-03-07 23:26:10 +01:00
Dalai Felinto
92d185faeb Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.

Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.

This would lead to all sort of pinning problems:

* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.

* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.

* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.

I also sanitized the name of the panels, their inheritance and poll
functions.

Reviewers: antoniov, brecht

Subscribers: billrey

Differential Revision: https://developer.blender.org/D4470
2019-03-07 20:28:25 +00:00
81a09628c2 GPencil: Update stroke when UV factor is changed
The stroke was updated only after doing a refresh operation.
2019-03-07 20:04:14 +01:00
8ef460ddab Fix T62319: changing keyframe properties does not trigger update
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4473
2019-03-07 19:57:08 +01:00
a261d6f2d3 Fix T62328, T62209: revert recent fix for texture slots updates (T60366).
This causes other issues, revert for now until a better fix is found.
Reverts commit da1323d1c9.
2019-03-07 19:41:05 +01:00
8ca43a0c7b Cleanup: remove unused parameter. 2019-03-07 19:41:02 +01:00
99ac2dea35 Cleanup: fix compiler warnings. 2019-03-07 19:41:02 +01:00
b38b0cdb0d Fix T62305: Unconnected group vector inputs are mapped incorrectly
The issue was that `bNodeSocketValueVector` and `bNodeSocketValueRGBA`
don't store the value at the same location in the struct.

I kept the cases for `SOCK_VECTOR` and `SOCK_RGBA` completely separate
for now, because they only share code by coincidence and not because
they are actually the same. Eventually there could be a "Vector Input"
node similar to the "RGB" node.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D4472
2019-03-07 18:03:58 +01:00
1eea4b2634 Fix T62316: Grease Pencil objects display in front of the grid lines
The fix was move the grease pencil engine before overlays

This also fix the origin not visible bug T62100

There is a limitation of this fix, but we cannot fix both problems. If you have object behind a transparent graese pencil objects, this objects will not be visible.

Thanks @fclem for his advices to fix this bug.
2019-03-07 17:53:25 +01:00
65f15e972e Cleanup: remove redundant check 2019-03-08 02:47:00 +11:00
3a813622e1 Cleanp: use static sets 2019-03-08 02:43:33 +11:00
cf38b08f52 Fix gizmos not responding to theme color updates
Re-create gizmos when changing theme colors, since
theme colors don't change often this allows gizmos to setup their
colors on initialization.
2019-03-08 02:39:40 +11:00
605749ffaa Modifiers Evaluation: generate loop normals when requested.
This also fixes T62228.

However, datatransfer code is still doing bad things with its source,
still working on proper changes here.
2019-03-07 16:25:25 +01:00
75dad2a04b Multires: Fix crash on exit when sculpting with modifiers
The SubdivCCG structure was re-allocated, but the cached one in
the sculpt session was still pointing to an original one.

This is rather a workaround, but is least evil from what i can
currently think. Remember something similar was also required in
2.7 as well.

Definitely need to revision this change.
2019-03-07 16:09:15 +01:00
9e1d113570 Sculpt; Fix memory leak on redraw normals update 2019-03-07 16:09:15 +01:00
967d82d9b9 Fix T62271: Particles with multires crash on sculpt
In fact, any modifier on top of multires would lead to crash.
Was missing pointer update.

Basically, bring the control flow closer to 2.7.
2019-03-07 16:09:15 +01:00
594f2b8016 Fix T61671: Too strong too dark text shadow in Blender Light theme
Reviewers: pablovazquez

Differential Revision: https://developer.blender.org/D4468
2019-03-07 15:55:59 +01:00
b3d638087d Fix T61761: Randomize Transform is an object mode operator
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4467
2019-03-07 15:55:59 +01:00
ed24315c63 UI: Change UI name of Draw Labels to Include Labels
For compliance with recent naming conventions.
2019-03-07 15:07:16 +01:00
6837474ae8 UI: Use sub-panels inside Grease Pencil Onion Skinning panel
Reviewers: Antonio Vazquez (antoniov)

Differential Revision: D4465
2019-03-07 14:57:21 +01:00
90f4ff95ed Image: use sample size instead of radius
It wasn't possible to sample a 2x2 region.
2019-03-08 00:43:20 +11:00
1b49c7fdd1 Cleanup: redundant select flush 2019-03-08 00:17:52 +11:00
1901595898 Tool System: use set/add/subtract for all lasso select operators 2019-03-07 23:45:58 +11:00
a280867ac2 Fix T62289: crash with texture paint slots and missing node group datablock. 2019-03-07 12:23:52 +01:00
af50099b83 Multires: Fiux memory leak
The work data for materials flags was never freed.
2019-03-07 12:16:50 +01:00
d617466d87 Refactor building the draw string for floats and ints
Differential Revision: https://developer.blender.org/D4466
2019-03-07 12:02:27 +01:00
e25cdac24b Fix T62280: driver functions added in load_post broken after recent changes.
Evaluate the dependency graph a bit later still. This kind of worked before
because it was using the drive namespace from the previously loaded .blend
file but that's of course wrong.
2019-03-07 11:55:48 +01:00
f3c6b0bf4f I18n: Enable Thai language. 2019-03-07 11:45:48 +01:00
ab0bc65c24 Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.

Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!

As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).

Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:29:50 +01:00
cee53160d2 Tools: Add Radius tool to Grease Pencil toolbar
Icon pending.
2019-03-07 11:12:30 +01:00
aef3eff5aa Cleanup: de-duplicate selection keymap templates 2019-03-07 20:53:53 +11:00
219e2f976d Tool System: use set/add/subtract for all box select operators 2019-03-07 20:34:10 +11:00
e52e0c83d7 UI: Re-order toolbar in Curve Edit mode
Makes it more consistent with Mesh Edit mode, and uses same logic for grouping.
2019-03-07 09:58:56 +01:00
48e48653c2 Tool System: add radius option to the image sample tool 2019-03-07 18:03:40 +11:00
5669e95447 Cleanup: use macros to avoid repetition 2019-03-07 14:18:13 +11:00
254f2e7390 Tool System: add annotation tool to image editor
Also add place-holder measure tool.
2019-03-07 14:09:28 +11:00
e866fb7b77 Fix crash transforming image cursor outside of edit-mode 2019-03-07 14:09:28 +11:00
97b1739cf1 Fix T62066: Seg Fault Baking Light Cache with "--background" Flag 2019-03-07 03:51:00 +01:00
dabf593163 Fix T59877: EEVEE: Object Info node random value does not work with Duplis 2019-03-07 03:33:24 +01:00
fbfdfcb947 DRW: Fix hair OSX workaround having a cap limit
This is still is a dirty workaround.

Note that we are drawing the whole sets of point multiple times. While this
is ineficient, the main bottleneck is CPU transformation.
2019-03-07 03:22:57 +01:00
6d33308a8d Cleanup: use API to reset cursor rotation 2019-03-07 12:58:11 +11:00
a9241c41e1 Cleanup: class name 2019-03-07 12:53:45 +11:00
f383537280 UI: rename "Camera Lock" to "View Lock"
Only 1 of the options in this panel apply to cameras.
2019-03-07 12:46:17 +11:00
d43ce78114 3D View: view selected/all use empty object center
Empty object skipping now only skips the bounds, since you can select
the empty by it's center point and want to navigate to it.

Also share object skipping check between view all/selected.
2019-03-07 12:40:43 +11:00
a6f7d64ce6 Fix "View All" potential min/max use when all objects were skipped 2019-03-07 12:32:22 +11:00
951c8e53f4 Fix 3D "View Selected" skip camera option 2019-03-07 12:22:56 +11:00
d21809dd72 3D View: skip hidden image empties when viewing all
D4463 by @pablodp606
2019-03-07 11:41:33 +11:00
a3d647558e DRW: show image empty frame when the 'side' is hidden
This behavior matches back-face culled mesh objects,
where the wire outline doesn't depend on the viewing angle.

Applying this before empty visibility check for view framing,
since it's strange if viewing all gives different results
depending on back-face culling.
2019-03-07 11:41:33 +11:00
e1a62fa1a6 Fix T62259: RGB Curves behave differently in Cycles and Eevee
This was due to curve being not extrapolated correctly. Also curvemap range
was not taken into account.
2019-03-07 01:38:06 +01:00
a070815d12 UI: correct label 2019-03-07 10:12:13 +11:00
de0f4ec315 Cleanup: pylint warnings 2019-03-07 10:02:25 +11:00
bc8d1feb4d Units: Fix unreported. Audio volume is not a percentage 2019-03-06 23:19:48 +01:00
b39985eddb GPencil: Fix unreported segment fault drawing with dots 2019-03-06 19:31:01 +01:00
59f30e9390 GPencil: Improve quality to stroke encaps for textured materials
Before, the caps were not generated for texture materials, now, the endcaps are generated and  adapt the texture.
2019-03-06 17:57:12 +01:00
Dalai Felinto
8eca5c3f7a Minor UI fix: Disable stereo volume alpha when stereo volume is disabled 2019-03-06 13:54:57 -03:00
Dalai Felinto
c2ff8735f5 Fix build for Linux systems
Error introduced on rBff8a2df829fcce8780d26a18f3070ab8e850b2e6.
The folders with binary icons were deleted.
2019-03-06 13:52:08 -03:00
Dalai Felinto
b94ec178a2 Fix stereoscopy convergence plane placement
Note this was broken even in 2.7x.

We had a different logic for the plane wire, as for the plane itself.
And they were both wrong when changing the camera shift or the stereo
pivot.

Both of their logic is now unified and correct.

Also I had to create a new gpu batch for the quad wires, since there is
no state that allows me to filter out the geometry, and the square gpu
batch is quite different than the quad one (2d x 3d and orientation).
2019-03-06 13:33:09 -03:00
Dalai Felinto
0ec98863e2 Fix stereo plane pass and state
This was introduced on the MSAA fix for transparent passes (61039bf713).
2019-03-06 13:33:09 -03:00
35a2edf761 Linux/X11: update icon in taskbar to match new icons.
Adds a few different resolutions for better quality when scaling up/down.
2019-03-06 17:12:11 +01:00
ff8a2df829 Linux/freedesktop: update Blender app icon based on new guidelines.
* Use only scalable SVG icon.
* Add symbolic variant for accessibility.
* Remove shadow, this is added automatically.

For more information see:
https://gitlab.gnome.org/GNOME/Initiatives/issues/2
https://developer.gnome.org/hig/stable/icon-design.html.en
2019-03-06 17:12:11 +01:00
ee099d5624 UI: Name changes
In accordance with T56648.
- Render Border -> Render Region
- Clipping Border -> Clipping Region
- Instancing 'Scale' -> 'Scale to Face Size'
- Instancing 'Rotation' -> 'Align to Vertex Normal'

Python API is left as-is, for now.

DIfferential revision: D4435
2019-03-06 16:43:37 +01:00
9d3eec785b Fix T62220: Solid shading mode - Shadow glitch
The degenerate triangle threshold was too big. Making it an equal test can
introduce problems in other cases but I could not make it fail.
2019-03-06 16:15:26 +01:00
61039bf713 Fix T62262: Light "Show Cone" & stereoscopy volumes broken by MSAA
Volume itself was working, but buggy. The issue was that transparent shapes
does not write to depth buffer. But the custom MSAA resolve shader discard
pixels that did not write to depth making them transparent.

Transparent passes should not be inside the MSAA passes, this is also
a matter of performance.
2019-03-06 15:48:35 +01:00
a77feabb51 Collection duplication from Outliner: add a 'duplicate hierarchy' operation.
Point is, you may want to duplicate your set of collections, but not
duplicate all their objects.

Some notes:
* Am rather skeptical about the practice of using operator name to
define behavior of some common exec code. Imho, that should be a single
operator with an enum to refine its behavior (@cambpellbarton may also
have an opinion here?). Left it as-is for now, because this seems to be
used by other operators too in that code. :/
* @dfelinto, @pablovazquez, @billreynish am not so happy with current
names, but cannot find really good short ones either... Also, shouldn't
we move those into a dedicated `Duplicate` sub-menu?
2019-03-06 15:19:29 +01:00
8462f0e85e Fix (unreported) broken usercount of collections after duplication.
Was missing proper flag in library_query code, collections are also
id-users of their children collections.
2019-03-06 15:19:29 +01:00
702e7bfd5c Cleanup: remove no-op BKE_collection_copy_full().
That one was an empty place-holder, BKE_collection_duplicate() is now
doing that. And its call from full scene copying is not needed
currently, 'deep copy' in that case is handled in editor's
`ED_scene_add()`.

Note that at some point, we might want to move that logic into BKE, but
for now let's keep thing as they are - working.
2019-03-06 15:19:29 +01:00
4dbf5e3a81 Fix T62613: In duplicated collections objects loses patrenting.
We need to remap duplicated IDs' ID pointers to new ones if they exist.
2019-03-06 15:19:29 +01:00
a997c9b9bc Cleanup: remove useless extra-processing after BKE_id_new_name_validate() call.
This function already handles sorting of ID in its listbase.
2019-03-06 15:19:29 +01:00
ac40cf76e5 Cleanup: use default ID type's name instead of generic 'Untitled' for new IDs. 2019-03-06 15:19:29 +01:00
173c023197 Cleanup: rename BKE_library's new_id() to BKE_id_new_name_validate().
The former was probably one of the worst function names in our whole
code base, totally misleading, and quiet often used as a variable name too.
2019-03-06 15:19:29 +01:00
208fafb285 Fix T61773 Bevel and Inset mouse sensitivity, and bevel tool units.
The mouse movement scale needed adjusting according to object scale,
since the amount is on the unscaled model but the viewport shows the
scaled one.
Also fixed proper units for amounts in bevel tool, as was already
done for modifier.  Percent should be comfortably adjustable by mouse.
2019-03-06 09:05:12 -05:00
Dalai Felinto
3fc7d51ed3 Viewport: Fix stereoscopy volume "wires" not showing
This is unreported. When using volume opacity 0.0, the wires were not visible
(nor were they in other cases, but this was the most obvious one).

The volume itself is still glitchy, and slightly worse than 2.79. I
still don't know how to fix this though. It seems a common problem
(see T62262).
2019-03-06 10:59:32 -03:00
Dalai Felinto
f1fef41863 Fix T62118: Stereo drawing options visible from camera view
Note 1: Volume drawing still draws differently than 2.7x.
Note 2: Camera lens widget still ignores stereo.
2019-03-06 10:59:32 -03:00
8f7e24710e Fix: Proportional editing menu disappears after deleting object
Differential Revision: D4460
2019-03-06 14:59:09 +01:00
872412284c Fix grease pencil sculpt circle keymap
Missed when updating circle select operators.
2019-03-07 00:35:53 +11:00
38673621a4 Missed last commit 2019-03-07 00:17:54 +11:00
92094c76a9 DNA: remove none particle brush & deprecated flags
The none brush doesn't make sense to have anymore with the tool system.

Also remove deprecated flags & types for object, armature & text.
2019-03-07 00:10:04 +11:00
ebcea3029d Merge branch 'blender2.7' 2019-03-06 13:45:21 +01:00
f08191a459 Fix Cycles build error on non-x86 processors. 2019-03-06 13:37:06 +01:00
c80415627e Fix T62223: Particle brushes disable select tools 2019-03-06 21:48:22 +11:00
37fa8b0cf9 Fix T62223: Particle select tools also show brush settings 2019-03-06 21:28:41 +11:00
ce8d6afb63 Fix T62230: Annotations corrupts GPencil brushes
Use annotations inside grease pencil drawing mode is something incompatible by design. Actually, the annotations are disabled in overlay panel for 2D template and the tool icon is not in the toolbar.

The unique way to get annotations was using D key, but this is wrong.

If you are inside drawing mode, all the events are captured by paint operator and to capture annotations, the operator must be canceled and the mode changed, but this change breaks several things.

It's not logic add annotation inside darwing mode, because you can simply add a new layer and write the text you want.

This change checks the mode and cancel the annotations if the mode is not thje right one.
2019-03-06 10:54:38 +01:00
3b1e2a4f56 Fix T62241: Repeat last translate, wrong direction
Only use orientation value when the operator uses orientation axis.

Own error in 03da3b6593
2019-03-06 18:11:26 +11:00
0294e1d27f Fix T62236: Crash texture painting
Caused by 10d9a2494f which removed 5x length clamping.
2019-03-06 16:54:07 +11:00
dd61787b25 Cleanup: unused function warning 2019-03-06 16:21:24 +11:00
ecd086ac32 Fix T62210: endless loop in kd tree lookup
Reset nodes after the first balance call.
2019-03-06 14:53:06 +11:00
f79930989d Revert "Fix T62210: endless loop in kd tree lookup"
This reverts commit 301bcf771d.

Caused crash entering particle edit mode.
2019-03-06 14:52:38 +11:00
b2889c7cf1 Fix T61917: Metaball family inherits wrong resolution by deleted object
Synchronizing values between object data is error prone (not updated on
creation or renaming), add an update to have them working as they did
in 2.79.
2019-03-06 13:40:44 +11:00
af72fc7555 DRW: Fix State tracking being off when calling GPU_framebuffer_clear
State tracking works in pretty much all cases but calling the clear command
does change the write mask outside the draw manager. For now we just reset
the write mask before each pass.

Fix T62203 The selected bone is not highlighted inside the other bone.
2019-03-06 03:38:56 +01:00
18e5540a48 Cleanup: remove redundant file argument 2019-03-06 11:18:17 +11:00
a111204ca9 WM: match select all behavior for the info space
Adds select invert to the operator.

D4454 by @Poulpator
2019-03-06 11:12:27 +11:00
85b667716a Cleanup: style 2019-03-06 10:51:11 +11:00
104d9b475d Cleanup: Use GPU_depth_test instead of glEnable/glDisable 2019-03-05 22:02:50 +01:00
6867821c4a DRW: Fix GL state issues due to state not being reset after drawing
Callbacks were drawing with the wrong blend equation and that made some
tools drawing fail.
2019-03-05 22:02:50 +01:00
dbdd79fabe UV/VCol layers creation: add option to not init those new data.
`ED_mesh_uv_texture_add()`/`ED_mesh_color_add()` would always either
copy data from current active one, or (for UVs), generate default
'valid' UVs for every face.

This commit adds an option to not do that, just keeping default values
from raw CDLayer creation. It is only used/exposed from RNA API
currently.

This is especially useful for importer add-ons, since some formats
support multiple layers of those kind, as well as 'partial' dataset not
explicitely defining values for all mesh items.

Preliminary step to fix T62224.
2019-03-05 21:34:48 +01:00
4326f8af08 File Editor: Refactor 'new dir' / renaming code.
We really do not need two 256 chars variables to hanlde renaming, a mere
pair of flags can handle the situation just as well.

Also, scroll to newly renamed item, will help when one want to find
again the directory they just added and rename.

At some point we'll probably want to refactor scrolling further (to make
it fully out of rename code/context e.g.), but for now think this will do.
2019-03-05 21:05:02 +01:00
8858311463 Fix T58715: File Browser: Creating "New Folder" issues with too many existing folders in display.
Smotthscroll to edited entry was broken since filelisting was
rewritten to become async...
2019-03-05 21:05:02 +01:00
d31b2f8549 Fix T61063, T62195: Python scripts should run before depsgraph evaluation.
This was changed (accidentally?) in d192d72312, now go back to behavior more
similar to 2.7. Python scripts should be able to set up drivers or do other
changes that will then be taken into account when evaluating the scene for the
first time.

The more tricky thing is that Python scripts now run before ED_editors_init,
but given what happens in there it seems safe.
2019-03-05 19:20:08 +01:00
3428ec5984 Merge branch 'blender2.7' 2019-03-05 19:14:00 +01:00
5e8e3c00f2 Fix T62112: wrong curve face count
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4452
2019-03-05 19:06:59 +01:00
e290a0b056 Cleanup: add asserts to catch cases where wrong attribute type is used. 2019-03-05 19:05:24 +01:00
c94db5d1c7 Fix T61778: Crash when adding material slot to object
For some reason the mat_nr can be superior to the number of material slots
present on an object. Just cap this number to the max available slot.
2019-03-05 18:58:22 +01:00
25c935e65f Fix Cycles bug rendering with multiple UV maps after recent changes. 2019-03-05 18:39:55 +01:00
d1a744173e GPUMaterial: Make Shader Output nodes inside nodegroups work
Works as expected and mimics Cycles behavior.

The patch is a bit hacky: In order to not touch the lower level function,
we search for the active output inside groups (recursively) and the first
valid one is then copied (or extracted if you want) in the previous parent
nodetree. So we recursively extract the output node back to the main
nodetree while preserving the links through the nodegroups interfaces.

This way everything works as expected in gpu tree evaluation and bsdf
tagging.

Fix T61869 Material Output Node Inside Node Group Renders Pink in Eevee
2019-03-05 17:24:39 +01:00
81283b1c81 DRW: Fix rasterizer discard messing with clear commands
Fixes T62179 Viewport Ghosting on rigs
2019-03-05 17:24:39 +01:00
4bc97db121 BLI_memiter: use ASAN memory poison
Detects invalid memory use when WITH_COMPILER_ASAN is enabled.
2019-03-06 03:17:51 +11:00
Pablo Vazquez
b05d3c2797 UI: Nicer report when trying to edit external libraries
Rename 'libdata' to 'library data'.
2019-03-05 17:06:11 +01:00
b8bb2bb960 Cleanup: warning in release builds 2019-03-06 02:49:30 +11:00
55cd481bf2 Fix T62208: constant detail picker not taking object scale into account 2019-03-05 16:44:47 +01:00
a4540116ba DRW: use memiter for on screen text allocation
Avoid allocation for each string,
improves redraw speed for text heavy views.

A contrived test showed FPS ~18.5% speedup but this doesn't represent
typical usage.
2019-03-06 02:42:53 +11:00
301bcf771d Fix T62210: endless loop in kd tree lookup
The problem was that `balance` expected that all node children
are set to `KD_NODE_UNSET` by default.
However, this might not be the case when `balance` is called
more than once.

The balance function might change the order of nodes even
when no new point has been inserted.
2019-03-05 16:23:58 +01:00
8887988b15 RNA: remove Screen.layout_name
This is no longer used.
2019-03-06 01:48:43 +11:00
Stefan Werner
304a89eccf Cycles: Changed standalone XML parser to read UV as float2 2019-03-05 15:29:50 +01:00
6fd0d810b4 DRW: support clipping for bone verts 2019-03-06 01:26:30 +11:00
68a0d35036 Tool System: add select tools to particle edit 2019-03-06 01:26:30 +11:00
7a6b46aac5 Fix T62163: Duplicating particle system results in crash
There were two problems:
1. `mesh_get_eval_final` has to be called with the evaluated object.
2. Particle systems have to have unique names within an object.
The depsgraph seems to use the particle system name as identifier.
This issue is actually independent of duplication.
The old code used a small hack to create unique names.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4451
2019-03-05 15:24:54 +01:00
302bba1665 GPencil: Disable proportional for Duplicate
When duplicates a stroke using Shift+D, the proportional must be disabled.
2019-03-05 15:12:18 +01:00
Stefan Werner
c891fb2fbe Merge branch 'blender2.7' 2019-03-05 15:06:09 +01:00
db7f9a70b0 Cycles: Added Float2 attribute type.
Float2 are now a new type for attributes in Cycles. Before, the choices
for attribute storage were float and float3, the latter padded to
float4. This meant that UV maps were inflated to twice the size
necessary.

Reviewers: brecht, sergey

Reviewed By: brecht

Subscribers: #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D4409
2019-03-05 14:55:21 +01:00
cb7e66737d Fix T62216: order of items flipped in some menus like object mode. 2019-03-05 14:51:48 +01:00
683e64247f Fix T61796: Linking a collection with instances inside will place the instanced object in the scene.
Do not force to link indirectly linked collections into current scene,
that is usually not desired. Note that user can always add this link
manually if they want.

All this 'implicit instantiation' post-linking process is rather hairy
to get it correct, hope this time it's not breaking something else...
2019-03-05 14:41:46 +01:00
6d110a03b7 Merge branch 'blender2.7' 2019-03-05 14:26:28 +01:00
a325bc6bf3 Fix T58953: Lamp data not always set
The Lamp data was not always set. When using CUDA or CPU it was, but when using OpenCL
without `OBJECT_MOTION` `sd->lamp` not updated to the actual lamp. This made the
TextureCoordinate output the wrong normal when used in a light shader.

As the normal was incorrect it made the IES node render incorrectly.
(what is the default for the IES node).

By setting the lamp data when no `__OBJECT_MOTION__` compile directive is present makes
sure that the normal is correctly calculated.

Fix D4450

Reviewed By: Brecht van Lommel
2019-03-05 14:22:54 +01:00
8b10e1b457 Fix T61780: Crash when trying to access screen areas through the outliner.
ScreenArea->type is NULL-ified on read, and need to be initialized
(usually by `ED_area_initialize()`), but RNA can also access it before
it happens, so need to do it itself...
2019-03-05 14:09:18 +01:00
6e95d8484c Fix upside down tool menus
Regression from 4dd575e5ab
2019-03-05 23:51:57 +11:00
2a811e6955 Tool System: add node circle select tool 2019-03-05 23:29:49 +11:00
5e999c249c Fix T62202: circle select does not work on hair points 2019-03-05 23:16:30 +11:00
2894e75121 Fix parenting objects to bones/vertices causes offset
This reverts part of rBbc5482337669.
Problem with above commit is that the evaluated object seems to not have
partype, par1, par2, par3 copied from the original (yet). Using original
object instead now.
Second issue (when parenting to 'Bone Relative') is that the bones
BONE_RELATIVE_PARENTING flag is set on the original, but not the
evaluated bone (yet), setting this on both now.

Fixes T60623 (and part of T59352)

Reviewers: brecht, sergey

Maniphest Tasks: T60623

Differential Revision: https://developer.blender.org/D4309
2019-03-05 13:10:10 +01:00
76608f5ec5 Fix T60585: threadripper CPU only using 16 threads for e.g. sculpting.
This reverts the changes from ce927e1 to put the main and job threads on
node 0. The problem is that all threads created as children from these
threads will inherit the NUMA node and so will end up on the same node.
This can be fixed case-by-case by assigning the NUMA node for every child
thread, however this is difficult for external libraries and OpenMP, and
out of our control for plugins like external renderers.
2019-03-05 12:46:05 +01:00
8d8d113b73 Tool System: use set/add/subtract for all circle select operators
This applies changes from the 3D view circle select to other operators.
2019-03-05 22:26:45 +11:00
0ae6747300 GPencil: Cleanup compiler warnings 2019-03-05 12:10:34 +01:00
9f7f4c1a6a Fix T62194: Blender crash after makingnew file after using Grease Pencil.
The crash was detected in draw_manager, but the real problem was a wrong pointer that corrupted the struct, so the free function failed.

Redesign this area to keep pointer correct all the time.
2019-03-05 12:06:55 +01:00
6c513dc3e4 Fix T62190: Image editor pixel values are hidden by header at the bottom
since header regions can possibly overlap, accommodate by getting main
regions visible rect first.

Reviewers: sergey, brecht

Maniphest Tasks: T62190

Differential Revision: https://developer.blender.org/D4449
2019-03-05 11:19:39 +01:00
3e4cf413ea GPencil: Don't create framebuffers for selection
The selction use it's own frambuffers.
2019-03-05 10:52:52 +01:00
f5f0b97564 Fix T61763: Crash on selecting "Background Scene"
Memory optimization in dependency graph was using wrong view layer
for the scene which came via set.
2019-03-05 10:22:14 +01:00
caacedd861 GP: move select all into a utility function 2019-03-05 18:39:56 +11:00
b8ef725497 Cemara tracking: move select all into a utility function 2019-03-05 18:39:02 +11:00
e83854e759 Nodes: move select all into a utility function 2019-03-05 18:38:37 +11:00
08e1218d5d Cleanup: move keymap circle select items to template 2019-03-05 15:47:56 +11:00
34daf527f3 Cleanup: rename RENDER_OVERRIDE -> HIDE_OVERLAYS
Match the UI naming (changed since 2.7x).
2019-03-05 15:09:25 +11:00
9d82a38d0a Fix T62159: Poly build crashes w/o overlays 2019-03-05 15:05:00 +11:00
21e379b733 3D View: move pre-select mesh element access into gizmo API 2019-03-05 14:40:33 +11:00
51e743c7fa Fix T62199: Incorrect bpy.data.screens behavior
The screen identifier was set to the "layout_name" which isn't
guaranteed to be unique or even exist.

This meant `bpy.data.screens.keys()` could have duplicate keys,
even when not duplicated, these keys couldn't be used for
`bpy.data.screen[key]` access because internally ID's use names for
collection look-ups.

Make screens match other ID's, using the ID.name as the identifier.

Note: this change was from the initial workspace commit 7f564d74f9
Since then the layout selector has been removed so this isn't needed.
2019-03-05 12:59:46 +11:00
1df6a98b17 Cleanup: minor adjustment to gizmo extrude setup
No need to access both edit & active object.
2019-03-05 11:32:46 +11:00
90afe39181 GPencil: Fix error in 3D Location mode
In previous commit introduced this bug. The flag was inverted and the mode was not working.
2019-03-04 20:56:54 +01:00
ad0489ded8 Annotations: Reduce smooth factor to 0.5
The previous value was too high and deform too much if write text.
2019-03-04 20:40:07 +01:00
8df5e0eb66 GPencil: New extrude operator
Keymap: E   - Extrude Gizmo supported.

If the extrude points are the first or last of the stroke, the stroke is extended.

If the extrude points are in the middle of the stroke, a new stroke is created because the grease pencil strokes can be only with 2 extremes and fold the stroke to get a new point gets very bad results.

Still pending define a new icon. Also, it could be good to set by default XYZ axis in the gizmo.

Note: There is a change in the transform_gizmo_extrude_3d.c gizmo for OB_MODE_EDIT_GPENCIL. This change must be undo when the mode will be integrated into OB_MODE_EDIT, but while we have both modes, we need to keep this code in order to keep running the gizmo.
2019-03-04 19:40:50 +01:00
937e9b4318 Preferences: Remove "requires restart" from multisample tooltips
It does not make sense now that we uses FBOs for that.
2019-03-04 19:18:12 +01:00
89db684d82 Preferences: Add option to disable edit-mode wire Antialiasing
Requested by some users who prefer old wireframe precision.

Smooth wires are still enabled by defaults as they don't have a noticeable
perf impact.

Application restart is needed for changes to take effects.
2019-03-04 19:18:12 +01:00
81ae7773e7 Fix T59140 : Loose edges of final mesh does not display in edit mode 2019-03-04 19:18:12 +01:00
e5ab2b9c62 DNA: optimize data reconstruction
Cache the result of DNA_elem_array_size which was being called
for each element when reconstructing each struct.

Also skip padding members during reconstruction.

Gives ~18% overall speedup loading 10_010_A.anim.blend (r3154)
from the spring project.# Please enter the commit message for your changes. Lines starting

Note, this was reverted recently because it caused T62181
Changes to DNA_sdna_patch_struct_member_nr were needed which
caused issues loading old 2.8x files.
2019-03-05 03:10:43 +11:00
3730d16347 GPencil: Cleanup value to enum name 2019-03-04 17:09:20 +01:00
f6bafef1e1 GPencil: Move Object Depth Order to Object
There was a conflict between Object "In Front" and how the strokes were managed in Stroke panel for grease pencil datablock.

In order to keep consistency, the order of the object has been moved to Object level and now it's using the standard "In Front" flag. As all it is 3D, the option "Back" has been removed.

This also fixes the problem with task T62137.

Also related to commit 54ffc4e19d and D4405
2019-03-04 17:06:03 +01:00
b27ada979c Merge branch 'blender2.7' 2019-03-04 16:54:19 +01:00
Dalai Felinto
69c8248a1c Fixup for fix for OSX build using a build folder name with spaces
Bug introduced on: 1f22e3f311.
This was making regular Mac builds to fail, where they were not failing before.

Tested by William Reynish.
2019-03-04 16:53:56 +01:00
f9ffa18171 Fix T62175: Crash on Undo.
Again nodetree broken code... as usual...
2019-03-04 16:44:33 +01:00
c2f7d4efc3 Fix T62134: duplicating a material won't update node group's node tree user count anymore.
Yet again we have to twist and curl like insane worms to cope with
IDs-not-in-main infamous issue... :(
2019-03-04 16:18:50 +01:00
eb888d05e9 Merge branch 'blender2.7' 2019-03-04 16:08:09 +01:00
708eb55018 UI: make text editor Text menu consistent with menus for .blend and images. 2019-03-04 16:08:04 +01:00
3c5113221d Fix missing image editor redraw when reloading image through API. 2019-03-04 16:06:57 +01:00
e53db8342a Fix Cycles animation denoising giving black pixels for some outliers.
The denoising code expects the output buffer to be filled with the noisy
image, which was not the case for standalone denoising.
2019-03-04 16:06:56 +01:00
10d9a2494f Texture Paint: round corners of dilated UV seams
This fixes the issue of long spikes on sharp corners by rounding them,
guaranteeing that the bleed will never exceed the bleed distance
set by the user in any part of the mesh.

See: D4437
2019-03-05 01:57:49 +11:00
871248a77d Fix texture paint UV dilation algorithm
Two aspects are addressed:

- Correct computation of dilation distance,
  so that dilated boundaries remain parallel to the original boundaries
  (and with the actual distance specified as bleed distance).

- Dilate with regard to adjacent seams
  instead of adjacent triangle edges, for a more correct result.
  This is especially important in the case of concave shapes,
  where spikes could overlap with actual geometry.

See: D4436
2019-03-05 01:36:22 +11:00
f4677547d4 Fix early output check in movie clip prefetch
Was preventing prefetching when clip is offset to a
higher scene frame number than a duration of the clip.
2019-03-04 15:25:09 +01:00
f96fffe0db Fix/workaround T62167: Random crash when displaying wireframes.
Some old AMD drivers crash when a vbo with stride 1 is used a few times.
I have not found a real solution to this problem. So the solution was to use a vbo with stride 4 (which in theory is less efficient and takes up more memory space).
2019-03-04 10:27:41 -03:00
46f1c1b15d Revert "DNA: optimize data reconstruction"
This reverts commit 657205530c.

This caused an T62181, looking into fix but revert for now.
2019-03-05 00:21:48 +11:00
ae74f89585 Fix T62140: GPencil line segment disappears
Remove code for when edge count is 2.
2019-03-04 12:13:35 +00:00
baee9b014a Outliner: better support for paintcurves ('Blender File' view)
- paintcurves were hitting an assert in outliner_add_element()
- missing outliner update when adding a paintcurve
- paintcurves were not showing an icon [they dont have a dedicated icon,
took the one used elsewhere]

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4445
2019-03-04 13:04:41 +01:00
a53dccb2a9 Cleanup: indentation, style 2019-03-04 22:13:58 +11:00
270fd28496 Cleanup: use single quotes for enums 2019-03-04 22:11:06 +11:00
2644e4f8f4 Merge branch 'blender2.7' 2019-03-04 12:00:02 +01:00
d3306f0272 Fix bad level calls 2019-03-04 11:58:37 +01:00
ba55cbf5b5 Fix T62009: ԥ abkhazian letter shows as a square in Blender.
Added all 'Extended Cyrillic' chars I found in DejaVuSans (unfortunately
that one does not have the complete set).

Note: At some point we might want to switch to some more modern solution
than our Frankenstein font (thinking about noto one)...
2019-03-04 11:56:04 +01:00
b526a38ba2 Cycles: Store various render stages timings
Includes time spent on synchronization and time spent on just
path tracing/denoising.
2019-03-04 11:52:49 +01:00
e90a2807bf Show metadata for rendered images
Previously metadata was only shown for images which are saved
to disk.

This change makes it so that it's possible to see metadata right
after pressing F12.
2019-03-04 11:32:30 +01:00
2150a68a80 Cleanup: Indentation 2019-03-04 11:32:30 +01:00
4b17d34ad3 Add Thai language entry (hidden for until we get some translation). 2019-03-04 10:46:46 +01:00
1a06751c1a Fix T62113: Color Management Curves CRGB buttons missing
Template was missing a type="COLOR" definition.
2019-03-04 10:46:27 +01:00
e49d7b9363 UI: Add descriptive tooltip to Curve Radius tool
Was previously just using generic transform tooltip.
2019-03-04 10:26:27 +01:00
a7c64cdcca UI: Rename Shrink/Fatten in curve contextual menu to fit with recent tool name change 2019-03-04 10:19:36 +01:00
ff10f123ba Cleanup: typo in comment
spotted by @miclack, thx!
2019-03-04 10:16:07 +01:00
c5dbcc019d Fix unreported: Shrink/Fatten in Curve Transform menu fails because it was calling the mesh edit mode operator 2019-03-04 10:15:40 +01:00
b3a324bec9 UI: Move paint context menus to panels
See proposal: T62130
2019-03-04 20:13:07 +11:00
fd3ef61bc1 Tools: Rename Curve Shrink/Fatten to Radius
This is fundamentally different from Shrink/Fatten for meshes, because the control points are not moved, only the radius.
Issue raised by Ronan Ducluzeau, name suggested by Campbell Barton
2019-03-04 09:50:59 +01:00
39b210db94 Icons: only use macOS override if blender not found
Otherwise `make icons_geom BLENDER_BIN=...` doesn't work as documented.
2019-03-04 19:37:46 +11:00
798d2cadc3 DRW: Remove unecessary state changes
The TODO is old and the issue does not seems to appear anymore.

If bugs emerge from this commit it's most likely to be a bad usage of the
API.
2019-03-04 01:30:02 +01:00
10afa74e82 DRW: Fix matflag not being updated after first drawcall
This Fixes T61823: Flickering material problem with eevee
2019-03-04 01:30:02 +01:00
c7cf8282a6 Fix T62076: Delete Active Scene Freezes Blender.
Not sure where that piece of code originates from, but trying to remap
usages of deleted scene to newly active scene in *whole* bmain is
really, really not the thing to do! Just use generic ID deletion code
here, no reason it could not handle the task properly. ;)
2019-03-03 21:59:28 +01:00
d0df7fb3b9 Fix (unreported) missing handling of 'never self' ID pointers in library_query and library_remap codes.
Looks like something forgotten at some point, define in callback flags
was there, just not used at all.

Added most obvious cases now (we are probably still missing some), and
proper handling for it in remapping code (when we hit such case, we
'convert' new_id to NULL and go on with it).

Related (as in, exposed by) T62076, but not the actual cause of that bug.
2019-03-03 21:56:38 +01:00
419ee7bdc6 Fix T62064: Linked object made by Make Links isn't showed in the scene you linked to.
Usual missing DEG relations rebuild tagging...
2019-03-03 21:14:52 +01:00
31ad063ba4 Tweaks to icons for curve shrink/fatten & tilt 2019-03-03 20:38:22 +01:00
a6c30dd91c Tools: Add Randomize to Curve Edit toolbar 2019-03-03 20:37:47 +01:00
40052708e6 Annotations: Make strokes smoother
When move the mouse/pen very fast, the events were not enough to create smooth strokes.

I have used a simplified version of the same logic used with grease pencil objects to smooth annotations.
2019-03-03 19:56:03 +01:00
932d0ec676 Icons: Make blender_icons_geom_update.py support macOS 2019-03-03 19:02:14 +01:00
657205530c DNA: optimize data reconstruction
Cache the result of DNA_elem_array_size which was being called
for each element when reconstructing each struct.

Also skip padding members during reconstruction.

Gives ~18% overall speedup loading 10_010_A.anim.blend (r3154)
from the spring project.
2019-03-04 03:00:33 +11:00
647c26c5ce DNA: rename BezTriple alfa to tilt 2019-03-04 01:18:06 +11:00
216ddcc09b Cleanup: rename FileData.listbase -> bhead_list
Having the name matching the type isn't so meaningful.
2019-03-04 01:01:52 +11:00
2d468fc072 UI: subtle outline for negative 3D view gizmo axes
Without this they can blend in visually with the backdrop of the gizmo.
2019-03-04 00:51:03 +11:00
301494f94a UI: use grey for 3D view axis gizmo highlight
Using white with low alpha made it hard to use on a white background.
Since the axes themselves highlight to white.
2019-03-04 00:13:25 +11:00
a7f5de75f8 Tools: Remove parenthesis from Spin Duplicates tool name 2019-03-03 13:57:01 +01:00
65a3fe46b5 Tools: Add Shrink/Fatten to Curve Edit Toolbar 2019-03-03 12:37:18 +01:00
16406eb6a8 UI: Add Shrink/Fatten to curve contextual menus 2019-03-03 10:58:51 +01:00
bd1ba2f7a9 UI: increase 3D view icon contrast over light colors
- Avoid using white with low alpha to make grey.
  Note that this is the second time we've run into this problem: T59626.

- Use a light backdrop when the icons are dark
  so they're visible over a black background.
2019-03-03 12:15:03 +11:00
ae977d13f8 Improve slightly the stability of wireframes in old GPUs from AMD.
Tested on `AMD Radeon HD 7570M`.
The reason for crash reduction is still unknown.
2019-03-02 21:01:13 -03:00
52f318b914 Refactor duplicate code for collections.
* Fix incorrect handling of children collections being linked more than
once in the hierarchy (previous code would make a new copy for each
link, instead of just re-linking the first copy for each extra link).

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

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

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

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

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

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

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

Reviewed By: brecht, campbellbarton, sergey

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

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

Reviewed by: Brecht

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

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

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

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

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

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

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

Reviewers: brecht

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

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

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

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

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

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

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

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

Reviewers: brecht, mont29

Subscribers: pablovazquez, billreynish, JulienKaspar

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

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

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

Maniphest Tasks: T62053

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

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

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

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

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

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

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

Author: Guillaume M (mathers)

Reviewed by: ISS, campbellbarton

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

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

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

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

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

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

Rolled back to a bit more fragile solution.

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

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

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

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

{F6728281}

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

{F6728298}

With patch applied the arrow looks perfect:

{F6728302}

Reviewers: brecht, billreynish

Reviewed By: billreynish

Subscribers: pablovazquez

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

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

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

Reviewers: brecht

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

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

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

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

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

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

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

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

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

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

Reviewed by: Brecht

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

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

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

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

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

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

Reviewers: brecht

Reviewed By: brecht

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

Reviewed By: Campbell Barton

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

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

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

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

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

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

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

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

* * *

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

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

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

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

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

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

Reviewers: brecht

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

Also support for x-ray mode.

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

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

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

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

Reviewed By: brecht, #cycles

Tags: #cycles

Maniphest Tasks: T61971

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

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

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

Merged the data_init and state_buffer_size kernels to split_bundle.

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

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

Fix: T61576, T61501, T61466

Reviewed By: brecht, #cycles

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

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

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

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

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

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

The modifiers are not disabled.

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

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

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

This caused text in strips to "jump around"

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

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

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

Reviewed by: Brecht

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

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

Reviewed by: Brecht

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

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

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

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

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

VS2019 support requires cmake 3.14.

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

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

VS2019 support requires cmake 3.14.

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

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

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

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

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

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

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

Random color uses the same method as solid mode.

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

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

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

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

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

Reviewers: sergey

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

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

Reviewers: mont29, brecht

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

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

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

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

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

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

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

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

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

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

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

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

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

Tags: #cycles

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Tags: #cycles

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

Reviewed By: Brecht Van Lommel

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

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

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

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

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

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

See T61704 for user reports on that matter.

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

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

Reviewed By: Brecht Van Lommel

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

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

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

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

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

Impact on compilation time

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

Impact on render time

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

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

Maniphest Tasks: T61463

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

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

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

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

Impact on compilation time

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

Impact on render time

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

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

Maniphest Tasks: T61463

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

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

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

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

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

Impact in compilation times

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

Impact in render times

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

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

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

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

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

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

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

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

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

Impact in compilation times

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

Impact in render times

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

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

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

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

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

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

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

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

Reviewed By: Clément Foucault

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

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

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

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

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

Change in Cycles OpenCL compilation times

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

Reviewers: #cycles, brecht, sergey

Reviewed By: #cycles, brecht

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: fclem

Reviewed By: fclem

Subscribers: brecht

Maniphest Tasks: T59784

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

Request from @hjalti.

Reviewers: brecht

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

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

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

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

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

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

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

dna_rename_defs.h is used to define renaming operations.

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

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

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

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

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

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

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

Reviewers: campbellbarton

Subscribers: brecht

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

Reviewers: brecht

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

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

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

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

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

Not ideal, but safest way currently.

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

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

Patch by lukasstockner97, jbakker, brecht

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

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

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

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

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

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

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

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

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

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

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

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

Maniphest Tasks: T61520

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

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

Add in a check to detect cyclic links.

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

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

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

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

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

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

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

Adding this back for now.

Reviewers: brecht, billreynish

Maniphest Tasks: T61499

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

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

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

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

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


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

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

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

The keymaps for brush are:

F: Change Radius
Shift + F: Change strength

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

Maniphest Tasks: T61428

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

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

Reviewers: mont29, brecht, sergey

Reviewed By: mont29, brecht, sergey

Subscribers: mont29, brecht, campbellbarton, sergey, billreynish

Tags: #modifiers

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

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

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

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

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

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

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

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

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

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

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

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

Consider initial dependency graph evaluation as a file load.

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: sergey

Maniphest Tasks: T61185

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: campbellbarton

Maniphest Tasks: T61309

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Aimed to ease review of rendered shots.

Reviewers: brecht

Reviewed By: brecht

Subscribers: fsiddi

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

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

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

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

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

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

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

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

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

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

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

Example screenshot which shows the metadata:

{F6527727}

Reviewers: brecht

Reviewed By: brecht

Subscribers: fsiddi

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

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

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

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

Reviewers: brecht, aligorith

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

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

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

Reviewers: brecht, campbellbarton

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

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

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

Now just iterate over objects in posemode instead

Reviewers: brecht, dfelinto

Maniphest Tasks: T61051

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

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

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

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

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

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

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

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

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

See T57857 for discussion.

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

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

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

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

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

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

Development Note:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

- BEGIN/END license blocks

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

- Contributors

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

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

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

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

- BEGIN/END license blocks

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

- Contributors

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

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

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

Fixes T61086

Reviewers: billreynish

Maniphest Tasks: T61086

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

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

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

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

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

Also clear recalc flag on original particle system.

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

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

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

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

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

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

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

Reviewers: brecht, campbellbarton

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

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

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

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

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

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

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

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

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

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

This change solves the problems with updates in render mode.

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

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

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

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

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

Reviewed by: sergey

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

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

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

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

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

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

This uses the same rendering technique as Xray mode.

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

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

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

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

Reviewers: brecht, campbellbarton

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

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

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

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

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

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

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

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

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

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

Reviewers: brecht, sergey

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes T60756

Reviewers: billreynish, brecht

Maniphest Tasks: T60756

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

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

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

Reviewers: brecht

Maniphest Tasks: T60133

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

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

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

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

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

Reviewers: brecht

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

Reviewers: fclem

Maniphest Tasks: T60810

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

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

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

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

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

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

Maniphest Tasks: T60417

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

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

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

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

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

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

Reviewers: brecht

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

Reviewers: sergey, brecht

Maniphest Tasks: T59939

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

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

Reviewed by: Brecht

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

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

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

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

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

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

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

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

Reviewers: brecht

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This commit also cleanup the implementation.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Here is summary of all changes:

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

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

Reviewers: fclem

Reviewed By: fclem

Subscribers: pablovazquez, billreynish, rboxman

Tags: #eevee

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

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

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

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

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

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

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

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

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

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

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

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

The following limitations are known:

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

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

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

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

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

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

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

Reviewers: sergey

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

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

Reviewers: sergey

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

- Quaternion channels use quaternion multiplication:

  result = prev * value ^ influence

- Scale-like multiplicative channels use multiplication:

  result = prev * (value / default) ^ influence

- Other channels use addition:

  result = prev + (value - default) * influence

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

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

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

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

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

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

Reviewed by: Brecht

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

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

Reviewed by: Brecht

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The commit includes:

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

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

- Segment selection mode to select strokes between intersections.

- New operator to change strokes cap mode.

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

- Multiple small fixes and tweaks.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: brecht

Maniphest Tasks: T60361

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

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

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

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

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

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

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

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

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

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

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

Fixes T59185

Reviewers: brecht

Maniphest Tasks: T59185

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

Maniphest Tasks: T58479

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

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

    #!/bin/bash

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

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

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: fsiddi

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed By: brecht

Maniphest Tasks: T54115

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

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

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

spotted while looking into T59939

Reviewers: mont29, brecht

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

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

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

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

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

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

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

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

Reviewers: campbellbarton

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

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

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

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

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

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

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

Reviewed by: brecht

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

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

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

Reviewers: brecht, campbellbarton, JacquesLucke, mont29

Subscribers: abdelmatinboulbayam, amir.shehata

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

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

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

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

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

The new stroke will use the current material.

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

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

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

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

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

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

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

Reviewers: brecht

Reviewed by: brecht

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

Reviewers: sybren

Maniphest Tasks: T57377

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

Maniphest Tasks: T59785

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

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

Reviewers: brecht

Maniphest Tasks: T59922

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

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

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

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

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

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

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

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

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

Reviewers: brecht

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

Maniphest Tasks: T59861

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

Reviewers: sergey, brecht

Maniphest Tasks: T59884

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: campbellbarton, brecht

Maniphest Tasks: T58327

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

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

Fixes T58956, T58202, T59284.

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

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

Reviewers: mont29

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

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

Reduce size and use an arrow icon.

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

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

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

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

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

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

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

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

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

myframe.strokes.update(mystroke)

For datablock:

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

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

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

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

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

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

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

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

This causes outliner rename to have low alpha making text overlap
icons.

Use solid color to avoid issues with overlapping UI
elements in the future.
2018-12-20 09:13:42 +11:00
ab144437e2 Fix T59579: Grease Pencil copy buffer loses material information 2018-12-19 22:57:03 +01:00
a9706476e3 Mesh Batch Cache: Fix uninitialized loop variable 2018-12-19 22:56:15 +01:00
c0e6cbadfc Fix crash clicking on trackball widget
Missing check in newly added gizmo orientations.
2018-12-20 08:14:48 +11:00
65bc931306 Cleanup: argument wrapping indentation 2018-12-20 08:03:48 +11:00
1ce9a142b6 UI: expose gizmo orientation as a single enum
Avoids awkward logic from the popover,
by faking an extra item in the enum.
2018-12-20 07:46:06 +11:00
Sebastian Parborg
2bc27d3dc5 Fix T59391: Crash snapping to active 2018-12-20 06:51:28 +11:00
Sebastian Parborg
90e253d974 Fix T59387: Axis target crash 2018-12-20 06:33:55 +11:00
205b0d4651 GP: Fix error drawing on Camera view for Surface/Stroke
This bug was introduced fixing task T59595
2018-12-19 19:50:28 +01:00
a8198e6fbf GP: Primitive: Add MMB to confirm
Based on GP team feedback
2018-12-19 17:39:37 +00:00
ad7dd7d8e2 Fix (unreported): Wireframe fails in the sculpt mode on some AMD GPUs. 2018-12-19 13:26:32 -02:00
1fc75dbbce Fix T59595: Grease Pencil and CameraView
The perspective effect deformed the stroke. Now when you are in camera view and the lock axis is not enabled, the stroke is reprojected flat over the view to remove any deformation.

Also fixed reproject operator to use the origin set in topbar and not cursor 3D always.
2018-12-19 17:09:30 +01:00
d9ac4653e7 Fix T59574: Prop_search fails to set objects from scene.
Another case where editstr from search button would be used, when we
actually have desired pointer itself already available in button.

Am growing tired of doing bandaids fixes on that search menu stuff,
whole thing would require some real re-coding imho, to get rid of that
tantacular dependency over string 'identifier' only (when we should also
have access to at the very least, the active index, and also probably
active data pointer itself...).
And/or clearly separate string identifier from 'UI' string shown to user.
2018-12-19 17:02:55 +01:00
42bf7e440c Fix T58376: incorrect tooltip in subsurf modifier 2018-12-19 17:00:20 +01:00
be98fcc6e2 Fix T59273: Text object disappears when Fill Mode is set to None
Reviewers: fclem

Differential Revision: https://developer.blender.org/D4103
2018-12-19 15:56:15 +01:00
4563849c1b Fixes for particle system and physics
- Silence harmless error print about relation.

  Object with particle system which doesn't use physics will
  not have point cache component.

- Tag relations for update when particle system physics type
  change.

  This ensures correct state of point cache component.

This is all part of T59258.
2018-12-19 15:36:09 +01:00
259879e135 Fix T58739: Camera Location, keyframe Bug
This was originally caused by fix for T53788. Not sure why extra
`where_is` is needed there, the object is supposed to be evaluated
already.
2018-12-19 15:02:49 +01:00
d211c9aa0a BLI_bitmap: add functions operating on the whole bitmask.
There is no point having operations that iterate over the whole
bit array as macros, so convert BLI_BITMAP_SET_ALL to a function.
Also, add more utilities for copying and manipulating masks.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D4101
2018-12-19 15:53:12 +03:00
dad260c164 GP: Primitive: Fix jitter
Missing vector calculation.
2018-12-19 12:18:45 +00:00
ac8cde69f5 GP: Primitive: Add RMB behaviour to Grab/Move 2018-12-19 12:18:45 +00:00
76d04f9514 Merge branch 'master' into blender2.8 2018-12-19 12:58:22 +01:00
593ed1347c Build info: Ensure hash length is same across all platforms and has no conflicts
The original issue was that different platforms will use different
hash lengths, just because defaults on Git client were different.

Now we use explicit length for the hash, and length is the same as
is used for short hashes in Linux -- apparently they started to have
collisions with length of 11.
2018-12-19 12:56:32 +01:00
2af0ec9457 UI: move gizmo orientation settings into popover
Instead of link toggle with enum, use a single popover that contains
both settings. The code for this isn't nice - needing 3x panels for now.

See D4075
2018-12-19 22:45:36 +11:00
25fcb44d2d Merge branch 'master' into blender2.8 2018-12-19 12:38:31 +01:00
684898cfbf Fix Proportional Edit Projected 2D method skiped center calculation
rBa520e7c85c83 defined T_OVERRIDE_CENTER(1 << 25)
which was already in use T_PROP_PROJECTED(1 << 25)
thus skipping center calculation

Fixes T58882, T59518

Reviewers: campbellbarton, brecht

Maniphest Tasks: T58882, T59518

Differential Revision: https://developer.blender.org/D4100
2018-12-19 12:33:11 +01:00
1a7fe54a85 Fix T59578: enabling "vertex group weights" in edit mode results in crash 2018-12-19 12:32:13 +01:00
61c941f040 RNA: support setting default values for custom properties.
NLA requires a usable default value for all properties that
are to be animated via it, without any exceptions. This is
the real cause of T36496: using the default of 0 for a scale
related custom property obviously doesn't work.

Thus, to really fix this it is necessary to support configurable
default values for custom properties, which are very frequently
used in rigs for auxiliary settings. For common use it is enough
to support this for scalar float and integer properties.

The default can be set via the custom property configuration
popup, or a right click menu option. In addition, to help in
updating old rigs, an operator that saves current values as
defaults for all object and bone properties is added.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D4084
2018-12-19 14:20:35 +03:00
908a274240 Fix T59237: Instancing on a path doesn't do anything
This commit makes it so curve path parent solving accepts an explicit
arguments for both time and curve speed flag, making it so we don't
have to mock around with scene's frame.

One unfortunate issue still is that if the instancing object is used
for something else, we might be running into a threading conflict.
Possible solution would be to create a temp copy of an object, but
then it will be an issue of preventing drivers from modifying other
datablocks.

At least the original issue is fixed now, and things behave same as
in older Blender version. Additionally, the global variable which
was defining curve speed flag behavior is gone now!
2018-12-19 11:59:47 +01:00
bc8f2e9ee4 Fix T59500: Weight Smoothing Not Working
Reviewers: brecht, dfelinto

Maniphest Tasks: T59500

Differential Revision: https://developer.blender.org/D4094
2018-12-19 11:51:49 +01:00
1a21c0c239 UI: show panel type in Python tooltips
Handy when editing UI scripts.
2018-12-19 21:49:04 +11:00
543a34a021 RNA: convenience method for orientation name & icon
Avoids RNA introspection at draw time
which is relatively slow (approx 5x).
2018-12-19 21:41:39 +11:00
f7dc6a63fb Gizmo: optional custom orientations for transform
This aims to resolve a conflict where some users want to keep keyboard
axis setting global, even when the orientation is set to something else.

Move/rotate/scale can optionally each have a separate orientation.

Some UI changes will be made next.
2018-12-19 20:57:51 +11:00
231ea39ed1 Transform: use the scenes transform orientation
- Use the user orientation when pressing XYZ keys,
  second press switches to global.
- Pressing again switches to global, or local
  if you're have global orientation set.

The option for gizmos to have their own orientations will be added,
see: D4075
2018-12-19 20:49:13 +11:00
a246604937 GP: Update Gizmo position when select 2018-12-19 09:13:59 +01:00
a0cca88899 Theme: use menu text color for floating redo panel
blender_light theme was showing black text on dark background.
2018-12-19 13:09:05 +11:00
1a98914bb7 startup: default file selector to empty filename
Someone saved startup.blend w/ filename, tsk.
2018-12-19 12:42:12 +11:00
fd42fe6616 Fix T57139: Transform overlay shows even when disabled
Transform bypasses the gizmo API for drawing overlays,
so custom checks are needed.

Also don't draw the gizmo in other windows when transforming.
2018-12-19 12:30:16 +11:00
6af6ef9771 Fix invalid string comparison 2018-12-19 11:39:24 +11:00
bb4ed5ce39 Fix invalid string comparison 2018-12-19 11:38:20 +11:00
d760a6ed54 UI: tweak shading popover
Show backface culling option even with rendered shading since it doesn't
yet support meshes two-sided option (noted as TODO).

Also correct bad string comparison.
2018-12-19 11:27:26 +11:00
a72220ecf0 DNA: move back-face culling to shading popover
Overlay options shouldn't be used when overlays are disabled.

Move to shading popover, reported as T58070.
2018-12-19 10:55:53 +11:00
d46d8e831c Merge branch 'master' into blender2.8 2018-12-19 10:28:26 +11:00
5c3953010d Cleanup: spelling 2018-12-19 10:18:15 +11:00
fd235e52a2 Cleanup: use static struct for app-template state 2018-12-19 10:18:15 +11:00
61a816e8ff GP: Add calculation of center for transformation by stroke (WIP) 2018-12-18 22:56:40 +01:00
0d7fe55d0e GP: Improve z-depth for Blur FX
Instead to get an average value, use the lower value.

Still some issues when render.
2018-12-18 22:56:40 +01:00
5b277d7a18 Mesh Batch Cache: Port loose_edges to batch request 2018-12-18 22:17:53 +01:00
c29cd41f49 Edit Mode: Show loose edges if in draw type is wire 2018-12-18 22:17:53 +01:00
b655bf6363 Wireframe Overlay: Make use of colorTransform when transforming an object 2018-12-18 22:17:53 +01:00
2f00e0a37b Mesh Batch Cache: Cleanup / Reorder function for more consistency 2018-12-18 22:17:53 +01:00
Dalai Felinto
6fc840b87c Fix T58899: Eevee - Material Index missing from panel 2018-12-18 18:39:50 -02:00
5e4677c962 Workbench: Fix crash when sculpting with a multi material mesh 2018-12-18 20:51:52 +01:00
604101d262 Mesh Batch Cache: Port edge_detection to batch request
Also add proper support for mapped meshes (deformed by modifiers in edit
mode). So this fixes the shadows of workbench in edit mode.
2018-12-18 20:51:52 +01:00
99fb654ffd DRW: Cleanup / Renaming of mesh batch cache functions
THis is in order to avoid the jungle of names being different at each
step of the API.

Also removes some unused functions.
2018-12-18 20:51:52 +01:00
df88b6a48d Mesh Batch Cache: Port all_edges batch to batch request 2018-12-18 20:51:52 +01:00
45e1d4d9ac DRW: Fix flat object not being selectable in wireframe view
The problem was double. They were not selectable in wireframe view and
they would not display with the right color, thus always appearing
un-selected.
2018-12-18 20:51:52 +01:00
6e5b573dc8 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/transform/transform_conversions.c
2018-12-18 20:33:04 +01:00
1875f9e7d7 Fix T59104: Snapping: Align rotation to target broken in edit mode.
This has been unbelievably painful to understand... And solution is only
partially good actually, we may even want a single axis for all the
islands in that case? But for now this is giving much better results
already, compared to the random crazyness it used to produce.
2018-12-18 20:27:50 +01:00
5638db7495 Fix T58335: Grease Pencil Objects in Edit Mode have transform gizmos in wrong location
Original fix P874 with changes from @brecht
2018-12-18 19:18:57 +00:00
Dalai Felinto
74b3b81903 Potential fix for sculpt mask diffuse color drawing update
The sculpt mask diffuse color is not working right now. But when it does it
should follow on the fix for the sculpt mask drawing update (e113b402bd).
2018-12-18 16:48:03 -02:00
Dalai Felinto
e113b402bd Fix Sculpt mask enable/disable does not update drawing immediatelly
Reported as part of T59576.
2018-12-18 16:36:58 -02:00
1ca7b6ca85 Fix T59569: crashes when generate rig.
The fix in 9fa408f51b missed one place that needed the
check, causing the assert because of incomplete data.
2018-12-18 19:52:13 +03:00
0d979b8e6f Fix for T59325. Constraint to Fcurve in Motion Tracking was broken
The check was wrongly ported from querying selection to setting selection.

Reviewers: sergey, brecht

Subscribers: brecht, ElDirector

Tags: #motion_tracking

Differential Revision: https://developer.blender.org/D4074
2018-12-18 17:50:49 +01:00
12d6c13899 GP: Primitive: Fix flickering when using a noise brush
Previously, the random values were generated every draw, now they are generated once.
2018-12-18 15:51:46 +00:00
e62368e6c4 Fix enum icon button size for fractional UI scale.
Err on the side of too much padding.
2018-12-18 15:30:19 +01:00
Harley Acheson
0497ecd5bc Fix edit mesh component buttons width not being consistent.
Differential Revision: https://developer.blender.org/D4087
2018-12-18 15:30:19 +01:00
5fa749ace2 Fix T59536: safe area values were swapped
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4097
2018-12-18 15:20:42 +01:00
37c2382a49 Merge branch 'master' into blender2.8 2018-12-18 15:10:35 +01:00
8c4ae8961c Fix T59564: Huion pen pressure not working on Linux, after recent changes. 2018-12-18 15:07:04 +01:00
Daniel
72456ee198 Fix T59009: UV unwrapp correct aspect fails on some shapes.
Differential Revision: https://developer.blender.org/D4095
2018-12-18 15:07:04 +01:00
d542e55b09 Fix T55105: Smoke Emission from particles was ignoring lattice deformer
on the particles
2018-12-18 14:58:04 +01:00
d4dcad0ad6 Fix crash with armature custom bone in wireframe mode 2018-12-18 14:51:05 +01:00
8e08e323a7 Fix T59484: Particles Lattice deform fails
this was working for object/collection display/render but lattice was
not taken into account for non object/collection display/render types
(halo, axis, cross, circle, ...)

Reviewers: sergey, brecht

Maniphest Tasks: T59484

Differential Revision: https://developer.blender.org/D4096
2018-12-18 14:39:45 +01:00
8839152abf Fix T59529: Auto smooth not working 2018-12-18 14:27:13 +01:00
6ccf961915 Fix T59478: Information Bar Missing Data when in Sculpt Mode
Display statistics from CCG structure.

This makes values to be different from what is shown in object
mode, since CCG is operating on individual grids, and object
mode will stitch those grids. But on another, those values from
CCG is what sculpt mode is actually "sees" or "uses".

The number of faces should be the same in both sculpt and object
modes.
2018-12-18 14:22:12 +01:00
eb78579bb6 Correct own error in changes to pose gizmo center
Multi-pose gizmo center calculation from
5d09f5223e now works as expected.
2018-12-18 23:03:29 +11:00
c92cffb56d DRW: Instance: Makes it possible to have instances of a non-init batch 2018-12-18 13:08:17 +01:00
77d9ddc5ea Armature: temp workaround for crash caused by custom bone drawing 2018-12-18 13:08:17 +01:00
604f5cf3f4 Cleanup: Typo in comment 2018-12-18 12:55:13 +01:00
486be2219a Use proper buffer size for statistics 2018-12-18 12:54:49 +01:00
e6c531353b Cleanup: Reduce indentation level 2018-12-18 12:54:49 +01:00
4046e55f77 Transform: calculate initial depth for axis-target
While the operator needs a depth to work as intended,
it feels buggy if the initial drag does nothing until a depth is found.

If the cursor isn't over any geometry calculate an initial depth.
2018-12-18 22:43:35 +11:00
2dee1772e1 Py Docs: documentation for draw_handler_add/remove 2018-12-18 12:31:37 +01:00
cef41d0144 Fix T59496: Movie Clip Editor does not display metadata 2018-12-18 12:28:44 +01:00
a3e4c333b9 Transform: when snap affect is off for a transform mode, ignore snap settings entirely.
Ref D4022.
2018-12-18 12:14:38 +01:00
e5c6dd3964 Fix crash showing footage information for non-animation movie clips 2018-12-18 12:06:40 +01:00
f71ae30962 Fix edit-mode wire color being used for other objects 2018-12-18 21:21:48 +11:00
d3e1b043c3 Fix T59548: Grease Pencil Primitives ignore the 'draw below' option 2018-12-18 10:44:35 +01:00
787660e15a Gizmo: exclude overlays from origin-set depth
Setting the light orientation would read depth from the light wireframe.
2018-12-18 20:33:16 +11:00
b4d625c88e Fix 3D view depth buffer ignoring overlay option
The depth buffer would include lamps, cameras.. etc
event overlays turned off.
2018-12-18 20:25:19 +11:00
c8e37f70dd Fix T59519: Grease Pencil stroke with noise modifier crashes blender
The first point index was wrong calculated.
2018-12-18 10:24:21 +01:00
9c97170bba Theme: too low contrast blender_light edit-edge
We tried this already for the default theme, but grey edges often don't
stand out against matcaps/solid shading.
2018-12-18 18:22:42 +11:00
9f25dad0a9 Fix T59535: Select linked delimit doesn't refresh 2018-12-18 17:22:11 +11:00
23383910ec Missed when renaming tool settings 2018-12-18 16:40:48 +11:00
372fd07a8e Fix paste/append w/ local-view
Paste in local-view wasn't setting local-view bits.
2018-12-18 16:23:38 +11:00
afc4cd1e67 Cleanup: python quotes 2018-12-18 15:02:49 +11:00
7721886ead Fix T53544: Crash drawing scene w/o world 2018-12-18 13:56:26 +11:00
ac80ceae77 Correct missing NULL check in recent commit 2018-12-18 13:49:09 +11:00
7e9f76944c Fix T59461: Follow active quad asserts 2018-12-18 13:35:43 +11:00
08f15433ba GPencil: Cancel w/ RMB click
RMB is used to cancel almost everywhere in blender, not confirm.
2018-12-18 13:03:34 +11:00
7eaa0b1797 Fix T59366: gpencil eraser shows w/ shape tool 2018-12-18 13:00:57 +11:00
a68edaf11d Mesh Batch Cache: Port vertex paint surface to batch request 2018-12-18 02:19:52 +01:00
bcf390a6c3 Mesh Batch Cache: Port weight paint surface to batch request 2018-12-18 02:19:52 +01:00
8ded149bfc DRW: Polygon Offset: Also offset lines and points 2018-12-18 02:19:52 +01:00
6a1315d6e7 Weight Paint Overlay: Refactor wire drawing
This reduce the number of batch/data needed. Stores a select/visiblee
flag inside the vert/loop normals.
2018-12-18 02:19:52 +01:00
4fceaf3848 Fix gizmos showing for non-visible objects
Active object gizmos were showing even when the object wasn't visible
(local view or with their object type disabled).
2018-12-18 11:59:29 +11:00
7aeb24e037 Fix multi-object state on load
D4091 by @zazizizou
2018-12-18 10:22:42 +11:00
879c966598 Transform: option to use incremental snapping
This resolves this issue where users would enable a snapping mode
besides incremental (vertex for eg), then notice strange behavior w/
rotate and scale.
While this ability can be useful, it's quite an obscure use case.

Now changing snap-modes keeps rotate and scale using incremental snap,
with the option for these modes to be affected by other snapping modes.

D4022 by @kioku w/ own minor edits.
2018-12-18 10:08:23 +11:00
William Reynish
779e252298 UI: use icons for text edit copy/paste 2018-12-18 08:41:06 +11:00
William Reynish
7312e48ae4 UI: Extend context menu to check current selection
- This extends context menus, checking the selection in some cases
  to conditionally show operators.

- When nothing is selected, add, paste .. etc are added to the menu.

- Use columns when mixed mesh modes are used (vert/edge/face).

- Move armature naming operators into sub-menu.

See D4043
2018-12-18 08:12:11 +11:00
54f9e142df RNA: Add Mesh.count_selected_items()
Needed for context menu checks.
2018-12-18 07:36:29 +11:00
Sebastian Parborg
1eafa91f64 Fix T59424: color wheel snaps to center, losing hue when value is zero.
Differential Revision: https://developer.blender.org/D4090
2018-12-17 19:18:16 +01:00
f6a77a759b Fix error when Blender starts - variable not initializated 2018-12-17 19:09:27 +01:00
08e6948da5 GP: Change order of primitive buttons
Group them in a more logic way.
2018-12-17 19:03:46 +01:00
144178bacf DRW: Fix vertex paint using original object for batch cache 2018-12-17 17:11:45 +01:00
4cd558b711 Mesh Batch Cache: Port Texture paint wires to new batch request 2018-12-17 17:11:45 +01:00
7ac49a07c6 Mesh Batch Cache: Port Texture paint batches to new batch request 2018-12-17 17:05:57 +01:00
9bb70e59b8 Curve Batch Cache: Fix issue with cd_used
cd_used needs to be the combination of generated data.
2018-12-17 17:05:57 +01:00
36cc42e796 Mesh Batch Cache: Optimization & Refactor shaded surface support
This now only upload data per loops to the GPU, making use of index buffer
to draw polygon. This make use of the vertex cache, speed up renders
and saves a lot of vram.

Update performance is also slightly faster and can even be improved further
by updating only uvs or vcol independently.

This commits breaks texture paint batches. It will be added back in another
commit.
2018-12-17 17:05:57 +01:00
bc74e48680 Fix T59373: Background Colors don't match in Workbench renderer 2018-12-17 17:05:57 +01:00
29877fb1a4 Workbench: Fix srgb texture not being color managed in texture color mode 2018-12-17 17:05:57 +01:00
0d511e05d3 Cleanup: Fix typo in comment 2018-12-17 16:34:08 +01:00
4f220cd1cd GP: Change Primitive manipulator to secondary Gizmo color 2018-12-17 16:26:25 +01:00
37d09827c6 Fix T59112: bone pinning error
Reviewers: angavrilov, brecht

Maniphest Tasks: T59112

Differential Revision: https://developer.blender.org/D4057
2018-12-17 15:13:29 +01:00
6dcf788d12 Fix T59493: view selected in GP edit mode does not take obmat into account 2018-12-17 15:03:20 +01:00
9b80c70fc5 GP: Change Primitive manipulator color 2018-12-17 14:48:10 +01:00
bb58354232 Fix T59490: wrong curve handle lines 2018-12-17 14:34:32 +01:00
ce3d00b9b7 Fix T59404: Mistake in recent EdgeHash refactor broke edge generations in mesh validate code. 2018-12-17 14:28:29 +01:00
60a5559b6c Correct modifier stack validation 2018-12-17 12:44:48 +01:00
86e6901662 Fix T59172: Blender 2.7x keymap error when setting pivot point
- only call pivot/orientation pies in non-legacy mode (had duplicate
entries)
- space_data.pivot_point > tool_settings.transform_pivot_point

Reviewers: brecht

Maniphest Tasks: T59172

Differential Revision: https://developer.blender.org/D4088
2018-12-17 12:42:47 +01:00
a84c823b89 Fix T58652: Crash editing shape keys weirdness with instances
This is a second attempt to get the crash fixed. The original fix
worked, but it was reverted by d3e0d7f082.

Now the logic goes as:

- All pointers which we can not have shared (the ones which are
  owned by the runtime) are cleared.
- The rest of runtime stays untouched.

This seems to be enough to keep particles happy.
2018-12-17 12:33:37 +01:00
dcc11360c6 Remove some files restored in Game Engine
Most likely was caused by bad resolution of recent merge conflict.
2018-12-17 11:53:54 +01:00
7d36a2a775 Fix T59483: Grease Pencil Additive Drawing mode doesn't work with shapes 2018-12-17 11:34:50 +01:00
b253fe4d1b Eevee: Change Bent normal calculation
This changes the bent normal effect to be a bit more subtle.
I also tuned down the bent normal blending factor so mesh faceted look may
appear more in occluded regions. this is to increase the fidelity of the
indirect lighting. This blending might be a parameter in the future.

Based the calculation on "Bent Normals and Cones in Screen-space"
by O. Klehm, T. Ritschel, E. Eisemann, H.-P. Seidel
2018-12-17 09:54:24 +01:00
99457dd981 GPU: Add Intel HD Graphics 530 to the list of buggy intel gpus 2018-12-17 08:56:38 +01:00
30a0f1a2bf Workbench: Use int to fix compilation issues on certain platform 2018-12-17 08:47:37 +01:00
b322ce0847 Context: add objects_in_mode(_unique_data)
Needed for Python to easily support multi-object edit/pose modes.
2018-12-17 17:55:18 +11:00
8ec7429a70 Merge branch 'master' into blender2.8 2018-12-17 17:32:42 +11:00
42b9df5907 Cleanup: use 'tool_settings' name everywhere in UI scripts 2018-12-17 17:22:50 +11:00
7fac1bfc20 Context: remove active_gpencil_brush
We don't have this for other painting modes,
no need for a special case here.
2018-12-17 17:17:43 +11:00
c73958a100 Theme: use grey for blender_light inactive menu text
There wasn't enough difference between labels and menu item text which
could be selected.
2018-12-17 16:52:06 +11:00
a2a39bada2 Theme: use black for blender_light view-overlay
Cursor axes & transform guide contrasting w/ background was too low.
2018-12-17 14:55:19 +11:00
21c1c3c59c 3D View: empty image option to show front/back
Only back was possible.
2018-12-17 14:49:16 +11:00
365ef09815 Correct error in last commit 2018-12-17 14:46:18 +11:00
d72d2d4133 DNA: clear / remove deprecated flags
- Clear deprecated flags for ID's:
  Scene, Sequence, World, Object & Mesh.
- Clear deprecated flags for Spaces: outliner, 3D view & image.
- Remove unused `Mesh.drawflag`
- Remove unused `USER_ALLWINCODECS`, `USER_MMB_PASTE`.
- Remove `V3D_SOLID_TEX` & `V3D_ZBUF_SELECT` - used in a few areas.
- Flip `Object.empty_image_visibility_flag`
  (avoids do-version on each new flag)
- Rename 'Backside' -> 'Back' in context of drawing - showing 'Back'
  makes sense.
2018-12-17 13:55:06 +11:00
9149e89421 Merge branch 'master' into blende2.8 2018-12-17 10:25:40 +11:00
98f43ba3e4 Cleanup: use bit-shifted flag definitions in DNA 2018-12-17 09:55:47 +11:00
ea33b90a1b Fix T59446: Grease pencil mirror modifier wrong
The mirror was working different to mesh mirror and the result was not the expected.
2018-12-16 19:53:40 +01:00
fbed69866e GP: Add option to occlude eraser
This adds the functionality requested in T59417 adding a new button near of pressure button of the brush to enable/disable occlude effect for eraser.
2018-12-16 18:25:55 +01:00
c733062d27 GP: Primitive: Add curve tool icon
Thanks @billrey
2018-12-16 14:20:05 +00:00
cfa46ddf6c UI: initialize Overridable Static checkbox for custom properties. 2018-12-16 17:09:32 +03:00
1578ce46c5 GP: Fix Onion Skin slow performance
The number of vertex for VBO was not calculated for onion skin and made the realloc of memory very slow.
2018-12-16 12:19:20 +01:00
4488056f3d Theme: blender_light text editing colors were too similar
Make the background of text editing fields dark to contrast with
selection and the cursor, similar to T59219.
2018-12-16 11:27:01 +11:00
e01755033a Cleanup: theme right shift 2018-12-16 11:21:32 +11:00
41a3634f80 Theme: include new colors
No visible changes.
2018-12-16 11:19:26 +11:00
4b545d1bbf Fix T58975: "@=" operator silently fails
D4083 by @artfunkel
2018-12-16 09:49:00 +11:00
3e311fdcd1 Cleanup: style 2018-12-16 09:30:05 +11:00
73dd9c4d34 Fix string formatting, fall through attr 2018-12-16 09:23:07 +11:00
351f537fa8 GP: New Curve primitive and other primitive improvements
This commit adds support for new curve tool and adds more functionalities to the existing primitives, including new handles, editing, stroke thickness curve, noise, preview of the real stroke, etc.

Thanks to @charlie for his great contribution to this improvement.
2018-12-15 17:21:47 +01:00
f9917a8d43 Fix T59396 Grease pencil brush crash
The problem was the brush was not initializated because some code was missing (marked as ToDo)
2018-12-15 09:54:31 +01:00
b73529fafd GP: Add NULL checking for object 2018-12-15 09:36:08 +01:00
ba1f178c1c Fix T56185, T59351: bypass GL_PROXY_TEXTURE.. test on AMD GPU + windows
This replaces the test of consistency and capacity made with `GL_PROXY_TEXTURE_..` on AMD GPUs with one that checks only if the texture fits the limits of size and layer.

Differential Revision: https://developer.blender.org/D4081
2018-12-14 21:33:31 -02:00
Dalai Felinto
9fbada4a3b Fix T59388: Blender crash upon F3 command search in VSE
We may not have an active object depending on where the operator is called from
or well if we simply don't have an active object :)
2018-12-14 20:35:57 -02:00
Dalai Felinto
fa41350c72 UV pin: Use ID_RECALC_COPY_ON_WRITE instead of the almighty 0
I suppose the cow tag is more correct for those generic/non-specific
tags. Thank you Sergey.
2018-12-14 20:33:31 -02:00
Dalai Felinto
a63209e175 Fix T59381: UV editor - Pinned vertex missing update
Pinning doesn't really change the geometry, so we don't really have a
tag for this. Using '0' for now (same we use for Mark Seam).

I will check with Sergey Sharybin which flag to use instead.
We could use ID_RECALC_GEOMETRY to match the notifier, but even the
simpler ID_RECALC_SELECT would do it.
2018-12-14 19:53:07 -02:00
Dalai Felinto
2b7e56964a Fix UV editor missing/typo circle_select 2018-12-14 19:24:35 -02:00
de662e7cd3 NLA: insert keyframes correctly for strips with non-Replace mode.
NLA strips support using the keyframe values in a variety of ways:
adding, subtracting, multiplying, linearly mixing with the result
of strips located below in the stack. This is intended for layering
tweaks on top of a base animation.

However, when inserting keyframes into such strips, it simply inserts
the final value of the property, irrespective of these settings. This
in fact makes the feature nearly useless.

To fix this it is necessary to evaluate the NLA stack below the
edited strip and correctly compute the raw key that would produce
the intended final value, according to the mode and influence.

Differential Revision: https://developer.blender.org/D3927
2018-12-14 22:19:18 +03:00
Dalai Felinto
fc74903f27 Fix T59322: View Layer - Search not working
Basically uiRNACollectionSearch->but_changed was always NULL for the
search templates. So skip_filter would always be true, and we would
never filter.

An alternative fix would be to add the following to the begin of
`template_search_add_button_searchmenu`:
```
static bool always_true = true;
template_search->search_data.but_changed = &always_true;
```
2018-12-14 17:09:29 -02:00
f6f46accfe GP: Added keymaps for Sculpt select
Still T58986 not fixed.
2018-12-14 19:13:53 +01:00
7bf6a9ee94 GP: Fix missing changes after rename CTX
Thanks to Charlie Jolly for find the bug.
2018-12-14 19:07:30 +01:00
ac68f44b8a fix shader editor errors when showing world shader tree
probably an oversight in rBd40bffa17f6d

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4079
2018-12-14 19:01:22 +01:00
ccc09ec124 Merge branch 'master' into blender2.8 2018-12-14 17:40:27 +01:00
4e3562f45a Dependencies builder: Don't rely on system-wide PugiXML 2018-12-14 17:39:38 +01:00
d3e0d7f082 Fix broken particle distribution after recent fix 2018-12-14 17:33:54 +01:00
c7cc97c7b9 Fix wrong color in center of HSV circle picker, after recent changes. 2018-12-14 17:29:41 +01:00
Sebastian Parborg
17905e89a7 Fix T59358: Wrong status bar keymap for release confirms and right click select.
Differential Revision: https://developer.blender.org/D4077
2018-12-14 16:59:49 +01:00
98f6f7bc78 Fix T59182: Blender 2.8 win64 crashes on start 2018-12-14 16:53:45 +01:00
780f0f646d GP: Rename CTX and OB modes
Part of T59335.
2018-12-14 16:52:12 +01:00
a1c8595b09 Edit Curve: Add Normal size in overlay popover and change default range
Change default range to 0..2 to improve the slider behavior.
2018-12-14 16:35:51 +01:00
f371e633f9 Curve Batch Cache: Add support for loose edges and curve/surf modifier
Fixes T58298 Nurbs circle and curve dont draw in objectmode
Fixes T58107 Modified curves/surfaces/fonts do not show their eval mesh
2018-12-14 16:17:29 +01:00
e4b3fe4b69 Wireframe: Fix wireframe color in edit mode for surfaces 2018-12-14 16:17:29 +01:00
f37e45c26b DRW Batch Cache: Fix hack being a bit too much hacky 2018-12-14 16:17:29 +01:00
531e5ad49a Displist: Reuse tesselated pos and nor for wireframes
This lower the memory usage and also fix a bug with metaballs normals/tris
winding being reversed.
2018-12-14 16:17:29 +01:00
18d0566013 Curve Batch Cache: Add back support for shaded geometry
This changes a bit the batches data structure. Instead of using one
vbo per material we use one for all material and use index buffers for
selecting the correct triangles.

This is less optimized than before but has potential to become more
optimized by merging the wireframe data vbo into the shading one.

Also the index buffers are not strictly necessary and could be just
ranges inside the buffer. But this needs more adding things inside
GPUIndexBuf.
2018-12-14 16:17:29 +01:00
c09913e9dd GPUBatch: Add GPU_batch_clear to clear batches without freeing 2018-12-14 16:17:29 +01:00
0ee0f0ebf6 Wireframe: Fix Object Viewport display "all edges" options not working 2018-12-14 16:17:29 +01:00
2afed99da3 Curve Batch Cache: Rework Implementation to use new batch request
Shaded triangles are not yet implemented (request from gpumaterials).

This also changes the mechanism to draw curve normals to make it not
dependant on normal size display. This way different viewport can
reuse the same batch.
2018-12-14 16:17:29 +01:00
77164e30c7 DRW: Simplify text edit drawing
This is to simplify the curve batch cache.
2018-12-14 16:17:29 +01:00
49287b34a2 GPUBuffers: Fix uninitialized memory use causing undefined conditional jump 2018-12-14 16:17:29 +01:00
f85b05111f Fix T59334: Crash initializing crazyspace on object with subsurf and displacement 2018-12-14 16:07:59 +01:00
233b780635 UI: show frame rate in movie clip editor
Feature Request from Hjialti.
2018-12-14 15:34:48 +01:00
e67f7e922c Attempt to sanitize node tree deletion
Make it explicit when freeing node tree which is owned by other
ID or when freeing node tree which is outside of a bmain.
2018-12-14 15:29:16 +01:00
1e18efa1df Fix T59220: Deleting object causes blender 2.8 to crash
The issue was caused by a special code in node tree freeing function
which will free extra fields in the case when tree is not in bmain.
This is how old code was dealing with "nested" trees, but is now
making behavior different from other datablocks. This is exactly
what was confusing copy-on-write logic.

Ideally, ntreeFreeTree() need to behave same as all other datablocks,
ad freeing of data of nested trees should be up to the owner of the
tree (this way it's all explicit and does not depend on check of
some special flag.
2018-12-14 14:53:29 +01:00
e54182427a Merge branch 'master' into blender2.8 2018-12-14 14:50:47 +01:00
0658d047a9 CMake: Fixes for OpenGL library preferences
Prefer legacy OpenGL library, for the compatibility and portability
reasons.

Also use proper OpenGL libraries to be linked against, so we can
change preference to GLVND.
2018-12-14 14:48:05 +01:00
9d4ab3fe58 Fix T59365: Blender crashes when I try to open a .blend file.
Broken logic in check for a valid vgroup storage pointer...
2018-12-14 14:44:20 +01:00
c1adf86a2e fix relationship line always drawing from the parents origin
this can be different though (e.g. vertex parenting) and correct location
is already stored in ob->orig

spotted while looking into T59332

Reviewers: fclem, brecht

Differential Revision: https://developer.blender.org/D4076
2018-12-14 13:27:49 +01:00
Dalai Felinto
0e76ff18b5 Fix T58351: Make Single User crashes 2018-12-14 09:20:56 -02:00
Dalai Felinto
dc4c1be1a4 New object API function : BKE_object_eval_reset()
This restores the object->data to a non-modifier evaluated state.

So this allow us to change evaluated object modifier stack directly and
get BKE_mesh_new_from_object() for the evalauted object.
2018-12-14 08:45:54 -02:00
Dalai Felinto
10508338d8 Build fixup for previous commit
Build error introduced on: 285cfef695.
2018-12-14 08:39:53 -02:00
7e6288cfe6 Fix T58652: Crash editing shape keys weirdness with instances 2018-12-14 11:33:18 +01:00
Dalai Felinto
285cfef695 Fixing crash with cycles baking with is_cage and no cage 2018-12-14 08:31:24 -02:00
21523b5c86 Transform: remove incorrect 3D view check 2018-12-14 16:59:26 +11:00
f4c70a35a2 UI: tweak text editing fields for higher contrast
By default the text button background color was a similar brightness
to the cursor, making it hard to see at times.

Button types number/slider/text background brightness when editing
varied quite a lot too.

- Change the background while editing to match the number button.
- Darken the selection for greater contrast.

Resolves T59219
2018-12-14 15:09:32 +11:00
9e82499d2d Fix T59347: Crash drawing empty image 2018-12-14 14:13:59 +11:00
fb685c01c3 Correct error in last commit 2018-12-14 13:23:02 +11:00
be0c8ed734 Keymap: correct keymap names
Generated names include the current context mode
which is irrelevant for generic 3D view tools.
2018-12-14 12:17:00 +11:00
82a53481ee Keymap: only use double-click MMB w/ LMB select 2018-12-14 12:01:27 +11:00
f13a4b2f12 Fix mesh select path not updating the gizmo 2018-12-14 11:55:29 +11:00
9bac172a79 Merge branch 'master' into blender2.8 2018-12-14 11:39:39 +11:00
f0a481eebd Fix selection history clearing when selecting all 2018-12-14 11:38:02 +11:00
0f7c60c576 Merge branch 'master' into blender2.8 2018-12-14 11:15:24 +11:00
11a242dea1 Missed last commit 2018-12-14 11:14:57 +11:00
dd4c87cd04 Merge branch 'master' into blender2.8 2018-12-14 11:09:42 +11:00
aa3c4b4cb6 Missed last commit 2018-12-14 11:06:34 +11:00
6e2d9ef2db Cleanup: naming (mean -> median) see T47811 2018-12-14 10:54:11 +11:00
aca13040da Cleanup: naming 2018-12-14 10:34:12 +11:00
948256442b Fix T59337: Camera visual aids ignore overlay 2018-12-14 10:18:01 +11:00
9ea645862c Preferences: add option for header position
Sets the header position for newly created windows with few exceptions
(preferences is always bottom, file-selector is always top).
2018-12-14 09:54:34 +11:00
dfa3e0ae81 Fix compiler error 2018-12-14 09:54:34 +11:00
c7a31bad9f GP: Add Subdivide Smooth option 2018-12-13 23:31:57 +01:00
26c8e09cff Fix T59137: Prefs moves header to bottom
Only use a new spaces header alignment when no previous header exists.
2018-12-14 09:09:41 +11:00
cb6d018ec9 Fix T57724: Opening file browser flips user-prefs header 2018-12-14 08:43:14 +11:00
d6225c9caa Merge branch 'master' into blender2.8 2018-12-14 08:14:52 +11:00
e961c1244c Fix typo in context docs. 2018-12-14 08:13:55 +11:00
cb5d23b544 UI: show workspace cycling key bindings in menu 2018-12-14 07:56:19 +11:00
7d3b1cdd7d GP: New Smooth operator
Smooth a stroke, in edit mode, similar how mesh operator works with meshes.
2018-12-13 19:49:13 +01:00
a7b3d58066 Fix T58014, T58650: issues with hex color and Filmic view transform.
Hex color values are now always in sRGB space, as would be expected by
most other applications. Previously they were in display space and using
the view transform.
2018-12-13 19:25:47 +01:00
f527ce5b2f Color management: add OCIO aware utility functions for transform to/from XYZ. 2018-12-13 19:25:46 +01:00
6601a89650 Fix T58549, T56741: HSV color picker issues with Filmic view transform.
In 2d655d3 the color picker was changed to use display space HSV values.
This works ok for a simple sRGB EOTF, but fails with view transforms like
Filmic where display space V 1.0 maps to RGB 16.292.

Instead we now use the color_picking role from the OCIO config when
converting from RGB to HSV in the color picker. This role is set to sRGB
in the default OCIO config.

This color space fits the following requirements:

* It is approximately perceptually linear, so that the HSV numbers and
  the HSV cube/circle have an intuitive distribution.
* It has the same gamut as the scene linear color space.
* Color picking values 0..1 map to scene linear values in the 0..1 range,
  so that picked albedo values are energy conserving.
2018-12-13 19:25:45 +01:00
33993c056a Speedup: new OldNewMap implementation for file loading
In production files that use a lot of linking I measured loading speedups between 5% and 18%. In files that use less linking the speedup might not be noticeable at all, but it should not be slower.

Reviewer: brecht

Differential Revision: https://developer.blender.org/D4038
2018-12-13 15:31:30 +01:00
fdab9a8ed1 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-13 07:01:00 -07:00
756c99b504 deps: add missing sqlite dll to windows build. 2018-12-13 06:59:37 -07:00
b8cb08fa56 Merge branch 'master' into blender2.8 2018-12-13 14:32:32 +01:00
2947882bb1 Cycles: Update standalone app to OIIO 2.0 2018-12-13 14:31:38 +01:00
5b6cb2de9a RNA: revert recent rename 'updated' -> 'dirty'
Partially reverts 45fdf41be8 & 6d38d82437,
added comment why term 'updated' is used in this case.
2018-12-13 23:19:01 +11:00
a3375729f8 Cleanup: macro hygiene, style, doxy comments 2018-12-13 23:04:14 +11:00
54fa78a048 BLI_edgehash: assert when edges use the same vert
This was removed on the recent upgrade.
2018-12-13 22:46:17 +11:00
a4afbe1153 GP: Cleanup const variables 2018-12-13 12:41:46 +01:00
1616c7c538 Fix error in recent key-item filtering
Grouping flags makes it impossible to exclude only modifiers for eg.

Fixes T59303
2018-12-13 22:39:15 +11:00
5cc015f0ad Fix force fields not affecting rigid bodies
This fixes part of T58991.
Still need to add proper relations so that point cache is marked as outdated
when effectors are modified.
2018-12-13 12:34:35 +01:00
Dalai Felinto
4d395a34dc Silence warning (const) 2018-12-13 09:18:17 -02:00
0c011fd689 GP: Missing change of texture format in previous commit 2018-12-13 12:19:06 +01:00
ae5f19e32a Fix T59125: Outliner does not show view layer count
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4060
2018-12-13 11:52:27 +01:00
6c39ea27c8 GP: Create Framebuffer textures only if needed
Now, if there aren't grease pencil objects, the textures and framebuffers are not created. This unload GPU Memory when not using GP.
2018-12-13 11:51:41 +01:00
715ab529f1 GP: Changes textures from DEPTH24_STENCIL8 to DEPTH_COMPONENT24
As we are not using stencil info, we don't need this in the texture.
2018-12-13 11:51:41 +01:00
aa63a87d37 BLI: New Edgehash and EdgeSet implementation
The new data structure uses open addressing instead of chaining to resolve collisions in the hash table.

This new structure was never slower than the old implementation in my tests. Code that first inserts all edges and then iterates through all edges (e.g. to remove duplicates) benefits the most, because the `EdgeHashIterator` becomes a simple for loop over a continuous array.

Reviewer: campbellbarton

Differential Revision: D4050
2018-12-13 11:21:31 +01:00
cef2a25518 Armature Edit Mode: improve box/lasso select
Mostly rewrite logic which now matches (de)select picking,
share between both operators.

- Support all selection operations (eSelectOp), fixes T59255.

- Add function that selects using 'BONESEL_*' flags & eSelectOp.
  This avoids lasso & box select having to handle selection flushing.

- Fix strange behavior with lasso where selecting a bone in a chain
  would only select the tip (from 2.7x).
2018-12-13 21:11:21 +11:00
e79d7747d2 Cleanup: use doxy grouping for view3d select
Easier to navigate, avoid mixing up functionality across the file.
2018-12-13 13:04:25 +11:00
7d4d9e9dbd Cleanup: style 2018-12-13 12:30:38 +11:00
3b95b521fc Cleanup: replace ifdef w/ stub 2018-12-13 12:21:45 +11:00
5d09f5223e Gizmo: multi-object pose-mode gizmo positioning 2018-12-13 11:41:45 +11:00
81ea815dcb Gizmo: use general active center calculation
There are some minor differences in center calculation but I don't think
they're important, if so we can update the code.

- Edit-bone uses head (instead of the middle when both are selected).
- Edit-bone flag for restricting components uses the selection instead
  of the active bone.
2018-12-13 10:51:37 +11:00
0835c224ba Cleanup: de-duplicate active item center access 2018-12-13 10:41:03 +11:00
8a804d5da7 Templates: remove redundant directory init
This is now handled when versioning all startups.
2018-12-13 07:22:22 +11:00
8c08efd1f7 Fix building w/o bullet 2018-12-13 06:38:55 +11:00
9c5d104224 Fix T59248: Crash in Grease Pencil Edit mode when adding Annotation 2018-12-12 19:48:24 +01:00
80ad2f8cf6 Fix (unreported) Broken rigidbody requirements when adding objects to a RB collection.
We have to ensure objects get expected RB data, when they are added to a
RB collection...
2018-12-12 17:21:37 +01:00
4e0291f185 Fix T59208: Error when loading reference/background image in edit mode 2018-12-12 16:39:00 +01:00
10eb92035c Fix T59234: Crash when enter in Edit mode
Edit mode triangles does always need to have access to faces for visibility
and select/active flags.
2018-12-12 15:19:21 +01:00
cf92795953 Mesh Batch Cache: Fix crash when using edit mode normal display. 2018-12-12 15:19:21 +01:00
b60aedc14c Fix T58450: Skin modifier not working if applied after subsurf 2018-12-12 15:07:03 +01:00
879e5cde64 Fix transform gizmo showing with active element pivot point and no selection.
It should be possible to use this when the active element is unselected, but
there still needs to be something else selected. Otherwise it is not possible
to deselect all as a way to get the gizmo out of the way.
2018-12-12 15:02:30 +01:00
b01852f20a UI: use consistent subdivision modifier name when creating from shortcuts. 2018-12-12 13:27:50 +01:00
eedd679ef2 Point API doc to proper path.
We'll have to update that again once we move 2.8 to master...
2018-12-12 12:29:58 +01:00
91c9be7df3 Merge branch 'master' into blender2.8 2018-12-12 12:04:17 +01:00
047d7d3b57 Fix T59213: Application menu links to outdated version of Python API.
Somehow those links were forgotten when we renamed API doc to simpler
names last year...
2018-12-12 11:56:25 +01:00
4357fb63db Keymap: event type filter w/ finding keymap items
Now its possibly to ask for only keyboard/mouse/ndof events
when finding key map items.
2018-12-12 21:43:26 +11:00
adaadb2fa0 Fix T59133: Area light size not updating from viewport gizmo.
When we are directly affecting DNA, we need to handle update ourself...
2018-12-12 10:44:39 +01:00
f2796da2e5 PyTemplates operator_modal_timer: update to 2.8
use keyword argument

Fixes T59232
2018-12-12 09:36:46 +01:00
e3122d3414 startup: default file selector to a useful path
Was initialized to '/home/', use BKE_appdir_folder_default instead.
2018-12-12 16:51:44 +11:00
bbb71ccbde Fix action-zones showing up as shortcuts
Toggle fullscreen area for eg, was showing the action-zone instead of
the key binding.
2018-12-12 15:52:34 +11:00
768e69eb37 Keymap: refactor keymap item find logic
Pass a function to filter items to allow lookups to be more selective.
2018-12-12 15:35:47 +11:00
4ae68d6825 Fix T59170: Box select ignores modifiers-keys once tool option is set
- Key-map items properties now override tool-options
  so modifier keys can have different behavior to the default action.

- Box & circle select now have `wait_for_input` properties
  instead of detecting this based on selection options being set or not.
  This relied on the key-map setting properties which may need to be
  initialize from the tool settings.
2018-12-12 14:26:43 +11:00
49490e5cfb Merge branch 'master' into blender2.8 2018-12-12 13:02:09 +11:00
e757c4a3be Cleanup: use colon separator after parameter
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
2018-12-12 12:50:58 +11:00
16fc62e15f Docs: correct doxy comments 2018-12-12 12:18:52 +11:00
805bf5d602 Keymap: add Shift-F1..3 editor shortcuts
Some frequently used editors didn't have F-key access.
2018-12-12 11:39:52 +11:00
b87b6e8e28 Fix T59211: Edit-mesh display crashes
Caused by ae1f563899
2018-12-12 11:16:56 +11:00
Dalai Felinto
6871402614 Fix Cycles baking active/cage
Basically what we address here is to make sure the active object and the cage
are not interferring with the baking result (e.g., when baking Combined).

To do so, we take advantage of the fact that we create our own depsgraph
for baking. So now we can change the cowed objects, instead of the
original ones.

Note: There is still a way to get a crash. If you try to bake from
selected to active when is_cage, but with no cage object, we get an
assert:

```
BLI_assert failed: //source/blender/blenkernel/intern/DerivedMesh.c
mesh_calc_modifiers(), at
(((Mesh *)ob->data)->id.tag & LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT) == 0
```

We can bypass this by passing ob_low instead of ob_low_eval to
bake_mesh_new_from_object on object_bake_api.c:847 . But then the edge
split modifier change will take no effect.
2018-12-11 21:57:16 -02:00
174acd9ca3 Fix T59210: Measure tool crash w/o overlays/gizmos 2018-12-12 10:44:04 +11:00
ff108aac63 Fix rulers being removed on click 2018-12-12 10:04:24 +11:00
c0b7bdd38b Revert "Tweak UI message of Ruler tool."
This reverts commit 1bf0a4f4d0.

This is a bug, clicks shouldn't remove rulers since it's too easy
to accidentally click instead of dragging.
2018-12-12 09:52:52 +11:00
220ab6290e Fix toolbar key-accelerator w/ LMB select
Tweak events were masking hotkey access.

Reported in T55162
2018-12-12 09:40:37 +11:00
d1237d24ca Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-11 15:14:00 -07:00
ba8d6ca3dd dependencies windows: Replace pthreads-win32 2.9.1 with pthreads4w 3.0.0
maintenance seems to have stopped for pthreads-win32
2018-12-11 15:12:56 -07:00
5049322e62 GPUState: Change isolated glLineWidth usage to GPU_line_width 2018-12-11 23:05:36 +01:00
b7933cc601 GPUTexture: Add debug print for cubemap textures 2018-12-11 22:30:41 +01:00
70d38a996e GPUTexture: Fix memory statistics not working for Multisamples textures
and also output the vram footprint of the texture at the creation.

Also output the full texture memory usage if alloc fails.
2018-12-11 22:10:16 +01:00
c541f3abef DRW: Fix redundant texture creation 2018-12-11 21:25:17 +01:00
bf2e0c7598 GPUState: Remove glLineWidth warnings about size 0x0 2018-12-11 21:15:50 +01:00
0ba02c6e9e GPUTexture: Add debug output to check what texture was created 2018-12-11 21:15:50 +01:00
Harley Acheson
73b19bfb27 UI: fix enum icon buttons haveing different size.
The alignment makes it so the button edges overlap, now one pixel is removed
to account for this.

Differential Revision: https://developer.blender.org/D4063
2018-12-11 20:46:39 +01:00
Mal Duffin
4bf2530952 FFmpeg: enable multi-threaded encoding of multiple frames, for a ~20% speedup.
This enables ffmpeg to encode each frame in its own thread. However in most
cases Blender does not pass frames to ffmpeg fast enough to actually use the
more than two threads. In some tests the speed was measured to be about 20%.
If other parts of the video sequencer get optimized, this should improve.

Differential Revision: https://developer.blender.org/D4031
2018-12-11 20:44:10 +01:00
48a3f97b23 RNA: provide access to bone parent transform math from Python.
Applying the effect of bone parent is much more complicated than
simple matrix multiplication because of the various flags like
Inherit Scale. Thus it is reasonable to provide access to this
math from Python for complicated rest pose related manipulations.

The simple case of this is handled by Object.convert_space, so
the new method is only needed for complex tasks.

Differential Revision: https://developer.blender.org/D4053
2018-12-11 20:40:51 +03:00
4de5478409 Edit Mesh: Make edit cage stick to the mesh when possible
and correctly offset it when it's not possible, otherwise we get zfighting.
2018-12-11 18:21:12 +01:00
1b8e1bb635 DRW: Add polygon offset mode. 2018-12-11 18:18:36 +01:00
2a6bc4a82c Fix T58266 : Bottom half of meshes are transparent with eevee render 2018-12-11 16:21:17 +01:00
4d115f2159 Merge branch 'master' into blender2.8 2018-12-11 15:56:04 +01:00
66d8bfb85c Update code to be compatible with OIIO 2.0
There are some changes in API of OpenImageIO, but those are quite
simple to keep working with older and newer library versions.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4064
2018-12-11 15:50:02 +01:00
54e1d38157 Fix T59001: UV Editor - Crash when hiding all UVs while 3D view is open
and sync selection enabled

Reviewers: brecht

Maniphest Tasks: T59001

Differential Revision: https://developer.blender.org/D4066
2018-12-11 15:39:43 +01:00
eb83efb6d1 Implement BMesh.from_object
Fixes T59069

Reviewers: sergey, brecht

Maniphest Tasks: T59069

Differential Revision: https://developer.blender.org/D4065
2018-12-11 15:20:48 +01:00
f60018e425 Merge branch 'master' into blender2.8 2018-12-11 15:18:43 +01:00
84b02dc54a Cleanup: remove accidentally committed debug code. 2018-12-11 15:18:15 +01:00
ece109dd60 Cycles: Add strict assert when assigning input socket stack offset 2018-12-11 14:34:52 +01:00
b45b082531 Cycles: Remove old nasty workaround
It used to be used for some sort of ignoring automatically
generated bump nodes. But nowadays it causes one of the shaders
in Classroom demo file to be compiled wrong.
2018-12-11 14:34:52 +01:00
765795aed7 Fix macOS buildbot build, wrong CUDA version check. 2018-12-11 14:16:48 +01:00
39d24ffccb Cycles: Cleanup, indentation 2018-12-11 12:57:57 +01:00
d415b5c7b8 Fix crash in do-versions after recent changes
No one can simply go into a datablock before it was linked.
2018-12-11 12:44:29 +01:00
48225a4658 Proper fix for building without Bullet
Stick to an existing way of dealing with disabled feature.
2018-12-11 12:37:04 +01:00
49b5d45118 Fix T59174: Missing particles update 2018-12-11 11:15:12 +01:00
e4153946ad Fix T59005: no FCurve cleanup in the Timeline
as opposed to the 'real' Dopesheet e.g. keyframes were not merged when
placed on the same frame

Reviewers: brecht, aligorith, angavrilov

Maniphest Tasks: T59005

Differential Revision: https://developer.blender.org/D4061
2018-12-11 09:27:04 +01:00
d421f3cac8 Fix T53166: Shift click gizmo axis lock broken 2018-12-11 16:42:00 +11:00
c7ec1fa5e6 Cleanup: use BKE_object_* prefix for object API
Also minor style cleanup.
2018-12-11 15:09:09 +11:00
7fe3d1e7d7 Fix T57934: non-empty duplicators don't render
Convert non-empty duplicators to empties.
2018-12-11 15:02:58 +11:00
8216e9f8a2 DNA: version patch Camera.drawsize to twice it's value
Draw size represented half the actual size used.
2018-12-11 14:42:50 +11:00
42126bdf06 Merge branch 'master' into blender2.8 2018-12-11 14:05:16 +11:00
6bc828ed87 Fix T59161: Edge Rotate CW is CCW 2018-12-11 14:03:42 +11:00
53928f479c Gizmo: update camera ortho-size
This needs to be improved further,
for now it shows in the right location.
2018-12-11 13:19:44 +11:00
65b930af39 Merge branch 'master' into blender2.8 2018-12-11 13:10:56 +11:00
908b6d8be3 Fix T52051: Orthographic camera display size error
It was impractical to create a small orthographic camera with a usable
size in the view-port.

No longer scale the draw-size by ortho-size.
2018-12-11 13:05:32 +11:00
9a8b6d51c1 Fix T58850: NDOF navigation guide not shown 2018-12-11 12:35:18 +11:00
3dfbb72b29 Workbench: Fix shadow artifact caused by degenerate triangles
Fixes T58735 Incorrect workbench shadow from n-gons

This also optimize the degenerate triangle detection by searching if
their area is near 0.0.
2018-12-11 01:25:45 +01:00
a49fdbcc67 Fix building w/o bullet 2018-12-11 10:13:05 +11:00
8c8e9b5586 DRW: Deprecate / Remove DRW_STATE_STIPPLE_*
This was unused and used the old drawing paradygm
2018-12-10 23:17:20 +01:00
1d23024014 Object Mode: Make point clouds a bit less like uniform blobs
Also this display is optimized. It does not use blending and pixel discard.
Working with scanned data should be more pleasant with this.

A better option would be to use gl_FragDepth to have a better sense of
volume but this discards early depth test.
2018-12-10 23:17:20 +01:00
bfb9680e9e GP: Fix problems with stroke Caps
Now the start cap is done and during drawing the end cap is not set because needs to have a UV calculated and this is not done while drawing.
2018-12-10 20:18:45 +01:00
33785baafe GP: Set Brush default material when add new GP Object
Before the brush color was not set equal to object active color.
2018-12-10 20:18:22 +01:00
18d354a5eb GP: Remove Object Onion Skin switch
It was confusing to have two switches.
2018-12-10 20:18:15 +01:00
2debee96ec GP: Replace Clamp icon 2018-12-10 20:18:10 +01:00
b34ff01487 GP: Make Onion Skin ON as default RNA value 2018-12-10 20:18:00 +01:00
bcb5293b9b GP: Enable Object Onion Skin by default
Now, the main switchis on, and the layer onion skin is off.
2018-12-10 20:17:49 +01:00
9def295d57 Edit Mesh: Opti: Reduce max_vertices in geometry shader
This is a really small win that had been overlooked when optimizing the
shader.
2018-12-10 19:02:17 +01:00
0c3535df9f Edit Mesh: Fix edges poking through the verts points in xray/seethrough mode 2018-12-10 19:02:17 +01:00
8e37eb10a1 Edit Mesh: Make "fresnel effect" not transparent but mix between 2 colors
Alpha blending is causing too many issues.
Revert back to something simpler.
2018-12-10 19:02:17 +01:00
834bf357c8 Edit Mesh: Draw inner edge selected in vert edit mode if both verts selected
This only make the edge fully selected. There is still no gradient like in
2.79 when only one vertex is selected.
2018-12-10 19:02:17 +01:00
f7b558cbdc DRW: Batch Cache: Mesh: Port edit mesh batches to batch request method
This also do some renaming/cleanups.
2018-12-10 19:02:17 +01:00
ae1f563899 DRW: Batch Cache: Mesh: Port more batches to batch request method 2018-12-10 19:02:17 +01:00
1d92888ee8 DRW: Batch Cache: Add batch request system
This makes it possible for engines to ask for batches and only fill their
data after all engine populate functions have run.
This means that, when creating the batches data we already know all the
batches that are needed for this redraw and the needed data.

This allows for less redundant data preparation and better attrib masking.
Ideally, we should run all viewports populate function before executing
the batch construction but this is not the scope of this patch.

Conversion from the old request method will be progressive and both can
coexist (see uses of mesh_create_pos_and_nor()).
2018-12-10 19:02:17 +01:00
33cc3344a2 GPU: Make changes to GPUIndexBuf and GPUVertBuf to allow multithreading
This is a small change. We delay all gl calls at the first use of the
GPUIndexBuf / GPUVertBuf in order to be able to create multiple buffers
from different threads without having many gl contexts.
2018-12-10 19:02:17 +01:00
a99eb0ca68 GPU: Cleanup: Rename vbo to ibo for index buffers 2018-12-10 19:02:17 +01:00
f179ac9fc1 Fix T58932: Impossible to influence the particle system 2018-12-10 17:37:30 +01:00
9fa408f51b Fix T58928: New Action causes crash when duplicating bone
Basically, armature update is not supposed to be run in edit mode.
This worked in master and new dependency graph because nobody was
tagging armature for an update.

But with all those copy-on-write and other things we can't ensure
tag doesn't happen (and we shouldn't). So now we ensure unwanted
code is not run from the code itself.

P.S. Deeper reason of this goes to the optimization of not updating
pose channels when in edit mode. Since pose doesn't define anything
there we don't want to be bothered with a pose update after every
operation which changes it.
2018-12-10 15:59:15 +01:00
d7e7c4ddf7 Cycles: Restore properties in the interface
They got lost in one of the merges it seems.
2018-12-10 15:54:45 +01:00
5bd485844c Cleanup: Variable naming 2018-12-10 15:54:45 +01:00
1bf0a4f4d0 Tweak UI message of Ruler tool.
It's much simpler to just click on one end, than dragging it outside of
view. ;)

Related to T59084.
2018-12-10 15:53:53 +01:00
c2b0d8b6d6 Fix T57633: Particle texture update problem
Textures are now hooked up to the RESET operation of particle
settings, which ensures particles being re-distributed when
texture is changed.

This is limited to a direct user modifications, which matches
old behavior in 2.79.
2018-12-10 15:11:57 +01:00
fc52d51d73 Cleanup: Someone forgot again to do the versioning_280 handling when bumping subversion.
Seriously... There is no point in having those subversions if one does
not take advantage of them to reduce doversion work on file load! Now we
have to raise subversion again just for that. :(
2018-12-10 15:10:29 +01:00
7f98ba4725 Proper fix for rigidbody collections's objects missing rb data.
We cannot let those data be generated on-the-fly in RBW evaluation
anymore, since those would be added to CoW eval object and never ported
back to orig objects.

We *could* get orig objects in eval code, of course, but as in
constratints, this is not really threadsafe and future proof, depsgraph
evaluation should really write back to orig data as little as possible.

So instead, add code to ensure required data is generated to objects
when their collection is added to rigidbody world.

Note that we *may* want to clean that up once collection is no more used
by RB? On the other hand, people might want to keep those data around to
be able to switch between different setups easily... So think it's OK to
keep them at least for now.
2018-12-10 15:10:29 +01:00
073a011f91 Fix T58993: Duplicating after setting a rigid body world crashes Blender.
There is no guarantee that object in rigidbody collection already have a
valid rgigidbody data when rebuilding deg relations, that is often
generated on-the-fly by actual rigid body simulation.

Note that this can be an issue when generating deg relations I guess...
But at least it won't crash anymore.
2018-12-10 15:10:29 +01:00
448731ac92 Fix part of T58964: Changing driver path/array index crashes
The issue here is that in the new dependency graph drivers are
individual nodes which depends on what they are driving. This
means that changes to RNA path or property index should ensure
those nodes are updated. Easiest way to do so is to tag relations
for update.
2018-12-10 14:50:05 +01:00
51dbf8d71a Fix T59087: Empty meshes have large bound-box
Initialize to default values for meshes w/o vertices,
note that zeroing for BKE_object_boundbox_calc_from_mesh
matches old derived mesh code.
2018-12-10 19:32:35 +11:00
979a5c34e4 Fix T59107: F3 does not work in Python console 2018-12-10 17:33:36 +11:00
929ad440d7 Fix T57086: Offset Even option is unclickable 2018-12-10 16:51:53 +11:00
155b02a196 Merge branch 'master' into blender2.8 2018-12-10 12:45:38 +11:00
cecd4fe254 Merge branch 'master' into blender2.8 2018-12-10 12:44:24 +11:00
642c315bae Fix T53544: Undo in pose mode selects all fcurves 2018-12-10 12:30:41 +11:00
9df2b6da3a DNA: add runtime struct to for graph & action editor
Move struct members, no functional change
2018-12-10 12:19:18 +11:00
168a6a4bfc Merge branch 'master' into blender2.8
Conflicts:
	source/blender/makesrna/intern/rna_dynamicpaint.c
2018-12-09 21:51:23 +01:00
d7ef1af22b Fix T59059: Blender crashing after adding particle system and dynamic paint (Brush).
Looks like this bug has been there since ages (at least present before
2.79 official release...).
2018-12-09 21:48:37 +01:00
879877295d Simplified #ifdef to not silently fail on certain platforms 2018-12-09 19:24:12 +01:00
e79bb957fc User Interface: Add button color for indicating that the value differs from the interpolated one
One issue that especially newer users often run into is that they accidentally reset changes to the scene by switching frame without creating a keyframe first.

Therefore, this commit adds a new color that is used to draw properties if their current value differs from the one that would be set when switching to this frame.
This works both for existing keyframes as well as for currently interpolated frames.

Unfortunately the flags in but->flag are full, so I had to move the new flag to but->drawflag and pass that to all relevant functions.

I went with orange for the color since afaics it fits with the green and yellow that are currently used for keyframe states and since it's somewhat reddish to signify that there might be something to look out for here.

Reviewers: campbellbarton, #user_interface, brecht

Reviewed By: campbellbarton

Subscribers: brecht, predoe

Differential Revision: https://developer.blender.org/D3949
2018-12-08 18:06:23 +01:00
aff9ccbade Fix T51057 Modifiers lose bevel weight and crease
This is for 2.80 (though bug I mistakenly merged into was for 2.78.
Duplicate bugs T58127, T58411, T58440, and T58789 all fixed.
Bevel weights and crease are not real Mesh layers so get lost
on coversion of mesh to bmesh unelss the mesh's cd_flag member
tells the converter to create layers for them.
Most code the copies or partially copies meshes uses
mesh_new_nomain_from_template_ex, so copied the flag there.
2018-12-08 06:39:46 -06:00
64bca2e648 Fix T58950: wireframe/orthographic/front/side/topview crash 2.8 2018-12-08 11:32:58 +01:00
b4b224dc08 Shrinkwrap: use polygon normals for flat faces in Align To Normal.
Hit normal originates from tesselated triangles and isn't the
actual normal used for shading of flat faces. Thus, it is better
to use the actual polygon normals when available.
2018-12-08 08:27:37 +03:00
1ddfd8c9ec Cleanup: style 2018-12-08 15:01:47 +11:00
0fe5a78983 Fix T58949: Transform feedback shaders not having fragment shader 2018-12-07 21:19:14 +01:00
c3da1691ac UI: Fix typo in hostname stamp tooltip
Also change the part "running Blender" for "that rendered the frame".
2018-12-07 20:40:55 +01:00
a8e459e452 Fix T58360 "Use object as pivot" in GP "Shadow effect" crashes Blender 2018-12-07 20:01:01 +01:00
6a5e809697 Move static get_hostname() to BLI_hostname() in system.c
This makes the `#include <Windows.h>` use more localised and out of the
`image.c` file.

Reviewers: LazyDodo

Reviewed by: LazyDodo

Differential revision: https://developer.blender.org/D4049
2018-12-07 19:28:08 +01:00
de491abf99 Fix modifiers evaluation outside of depsgraph/CoW context.
Fix T58237: Exporters: Curve Modifier not applied when "apply modifiers" are selected.
Fix T58856: Python: "to_mesh" broken in 2.8.

...And many other cases... ;)

Thing is, we need target IDs to always be evaluated ones (at least I
cannot see any case where having orig ones is desired effect here).
Depsgraph/Cow system ensures us that when modifiers are evaluated by it,
but they can also be called outside of this context, e.g. when doing
binding, or object conversion...

So we need to ensure in modifiers code that we actually are always
working with eval data for those targets.

Note that I did not touch to physics modifiers, those are a bit touchy
and rather not 'fix' something there until proven broken!
2018-12-07 18:55:08 +01:00
38ef3d6b91 Remove unused particle system recalc flag 2018-12-07 18:04:13 +01:00
1ab73fde37 Remove obscure debug-only print
The message is not clear for users, and is set for modifier already.
2018-12-07 18:02:43 +01:00
Dalai Felinto
f40a88a4ba Fix selected to active Cycles Baking
Since we started using looptris we no longer need a triangulation
modifier in the highpoly object. In fact having was causing a bug
where baking would be utterly broken.

This fix normal baking. Combined pass still needs a fix to hide the
objects during baking.
2018-12-07 14:58:37 -02:00
e9634b6930 Cleanup, typo in naming
\Something went wrong in the rename script..
2018-12-07 17:30:47 +01:00
e2d9166473 Metadata: add hostname to the available metadata options
Having the hostname allows us to identify which machine rendered which
frame in our render farm.

This simply uses the host's name, and doesn't do any DNS lookup of any
IP address of the machine. As such, it's only usable for identification
purposes, and not for reachability over a network.

Reviewers: sergey, brecht

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D4047
2018-12-07 17:29:07 +01:00
16e67dc206 Merge branch 'master' into blender2.8 2018-12-07 16:42:36 +01:00
0eb61c799d Fix T57994: Particle Instance modifiers 'Index Layer' off by one
better have this vertex color layer cover the whole 0-1 range

thx @sergey for checking

Maniphest Tasks: T57994

Differential Revision: https://developer.blender.org/D3976
2018-12-07 16:33:25 +01:00
f034926dba add 'Control Points' and 'Segments' editmode menus for Surfaces
Fixes T58922

Reviewers: brecht, billreynish

Maniphest Tasks: T58922

Differential Revision: https://developer.blender.org/D4046
2018-12-07 15:15:52 +01:00
4fe578c827 Merge branch 'master' into blender2.8 2018-12-07 15:00:48 +01:00
Dalai Felinto
e7c3f7ba6f Update BVHTree.FromObject API, remove render argument
This information should come from the depsgraph.
2018-12-07 11:55:00 -02:00
3b1f90ed84 Cycles: Do more user-friendly indication that GPU devices are not found 2018-12-07 14:53:29 +01:00
bb0d812d98 Cycles: Disable OpenCL on macOS
This is unfortunate, but the number of bugs in this configuration
keeps growing, and almost all of them are caused by bug in OpenCL
compiler.

The compiler is not likely to be fixed, since Apple declared OpenCL
deprecated.

This evil commit is aimed to keep officially supported features
of Blender in a good working and stable state.
2018-12-07 14:37:47 +01:00
c1f6ecdfab Fix T58902: error getting tools for Image Editor (modes Paint and Mask)
Maniphest Tasks: T58902

Differential Revision: https://developer.blender.org/D4044
2018-12-07 14:17:17 +01:00
012a44cff1 Fix T57640: UV unwrap packing not working without sync selection. 2018-12-07 13:54:59 +01:00
Dalai Felinto
cc61b21dff Partial fix to T58917 - No valid cage
The fix itself simply is to store the cage object as a pointer instead
of a string/name.

That said baking with or without cage is yielding very different results
than in 2.7.
2018-12-07 10:44:19 -02:00
ad47b0236e GP: Refactor coordinates to float
See: D4030

Differential Revision: https://developer.blender.org/D4036
2018-12-07 11:45:48 +00:00
942e9835a9 Fix/workaround crash opening almost any Spring file
The issue was caused mpoly array urequired by the cache filling,
but the pointer was never set when preparing render data.

Seems this change is safe enough, in terms it shouldn't be
causing slowdown, since the assignment of mpoly is cheap, but
hard to tell if there is anything else affected by thing underneath.
2018-12-07 12:41:46 +01:00
fff5df8108 Depsgraph: Make data allocation dependency more robust
This fix aims to fix crash/assert failure related on wrong
evaluation order which happens when there is a cyclic
dependency involved.

The rationality of this change is that we can allow use
of uninitialized scalar value, but memory is better be
allocated.

This might not be ideal still, but worth a try.
2018-12-07 11:37:44 +01:00
89121253db Depsgraph: Use shorter relation name
It is clear enough already that it goes From to To.
2018-12-07 11:37:38 +01:00
5c9a67c63b Depsgraph: Cleanup, line length 2018-12-07 11:37:38 +01:00
79312c1912 Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those:

- OB_RECALC* family of flags, which are rudiment of an old
  dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
  as a separate set since the graph itself did not handle
  particle systems.
- DEG_TAG_* which was used to tag IDs.

Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.

Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.

Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.

Fixes T58632: Particle don't update rotation settings
2018-12-07 11:37:38 +01:00
989fbff16f Cleanup/refactor binding code for MeshDeform modifier.
We had two different ways of doing it, SurfaceDeform and LaplacianDeform
would do it through a special modifier stack evaluation triggered from
binding operator, while MeshDeform would do it through a regular
depsgraph update/eval (also triggered from its binding op).

This enforces the later to search back for orig modifier data inside
modifier code (to apply binding on that one, and not on useless CoW
one).

Besides the question of safety about modifying orig data from threaded
despgraph (that was *probably* OK, but think it's bad idea in general),
it's much better to have a common way of doing that kind of things.

For now it remains rather dodgy, but at least it's reasonably consistent
and safe now.

This commit also fixes a potential memleak from binding process of
MeshDeform, and does some general cleanup a bit.
2018-12-07 11:22:31 +01:00
41e4059f3c Fix T58046: Crash when changing Particle type, when Hair has dynamics
thx @sergey for checking
2018-12-07 10:54:44 +01:00
999b466784 Cleanup: split mixed_bones_object_selectbuffer
Split basic object picking logic out into it's own function.
2018-12-07 20:49:11 +11:00
b48156d012 Cleanup: style 2018-12-07 20:48:56 +11:00
20261a7581 Fix T58913 Won't focus on Grease Pencil
When the datablock was empty, the center was not calculated. Now it uses the object location.
2018-12-07 10:42:14 +01:00
32aefb6fba Fix T58911: Picking objects fails in pose mode 2018-12-07 19:10:08 +11:00
10540822dc Fix T58811: Scale bezier handle uses tip as origin 2018-12-07 18:22:14 +11:00
136e88f4ea Merge branch 'master' into blender2.8 2018-12-07 17:11:28 +11:00
52824f008e Cleanup: redundant counter 2018-12-07 17:06:21 +11:00
606223f6a6 Merge branch 'master' into blender2.8 2018-12-07 15:54:17 +11:00
d6d76759f8 Fix error in Main cleanup
See 481cdb08ed
2018-12-07 15:42:34 +11:00
0c6d5232a3 DRW: Remove the use of GPUTexture buffers for edit wire rendering
See previous commit for detail as why.
2018-12-07 05:33:53 +01:00
e929cad706 DRW: Rework wireframe overlay implementation
The shader is way simpler and run way faster on lower end hardware
(2x faster on intel HD5000) but did not notice any improvement on AMD Vega.

This also adds a few changes to the way the wireframes are drawn:
- the slider is more linearly progressive.
- optimize display shows all wires and progressively decrease "inner" wires
  intensity. This is subject to change in the future.
- text/surface/metaballs support is pretty rough. More work needs to be done.

This remove the optimization introduced in f1975a4639.
This also removes the GPU side "sharpness" calculation which means that
animated meshes with wireframe display will update slower.
The CPU sharpness calculation has still room for optimization. Also
it is not excluded that GPU calculation can be added back as a
separate preprocessing pass (saving the computation result [compute or
feedback]).

The goal here was to have more speed for static objects and remove
the dependency of having buffer textures with triangle count. This is
preparation work for multithreading the whole DRW manager.
2018-12-07 05:33:53 +01:00
9f5a27c5be GPU: Remove EXT and add assert
Some drivers accept shaders with only vertex stage, but some just silently
fails.
2018-12-07 05:33:46 +01:00
fe20aa1edf GPU: Add GPU_vertformat_triple_load to load next vertices attrib
Right now does not add padding at the end of the buffer.

This seems not necessary but may cause problem on some platform. If needed
we will add this padding (only 2 more vertices).
2018-12-07 05:33:17 +01:00
88d36e6456 DRW: Add Provoking vertex state. 2018-12-07 05:33:17 +01:00
58398acc68 Fix crash recovering last session 2018-12-07 15:04:57 +11:00
8f40fbad5b Add license headers for app-templates 2018-12-07 14:29:03 +11:00
8a5656caa9 Fix T58897: Show folders in video editing template
Show folders and start in the users home.
2018-12-07 14:27:22 +11:00
a304ed1b01 WM: alternate fix for T58904
Use messages instead of notifiers.
2018-12-07 14:07:05 +11:00
2fefbfd2d0 Revert "Fix T58904: Side tabs disappear when creating new View Layer"
This reverts commit 892a104d2c.
2018-12-07 13:49:00 +11:00
0d4ec8a7a9 Fix T58905: Knife project redo fails 2018-12-07 13:33:58 +11:00
341d5b08b0 Fix adding objects in local view 2018-12-07 13:01:26 +11:00
Dalai Felinto
a48bd6cc74 Fix T58871: New Scene Collection Does Not Create A New Collection 2018-12-06 23:59:11 -02:00
Dalai Felinto
892a104d2c Fix T58904: Side tabs disappear when creating new View Layer
Using listener here, although I suspect we should be using message
subscriber only. That said, this mimics the behaviour of the buttons
main region.

As for the original bug report what was happening was that when
switching between viewlayers (or when creating one) we may not get the
same active object. So the context breadcrumbs are different.

And the bug itself was that we were missing a redraw on view layer
change.
2018-12-06 23:40:29 -02:00
Sebastian Parborg
497a9ef7a3 Fix T58750: missing fallof power tooltip.
Differential Revision: https://developer.blender.org/D4042
2018-12-07 01:15:02 +01:00
Dalai Felinto
3cce7b7ab9 Fix T58325: Local view Bug
Aka all the thousand of reports duplicated here.
I should have seen this coming, since I had to add a hack in the first
place because things were "not working".

I should have figured out earlier that COW handles base in a really
special way, with its own special object_runtime_backup hack.
2018-12-06 22:06:05 -02:00
Lucas Boutrot
d40bffa17f UI: add material settings in shader editor sidebar.
Differential Revision: https://developer.blender.org/D3926
2018-12-07 00:57:20 +01:00
27e77d4f9c Fix Alembic indexed UVs being merged for different vertices.
Other software uses this to define UV islands, so we can't just merge
any UVs with the same coordinate. They have to share a vertex too.

Contributed by Maxime Robinot, with changes by me.

Differential Revision: https://developer.blender.org/D4006
2018-12-07 00:19:53 +01:00
5fdf739e7f Fix T58898: Python error clicking in empty space in text edit mode. 2018-12-06 23:44:21 +01:00
7e722afc62 3D View: hide pose bones w/o overlays
Part of T58690
2018-12-07 09:28:32 +11:00
6aad5de58b Docs: hint to why we have option to toggle bones
Without this, it might seem redundant since there is an option
to toggle armature object display.
2018-12-07 08:49:01 +11:00
cccc40db51 Fix T57963: Cycles crash using AO for displacement.
Note this is not supported, there exists no geometry at this point, but
it should not crash at least.
2018-12-06 19:50:05 +01:00
234c112971 Fix T58223: curve tilt not working correct with left click select. 2018-12-06 19:26:39 +01:00
828c4d1c54 Fix T58863: 'Smooth/Flat Shading' to 'Shader Smoot/Flat' in context menu 2018-12-06 16:19:29 +01:00
50d26e7c78 Speedup: optimize DNA_elem_array_size to speedup file loading
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4037
2018-12-06 15:50:01 +01:00
39efb58446 GPU Framebuffer: simplify gpu_framebuffer_update_attachments_and_fill_empty_slots func 2018-12-06 11:47:37 -02:00
c8467ccc8d Fix T58310: Crash when removing multires modifier from sculpt object 2018-12-06 15:22:21 +01:00
b0726b31e6 DRW: Mesh: Make uvs use the final mesh display 2018-12-06 14:43:09 +01:00
b576e14902 DRW: Fix Uvs not working in solid mode + edit mesh 2018-12-06 14:42:25 +01:00
da7f00b9c9 GPU Extensions: unused_fb_slot_workaround: Compare only the driver.
Dozens of renderes are included.
2018-12-06 10:05:42 -02:00
32d50858c3 Fix T58663: UV Align Auto does nothing
one case was missing in cleanup commit rB8fc6609cc008
2018-12-06 13:18:13 +01:00
Sebastian Parborg
e850ae14ee Fix T58659: absolute grid snapping wrong with custom grid scale.
Differential Revision: https://developer.blender.org/D4039
2018-12-06 13:06:00 +01:00
50b0448bd3 Fix T58840: SHIFT+K in vertex paint doesn't update 2018-12-06 13:00:31 +01:00
4c336f034e Draw manager: Use render view transform as default 2018-12-06 12:31:58 +01:00
7ed8e9167d Color management: Use default view with no extra transform when not specified 2018-12-06 12:31:50 +01:00
005e6274ad Color management: Cleanup, make function name more clear
The idea is to reflect that the view settings are the best
for cases when one wants to see things as if they are a
render result.
2018-12-06 12:31:50 +01:00
0e5f97a3a1 Fix T58816: Color management Display Device other than sRGB crashes
This fixes our workaround for until proper solution is accepted
in upstream.

Now, when default view behaves same as it was supposed to (and
as it behaves in OCIO-1.0.9) it is obvious that our configuration
violates own design -- default view  is used for cases when
images don't want to be displays using "render" settings.
2018-12-06 10:55:31 +01:00
a60536956e Color management: Fix issue when active views/displays are not specified 2018-12-06 09:16:52 +01:00
ca2680aaeb Update relations when modifier texture changes 2018-12-06 09:09:21 +01:00
1f5dd9c437 Fix T58788: Apply Visual Geometry crash 2018-12-06 18:28:32 +11:00
285b06da51 Fix multi-object edit state on load
Objects selected on save would enter edit-mode on file load.
2018-12-06 17:53:59 +11:00
aeffaf75ab Fix knife project, add to mesh menu 2018-12-06 16:52:49 +11:00
6c19412ad1 Fix T58837: "Tab for Pie Menu" lags leaving gpencil edit mode 2018-12-06 16:23:01 +11:00
c39bb6bd58 Fix T58836: Shift-C doesn't update the view 2018-12-06 15:52:12 +11:00
45afcd6b86 Merge branch 'master' into blender2.8 2018-12-06 15:08:42 +11:00
d24cfa329b Fix T58832: Spin tool creates duplicate faces 2018-12-06 14:52:55 +11:00
1cc0705062 Armature: support select-linked deselection
Matches edit-mesh mode.
2018-12-06 14:00:07 +11:00
8afc4cf3ea Fix crazyspace transform w/ armatures 2018-12-06 13:05:35 +11:00
74db65e542 Merge branch 'master' into blender2.8 2018-12-06 11:27:57 +11:00
f6c615a8c2 Fix T58819: Weight paint gradient crash 2018-12-06 11:22:00 +11:00
ffdd5b3699 Fix T56362: sub surface scattering does not work on eevee on radeon hd 7600 series 2018-12-05 21:22:12 -02:00
c0a71b8369 Fix problem with unused color slot in framebuffer on some bugged AMD GPUs
Differential Revision: https://developer.blender.org/D4035
2018-12-05 21:00:08 -02:00
75b739c969 Keymap: only use MMB workaround whe MMB is enabled
Using double-click with selection breaks selection cycling behavior
(making you have to wait to click again to cycle-select the next item).
2018-12-06 10:05:53 +11:00
095f9f26aa Fix T57770: Edit-mesh wireframe cage select fails 2018-12-06 09:38:08 +11:00
05da1d7fb2 Merge branch 'master' into blender2.8 2018-12-06 08:48:43 +11:00
5bc7b9c3c6 Cleanup: unused var, style 2018-12-06 08:45:41 +11:00
5103fa4ae7 DRW: Optimize adjacency data creation a bit
This is a very small improvement and only concerns wireframe update.

My tests.
old 6fps > new 7fps > baseline (wireframe disabled) 10fps
2018-12-05 22:43:15 +01:00
ad2e68b826 Cleanup: no need to access final mesh 2018-12-06 08:37:09 +11:00
d6454a15f7 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-05 22:05:19 +01:00
3552731551 Fix (devtalk 4053): Collada build with older cmake versions broken 2018-12-05 22:04:10 +01:00
5584cad5d9 GHOST: WGL: Silence Errors when testing opengl context versions 2018-12-05 21:57:49 +01:00
0424ee86f0 Fix T58407: Wire frames are not showing with subdivision surfaces 2018-12-05 21:57:49 +01:00
efe769f3f0 Cleanup: unused function 2018-12-06 07:44:25 +11:00
5ad217fe0a Fix own mistake in recent rB74361eebe68c.
One cannot assign to Class.__dict__, that is not a 'real' dictionnary...

Thanks to @JacquesLucke for noting the issue.
2018-12-05 20:54:02 +01:00
9fa8c01f6b Fix (unreported, related to T58210) LaplacianDeform binding state incorrectly reported by RNA.
LaplacianDeform binding handling is a catastrophee in CoW context,
because half of the binding (the laplacian solver cache thingy) is not
saved, and can be re-generated on the fly from stored vcos.

This means that binding is not only done when hitting 'bind' button, but
also at file load, and when some things change.

And this utterly breaks with CoW design, not sure how to fix, will add a
task about that.

But this also means that NULL laplacian solver cache pointer is not a
good check to know whether it is binded or not, only stored vcos are
relevant for that (and the binding flag, of course).
2018-12-05 20:54:02 +01:00
484389cdcd Fix T58210, Part II: Surface Deform modifier (un)binding is broken.
This fixes/clarifies Surface Deform evaluation code that does the
binding, since that part should only be called outside of depsgraph
evaluation, with orig data-blocks and not CoW ones.

Now we have a decent amount of asserts and checks to ensure eveything
works as expected.

Also had to add a special case to get target's mesh in binding case,
since often target's evaluated mesh is not available, in that case (and
in that case only), we can actually compute that mesh (because we are
out of depsgraph evaluation).
2018-12-05 20:54:02 +01:00
71e2efc4ce Fix T58210, part I: Surface Deform modifier (un)binding is broken.
Binding and unbinding *has* to happen outside of 'normal' depsgraph
evaluation of modifiers now that we have CoW, otherwise persistent data
stored in modifier data are always lost!

Note that this is only first step of the fix, modifiers code needs also
some work. Surfacedeform one is in next commit, Laplacian case is much,
much more complicated to handle, given how it uses its cached data. :(
2018-12-05 20:54:02 +01:00
c0baa648dc Minor cleanup in Laplacian deform modifier DNA code. 2018-12-05 20:54:02 +01:00
f692886164 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-05 20:30:46 +01:00
da4991fcae fix: Collada: remove Class from method definition in header file 2018-12-05 20:28:23 +01:00
Harley Acheson
9b228e465f UI: reduce area splitting action zone size.
This would overlap with buttons in the header. It's smaller to hit, but
still wider than the outlines for resizing, so hopefully it's fine.

Differential Revision: https://developer.blender.org/D4033
2018-12-05 18:51:59 +01:00
Glenn Tester
9375c941b7 Fix T57939: animated values in compositing nodes not working.
For now this is not part of copy-on-write, and needs extra animation evaluation.

Differential Revision: https://developer.blender.org/D4019
2018-12-05 18:08:46 +01:00
6e00415a85 Fix T58679: Missing modifiers update on changes to texture 2018-12-05 17:35:48 +01:00
d355a2b7d8 Depsgrapgh: Use more distinctive opcode for texture and image evaluation 2018-12-05 17:35:48 +01:00
56aa86ae25 GP: Tag datablock after mode change 2018-12-05 17:22:03 +01:00
21de125657 GP: Add icon for Arc primitive 2018-12-05 16:03:48 +00:00
94503efb12 GP: Fix precision issue with Circle and Arc tools
Differential Revision: https://developer.blender.org/D4030
2018-12-05 15:59:23 +00:00
cdf626615d Fix In front option not working in solid mode 2018-12-05 16:57:44 +01:00
16749070ae GPU: Fix gpu workaround detection 2018-12-05 16:57:44 +01:00
309d4bfbbc Fix T58762: Issue with weight painting on deformed mesh
Was initially reported when painting on a mesh with armature,
which was failing due to missing bbone cache. The issue was
deeper, and was related on the way which object was used to
calculate crazyspace.
2018-12-05 16:55:25 +01:00
81449320e4 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-05 08:46:12 -07:00
4cb6d97691 deps: update opencollada to v1.6.68 2018-12-05 08:44:50 -07:00
16aa7dfa19 Fix T58391: correctly handle Curve Shape Key layout in Python API.
The layout changed when the radius property was added to shape
keys in 2.8, but the RNA code wasn't updated.

Also, even before that, the code didn't do anything to correctly
handle mixing sub-curves of different type (nurbs vs bezier) in
the same Curve object. Now that case is handled correctly but not
very efficiently by allocating a mapping table when necessary. To
recover some performance, a custom index lookup function is added.
2018-12-05 18:36:52 +03:00
6dcb474dd4 GP: Disable Draw Modes if enable Annotation
When enable annotations with a grease pencil object, the GP Object must be set to Object mode because the annotation Draw and the GP draw are incompatible.
2018-12-05 16:31:43 +01:00
3e1ca9a693 Fix T58764: solid mode error 2018-12-05 15:47:41 +01:00
cbb82720be Fix T58726: Pixels not being drawn if dpi scalling > 1 2018-12-05 15:47:41 +01:00
c014e03b17 Don't tag objects from inside function which is used by dependency graph
This partially reverts 9edc64e255. If tag is needed, do it outside of
dependency graph evaluation.
2018-12-05 15:37:25 +01:00
34d5651a17 Remove old dependency graph
Yes, again.
2018-12-05 15:35:18 +01:00
23688ec39a Fix T58794: extended shading pie menu wrong order in lookdev mode. 2018-12-05 15:22:20 +01:00
a3b03b8146 Merge branch 'master' into blender2.8 2018-12-05 15:15:06 +01:00
834fa06614 Fix (unreported) building Cycles tests with Embree enabled. 2018-12-05 15:14:16 +01:00
378e5232e8 Fix T58104: Duplicated previews for Matcaps/HDRIs in portable installs
Reviewers: brecht

Maniphest Tasks: T58104

Differential Revision: https://developer.blender.org/D4028
2018-12-05 14:53:44 +01:00
fb3f1a3567 Merge branch 'master' into blender2.8 2018-12-05 14:41:00 +01:00
be359fc6e5 Fix T58756: crash changing shading.type in 3D viewport in inactive screen. 2018-12-05 14:40:10 +01:00
6122e1d6c0 Color management: Fix/workaround broken getDefaultDisplay()
This is something what is caused by OCIO library. The patch
has been submitted there:

  https://github.com/imageworks/OpenColorIO/pull/638

For until it is refined and checked we do workaround from
our side.
2018-12-05 14:11:21 +01:00
b927d19696 Color management: Query default view from display
Solves weird situation when default display name is queried
from OCIO, but Default view being assumed to be set for it.

Now view is initialized to a default view of that display.
2018-12-05 14:11:21 +01:00
9c7f01b905 Color management: Cleanup, typos 2018-12-05 14:11:21 +01:00
c9344d6c5b Fix T58776, T58030: pressure sensitivity on Linux not working for some tablets. 2018-12-05 14:02:37 +01:00
e7643ee6b4 Install_deps: bump collada version to 1.6.68. 2018-12-05 13:52:39 +01:00
6be0948e6d UI: rename UV Edit to UV Editor, for consistency. 2018-12-05 13:51:37 +01:00
4a21345665 Merge branch 'master' into blender2.8 2018-12-05 12:54:45 +01:00
f5b46daf52 Fix build with old CMake versions. 2018-12-05 12:53:19 +01:00
11ff2022d5 Cleanup: remove deprecated piece of code in library reading code.
That one was flagged as useless since 2.77, and only kept 'to be sure'
everything was OK. This was years ago now, and never got any report on
this, so 2.8 sounds like a good time to nuke it.
2018-12-05 11:46:49 +01:00
eeabed2132 Fix T58771: Wrong path to Unit Settings
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4034
2018-12-05 11:26:01 +01:00
74361eebe6 Fix T58772: Stray "forward" and "up" options in 2.8 import addons?
Nice side-effect of using new __annotations__ thingy to store
dynamically-generated fields in a class: __annotations__ dict is not
ensured to exist for a given class, so we may end up modifying on of the
parents' one!
2018-12-05 11:08:57 +01:00
Dalai Felinto
80ffd7b459 Implement bvhtree.fromObject
Passing depsgraph instead of scene, since a scene does not fully define the
state of object you want to use for the BVH.

Also, mesh_create_eval_final_view and mesh_create_eval_final_render are pretty
much the same, so mesh_create_eval_no_deform and
mesh_create_eval_no_deform_render are as well.

Issue reported on: T58734

Reviewers: sergey
https://developer.blender.org/D4032
2018-12-05 07:58:58 -02:00
8e31e67bf5 GP: Add missing pressure button to Topbar 2018-12-05 10:46:41 +01:00
5c8f1053b5 UI: split UV editor out of the image space 2018-12-05 14:38:58 +11:00
d59c4c9d61 GPU: Cleanup: Replace glFlush by GPU_flush 2018-12-05 04:23:45 +01:00
a7712e8594 GPU: Improve detection of intels UHD graphics 2018-12-05 04:22:32 +01:00
4d4f0dbd8d GPU: Print opengl infos if using --debug-gpu-force-workarounds 2018-12-05 04:03:40 +01:00
1dac00f7ad Fix T58551: Dragged in images do not display orange highlight border when selected 2018-12-05 03:45:12 +01:00
b4d192def8 UI: Select Linked Instanced Collection still named Dupligroup
Fixes T58747
2018-12-05 03:40:13 +01:00
1fa527bfa3 BKE: Add "--debug-gpu-force-workarounds" to force gpu workarounds
This is nice to test workarounds on other configs that may benefits from
the existing workarounds.
2018-12-05 03:05:39 +01:00
354b1c162a Fix T58733: Segmentation fault at start causes by shader compillation 2018-12-05 02:51:48 +01:00
b5ebdb09af Workbench: Remove specular shadowing for red and blue metal 2018-12-05 02:51:48 +01:00
7ffde286be Workbench: Cleanups and reduce shader variations
Also optimize deferred engine by only outputing material data if needed.
This make the bare flat shading mode (no effects) only a depth prepass.
2018-12-05 02:51:48 +01:00
5368540431 Workbench: Fix workbench broken on some config due to usuned fb slot
This seems to be a driver bug. Only windows + Radeon HD 7500M seems
to be affected. Fix can be extended to more config if necessary.
2018-12-05 02:51:48 +01:00
f4261cd2ed Workbench: Remove unused framebuffer slot. 2018-12-05 02:51:48 +01:00
5c59244238 Object: select objects when revealing
Matches behavior for other modes.
2018-12-05 12:12:07 +11:00
baf599610a Fix T58661: Shading pie doesn't highlight x-ray when on 2018-12-05 11:50:35 +11:00
8fb3a222a1 Fix T58690: Disable overlay doesn't hide bones 2018-12-05 11:08:50 +11:00
9c963d363e Merge branch 'master' into blender2.8 2018-12-05 11:03:48 +11:00
45c11c1a1b Fix T49624: Fly uses camera settings outside camera view 2018-12-05 08:36:37 +11:00
b83cf9d340 GP: Enable Smooth Sculpt brush when press Shift key 2018-12-04 22:35:17 +01:00
Dalai Felinto
be012c88c5 Cleanup: Action zone coordinates
No functional changes, but it makes all the coordinates more consistent
(going from small to larger values). It helps debugging in the future
to be able to rule out vertex order as a culprit.
2018-12-04 17:42:31 -02:00
Dalai Felinto
7c56ac2355 Fix area splitting from action zone flipping viewports
The top-left and bottom-right corners were creating the new area in the
wrong place.

Blender 2.7x only had action zone corners in the top-right, and
bottom-left corners. So it had some hardcoded assumptions based on that.

This commit feels a bit like a hack, but I think it may be fine.

Bug reported via IRC, how to reproduce:

* Change shading to Rendered.
* Split viewport from the top-left corner.
2018-12-04 17:42:31 -02:00
baf89af0f5 Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-04 20:31:30 +01:00
22bba02bc8 fix T58568: used wrong case in variable name 2018-12-04 20:28:20 +01:00
5c3955452b Merge branch 'master' into blender2.8 2018-12-04 19:48:21 +01:00
10c50d7dbf fix T58568 build errors when using collada 1.6.68 or newer 2018-12-04 19:11:57 +01:00
Niels
8908670623 Fix T58466: bug in macOS GHOST_GetSwapInterval.
No user level changes since this function is not used in active code.
2018-12-04 18:44:42 +01:00
34b73cb11c Fix T57620: display custom normals in Edit Mode.
Since it seems that CD_ORIGINDEX is not available for loops,
the only choice is to simply use the loop normals already
computed by depsgraph after evaluating modifiers.

This revealed a bug where the Auto Smooth settings would be lost
from the mesh after complex modifiers, or after edit mesh to mesh
conversion, so restoring them is needed to get correct results.
2018-12-04 19:53:14 +03:00
7e5f31be41 Fix T58609 Subdivision Surface modifier, "Optimal Display" not working
I tried to make it progressive using the wireframe slide but it did not
work well.

So taking the most straight forward way.
2018-12-04 17:52:32 +01:00
6f198f7851 Wireframe: Optimization: Only draw triangles that have edges
This only happens after a certain wireframe threshold.

We sort triangles into 2 bins (start and end of the buffer) based on a
threshold and just draw the first bin if the wireframe slider is low enough.

This optimization is disabled for deformed meshes when playback is active.
This optimization is only implemented for meshes object for now.

This should help resolve (to some extent) T58188.
2018-12-04 17:52:32 +01:00
f1975a4639 Wireframe: Optimization: Only draw triangles that have edges
This only happens after a certain threshold.

We sort triangles into 2 bins (start and end of the buffer) based on a
threshold and just draw the start bin if the wireframe slider is low enough.

This optimization is disabled for deformed meshes.

This should help resolve (to some extent) T58188.
2018-12-04 17:52:32 +01:00
89ef69d23c Wireframe: Optimization: Output degenerate triangles if no edges 2018-12-04 17:52:32 +01:00
6a0c25b447 Fix T58700: Modifier error msgs not showing.
We need to copy those back from evaluated modifierdata to orig one (as
part of `BKE_object_synchronize_to_original()`).
2018-12-04 17:07:47 +01:00
64474fbc22 Cleanup: typo in comments. 2018-12-04 16:56:54 +01:00
be91d4ef95 Fix T55774: Crash when reloading clip during prefetch
Simply kill prefetch jobs when reloading. Not sure what else
we can do here..
2018-12-04 16:40:04 +01:00
b9b88d59dd Merge branch 'master' into blender2.8 2018-12-04 16:35:16 +01:00
cf2e35fcfe Fix T58118: Make duplicates real does nothing
The issue was caused by transflag set in geometry evaluation
never copied back top original object.

Now we have a dedicated operation which does all sort copy
back to original object, so we don't have to worry about
atomic assignments or what gets set where.

Still need to move boundbox to the same function, but it
needs some careful doublechecking first.
2018-12-04 16:04:10 +01:00
f63da3dcf5 Buildbot: enable support for NVIDIA Turing cards in Cycles (like GTX 20xx).
We currently only build the sm_7x kernels with CUDA 10.0, older cards still
use 9.1 until rendering errors are solved for them.
2018-12-04 16:03:18 +01:00
b14ec18601 Cycles: add initial CUDA 10.0 support, but only recommend use for Turing cards.
There may still be rendering errors when used for older graphics cards.
2018-12-04 16:03:18 +01:00
e666ee965c Fix T58227: Subdivision Surface Type Simple messes up UVs
This seems to be a bug in OpenSubdiv. For now simply use Catmark
subdivision scheme with infinitely sharp edges.

Later on it's either gets fixed in OpenSubdiv or we do bilinear
subdivision on our side.
2018-12-04 15:18:37 +01:00
245065460f Remove the Draw Curve operator from the Add menu
this operator was only working in editmode and we now have a dedicated
tool for this.

Fixes T58495

thanx @billreynish for usability advice
2018-12-04 14:42:08 +01:00
3d013f7b10 Fix for assert failure in material preview
All localized datablocks are not supposed to have animation
data associated with them.

There was an easy way to reproduce assert failure: toggle
animation decorator for Viewport Display -> Color.
2018-12-04 12:31:32 +01:00
e6141d7b3b Fix T58117: Crash with keyframing, take two
More operators need to become aware of action possibly being gone.
2018-12-04 12:31:32 +01:00
b97cd0e690 Depsgraph: execute all COPY_ON_WRITE nodes first as a separate stage.
COW nodes in the graph are mostly connected via a relation type
that doesn't propagate the update flags. Unfortunately, due to
the scheduling implementation that means the relations don't
actually guarantee execution order for indirect dependencies.
Relations also don't guarantee order in case of cycles.

As mentioned in IRC, the simplest way to fix possible problems
is to execute all COW nodes as a separate execution stage. This
seems to fix crashes with Data Transfer modifier in a cycle.

Staging works by simply delaying actual scheduling of tasks for
non-COW nodes until the second run of schedule_graph.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4027
2018-12-04 14:08:50 +03:00
01581d4a1e BLI_task: fix queue in work_and_wait, and support resetting.
To make the pool more usable for running multiple stages of tasks,
fix local queue handling in BLI_task_pool_work_and_wait.

Specifically, after the wait loop the local queue should be empty,
or the wait part of the function contract isn't fulfilled. Instead,
check and run any tasks in queue before the wait loop.

Also, add a new function that resets the suspended state of the pool.
2018-12-04 14:08:50 +03:00
c86e828eee Fix (IRC reported) missing update for RNA Object's matrix_local property.
Reported by @zeffii, thanks!
2018-12-04 12:06:24 +01:00
df2635099b Merge branch 'master' into blender2.8 2018-12-04 11:45:22 +01:00
3f31ec8398 Cleanup: Spelling 2018-12-04 11:43:53 +01:00
c6f47ffa98 Fix T58117: Crash with keyframing 2018-12-04 11:28:54 +01:00
6330b715ef Fix T58220: EdgeSplit at Split Angle: 0 doesn't split flat faces.
Add special handling for both edge cases (:p):
* 180° is same as no splitting by angle;
* 0° is same as split on all edges unconditionnaly.

In both cases we can also avoid computing poly normals.
2018-12-04 10:51:19 +01:00
36ca072375 Fix T58481: "Make duplicates real" operator settings crashes 2018-12-04 10:18:21 +01:00
9b933ccdf6 Fix error reloading scripts
Operator.is_registered needs to use RNAMeta class.
2018-12-04 17:54:54 +11:00
d8ed96a6a0 Cleanup: remove unused brush set by index 2018-12-04 17:33:47 +11:00
b16f03566b Show tool title for favorites menu 2018-12-04 16:14:21 +11:00
61678ca8ae Fix T57076: Remove property from favourites menu fails 2018-12-04 15:11:26 +11:00
e7641b6834 Edit last commit
Split out ensure-tool check into its own function.
2018-12-04 14:33:45 +11:00
80816fc712 Fix T58256: error message w/ missing Select Box tool
Support space modes not having tools.
2018-12-04 13:55:50 +11:00
2ff79613a8 Fix T58670: Spin tool crashes w/o gizmo overlay 2018-12-04 13:00:10 +11:00
1b6a394d86 Cleanup: unused args 2018-12-04 10:39:03 +11:00
c631782542 Fix T58474: Gizmo Operator template fails on rerun 2018-12-04 10:17:42 +11:00
2c19c9b2f6 GP: Draw Mode: Add Arc Primitive
This adds an elliptical arc primitive.
Press CKEY for toggling closed/open arc.
Press FKEY key for flipping arc.

Additional changes to gpencil primitives.
Increases default edges of circle to 64.
Keymap changes to allow primitives to be drawn with Shift or Alt key.
Allow Plus/Minus key to adjust number of edges.

Missing: Toolbar icon

Differential Revision: https://developer.blender.org/D4024
2018-12-03 22:11:38 +00:00
f0432e37ab Fix T58636: repeat image in UV editor not working.
A little too much code got removed in fb24813.
2018-12-03 20:08:20 +01:00
dc26c5e1ad Fix T58635: 2.8 - "3D Markers to Mesh" error. 2018-12-03 20:06:50 +01:00
9637a17856 Depsgraph: immediately free object's derived caches in the COW step.
After update of the mesh some of that data is so broken that using
it would crash. To reduce the risk of crashes in case of dependency
cycles, clean it up immediately.
2018-12-03 20:48:47 +03:00
4b8b369218 Fix T58448: Cloth presets fails to load due to missing attribute structural_stiffness.
Presets were not updated when parameter were changed in rBe3d31b8dfbdc.

Note that will also check on generating more resistent py code for that
kind of presets, since that will also affect any custom preset made by
users...
2018-12-03 17:46:39 +01:00
65779b022d Fix T58280: Blender 2.8 hangs when the LookDev mode is enabled
The hang was due to the nodes being "evaluated" for every incomming link.

Solution: only evaluate once per nodetree.

Also merge the tagging of SSS and SSR into one traversal only.
2018-12-03 17:19:11 +01:00
95eca49e54 DRW: Make default debug mode a bit more silent
Use --debug-gpu for debugging non found uniforms
2018-12-03 17:19:11 +01:00
0759480529 Workbench: Encode Roughness and metallic into 8bits
This reduces the bandwidth + vram usage of workbench even further.
2018-12-03 17:19:11 +01:00
223c1a107a Workbench: Make object ID pass optionnal
We separate the background and foreground shading passes to be able to make
the object id pass optionnal if we don't need it.

This saves a bit more memory. Also not clearing all rendertargets saves
some GPU time too.
2018-12-03 17:19:11 +01:00
a022811441 DRW: Make fullscreen quad in the background
This is to be able to only draw the background pixels by using a depth
test EQUAL.
2018-12-03 17:19:11 +01:00
d8d52e273e Workbench: Cleanup: Remove Spherical harmonic evaluation
It is not used anymore
2018-12-03 17:19:11 +01:00
82f01c666f View3D: Grid: Don't make the Zaxis produce any fragment is not needed
This was a bug that was making the grid drawing even more slower than it
is.
2018-12-03 17:19:11 +01:00
24fd03d0c2 Workbench: Reduce VRAM usage depending on mode
We exploit the fact that we are using the metallic workflow for material
and pass the metallic parameter instead of the specular color.

Pack the front facing bit in the color buffer only for matcap display.

Change buffer formats to use less bytes as possible.

Also don't request buffers that we won't use.

Saved 40MB on 2K screen on StudioLight + Shadows + Specular Lighting.

Includes several cleanups.
2018-12-03 17:19:11 +01:00
17a4323ef5 Subdiv: Set edge render flags according to Optimal Display
This is a part of T58609, but work is still needed to properly
support this flag in the draw manager.
2018-12-03 17:05:28 +01:00
bb16167fd8 Depsgraph: completely move customdata_mask to the ID node.
Move all mask-related fields from Object and OperationDepsNode
to Object_Runtime and IDDepsNode. Auto-apply DEG_TAG_GEOMETRY
if the mask changes after DEG rebuild. Update DEG API and all
code that uses it.

This fixes "source mesh data is not ready" errors from Data
Transfer modifier when parameters are changed in the UI after
the recent mesh_get_eval_final fix.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4025
2018-12-03 18:29:06 +03:00
fadad895b2 T58338 Edit Mode rotation doesn't work if object is far away from world origin
The fix code was done by Brecht Van Lommel, I only tested that the solution works.
2018-12-03 16:26:52 +01:00
3235a3081c Fix T57858: Add validation callback to CustomData layers.
Our mesh validation was only checking cd layout so far, not their actual
data. While this might only be needed for a few types, this is a
required addition for things like imported UVs, else we have no way to
avoid nasty things like NANs & co.

Note that more layer types may need that callback, time will say. For
now added it to some obvious missing cases...
2018-12-03 16:22:27 +01:00
957435785c Cleanup: Use BLI's is_finite_v helpers instead of manualy checking each item. 2018-12-03 16:22:27 +01:00
f880b60353 Depsgraph: Add missing cache file handling in build_id() 2018-12-03 16:05:17 +01:00
5a6f1fa563 Fix T58600: update OSL scripts to work with OSL 1.10.x. 2018-12-03 15:14:21 +01:00
95be6826e3 Data Transfer Modifier: fix mesh_get_eval_final usage.
It can't be used during modifier evaluation, and rna
enum code should access the evaluated objects.
2018-12-03 17:01:02 +03:00
1983a52e04 Depsgraph: assert that mesh_get_eval_final/deform aren't used in eval.
Using those functions during multithreaded evaluation is a sure
way to have a race condition and crash.
2018-12-03 17:01:02 +03:00
764e937d1a Fix T58258: Select Objects in Collection not working
Maniphest Tasks: T58258

Differential Revision: https://developer.blender.org/D4023
2018-12-03 14:19:52 +01:00
40f4343679 3D View: remove non tool-system ruler
There was duplicate code for the ruler being accessed
as a tool and an operator.

Remove the modal operator code in favor of tool access.
2018-12-03 21:21:36 +11:00
394b086b9c Fix T58556: Some remaining 'dupli_types' in pycode after renaming. 2018-12-03 10:39:54 +01:00
1ac7a840f6 Fix T58594: Modal circle select can't select & de-select 2018-12-03 19:32:42 +11:00
d89faac7d2 Merge branch 'master' into blender2.8 2018-12-03 19:31:54 +11:00
63d0ea8ecf Fix T58535 Crash on Load
The particles was not ready when the drawing cache try to use it.
2018-12-03 09:12:29 +01:00
6bb825e083 Fix T54580: Pointer buttons skip undo push 2018-12-03 18:43:33 +11:00
599f6c791a Merge branch 'master' into blender2.8 2018-12-03 18:07:50 +11:00
be2e549111 Use scene active object for sculptmode enter/exit calls
Match logic in previous commit.
2018-12-03 18:00:20 +11:00
f32dfd0819 Fix T56331: Undo crash w/ sculpt on hidden layer 2018-12-03 17:42:26 +11:00
2df86ca967 Fix T56642: 3D view gizmo orientation wont update 2018-12-03 16:52:21 +11:00
ffdc1f8924 Cleanup: warning, style 2018-12-03 16:50:50 +11:00
81c2fd25e5 Fix T58528: Assign material skips non-active 2018-12-03 15:53:31 +11:00
ff3601b9ae Fix/workaround T58368: Crash w/ mapped mesh + autosmooth 2018-12-03 14:58:29 +11:00
085e5765df Cleanup: remove flag from GizmoCommonData
Use struct member instead,
there are already many gizmo flags to keep track of.
2018-12-03 13:01:04 +11:00
4978ef5ed5 Fix T58573: Camera lens gizmo error on click 2018-12-03 12:55:55 +11:00
a205493426 Fix camera lens gizmo sensor comparison 2018-12-03 11:27:22 +11:00
63ac7c799c Fix T58566: Blender 2.7x keymap not correct for select all toggle and spacebar. 2018-12-03 00:40:09 +01:00
cf18eb2de3 Fix T56996: MacOS: Lagging when rotating the view
It happens on multiple configuration so we cannot isolate the fix to only
some config.

Thanks Hugo Lamarche for helping finding the fix.
2018-12-02 22:35:15 +01:00
756df74fca Fix T58101 : Image empties are only rendering their border when using MSAA 2018-12-02 20:11:40 +01:00
c44a203aa7 Texture Paint: fix fast selection update to also work without modifiers.
If there are no (non-deform) modifiers, the evaluated mesh simply
shares arrays with the base COW copy instead of having CD_ORIGINDEX.
2018-12-02 20:05:53 +03:00
4ee29d3fdf GP: Fix line primitive when using to square behaviour
Previously the shift key for line primitives only allowed diagonals.
This change allows the line to constrain to vertical and horizontal lines.

Differential Revision: https://developer.blender.org/D4012
2018-12-02 14:44:50 +00:00
ebfea8c2bb Fix texture previews not updating when parameters are changed.
Maybe there is a more correct way, but this works for now.
2018-12-02 14:57:52 +03:00
71c624dcd8 Partial fix for T58113 bevel harden normals bug.
This fixes the problem where not all faces got hardened properly
when using a hardening mode in the bevel modifier.
2018-12-02 06:29:58 -05:00
925380050d Keymap: fix error in recent enum-menu support 2018-12-02 15:09:15 +11:00
55b31dd98c Merge branch 'master' into blender2.8 2018-12-02 14:37:04 +11:00
335e1b507b Cleanup: BKE b-bone API naming
Use BKE_pchan_bbone prefix.
2018-12-02 14:29:54 +11:00
2e392a0fdc Merge branch 'master' into blender2.8 2018-12-02 14:16:09 +11:00
c00e1f68e9 Cleanup: BKE_effect.h naming 2018-12-02 14:14:51 +11:00
e1b8645c6a Keymap: use strict format for keymap definitions
Ensure we use lists for keymap items and item properties.

This means scripts can access keymap definitions from other layouts,
manipulating them without sometimes encountering a tuple that needs
to be converted into a list.
2018-12-02 14:02:03 +11:00
a56b024964 Cleanup: simplify poll function 2018-12-02 14:02:03 +11:00
28b83b34d4 Fix T57455: Fix faulty gpu detection 2018-12-02 03:49:54 +01:00
7be9bf43a4 Cleanup: de-duplicate gpencil material UI
Top-bar and properties-editor were near duplicates.
2018-12-02 13:26:39 +11:00
4320adbf86 Cleanup: remove redundant gpencil material checks
Poll checks for an object, no need to check for non-object
materials in the draw function.
2018-12-02 13:12:06 +11:00
2c6f767452 Add missing include 2018-12-02 13:12:06 +11:00
40d0374411 Fix T57455: Laggy, freezing UI with Linux and Intel UHD 620
Seems like a driver bug but doing glFlush() before these calls fixes it.
2018-12-02 01:57:30 +01:00
8c620c8e2b Optimize ghash usage
Avoid double hash calculation.
2018-12-02 10:15:22 +11:00
d3940c2211 Fix button data access for python context menus
D4016 by @raa
2018-12-02 10:15:22 +11:00
5d4073e248 Fix T58460: Proportional edit icon disappears 2018-12-02 00:05:01 +01:00
783d8d4adf Workbench: Don't use alpha channel if not doing render
Lower Vram usage a bit
2018-12-01 20:38:52 +01:00
505309f659 WM: Optimization: Don't clear the window color buffer
This is not needed and is rather costly.

Can be reverted if that causes problem.
2018-12-01 20:38:52 +01:00
d55c269dd1 UI: Simplify the area border drawing
Instead of doing a lot of alpha blended drawing with jittering, use the
fragment shader to do the masking using a circle mask.

This is much simpler and requires much less resources.

Hopefully this may solve the issue we have with the Intels UHD Graphics 620
on linux.
2018-12-01 20:38:52 +01:00
6a80a786f8 Fix T58433: Limit Distance constraint distance not auto-computed.
Another case of a value that needs to be written back to non-COW copy.
2018-12-01 20:02:14 +03:00
18f0618677 Fix T58412: in weight paint + pose mode certain armature operations crash.
The cause is that FOREACH_OBJECT_IN_MODE_BEGIN assumed that the active
object is in the correct mode, which is wrong in this case. It also
only considered objects of the same type as active, which had to be
replaced with an explicit type parameter.
2018-12-01 19:44:24 +03:00
9ed522db73 Fix more cases of evaluated mesh being built for non-COW objects. 2018-12-01 19:09:09 +03:00
dbb479b998 fix: Collada exporter has similar issue as reproted in T58150 2018-12-01 15:38:18 +01:00
0606829850 fix T58293 Collada: Does not export Texture coordinates when option 'only selected UV Map' is enabled 2018-12-01 14:18:35 +01:00
02a4fc1395 Texture Paint: implement efficient face selection updates.
Fix the old code that propagates selection changes to the
evaluated mesh directly without rebuilding, and avoid tagging
DEG_TAG_COPY_ON_WRITE if it succeeds.
2018-12-01 15:40:48 +03:00
ee8a2edb96 Fix usage of mesh_get_eval_final in vertex selection.
It's a very bad idea to call this on non-COW instances - see T58150.
Also, when rebuilding mesh it's better to accumulate mask flags to
avoid possible repeated rebuilds from different users.
2018-12-01 14:46:55 +03:00
47ef301c76 Texture Paint: fix face selection with subsurface. 2018-12-01 14:38:11 +03:00
b0ec08cfa1 Texture Paint: emulate subsurf optimal display in paint mode wireframe.
The wireframe is intended for showing selected faces, and selection is
based on original faces, so the extra wireframe lines are pure noise.
2018-12-01 13:44:29 +03:00
3bd057d472 Texture Paint: fix wireframe and hiding not working with subsurf.
The editflag field is only valid in the original mesh instance.
2018-12-01 13:20:18 +03:00
bfcd25b313 Texture Paint: avoid rebuilding evaluated mesh on first stroke.
Ensure all relevant CustomDataMask bits are set during normal evaluation.
2018-12-01 12:12:35 +03:00
32d46f7de6 Fix camera gizmo sensor check
Also correct wrong but harmless assignment.
2018-12-01 19:57:43 +11:00
2699ababa9 Cleanup: style 2018-12-01 19:55:52 +11:00
40f45a7eac Cleanup: redundant NULL checks
Also use unsigned shifting for values not in int range.
2018-12-01 19:36:57 +11:00
0f5b53ba4d Revert "Win32: Use the nicer looking blender-drawn confirmation message box when"
This reverts commit 60d6eb0b5d.

There is already a full patch (D3118) by brecht for this, will leave it up to him.
2018-11-30 23:29:32 +01:00
597d425638 Cleanup: duplicate include 2018-12-01 08:29:26 +11:00
81f898f053 Merge branch 'master' into blender2.8 2018-12-01 08:19:38 +11:00
a9bd788348 Cleanup: style 2018-12-01 08:15:25 +11:00
60d6eb0b5d Win32: Use the nicer looking blender-drawn confirmation message box when
quitting with unsaved changes, instead of an ugly messagebox
2018-11-30 21:11:59 +01:00
0b50ce1db4 Fix file browsers thumbnail selection with tablet failing, after recent changes. 2018-11-30 19:18:24 +01:00
4e92cc2759 Fix T58244: Proportional editing center is wrong
The global center was not calculated at all. Now a center is calculated using the selected points
2018-11-30 19:04:39 +01:00
8d4da34883 Fix T58267: node socket grabbing not working well with box select tool. 2018-11-30 18:27:36 +01:00
ed5202ac6a Fix T58235: broken baking of tangent space normals. 2018-11-30 16:28:56 +01:00
cedbaec468 Annotation: Replace ALT key to CTRL for Eraser
This makes the keymap consistent with Grease Pencil.
2018-11-30 16:23:36 +01:00
fe28554898 StudioLight Editor: Add copy settings and overwrite prompt
Copy settings let users create variations more easily.

Ovewrite prompt is there to be able to edit already existing studiolight.
2018-11-30 15:40:57 +01:00
4251ab4675 StudioLight Editor: Fix defaults 2018-11-30 15:40:57 +01:00
9ccf27d1f7 StudioLight: Renaming stuffs 2018-11-30 15:40:57 +01:00
909fa08a76 StudioLight: Add a 4th light to adjust lighting
There was a bug due to non-aligned struct in the DNA that prevented us
to increase the size of the userdef light array.

Since the studio lights are now presets and stored in external files,
there is no need to keep backward compatibility with theses lights.

Remove the old array and create a new one.

Add blue tint light for specular.
2018-11-30 15:40:57 +01:00
856b858f88 Studiolight: Fix bad memcpy size 2018-11-30 15:40:57 +01:00
e68c0bf76a Workbench: Add Shadow Focus and change Shadow Orientation
Shadow focus let the user choose how hard are is the shadows transition.
Harder shadow transition can be used for stylistic effects or more uniform
shading.

Make shadow orientation respect the same orientation as the studio light
(view from +Y direction aka. front view). Make the default shadow direction
more similar to the default light position (the default light object, not
the default studio lighting).
2018-11-30 15:40:57 +01:00
dabd6615cc Fix T58150: crash in Texture Paint after changing selection in Edit Mode.
Texture paint code was retrieving the evaluated mesh from the
original object, which isn't supposed to happen, so the cached
mesh isn't properly cleaned up by Edit Mode toggle.
2018-11-30 17:11:50 +03:00
06df05a35b Merge branch 'master' into blender2.8 2018-11-30 12:16:19 +01:00
ed07bccf7c Fix missing "need eval data" for texpaint mode toggle op.
Note that am not sure that is actually needed, since switching to that
mode does not actually use any eval data, it's only needed during init
of first stroke... But in doubt, that won't hurt to have it here anyway.
2018-11-30 11:59:16 +01:00
180e871020 Cleanup: remove useless depsgraph parameter in some texpaint helper func. 2018-11-30 11:59:16 +01:00
84285c1e34 Fix T58275: WITH_OPENSUBDIV not enabled by default with some CMake versions.
Solution provided by Ulysse Martin.
2018-11-30 11:52:39 +01:00
8c01e71cda GP: Fix ALT key conflict with Eraser 2018-11-30 11:05:00 +01:00
ba4d920ab5 Fix Alt key conflict in Annotation Eraser
There was a conflict when the Alt key was pressed while drawing and this makes eraser very difficult.
2018-11-30 10:58:37 +01:00
a8c884c3ba Fix T58279: crush when load this scene _ with simple materials and simple objects.
Not sure why eevee's light_cache is NULL in that file, but this can be
handled gracefully instead of crashing. ;)
2018-11-30 10:45:16 +01:00
530e567578 Revert "3D View: locked camera was using the original view offset"
This reverts commit 3f31c28a02.

Gives issues zooming, could be resolved but it mostly worked OK before,
and it's not a priority to spend time on, so leave as is for now.
2018-11-30 19:01:06 +11:00
cff0dfea9a Be sure Annotations use default color and thickness
Depending of the last tool used, the Note layer was created when draw but it was using the wrong color and thickness.
2018-11-30 08:57:36 +01:00
d12461a9ba Merge branch 'master' into blender2.8 2018-11-30 18:16:21 +11:00
3f31c28a02 3D View: locked camera was using the original view offset
Now used the original dist instead, since using the distance between
the camera and the views offset may seem random from the users POV.

This addresses strange behavior noticed in T56934.
2018-11-30 18:15:06 +11:00
cb8afaf5db Merge branch 'master' into blender2.8 2018-11-30 17:07:59 +11:00
6e253fc627 Correct missing semicolon in recent commit 2018-11-30 17:07:13 +11:00
0f17425d6e Fix T58255: "Set Spline Type" missing in the menu 2018-11-30 16:40:39 +11:00
a760e73dcf Merge branch 'master' into blender2.8 2018-11-30 15:49:06 +11:00
6429e6c91e Cleanup: ensure '_END' macros end with a semicolon
Missing these breaks auto-indent for editors that don't expand macros.
2018-11-30 15:35:15 +11:00
Dalai Felinto
a687d98e67 Remove from Local View operator
This was the old, obscure, little known, M shortcut operator when in local view
back in the 2.7x days.
2018-11-30 02:28:41 -02:00
3612ce5579 Cleanup: name macros w/ matching BEGIN/END 2018-11-30 15:22:01 +11:00
8f8c238659 Merge branch 'master' into blender2.8 2018-11-30 15:11:32 +11:00
8c85f1316c Cleanup: name macros w/ matching BEGIN/END 2018-11-30 15:08:47 +11:00
c312cc171b Merge branch 'master' into blender2.8 2018-11-30 14:58:46 +11:00
28316493bd Cleanup: style 2018-11-30 14:56:20 +11:00
bae188bf46 Cleanup: duplicate include 2018-11-30 14:23:13 +11:00
0b044a4ab2 Cleanup: style 2018-11-30 14:23:10 +11:00
1119f1eb3b Fix sculpt app-template editing the users startup 2018-11-30 13:33:17 +11:00
7e21c99d05 PyAPI: add load_factory_startup_post handler
Needed so we can apply changes to the startup file,
only in the case when it's load loaded from a user-saved startup.
2018-11-30 13:33:13 +11:00
dc312609dd Merge branch 'master' into blender2.8 2018-11-30 13:24:17 +11:00
dd8469608b Cleanup: unused return arg 2018-11-30 13:21:12 +11:00
1965db2be2 Workbench: StudioLight: Fix worldspace rotation 2018-11-30 02:02:36 +01:00
6a4f5f6eb4 Workbench: Cleanups & Simplifications
* Move the curvature computation to the cavity pass: One can argue it's not
  the best performance wise (it gets a tiny perf pernalty if it is done
  alone without the ssao), but it make the code cleaner and reduce
  considerably the number of shader variation possible.
* Lower shader variation to 2^8 instead of 2^12
2018-11-30 02:02:36 +01:00
e1023014f4 GPUTexture: Add support for GL_R16 texture format 2018-11-30 02:02:36 +01:00
4c31bed6b4 Fix T57981: Crash entering sculpt mode 2018-11-30 11:46:42 +11:00
7ec5a68091 Fix T58240: mathutils.noise.voronoi crash 2018-11-30 11:22:17 +11:00
76a5e2abe3 UI: helpful text when favourites menu is empty 2018-11-30 10:44:39 +11:00
63c0653170 Merge branch 'master' into blender2.8 2018-11-29 23:54:30 +01:00
William Reynish
679b156756 Icons: uv-sculpt 2018-11-30 09:51:56 +11:00
4390101205 UI: move curve point/segment menus into header
Now matches mesh vertex/edge/face menu placement.

Also move some menu items to match mesh vertex menu.
2018-11-30 09:48:25 +11:00
a8b8da5567 Fix T58183: crash with CPU + GPU rendering after profiling changes.
Multi-device was not passing along profiler to the CPU.
2018-11-29 23:43:27 +01:00
b49a398baa Fix T58213: Crash w/ Vertex paint average 2018-11-30 09:29:30 +11:00
f81aeac2bc Docs: rename group -> collection 2018-11-30 09:10:40 +11:00
8c9d632128 Cleanup: de-duplicate default object tools 2018-11-30 09:06:36 +11:00
bb4e53faf2 Tool System: add tools for edit-mode surface 2018-11-30 09:02:11 +11:00
2a8f6946fe Docs: update quickstart for 2.8 2018-11-30 08:53:36 +11:00
6af997710b Merge branch 'master' into blender2.8 2018-11-30 08:39:59 +11:00
8ac2d85d2f Cleanup: trailing space 2018-11-30 08:38:25 +11:00
c754b2239c Fix T58196: Annotation thickness is 0
When the annotation is created by other tools, the thickness was set to 0
2018-11-29 22:34:59 +01:00
6dbc820633 Fix crash creating enum tooltips
Error from recent changes to shortcut display.
2018-11-30 08:03:30 +11:00
0487089c31 Enable annotations when GP object is selected.
Now when try to add annotation, if a grease pencil object is selected, first the object is unselected. This solution is not perfect but it's better than cancel the annotation.

Thanks Dalai for his help.
2018-11-29 21:59:57 +01:00
6cfed6d775 UI: Minor changes to studiolight user preferences 2018-11-29 21:52:36 +01:00
030f9d084d Workbench: Add button to go out of studiolight edit mode
This makes it more clean why you cannot choose studio lights in this mode.
2018-11-29 21:52:36 +01:00
4851ec7f19 Workbench: Add 4 default studio lights
Made by me. Not definitive, subject to change.
2018-11-29 21:52:36 +01:00
48a7785fd4 Workbench: Add option to have world space lighting in studio light mode
This option is per viewport.

Having view space shading make sense when working on isolated objects like
if you were holding them in your hands. But for entire scene work, it is
better to have the lighting fixed to have a better spatial representation.
2018-11-29 21:52:36 +01:00
844788a36c Workbench: Add back studio lighting presets
This changes a bit how the userprefs solid lights works. They are not
visible until enabling the "Edit Solid Light" checkbox. Once enabled the
current studiolight used for solid mode will be overwritten.

Once the lighting settings are tweaked, the user can click the
"Save as Studio light" button to save the current settings.
This makes it easy to create new lighting without messing the other
presets.

The studio lights are stored as ASCII files on the disk using a dead
simple custom format.

The UI/UX is not perfect and will be improved in other commits.

Also includes:
* Separate LookDev HDRI selection from Solid Lights
* Hide LookDev HDRIs from the Solid Lights selection list
2018-11-29 21:52:36 +01:00
8f4ab480bf Workbench: Rename orientation to type and Camera studio light to Studio 2018-11-29 21:52:36 +01:00
18c9101acc Templates: tweak sculpt to work w/o opensubdiv 2018-11-30 07:23:41 +11:00
23284e4dde add: visual studio Compiler warning (order of attribute init in c++ constructors) 2018-11-29 18:33:46 +01:00
e03eaf5b81 Fix wrong property name in preview render Python script. 2018-11-29 18:26:48 +01:00
3c767cecce add: visual studio Compiler warning (order of attribute init in c++ constructors) 2018-11-29 17:04:12 +01:00
26d5a3625e Texture Paint: fix artifacts when using masks with symmetry.
For most brushes, texture painting uses a special mask accumulation
table in order to ensure that the amount of added color only increases
when the same pixel is touched multiple times by the stroke.

Unfortunately, only the mask texture was added to the mask before
this check, while normal, stencil, texture alpha masks were applied
after this check. This means that the check can pass if e.g. the
pressure is increased, but the final mask value is actually lower.
One might think that the mask values are fixed per pixel, but with
symmetry that isn't true. The result is a nasty stripe artifact due
to the discrete cutoff nature of the accumulation test.

In order to fix this, apply all masks before accumulation.
2018-11-29 18:57:10 +03:00
43e7c5dd43 Bump version to 2.80 beta. 2018-11-29 16:50:01 +01:00
919503d204 New splash image for Beta.
This one focuses on the development fund campaign. We plan to do more
more splash updates during the Beta.
2018-11-29 16:50:00 +01:00
7c6fc8b275 Merge branch 'master' into blender2.8 2018-11-29 16:49:21 +01:00
1f5216c57a GP: Add option to draw primatives from center
This allows primatives to be drawn from the center using the ALT key.
Also fixes SHIFT constraint not working correctly in all directions.
Both options can be used together.

Differential Revision: https://developer.blender.org/D4009
2018-11-29 15:44:20 +00:00
2c154399a2 Fix internal compiler error when building with VS 2017 (15.9.3).
It doesn't like alignment for function arguments, and I don't think this
alignment is needed.

Solution found by Ray Molenkamp.
2018-11-29 16:42:52 +01:00
1c0bc19e3f Fix T57796: bad 'draw emitter' conversion, importing shared particle systems from 2.79b to 2.80
Not sure what those #ifdef's were supposed to do exactly... But one
thing is for sure, clearing that flag in particlesettings after first
encounter would prevent transferring it properly to other objects that
would use same particlesettings.
2018-11-29 16:25:23 +01:00
51c85a23ca Cleanup: mark PART_DRAW_EMITTER of ParticleSetting drawflags as dreprecated. 2018-11-29 16:25:23 +01:00
e6605d5f37 Fix depth offset in paint mode wireframe.
The original offset was wrong because it applied a constant to
homogenous coordinates (the actual depth is z/w), which broke
totally if near clip distance was reduced.

A correct depth offset has to take slope into account like
glPolygonOffset in order to avoid dotted lines caused by
interpolation precision variations. When drawing wire lines
however only the slope of the line itself is accessible, so
also generally increase the offset when the object is close.
2018-11-29 17:51:43 +03:00
4c2a3b4701 Fix T57878: 2.8 Opening project in Blender Crashes.
Crash was due to some modifier trying to access the editmesh of its
target just after loading, when that editmesh has not yet been
re-created...
2018-11-29 15:49:09 +01:00
3cc0eb36c3 Fix T58068: gizmo crash for bone on a disabled armature layer
Maniphest Tasks: T58068

Differential Revision: https://developer.blender.org/D4004
2018-11-29 14:28:43 +01:00
28d2058e2c Fix rotate around point under cursor 'seeing' hidden faces in paint modes. 2018-11-29 14:25:16 +03:00
fbb19bcaf9 UI: make Q key available for quick favorites in clip editor. 2018-11-29 12:23:51 +01:00
213414674b Fix T58105: Subdivision Set operator stuck in relative mode
Maniphest Tasks: T58105

Differential Revision: https://developer.blender.org/D4007
2018-11-29 12:21:20 +01:00
3aed46a6cf Fix T58100: Crash on bpy.context.object.visible_get()
Maniphest Tasks: T58100

Differential Revision: https://developer.blender.org/D4003
2018-11-29 12:17:03 +01:00
63521f57ed UI: put clip editor annotation panel in own tab in sidebar. 2018-11-29 11:57:06 +01:00
9888374f4b Transform: re-revert new user-axis-first behavior
This restores old behavior but leaves in new code
which is more flexible.

See: 6491d50d02 for feedback on why this isn't ideal.
2018-11-29 21:52:38 +11:00
4f997c0ebb Revert "Transform: use scene-orientation for MMB axis constraint"
This reverts commit 78a6c2e12c.
2018-11-29 21:52:38 +11:00
c007e3be72 UI: add back clip editor tool tabs until there is a toolbar. 2018-11-29 11:30:56 +01:00
8a92976254 Fix T57653: Fix T58075: Crash when switching between Edit and Sculpt/Paint modes.
Sculpt (and paint) modes rely on valid evaluated data at their initialization.

Added code to ensure that in `ED_object_mode_toggle()`, when relevant
toggle operator requires it (looks like sculpt/paint should be the only
ones affected, although particle edit may be too...).
2018-11-29 10:42:56 +01:00
f24147d459 Merge branch 'master' into blender2.8 2018-11-29 09:35:39 +01:00
b00819bcca Atomic: Avoid conflicts with definitions in other areas
While atomics library was trying to use "user-space" defined
LIKELY() and UNLIKELY(), this is not always true that user
code was checking for those macro coming from an unrelated
area.
2018-11-29 09:33:50 +01:00
068b61e5e9 UI: menu items for Ctrl-Tab dope sheet/graph switching
Make this shortcut discoverable.
2018-11-29 19:07:00 +11:00
9f2bc87e57 UI: update shortcut display to check space cycling 2018-11-29 18:45:37 +11:00
301e3155ec Keymap: cycle space-subtypes on successive presses
Some space types are exposed as multiple space types,
previously the key binding to set the space type would use the last
used space-type.

Now pressing the key again cycles to the next space sub-type.

Without this, shortcut display is confusing since some space types share
a key. Keymap display will need to be updated to support this.
2018-11-29 18:17:08 +11:00
8055871e5b UI: support enum key shortcut detection
Shows shortcuts in space-selector.
2018-11-29 17:32:35 +11:00
a740cc53ea Fix paint initialization, incorrect pointer checks 2018-11-29 15:19:29 +11:00
6e24dd9a1e Fix T58125: UV Editor transform fails 2018-11-29 14:45:48 +11:00
559fff160e Debug: Assert to ensure layer iterator uses a 3D view 2018-11-29 14:34:48 +11:00
9893fee4e6 Merge branch 'master' into blender2.8 2018-11-29 12:55:58 +11:00
140f2209b6 Cleanup: correct typo, no need for ./ prefix 2018-11-29 12:54:30 +11:00
2089feeb1b Fix leak in CPU brand check 2018-11-29 12:52:39 +11:00
535984a848 Cleanup: simplify transform orientation cycling
Remove dummy first index, store a pointer to the user orientation
instead of having it store twice (which could get out of sync).
2018-11-29 12:49:02 +11:00
7fa6f72084 Cycles: Add sample-based runtime profiler that measures time spent in various parts of the CPU kernel
This commit adds a sample-based profiler that runs during CPU rendering and collects statistics on time spent in different parts of the kernel (ray intersection, shader evaluation etc.) as well as time spent per material and object.

The results are currently not exposed in the user interface or per Python yet, to see the stats on the console pass the "--cycles-print-stats" argument to Cycles (e.g. "./blender -- --cycles-print-stats").

Unfortunately, there is no clear way to extend this functionality to CUDA or OpenCL, so it is CPU-only for now.

Reviewers: brecht, sergey, swerner

Reviewed By: brecht, swerner

Differential Revision: https://developer.blender.org/D3892
2018-11-29 02:45:24 +01:00
27cccaeccd UI: expand set origin in specials menu
Also remove menu, expand operator instead.
2018-11-29 12:24:20 +11:00
8850875866 Fix transform axis orientation cycling
This ignored operator defined orientation.
2018-11-29 09:41:44 +11:00
f1edccdbe1 Cleanup: remove unused files 2018-11-29 09:05:49 +11:00
b02696f855 CMake: add missing files 2018-11-29 09:01:03 +11:00
1e10206590 Merge branch 'master' into blender2.8 2018-11-29 08:55:34 +11:00
fb057153b0 CMake: update checker
Support skipping cmake files
2018-11-29 08:55:05 +11:00
67d77f47f0 Fix leak in CPU brand check 2018-11-29 08:22:15 +11:00
ce84d64546 UI: rename Center Points -> Origins
See: T56648
2018-11-29 08:19:57 +11:00
7ced3da6ac GP: Cleanup duplicated code moving to function 2018-11-28 20:15:02 +01:00
0f4cc474c9 Fix broken subdivision surface edit mode cage display. 2018-11-28 20:13:28 +01:00
bad0ace6a0 Fix COLLADA build warning.
This properties does not appear to be used anymore.
2018-11-28 20:06:25 +01:00
William Reynish
ec8e8562f0 Fix instancing tooltips still using old dupli name. 2018-11-28 20:06:25 +01:00
94a069a795 Startup.blend: rename Lamp to Light. 2018-11-28 20:06:25 +01:00
5c48b97e8c GP: Deselect points if click outside selection area
To make consistent with Left click select, now if click outside any point, all points are deselected.

Reduced the circle of selection to get more precission. The radius used before was too wide.

Note: There is a minimum distance to consider outside selection area.
2018-11-28 19:44:41 +01:00
303b49ea37 Add Onion Skin support to Annotations
The old onion skinning used in 2.7x has been ported and converted to 2.8. Only basic features have been included. For more advanced onion skin features, use grease pencil objects.

Onion Skin is supported in View 3D and Sequencer.
2018-11-28 19:19:53 +01:00
565de7750b Use term Instancing in the interface
Currently only see this in object's properties, but might
be missing something.

Part of T56648.
2018-11-28 18:22:51 +01:00
7c7f3776dd Use collection and instance terminology in Python API
This follows naming convention agreed on in T56648.
2018-11-28 18:22:51 +01:00
98ecab1af0 Fix T56906: Mesh from Curve not working on curves beveled by curves.
Not exactly sure why we did not have cached displist for bevel object
here... But anyway, that conversion operation should really happen
outside of depsgraph evaluation area, so makes sense to do it as when
generating geometry for rendering, imho. Also solves issues like loosing
hidden parts of the curve/surface, etc. Still using viewport resolution
for curves, though.
2018-11-28 18:16:48 +01:00
6d2da3950e cleanup: Collada replaced outdated usage of CD_MTFACE Layers by CD_MLOOPUV 2018-11-28 18:14:12 +01:00
91795e756c Merge branch 'master' into blender2.8 2018-11-28 18:05:59 +01:00
2b371b65bc More fixes for NUMA on macOS 2018-11-28 18:05:35 +01:00
11ff47a134 Merge branch 'master' into blender2.8 2018-11-28 17:57:37 +01:00
8a6aa15903 Fix compilation error on macOS 2018-11-28 17:57:04 +01:00
bef9f42ef0 Merge branch 'master' into blender2.8 2018-11-28 17:55:27 +01:00
547bc2a620 Fix compilation error on 32bit Windows 2018-11-28 17:54:58 +01:00
278d9c8322 Merge branch 'master' into blender2.8
Conflicts:
	source/blenderplayer/CMakeLists.txt
	tests/gtests/blenlib/CMakeLists.txt
2018-11-28 16:52:47 +01:00
c16321cb9d Fix building gtests and bplayer after recent NumaAPI addition.
Seriously... like, seriously...
2018-11-28 16:50:02 +01:00
6fd5f95ca1 Fix (unreported) Cycles not rendering correctly modified curves/surfaces/texts.
Meshes from evaluated objects may already have modifiers applied, but
that's not the case for curves, we need to do that when converting them
to meshes.
2018-11-28 16:25:15 +01:00
e392e03354 UI: Layout tweaks to Studio Lights panel in Preferences.
Move Studio Lights panel first, and use single-column layout.
2018-11-28 16:24:55 +01:00
2d720f51cd Workbench: Change Studio lighting
This is in order to have more flexible ligthing presets in the future.
The diffuse lighting from hdris was nice but lacked the corresponding
specular information. This is an attempt to make it possible to customize
the lighting and have a cheap/easy/nice-looking pseudo-PBR workflow.

* Add cheap PBR to Workbench with fresnel and better roughness support.
  This improves the look of the metallic surfaces and is easier to control.
* Add ambient light to studio lights settings: just a constant color added
  to the shading.
* Add Smooth option to studio lights settings: This option fakes the
  effect of making the light bigger making the lighting smoother for this
  light. Smoother lights gets reflected like a background hdri.
* Change default light settings to include the smooth params.
* Remove specular highlights from flat shading. (could be added back but
  how do we make it good looking?)
* If specular lighting is disabled, use base color without using metallic.
* Include a lot of code simplification/cleanup/confusion fix.
2018-11-28 15:59:56 +01:00
52458ab49d GPU: Add AMD Radeon RX series to macos blitting workaround list
Fixes T55987
2018-11-28 15:59:56 +01:00
dd102a4757 fix:T58093 Collada Exporter does not create bind_vertex_input and texcoord attribute
The Collada exporter used MTFACE layers (deprecated) instead of
CD_MLOOPUV layers. In 2.8 the exporter could no longer find the UVMaps
reliably.
2018-11-28 15:36:09 +01:00
3ed0d5b4d4 Merge branch 'master' into blender2.8 2018-11-28 14:42:38 +01:00
ce927e15e0 Tweaks for threading schedule for Threadripper2 and EPYC
The idea is to make main thread and job threads to be scheduled
on CPU dies which has direct access to memory (those are NUMA
nodes 0 and 2).

We also do this for new EPYC CPUs since their NUMA nodes 1 and 3
do have access but only to a higher range DDR slots. By preferring
nodes 0 and 2 on EPYC we make it so users with partially filled
DDR slots has fast memory access.

One thing which is not really solved yet is localization of
memory allocation: we do not guarantee that memory is allocated
on the closest to the NUMA node DDR slot and hope that memory
manager of OS is acting in favor of us.
2018-11-28 14:41:22 +01:00
b3e2c69416 Add utility function to query CPU brand string 2018-11-28 14:35:26 +01:00
683662e630 Add cross-platform NUMA library
Makes it simple to use NUMA libraries on various platforms.
2018-11-28 14:35:26 +01:00
2bd62b076f Outliner/visibility: revert changes for now until we find better solutions.
See T57857 for discussion. This reverts:

"Outliner: Do not gray out empty collections"
4521d3e707.

"Remove eye column from the outliner"
fd16b35997.

Fix/workaround issues in pose and edit mode"
6d2e2e30d5.

"Per view-layer collection visibility"
4de6a210c6.
2018-11-28 14:34:13 +01:00
cb9c4b4552 Fix defined but unused static variable warning 2018-11-28 14:13:42 +01:00
dac747bd09 UI: rename settings back to preferences.
This distinguishes it better for the many other types of settings.

Ref T54115.
2018-11-28 13:58:35 +01:00
1a8d998868 Tool System: support for dynamic tooltips
Tools can define a function that generates the tooltip using a function,
this takes the tools keymap as an argument which can be used
to extract keys to include in the tip.
2018-11-28 23:53:27 +11:00
43248164a4 PyAPI: add KeyMapItem.to_string() method
Useful for generating dynamic tooltips that include shortcuts.
2018-11-28 23:26:32 +11:00
edbf15d3c0 Defaults: left click select is now the default.
A few reasons motivating this change:
* It works well for all devices: mouse, trackpad, and tablet pens.
* For beginners or users coming from other software, it's easier to get
  started and avoids an initial stumbling block.
* Many users in 2.7 (about half?) were already using left click select, so
  combined with the above advantages it makes for a practical default.

Note that we continue to support right click select, as many experienced
Blender users (and developers) see efficiency advantages in this approach.

The option to switch is in the first time setup splash screen, and in the
user preferences.
2018-11-28 11:36:13 +01:00
9c8d31520d Fix curve stats when using modifiers.
Curve/surface/text final data may be an evaluated mesh instead of a
displist, when some modifiers (constructive ones in particular) are
applied to it.

Note that this is just getting feet wet, whole draw code suffers from
the same issue! :P
2018-11-28 11:21:56 +01:00
6d2e2e30d5 Fix/workaround issues in pose and edit mode
Edit mode was unable to select, pose mode was unable to move bones.
2018-11-28 10:36:07 +01:00
ff0a29df14 Fix crash entering editmode 2018-11-28 20:26:40 +11:00
78a6c2e12c Transform: use scene-orientation for MMB axis constraint
Follows the change made for axis keys.
2018-11-28 19:48:19 +11:00
7ecdcfe173 Cleanup: quiet keymap float compare warning 2018-11-28 17:50:44 +11:00
c527c78174 Cleanup: remove missing operator from UI 2018-11-28 17:48:26 +11:00
b1d67e6aab Tool System: add node links cut tool 2018-11-28 17:37:40 +11:00
c2863326af Cleanup: correct assert, remove redundant NULL checks 2018-11-28 17:20:23 +11:00
ca05985ca7 Gizmo: fix compositor node crop w/ negative rectangles
min/max could be negative, causing the gizmo to fail.
2018-11-28 17:02:03 +11:00
62edc31d34 Cleanup: correct function signatures 2018-11-28 16:21:24 +11:00
0c8a7069b5 Fix assert opening file selector 2018-11-28 16:20:57 +11:00
Dalai Felinto
4de6a210c6 Per view-layer collection visibility
We still control this in the viewport collections visibility menu. But
now we are actually changing the visibility of the collections, not of
the objects.

If a collection is indirectly invisible (because one of its parents are
invisible) we gray it out.

Also if you click directly in the collection names, it "isolates" the
collection by hiding all collections, and showing the direct parents and
all the children of the selected collection.

Development Note:

Right now I'm excluding the hidden collections from the depsgraph.
Thus the need for tagging relations to update.

If this proves to be too slow, we can change.
2018-11-28 02:33:04 -02:00
Dalai Felinto
4521d3e707 Outliner: Do not gray out empty collections
We can still have a special icon for them, but graying out is not the way to go.
2018-11-28 02:33:04 -02:00
Dalai Felinto
fd16b35997 Remove eye column from the outliner
To control per-viewlayer, per-object visiblity users should either use
the menu or the H shortcuts (H, Alt+H, Shift+H).

Following next will be to have proper per-viewlayer collection
visibility. This will replace the functionality currently at the
viewport collections visibility menu.
2018-11-28 02:33:04 -02:00
b5ba5a0b94 Correct error clearing runtime tool in recent commit 2018-11-28 14:11:10 +11:00
b58d4e7fe4 WM: remove tool initialization code
Area initialization handles these cases now.
2018-11-28 13:58:53 +11:00
ba8c21989c WM: avoid re-initializing tools while resizing areas
Every update caused the gizmo to be recreated.
2018-11-28 13:50:15 +11:00
dcf0860dab Fix tool not being initialized switching windows 2018-11-28 13:41:36 +11:00
5429536904 RNA: disable animating sequence channel, lock 2018-11-28 12:16:24 +11:00
3377241f1e Scene: 3D cursor rotation wasn't initialized 2018-11-28 11:50:46 +11:00
4c6e7ef11f Missing from last commit 2018-11-28 11:27:06 +11:00
43512b06b3 Cleanup: remove unused app-template flag 2018-11-28 11:24:45 +11:00
36da85ebeb Cleanup: style 2018-11-28 11:24:45 +11:00
Dalai Felinto
37b882982a Local View: Objects to be selected once back to regular view
They were already selected, but we needed to bump depsgraph.
2018-11-27 22:17:59 -02:00
1b870bce85 Tool System: remove custom tool registration
API is not ready for beta (likely to change).
2018-11-28 10:40:02 +11:00
6491d50d02 Transform: default to user-defined orientation
Previously we tried this but reverted (see 64d40c82c3)
because there wasn't a predictable set of keys to use global-space.

Now the keys are swapped:

- 'GX' always transforms in the user defined orientation.
- 'GXX' always transforms in global space.

As before 'GXXX' cycles back to disabling constraints.

This does have a down side that GXX won't be used for local-space
when the user has global space set.
Also, when global is the user-orientation, pressing GX and GXX
does the same thing.

Note: examples here use GX but could be any transform-mode/axis.
2018-11-28 10:15:02 +11:00
437d7d7cb9 UI: Reduce amount of padding between VSE channels.
Suggested by cezarfarias on RightClickSelect. Code snippet by MalDuffin.
2018-11-27 23:25:48 +01:00
9d535f7ce8 Print filepath in message when saving userprefs
Was just printing 'ok' on success.
2018-11-28 08:35:37 +11:00
c28fe9c304 transform_snap_object: Fix snap in edit mode.
Do not use the texture space of a mesh to pretest the snap.
(The texture space is only really updated when you exit edit mode).
2018-11-27 18:24:22 -02:00
3f33b4573d Keymap: Change default spacebar action to play
This has been a contentious topic: Artists at the Blender-Studio prefer
this behavior, while the user community overwhelmingly prefers 2.7x
operator search. Previously this defaulted to accessing tools
(eg: Space-T activates transform.. Space-R rotate etc) which I still
believe is a better long term default - otherwise we don't have
efficient tool switching for a system we intend to make more use of,
nevertheless as far as I can tell users haven't been keen on adopting
this so far. Show the preference on the setup screen since many users
don't animate and will may want to quickly search or switch tools.
2018-11-28 08:00:04 +11:00
9d4129eee6 Modifiers: fix bunch of missing 'self transform' deg relations.
When a modifier depends on some other object's position, then it also
depends in its own position, this has to be also told to depsgraph.

Fixes several modifiers where moving target would update the modifier,
while moving modified object itself would not.
2018-11-27 21:17:06 +01:00
0ebb632f69 Fix missing reset-to-NULL in own recent changes in modifiers utils. 2018-11-27 21:17:06 +01:00
013a5c8b77 MOD_wave: fix various issues.
Missing dependsOnNormal callback, potential usage of NULL mesh
pointer, style...
2018-11-27 21:17:06 +01:00
930a3813fe Shrinkwrap: minor simplification of code. 2018-11-27 21:17:06 +01:00
1f1ea26d8c Fix typos. 2018-11-27 21:17:06 +01:00
2a578b37b3 Modifiers: cleanup/harmonize deform modifiers code re. mesh source.
Also fixes a few issues (like meshdeform's EM variant not using editmesh
data), and adds a few optimizations (like only generating that source
mesh when we do have a vgroup defined in parameters, for modifiers only
using it to access vgroup)...
2018-11-27 21:17:06 +01:00
22e6ae11b4 VGroup search: do not try to search for empty string.
Vgroups always have a non-empty name, this is just loss of time...
2018-11-27 21:17:06 +01:00
b4087ea639 Modifiers: Refactor MOD_deform_mesh_eval_get() helper a bit.
Now that function also takes expected number of vertices, and do the
checks against generated mesh internally.
2018-11-27 21:17:06 +01:00
4543da6ca6 MOD_simpledeform: do not compute mesh when not needed.
Related to T57972.
2018-11-27 21:17:06 +01:00
c89bb6f165 MOD_smooth: do not compute mesh when not needed.
Related to T57972.
2018-11-27 21:17:06 +01:00
9c82cc5123 MOD_smooth: do not compute mesh when not needed.
Also fixes potential memory leak.

Related to T57972.
2018-11-27 21:17:06 +01:00
bd957435ac Cleanup: tweak ED_region_is_overlap checks 2018-11-28 06:31:13 +11:00
0ed4cadf5a Docs: use float in bpy.app.timer examples
Makes it clear seconds are not integers,
also avoids conversion to float.
2018-11-28 06:09:42 +11:00
Dalai Felinto
e9875fc82c Fix local view undo (T58051)
Like in 2.7x we don't restore the previous view zoom.

This goes along the fact that we don't store viewport navigation
transformations either.
2018-11-27 16:50:07 -02:00
Dalai Felinto
9c546c70d7 Fix localview duplicated objects not in localview
Following the behaviour present in Blender 2.7x, where if you duplicate
an object it will show in all the local views the original object was
visible.
2018-11-27 15:11:25 -02:00
365a5b75c1 Partial fix for T57868, crash when using bevel from Python.
These changes are necessary. Need to mark vertices of edges passed
in geom; also the normals.out slot has a custom element type, not
ELEM, so need to prevent attempt by python code to convert it to
an elem.  But this leaves a memory leak. I will rework code to not
use normals.out slot at all, but that's a bigger fix.

Now there is a crash in a different place (GPU code). Think that if
using Op on its own (instead of from edbm_bevel_calc, there needs to
be a dependency graph update and maybe more?
2018-11-27 09:59:03 -05:00
1d4ad68198 Workbench: Fix crash when enabling cavity 2018-11-27 15:08:35 +01:00
86e88df03c Fix outliner click select with tablets, after recent changes. 2018-11-27 15:04:42 +01:00
b71006ceed Fix T58088: OpenSubdiv not enabled by default in macOS builds. 2018-11-27 14:40:25 +01:00
a80ddb7f9a Fix file browser click to select not working on tablets, after recent changes.
The highlight on mousemove operator should not swallow events.
2018-11-27 14:21:04 +01:00
0217af2f99 UI: Bring back User Preferences entry in Editors list.
It's nonstandard and kind of weird, but it's nice when making keymaps, themes, quickly test things without spawning a new window.
2018-11-27 14:19:06 +01:00
32ab0647a5 DRW: Implement Hair Weight drawing
Fixes T57931 Particle weight edit mode is not supported.

There is a bug that prevent refresh of the toolsettings on which is based
the weight / non-weight display selection (see T58086).
2018-11-27 13:49:22 +01:00
4c1a01d1a0 fix: Collada Exporter: improve usage of viewlayer and depsgraph
* The exporter now gets the view layer from the context
  instead of the depsgraph.
* The depsgrap is now fetched only on demand since the graph
  is not always needed for exporting (currently only for armature exports).
2018-11-27 12:22:30 +01:00
dcb86689b0 Python API Docs: Examples for new timer api 2018-11-27 11:31:48 +01:00
39dcf6a10a make node editor tool region background transparent
followup to rB1944bca49a22c18b059d84daf56908b6e15591ad

Differential Revision: https://developer.blender.org/D3999
2018-11-27 11:09:56 +01:00
00d438639d Fix T57929: missing UI updates when changing active object
was caused by NC_SCENE notifier being skipped with a non-scene reference
showed e.g. in timeline not updating keyframes/cachelines

Maniphest Tasks: T57929

Differential Revision: https://developer.blender.org/D4000
2018-11-27 11:07:44 +01:00
884638494d Python API: Fix partial build
`gpu_extras` was always visible
2018-11-27 10:56:37 +01:00
47bf0a33ef Fix T57070: Take Two of 2.8 Crash in sculpting mode with tilling and Dyntopo.
Accessing ob->bb directly is not a good idea anyway.

Still, would like to know why/where this bbox is freed, since it is
allocated at least once by depsgraph eval, as part of
`BKE_object_handle_data_update()` function...
2018-11-27 10:43:01 +01:00
1944bca49a Tool System: use tools for node editor 2018-11-27 18:43:08 +11:00
1f8360171c Keymap: share annotation tool keymaps between spaces
Not sharing caused duplication in the keymap and
required a factory class generator.

Simplify tool & keymap definitions by sharing them.

It's highly unlikely we will ever want these to use different keys
once they're set as the active tool.
2018-11-27 17:52:15 +11:00
a58f0eea4f RNA: expose access to B-Bone shape data from Python.
B-Bone shape is a non-trivial computation, so access to
the results would be useful for Python scripts working with
B-Bones, e.g. rig generation.

This exposes both final segment matrices, and the tangent
vectors computed from the custom handle bones.

Since the handle tangents use the axis+roll orientation math
of edit bones, add matrix conversion static methods to Bone.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3983
2018-11-27 09:31:34 +03:00
fe65867c3d WM: add print for missing tool keymap
Also correct function name (gizmo -> tool).
2018-11-27 17:06:43 +11:00
09f97f937d Cleanup: move non-toolbar panels out of the toolbar 2018-11-27 15:25:52 +11:00
030830be9a Revert "Fix texture space not updating in edit mode."
This reverts commit 3a038db576.

Caused CoW crash switching from edit to sculpt mode.
2018-11-27 14:18:44 +11:00
6fcaa5de06 Revert "Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion."
This reverts commit e6322abad2.
2018-11-27 14:17:54 +11:00
b201196c2e Keymap: restore 3D view center w/ cursor (Shift-C)
Pablo Vazquez requests this back, an quick way to reset the cursor.
2018-11-27 13:26:39 +11:00
a2a0ad74c3 Keymap: 3D view center to cursor operator
Addition to Alt-MMB-Drag orbit,
Alt-MMB-Click centers the view on the mouse.
2018-11-27 13:26:39 +11:00
1752d9f3f9 Keymap: add preference for spacebar to run operator search 2018-11-27 13:14:09 +11:00
83821f698a UI Theme: Transparent toolbar for UV/Image Editor and consistency tweaks.
Spotted by the community during a live stream!
2018-11-27 02:18:25 +01:00
da46580026 UI: Fix Set Origin via Specials menu not prompting options. 2018-11-27 02:18:25 +01:00
26b1aa9943 Fix T58062: Missing redo panel 2018-11-27 11:52:56 +11:00
621405ee0f Merge branch 'master' into blender2.8 2018-11-27 11:41:33 +11:00
9a5df92c1b Fix T56872: Edge slide gives invalid normals
Add the ability to skip overwriting normals.
2018-11-27 11:40:32 +11:00
Dalai Felinto
b205cb369a Silence warning (potentially misused twidth) 2018-11-26 21:54:29 -02:00
Dalai Felinto
8e65e38649 Font textbox overflow: Different methods
Sometimes the text doesn't fit. What to do in this case?

* Overflow: The default behaviour still is to overflow the text.
* Truncated: If any text box is defined we can also not draw the text
  that goes outside the text boxes.
* Scale to Fit: For single-text box texts we can scale down the text until
  it fits.

To support textboxes we are bisecting the scale until we find a good
match. Right now the hardcoded iteration limit is 20, and the threshold 0.0001f.

An alternative in the future would be to tackle this by integrating existing
layout engines such as HarfBuzz.

Note: Scale to fit won't work for multiple text-boxes if any of them has
either width or height as zero.

Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D3874

Feature development sponsored by Viddyoze.
2018-11-26 21:47:33 -02:00
63db89b5c1 Fix crash iterating over empty view layer 2018-11-27 10:26:58 +11:00
3c76751a68 fix: Collada exporter: take care of parent inverse for exports of Armatures with child objects 2018-11-26 23:14:46 +01:00
c99f18a787 Fix: Collada Importer: Keep bindinfo option is not properly handled
Actually the option was not at all used and the importer always created the bindinfo custom properties.
2018-11-26 23:14:46 +01:00
65874d3f33 fix: Collada: The limit precision option does nothing 2018-11-26 23:14:45 +01:00
f753fd1779 GP: Correct Tonemapping for Blend Layers 2018-11-26 22:52:28 +01:00
26df95cff6 GP: Make Multiply blend works with opacity 2018-11-26 22:20:06 +01:00
fb262f942e Cleanup: style, includes 2018-11-27 08:01:54 +11:00
0b0322099c Fix T57930 : Wrong hair shading in particle edit mode
Implement strand selection visualisation but without any shading.

I think this is not the overlay job to draw the strands shaded.

We can already view the children strands shaded for now but we might add
an option to draw the shaded strand instead of (or in addition to) the
guide strand.
2018-11-26 21:25:33 +01:00
aac2eba1aa DRW: Cleanup: Fix missing uniform warning in curve edit mode 2018-11-26 21:25:33 +01:00
14ea3130ee DRW: Hair: Fix hairs not working properly with duplis
Fix T55355 Instanced hair not working well for EEVEE and workbench
2018-11-26 21:25:33 +01:00
408cdf0cba DRW: Add access to object dupli parent 2018-11-26 21:25:33 +01:00
15add11595 MOD_shrinkwrap: do not compute mesh when not needed.
This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Note that surface_project and subsurf option also need more work at some
point, but this is probably not that urgent for now.

Also, use MOD_get_vgroup() helper in modifier code itself and pass
resulting MDeformVert & index to BKE_shrinkwrap's `shrinkwrapModifier_deform()`,
this is simpler and avoids duplicating vgroup handling code.

Related to T57972.
2018-11-26 21:07:50 +01:00
ede994c314 MOD_curve: do not compute mesh when not needed.
This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Also, use MOD_get_vgroup() helper in modifier code itself and pass
reluting MDeformVert & index to BKE_curve's curve_deform_verts(),
this is simpler and avoids duplicating vgroup handling code.

Also fixes crash when used on lattice.

Related to T57972.
2018-11-26 21:07:50 +01:00
8cd5edf850 MOD_cast: do not compute mesh when not needed.
This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Also fixes crash when used on lattice.

Related to T57972.
2018-11-26 21:07:50 +01:00
c1adf938e6 Timer: Generic BLI_timer with Python wrapper
There is a new `bpy.app.timers` api.
For more details, look in the Python API documentation.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3994
2018-11-26 20:25:15 +01:00
d5778b5bc1 UI: rename "OpenGL" render engine to "Workbench".
Neither is very descriptive for its task, but at least workbench is more
future proof and distinguishes it from Eevee.
2018-11-26 19:05:37 +01:00
d92e9a4a25 Fix broken face select in paint modes with RMB select. 2018-11-26 18:46:46 +01:00
7d32d87a86 Viewport: implement hiding faces in paint modes.
In 2.79 hiding works in paint modes with selection enabled,
so it is a missing feature. This implements it in texture
paint overlays and in workbench base shading.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D3989
2018-11-26 20:26:29 +03:00
99f7934e19 GP: New Blend Layers functionality
Now it's possible define the blend mode between layers including the option to clamp the layer using underlying layers.

Also a new Simplify option has been added to disable blend layers.
2018-11-26 18:12:39 +01:00
c0816cd03b Workbench: Add Curvature overlay for better visibility of surface detail for e.g. sculpting
The approach is fairly simple, just apply an edge detection filter to the view normal and scale the brightness based on that.

The overlay is disabled at object boundaries to avoid dark lines around objects.

Generally, this implementation follows the proposal of @monio at https://blender.community/c/rightclickselect/J9bbbc.
The changes are:
- Dynamic filter radius (on high-DPI displays, a radius of two is used)
- Options to reduce the strength of both ridges and valleys
- Tweaked function for the strength reduction (the original method actually had a local maximum, resulting in a brighter line inside valleys)
- Multiplication for blending instead of overlay, which doesn't work reliably with scene-referred intensities
- Renamed to point out the distinction between it and the SSAO-based cavity overlay

Reviewers: jbakker

Reviewed By: jbakker

Subscribers: billreynish, manitwo, linko, monio

Differential Revision: https://developer.blender.org/D3617
2018-11-26 17:31:18 +01:00
9238b7308a Fix view layer set in the outliner of child window not syncing to parent window. 2018-11-26 16:57:59 +01:00
cacff6ad27 Keymaps: for LMB keymap, add ctrl+LMB to select bones in weight paint mode. 2018-11-26 16:28:10 +01:00
b711be9b99 Keymaps: don't do CLICK event when PRESS was already handled.
This fixes conflicts where the tool and editor keymap use different event
types. Tools need to be able to mouse buttons on PRESS without triggering
CLICK events in the editor keymap.
2018-11-26 16:17:22 +01:00
9abcf56fa8 Enable OpenSubdiv modifier by default
This commit makes it so that subsurf/multires modifiers will respect
the WITH_OPENSUBDIV option. The WITH_OPENSUBDIV_MODIFIER option is
now gone.

For artists it mean that subsurf modifier will behave same as it is
planned for 2.80. Multires will now support sculpting, but it has some
known limitations. Those will be worked on before the final release.

If OpenSubdiv is disabled, no subsurf/multires functionality will
present.

For the details see:

  https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Modeling#Subsurf.2FMultires
2018-11-26 15:41:37 +01:00
e6322abad2 Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion. 2018-11-26 11:02:14 -02:00
bb52ef4ee9 Hide OpenSubdiv compute device
That is only used by GPU side of OpenSubdiv, which was not yet
brought back.
2018-11-26 14:21:58 +01:00
e7662ea257 Keymaps: keep Select Box as default tool. 2018-11-26 13:53:09 +01:00
68c7553dd9 Fix gizmos not using same tweak threshold as other places.
The low hardcoded threshold made clicking on the navigation gizmo difficult
on tablets.
2018-11-26 13:46:44 +01:00
18103c9ec2 UI: expand tooltips for left/right click select. 2018-11-26 13:29:12 +01:00
fea3451cf2 Fix inverted texture paint overlay display icons. 2018-11-26 14:52:24 +03:00
c8ad4c1a62 Defaults: set "release confirms", for transform tweak with single click and drag.
The old behavior with two clicks evolved out of a gesture system, and it can
have some advantages if you want to press more keys to constrain for example. But
this seems a better default.
2018-11-26 12:18:28 +01:00
0970ed0550 Merge branch 'master' into blender2.8 2018-11-26 12:00:36 +01:00
acd1d1a31d CMake: Remove Cycles specific OpenSubdiv options
Just use one flag which enables OpenSubdiv globally for all the
areas of Blender.
2018-11-26 11:41:38 +01:00
3a038db576 Fix texture space not updating in edit mode. 2018-11-26 07:32:04 -02:00
9d7b767dd7 transform_snap_object: fix ray_start_correction in snap to edit_mesh. 2018-11-26 07:32:03 -02:00
36429a5bc9 Fix T56167: Crash when extruding + snap to face.
This is a local fix.
The problem with duplicate looptris still remains.
That is, it can still be released in one place but not upgraded in the other.

(note: setting the looptris to NULL in the evaluated mesh and assert whether it is still NULL when the mesh is freed could indicate where those cases are).
2018-11-26 07:32:02 -02:00
33cbcd7344 Fix T57985: Out of the edit mode, the texture space is affected by the modifiers of a mesh.
Go for the simple solution for now (disable auto-texspace in evaluated mesh).
Proper fix would be part of known TODO redesign of bbox handling.

Solution suggested by @sergey, thanks!
2018-11-26 10:31:02 +01:00
3919f99354 Fix T58032: particle children 'Use Clump Curve' crash
Maniphest Tasks: T58032

Differential Revision: https://developer.blender.org/D3988
2018-11-26 09:20:37 +01:00
945fddc4be UI: collapse redo panel by default
For some operators this fills a lot of vertical space,
users can expand it if they need.

Also remove workaround for T56752 (now fixed).
2018-11-26 17:44:33 +11:00
16c46aabad Correct last commit
Initial display was fixed, broke refreshing.
2018-11-26 17:43:23 +11:00
59e8d532d9 UI: fix glitch showing redo panel
There were still cases it would show for the first time w/o content.
2018-11-26 17:29:02 +11:00
aa2079bad3 Fix crash accessing mesh.point_normals default
This memory needs to be static,
in this case the argument isn't needed so remove it.
2018-11-26 16:28:00 +11:00
10bded145d Keymap: use 'W' key for select toolbar shortcut 2018-11-26 16:10:00 +11:00
c906cdc197 Cleanup: remove unused code & add comments 2018-11-26 16:07:03 +11:00
f968256b42 Fix T58027: Scene.ray_cast crash
Reintroduce BASE_VISIBLE_BGMODE

D3987 by @Soundwave
2018-11-26 15:52:10 +11:00
a46290aaa8 Fix object selection in edit-mode
Ctrl-RMB in edit-mode is needed for setting vertex parent.
2018-11-26 15:28:59 +11:00
2b07c31fcf Fix proportional edit-mode w/ multi-object editing
D3992 by @Al
2018-11-26 14:20:51 +11:00
7493848008 3D View: remove 3D cursor
Use 3D cursor from the scene (was previously used for local-view).
2018-11-26 14:02:09 +11:00
b4e037fe14 Fix extended shading pie menu not having same order as before. 2018-11-26 01:01:00 +01:00
48b0695806 Cleanup: unused vars, imports 2018-11-26 09:27:25 +11:00
a0cde8ed08 Cleanup: unused vars 2018-11-26 09:26:38 +11:00
cb66a28d82 Cleanup: unused vars, imports 2018-11-26 09:26:15 +11:00
24c383cfc4 Fix some errors in the Blender Light theme. 2018-11-25 20:37:54 +01:00
356d450b64 Fix missing versioning code for user preferences navigation bar. 2018-11-25 20:35:41 +01:00
43325e98da Tools: add Select tool, with transform tweak on drag and no click delay.
For users that want the 2.7 LMB keymap behavior, this provides a way of
working without tools interfering. For RMB select this operator is quite
redundant with the Cursor tool, we may have to find a solution for that.

Note that we also might later add transform tweak to the transform tools,
when nothing is selected. But this is important for existing users who
preferred the existing workflow.
2018-11-25 20:09:43 +01:00
e840f0a90b Keymaps: add 3D view click empty space to deselect all.
The implementation of this operator was modified to be more efficient and
ensure the undo history has the exact operator used.
2018-11-25 20:07:47 +01:00
7051a95516 Cleanup: Silent compiler warning
A void function cannot return a value.
2018-11-25 20:00:44 +01:00
Julian Eisel
6c704b4632 UI: Disable font shadow in tooltip
When I added this a few years ago, it was meant to create a fake bold effect.
With the new text shadow drawing code, that doesn't work well though.
2018-11-25 19:51:15 +01:00
b7e02c677d Fix mesh_build_data() calling mesh_finalize_eval() before copying texspace.
mesh_finalize_eval() may set ob->data to evaluated mesh, needs to be
done *after* call to BKE_mesh_texspace_copy_from_object(), else that one
is meaningless.

Related to investigations on T57985, but does not solve it at all. :(
2018-11-25 18:49:57 +01:00
2b97a250f6 Cleanup: remove useless redundant NULL check. 2018-11-25 18:49:57 +01:00
5f6fae9ad0 Fix T57070, T57389, and other bbox-related issues with meshes.
Thinks whole bbox code needs a complete rewrite, one can see a lot of
old history in it, it has way too many functions doing
nearly-the-same-thing(c), it spreads in very inconsistent ways across a
lot of files, ... But have no time for this right now, and would not be
a good idea with Beta comming up close anyway.

So for now going the simple and (hopefully) sane & safe way: forbid
object-level functions to affect data-level bbox. Mesh and curve ones
would generate bbox in obdata instead of object, for some reason (all
other obdata types only use object's bbox ever). That may have been
working in old ages, but with CoW and threaded depsgraph this is just
calling for piles of issues.
2018-11-25 18:49:57 +01:00
Julian Eisel
5e5db7db89 UI: Disable font shadow in tabs
This was used to fake a 3D look, however that doesn't work well with the new,
flat style. It just made text appear blurry.
2018-11-25 18:35:48 +01:00
Julian Eisel
b00963afc1 UI: Initial User-Preferences redesign
Implements the first changes for T54115:

* Rename "User Preferences" window to "Settings" in the UI.
  We'll likely put workspace settings in there, separate from the global
  user settings. System settings should become separate from user
  settings in future to allow settings for specific hardware.
* Add sidebar region for navigation (scrolls independently).
  Addresses space problems, so we can add more categories as needed now.
* Increase size of Settings window to compensate new navigation bar.
* Group sections into User Preferences and System.
  Icons for section groups by Andrzej Ambroz. Thanks!
* Bumps subversion for file compatibility.

Screenshot: https://developer.blender.org/F5715337

I also added categories for future work, but commented them out.
We may also want to redesign contents of each section now.

Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3088
Design Task: https://developer.blender.org/T54115
2018-11-25 17:08:58 +01:00
3135ed376b Texture Paint: prevent normal angle masking duplicating backface culling.
If backface culling is off, the user obviously wants to paint on
back faces, so the normal angle cutoff designed to prevent painting
at glancing angles shouldn't do the culling as a side effect.
2018-11-25 18:51:36 +03:00
Dalai Felinto
4c3ed98ca2 Local View
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.

We are using both the numpad /, as well as the regular /.

Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
  (probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.

The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
2018-11-25 09:50:34 -02:00
e60c49ecf0 Use orig_pchan when searching for the original copy of a constraint. 2018-11-25 10:59:40 +03:00
7e9389b83d Fix box select of edges not working when box does not fully contain edge. 2018-11-25 02:12:48 +01:00
f48a089db8 Addons: enable GLTF 2.0 addon by default. 2018-11-24 23:59:25 +01:00
a2e209f20a Merge branch 'master' into blender2.8 2018-11-24 23:44:17 +01:00
33750e8abb Fix T58006: smart UV project island margin should not use length units.
This distance is in UV space, not world space.
2018-11-24 23:43:03 +01:00
487af39c99 Sequencer: remove unnecessary limit on transform rotation. 2018-11-24 23:43:03 +01:00
7c19d9e9af Fix X11 tablet pen and eraser distinction being wrong in some cases.
This extends the earlier fix to use the latest logic from Wine's wintab.c,
to better handle eraser detection.
2018-11-24 23:24:32 +01:00
13fa509187 Merge branch 'master' into blender2.8 2018-11-25 08:06:22 +11:00
b348d1ac62 Cleanup: remove unused file 2018-11-25 08:05:42 +11:00
059c119719 Merge branch 'master' into blender2.8 2018-11-25 08:01:53 +11:00
e742e0934d Cleanup: trailing space 2018-11-25 08:01:14 +11:00
fa0fcbe4d6 Fix T56374, T57066, T58037: crash on startup on macOS when using translation. 2018-11-24 20:04:53 +01:00
5166132708 Fix random color drawing having similar colors for similar names. 2018-11-24 20:04:53 +01:00
Julian Eisel
23d66c5d60 Fix T58022: Changing workspace may change layout of User Pref window
Logic to update child windows on workspace changes should simply ignore
temporary child windows. Users opened those for a specific purpose (i.e. edit
user preferences or show render result). Blender should not come in and
repurpose it.
2018-11-24 19:20:31 +01:00
e5bc9fae54 Fix penpressure for tablets that use libinput on linux 2018-11-24 18:26:20 +01:00
0c8b0771f2 refactor: Collada reorganize class constructors
- Class constructors without body (only attribute initialisations)
  can safely be kept in the class header files

- Constructor variables should be initialized in the order of their
  definition in the header files

This change is also aimed to remove a couple of
build warnings from the linux builds.
2018-11-24 14:30:19 +01:00
31e3b7790a Keymap: preference for extended shading menu
This brings back the option to have x-ray & overlay toggle.
2018-11-24 11:24:34 +11:00
1e820898ff Depsgraph: add a new operation node for computing B-Bone segments.
Computing the shape of a B-Bone is a quite expensive operation, and
there are multiple constraints that can access this information in
a variety of useful ways. This means computing the shape once per
bone and saving it is good for performance.

Since the shape may depend on the position of up to two other bones,
often in a "cyclic" manner, this computation has to be a separate
node with its own dependencies.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D3975
2018-11-23 23:19:23 +03:00
e49c66efae fix: Collada: used wrong Enumeration type for comparison 2018-11-23 19:23:55 +01:00
bd25523aff fix: collada: must use case sensitive filename in include 2018-11-23 19:23:16 +01:00
397272e561 fix: Collada: use reference to BezTriple instead of copy 2018-11-23 19:21:29 +01:00
7eb9091e96 fix: compiler errors on mac_x86_64_10_9 2018-11-23 18:38:19 +01:00
b9b50c0e39 cleanup: Collada: remove unused variables 2018-11-23 18:38:19 +01:00
Dalai Felinto
9be5b2d23f Pass viewport to BASE_ related tests, for viewport view/select restrictions
Note: functions like select all are still not respecting that.
I will fix this as part of the local view commit though.
2018-11-23 15:13:14 -02:00
0d0c79e879 DRW: Make non Mesh object wire show in edit mode 2018-11-23 18:03:18 +01:00
ff6e61f09a DRW: Support Wireframe for metaball objects 2018-11-23 18:03:18 +01:00
be940fcd5f GP: Avoid crash when adding new layer 2018-11-23 17:34:53 +01:00
b05adc1f97 Icons: add Select tool icon. 2018-11-23 17:12:57 +01:00
e1c393b51a Keymaps: fix broken LMB select and transform tweak in 2D editors. 2018-11-23 17:12:57 +01:00
322cf89a14 Partial rewrite of the Collada Module for Blender 2.8
Most important changes are in the Animation exporter and Animation Importer.
There is still some cleaning up to be done. But the Exporter/Importer basically
work within Blender 2.8

Some details:

User Interface:
The interface has been reorganized to look more like the FBX interface.

New options in user interface:

* keep_keyframes:
  When sampling the distance between 2 keyframes is defined by
  the sampling rate. Furthermore the keyframes defined in the
  FCurves are not exported. However when this option is enabled
  then also the defined keyframes will be added to the exported fcurves

* keep_smooth_curves:
  When sampling we do not use FCurves. So we also have no Curve handles
  for smooth exporting. However when this option is enabled, Blender
  does its best to recreate the handles for export. This is a very
  experimental feature and it is know to break when:

  - the exported animated objects have parent inverse matrices
    different from the unit matrix
  - The exported objects have negative scaling

  There may be many other situations when this feature breaks.
  This needs to be further tested. It may be removed later or replaced
  by something less wonky.

BlenderContext:
is a new class that contains the bridge to Blender. It contains
pointers to the current export/import context plus derived values
of Depsgraph, Scene, Main

Reporting:
I reorganized the output on the Blender Console to become more
informative and more readable

Preservation of Item names:
name attributes are now encoded with XML entities. This makes
sure that i can export/import names exactly defined in the tool.
This affects material names, bone names and object names.

Hierarchy export:
* Object and Bone Hierarchies are now exported correctly
  by taking the Blender parent/child hierarchy into account
* Export also not selected intermediate objects

  Problem:
  When we export an Object Hierarchy, then we must export
  all elements of the hierarchy to maintain the transforms. This
  is especially important when exporting animated objects, because the
  animation curves are exported as relative curves based on the
  parent-child hierarchy. If an intermediate animated object is missing
  then the exported animation breaks.

  Solution:
  If the "Selected" Optioon is enabled, then take care
  to also export all objects which are not selected and hidden,
  but which are parents of selected objects.

Node Based Material Importer (wip):
Added basic support for Materials with diffuse color and
diffuse textures. More properties (opacity, emission) need
changes in the used shader.
Note: Materials are all constructed by using the principled BSDF shader.

Animation Exporter:
* Massive optimization of the Animation Bake tool (Animation Sampler).
  Instead of sampling each fcurve separately, i now sample all
  exported fcurves simultaneously. So i avoid many (many!)
  scene updates during animation export.
* Add support for Continuous Acceleration (Fcurve handles)
  This allows us to create smoother FCurves during importing Collada
  Animation curves. Possibly this should become an option ionstead of
  a fixed import feature.
* Add support for sampling curves (to bake animations)
* The animation sampler now can be used for any animation curve.
  Before the sampler only looked at curves which are supported by
  Standard Collada 1.4. However the Collada exporter currently
  ignores all animation curves which are not covered by the 1.4.1
  Collada Standards. There is still some room for improvements
  here (work in progres)

  Known issues:

    * Some exports do currently not work reliably, among those
      are the camera animations, material animations and light animations
      those animations will be added back next (work in progres)

    * Exporting animation curves with keyframes (and tangents)
      sometimes results in odd curves (when parent inverse matrix is involved)
      This needs to be checked in more depth (probably it can not be solved).

    * Export of "all animations in scene" is disabled because the
      Collada Importer can not handle this reliably at the
      moment (work in progres).

* Support for Animation Clip export
  Added one extra level to the exported animations
  such that now all scene animations are enclosed:

  <Animation name="id_name(ob)_Action">
    <Animation>...</Animation>
    ...
  </Animation>

Animation Importer:
* Import of animations for objects with multiple materials
  When importing multiple materials for one object,
  the imported material animation curves have all been
  assigned to the first material in the object.

Error handling (wip):
The Importer was a bit confused as it sometimes ignored fatal
parsing errors and continued to import. I did my best to
unconfuse it, but i believe that this needs to be tested more.

Refactoring:

update : move generation of effect id names into own function
update : adjust importer/exporter for no longer supported HEMI lights
cleanup: Removed no lopnger existing attribute from the exporter presets
cleanup: Removed not needed Context attribute from DocumentExporter
fix    : Avoid duplicate deletion of temporary items
cleanup: fixed indentation and white space issues
update : Make BCAnimation class more self contained
cleanup: Renamed classes, updated comments for better reading
cleanup: Moved static class functions to collada_utils
cleanup: Moved typedefs to more intuitive locations
cleanup: indentation and class method declarations
cleanup: Removed no longer needed methods
update : Moved Classes into separate files
cleanup: Added comments
cleanup: take care of name conventions
...    : many more small changes, not helpful to list them all
2018-11-23 17:08:14 +01:00
3bf7c846ee Fix T57996: Crash - delete node with a driven parameter 2018-11-23 17:03:14 +01:00
e5abce9220 Tag relations for update when clip's animation changes 2018-11-23 17:03:14 +01:00
d13a53e71d Return truth when animation fix changed animation
This can be used to inform higher level modules that animation
is changed and that dependency graph likely requires relations
update now.
2018-11-23 17:03:14 +01:00
1ec21ed41a DRW: Support Wireframe for cruve/surface/text objects 2018-11-23 16:44:53 +01:00
1cc7bcd8d8 Add missing COW updates when selection changes in paint modes. 2018-11-23 18:37:28 +03:00
d891c8f1f8 Merge branch 'master' into blender2.8 2018-11-23 14:41:21 +01:00
859d5e5699 Use default movie cache size of 4GiB 2018-11-23 14:40:51 +01:00
Stefan Werner
874f12480f Cycles: Fixed a warning. 2018-11-23 13:47:25 +01:00
Stefan Werner
aa000400dc Cycles: Improved robustness of hair motion blur.
In some instances, the number of control vertices of a hair could change mid-frame.
Cycles would then be unable to calculate proper motion blur for those hairs. This adds
interpolated CVs to fill in for the missing data. While this will not necessarily result in
a fully accurate reconstruction of the guide hair, it preserves motion blur instead of disabling it.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey, brecht, #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D3695
2018-11-23 13:25:26 +01:00
7b0f638ff6 UI: swap wireframe/solid order in pie to match order in header. 2018-11-23 12:37:43 +01:00
920525c216 Merge branch 'master' into blender2.8 2018-11-23 12:11:44 +01:00
29f75dd7b8 Python API: restore bpy.app.autoexec_fail variables, some scripts use it. 2018-11-23 12:11:41 +01:00
fc830ce78f Fix T57616: Deleting particle system instance object leads to crash
Explicitly tag copy-on-write form library remap. Previously, this
tag was used implicitly via geometry/transform tagging, which worked
ok for objects. For non-objects we do need to ensure all copies has
correct pointer and the only way to do so is to pass tag explicitly.

There is probably more places in the library remap where this is
needed, but not being familiar with the code makes it difficult to
spot where possible tags are missing.
2018-11-23 12:03:26 +01:00
4b06d0bf51 Python API: bpy.app.handlers.depsgraph_update_pre/post
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3978
2018-11-23 11:52:09 +01:00
956e58679c Fix T57998: crash at start with jemalloc package on some Linux distributions.
The jemalloc library must be ahead of pthread in linking order, so jemalloc
can find the pthread symbols for its background thread.
2018-11-23 11:26:31 +01:00
2ded8fca79 UI: initialize drag-lock x/y axis from region type
When dragging in a vertical or horizontal region,
there is no need to detect the drag axis.

Gives minor usability improvement for dragging over vertical tabs.
2018-11-23 19:12:34 +11:00
4ed7c10a32 Correct missing NULL check in recent changes 2018-11-23 18:12:28 +11:00
7a7c9ee71a Fix uv lasso/box multi-object select logic
Was de-selecting all UV's on each iteration.
2018-11-23 18:06:50 +11:00
a6eb9a3e21 Tool System: uv lasso/box select options
These tools now support (new, add, subtract),
(xor, and) could be supported but are complicated by UV's sticky
selection modes.
2018-11-23 17:52:52 +11:00
dcf359b15a Error in last commi 2018-11-23 16:28:50 +11:00
93c143ecf3 Fix wire-toggle restoring previous shading mode 2018-11-23 16:27:54 +11:00
811814b60c Keymap: remove redundant keys from toolbar popup
Adjust the keymap so tools that don't exist wont use keys
from the default keymap.
2018-11-23 15:46:47 +11:00
ca5dd63618 Fix toolbar keymap accumulating items
Create a temporary keymap with items from the original.
2018-11-23 15:19:57 +11:00
cfffe615f4 Keymap: add Keymap.keymap_items.new_from_item
Needed to copy keymap items from other keymaps.
2018-11-23 15:16:13 +11:00
1fcb3e791f Cleanup: single quote enums 2018-11-23 13:55:33 +11:00
d56c0a0a6a Cleanup: rename bone-select to xray
This shows bones in font and uses the xray toggle binding.
Also 'bone select' isn't very meaningful on it's own.
2018-11-23 13:48:21 +11:00
3fdcd2293e UI: Don't promt when deleting via Object Context Menu.
Suggested in the UI paper-cut thread at devtalk.blender.org by ThinkingPolygons
2018-11-23 03:47:32 +01:00
1540a1ddd1 UI: Icons in context menu for copy/paste 2018-11-23 03:47:32 +01:00
1ffb2bf917 Pose: make pose-bone xray usable in wpaint mode
Update UI, draw-manager and operator to support with pose-bone-xray
when in weight paint mode.
2018-11-23 13:19:22 +11:00
e829e47b55 Keymap: remove 'Z' key to toggle bone-select
Alt-Z already does this.
2018-11-23 12:28:18 +11:00
5f2ac43b5f UI: allow inaccurate swipe motion to switch tabs
Removes the need to keep your cursor over tabs while dragging.
2018-11-23 12:11:18 +11:00
abf9c628b2 Keymap: restore grease pencil keys for default map
Pie menu for draw modes is now on the 'Z' key.
2018-11-23 11:44:31 +11:00
4022a16fbe Keymap: adjustments to shading keys
- Z shows pie menu (removed wire/xray toggles).
- Alt-Z toggles x-ray.
- Shift-Z toggles wireframe.
- Shift-Alt-Z toggles overlays.

Note that toggle overlays had no binding for 2.7x,
this is likely not a heavily used option and could even be left out.
2018-11-23 11:39:44 +11:00
60865ccefd Fix for weight paint object occluding pose bones
This makes it so weight paint + pose mode can't switch to other
weight paint objects.
2018-11-23 10:38:15 +11:00
7105 changed files with 1394472 additions and 1456670 deletions

View File

@@ -1,7 +1,7 @@
{
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/blender2.8",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "blender2.8"
"arc.land.onto.default" : "master"
}

248
.clang-format Normal file
View File

@@ -0,0 +1,248 @@
# Configuration of clang-format
# =============================
#
# Tested to work with versions: 6 to 8.
# This causes parameters on continuations to align to the opening brace.
#
# like_this_long_name(parameter_one,
# parameter_two,
# parameter_three);
#
AlignAfterOpenBracket: 'Align'
# Disallow short functions on one line; break them up.
AllowShortBlocksOnASingleLine: false
# These two settings trigger stacking of parameters in most cases; this is
# easier to read and also makes diffs easier to read (since an added or removed
# parameter is obvious). For example, function calls will look like this:
#
# like_this_long_name(parameter_one,
# parameter_two,
# parameter_three,
# parameter_four,
# parameter_five,
# parameter_six);
#
# Instead of:
#
# like_this_long_name(parameter_one, parameter_two, parameter_three, parameter_four,
# parameter_five, parameter_six);
#
BinPackArguments: false
BinPackParameters: false
# Line width (don't exceed 100).
ColumnLimit: 99
# Cause initializer lists to have one member initialized per line, in the case
# that all initializers can't fit on a single line.
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Indent the : after a constructor. For example:
#
# explicit foo_class ()
# : member1_(5)
# {
# }
#
ConstructorInitializerIndentWidth: 4
# Make access modifier slightly more visible.
AccessModifierOffset: -1
# This will unfortunately use spaces in some cases where it's not desired (like
# function calls) but the overall result is better since it will allow
# alignment to work properly with different tab width settings.
ContinuationIndentWidth: 4
# This tries to match Blender's style as much as possible. One
BreakBeforeBraces: Custom
BraceWrapping: {
AfterClass: 'false'
AfterControlStatement: 'false'
AfterEnum : 'false'
AfterFunction : 'true'
AfterNamespace : 'false'
AfterStruct : 'false'
AfterUnion : 'false'
BeforeCatch : 'true'
BeforeElse : 'true'
IndentBraces : 'false'
AfterObjCDeclaration: 'true'
}
# For switch statements, indent the cases.
IndentCaseLabels: true
# Indent after the hash inside preprocessor directives
IndentPPDirectives: AfterHash
BreakBeforeTernaryOperators: false
SpaceAfterTemplateKeyword: false
# Handy comment at the end of each C++ name space.
FixNamespaceComments: true
# Use "if (...)" instead of "if(...)", but have function calls like foo().
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
# Use two spaces before trailing comments, for example
#
# foo = bar; // comment
#
# Note that this doesn't work for C-style comments.
SpacesBeforeTrailingComments: 2
# Reflow comments, developers must disable formatting as with code to override this.
ReflowComments: true
# Never use tabs for indentation.
# Note: TabWidth and IndentWidth must be the same, or strange things happen.
UseTab: Never
TabWidth: 2
IndentWidth: 2
# Add a big penalty on breaking after the return type of functions. For example,
#
# static void foo(...)
#
# Instead of:
#
# static void
# foo(very long content here that maybe could be stacked)
#
PenaltyReturnTypeOnItsOwnLine: 10000
# Avoid having function calls broken onto a new line:
#
# int a = foo(
# long, list, of, many, params);
#
# Instead of:
#
# int a =
# foo(long, list, of, many, params);
#
PenaltyBreakAssignment: 100
AllowShortFunctionsOnASingleLine: None
# Disable for now since it complicates initial migration tests,
# TODO: look into enabling this in the future.
SortIncludes: false
# Don't right align escaped newlines to the right because we have a wide default
AlignEscapedNewlines: DontAlign
# Always break:
#
# const char *foo =
# "multi"
# "line";
#
# Instead of:
#
# const char *foo = "multi"
# "line";
#
AlwaysBreakBeforeMultilineStrings: true
# We don't want literal strings to break,
# however clang-format seems to ignore this (sigh).
PenaltyBreakString: 1000000
# There are macros in Blender for custom for loops; tell Clang to treat them
# like loops rather than an expression, and so put the { on the same line.
#
# To find these use multi-line regex search:
# "^\s+[A-Z][A-Z0-9_]+\s*\([^\n]*\)\n\s*\{"
ForEachMacros:
- BEGIN_ANIMFILTER_SUBCHANNELS
- BLI_FOREACH_SPARSE_RANGE
- BLI_SMALLSTACK_ITER_BEGIN
- BMO_ITER
- BMO_ITER_INDEX
- BMW_ITER
- BM_FACES_OF_VERT_ITER_BEGIN
- BM_ITER_BPY_BM_SEQ
- BM_ITER_ELEM
- BM_ITER_ELEM_INDEX
- BM_ITER_MESH
- BM_ITER_MESH_INDEX
- BM_ITER_MESH_MUTABLE
- BM_LOOPS_OF_VERT_ITER_BEGIN
- BOOST_FOREACH
- CTX_DATA_BEGIN
- CTX_DATA_BEGIN_WITH_ID
- DEG_OBJECT_ITER_BEGIN
- DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN
- DRIVER_TARGETS_LOOPER_BEGIN
- DRIVER_TARGETS_USED_LOOPER_BEGIN
- FOREACH_BASE_IN_EDIT_MODE_BEGIN
- FOREACH_BASE_IN_MODE_BEGIN
- FOREACH_BEGIN
- FOREACH_COLLECTION_BEGIN
- FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN
- FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN
- FOREACH_EDIT_OBJECT_BEGIN
- FOREACH_MAIN_ID_BEGIN
- FOREACH_MAIN_LISTBASE_BEGIN
- FOREACH_MAIN_LISTBASE_ID_BEGIN
- FOREACH_NODETREE_BEGIN
- FOREACH_OBJECT_BEGIN
- FOREACH_OBJECT_FLAG_BEGIN
- FOREACH_OBJECT_IN_EDIT_MODE_BEGIN
- FOREACH_OBJECT_IN_MODE_BEGIN
- FOREACH_OBJECT_RENDERABLE_BEGIN
- FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN
- FOREACH_PCHAN_VISIBLE_IN_OBJECT_BEGIN
- FOREACH_SCENE_COLLECTION_BEGIN
- FOREACH_SCENE_OBJECT_BEGIN
- FOREACH_SELECTED_BASE_BEGIN
- FOREACH_SELECTED_EDITABLE_OBJECT_BEGIN
- FOREACH_SELECTED_OBJECT_BEGIN
- FOREACH_TRANS_DATA_CONTAINER
- FOREACH_VIEW_LAYER_TO_RENDER_BEGIN
- FOREACH_VISIBLE_BASE_BEGIN
- FOREACH_VISIBLE_OBJECT_BEGIN
- GHASH_FOREACH_BEGIN
- GHASH_ITER
- GHASH_ITER_INDEX
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
- GP_EDITABLE_STROKES_BEGIN
- GSET_FOREACH_BEGIN
- GSET_ITER
- GSET_ITER_INDEX
- ITER_BEGIN
- ITER_PIXELS
- ITER_SLOTS
- LISTBASE_CIRCULAR_BACKWARD_BEGIN
- LISTBASE_CIRCULAR_FORWARD_BEGIN
- LISTBASE_FOREACH
- LISTBASE_FOREACH_MUTABLE
- MAN2D_ITER_AXES_BEGIN
- MAN_ITER_AXES_BEGIN
- NODE_INSTANCE_HASH_ITER
- NODE_SOCKET_TYPES_BEGIN
- NODE_TREE_TYPES_BEGIN
- NODE_TYPES_BEGIN
- PIXEL_LOOPER_BEGIN
- PIXEL_LOOPER_BEGIN_CHANNELS
- RNA_BEGIN
- RNA_PROP_BEGIN
- RNA_STRUCT_BEGIN
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SEQP_BEGIN
- SEQ_BEGIN
- foreach
# Use once we bump the minimum verison to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
# StatementMacros:
# - PyObject_VAR_HEAD
# - STRINGIFY

View File

@@ -3,18 +3,18 @@
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
indent_style = space
indent_size = 2
max_line_length = 99
# CMake & Text
[*.{cmake,txt}]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
indent_style = space
indent_size = 2
max_line_length = 99
# Python
[*.py]
@@ -30,9 +30,9 @@ max_line_length = 120
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120
indent_style = space
indent_size = 2
max_line_length = 99
# reStructuredText
[*.rst]

4
.gitignore vendored
View File

@@ -11,6 +11,10 @@ __pycache__/
*.swo
*#
# Indexes for emacs, vi & others
TAGS
tags
# QtCreator
CMakeLists.txt.user

4
.gitmodules vendored
View File

@@ -1,12 +1,12 @@
[submodule "release/scripts/addons"]
path = release/scripts/addons
url = ../blender-addons.git
branch = blender2.8
branch = master
ignore = all
[submodule "release/scripts/addons_contrib"]
path = release/scripts/addons_contrib
url = ../blender-addons-contrib.git
branch = blender2.8
branch = master
ignore = all
[submodule "release/datafiles/locale"]
path = release/datafiles/locale

File diff suppressed because it is too large Load Diff

View File

@@ -24,11 +24,138 @@
# ../build_linux_i386
# This is for users who like to configure & build blender with a single command.
define HELP_TEXT
Convenience Targets
Provided for building Blender, (multiple at once can be used).
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
* deps: Build library dependencies (intended only for platform maintainers).
* config: Run cmake configuration tool to set build options.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
Project Files
Generate poject files for development environments.
* project_qtcreator: QtCreator Project Files.
* project_netbeans: NetBeans Project Files.
* project_eclipse: Eclipse CDT4 Project Files.
Package Targets
* package_debian: Build a debian package.
* package_pacman: Build an arch linux pacman package.
* package_archive: Build an archive package.
Testing Targets
Not associated with building Blender.
* test:
Run ctest, currently tests import/export,
operator execution and that python modules load
* test_cmake:
Runs our own cmake file checker
which detects errors in the cmake file list definitions
* test_pep8:
Checks all python script are pep8
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
* test_style_c:
Checks C/C++ conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_c_qtc:
Same as test_style but outputs QtCreator tasks format
* test_style_osl:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_osl_qtc:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
Static Source Code Checking
Not associated with building Blender.
* check_cppcheck: Run blender source through cppcheck (C & C++).
* check_clang_array: Run blender source through clang array checking script (C & C++).
* check_splint: Run blenders source through splint (C only).
* check_sparse: Run blenders source through sparse (C only).
* check_smatch: Run blenders source through smatch (C only).
* check_spelling_c: Check for spelling errors (C/C++ only).
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
* check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only).
* check_descriptions: Check for duplicate/invalid descriptions.
Utilities
Not associated with building Blender.
* icons:
Updates PNG icons from SVG files.
Optionally pass in variables: 'BLENDER_BIN', 'INKSCAPE_BIN'
otherwise default paths are used.
Example
make icons INKSCAPE_BIN=/path/to/inkscape
* icons_geom:
Updates Geometry icons from BLEND file.
Optionally pass in variable: 'BLENDER_BIN'
otherwise default paths are used.
Example
make icons_geom BLENDER_BIN=/path/to/blender
* tgz:
Create a compressed archive of the source code.
* update:
updates git and all submodules
* format
Format source code using clang (uses PATHS if passed in). For example::
make format PATHS="source/blender/blenlib source/blender/blenkernel"
Environment Variables
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
* BUILD_DIR: Override default build path.
* PYTHON: Use this for the Python command (used for checking tools).
* NPROCS: Number of processes to use building (auto-detect when omitted).
Documentation Targets
Not associated with building Blender.
* doc_py: Generate sphinx python api docs.
* doc_doxy: Generate doxygen C/C++ docs.
* doc_dna: Generate blender file format reference.
* doc_man: Generate manpage.
Information
* help: This help message.
* help_features: Show a list of optional features when building.
endef
# HELP_TEXT (end)
# System Vars
OS:=$(shell uname -s)
OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
# CPU:=$(shell uname -m) # UNUSED
CPU:=$(shell uname -m)
# Source and Build DIR's
@@ -55,7 +182,7 @@ ifndef DEPS_INSTALL_DIR
ifneq ($(OS_NCASE),darwin)
# Add processor type to directory name
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(shell uname -p)
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
endif
@@ -98,10 +225,12 @@ endif
# -----------------------------------------------------------------------------
# Blender binary path
# Allow passing in own BLENDER_BIN so developers who don't
# use the default build path can still use utility helpers.
ifeq ($(OS), Darwin)
BLENDER_BIN="$(BUILD_DIR)/bin/blender.app/Contents/MacOS/blender"
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
else
BLENDER_BIN="$(BUILD_DIR)/bin/blender"
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
endif
@@ -196,87 +325,9 @@ config: .FORCE
# -----------------------------------------------------------------------------
# Help for build targets
export HELP_TEXT
help: .FORCE
@echo ""
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
@echo " * debug - build a debug binary"
@echo " * full - enable all supported dependencies & options"
@echo " * lite - disable non essential features for a smaller binary and faster build"
@echo " * headless - build without an interface (renderfarm or server automation)"
@echo " * cycles - build Cycles standalone only, without Blender"
@echo " * bpy - build as a python module which can be loaded from python directly"
@echo " * deps - build library dependencies (intended only for platform maintainers)"
@echo ""
@echo " * config - run cmake configuration tool to set build options"
@echo ""
@echo " Note, passing the argument 'BUILD_DIR=path' when calling make will override the default build dir."
@echo " Note, passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments."
@echo ""
@echo ""
@echo "Project Files for IDE's"
@echo " * project_qtcreator - QtCreator Project Files"
@echo " * project_netbeans - NetBeans Project Files"
@echo " * project_eclipse - Eclipse CDT4 Project Files"
@echo ""
@echo "Package Targets"
@echo " * package_debian - build a debian package"
@echo " * package_pacman - build an arch linux pacman package"
@echo " * package_archive - build an archive package"
@echo ""
@echo "Testing Targets (not associated with building blender)"
@echo " * test - run ctest, currently tests import/export,"
@echo " operator execution and that python modules load"
@echo " * test_cmake - runs our own cmake file checker"
@echo " which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8"
@echo " which are tagged to use the stricter formatting"
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
@echo " * test_style_c - checks C/C++ conforms with blenders style guide:"
@echo " https://wiki.blender.org/wiki/Source/Code_Style"
@echo " * test_style_c_qtc - same as test_style but outputs QtCreator tasks format"
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " https://wiki.blender.org/wiki/Source/Code_Style"
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
@echo " https://wiki.blender.org/wiki/Source/Code_Style"
@echo ""
@echo "Static Source Code Checking (not associated with building blender)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@echo " * check_clang_array - run blender source through clang array checking script (C & C++)"
@echo " * check_splint - run blenders source through splint (C only)"
@echo " * check_sparse - run blenders source through sparse (C only)"
@echo " * check_smatch - run blenders source through smatch (C only)"
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
@echo " * check_spelling_py - check for spelling errors (Python only)"
@echo " * check_descriptions - check for duplicate/invalid descriptions"
@echo ""
@echo "Utilities (not associated with building blender)"
@echo " * icons - Updates PNG icons from SVG files."
@echo " Set environment variables 'BLENDER_BIN' and 'INKSCAPE_BIN'"
@echo " to define your own commands."
@echo " * icons_geom - Updates Geometry icons from BLEND file."
@echo " Set environment variable 'BLENDER_BIN'"
@echo " to define your own command."
@echo " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@echo ""
@echo "Environment Variables"
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
@echo " * BUILD_DIR - override default build path."
@echo " * PYTHON - use this for the Python command (used for checking tools)."
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@echo " * doc_doxy - generate doxygen C/C++ docs"
@echo " * doc_dna - generate blender file format reference"
@echo " * doc_man - generate manpage"
@echo ""
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
@echo ""
@echo "$$HELP_TEXT"
# -----------------------------------------------------------------------------
# Packages
@@ -357,7 +408,7 @@ test_style_osl_qtc: .FORCE
#
project_qtcreator: .FORCE
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
project_netbeans: .FORCE
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
@@ -440,9 +491,12 @@ check_descriptions: .FORCE
tgz: .FORCE
./build_files/utils/build_tgz.sh
INKSCAPE_BIN?="inkscape"
icons: .FORCE
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
icons_geom: .FORCE
BLENDER_BIN=$(BLENDER_BIN) \
@@ -458,9 +512,12 @@ update: .FORCE
fi
git pull --rebase
git submodule update --init --recursive
# Use blender2.8 branch for submodules that have it.
git submodule foreach "git checkout blender2.8 || git checkout master"
git submodule foreach git pull --rebase origin
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
format: .FORCE
PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
python3 source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
# -----------------------------------------------------------------------------

View File

@@ -25,16 +25,16 @@
# Windows and macOS, and install_deps.sh on Linux.
#
# WINDOWS USAGE:
# Don't call this cmake file your self, use build_deps.cmd
# Don't call this cmake file yourself, use build_deps.cmd
# build_deps 2013 x64 / build_deps 2013 x86
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake libtool yasm nasm
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
# Install compiler, cmake, autoconf, automake, libtool, yasm
# Install compiler cmake autoconf automake libtool yasm nasm tcl
# Run "make deps" from main Blender directory
#
####################################################################################################
@@ -47,13 +47,13 @@ include(cmake/options.cmake)
include(cmake/versions.cmake)
if(ENABLE_MINGW64)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
else()
set(mingw_LIBDIR ${LIBDIR})
set(mingw_LIBDIR ${LIBDIR})
endif()
include(cmake/zlib.cmake)
@@ -91,64 +91,68 @@ include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/numpy.cmake)
include(cmake/pugixml.cmake)
if(UNIX AND NOT APPLE)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
if(WITH_WEBP)
include(cmake/webp.cmake)
include(cmake/webp.cmake)
endif()
if(WITH_EMBREE)
include(cmake/embree.cmake)
include(cmake/embree.cmake)
endif()
if(WIN32)
# HMD branch deps
include(cmake/hidapi.cmake)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
#include(cmake/lcms.cmake)
# HMD branch deps
include(cmake/hidapi.cmake)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
#include(cmake/lcms.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/openjpeg.cmake)
if(BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
endif()
endif()
endif()
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
include(cmake/xml2.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
endif()
endif()
endif()
endif()
if(UNIX)
include(cmake/bzip2.cmake)
include(cmake/ffi.cmake)
include(cmake/lzma.cmake)
include(cmake/ssl.cmake)
include(cmake/sqlite.cmake)
include(cmake/bzip2.cmake)
include(cmake/ffi.cmake)
include(cmake/lzma.cmake)
include(cmake/ssl.cmake)
include(cmake/sqlite.cmake)
endif()
include(cmake/harvest.cmake)

View File

@@ -17,89 +17,89 @@
# ***** END GPL LICENSE BLOCK *****
if(ALEMBIC_HDF5)
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
endif()
if(WIN32)
set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
else()
set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DALEMBIC_LIB_USES_BOOST=ON
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${ALEMBIC_ILMBASE}
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
-DUSE_MAYA=0
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
-DALEMBIC_ILMBASE_LINK_STATIC=On
-DALEMBIC_SHARED_LIBS=OFF
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DALEMBIC_LIB_USES_BOOST=ON
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${ALEMBIC_ILMBASE}
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
-DUSE_MAYA=0
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
-DALEMBIC_ILMBASE_LINK_STATIC=On
-DALEMBIC_SHARED_LIBS=OFF
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
)
ExternalProject_Add(external_alembic
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ALEMBIC_MD5}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ALEMBIC_MD5}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_alembic after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_alembic
external_boost
external_zlib
external_ilmbase
external_openexr
external_alembic
external_boost
external_zlib
external_ilmbase
external_openexr
)

View File

@@ -17,51 +17,51 @@
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
if(WIN32)
set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
if(WIN32)
set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
ExternalProject_Add(external_zlib_32
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_32}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib32
)
ExternalProject_Add(external_zlib_32
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_32}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib32
)
ExternalProject_Add(external_zlib_64
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_64}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib64
)
ExternalProject_Add(external_zlib_64
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_64}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib64
)
ExternalProject_Add(external_blendthumb_32
CMAKE_GENERATOR ${GENERATOR_32}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb32
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
)
ExternalProject_Add(external_blendthumb_32
CMAKE_GENERATOR ${GENERATOR_32}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb32
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
)
ExternalProject_Add(external_blendthumb_64
CMAKE_GENERATOR ${GENERATOR_64}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb64
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
)
endif()
ExternalProject_Add(external_blendthumb_64
CMAKE_GENERATOR ${GENERATOR_64}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb64
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
)
endif()
endif()

View File

@@ -17,59 +17,59 @@
# ***** END GPL LICENSE BLOCK *****
set(BLOSC_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC2.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-DDEACTIVATE_SNAPPY=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-DDEACTIVATE_SNAPPY=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
if(WIN32)
#prevent blosc from including it's own local copy of zlib in the object file
#and cause linker errors with everybody else
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-DPREFER_EXTERNAL_ZLIB=ON
)
#prevent blosc from including it's own local copy of zlib in the object file
#and cause linker errors with everybody else
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-DPREFER_EXTERNAL_ZLIB=ON
)
endif()
ExternalProject_Add(external_blosc
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BLOSC_HASH}
PREFIX ${BUILD_DIR}/blosc
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/blosc
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BLOSC_HASH}
PREFIX ${BUILD_DIR}/blosc
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/blosc
)
add_dependencies(
external_blosc
external_zlib
external_blosc
external_zlib
)
if(WIN32)
add_dependencies(
external_blosc
external_pthreads
)
add_dependencies(
external_blosc
external_pthreads
)
endif()
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
DEPENDEES install
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_blosc after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -19,91 +19,91 @@
set(BOOST_ADDRESS_MODEL 64)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
set(BOOST_ADDRESS_MODEL 32)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
endif()
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
set(semi_path "${PATCH_DIR}/semi.txt")
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
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)
#--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_68/ ${HARVEST_TARGET}/boost/include/)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
set(BOOST_ADDRESS_MODEL 32)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
endif()
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
set(semi_path "${PATCH_DIR}/semi.txt")
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
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)
#--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_68/ ${HARVEST_TARGET}/boost/include/)
endif()
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
${BOOST_WITH_PYTHON}
${BOOST_TOOLSET}
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
${BOOST_WITH_PYTHON}
${BOOST_TOOLSET}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WIN32)
add_dependencies(
external_boost
Make_Python_Environment
)
add_dependencies(
external_boost
Make_Python_Environment
)
endif()

View File

@@ -21,19 +21,19 @@ set(BZIP2_CONFIGURE_ENV echo .)
set(BZIP2_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(BZIP2_LDFLAGS "-Wl,--as-needed")
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
set(BZIP2_LDFLAGS "-Wl,--as-needed")
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
endif()
ExternalProject_Add(external_bzip2
URL ${BZIP2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
INSTALL_DIR ${LIBDIR}/bzip2
URL ${BZIP2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
INSTALL_DIR ${LIBDIR}/bzip2
)

View File

@@ -17,47 +17,47 @@
# ***** END GPL LICENSE BLOCK *****
set(CLANG_EXTRA_ARGS
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
)
if(WIN32)
set(CLANG_GENERATOR "Ninja")
set(CLANG_GENERATOR "Ninja")
else()
set(CLANG_GENERATOR "Unix Makefiles")
set(CLANG_GENERATOR "Unix Makefiles")
endif()
ExternalProject_Add(external_clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PREFIX ${BUILD_DIR}/clang
CMAKE_GENERATOR ${CLANG_GENERATOR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PREFIX ${BUILD_DIR}/clang
CMAKE_GENERATOR ${CLANG_GENERATOR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
)
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
)
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
external_clang
ll
)

View File

@@ -19,10 +19,10 @@
set(CLEW_EXTRA_ARGS)
ExternalProject_Add(external_clew
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLEW_HASH}
PREFIX ${BUILD_DIR}/clew
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clew
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLEW_HASH}
PREFIX ${BUILD_DIR}/clew
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clew
)

View File

@@ -19,11 +19,11 @@
set(CUEW_EXTRA_ARGS)
ExternalProject_Add(external_cuew
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CUEW_HASH}
PREFIX ${BUILD_DIR}/cuew
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/cuew
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CUEW_HASH}
PREFIX ${BUILD_DIR}/cuew
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/cuew
)

View File

@@ -20,50 +20,50 @@
# library itself does not depend on them, so should give no problems.
set(EMBREE_EXTRA_ARGS
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
-DEMBREE_STATIC_LIB=ON
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
-DEMBREE_STATIC_LIB=ON
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
)
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
else()
set(EMBREE_BUILD_DIR)
set(EMBREE_BUILD_DIR)
endif()
ExternalProject_Add(external_embree
URL ${EMBREE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
URL ${EMBREE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
DEPENDEES install
)
else()
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
DEPENDEES install
)
else()
ExternalProject_Add_Step(external_embree after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -18,23 +18,23 @@
set(FAAD_EXTRA_ARGS)
if (WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
if(WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
else()
set(FAAD_EXTRA_CONFIGURE echo .)
set(FAAD_EXTRA_CONFIGURE echo .)
endif()
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
)
if(MSVC)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,24 +17,24 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ffi
URL ${FFI_URI}
URL_HASH SHA256=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
--enable-shared=no
--enable-static=yes
--with-pic
--libdir=${LIBDIR}/ffi/lib/
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
INSTALL_DIR ${LIBDIR}/ffi
URL ${FFI_URI}
URL_HASH SHA256=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
--enable-shared=no
--enable-static=yes
--with-pic
--libdir=${LIBDIR}/ffi/lib/
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
INSTALL_DIR ${LIBDIR}/ffi
)
if (UNIX AND NOT APPLE)
ExternalProject_Add_Step(external_ffi after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
DEPENDEES install
)
if(UNIX AND NOT APPLE)
ExternalProject_Add_Step(external_ffi after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
DEPENDEES install
)
endif()

View File

@@ -22,131 +22,131 @@ set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAG
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--disable-static
--enable-shared
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=yasm
)
endif()
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--disable-static
--enable-shared
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=yasm
)
endif()
else()
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--enable-static
--disable-shared
--enable-libopenjpeg
)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--enable-static
--disable-shared
--enable-libopenjpeg
)
endif()
if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
)
endif()
ExternalProject_Add(external_ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
# will fail. This patch does that in a way that is compatible with multiple distributions.
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
--disable-avfilter
--disable-vdpau
--disable-bzlib
--disable-libgsm
--disable-libspeex
--enable-libvpx
--prefix=${LIBDIR}/ffmpeg
--enable-libtheora
--enable-libvorbis
--enable-zlib
--enable-stripping
--enable-runtime-cpudetect
--disable-vaapi
--disable-nonfree
--enable-gpl
--disable-postproc
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl2
--disable-gnutls
--disable-videotoolbox
--disable-libxcb
--disable-xlib
--disable-audiotoolbox
--disable-cuvid
--disable-nvenc
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
--disable-crystalhd
--disable-sndio
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
# will fail. This patch does that in a way that is compatible with multiple distributions.
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
--disable-avfilter
--disable-vdpau
--disable-bzlib
--disable-libgsm
--disable-libspeex
--enable-libvpx
--prefix=${LIBDIR}/ffmpeg
--enable-libtheora
--enable-libvorbis
--enable-zlib
--enable-stripping
--enable-runtime-cpudetect
--disable-vaapi
--disable-nonfree
--enable-gpl
--disable-postproc
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl2
--disable-gnutls
--disable-videotoolbox
--disable-libxcb
--disable-xlib
--disable-audiotoolbox
--disable-cuvid
--disable-nvenc
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
--disable-crystalhd
--disable-sndio
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
)
if(MSVC)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
external_vpx
external_theora
external_vorbis
external_ogg
external_lame
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
external_vpx
external_theora
external_vorbis
external_ogg
external_lame
)
if(WIN32)
add_dependencies(
external_ffmpeg
external_zlib_mingw
)
add_dependencies(
external_ffmpeg
external_zlib_mingw
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
DEPENDEES install
)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
DEPENDEES install
)
endif()

View File

@@ -19,29 +19,29 @@
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
endif()
ExternalProject_Add(external_fftw3
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
)
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)
endif()
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)
endif()
endif()

View File

@@ -17,16 +17,16 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_flac
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
INSTALL_DIR ${LIBDIR}/flac
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
INSTALL_DIR ${LIBDIR}/flac
)
if(MSVC)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif()

View File

@@ -19,13 +19,13 @@
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
INSTALL_DIR ${LIBDIR}/flexbison
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
INSTALL_DIR ${LIBDIR}/flexbison
)

View File

@@ -17,19 +17,19 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
ExternalProject_Add(external_freeglut
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut
)
endif()
ExternalProject_Add(external_freeglut
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut
)
endif()
endif()

View File

@@ -17,28 +17,28 @@
# ***** END GPL LICENSE BLOCK *****
set(FREETYPE_EXTRA_ARGS
-DCMAKE_RELEASE_POSTFIX:STRING=2ST
-DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
-DWITH_BZip2=OFF
-DWITH_HarfBuzz=OFF
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
-DCMAKE_RELEASE_POSTFIX:STRING=2ST
-DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
-DWITH_BZip2=OFF
-DWITH_HarfBuzz=OFF
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
ExternalProject_Add(external_freetype
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/freetype/src/external_freetype < ${PATCH_DIR}/freetype.diff
INSTALL_DIR ${LIBDIR}/freetype
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/freetype/src/external_freetype < ${PATCH_DIR}/freetype.diff
INSTALL_DIR ${LIBDIR}/freetype
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
DEPENDEES install
)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
DEPENDEES install
)
endif()

View File

@@ -17,16 +17,16 @@
# ***** END GPL LICENSE BLOCK *****
set(GLEW_EXTRA_ARGS
-DBUILD_UTILS=Off
-DBUILD_SHARED_LIBS=Off
-DBUILD_UTILS=Off
-DBUILD_SHARED_LIBS=Off
)
ExternalProject_Add(external_glew
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLEW_HASH}
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
PREFIX ${BUILD_DIR}/glew
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glew
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLEW_HASH}
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
PREFIX ${BUILD_DIR}/glew
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glew
)

View File

@@ -19,10 +19,10 @@
set(GLFW_EXTRA_ARGS)
ExternalProject_Add(external_glfw
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLFW_HASH}
PREFIX ${BUILD_DIR}/glfw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glfw
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLFW_HASH}
PREFIX ${BUILD_DIR}/glfw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glfw
)

View File

@@ -21,91 +21,90 @@
########################################################################
if(NOT DEFINED HARVEST_TARGET)
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# 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 &&
# 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
)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# 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 &&
# 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()
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${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}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
DEPENDS Package_Python
)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${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}/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()
else(WIN32)
function(harvest from to)
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
if(pattern STREQUAL "")
get_filename_component(dirpath ${to} DIRECTORY)
get_filename_component(filename ${to} NAME)
install(
FILES ${LIBDIR}/${from}
DESTINATION ${HARVEST_TARGET}/${dirpath}
RENAME ${filename})
else()
install(
DIRECTORY ${LIBDIR}/${from}/
DESTINATION ${HARVEST_TARGET}/${to}
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "clang" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
if(pattern STREQUAL "")
get_filename_component(dirpath ${to} DIRECTORY)
get_filename_component(filename ${to} NAME)
install(
FILES ${LIBDIR}/${from}
DESTINATION ${HARVEST_TARGET}/${dirpath}
RENAME ${filename})
else()
install(
DIRECTORY ${LIBDIR}/${from}/
DESTINATION ${HARVEST_TARGET}/${to}
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
endfunction()
harvest(alembic/include alembic/include "*.h")
@@ -129,24 +128,31 @@ harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
harvest(clang/bin llvm/bin "clang-format")
harvest(clang/include llvm/include "*")
harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
if(APPLE)
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
endif()
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(openal/lib openal/lib "*.a")
harvest(openal/lib openal/lib "*.a")
harvest(blosc/include blosc/include "*.h")
harvest(blosc/lib blosc/lib "*.a")
harvest(blosc/include blosc/include "*.h")
harvest(blosc/lib blosc/lib "*.a")
harvest(zlib/include zlib/include "*.h")
harvest(zlib/lib zlib/lib "*.a")
harvest(zlib/include zlib/include "*.h")
harvest(zlib/lib zlib/lib "*.a")
harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a")
harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a")
else()
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
endif()
harvest(opencollada/include/opencollada opencollada/include "*.h")
harvest(opencollada/lib/opencollada opencollada/lib "*.a")

View File

@@ -17,26 +17,26 @@
# ***** END GPL LICENSE BLOCK *****
set(HDF5_EXTRA_ARGS
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
)
if(WIN32)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
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

@@ -19,11 +19,11 @@
set(HIDAPI_EXTRA_ARGS)
ExternalProject_Add(external_hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
)

View File

@@ -19,23 +19,23 @@
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
INSTALL_DIR ${LIBDIR}/iconv
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
INSTALL_DIR ${LIBDIR}/iconv
)
if(MSVC)
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_iconv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
DEPENDEES install
)
endif()
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_iconv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
DEPENDEES install
)
endif()
endif()

View File

@@ -17,42 +17,42 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_ilmbase after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_ilmbase after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr
DEPENDEES install
)
endif()
else()
set(ILMBASE_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ilmbase ${ILMBASE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
set(ILMBASE_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ilmbase ${ILMBASE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
endif()

View File

@@ -17,12 +17,12 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_jemalloc
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
INSTALL_DIR ${LIBDIR}/jemalloc
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
INSTALL_DIR ${LIBDIR}/jemalloc
)

View File

@@ -17,49 +17,49 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif(WIN32)

View File

@@ -18,30 +18,30 @@
set(LAME_EXTRA_ARGS)
if(MSVC)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
endif()
ExternalProject_Add(external_lame
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full
--with-fileio=sndfile
--without-vorbis
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--disable-frontend
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full
--with-fileio=sndfile
--without-vorbis
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--disable-frontend
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame
)
if(MSVC)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
endif()

View File

@@ -20,12 +20,12 @@ set(LCMS_EXTRA_ARGS
)
ExternalProject_Add(external_lcms
URL ${LCMS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
#patch taken from ocio
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms
URL ${LCMS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
#patch taken from ocio
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms
)

View File

@@ -17,41 +17,42 @@
# ***** END GPL LICENSE BLOCK *****
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
)
if(WIN32)
set(LLVM_GENERATOR "Ninja")
set(LLVM_GENERATOR "Ninja")
else()
set(LLVM_GENERATOR "Unix Makefiles")
set(LLVM_GENERATOR "Unix Makefiles")
endif()
# short project name due to long filename issues on windows
ExternalProject_Add(ll
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/ll
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/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/
)
endif()
ExternalProject_Add_Step(ll after_install
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
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/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

@@ -19,14 +19,14 @@
set(LZMA_PATCH_CMD echo .)
ExternalProject_Add(external_lzma
URL ${LZMA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
--disable-shared
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
INSTALL_DIR ${LIBDIR}/lzma
URL ${LZMA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
--disable-shared
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
INSTALL_DIR ${LIBDIR}/lzma
)

View File

@@ -17,50 +17,50 @@
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
set(NUMPY_BUILD_OPTION --debug)
else()
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif()
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
set(NUMPY_BUILD_OPTION --debug)
else()
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
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/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_INSTALL
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
)
else()
set(NUMPY_INSTALL echo .)
set(NUMPY_PATCH echo .)
set(NUMPY_INSTALL echo .)
set(NUMPY_PATCH echo .)
endif()
ExternalProject_Add(external_numpy
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
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 --old-and-unmanageable
INSTALL_COMMAND ${NUMPY_INSTALL}
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
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 --old-and-unmanageable
INSTALL_COMMAND ${NUMPY_INSTALL}
)
if(WIN32)
ExternalProject_Add_Step(external_numpy after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
DEPENDEES install
)
ExternalProject_Add_Step(external_numpy after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
DEPENDEES install
)
endif()
add_dependencies(
external_numpy
Make_Python_Environment
external_numpy
Make_Python_Environment
)

View File

@@ -17,16 +17,16 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ogg
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
INSTALL_DIR ${LIBDIR}/ogg
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
INSTALL_DIR ${LIBDIR}/ogg
)
if(MSVC)
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,38 +17,51 @@
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=Off
-DALSOFT_NO_CONFIG_UTIL=On
-DALSOFT_EXAMPLES=Off
-DALSOFT_TESTS=Off
-DALSOFT_CONFIG=Off
-DALSOFT_HRTF_DEFS=Off
-DALSOFT_INSTALL=On
-DALSOFT_BACKEND_SNDIO=Off
)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=OFF
-DALSOFT_NO_CONFIG_UTIL=ON
-DALSOFT_EXAMPLES=OFF
-DALSOFT_TESTS=OFF
-DALSOFT_CONFIG=OFF
-DALSOFT_HRTF_DEFS=OFF
-DALSOFT_INSTALL=ON
-DALSOFT_BACKEND_SNDIO=OFF
)
if(UNIX)
set(OPENAL_EXTRA_ARGS ${OPENAL_EXTRA_ARGS} -DLIBTYPE=STATIC)
endif()
if(UNIX)
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DLIBTYPE=STATIC
)
endif()
ExternalProject_Add(external_openal
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(UNIX AND NOT APPLE)
# Ensure we have backends for playback.
set(OPENAL_EXTRA_ARGS
${OPENAL_EXTRA_ARGS}
-DALSOFT_REQUIRE_ALSA=ON
-DALSOFT_REQUIRE_OSS=ON
-DALSOFT_REQUIRE_PULSEAUDIO=ON
)
endif()
if(WIN32)
ExternalProject_Add_Step(external_openal after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
DEPENDEES install
)
endif()
ExternalProject_Add(external_openal
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(WIN32)
ExternalProject_Add_Step(external_openal after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
DEPENDEES install
)
endif()
endif()

View File

@@ -17,49 +17,49 @@
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
endif()
ExternalProject_Add(external_opencollada
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencollada
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencollada
)
if(UNIX)
add_dependencies(
external_opencollada
external_xml2
)
add_dependencies(
external_opencollada
external_xml2
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,96 +17,96 @@
# ***** END GPL LICENSE BLOCK *****
set(OPENCOLORIO_EXTRA_ARGS
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
-DOCIO_BUILD_TRUELIGHT=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_JNIGLUE=OFF
-DOCIO_STATIC_JNIGLUE=OFF
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
-DOCIO_BUILD_TRUELIGHT=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_JNIGLUE=OFF
-DOCIO_STATIC_JNIGLUE=OFF
)
if(WIN32)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_BUILD_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INLINES_HIDDEN=OFF
-DOCIO_PYGLUE_LINK=OFF
-DOCIO_PYGLUE_RESPECT_ABI=OFF
-DOCIO_PYGLUE_SONAME=OFF
-DOCIO_PYGLUE_LIB_PREFIX=OFF
-DUSE_EXTERNAL_TINYXML=ON
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-DUSE_EXTERNAL_YAML=ON
-DYAML_CPP_FOUND=ON
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
#lie because ocio cmake is demanding boost even though it is not needed
-DYAML_CPP_VERSION=0.5.0
)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_BUILD_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INLINES_HIDDEN=OFF
-DOCIO_PYGLUE_LINK=OFF
-DOCIO_PYGLUE_RESPECT_ABI=OFF
-DOCIO_PYGLUE_SONAME=OFF
-DOCIO_PYGLUE_LIB_PREFIX=OFF
-DUSE_EXTERNAL_TINYXML=ON
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-DUSE_EXTERNAL_YAML=ON
-DYAML_CPP_FOUND=ON
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
#lie because ocio cmake is demanding boost even though it is not needed
-DYAML_CPP_VERSION=0.5.0
)
else()
set(OCIO_PATCH opencolorio.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
)
set(OCIO_PATCH opencolorio.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
)
endif()
ExternalProject_Add(external_opencolorio
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
)
if(NOT WIN32)
add_custom_command(
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
add_custom_command(
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
endif()
add_dependencies(
external_opencolorio
external_boost
external_opencolorio
external_boost
)
if(WIN32)
add_dependencies(
external_opencolorio
external_tinyxml
external_yamlcpp
add_dependencies(
external_opencolorio
external_tinyxml
external_yamlcpp
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)
endif()
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,62 +17,62 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OPENEXR_EXTRA_ARGS
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
-DOPENEXR_BUILD_ILMBASE=On
-DOPENEXR_BUILD_OPENEXR=On
-DOPENEXR_BUILD_PYTHON_LIBS=Off
-DOPENEXR_BUILD_STATIC=On
-DOPENEXR_BUILD_SHARED=Off
-DOPENEXR_BUILD_TESTS=Off
-DOPENEXR_BUILD_VIEWERS=Off
-DOPENEXR_BUILD_UTILS=Off
-DOPENEXR_NAMESPACE_VERSIONING=Off
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OPENEXR_EXTRA_ARGS
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
-DOPENEXR_BUILD_ILMBASE=On
-DOPENEXR_BUILD_OPENEXR=On
-DOPENEXR_BUILD_PYTHON_LIBS=Off
-DOPENEXR_BUILD_STATIC=On
-DOPENEXR_BUILD_SHARED=Off
-DOPENEXR_BUILD_TESTS=Off
-DOPENEXR_BUILD_VIEWERS=Off
-DOPENEXR_BUILD_UTILS=Off
-DOPENEXR_NAMESPACE_VERSIONING=Off
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
ExternalProject_Add_Step(external_openexr after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
#libs have moved between versions, just duplicate it for now.
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
DEPENDEES install
)
ExternalProject_Add_Step(external_openexr after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
#libs have moved between versions, just duplicate it for now.
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
DEPENDEES install
)
else()
set(OPENEXR_PKG_CONFIG_PATH ${LIBDIR}/zlib/share/pkgconfig)
set(OPENEXR_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
--with-ilmbase-prefix=${LIBDIR}/ilmbase
)
set(OPENEXR_PKG_CONFIG_PATH ${LIBDIR}/zlib/share/pkgconfig)
set(OPENEXR_EXTRA_ARGS
--enable-static
--disable-shared
--enable-cxxstd=11
--with-ilmbase-prefix=${LIBDIR}/ilmbase
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CONFIGURE_COMMAND ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${OPENEXR_PKG_CONFIG_PATH} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/openexr ${OPENEXR_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CONFIGURE_COMMAND ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${OPENEXR_PKG_CONFIG_PATH} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/openexr ${OPENEXR_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make install
INSTALL_DIR ${LIBDIR}/openexr
)
endif()
add_dependencies(
external_openexr
external_zlib
external_ilmbase
external_openexr
external_zlib
external_ilmbase
)

View File

@@ -17,136 +17,136 @@
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OIIO_TOOLS ON)
set(OIIO_TOOLS ON)
else()
set(OIIO_TOOLS OFF)
set(OIIO_TOOLS OFF)
endif()
if(UNIX AND NOT APPLE)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
else()
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
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)
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/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
)
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/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
)
else()
set(OPENJPEG_FLAGS
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
)
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}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-OIIO_BUILD_CPP11=ON
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-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
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-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/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-OIIO_BUILD_CPP11=ON
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-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
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-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/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
ExternalProject_Add(external_openimageio
URL ${OPENIMAGEIO_URI}
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 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
URL ${OPENIMAGEIO_URI}
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 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
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}
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

@@ -22,43 +22,43 @@
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
ExternalProject_Add(external_openjpeg
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
INSTALL_DIR ${LIBDIR}/openjpeg
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
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()
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 libopenjp2${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -18,15 +18,16 @@
ExternalProject_Add(external_openmp
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/clang
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
)
add_dependencies(
external_openmp
external_clang
external_openmp
external_clang
)

View File

@@ -17,86 +17,85 @@
# ***** END GPL LICENSE BLOCK *****
set(OPENSUBDIV_EXTRA_ARGS
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
)
if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=OFF
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
)
endif()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=OFF
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
)
endif()
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-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}
)
set(OPENSUBDIV_EXTRA_ARGS
${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()
ExternalProject_Add(external_opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opensubdiv after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
DEPENDEES install
)
endif()
endif()
add_dependencies(
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
external_tbb
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
external_tbb
)

View File

@@ -17,86 +17,86 @@
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
set(BLOSC_POST _d)
endif()
set(OPENVDB_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-DOPENVDB_BUILD_UNITTESTS=Off
-DOPENVDB_BUILD_PYTHON_MODULE=Off
-DGLEW_LOCATION=${LIBDIR}/glew/
-DBLOSC_LOCATION=${LIBDIR}/blosc/
-DTBB_LOCATION=${LIBDIR}/tbb/
-DTBB_ROOT=${LIBDIR}/tbb/
-DOPENEXR_LOCATION=${LIBDIR}/openexr
-DILMBASE_LOCATION=${LIBDIR}/ilmbase
-DIlmbase_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-DOPENVDB_BUILD_UNITTESTS=Off
-DOPENVDB_BUILD_PYTHON_MODULE=Off
-DGLEW_LOCATION=${LIBDIR}/glew/
-DBLOSC_LOCATION=${LIBDIR}/blosc/
-DTBB_LOCATION=${LIBDIR}/tbb/
-DTBB_ROOT=${LIBDIR}/tbb/
-DOPENEXR_LOCATION=${LIBDIR}/openexr
-DILMBASE_LOCATION=${LIBDIR}/ilmbase
-DIlmbase_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DIlmbase_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
)
if(WIN32)
# Namespaces seem to be buggy and cause linker errors due to things not
# being in the correct namespace
# needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DOPENEXR_NAMESPACE_VERSIONING=OFF
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC2.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
-DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
)
endif()
# Namespaces seem to be buggy and cause linker errors due to things not
# being in the correct namespace
# needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DOPENEXR_NAMESPACE_VERSIONING=OFF
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC3.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
-DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
)
endif()
endif()
ExternalProject_Add(openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
)
add_dependencies(
openvdb
external_tbb
external_boost
external_ilmbase
external_openexr
external_zlib
external_blosc
openvdb
external_tbb
external_boost
external_ilmbase
external_openexr
external_zlib
external_blosc
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,22 +17,22 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_EMBREE "Enable building of Embree" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
endif()
message("BuildMode = ${BUILD_MODE}")
if(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
endif()
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
@@ -46,174 +46,173 @@ message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(LIBEXT ".lib")
set(LIBPREFIX "")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(LIBEXT ".lib")
set(LIBPREFIX "")
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
call ${PERL_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
call ${PERL_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_COMMAND sh ./configure)
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
set(CONFIGURE_COMMAND sh ./configure)
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
else()
set(PATCH_CMD patch)
set(LIBEXT ".a")
set(LIBPREFIX "lib")
set(PATCH_CMD patch)
set(LIBEXT ".a")
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.13)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
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.11)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
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}
)
else()
set(PLATFORM_CFLAGS "-fPIC")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
endif()
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-darwin15.0.0) # OS X 10.11
set(PLATFORM_CMAKE_FLAGS
-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")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
)
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
)
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
endif()
set(DEFAULT_CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
${PLATFORM_CMAKE_FLAGS}
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
#we need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
#we need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
else()
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
endif()
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
else()
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
endif()
else()
set(ZLIB_LIBRARY libz${LIBEXT})
set(ZLIB_LIBRARY libz${LIBEXT})
endif()
if(MSVC)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
set(CMAKE_INSTALL_MESSAGE LAZY)

View File

@@ -17,116 +17,124 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
else()
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
SET(OSL_PLATFORM_FLAGS)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
SET(OSL_PLATFORM_FLAGS)
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Half{ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/IlmThread${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Iex${ILMBASE_VERSION_POSTFIX}.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}")
set(OSL_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DUSE_PARTIO=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DUSE_PARTIO=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
)
if(WIN32)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
)
endif()
ExternalProject_Add(external_osl
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
)
add_dependencies(
external_osl
external_boost
ll
external_clang
external_ilmbase
external_openexr
external_zlib
external_flexbison
external_openimageio
external_pugixml
external_osl
external_boost
ll
external_clang
external_ilmbase
external_openexr
external_zlib
external_flexbison
external_openimageio
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
DEPENDEES install
)
endif()
if(UNIX AND NOT APPLE)
# Rely on PugiXML compiled with OpenImageIO
else()
add_dependencies(
external_osl
external_pugixml
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_osl after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,28 +17,28 @@
# ***** END GPL LICENSE BLOCK *****
set(PNG_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DPNG_STATIC=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DPNG_STATIC=ON
)
ExternalProject_Add(external_png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png
)
add_dependencies(
external_png
external_zlib
external_png
external_zlib
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -17,39 +17,37 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(PTHREAD_XCFLAGS /MD)
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H ")
endif()
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XCFLAGS=${PTHREAD_XCFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA512=${PTHREADS_SHA512}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/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
)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
INSTALL_DIR ${LIBDIR}/pthreads
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pthreads after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pthreads after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
DEPENDEES install
)
endif()
endif()

View File

@@ -20,24 +20,24 @@ set(PUGIXML_EXTRA_ARGS
)
ExternalProject_Add(external_pugixml
URL ${PUGIXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
URL ${PUGIXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -18,163 +18,164 @@
set(PYTHON_POSTFIX)
if(BUILD_MODE STREQUAL Debug)
set(PYTHON_POSTFIX _d)
set(PYTHON_POSTFIX _d)
endif()
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_POSTFIX -x64)
else()
set(SSL_POSTFIX)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_POSTFIX -x64)
else()
set(SSL_POSTFIX)
endif()
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
ExternalProject_Add(external_python
URL ${PYTHON_URI}
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}"
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}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
${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}")
ExternalProject_Add(external_python
URL ${PYTHON_URI}
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}"
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}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
${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}")
else()
if(APPLE)
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
export ac_cv_func_basename_r=no &&
export ac_cv_func_clock_getres=no &&
export ac_cv_func_clock_gettime=no &&
export ac_cv_func_clock_settime=no &&
export ac_cv_func_dirname_r=no &&
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no)
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
if(APPLE)
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
export ac_cv_func_basename_r=no &&
export ac_cv_func_clock_getres=no &&
export ac_cv_func_clock_gettime=no &&
export ac_cv_func_clock_settime=no &&
export ac_cv_func_dirname_r=no &&
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no)
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
endif()
if(MSVC)
add_custom_command(
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}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_queue${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_queue${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
#xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
#leaving it commented out, so I won't get confused again with the next update.
#COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libcrypto-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libcrypto-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
)
add_custom_command(
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}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_queue${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_queue${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
#xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
#leaving it commented out, so I won't get confused again with the next update.
#COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libcrypto-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libcrypto-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/sqlite3${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/sqlite3${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
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)
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
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}/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
)
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
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}/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
)
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
endif()
if(UNIX)
add_dependencies(
external_python
external_bzip2
external_ffi
external_lzma
external_ssl
external_sqlite
external_zlib
)
add_dependencies(
external_python
external_bzip2
external_ffi
external_lzma
external_ssl
external_sqlite
external_zlib
)
endif()

View File

@@ -16,26 +16,26 @@
#
# ***** 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
)
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 .)
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}
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
external_python_site_packages
Make_Python_Environment
)

View File

@@ -17,33 +17,33 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
else()
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
-DSNDIO=OFF
)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
-DSNDIO=OFF
)
endif()
ExternalProject_Add(external_sdl
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib
DEPENDEES install
)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib
DEPENDEES install
)
endif()

View File

@@ -24,11 +24,11 @@
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
@@ -36,192 +36,192 @@ message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw32")
# download mingw32
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://astuteinternet.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.4/threads-win32/sjlj/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://astuteinternet.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.4/threads-win32/sjlj/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw32
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z"))
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win32/nasm-2.13.02-win32.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win32/nasm-2.13.02-win32.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd")
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl32/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
endif()
message("checking i686-w64-mingw32-strings")
# copy strings.exe to i686-w64-mingw32-strings for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe")
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
endif()
message("checking i686-w64-mingw32-ar.exe")
# copy ar.exe to i686-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe")
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
endif()
message("checking i686-w64-mingw32-strip.exe")
# copy strip.exe to i686-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe")
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
endif()
message("checking i686-w64-mingw32-ranlib.exe")
# copy ranlib.exe to i686-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -24,11 +24,11 @@
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
@@ -36,192 +36,192 @@ message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw64")
# download ming64
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
message("Downloading mingw64")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.4/threads-win32/seh/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
message("Downloading mingw64")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.4/threads-win32/seh/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw64
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z"))
message("Extracting mingw64")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
message("Extracting mingw64")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
)
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
)
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd")
message("Installing ming64sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
)
message("Installing ming64sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
)
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
endif()
message("checking x86_64-w64-mingw32-strings.exe")
# copy strings.exe to x86_64-w64-mingw32-strings.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe")
message("fixing x86_64-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
)
message("fixing x86_64-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
)
endif()
message("checking x86_64-w64-mingw32-ar.exe")
# copy ar.exe to x86_64-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe")
message("fixing x86_64-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
)
message("fixing x86_64-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
)
endif()
message("checking x86_64-w64-mingw32-strip.exe")
# copy strip.exe to x86_64-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe")
message("fixing x86_64-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
)
message("fixing x86_64-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
)
endif()
message("checking x86_64-w64-mingw32-ranlib.exe")
# copy ranlib.exe to x86_64-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
message("fixing x86_64-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
message("fixing x86_64-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -20,43 +20,43 @@ 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(SNDFILE_ENV set ${SNDFILE_ENV} &&)
#shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
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 )
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)
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)
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/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
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/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
)
if(MSVC)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_sndfile
external_ogg
external_vorbis
external_sndfile
external_ogg
external_vorbis
)
if(UNIX)
add_dependencies(
external_sndfile
external_flac
)
add_dependencies(
external_sndfile
external_flac
)
endif()

View File

@@ -17,12 +17,12 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_spnav
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
INSTALL_DIR ${LIBDIR}/spnav
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
INSTALL_DIR ${LIBDIR}/spnav
)

View File

@@ -20,38 +20,38 @@ set(SQLITE_CONFIGURE_ENV echo .)
set(SQLITE_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(SQLITE_LDFLAGS -Wl,--as-needed)
set(SQLITE_CFLAGS
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_SESSION \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
--enable-shared=no)
set(SQLITE_LDFLAGS -Wl,--as-needed)
set(SQLITE_CFLAGS
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_SESSION \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
--enable-shared=no)
endif()
ExternalProject_Add(external_sqlite
URL ${SQLITE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${SQLITE_PATCH_CMD}
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install
INSTALL_DIR ${LIBDIR}/sqlite
URL ${SQLITE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${SQLITE_PATCH_CMD}
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install
INSTALL_DIR ${LIBDIR}/sqlite
)

View File

@@ -19,30 +19,30 @@
set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if (APPLE)
set(SSL_OS_COMPILER "blender-darwin-x86_64")
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-x86_64")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
set(SSL_OS_COMPILER "blender-linux-x86")
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
set(SSL_OS_COMPILER "blender-linux-x86")
endif()
endif()
ExternalProject_Add(external_ssl
URL ${SSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
--openssldir=${LIBDIR}/ssl
no-shared
no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
--config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
${SSL_OS_COMPILER}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
INSTALL_DIR ${LIBDIR}/ssl
URL ${SSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
--openssldir=${LIBDIR}/ssl
no-shared
no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
--config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
${SSL_OS_COMPILER}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
INSTALL_DIR ${LIBDIR}/ssl
)

View File

@@ -17,36 +17,36 @@
# ***** END GPL LICENSE BLOCK *****
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=Off
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=Off
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
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/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
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/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
DEPENDEES install
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -17,28 +17,28 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_theora
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
--with-vorbis=${LIBDIR}/vorbis
--disable-examples
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
INSTALL_DIR ${LIBDIR}/theora
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
--with-vorbis=${LIBDIR}/vorbis
--disable-examples
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
INSTALL_DIR ${LIBDIR}/theora
)
add_dependencies(
external_theora
external_vorbis
external_ogg
external_theora
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,31 +17,31 @@
# ***** END GPL LICENSE BLOCK *****
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
)
ExternalProject_Add(external_tiff
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff
)
add_dependencies(
external_tiff
external_zlib
external_tiff
external_zlib
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -20,12 +20,12 @@ set(TINYXML_EXTRA_ARGS
)
ExternalProject_Add(external_tinyxml
URL ${TINYXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
#patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml
URL ${TINYXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
#patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml
)

View File

@@ -41,37 +41,37 @@ set(BLOSC_VERSION 1.14.4)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
set(BLOSC_HASH e80dfc71e4cba03b8d01ed0876547ffe)
set(PTHREADS_VERSION 2-9-1)
set(PTHREADS_URI ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PTHREADS_VERSION}-release.tar.gz)
set(PTHREADS_SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551)
set(PTHREADS_VERSION 3.0.0)
set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(ILMBASE_VERSION 2.3.0)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
set(ILMBASE_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_POSTFIX _s)
else()
set(ILMBASE_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_POSTFIX _s_d)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(ILMBASE_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_POSTFIX _s)
else()
set(ILMBASE_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_POSTFIX _s_d)
endif()
else()
set(ILMBASE_VERSION_POSTFIX)
set(ILMBASE_VERSION_POSTFIX)
endif()
set(ILMBASE_URI https://github.com/openexr/openexr/releases/download/v${ILMBASE_VERSION}/ilmbase-${ILMBASE_VERSION}.tar.gz)
set(ILMBASE_HASH 354bf86de3b930ab87ac63619d60c860)
set(OPENEXR_VERSION 2.3.0)
if (WIN32) #release 2.3.0 tarball has broken cmake support
set(OPENEXR_URI https://github.com/openexr/openexr/archive/0ac2ea34c8f3134148a5df4052e40f155b76f6fb.tar.gz)
set(OPENEXR_HASH ed159435d508240712fbaaa21d94bafb)
if(WIN32) #release 2.3.0 tarball has broken cmake support
set(OPENEXR_URI https://github.com/openexr/openexr/archive/0ac2ea34c8f3134148a5df4052e40f155b76f6fb.tar.gz)
set(OPENEXR_HASH ed159435d508240712fbaaa21d94bafb)
else()
set(OPENEXR_VERSION_POSTFIX)
set(OPENEXR_URI https://github.com/openexr/openexr/releases/download/v${OPENEXR_VERSION}/openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH a157e8a46596bc185f2472a5a4682174)
set(OPENEXR_VERSION_POSTFIX)
set(OPENEXR_URI https://github.com/openexr/openexr/releases/download/v${OPENEXR_VERSION}/openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH a157e8a46596bc185f2472a5a4682174)
endif()
set(FREETYPE_VERSION 2.9.1)
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH 3adb0e35d3c100c456357345ccfa8056)
set(GLEW_VERSION 1.13.0)
@@ -105,17 +105,17 @@ set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_3_3)
set(OPENSUBDIV_Hash 29c79dc01ef616aab02670bed5544ddd)
set(OPENSUBDIV_VERSION v3_4_0_RC2)
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(SDL_VERSION 2.0.8)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 3800d705cef742c6a634f202c37f263f)
set(OPENCOLLADA_VERSION v1.6.63)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH e937c3897b86fc0da53cde97257f5156)
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
set(OPENCOLORIO_VERSION 1.1.0)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
@@ -251,7 +251,7 @@ set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALL
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
set(XML2_VERSION 2.9.4)
set(XML2_URI ftp://xmlsoft.org/libxml2/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
set(TINYXML_VERSION 2_6_2)
@@ -284,7 +284,7 @@ set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERS
set(BZIP2_HASH d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7)
set(FFI_VERSION 3.2.1)
set(FFI_URI ftp://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37)
set(LZMA_VERSION 5.2.4)

View File

@@ -17,25 +17,25 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_vorbis
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
INSTALL_DIR ${LIBDIR}/vorbis
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
INSTALL_DIR ${LIBDIR}/vorbis
)
add_dependencies(
external_vorbis
external_ogg
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,44 +17,44 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc --disable-multithread)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc --disable-multithread)
endif()
else()
if(APPLE)
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
if(APPLE)
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
endif()
ExternalProject_Add(external_vpx
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
INSTALL_DIR ${LIBDIR}/vpx
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
INSTALL_DIR ${LIBDIR}/vpx
)
if(MSVC)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
endif()

View File

@@ -20,22 +20,22 @@
# library itself does not depend on them, so should give no problems.
set(WEBP_EXTRA_ARGS
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
)
if(WIN32)
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
else()
set(WEBP_BUILD_DIR)
set(WEBP_BUILD_DIR)
endif()
ExternalProject_Add(external_webp
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/webp
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/webp
)

View File

@@ -17,29 +17,29 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
else()
set(X264_PATCH_CMD echo .)
set(X264_PATCH_CMD echo .)
endif()
ExternalProject_Add(external_x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
${X264_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
INSTALL_DIR ${LIBDIR}/x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
${X264_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
INSTALL_DIR ${LIBDIR}/x264
)
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,20 +17,20 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_xml2
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2
--disable-shared
--enable-static
--with-pic
--with-python=no
--with-lzma=no
--with-zlib=no
--with-iconv=no
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
INSTALL_DIR ${LIBDIR}/xml2
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2
--disable-shared
--enable-static
--with-pic
--with-python=no
--with-lzma=no
--with-zlib=no
--with-iconv=no
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
INSTALL_DIR ${LIBDIR}/xml2
)

View File

@@ -17,28 +17,28 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_xvidcore
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
)
ExternalProject_Add_Step(external_xvidcore after_install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
)
if(MSVC)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,18 +17,18 @@
# ***** END GPL LICENSE BLOCK *****
set(YAMLCPP_EXTRA_ARGS
-DBUILD_GMOCK=OFF
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DMSVC_SHARED_RT=OFF
-DBUILD_GMOCK=OFF
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DMSVC_SHARED_RT=OFF
)
ExternalProject_Add(external_yamlcpp
URL ${YAMLCPP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp
URL ${YAMLCPP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp
)

View File

@@ -17,39 +17,31 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
)
if (WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
DEPENDEES install
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
DEPENDEES install
)
endif()
else()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
DEPENDEES install
)
endif()
if (UNIX)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
DEPENDEES install
)
endif()
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
DEPENDEES install
)
endif()

View File

@@ -17,23 +17,23 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib_mingw
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
INSTALL_COMMAND echo .
INSTALL_DIR ${LIBDIR}/zlib_mingw
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
INSTALL_COMMAND echo .
INSTALL_DIR ${LIBDIR}/zlib_mingw
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib_mingw after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
DEPENDEES install
)
ExternalProject_Add_Step(external_zlib_mingw after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
DEPENDEES install
)
endif()
if(MSVC)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
endif()

View File

@@ -301,6 +301,8 @@ NO_BUILD=false
NO_CONFIRM=false
USE_CXX11=true
CLANG_FORMAT_VERSION_MIN="6.0"
PYTHON_VERSION="3.7.0"
PYTHON_VERSION_MIN="3.7"
PYTHON_FORCE_BUILD=false
@@ -356,7 +358,7 @@ OSL_FORCE_REBUILD=false
OSL_SKIP=false
# OpenSubdiv needs to be compiled for now
OSD_VERSION="3.3.3"
OSD_VERSION="3.4.0_RC2"
OSD_VERSION_MIN=$OSD_VERSION
OSD_FORCE_BUILD=false
OSD_FORCE_REBUILD=false
@@ -378,12 +380,11 @@ ALEMBIC_FORCE_BUILD=false
ALEMBIC_FORCE_REBUILD=false
ALEMBIC_SKIP=false
OPENCOLLADA_VERSION="1.6.63"
OPENCOLLADA_VERSION="1.6.68"
OPENCOLLADA_FORCE_BUILD=false
OPENCOLLADA_FORCE_REBUILD=false
OPENCOLLADA_SKIP=false
EMBREE_VERSION="3.2.4"
EMBREE_FORCE_BUILD=false
EMBREE_FORCE_REBUILD=false
@@ -2628,7 +2629,7 @@ compile_FFmpeg() {
./configure --cc="gcc -Wl,--as-needed" \
--extra-ldflags="-pthread -static-libgcc" \
--prefix=$_inst --enable-static \
--disable-ffplay --disable-ffserver --disable-doc \
--disable-ffplay --disable-doc \
--enable-gray \
--enable-avfilter --disable-vdpau \
--disable-bzlib --disable-libgsm --disable-libspeex \
@@ -2788,6 +2789,17 @@ install_DEB() {
PRINT ""
fi
PRINT ""
CLANG_FORMAT="clang-format"
check_package_version_ge_DEB $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
if [ $? -eq 0 ]; then
_packages="$_packages $CLANG_FORMAT"
else
PRINT ""
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
PRINT ""
fi
if [ "$WITH_JACK" = true ]; then
_packages="$_packages libspnav-dev"
# Only install jack if jack2 is not already installed!
@@ -3439,6 +3451,16 @@ install_RPM() {
install_packages_RPM libspnav-devel
fi
PRINT ""
CLANG_FORMAT="clang" # Yeah, on fedora/suse clang-format is part of main clang package...
check_package_version_ge_RPM $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM $CLANG_FORMAT
else
PRINT ""
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
PRINT ""
fi
PRINT ""
_do_compile_python=false
@@ -3886,6 +3908,18 @@ install_ARCH() {
fi
PRINT ""
CLANG_FORMAT="clang" # Yeah, on arch clang-format is part of main clang package...
check_package_version_ge_ARCH $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH $CLANG_FORMAT
else
PRINT ""
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
PRINT ""
fi
PRINT ""
_do_compile_python=false
if [ "$PYTHON_SKIP" = true ]; then
@@ -4524,18 +4558,33 @@ print_info() {
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
if [ -d $INST/blosc ]; then
_1="-D BLOSC_ROOT_DIR=$INST/blosc"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
fi
if [ "$WITH_OPENCOLLADA" = true ]; then
_1="-D WITH_OPENCOLLADA=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
if [ -d $INST/opencollada ]; then
_1="-D OPENCOLLADA_ROOT_DIR=$INST/opencollada"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
fi
if [ "$WITH_EMBREE" = true ]; then
_1="-D WITH_CYCLES_EMBREE=ON"
PRINT " $_1"
_buildargs="$_buildargs $_1"
if [ -d $INST/embree ]; then
_1="-D EMBREE_ROOT_DIR=$INST/embree"
PRINT " $_1"
_buildargs="$_buildargs $_1"
fi
fi
if [ "$WITH_JACK" = true ]; then

View File

@@ -1,13 +0,0 @@
diff --git a/opensubdiv/far/topologyRefiner.cpp b/opensubdiv/far/topologyRefiner.cpp
index 3754b36e..7fe42bcc 100644
--- a/opensubdiv/far/topologyRefiner.cpp
+++ b/opensubdiv/far/topologyRefiner.cpp
@@ -263,7 +263,7 @@ namespace internal {
bool IsEmpty() const { return *((int_type*)this) == 0; }
FeatureMask() { Clear(); }
- FeatureMask(Options const & options, Sdc::SchemeType sType) { InitializeFeatures(options, sType); }
+ FeatureMask(Options const & options, Sdc::SchemeType sType) { Clear(); InitializeFeatures(options, sType); }
// These are the two primary methods intended for use -- intialization via a set of Options
// and reduction of the subsequent feature set (which presumes prior initialization with the

View File

@@ -2,33 +2,22 @@
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
# Detect which libc we'll be linking against.
# Some of the paths will depend on this
# For libc-2.24 we are using chroot which runs on a 64bit system.
# There we can not use CPU bitness check since it is always 64bit. So instead
# we check for a specific libraries.
#
# Other builders we are runnign in a bare virtual machine, and the libraries
# are installed to /opt/.
# We assume that only 64bit builders exists in such configuration.
if(EXISTS "/lib/x86_64-linux-gnu/libc-2.24.so")
message(STATUS "Building in GLibc-2.24 environment")
set(GLIBC "2.24")
set(MULTILIB "/x86_64-linux-gnu")
set(LIBDIR_NAME "linux_x86_64")
message(STATUS "Building in GLibc-2.24 environment")
set(LIBDIR_NAME "linux_x86_64")
elseif(EXISTS "/lib/i386-linux-gnu//libc-2.24.so")
message(STATUS "Building in GLibc-2.24 environment")
set(GLIBC "2.24")
set(MULTILIB "/i386-linux-gnu")
set(LIBDIR_NAME "linux_i686")
elseif(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")
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")
message(STATUS "Building in GLibc-2.11 environment")
set(GLIBC "2.11")
set(MULTILIB "")
message(STATUS "Building in GLibc-2.24 environment")
set(LIBDIR_NAME "linux_i686")
else()
message(FATAL_ERROR "Unknown build environment")
message(STATUS "Building in generic 64bit environment")
set(LIBDIR_NAME "linux_x86_64")
endif()
# Default to only build Blender
@@ -51,122 +40,8 @@ set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
# ######## Release environment specific settings ########
if (NOT ${GLIBC} STREQUAL "2.24")
# All the hardcoded library paths and such
# LLVM libraries
set(LLVM_VERSION "3.4" CACHE STRING "" FORCE)
set(LLVM_ROOT_DIR "/opt/lib/llvm-${LLVM_VERSION}" CACHE STRING "" FORCE)
set(LLVM_STATIC ON CACHE BOOL "" FORCE)
# BOOST libraries
set(BOOST_ROOT "/opt/lib/boost" CACHE STRING "" FORCE)
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
# FFmpeg libraries
set(FFMPEG "/opt/lib/ffmpeg" CACHE STRING "" FORCE)
set(FFMPEG_LIBRARIES
avdevice avformat avcodec avutil avfilter swscale swresample
/usr/lib${MULTILIB}/libxvidcore.a
/usr/lib${MULTILIB}/libx264.a
/usr/lib${MULTILIB}/libmp3lame.a
/usr/lib${MULTILIB}/libvpx.a
/usr/lib${MULTILIB}/libvorbis.a
/usr/lib${MULTILIB}/libogg.a
/usr/lib${MULTILIB}/libvorbisenc.a
/usr/lib${MULTILIB}/libtheora.a
/usr/lib${MULTILIB}/libschroedinger-1.0.a
/usr/lib${MULTILIB}/liborc-0.4.a
CACHE STRING "" FORCE
)
# SndFile libraries
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)
set(OPENAL_INCLUDE_DIR "${OPENAL_ROOT_DIR}/include/AL" CACHE STRING "" FORCE)
set(OPENAL_LIBRARY
${OPENAL_ROOT_DIR}/lib/libopenal.a
${OPENAL_ROOT_DIR}/lib/libcommon.a
CACHE STRING "" FORCE
)
# OpenCollada libraries
set(OPENCOLLADA_UTF_LIBRARY "" CACHE STRING "" FORCE)
set(PCRE_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
set(PCRE_LIBRARY "/usr/lib${MULTILIB}/libpcre.a" CACHE STRING "" FORCE)
set(XML2_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
set(XML2_LIBRARY "/usr/lib${MULTILIB}/libxml2.a" CACHE STRING "" FORCE)
# OpenColorIO libraries
set(OPENCOLORIO_ROOT_DIR "/opt/lib/ocio" CACHE STRING "" FORCE)
set(OPENCOLORIO_OPENCOLORIO_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libOpenColorIO.a" CACHE STRING "" FORCE)
set(OPENCOLORIO_TINYXML_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libtinyxml.a" CACHE STRING "" FORCE)
set(OPENCOLORIO_YAML-CPP_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libyaml-cpp.a" CACHE STRING "" FORCE)
# Freetype
set(FREETYPE_INCLUDE_DIRS "/usr/include/freetype2" CACHE STRING "" FORCE)
set(FREETYPE_LIBRARY "/usr/lib${MULTILIB}/libfreetype.a" CACHE STRING "" FORCE)
# OpenImageIO
if(GLIBC EQUAL "2.19")
set(OPENIMAGEIO_LIBRARY
/opt/lib/oiio/lib/libOpenImageIO.a
/opt/lib/oiio/lib/libOpenImageIO_Util.a
/usr/lib${MULTILIB}/libwebp.a
/usr/lib${MULTILIB}/liblzma.a
/usr/lib${MULTILIB}/libjbig.a
${FREETYPE_LIBRARY}
CACHE STRING "" FORCE
)
endif()
# OpenSubdiv libraries
set(OPENSUBDIV_ROOT_DIR "/opt/lib/opensubdiv" CACHE STRING "" FORCE)
set(OPENSUBDIV_OSDCPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdCPU.a" CACHE STRING "" FORCE)
set(OPENSUBDIV_OSDGPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdGPU.a" CACHE STRING "" FORCE)
# OpenEXR libraries
set(OPENEXR_ROOT_DIR "/opt/lib/openexr" CACHE STRING "" FORCE)
set(OPENEXR_HALF_LIBRARY "/opt/lib/openexr/lib/libHalf.a" CACHE STRING "" FORCE)
set(OPENEXR_IEX_LIBRARY "/opt/lib/openexr/lib/libIex.a" CACHE STRING "" FORCE)
set(OPENEXR_ILMIMF_LIBRARY "/opt/lib/openexr/lib/libIlmImf.a" CACHE STRING "" FORCE)
set(OPENEXR_ILMTHREAD_LIBRARY "/opt/lib/openexr/lib/libIlmThread.a" CACHE STRING "" FORCE)
set(OPENEXR_IMATH_LIBRARY "/opt/lib/openexr/lib/libImath.a" CACHE STRING "" FORCE)
# JeMalloc library
set(JEMALLOC_LIBRARY "/opt/lib/jemalloc/lib/libjemalloc.a" CACHE STRING "" FORCE)
# Space navigation
set(SPACENAV_ROOT_DIR "/opt/lib/libspnav" CACHE STRING "" FORCE)
# Force some system libraries to be static
set(FFTW3_LIBRARY "/usr/lib${MULTILIB}/libfftw3.a" CACHE STRING "" FORCE)
set(JPEG_LIBRARY "/usr/lib${MULTILIB}/libjpeg.a" CACHE STRING "" FORCE)
set(PNG_LIBRARY "/usr/lib${MULTILIB}/libpng.a" CACHE STRING "" FORCE)
set(TIFF_LIBRARY "/usr/lib${MULTILIB}/libtiff.a" CACHE STRING "" FORCE)
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
)
else()
set(LIBDIR "/opt/blender-deps/${LIBDIR_NAME}" CACHE BOOL "" FORCE)
# TODO(sergey): Remove once Python is oficially bumped to 3.7.
set(PYTHON_VERSION 3.7 CACHE BOOL "" FORCE)
# Platform specific configuration, to ensure static linking against everything.
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
@@ -177,7 +52,5 @@ set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
set(PCRE_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
set(PCRE_LIBRARY "${LIBDIR}/opencollada/lib/libpcre.a" CACHE STRING "" FORCE)
endif()
# Additional linking libraries
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++ -no-pie" CACHE STRING "" FORCE)

View File

@@ -52,102 +52,59 @@ if 'cmake' in builder:
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
install_dir = os.path.abspath(os.path.join('..', 'install', builder))
targets = ['blender']
command_prefix = []
chroot_name = None # If not None command will be delegated to that chroot
cuda_chroot_name = None # If not None cuda compilationcommand will be delegated to that chroot
build_cubins = True # Whether to build Cycles CUDA kernels
bits = 64
# Config file to be used (relative to blender's sources root)
cmake_config_file = "build_files/cmake/config/blender_release.cmake"
cmake_cuda_config_file = None
# Set build options.
cmake_options = []
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
cuda_cmake_options = []
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release',
'-DWITH_GTESTS=ON']
if builder.startswith('mac'):
# Set up OSX architecture
if builder.endswith('x86_64_10_9_cmake'):
cmake_extra_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64')
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('_vs2017'):
if builder.startswith('win64'):
cmake_options.extend(['-G', 'Visual Studio 15 2017 Win64'])
elif builder.startswith('win32'):
bits = 32
cmake_options.extend(['-G', 'Visual Studio 15 2017'])
elif builder.endswith('_vc2015'):
if builder.startswith('win64'):
cmake_options.extend(['-G', 'Visual Studio 14 2015 Win64'])
elif builder.startswith('win32'):
bits = 32
cmake_options.extend(['-G', 'Visual Studio 14 2015'])
cmake_extra_options.append('-DCUDA_NVCC_FLAGS=--cl-version;2013;' +
'--compiler-bindir;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin')
else:
if builder.startswith('win64'):
cmake_options.extend(['-G', 'Visual Studio 12 2013 Win64'])
elif builder.startswith('win32'):
bits = 32
cmake_options.extend(['-G', 'Visual Studio 12 2013'])
if builder.startswith('win64'):
cmake_options.extend(['-G', 'Visual Studio 15 2017 Win64'])
elif builder.startswith('win32'):
bits = 32
cmake_options.extend(['-G', 'Visual Studio 15 2017'])
elif builder.startswith('linux'):
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
tokens = builder.split("_")
glibc = tokens[1]
if glibc == 'glibc224':
deb_name = "stretch"
elif glibc == 'glibc219':
deb_name = "jessie"
elif glibc == 'glibc211':
deb_name = "squeeze"
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_' + deb_name + '_x86_64'
targets = ['blender']
elif builder.endswith('i686_cmake'):
bits = 32
chroot_name = 'buildbot_' + deb_name + '_i686'
targets = ['blender']
if deb_name != "stretch":
cmake_extra_options.extend(["-DCMAKE_C_COMPILER=/usr/bin/gcc-7",
"-DCMAKE_CXX_COMPILER=/usr/bin/g++-7"])
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_' + deb_name + '_x86_64'
elif builder.endswith('i686_cmake'):
bits = 32
chroot_name = 'buildbot_' + deb_name + '_i686'
command_prefix = ['schroot', '-c', chroot_name, '--']
elif glibc == 'glibc217':
command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
# 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
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=ON")
cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=ON")
else:
cuda_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
cmake_options.append("-DCMAKE_INSTALL_PREFIX=%s" % (install_dir))
cmake_options += cmake_extra_options
# Prepare chroot command prefix if needed
if chroot_name:
chroot_prefix = ['schroot', '-c', chroot_name, '--']
else:
chroot_prefix = []
if cuda_chroot_name:
cuda_chroot_prefix = ['schroot', '-c', cuda_chroot_name, '--']
else:
cuda_chroot_prefix = chroot_prefix[:]
# Make sure no garbage remained from the previous run
if os.path.isdir(install_dir):
shutil.rmtree(install_dir)
@@ -156,27 +113,19 @@ if 'cmake' in builder:
print("Building target %s" % (target))
# Construct build directory name based on the target
target_build_dir = build_dir
target_chroot_prefix = chroot_prefix[:]
target_command_prefix = command_prefix[:]
if target != 'blender':
target_build_dir += '_' + target
target_name = 'install'
# Tweaking CMake options to respect the target
target_cmake_options = cmake_options[:]
if target == 'cuda':
target_cmake_options += cuda_cmake_options
target_chroot_prefix = cuda_chroot_prefix[:]
target_name = 'cycles_kernel_cuda'
# If cuda binaries are compiled as a separate target, make sure
# other targets don't compile cuda binaries.
if 'cuda' in targets and target != 'cuda':
target_cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=OFF")
# Do extra git fetch because not all platform/git/buildbot combinations
# update the origin remote, causing buildinfo to detect local changes.
os.chdir(blender_dir)
print("Fetching remotes")
command = ['git', 'fetch', '--all']
print(command)
retcode = subprocess.call(target_chroot_prefix + command)
retcode = subprocess.call(target_command_prefix + command)
if retcode != 0:
sys.exit(retcode)
# Make sure build directory exists and enter it
@@ -189,7 +138,13 @@ if 'cmake' in builder:
if os.path.exists('CMakeCache.txt'):
print("Removing CMake cache")
os.remove('CMakeCache.txt')
retcode = subprocess.call(target_chroot_prefix + ['cmake', blender_dir] + target_cmake_options)
# Remove buildinfo files to force buildbot to re-generate them.
for buildinfo in ('buildinfo.h', 'buildinfo.h.txt', ):
full_path = os.path.join('source', 'creator', buildinfo)
if os.path.exists(full_path):
print("Removing {}" . format(buildinfo))
os.remove(full_path)
retcode = subprocess.call(target_command_prefix + ['cmake', blender_dir] + target_cmake_options)
if retcode != 0:
print('Configuration FAILED!')
sys.exit(retcode)
@@ -201,21 +156,11 @@ if 'cmake' in builder:
print("Executing command:")
print(command)
retcode = subprocess.call(target_chroot_prefix + command)
retcode = subprocess.call(target_command_prefix + command)
if retcode != 0:
sys.exit(retcode)
if builder.startswith('linux') and target == 'cuda':
blender_h = os.path.join(blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
blender_version = int(parse_header_file(blender_h, 'BLENDER_VERSION'))
blender_version = "%d.%d" % (blender_version // 100, blender_version % 100)
kernels = os.path.join(target_build_dir, 'intern', 'cycles', 'kernel')
install_kernels = os.path.join(install_dir, blender_version, 'scripts', 'addons', 'cycles', 'lib')
os.mkdir(install_kernels)
print("Copying cuda binaries from %s to %s" % (kernels, install_kernels))
os.system('cp %s/*.cubin %s' % (kernels, install_kernels))
else:
print("Unknown building system")
sys.exit(1)

View File

@@ -107,8 +107,8 @@ if builder.find('cmake') != -1:
if builder.endswith('vc2015'):
platform += "-vc14"
builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
# NOTE: Blender 2.8 is already respected by blender_full_version.
if branch != '' and branch != 'blender2.8':
# NOTE: Blender 2.7 is already respected by blender_full_version.
if branch != '' and branch != 'blender2.7':
builderified_name = branch + "-" + builderified_name
os.rename(result_file, "{}.zip".format(builderified_name))
@@ -135,24 +135,28 @@ if builder.find('cmake') != -1:
blender_version = "%d.%d" % (blender_version // 100, blender_version % 100)
blender_hash = parse_header_file(buildinfo_h, 'BUILD_HASH')[1:-1]
blender_glibc = builder.split('_')[1]
command_prefix = []
bits = 64
blender_arch = 'x86_64'
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_jessie_x86_64'
bits = 64
blender_arch = 'x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_jessie_i686'
bits = 32
blender_arch = 'i686'
if blender_glibc == 'glibc224':
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_stretch_x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_stretch_i686'
bits = 32
blender_arch = 'i686'
command_prefix = ['schroot', '-c', chroot_name, '--']
elif blender_glibc == 'glibc217':
command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
# Strip all unused symbols from the binaries
print("Stripping binaries...")
chroot_prefix = ['schroot', '-c', chroot_name, '--']
subprocess.call(chroot_prefix + ['strip', '--strip-all', blender])
subprocess.call(command_prefix + ['strip', '--strip-all', blender])
print("Stripping python...")
py_target = os.path.join(install_dir, blender_version)
subprocess.call(chroot_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
subprocess.call(command_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
# Copy all specific files which are too specific to be copied by
# the CMake rules themselves
@@ -173,8 +177,8 @@ if builder.find('cmake') != -1:
blender_hash,
blender_glibc,
blender_arch)
# NOTE: Blender 2.8 is already respected by blender_full_version.
if branch != '' and branch != 'blender2.8':
# NOTE: Blender 2.7 is already respected by blender_full_version.
if branch != '' and branch != 'blender2.7':
package_name = branch + "-" + package_name
upload_filename = package_name + ".tar.bz2"

View File

@@ -33,27 +33,44 @@ builder = sys.argv[1]
blender_dir = '../blender.git'
if "cmake" in builder:
# cmake
print("Automated tests are still DISABLED!")
sys.exit(0)
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
chroot_name = None
chroot_prefix = []
install_dir = os.path.abspath(os.path.join('..', 'install', builder))
# NOTE: For quick test only to see if the approach work.
# n the future must be replaced with an actual blender version.
blender_version = '2.80'
blender_version_dir = os.path.join(install_dir, blender_version)
command_prefix = []
extra_ctest_args = []
"""
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_jessie_x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_jessie_i686'
if chroot_name:
chroot_prefix = ['schroot', '-c', chroot_name, '--']
"""
if builder.startswith('win'):
extra_ctest_args += ['-C', 'Release']
elif builder.startswith('linux'):
tokens = builder.split("_")
glibc = tokens[1]
if glibc == 'glibc224':
deb_name = "stretch"
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_' + deb_name + '_x86_64'
elif builder.endswith('i686_cmake'):
chroot_name = 'buildbot_' + deb_name + '_i686'
command_prefix = ['schroot', '--preserve-environment', '-c', chroot_name, '--']
elif glibc == 'glibc217':
command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
ctest_env = os.environ.copy()
ctest_env['BLENDER_SYSTEM_SCRIPTS'] = os.path.join(blender_version_dir, 'scripts')
ctest_env['BLENDER_SYSTEM_DATAFILES'] = os.path.join(blender_version_dir, 'datafiles')
os.chdir(build_dir)
retcode = subprocess.call(chroot_prefix + ['ctest', '--output-on-failure'])
sys.exit(retcode)
retcode = subprocess.call(command_prefix + ['ctest', '--output-on-failure'] + extra_ctest_args,
env=ctest_env)
# Always exit with a success, for until we know all the tests are passing
# on all builders.
sys.exit(0)
else:
print("Unknown building system")
sys.exit(1)

View File

@@ -47,10 +47,10 @@ FIND_PATH(EMBREE_INCLUDE_DIR
SET(_embree_FIND_COMPONENTS
embree3
embree_avx
embree_avx2
embree_sse42
embree3
lexers
math
simd

View File

@@ -23,7 +23,7 @@
# If GLEW_ROOT_DIR was defined in the environment, use it.
IF(NOT GLEW_ROOT_DIR AND NOT $ENV{GLEW_ROOT_DIR} STREQUAL "")
SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR})
SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR})
ENDIF()
SET(_glew_SEARCH_DIRS

View File

@@ -22,65 +22,65 @@
#=============================================================================
if(LLVM_ROOT_DIR)
if(DEFINED LLVM_VERSION)
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
endif()
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
endif()
if(DEFINED LLVM_VERSION)
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
endif()
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
endif()
else()
if(DEFINED LLVM_VERSION)
if(DEFINED LLVM_VERSION)
message(running llvm-config-${LLVM_VERSION})
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
endif()
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config)
endif()
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
endif()
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config)
endif()
endif()
if(NOT DEFINED LLVM_VERSION)
execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
endif()
if(NOT LLVM_ROOT_DIR)
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
endif()
if(NOT LLVM_LIBPATH)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
mark_as_advanced(LLVM_LIBPATH)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
mark_as_advanced(LLVM_LIBPATH)
endif()
if(LLVM_STATIC)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
else()
find_library(LLVM_LIBRARY
NAMES
LLVM-${LLVM_VERSION}
LLVMAnalysis # check for the static library as a fall-back
PATHS ${LLVM_LIBPATH})
find_library(LLVM_LIBRARY
NAMES
LLVM-${LLVM_VERSION}
LLVMAnalysis # check for the static library as a fall-back
PATHS ${LLVM_LIBPATH})
endif()
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
# way for LLVM_LIBRARY.
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE " " ";" LLVM_LIBRARY "${LLVM_LIBRARY}")
endif()
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
# way for LLVM_LIBRARY.
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE " " ";" LLVM_LIBRARY "${LLVM_LIBRARY}")
endif()
endif()

View File

@@ -6,7 +6,7 @@
# LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
# LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
# This can also be an environment variable.
# LIBSNDFILE_FOUND, If false, do not try to use SndFile.
# SNDFILE_FOUND, If false, do not try to use SndFile.
#
# also defined, but not for general use are
# LIBSNDFILE_LIBRARY, where to find the SndFile library.
@@ -24,11 +24,11 @@
# If LIBSNDFILE_ROOT_DIR was defined in the environment, use it.
IF(NOT LIBSNDFILE_ROOT_DIR AND NOT $ENV{LIBSNDFILE_ROOT_DIR} STREQUAL "")
SET(LIBSNDFILE_ROOT_DIR $ENV{LIBSNDFILE_ROOT_DIR})
SET(LIBSNDFILE_ROOT_DIR $ENV{LIBSNDFILE_ROOT_DIR})
ENDIF()
SET(_sndfile_SEARCH_DIRS
${LIBSNDFILE_ROOT_DIR}
${LIBSNDFILE_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
@@ -50,18 +50,18 @@ FIND_LIBRARY(LIBSNDFILE_LIBRARY
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set LIBSNDFILE_FOUND to TRUE if
# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
IF(LIBSNDFILE_FOUND)
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
ENDIF(LIBSNDFILE_FOUND)
IF(SNDFILE_FOUND)
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
ENDIF(SNDFILE_FOUND)
MARK_AS_ADVANCED(
LIBSNDFILE_INCLUDE_DIR
LIBSNDFILE_LIBRARY
LIBSNDFILE_INCLUDE_DIR
LIBSNDFILE_LIBRARY
)

View File

@@ -13,55 +13,55 @@
#=============================================================================
macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
if(WITH_GTESTS)
get_property(_current_include_directories
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
PROPERTY INCLUDE_DIRECTORIES)
set(TEST_INC
${_current_include_directories}
${CMAKE_SOURCE_DIR}/tests/gtests
${GLOG_INCLUDE_DIRS}
${GFLAGS_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/extern/gtest/include
${CMAKE_SOURCE_DIR}/extern/gmock/include
)
unset(_current_include_directories)
if(WITH_GTESTS)
get_property(_current_include_directories
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
PROPERTY INCLUDE_DIRECTORIES)
set(TEST_INC
${_current_include_directories}
${CMAKE_SOURCE_DIR}/tests/gtests
${GLOG_INCLUDE_DIRS}
${GFLAGS_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/extern/gtest/include
${CMAKE_SOURCE_DIR}/extern/gmock/include
)
unset(_current_include_directories)
add_executable(${NAME}_test ${SRC})
target_link_libraries(${NAME}_test
${EXTRA_LIBS}
${PLATFORM_LINKLIBS}
bf_testing_main
bf_intern_eigen
bf_intern_guardedalloc
extern_gtest
extern_gmock
# needed for glog
${PTHREADS_LIBRARIES}
${GLOG_LIBRARIES}
${GFLAGS_LIBRARIES})
if(WITH_OPENMP_STATIC)
target_link_libraries(${NAME}_test ${OpenMP_LIBRARIES})
endif()
set_target_properties(${NAME}_test PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
INCLUDE_DIRECTORIES "${TEST_INC}")
if(${DO_ADD_TEST})
add_test(NAME ${NAME}_test COMMAND ${TESTS_OUTPUT_DIR}/${NAME}_test WORKING_DIRECTORY $<TARGET_FILE_DIR:blender>)
endif()
endif()
add_executable(${NAME}_test ${SRC})
target_link_libraries(${NAME}_test
${EXTRA_LIBS}
${PLATFORM_LINKLIBS}
bf_testing_main
bf_intern_eigen
bf_intern_guardedalloc
extern_gtest
extern_gmock
# needed for glog
${PTHREADS_LIBRARIES}
${GLOG_LIBRARIES}
${GFLAGS_LIBRARIES})
if(WITH_OPENMP_STATIC)
target_link_libraries(${NAME}_test ${OpenMP_LIBRARIES})
endif()
set_target_properties(${NAME}_test PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
INCLUDE_DIRECTORIES "${TEST_INC}")
if(${DO_ADD_TEST})
add_test(NAME ${NAME}_test COMMAND ${TESTS_OUTPUT_DIR}/${NAME}_test WORKING_DIRECTORY $<TARGET_FILE_DIR:blender>)
endif()
endif()
endmacro()
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE")
BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE")
endmacro()
macro(BLENDER_TEST NAME EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE")
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE")
endmacro()
macro(BLENDER_TEST_PERFORMANCE NAME EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE")
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE")
endmacro()

View File

@@ -1,26 +1,25 @@
#
# VLMC RPM Finder
# Authors: Rohit Yadav <rohityadav89@gmail.com>
#
if(NOT DEFINED RPMBUILD)
find_program(RPMBUILD
NAMES rpmbuild
PATHS "/usr/bin")
find_program(RPMBUILD
NAMES rpmbuild
PATHS "/usr/bin")
mark_as_advanced(RPMBUILD)
mark_as_advanced(RPMBUILD)
if(RPMBUILD)
message(STATUS "RPM Build Found: ${RPMBUILD}")
else()
message(STATUS "RPM Build Not Found (rpmbuild). RPM generation will not be available")
endif()
if(RPMBUILD)
message(STATUS "RPM Build Found: ${RPMBUILD}")
else()
message(STATUS "RPM Build Not Found (rpmbuild). RPM generation will not be available")
endif()
endif()
if(RPMBUILD)
set(RPMBUILD_FOUND TRUE)
set(RPMBUILD_FOUND TRUE)
else()
set(RPMBUILD_FOUND FALSE)
set(RPMBUILD_FOUND FALSE)
endif()

View File

@@ -14,162 +14,162 @@ set(MY_WC_COMMIT_TIMESTAMP 0)
# Guess if this is a git working copy and then look up the revision
if(EXISTS ${SOURCE_DIR}/.git)
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(MY_WC_BRANCH STREQUAL "HEAD")
# Detached HEAD, check whether commit hash is reachable
# in the master branch
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(MY_WC_BRANCH STREQUAL "HEAD")
# Detached HEAD, check whether commit hash is reachable
# in the master branch
execute_process(COMMAND git rev-parse --short=12 HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git branch --list master blender-v* --contains ${MY_WC_HASH}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_contains_check
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git branch --list master blender-v* --contains ${MY_WC_HASH}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_contains_check
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _git_contains_check STREQUAL "")
set(MY_WC_BRANCH "master")
else()
execute_process(COMMAND git show-ref --tags -d
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_tag_hashes
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _git_contains_check STREQUAL "")
set(MY_WC_BRANCH "master")
else()
execute_process(COMMAND git show-ref --tags -d
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_tag_hashes
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_head_hash
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_head_hash
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(_git_tag_hashes MATCHES "${_git_head_hash}")
set(MY_WC_BRANCH "master")
else()
execute_process(COMMAND git branch --contains ${MY_WC_HASH}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_contains_branches
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "^\\*[ \t]+" "" _git_contains_branches "${_git_contains_branches}")
string(REGEX REPLACE "[\r\n]+" ";" _git_contains_branches "${_git_contains_branches}")
string(REGEX REPLACE ";[ \t]+" ";" _git_contains_branches "${_git_contains_branches}")
foreach(_branch ${_git_contains_branches})
if(NOT "${_branch}" MATCHES "\\(HEAD.*")
set(MY_WC_BRANCH "${_branch}")
break()
endif()
endforeach()
unset(_branch)
unset(_git_contains_branches)
endif()
if(_git_tag_hashes MATCHES "${_git_head_hash}")
set(MY_WC_BRANCH "master")
else()
execute_process(COMMAND git branch --contains ${MY_WC_HASH}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_contains_branches
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "^\\*[ \t]+" "" _git_contains_branches "${_git_contains_branches}")
string(REGEX REPLACE "[\r\n]+" ";" _git_contains_branches "${_git_contains_branches}")
string(REGEX REPLACE ";[ \t]+" ";" _git_contains_branches "${_git_contains_branches}")
foreach(_branch ${_git_contains_branches})
if(NOT "${_branch}" MATCHES "\\(HEAD.*")
set(MY_WC_BRANCH "${_branch}")
break()
endif()
endforeach()
unset(_branch)
unset(_git_contains_branches)
endif()
unset(_git_tag_hashes)
unset(_git_head_hashs)
endif()
unset(_git_tag_hashes)
unset(_git_head_hashs)
endif()
unset(_git_contains_check)
else()
execute_process(COMMAND git log HEAD..@{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_below_check
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT _git_below_check STREQUAL "")
# If there're commits between HEAD and upstream this means
# that we're reset-ed to older revision. Use it's hash then.
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
execute_process(COMMAND git rev-parse --short @{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
unset(_git_contains_check)
else()
execute_process(COMMAND git log HEAD..@{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_below_check
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT _git_below_check STREQUAL "")
# If there're commits between HEAD and upstream this means
# that we're reset-ed to older revision. Use it's hash then.
execute_process(COMMAND git rev-parse --short=12 HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
execute_process(COMMAND git rev-parse --short=12 @{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(MY_WC_HASH STREQUAL "")
# Local branch, not set to upstream.
# Well, let's use HEAD for now
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
if(MY_WC_HASH STREQUAL "")
# Local branch, not set to upstream.
# Well, let's use HEAD for now
execute_process(COMMAND git rev-parse --short=12 HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
if(MY_WC_BRANCH MATCHES "^blender-v")
set(MY_WC_BRANCH "master")
endif()
if(MY_WC_BRANCH MATCHES "^blender-v")
set(MY_WC_BRANCH "master")
endif()
unset(_git_below_check)
endif()
unset(_git_below_check)
endif()
execute_process(COMMAND git log -1 --format=%ct
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
# May fail in rare cases
if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
set(MY_WC_COMMIT_TIMESTAMP 0)
endif()
execute_process(COMMAND git log -1 --format=%ct
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
# May fail in rare cases
if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
set(MY_WC_COMMIT_TIMESTAMP 0)
endif()
# Update GIT index before getting dirty files
execute_process(COMMAND git update-index -q --refresh
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Update GIT index before getting dirty files
execute_process(COMMAND git update-index -q --refresh
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git diff-index --name-only HEAD --
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_changed_files
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git diff-index --name-only HEAD --
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_changed_files
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _git_changed_files STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
else()
# Unpushed commits are also considered local modifications
execute_process(COMMAND git log @{u}..
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_unpushed_log
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT _git_unpushed_log STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
endif()
unset(_git_unpushed_log)
endif()
if(NOT _git_changed_files STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
else()
# Unpushed commits are also considered local modifications
execute_process(COMMAND git log @{u}..
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_unpushed_log
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT _git_unpushed_log STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
endif()
unset(_git_unpushed_log)
endif()
unset(_git_changed_files)
unset(_git_changed_files)
endif()
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
# but BUILD_DATE and BUILD_TIME are platform dependent
if(UNIX)
if(NOT BUILD_DATE)
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT BUILD_TIME)
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT BUILD_DATE)
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT BUILD_TIME)
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
elseif(WIN32)
if(NOT BUILD_DATE)
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT BUILD_TIME)
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT BUILD_DATE)
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT BUILD_TIME)
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
# Write a file with the BUILD_HASH define
file(WRITE buildinfo.h.txt
"#define BUILD_HASH \"${MY_WC_HASH}\"\n"
"#define BUILD_COMMIT_TIMESTAMP ${MY_WC_COMMIT_TIMESTAMP}\n"
"#define BUILD_BRANCH \"${MY_WC_BRANCH}\"\n"
"#define BUILD_DATE \"${BUILD_DATE}\"\n"
"#define BUILD_TIME \"${BUILD_TIME}\"\n"
"#define BUILD_HASH \"${MY_WC_HASH}\"\n"
"#define BUILD_COMMIT_TIMESTAMP ${MY_WC_COMMIT_TIMESTAMP}\n"
"#define BUILD_BRANCH \"${MY_WC_BRANCH}\"\n"
"#define BUILD_DATE \"${BUILD_DATE}\"\n"
"#define BUILD_TIME \"${BUILD_TIME}\"\n"
)
# cleanup

View File

@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>
@@ -29,7 +27,8 @@ if not sys.version.startswith("3"):
sys.exit(1)
from cmake_consistency_check_config import (
IGNORE,
IGNORE_SOURCE,
IGNORE_CMAKE,
UTF8_CHECK,
SOURCE_DIR,
BUILD_DIR,
@@ -156,6 +155,7 @@ def cmake_get_src(f):
break
# replace dirs
l = l.replace("${CMAKE_SOURCE_DIR}", SOURCE_DIR)
l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base)
l = l.replace("${CMAKE_CURRENT_BINARY_DIR}", cmake_base_bin)
l = l.strip('"')
@@ -238,8 +238,16 @@ def cmake_get_src(f):
filen.close()
def is_ignore(f, ignore_used):
for index, ig in enumerate(IGNORE):
def is_ignore_source(f, ignore_used):
for index, ig in enumerate(IGNORE_SOURCE):
if ig in f:
ignore_used[index] = True
return True
return False
def is_ignore_cmake(f, ignore_used):
for index, ig in enumerate(IGNORE_CMAKE):
if ig in f:
ignore_used[index] = True
return True
@@ -250,8 +258,12 @@ def main():
print("Scanning:", SOURCE_DIR)
ignore_used_source = [False] * len(IGNORE_SOURCE)
ignore_used_cmake = [False] * len(IGNORE_CMAKE)
for cmake in source_list(SOURCE_DIR, is_cmake):
cmake_get_src(cmake)
if not is_ignore_cmake(cmake, ignore_used_cmake):
cmake_get_src(cmake)
# First do stupid check, do these files exist?
print("\nChecking for missing references:")
@@ -282,12 +294,10 @@ def main():
del is_err
del errs
ignore_used = [False] * len(IGNORE)
# now check on files not accounted for.
print("\nC/C++ Files CMake does not know about...")
for cf in sorted(source_list(SOURCE_DIR, is_c)):
if not is_ignore(cf, ignore_used):
if not is_ignore_source(cf, ignore_used_source):
if cf not in global_c:
print("missing_c: ", cf)
@@ -304,7 +314,7 @@ def main():
print("\nC/C++ Headers CMake does not know about...")
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
if not is_ignore(hf, ignore_used):
if not is_ignore_source(hf, ignore_used_source):
if hf not in global_h:
print("missing_h: ", hf)
@@ -326,9 +336,15 @@ def main():
traceback.print_exc()
# Check ignores aren't stale
print("\nCheck for unused 'IGNORE' paths...")
for index, ig in enumerate(IGNORE):
if not ignore_used[index]:
print("\nCheck for unused 'IGNORE_SOURCE' paths...")
for index, ig in enumerate(IGNORE_SOURCE):
if not ignore_used_source[index]:
print("unused ignore: %r" % ig)
# Check ignores aren't stale
print("\nCheck for unused 'IGNORE_CMAKE' paths...")
for index, ig in enumerate(IGNORE_CMAKE):
if not ignore_used_cmake[index]:
print("unused ignore: %r" % ig)

View File

@@ -1,10 +1,13 @@
import os
IGNORE = (
IGNORE_SOURCE = (
"/test/",
"/tests/gtests/",
"/release/",
# specific source files
"extern/audaspace/",
# specific source files
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
@@ -17,6 +20,10 @@ IGNORE = (
"intern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
"intern/audaspace/SRC/AUD_SRCResampleReader.cpp",
"doc/doxygen/doxygen.extern.h",
"doc/doxygen/doxygen.intern.h",
"doc/doxygen/doxygen.main.h",
"doc/doxygen/doxygen.source.h",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h",
@@ -29,6 +36,10 @@ IGNORE = (
"intern/audaspace/SRC/AUD_SRCResampleReader.h",
)
IGNORE_CMAKE = (
"extern/audaspace/CMakeLists.txt",
)
UTF8_CHECK = True
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))

View File

@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton, M.G. Kishalmi
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>

View File

@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton, M.G. Kishalmi
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>

View File

@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>

View File

@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>

View File

@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>

View File

@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>

View File

@@ -16,8 +16,6 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ***** END GPL LICENSE BLOCK *****
# <pep8 compliant>

View File

@@ -12,7 +12,7 @@ set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OPENSUBDIV ON CACHE BOOL "" FORCE)
set(WITH_DRACO 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)
@@ -41,6 +41,7 @@ set(WITH_OPENAL ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
@@ -54,15 +55,12 @@ set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
# platform dependent options
if(UNIX AND NOT APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
elseif(WIN32)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
elseif(APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
endif()

Some files were not shown because too many files have changed in this diff Show More