1
1

Compare commits

...

4364 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
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
6131 changed files with 1371723 additions and 1450465 deletions

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]

File diff suppressed because it is too large Load Diff

View File

@@ -24,6 +24,133 @@
# ../build_linux_i386
# This is for users who like to configure & build blender with a single command.
define HELP_TEXT
Convenience Targets
Provided for building Blender, (multiple at once can be used).
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
* deps: Build library dependencies (intended only for platform maintainers).
* config: Run cmake configuration tool to set build options.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
Project Files
Generate poject files for development environments.
* project_qtcreator: QtCreator Project Files.
* project_netbeans: NetBeans Project Files.
* project_eclipse: Eclipse CDT4 Project Files.
Package Targets
* package_debian: Build a debian package.
* package_pacman: Build an arch linux pacman package.
* package_archive: Build an archive package.
Testing Targets
Not associated with building Blender.
* test:
Run ctest, currently tests import/export,
operator execution and that python modules load
* test_cmake:
Runs our own cmake file checker
which detects errors in the cmake file list definitions
* test_pep8:
Checks all python script are pep8
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
* test_style_c:
Checks C/C++ conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_c_qtc:
Same as test_style but outputs QtCreator tasks format
* test_style_osl:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_osl_qtc:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
Static Source Code Checking
Not associated with building Blender.
* check_cppcheck: Run blender source through cppcheck (C & C++).
* check_clang_array: Run blender source through clang array checking script (C & C++).
* check_splint: Run blenders source through splint (C only).
* check_sparse: Run blenders source through sparse (C only).
* check_smatch: Run blenders source through smatch (C only).
* check_spelling_c: Check for spelling errors (C/C++ only).
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
* check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only).
* check_descriptions: Check for duplicate/invalid descriptions.
Utilities
Not associated with building Blender.
* icons:
Updates PNG icons from SVG files.
Optionally pass in variables: 'BLENDER_BIN', 'INKSCAPE_BIN'
otherwise default paths are used.
Example
make icons INKSCAPE_BIN=/path/to/inkscape
* icons_geom:
Updates Geometry icons from BLEND file.
Optionally pass in variable: 'BLENDER_BIN'
otherwise default paths are used.
Example
make icons_geom BLENDER_BIN=/path/to/blender
* tgz:
Create a compressed archive of the source code.
* update:
updates git and all submodules
* 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)
@@ -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) \
@@ -461,6 +515,10 @@ update: .FORCE
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)
# -----------------------------------------------------------------------------
# Documentation

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(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()
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/pthreadVC3.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,90 +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 "__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,28 +129,30 @@ 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")
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,16 +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_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_PATH ${LIBDIR}/openmp
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
)
add_dependencies(
external_openmp
external_clang
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/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()
# 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(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
)
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_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_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 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/pthreadVC3.dll ${LIBDIR}/pthreads/lib/pthreadVC3.dll &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC3${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
)
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,164 +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 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_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(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
)
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

@@ -46,32 +46,32 @@ set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w
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,8 +105,8 @@ 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)
@@ -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,31 +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()
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
)
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
@@ -383,7 +385,6 @@ 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,20 +52,17 @@ 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
@@ -74,93 +71,40 @@ if 'cmake' in builder:
cmake_extra_options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9')
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"])
# Workaround to build only sm_7x kernels with CUDA 10, until
# older kernels work well with this version.
if builder.startswith('win'):
cmake_extra_options.append('-DCUDA_VERSION=9.1')
cmake_extra_options.append('-DCUDA_TOOLKIT_INCLUDE:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/include')
cmake_extra_options.append('-DCUDA_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1')
cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/bin/nvcc.exe')
cmake_extra_options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin/nvcc.exe')
cmake_extra_options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0')
elif builder.startswith('linux'):
cmake_extra_options.append('-DCUDA_VERSION=9.1')
cmake_extra_options.append('-DCUDA_TOOLKIT_INCLDUE:PATH=/usr/local/cuda-9.1/include')
cmake_extra_options.append('-DCUDA_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-9.1')
cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-9.1/bin/nvcc')
cmake_extra_options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-10.0/bin/nvcc')
cmake_extra_options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-10.0')
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'))
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)
@@ -169,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
@@ -202,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)
@@ -214,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

@@ -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

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

@@ -4,22 +4,22 @@
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=12 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=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)
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=12 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

@@ -12,6 +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_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)
@@ -54,12 +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_JACK ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
elseif(WIN32)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
elseif(APPLE)
set(WITH_JACK ON 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()

View File

@@ -17,6 +17,7 @@ set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
set(WITH_DRACO OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
set(WITH_LLVM OFF CACHE BOOL "" FORCE)

View File

@@ -13,6 +13,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_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)
@@ -50,18 +51,19 @@ set(WITH_SDL ON CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE)
set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75 CACHE STRING "" 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_JACK ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
elseif(WIN32)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
elseif(APPLE)
set(WITH_JACK ON 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()

View File

@@ -30,3 +30,8 @@ set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
# jemalloc causes linking error on import, disable.
set(WITH_MEM_JEMALLOC OFF CACHE BOOL "" FORCE)
endif()

File diff suppressed because it is too large Load Diff

View File

@@ -23,15 +23,15 @@ SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
# Get the build revision, note that this can get out-of-sync, so for packaging run cmake first.
set(MY_WC_HASH "unknown")
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
find_package(Git)
if(GIT_FOUND)
# message(STATUS "Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --short=12 HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
endif()
find_package(Git)
if(GIT_FOUND)
# message(STATUS "Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --short=12 HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
endif()
endif()
set(BUILD_REV ${MY_WC_HASH})
unset(MY_WC_HASH)
@@ -41,61 +41,61 @@ unset(MY_WC_HASH)
execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
if(MSVC)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PACKAGE_ARCH windows64)
else()
set(PACKAGE_ARCH windows32)
endif()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PACKAGE_ARCH windows64)
else()
set(PACKAGE_ARCH windows32)
endif()
else(MSVC)
set(PACKAGE_ARCH ${CMAKE_SYSTEM_PROCESSOR})
set(PACKAGE_ARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()
if(CPACK_OVERRIDE_PACKAGENAME)
set(CPACK_PACKAGE_FILE_NAME ${CPACK_OVERRIDE_PACKAGENAME}-${PACKAGE_ARCH})
set(CPACK_PACKAGE_FILE_NAME ${CPACK_OVERRIDE_PACKAGENAME}-${PACKAGE_ARCH})
else()
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${PACKAGE_ARCH})
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${PACKAGE_ARCH})
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
# RPM packages
include(build_files/cmake/RpmBuild.cmake)
if(RPMBUILD_FOUND)
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}")
set(CPACK_SET_DESTDIR "true")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_RELOCATABLE "false")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2+ and Apache 2.0")
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Multimedia")
set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/build_files/package_spec/rpm/blender.spec.in")
endif()
# RPM packages
include(build_files/cmake/RpmBuild.cmake)
if(RPMBUILD_FOUND)
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}")
set(CPACK_SET_DESTDIR "true")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_RELOCATABLE "false")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2+ and Apache 2.0")
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Multimedia")
set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/build_files/package_spec/rpm/blender.spec.in")
endif()
endif()
# Mac Bundle
if(APPLE)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_GENERATOR "DragNDrop")
# Libraries are bundled directly
set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
# Libraries are bundled directly
set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
endif()
if(WIN32)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt)
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt)
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
set(CPACK_WIX_TEMPLATE ${LIBDIR}/package/installer_wix/WIX.template)
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
set(CPACK_WIX_TEMPLATE ${LIBDIR}/package/installer_wix/WIX.template)
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
#force lzma instead of deflate
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:high)
#force lzma instead of deflate
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:high)
endif()
set(CPACK_PACKAGE_EXECUTABLES "blender" "blender")
@@ -106,30 +106,30 @@ include(CPack)
# Target for build_archive.py script, to automatically pass along
# version, revision, platform, build directory
macro(add_package_archive packagename extension)
set(build_archive python ${CMAKE_SOURCE_DIR}/build_files/package_spec/build_archive.py)
set(package_output ${CMAKE_BINARY_DIR}/release/${packagename}.${extension})
set(build_archive python ${CMAKE_SOURCE_DIR}/build_files/package_spec/build_archive.py)
set(package_output ${CMAKE_BINARY_DIR}/release/${packagename}.${extension})
add_custom_target(package_archive DEPENDS ${package_output})
add_custom_target(package_archive DEPENDS ${package_output})
add_custom_command(
OUTPUT ${package_output}
COMMAND ${build_archive} ${packagename} ${extension} bin release
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
unset(build_archive)
unset(package_output)
add_custom_command(
OUTPUT ${package_output}
COMMAND ${build_archive} ${packagename} ${extension} bin release
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
unset(build_archive)
unset(package_output)
endmacro()
if(APPLE)
add_package_archive(
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-OSX-${CMAKE_OSX_ARCHITECTURES}"
"zip")
add_package_archive(
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-OSX-${CMAKE_OSX_ARCHITECTURES}"
"zip")
elseif(UNIX)
# platform name could be tweaked, to include glibc, and ensure processor is correct (i386 vs i686)
string(TOLOWER ${CMAKE_SYSTEM_NAME} PACKAGE_SYSTEM_NAME)
# platform name could be tweaked, to include glibc, and ensure processor is correct (i386 vs i686)
string(TOLOWER ${CMAKE_SYSTEM_NAME} PACKAGE_SYSTEM_NAME)
add_package_archive(
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
"tar.bz2")
add_package_archive(
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
"tar.bz2")
endif()
unset(MAJOR_VERSION)

View File

@@ -20,109 +20,109 @@
# Libraries configuration for Apple.
set(MACOSX_DEPLOYMENT_TARGET "10.9")
set(MACOSX_DEPLOYMENT_TARGET "10.11")
macro(find_package_wrapper)
# do nothing, just satisfy the macro
endmacro()
if(NOT DEFINED LIBDIR)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
# Prefer lib directory paths
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS})
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
# Prefer lib directory paths
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS})
else()
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
endif()
if(NOT EXISTS "${LIBDIR}/")
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
endif()
if(WITH_OPENAL)
find_package(OpenAL)
if(OPENAL_FOUND)
set(WITH_OPENAL ON)
else()
set(WITH_OPENAL OFF)
endif()
find_package(OpenAL)
if(OPENAL_FOUND)
set(WITH_OPENAL ON)
else()
set(WITH_OPENAL OFF)
endif()
endif()
if(WITH_ALEMBIC)
set(ALEMBIC ${LIBDIR}/alembic)
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
set(ALEMBIC_LIBRARIES Alembic)
set(ALEMBIC_FOUND ON)
set(ALEMBIC ${LIBDIR}/alembic)
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
set(ALEMBIC_LIBRARIES Alembic)
set(ALEMBIC_FOUND ON)
endif()
if(WITH_OPENSUBDIV)
set(OPENSUBDIV ${LIBDIR}/opensubdiv)
set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
find_library(OSD_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
find_library(OSD_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
set(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
list(APPEND OPENSUBDIV_LIBRARIES ${OSD_LIB_CPU} ${OSD_LIB_GPU})
set(OPENSUBDIV ${LIBDIR}/opensubdiv)
set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
find_library(OSD_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
find_library(OSD_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
set(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
list(APPEND OPENSUBDIV_LIBRARIES ${OSD_LIB_CPU} ${OSD_LIB_GPU})
endif()
if(WITH_JACK)
find_library(JACK_FRAMEWORK
NAMES jackmp
)
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
if(NOT JACK_FRAMEWORK)
set(WITH_JACK OFF)
endif()
find_library(JACK_FRAMEWORK
NAMES jackmp
)
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
if(NOT JACK_FRAMEWORK)
set(WITH_JACK OFF)
endif()
endif()
if(WITH_CODEC_SNDFILE)
set(LIBSNDFILE ${LIBDIR}/sndfile)
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
set(LIBSNDFILE ${LIBDIR}/sndfile)
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
endif()
if(WITH_PYTHON)
# we use precompiled libraries for py 3.7 and up by default
set(PYTHON_VERSION 3.7)
if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
# normally cached but not since we include them with blender
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a)
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
else()
# module must be compiled against Python framework
set(_py_framework "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}")
# we use precompiled libraries for py 3.7 and up by default
set(PYTHON_VERSION 3.7)
if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
# normally cached but not since we include them with blender
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a)
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
else()
# module must be compiled against Python framework
set(_py_framework "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}")
set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}m")
set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
#set(PYTHON_LIBRARY python${PYTHON_VERSION})
#set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}m")
set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
#set(PYTHON_LIBRARY python${PYTHON_VERSION})
#set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
unset(_py_framework)
endif()
unset(_py_framework)
endif()
# uncached vars
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
# uncached vars
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
# needed for Audaspace, numpy is installed into python site-packages
set(PYTHON_NUMPY_INCLUDE_DIRS "${PYTHON_LIBPATH}/site-packages/numpy/core/include")
# needed for Audaspace, numpy is installed into python site-packages
set(PYTHON_NUMPY_INCLUDE_DIRS "${PYTHON_LIBPATH}/site-packages/numpy/core/include")
if(NOT EXISTS "${PYTHON_EXECUTABLE}")
message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
endif()
if(NOT EXISTS "${PYTHON_EXECUTABLE}")
message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
endif()
endif()
if(WITH_FFTW3)
set(FFTW3 ${LIBDIR}/fftw3)
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
set(FFTW3_LIBRARIES fftw3)
set(FFTW3_LIBPATH ${FFTW3}/lib)
set(FFTW3 ${LIBDIR}/fftw3)
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
set(FFTW3_LIBRARIES fftw3)
set(FFTW3_LIBPATH ${FFTW3}/lib)
endif()
set(PNG_LIBRARIES png)
@@ -138,101 +138,101 @@ set(FREETYPE_LIBPATH ${FREETYPE}/lib)
set(FREETYPE_LIBRARY freetype)
if(WITH_IMAGE_OPENEXR)
set(OPENEXR ${LIBDIR}/openexr)
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
set(OPENEXR_LIBRARIES
Iex
Half
IlmImf
Imath
IlmThread)
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
set(OPENEXR ${LIBDIR}/openexr)
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
set(OPENEXR_LIBRARIES
Iex
Half
IlmImf
Imath
IlmThread)
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
endif()
if(WITH_CODEC_FFMPEG)
set(FFMPEG ${LIBDIR}/ffmpeg)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
set(FFMPEG_LIBRARIES
avcodec avdevice avformat avutil
mp3lame swscale x264 xvidcore
theora theoradec theoraenc
vorbis vorbisenc vorbisfile ogg
vpx swresample)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
set(FFMPEG ${LIBDIR}/ffmpeg)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
set(FFMPEG_LIBRARIES
avcodec avdevice avformat avutil
mp3lame swscale x264 xvidcore
theora theoradec theoraenc
vorbis vorbisenc vorbisfile ogg
vpx swresample)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
endif()
if(WITH_IMAGE_OPENJPEG OR WITH_CODEC_FFMPEG)
# use openjpeg from libdir that is linked into ffmpeg
set(OPENJPEG ${LIBDIR}/openjpeg)
set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG}/include)
set(OPENJPEG_LIBRARIES ${OPENJPEG}/lib/libopenjp2.a)
# use openjpeg from libdir that is linked into ffmpeg
set(OPENJPEG ${LIBDIR}/openjpeg)
set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG}/include)
set(OPENJPEG_LIBRARIES ${OPENJPEG}/lib/libopenjp2.a)
endif()
find_library(SYSTEMSTUBS_LIBRARY
NAMES
SystemStubs
PATHS
NAMES
SystemStubs
PATHS
)
mark_as_advanced(SYSTEMSTUBS_LIBRARY)
if(SYSTEMSTUBS_LIBRARY)
list(APPEND PLATFORM_LINKLIBS SystemStubs)
list(APPEND PLATFORM_LINKLIBS SystemStubs)
endif()
set(PLATFORM_CFLAGS "-pipe -funsigned-char")
set(PLATFORM_LINKFLAGS
"-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio"
"-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore"
)
list(APPEND PLATFORM_LINKLIBS c++)
if(WITH_JACK)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -F/Library/Frameworks -weak_framework jackmp")
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -F/Library/Frameworks -weak_framework jackmp")
endif()
if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK)
# force cmake to link right framework
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")
# force cmake to link right framework
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")
endif()
if(WITH_OPENCOLLADA)
set(OPENCOLLADA ${LIBDIR}/opencollada)
set(OPENCOLLADA ${LIBDIR}/opencollada)
set(OPENCOLLADA_INCLUDE_DIRS
${LIBDIR}/opencollada/include/COLLADAStreamWriter
${LIBDIR}/opencollada/include/COLLADABaseUtils
${LIBDIR}/opencollada/include/COLLADAFramework
${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
${LIBDIR}/opencollada/include/GeneratedSaxParser
)
set(OPENCOLLADA_INCLUDE_DIRS
${LIBDIR}/opencollada/include/COLLADAStreamWriter
${LIBDIR}/opencollada/include/COLLADABaseUtils
${LIBDIR}/opencollada/include/COLLADAFramework
${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
${LIBDIR}/opencollada/include/GeneratedSaxParser
)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES
OpenCOLLADASaxFrameworkLoader
-lOpenCOLLADAFramework
-lOpenCOLLADABaseUtils
-lOpenCOLLADAStreamWriter
-lMathMLSolver
-lGeneratedSaxParser
-lbuffer -lftoa -lUTF
${OPENCOLLADA_LIBPATH}/libxml2.a
)
# PCRE is bundled with openCollada
#set(PCRE ${LIBDIR}/pcre)
#set(PCRE_LIBPATH ${PCRE}/lib)
set(PCRE_LIBRARIES pcre)
# libxml2 is used
#set(EXPAT ${LIBDIR}/expat)
#set(EXPAT_LIBPATH ${EXPAT}/lib)
set(EXPAT_LIB)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES
OpenCOLLADASaxFrameworkLoader
-lOpenCOLLADAFramework
-lOpenCOLLADABaseUtils
-lOpenCOLLADAStreamWriter
-lMathMLSolver
-lGeneratedSaxParser
-lbuffer -lftoa -lUTF
${OPENCOLLADA_LIBPATH}/libxml2.a
)
# PCRE is bundled with openCollada
#set(PCRE ${LIBDIR}/pcre)
#set(PCRE_LIBPATH ${PCRE}/lib)
set(PCRE_LIBRARIES pcre)
# libxml2 is used
#set(EXPAT ${LIBDIR}/expat)
#set(EXPAT_LIBPATH ${EXPAT}/lib)
set(EXPAT_LIB)
endif()
if(WITH_SDL)
set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL}/include)
set(SDL_LIBRARY SDL2)
set(SDL_LIBPATH ${SDL}/lib)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback")
set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL}/include)
set(SDL_LIBRARY SDL2)
set(SDL_LIBPATH ${SDL}/lib)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback")
endif()
set(PNG "${LIBDIR}/png")
@@ -244,166 +244,163 @@ set(JPEG_INCLUDE_DIR "${JPEG}/include")
set(JPEG_LIBPATH ${JPEG}/lib)
if(WITH_IMAGE_TIFF)
set(TIFF ${LIBDIR}/tiff)
set(TIFF_INCLUDE_DIR ${TIFF}/include)
set(TIFF_LIBRARY tiff)
set(TIFF_LIBPATH ${TIFF}/lib)
set(TIFF ${LIBDIR}/tiff)
set(TIFF_INCLUDE_DIR ${TIFF}/include)
set(TIFF_LIBRARY tiff)
set(TIFF_LIBPATH ${TIFF}/lib)
endif()
if(WITH_BOOST)
set(BOOST ${LIBDIR}/boost)
set(BOOST_INCLUDE_DIR ${BOOST}/include)
set(BOOST_POSTFIX)
set(BOOST_LIBRARIES
boost_date_time${BOOST_POSTFIX}
boost_filesystem${BOOST_POSTFIX}
boost_regex${BOOST_POSTFIX}
boost_system${BOOST_POSTFIX}
boost_thread${BOOST_POSTFIX}
boost_wave${BOOST_POSTFIX}
)
if(WITH_INTERNATIONAL)
list(APPEND BOOST_LIBRARIES boost_locale${BOOST_POSTFIX})
endif()
if(WITH_CYCLES_NETWORK)
list(APPEND BOOST_LIBRARIES boost_serialization${BOOST_POSTFIX})
endif()
if(WITH_OPENVDB)
list(APPEND BOOST_LIBRARIES boost_iostreams${BOOST_POSTFIX})
endif()
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_DEFINITIONS)
set(BOOST ${LIBDIR}/boost)
set(BOOST_INCLUDE_DIR ${BOOST}/include)
set(BOOST_POSTFIX)
set(BOOST_LIBRARIES
boost_date_time${BOOST_POSTFIX}
boost_filesystem${BOOST_POSTFIX}
boost_regex${BOOST_POSTFIX}
boost_system${BOOST_POSTFIX}
boost_thread${BOOST_POSTFIX}
boost_wave${BOOST_POSTFIX}
)
if(WITH_INTERNATIONAL)
list(APPEND BOOST_LIBRARIES boost_locale${BOOST_POSTFIX})
endif()
if(WITH_CYCLES_NETWORK)
list(APPEND BOOST_LIBRARIES boost_serialization${BOOST_POSTFIX})
endif()
if(WITH_OPENVDB)
list(APPEND BOOST_LIBRARIES boost_iostreams${BOOST_POSTFIX})
endif()
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_DEFINITIONS)
endif()
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale and ffmpeg needs it !
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale and ffmpeg needs it !
endif()
if(WITH_OPENIMAGEIO)
set(OPENIMAGEIO ${LIBDIR}/openimageio)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES
${OPENIMAGEIO}/lib/libOpenImageIO.a
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${TIFF_LIBRARY}
${OPENEXR_LIBRARIES}
${OPENJPEG_LIBRARIES}
${ZLIB_LIBRARIES}
)
set(OPENIMAGEIO_LIBPATH
${OPENIMAGEIO}/lib
${JPEG_LIBPATH}
${PNG_LIBPATH}
${TIFF_LIBPATH}
${OPENEXR_LIBPATH}
${ZLIB_LIBPATH}
)
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
set(OPENIMAGEIO ${LIBDIR}/openimageio)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES
${OPENIMAGEIO}/lib/libOpenImageIO.a
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${TIFF_LIBRARY}
${OPENEXR_LIBRARIES}
${OPENJPEG_LIBRARIES}
${ZLIB_LIBRARIES}
)
set(OPENIMAGEIO_LIBPATH
${OPENIMAGEIO}/lib
${JPEG_LIBPATH}
${PNG_LIBPATH}
${TIFF_LIBPATH}
${OPENEXR_LIBPATH}
${ZLIB_LIBPATH}
)
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
endif()
if(WITH_OPENCOLORIO)
set(OPENCOLORIO ${LIBDIR}/opencolorio)
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
set(OPENCOLORIO ${LIBDIR}/opencolorio)
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
endif()
if(WITH_OPENVDB)
set(OPENVDB ${LIBDIR}/openvdb)
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
set(TBB_INCLUDE_DIRS ${LIBDIR}/tbb/include)
set(TBB_LIBRARIES ${LIBDIR}/tbb/lib/libtbb.a)
set(OPENVDB_LIBRARIES openvdb blosc ${TBB_LIBRARIES})
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
set(OPENVDB_DEFINITIONS)
set(OPENVDB ${LIBDIR}/openvdb)
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
set(TBB_INCLUDE_DIRS ${LIBDIR}/tbb/include)
set(TBB_LIBRARIES ${LIBDIR}/tbb/lib/libtbb.a)
set(OPENVDB_LIBRARIES openvdb blosc ${TBB_LIBRARIES})
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
set(OPENVDB_DEFINITIONS)
endif()
if(WITH_LLVM)
set(LLVM_ROOT_DIR ${LIBDIR}/llvm)
set(LLVM_VERSION 3.4)
if(EXISTS "${LLVM_ROOT_DIR}/bin/llvm-config")
set(LLVM_CONFIG "${LLVM_ROOT_DIR}/bin/llvm-config")
else()
set(LLVM_CONFIG llvm-config)
endif()
execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
set(LLVM_ROOT_DIR ${LIBDIR}/llvm)
set(LLVM_VERSION 3.4)
if(EXISTS "${LLVM_ROOT_DIR}/bin/llvm-config")
set(LLVM_CONFIG "${LLVM_ROOT_DIR}/bin/llvm-config")
else()
set(LLVM_CONFIG llvm-config)
endif()
execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
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 ".a /" ".a;/" LLVM_LIBRARY ${LLVM_LIBRARY})
else()
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
endif()
else()
message(FATAL_ERROR "LLVM not found.")
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 ".a /" ".a;/" LLVM_LIBRARY ${LLVM_LIBRARY})
else()
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
endif()
else()
message(FATAL_ERROR "LLVM not found.")
endif()
endif()
if(WITH_CYCLES_OSL)
set(CYCLES_OSL ${LIBDIR}/osl)
set(CYCLES_OSL ${LIBDIR}/osl)
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
# WARNING! depends on correct order of OSL libs linking
list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -force_load ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
# WARNING! depends on correct order of OSL libs linking
list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -force_load ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
set(OSL_FOUND TRUE)
else()
message(STATUS "OSL not found")
set(WITH_CYCLES_OSL OFF)
endif()
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
set(OSL_FOUND TRUE)
else()
message(STATUS "OSL not found")
set(WITH_CYCLES_OSL OFF)
endif()
endif()
if(WITH_CYCLES_EMBREE)
find_package(Embree 3.2.4 REQUIRED)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -stack_size -Xlinker 0x100000")
find_package(Embree 3.2.4 REQUIRED)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -stack_size -Xlinker 0x100000")
endif()
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
if(WITH_OPENMP)
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
# Use OpenMP from our precompiled libraries.
message(STATUS "Using ${LIBDIR}/openmp for OpenMP")
set(OPENMP_CUSTOM ON)
set(OPENMP_FOUND ON)
set(OpenMP_C_FLAGS "-Xclang -fopenmp -I${LIBDIR}/openmp/include")
set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I${LIBDIR}/openmp/include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${LIBDIR}/openmp/lib -lomp")
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
# Use OpenMP from our precompiled libraries.
message(STATUS "Using ${LIBDIR}/openmp for OpenMP")
set(OPENMP_CUSTOM ON)
set(OPENMP_FOUND ON)
set(OpenMP_C_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L'${LIBDIR}/openmp/lib' -lomp")
# Copy libomp.dylib to allow executables like datatoc to work.
if(CMAKE_MAKE_PROGRAM MATCHES "xcodebuild")
set(OPENMP_DYLIB_AUX_PATH "${CMAKE_BINARY_DIR}/bin")
else()
set(OPENMP_DYLIB_AUX_PATH "${CMAKE_BINARY_DIR}")
endif()
execute_process(
COMMAND mkdir -p ${OPENMP_DYLIB_AUX_PATH}/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${OPENMP_DYLIB_AUX_PATH}/Resources/lib/libomp.dylib)
endif()
# Copy libomp.dylib to allow executables like datatoc and tests to work.
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib)
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib)
endif()
endif()
set(EXETYPE MACOSX_BUNDLE)
@@ -411,24 +408,24 @@ set(EXETYPE MACOSX_BUNDLE)
set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
set(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g")
if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_OSX_ARCHITECTURES MATCHES "i386")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
endif()
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ftree-vectorize -fvariable-expansion-in-unroller")
endif()
else()
set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
endif()
if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
endif()
# Get rid of eventually clashes, we export some symbols explicitly as local
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")

View File

@@ -25,92 +25,87 @@
cmake_minimum_required(VERSION 3.0.0)
if(NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
"Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
FORCE)
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
"Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
FORCE)
endif()
if(NOT DEFINED OSX_SYSTEM)
execute_process(
COMMAND xcodebuild -version -sdk macosx SDKVersion
OUTPUT_VARIABLE OSX_SYSTEM
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND xcodebuild -version -sdk macosx SDKVersion
OUTPUT_VARIABLE OSX_SYSTEM
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# workaround for incorrect cmake xcode lookup for developer previews - XCODE_VERSION does not
# take xcode-select path into account but would always look into /Applications/Xcode.app
# while dev versions are named Xcode<version>-DP<preview_number>
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate to bundlepath in any case
if(${CMAKE_GENERATOR} MATCHES "Xcode")
# earlier xcode has no bundled developer dir, no sense in getting xcode path from
if(${XCODE_VERSION} VERSION_GREATER 4.2)
# reduce to XCode name without dp extension
string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME)
if(${DP_NAME} MATCHES Xcode5)
set(XCODE_VERSION 5)
endif()
endif()
# earlier xcode has no bundled developer dir, no sense in getting xcode path from
if(${XCODE_VERSION} VERSION_GREATER 4.2)
# reduce to XCode name without dp extension
string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME)
if(${DP_NAME} MATCHES Xcode5)
set(XCODE_VERSION 5)
endif()
endif()
##### cmake incompatibility with xcode 4.3 and higher #####
if(${XCODE_VERSION} MATCHES '') # cmake fails due looking for xcode in the wrong path, thus will be empty var
message(FATAL_ERROR "Xcode 4.3 and higher must be used with cmake 2.8-8 or higher")
endif()
### end cmake incompatibility with xcode 4.3 and higher ###
##### cmake incompatibility with xcode 4.3 and higher #####
if(${XCODE_VERSION} MATCHES '') # cmake fails due looking for xcode in the wrong path, thus will be empty var
message(FATAL_ERROR "Xcode 4.3 and higher must be used with cmake 2.8-8 or higher")
endif()
### end cmake incompatibility with xcode 4.3 and higher ###
if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3)
# Xcode 4 defaults to the Apple LLVM Compiler.
# Override the default compiler selection because Blender only compiles with gcc up to xcode 4.2
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
message(STATUS "Setting compiler to: " ${CMAKE_XCODE_ATTRIBUTE_GCC_VERSION})
endif()
if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3)
# Xcode 4 defaults to the Apple LLVM Compiler.
# Override the default compiler selection because Blender only compiles with gcc up to xcode 4.2
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
message(STATUS "Setting compiler to: " ${CMAKE_XCODE_ATTRIBUTE_GCC_VERSION})
endif()
else() # unix makefile generator does not fill XCODE_VERSION var, so we get it with a command
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERS_BUILD_NR)
string(SUBSTRING "${XCODE_VERS_BUILD_NR}" 6 3 XCODE_VERSION) # truncate away build-nr
unset(XCODE_VERS_BUILD_NR)
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERS_BUILD_NR)
string(SUBSTRING "${XCODE_VERS_BUILD_NR}" 6 3 XCODE_VERSION) # truncate away build-nr
unset(XCODE_VERS_BUILD_NR)
endif()
message(STATUS "Detected OS X ${OSX_SYSTEM} and Xcode ${XCODE_VERSION} at ${XCODE_BUNDLE}")
if(${XCODE_VERSION} VERSION_LESS 4.3)
# use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)
# use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)
else()
# note: xcode-select path could be ambiguous,
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
# so i use a selfcomposed bundlepath here
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
if(${CMAKE_GENERATOR} MATCHES "Xcode")
# to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx${OSX_SYSTEM})
endif()
# note: xcode-select path could be ambiguous,
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
# so i use a selfcomposed bundlepath here
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
if(${CMAKE_GENERATOR} MATCHES "Xcode")
# to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx${OSX_SYSTEM})
endif()
endif()
if(OSX_SYSTEM MATCHES 10.9)
# make sure syslibs and headers are looked up in sdk ( especially for 10.9 openGL atm. )
set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT})
endif()
# 10.9 is our min. target, if you use higher sdk, weak linking happens
# 10.11 is our min. target, if you use higher sdk, weak linking happens
if(CMAKE_OSX_DEPLOYMENT_TARGET)
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.9)
message(STATUS "Setting deployment target to 10.9, lower versions are not supported")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
endif()
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.11)
message(STATUS "Setting deployment target to 10.11, lower versions are not supported")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "" FORCE)
endif()
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "" FORCE)
endif()
if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
# force CMAKE_OSX_DEPLOYMENT_TARGET for makefiles, will not work else ( cmake bug ? )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
add_definitions("-DMACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
# force CMAKE_OSX_DEPLOYMENT_TARGET for makefiles, will not work else ( cmake bug ? )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
add_definitions("-DMACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()

View File

@@ -22,30 +22,34 @@
# Detect precompiled library directory
if(NOT DEFINED LIBDIR)
set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
else()
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
endif()
if(EXISTS ${LIBDIR})
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
# NOTE: Make sure "proper" compiled zlib comes first before the one
# which is a part of OpenCollada. They have different ABI, and we
# do need to use the official one.
set(CMAKE_PREFIX_PATH ${LIBDIR}/zlib ${LIB_SUBDIRS})
set(WITH_STATIC_LIBS ON)
set(WITH_OPENMP_STATIC ON)
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
# NOTE: Make sure "proper" compiled zlib comes first before the one
# which is a part of OpenCollada. They have different ABI, and we
# do need to use the official one.
set(CMAKE_PREFIX_PATH ${LIBDIR}/zlib ${LIB_SUBDIRS})
set(WITH_STATIC_LIBS ON)
set(WITH_OPENMP_STATIC ON)
endif()
if(WITH_STATIC_LIBS)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
endif()
# Wrapper to prefer static libraries
macro(find_package_wrapper)
if(WITH_STATIC_LIBS)
find_package_static(${ARGV})
else()
find_package(${ARGV})
endif()
if(WITH_STATIC_LIBS)
find_package_static(${ARGV})
else()
find_package(${ARGV})
endif()
endmacro()
find_package_wrapper(JPEG REQUIRED)
@@ -54,360 +58,360 @@ find_package_wrapper(ZLIB REQUIRED)
find_package_wrapper(Freetype REQUIRED)
if(WITH_LZO AND WITH_SYSTEM_LZO)
find_package_wrapper(LZO)
if(NOT LZO_FOUND)
message(FATAL_ERROR "Failed finding system LZO version!")
endif()
find_package_wrapper(LZO)
if(NOT LZO_FOUND)
message(FATAL_ERROR "Failed finding system LZO version!")
endif()
endif()
if(WITH_SYSTEM_EIGEN3)
find_package_wrapper(Eigen3)
if(NOT EIGEN3_FOUND)
message(FATAL_ERROR "Failed finding system Eigen3 version!")
endif()
find_package_wrapper(Eigen3)
if(NOT EIGEN3_FOUND)
message(FATAL_ERROR "Failed finding system Eigen3 version!")
endif()
endif()
# else values are set below for all platforms
if(WITH_PYTHON)
# No way to set py35, remove for now.
# find_package(PythonLibs)
# No way to set py35, remove for now.
# find_package(PythonLibs)
# Use our own instead, since without py is such a rare case,
# require this package
# XXX Linking errors with debian static python :/
# find_package_wrapper(PythonLibsUnix REQUIRED)
find_package(PythonLibsUnix REQUIRED)
# Use our own instead, since without py is such a rare case,
# require this package
# XXX Linking errors with debian static python :/
# find_package_wrapper(PythonLibsUnix REQUIRED)
find_package(PythonLibsUnix REQUIRED)
endif()
if(WITH_IMAGE_OPENEXR)
find_package_wrapper(OpenEXR) # our own module
if(NOT OPENEXR_FOUND)
set(WITH_IMAGE_OPENEXR OFF)
endif()
find_package_wrapper(OpenEXR) # our own module
if(NOT OPENEXR_FOUND)
set(WITH_IMAGE_OPENEXR OFF)
endif()
endif()
if(WITH_IMAGE_OPENJPEG)
find_package_wrapper(OpenJPEG)
if(NOT OPENJPEG_FOUND)
set(WITH_IMAGE_OPENJPEG OFF)
endif()
find_package_wrapper(OpenJPEG)
if(NOT OPENJPEG_FOUND)
set(WITH_IMAGE_OPENJPEG OFF)
endif()
endif()
if(WITH_IMAGE_TIFF)
# XXX Linking errors with debian static tiff :/
# find_package_wrapper(TIFF)
find_package(TIFF)
if(NOT TIFF_FOUND)
set(WITH_IMAGE_TIFF OFF)
endif()
# XXX Linking errors with debian static tiff :/
# find_package_wrapper(TIFF)
find_package(TIFF)
if(NOT TIFF_FOUND)
set(WITH_IMAGE_TIFF OFF)
endif()
endif()
# Audio IO
if(WITH_SYSTEM_AUDASPACE)
find_package_wrapper(Audaspace)
if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND)
message(FATAL_ERROR "Audaspace external library not found!")
endif()
find_package_wrapper(Audaspace)
if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND)
message(FATAL_ERROR "Audaspace external library not found!")
endif()
endif()
if(WITH_OPENAL)
find_package_wrapper(OpenAL)
if(NOT OPENAL_FOUND)
set(WITH_OPENAL OFF)
endif()
find_package_wrapper(OpenAL)
if(NOT OPENAL_FOUND)
set(WITH_OPENAL OFF)
endif()
endif()
if(WITH_SDL)
if(WITH_SDL_DYNLOAD)
set(SDL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/sdlew/include/SDL2")
set(SDL_LIBRARY)
else()
find_package_wrapper(SDL2)
if(SDL2_FOUND)
# Use same names for both versions of SDL until we move to 2.x.
set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}")
set(SDL_LIBRARY "${SDL2_LIBRARY}")
set(SDL_FOUND "${SDL2_FOUND}")
else()
find_package_wrapper(SDL)
endif()
mark_as_advanced(
SDL_INCLUDE_DIR
SDL_LIBRARY
)
# unset(SDLMAIN_LIBRARY CACHE)
if(NOT SDL_FOUND)
set(WITH_SDL OFF)
endif()
endif()
if(WITH_SDL_DYNLOAD)
set(SDL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/sdlew/include/SDL2")
set(SDL_LIBRARY)
else()
find_package_wrapper(SDL2)
if(SDL2_FOUND)
# Use same names for both versions of SDL until we move to 2.x.
set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}")
set(SDL_LIBRARY "${SDL2_LIBRARY}")
set(SDL_FOUND "${SDL2_FOUND}")
else()
find_package_wrapper(SDL)
endif()
mark_as_advanced(
SDL_INCLUDE_DIR
SDL_LIBRARY
)
# unset(SDLMAIN_LIBRARY CACHE)
if(NOT SDL_FOUND)
set(WITH_SDL OFF)
endif()
endif()
endif()
if(WITH_JACK)
find_package_wrapper(Jack)
if(NOT JACK_FOUND)
set(WITH_JACK OFF)
endif()
find_package_wrapper(Jack)
if(NOT JACK_FOUND)
set(WITH_JACK OFF)
endif()
endif()
# Codecs
if(WITH_CODEC_SNDFILE)
find_package_wrapper(SndFile)
if(NOT LIBSNDFILE_FOUND)
set(WITH_CODEC_SNDFILE OFF)
endif()
find_package_wrapper(SndFile)
if(NOT SNDFILE_FOUND)
set(WITH_CODEC_SNDFILE OFF)
endif()
endif()
if(WITH_CODEC_FFMPEG)
if(EXISTS ${LIBDIR})
# For precompiled lib directory, all ffmpeg dependencies are in the same folder
file(GLOB ffmpeg_libs ${LIBDIR}/ffmpeg/lib/*.a ${LIBDIR}/sndfile/lib/*.a)
set(FFMPEG ${LIBDIR}/ffmpeg CACHE PATH "FFMPEG Directory")
set(FFMPEG_LIBRARIES ${ffmpeg_libs} ${ffmpeg_libs} CACHE STRING "FFMPEG Libraries")
else()
set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
endif()
if(EXISTS ${LIBDIR})
# For precompiled lib directory, all ffmpeg dependencies are in the same folder
file(GLOB ffmpeg_libs ${LIBDIR}/ffmpeg/lib/*.a ${LIBDIR}/sndfile/lib/*.a)
set(FFMPEG ${LIBDIR}/ffmpeg CACHE PATH "FFMPEG Directory")
set(FFMPEG_LIBRARIES ${ffmpeg_libs} ${ffmpeg_libs} CACHE STRING "FFMPEG Libraries")
else()
set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
endif()
mark_as_advanced(FFMPEG)
mark_as_advanced(FFMPEG)
# lame, but until we have proper find module for ffmpeg
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
if(EXISTS "${FFMPEG}/include/ffmpeg/")
list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg")
endif()
# end lameness
# lame, but until we have proper find module for ffmpeg
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
if(EXISTS "${FFMPEG}/include/ffmpeg/")
list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg")
endif()
# end lameness
mark_as_advanced(FFMPEG_LIBRARIES)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
mark_as_advanced(FFMPEG_LIBRARIES)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
endif()
if(WITH_FFTW3)
find_package_wrapper(Fftw3)
if(NOT FFTW3_FOUND)
set(WITH_FFTW3 OFF)
endif()
find_package_wrapper(Fftw3)
if(NOT FFTW3_FOUND)
set(WITH_FFTW3 OFF)
endif()
endif()
if(WITH_OPENCOLLADA)
find_package_wrapper(OpenCOLLADA)
if(OPENCOLLADA_FOUND)
find_package_wrapper(XML2)
find_package_wrapper(PCRE)
else()
set(WITH_OPENCOLLADA OFF)
endif()
find_package_wrapper(OpenCOLLADA)
if(OPENCOLLADA_FOUND)
find_package_wrapper(XML2)
find_package_wrapper(PCRE)
else()
set(WITH_OPENCOLLADA OFF)
endif()
endif()
if(WITH_MEM_JEMALLOC)
find_package_wrapper(JeMalloc)
if(NOT JEMALLOC_FOUND)
set(WITH_MEM_JEMALLOC OFF)
endif()
find_package_wrapper(JeMalloc)
if(NOT JEMALLOC_FOUND)
set(WITH_MEM_JEMALLOC OFF)
endif()
endif()
if(WITH_INPUT_NDOF)
find_package_wrapper(Spacenav)
if(SPACENAV_FOUND)
# use generic names within blenders buildsystem.
set(NDOF_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIRS})
set(NDOF_LIBRARIES ${SPACENAV_LIBRARIES})
else()
set(WITH_INPUT_NDOF OFF)
endif()
find_package_wrapper(Spacenav)
if(SPACENAV_FOUND)
# use generic names within blenders buildsystem.
set(NDOF_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIRS})
set(NDOF_LIBRARIES ${SPACENAV_LIBRARIES})
else()
set(WITH_INPUT_NDOF OFF)
endif()
endif()
if(WITH_CYCLES_OSL)
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
if(NOT OSL_ROOT)
set(OSL_ROOT ${CYCLES_OSL})
endif()
find_package_wrapper(OpenShadingLanguage)
if(OSL_FOUND)
if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")
# Note: --whole-archive is needed to force loading of all symbols in liboslexec,
# otherwise LLVM is missing the osl_allocate_closure_component function
set(OSL_LIBRARIES
${OSL_OSLCOMP_LIBRARY}
-Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY}
-Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY}
)
endif()
else()
message(STATUS "OSL not found, disabling it from Cycles")
set(WITH_CYCLES_OSL OFF)
endif()
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
if(NOT OSL_ROOT)
set(OSL_ROOT ${CYCLES_OSL})
endif()
find_package_wrapper(OpenShadingLanguage)
if(OSL_FOUND)
if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")
# Note: --whole-archive is needed to force loading of all symbols in liboslexec,
# otherwise LLVM is missing the osl_allocate_closure_component function
set(OSL_LIBRARIES
${OSL_OSLCOMP_LIBRARY}
-Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY}
-Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY}
)
endif()
else()
message(STATUS "OSL not found, disabling it from Cycles")
set(WITH_CYCLES_OSL OFF)
endif()
endif()
if(WITH_OPENVDB)
find_package_wrapper(OpenVDB)
find_package_wrapper(TBB)
find_package_wrapper(Blosc)
if(NOT TBB_FOUND)
set(WITH_OPENVDB OFF)
set(WITH_OPENVDB_BLOSC OFF)
message(STATUS "TBB not found, disabling OpenVDB")
elseif(NOT OPENVDB_FOUND)
set(WITH_OPENVDB OFF)
set(WITH_OPENVDB_BLOSC OFF)
message(STATUS "OpenVDB not found, disabling it")
elseif(NOT BLOSC_FOUND)
set(WITH_OPENVDB_BLOSC OFF)
message(STATUS "Blosc not found, disabling it for OpenVBD")
endif()
find_package_wrapper(OpenVDB)
find_package_wrapper(TBB)
find_package_wrapper(Blosc)
if(NOT TBB_FOUND)
set(WITH_OPENVDB OFF)
set(WITH_OPENVDB_BLOSC OFF)
message(STATUS "TBB not found, disabling OpenVDB")
elseif(NOT OPENVDB_FOUND)
set(WITH_OPENVDB OFF)
set(WITH_OPENVDB_BLOSC OFF)
message(STATUS "OpenVDB not found, disabling it")
elseif(NOT BLOSC_FOUND)
set(WITH_OPENVDB_BLOSC OFF)
message(STATUS "Blosc not found, disabling it for OpenVBD")
endif()
endif()
if(WITH_ALEMBIC)
find_package_wrapper(Alembic)
find_package_wrapper(Alembic)
if(WITH_ALEMBIC_HDF5)
set(HDF5_ROOT_DIR ${LIBDIR}/hdf5)
find_package_wrapper(HDF5)
endif()
if(WITH_ALEMBIC_HDF5)
set(HDF5_ROOT_DIR ${LIBDIR}/hdf5)
find_package_wrapper(HDF5)
endif()
if(NOT ALEMBIC_FOUND OR (WITH_ALEMBIC_HDF5 AND NOT HDF5_FOUND))
set(WITH_ALEMBIC OFF)
set(WITH_ALEMBIC_HDF5 OFF)
endif()
if(NOT ALEMBIC_FOUND OR (WITH_ALEMBIC_HDF5 AND NOT HDF5_FOUND))
set(WITH_ALEMBIC OFF)
set(WITH_ALEMBIC_HDF5 OFF)
endif()
endif()
if(WITH_BOOST)
# uses in build instructions to override include and library variables
if(NOT BOOST_CUSTOM)
if(WITH_STATIC_LIBS)
set(Boost_USE_STATIC_LIBS ON)
endif()
set(Boost_USE_MULTITHREADED ON)
set(__boost_packages filesystem regex thread date_time)
if(WITH_CYCLES_OSL)
if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6"))
list(APPEND __boost_packages wave)
else()
endif()
endif()
if(WITH_INTERNATIONAL)
list(APPEND __boost_packages locale)
endif()
if(WITH_CYCLES_NETWORK)
list(APPEND __boost_packages serialization)
endif()
if(WITH_OPENVDB)
list(APPEND __boost_packages iostreams)
endif()
list(APPEND __boost_packages system)
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
if(NOT Boost_FOUND)
# try to find non-multithreaded if -mt not found, this flag
# doesn't matter for us, it has nothing to do with thread
# safety, but keep it to not disturb build setups
set(Boost_USE_MULTITHREADED OFF)
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
endif()
unset(__boost_packages)
if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
find_package(IcuLinux)
endif()
mark_as_advanced(Boost_DIR) # why doesn't boost do this?
endif()
# uses in build instructions to override include and library variables
if(NOT BOOST_CUSTOM)
if(WITH_STATIC_LIBS)
set(Boost_USE_STATIC_LIBS ON)
endif()
set(Boost_USE_MULTITHREADED ON)
set(__boost_packages filesystem regex thread date_time)
if(WITH_CYCLES_OSL)
if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6"))
list(APPEND __boost_packages wave)
else()
endif()
endif()
if(WITH_INTERNATIONAL)
list(APPEND __boost_packages locale)
endif()
if(WITH_CYCLES_NETWORK)
list(APPEND __boost_packages serialization)
endif()
if(WITH_OPENVDB)
list(APPEND __boost_packages iostreams)
endif()
list(APPEND __boost_packages system)
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
if(NOT Boost_FOUND)
# try to find non-multithreaded if -mt not found, this flag
# doesn't matter for us, it has nothing to do with thread
# safety, but keep it to not disturb build setups
set(Boost_USE_MULTITHREADED OFF)
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
endif()
unset(__boost_packages)
if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
find_package(IcuLinux)
endif()
mark_as_advanced(Boost_DIR) # why doesn't boost do this?
endif()
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
endif()
if(WITH_OPENIMAGEIO)
find_package_wrapper(OpenImageIO)
if(NOT OPENIMAGEIO_PUGIXML_FOUND AND WITH_CYCLES_STANDALONE)
find_package_wrapper(PugiXML)
else()
set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}")
set(PUGIXML_LIBRARIES "")
endif()
find_package_wrapper(OpenImageIO)
if(NOT OPENIMAGEIO_PUGIXML_FOUND AND WITH_CYCLES_STANDALONE)
find_package_wrapper(PugiXML)
else()
set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}")
set(PUGIXML_LIBRARIES "")
endif()
set(OPENIMAGEIO_LIBRARIES
${OPENIMAGEIO_LIBRARIES}
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${ZLIB_LIBRARIES}
${BOOST_LIBRARIES}
)
set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
set(OPENIMAGEIO_DEFINITIONS "")
set(OPENIMAGEIO_LIBRARIES
${OPENIMAGEIO_LIBRARIES}
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${ZLIB_LIBRARIES}
${BOOST_LIBRARIES}
)
set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
set(OPENIMAGEIO_DEFINITIONS "")
if(WITH_IMAGE_TIFF)
list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}")
endif()
if(WITH_IMAGE_OPENEXR)
list(APPEND OPENIMAGEIO_LIBRARIES "${OPENEXR_LIBRARIES}")
endif()
if(WITH_IMAGE_TIFF)
list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}")
endif()
if(WITH_IMAGE_OPENEXR)
list(APPEND OPENIMAGEIO_LIBRARIES "${OPENEXR_LIBRARIES}")
endif()
if(NOT OPENIMAGEIO_FOUND)
set(WITH_OPENIMAGEIO OFF)
message(STATUS "OpenImageIO not found, disabling WITH_CYCLES")
endif()
if(NOT OPENIMAGEIO_FOUND)
set(WITH_OPENIMAGEIO OFF)
message(STATUS "OpenImageIO not found, disabling WITH_CYCLES")
endif()
endif()
if(WITH_OPENCOLORIO)
find_package_wrapper(OpenColorIO)
find_package_wrapper(OpenColorIO)
set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES})
set(OPENCOLORIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
set(OPENCOLORIO_DEFINITIONS)
set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES})
set(OPENCOLORIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
set(OPENCOLORIO_DEFINITIONS)
if(NOT OPENCOLORIO_FOUND)
set(WITH_OPENCOLORIO OFF)
message(STATUS "OpenColorIO not found")
endif()
if(NOT OPENCOLORIO_FOUND)
set(WITH_OPENCOLORIO OFF)
message(STATUS "OpenColorIO not found")
endif()
endif()
if(WITH_CYCLES_EMBREE)
find_package(Embree 3.2.4 REQUIRED)
find_package(Embree 3.2.4 REQUIRED)
endif()
if(WITH_LLVM)
if(EXISTS ${LIBDIR})
set(LLVM_STATIC ON)
endif()
if(EXISTS ${LIBDIR})
set(LLVM_STATIC ON)
endif()
find_package_wrapper(LLVM)
find_package_wrapper(LLVM)
# Symbol conflicts with same UTF library used by OpenCollada
if(EXISTS ${LIBDIR})
if(WITH_OPENCOLLADA AND (${LLVM_VERSION} VERSION_LESS "4.0.0"))
list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY})
endif()
endif()
# Symbol conflicts with same UTF library used by OpenCollada
if(EXISTS ${LIBDIR})
if(WITH_OPENCOLLADA AND (${LLVM_VERSION} VERSION_LESS "4.0.0"))
list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY})
endif()
endif()
if(NOT LLVM_FOUND)
set(WITH_LLVM OFF)
message(STATUS "LLVM not found")
endif()
if(NOT LLVM_FOUND)
set(WITH_LLVM OFF)
message(STATUS "LLVM not found")
endif()
endif()
if(WITH_LLVM OR WITH_SDL_DYNLOAD)
# Fix for conflict with Mesa llvmpipe
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
)
# Fix for conflict with Mesa llvmpipe
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
)
endif()
if(WITH_OPENSUBDIV)
find_package_wrapper(OpenSubdiv)
find_package_wrapper(OpenSubdiv)
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES})
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES})
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
if(NOT OPENSUBDIV_FOUND)
set(WITH_OPENSUBDIV OFF)
message(STATUS "OpenSubdiv not found")
endif()
if(NOT OPENSUBDIV_FOUND)
set(WITH_OPENSUBDIV OFF)
message(STATUS "OpenSubdiv not found")
endif()
endif()
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
if(HAIKU)
list(APPEND PLATFORM_LINKLIBS -lnetwork)
list(APPEND PLATFORM_LINKLIBS -lnetwork)
else()
list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm)
list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm)
endif()
find_package(Threads REQUIRED)
@@ -416,15 +420,15 @@ list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT})
set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
if(CMAKE_DL_LIBS)
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
if(NOT WITH_PYTHON_MODULE)
# binreloc is linux only
set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
set(WITH_BINRELOC ON)
endif()
if(NOT WITH_PYTHON_MODULE)
# binreloc is linux only
set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
set(WITH_BINRELOC ON)
endif()
endif()
# lfs on glibc, all compilers should use
@@ -432,43 +436,43 @@ add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
# GNU Compiler
if(CMAKE_COMPILER_IS_GNUCC)
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
if(WITH_LINKER_GOLD)
execute_process(
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "GNU gold")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
else()
message(STATUS "GNU gold linker isn't available, using the default system linker.")
endif()
unset(LD_VERSION)
endif()
if(WITH_LINKER_GOLD)
execute_process(
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "GNU gold")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
else()
message(STATUS "GNU gold linker isn't available, using the default system linker.")
endif()
unset(LD_VERSION)
endif()
# CLang is the same as GCC for now.
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
# Intel C++ Compiler
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
# think these next two are broken
find_program(XIAR xiar)
if(XIAR)
set(CMAKE_AR "${XIAR}")
endif()
mark_as_advanced(XIAR)
# think these next two are broken
find_program(XIAR xiar)
if(XIAR)
set(CMAKE_AR "${XIAR}")
endif()
mark_as_advanced(XIAR)
find_program(XILD xild)
if(XILD)
set(CMAKE_LINKER "${XILD}")
endif()
mark_as_advanced(XILD)
find_program(XILD xild)
if(XILD)
set(CMAKE_LINKER "${XILD}")
endif()
mark_as_advanced(XILD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
# set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
# set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
endif()

File diff suppressed because it is too large Load Diff

View File

@@ -12,11 +12,11 @@ blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/b
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
if [ "$blender_version_cycle" = "release" ] ; then
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
SUBMODULE_EXCLUDE="^\(release/scripts/addons_contrib\)$"
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
SUBMODULE_EXCLUDE="^\(release/scripts/addons_contrib\)$"
else
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
SUBMODULE_EXCLUDE="^$" # dummy regex
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
SUBMODULE_EXCLUDE="^$" # dummy regex
fi
MANIFEST="blender-$VERSION-manifest.txt"
@@ -42,10 +42,10 @@ git ls-files | python3 -c "$FILTER_FILES_PY" > $BASE_DIR/$MANIFEST
# Enumerate submodules
for lcv in $(git submodule | awk '{print $2}' | grep -v "$SUBMODULE_EXCLUDE"); do
cd "$BASE_DIR"
cd "$blender_srcdir/$lcv"
git ls-files | python3 -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
cd "$BASE_DIR"
cd "$BASE_DIR"
cd "$blender_srcdir/$lcv"
git ls-files | python3 -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
cd "$BASE_DIR"
done
echo "OK"
@@ -54,10 +54,10 @@ echo "OK"
cd "$blender_srcdir"
echo -n "Creating archive: \"$BASE_DIR/$TARBALL\" ..."
tar --transform "s,^,blender-$VERSION/,g" \
--use-compress-program="gzip --best" \
--create \
--file="$BASE_DIR/$TARBALL" \
--files-from="$BASE_DIR/$MANIFEST"
--use-compress-program="gzip --best" \
--create \
--file="$BASE_DIR/$TARBALL" \
--files-from="$BASE_DIR/$MANIFEST"
echo "OK"

View File

@@ -3,6 +3,9 @@ echo No explicit msvc version requested, autodetecting version.
call "%~dp0\detect_msvc2017.cmd"
if %ERRORLEVEL% EQU 0 goto DetectionComplete
call "%~dp0\detect_msvc2019.cmd"
if %ERRORLEVEL% EQU 0 goto DetectionComplete
call "%~dp0\detect_msvc2015.cmd"
if %ERRORLEVEL% EQU 0 goto DetectionComplete

View File

@@ -1,5 +1,6 @@
if "%BUILD_VS_YEAR%"=="2015" set BUILD_VS_LIBDIRPOST=vc14
if "%BUILD_VS_YEAR%"=="2017" set BUILD_VS_LIBDIRPOST=vc14
if "%BUILD_VS_YEAR%"=="2019" set BUILD_VS_LIBDIRPOST=vc14
if "%BUILD_ARCH%"=="x64" (
set BUILD_VS_SVNDIR=win64_%BUILD_VS_LIBDIRPOST%

Some files were not shown because too many files have changed in this diff Show More