Compare commits

..

1355 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
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
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
1588 changed files with 43792 additions and 38895 deletions

View File

@@ -236,6 +236,7 @@ ForEachMacros:
- RNA_BEGIN
- RNA_PROP_BEGIN
- RNA_STRUCT_BEGIN
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SEQP_BEGIN
- SEQ_BEGIN
- foreach

View File

@@ -558,8 +558,11 @@ if(WIN32)
set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING "password for pfx file used for codesigning.")
mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
option(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS "Organize the visual studio projects according to source folder structure." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
option(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS "Organize the source files in filters matching the source folders." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
mark_as_advanced(WINDOWS_PYTHON_DEBUG)
@@ -737,7 +740,7 @@ endif()
# Auto-enable CUDA dynload if toolkit is not found.
if(NOT WITH_CUDA_DYNLOAD)
find_package(CUDA)
if (NOT CUDA_FOUND)
if(NOT CUDA_FOUND)
message("CUDA toolkit not found, using dynamic runtime loading of libraries instead")
set(WITH_CUDA_DYNLOAD ON)
endif()
@@ -812,7 +815,7 @@ set(PLATFORM_LINKLIBS "")
set(PLATFORM_LINKFLAGS "")
set(PLATFORM_LINKFLAGS_DEBUG "")
if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
if(WITH_COMPILER_ASAN)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMPILER_ASAN_CFLAGS}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CFLAGS}")
@@ -962,9 +965,9 @@ if(MSVC)
# for some reason this fails on msvc
add_definitions(-D__LITTLE_ENDIAN__)
# OSX-Note: as we do cross-compiling with specific set architecture,
# endianess-detection and auto-setting is counterproductive
# so we just set endianness according CMAKE_OSX_ARCHITECTURES
# OSX-Note: as we do cross-compiling with specific set architecture,
# endianess-detection and auto-setting is counterproductive
# so we just set endianness according CMAKE_OSX_ARCHITECTURES
elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
add_definitions(-D__LITTLE_ENDIAN__)
@@ -1552,6 +1555,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
"/wd4800" # forcing value to bool 'true' or 'false'
"/wd4828" # The file contains a character that is illegal
"/wd4996" # identifier was declared deprecated
"/wd4661" # no suitable definition provided for explicit template instantiation request
# errors:
"/we4013" # 'function' undefined; assuming extern returning int
"/we4133" # incompatible pointer types

View File

@@ -228,7 +228,7 @@ endif
# 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"
endif
@@ -408,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)"

View File

@@ -91,7 +91,11 @@ 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)

View File

@@ -58,7 +58,7 @@ if(WIN32)
)
endif()
if (WIN32)
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

View File

@@ -18,7 +18,7 @@
set(FAAD_EXTRA_ARGS)
if (WIN32)
if(WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
else()
set(FAAD_EXTRA_CONFIGURE echo .)

View File

@@ -32,7 +32,7 @@ ExternalProject_Add(external_ffi
INSTALL_DIR ${LIBDIR}/ffi
)
if (UNIX AND NOT APPLE)
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

View File

@@ -70,7 +70,6 @@ ExternalProject_Add(external_opensubdiv
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
)

View File

@@ -126,13 +126,13 @@ else()
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.9)
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_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}

View File

@@ -111,9 +111,17 @@ add_dependencies(
external_zlib
external_flexbison
external_openimageio
external_pugixml
)
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

View File

@@ -19,7 +19,7 @@
set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if (APPLE)
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-x86_64")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")

View File

@@ -35,7 +35,7 @@ ExternalProject_Add(external_tbb
INSTALL_DIR ${LIBDIR}/tbb
)
if (WIN32)
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

View File

@@ -46,7 +46,7 @@ set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(ILMBASE_VERSION 2.3.0)
if (WIN32)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(ILMBASE_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_POSTFIX _s)
@@ -61,7 +61,7 @@ set(ILMBASE_URI https://github.com/openexr/openexr/releases/download/v${ILMBASE_
set(ILMBASE_HASH 354bf86de3b930ab87ac63619d60c860)
set(OPENEXR_VERSION 2.3.0)
if (WIN32) #release 2.3.0 tarball has broken cmake support
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()
@@ -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)

View File

@@ -25,7 +25,7 @@ ExternalProject_Add(external_zlib
INSTALL_DIR ${LIBDIR}/zlib
)
if (WIN32)
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}

View File

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

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")
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 "")
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,9 +52,8 @@ 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
build_cubins = True # Whether to build Cycles CUDA kernels
bits = 64
# Config file to be used (relative to blender's sources root)
@@ -62,7 +61,8 @@ if 'cmake' in builder:
# Set build options.
cmake_options = []
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release',
'-DWITH_GTESTS=ON']
if builder.startswith('mac'):
# Set up OSX architecture
@@ -78,30 +78,24 @@ if 'cmake' in builder:
cmake_options.extend(['-G', 'Visual Studio 15 2017'])
elif builder.startswith('linux'):
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
tokens = builder.split("_")
glibc = tokens[1]
if glibc == 'glibc224':
deb_name = "stretch"
elif glibc == 'glibc219':
deb_name = "jessie"
elif glibc == 'glibc211':
deb_name = "squeeze"
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_' + deb_name + '_x86_64'
targets = ['blender']
elif builder.endswith('i686_cmake'):
bits = 32
chroot_name = 'buildbot_' + deb_name + '_i686'
targets = ['blender']
if deb_name != "stretch":
cmake_extra_options.extend(["-DCMAKE_C_COMPILER=/usr/bin/gcc-7",
"-DCMAKE_CXX_COMPILER=/usr/bin/g++-7"])
if builder.endswith('x86_64_cmake'):
chroot_name = 'buildbot_' + deb_name + '_x86_64'
elif builder.endswith('i686_cmake'):
bits = 32
chroot_name = 'buildbot_' + deb_name + '_i686'
command_prefix = ['schroot', '-c', chroot_name, '--']
elif glibc == 'glibc217':
command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
# Prepare CMake options needed to configure cuda binaries compilation, 64bit only.
if bits == 64 and build_cubins:
if bits == 64:
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=ON")
cmake_options.append("-DCUDA_64_BIT_DEVICE_CODE=ON")
else:
@@ -111,12 +105,6 @@ if 'cmake' in builder:
cmake_options += cmake_extra_options
# Prepare chroot command prefix if needed
if chroot_name:
chroot_prefix = ['schroot', '-c', chroot_name, '--']
else:
chroot_prefix = []
# Make sure no garbage remained from the previous run
if os.path.isdir(install_dir):
shutil.rmtree(install_dir)
@@ -125,7 +113,7 @@ 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'
@@ -137,7 +125,7 @@ if 'cmake' in builder:
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
@@ -156,7 +144,7 @@ if 'cmake' in builder:
if os.path.exists(full_path):
print("Removing {}" . format(buildinfo))
os.remove(full_path)
retcode = subprocess.call(target_chroot_prefix + ['cmake', blender_dir] + target_cmake_options)
retcode = subprocess.call(target_command_prefix + ['cmake', blender_dir] + target_cmake_options)
if retcode != 0:
print('Configuration FAILED!')
sys.exit(retcode)
@@ -168,7 +156,7 @@ 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)

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

@@ -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.
@@ -50,16 +50,16 @@ 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)
IF(LIBSNDFILE_FOUND)
IF(SNDFILE_FOUND)
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
ENDIF(LIBSNDFILE_FOUND)
ENDIF(SNDFILE_FOUND)
MARK_AS_ADVANCED(
LIBSNDFILE_INCLUDE_DIR

View File

@@ -173,21 +173,38 @@ function(blender_source_group
sources
)
# Group by location on disk
source_group("Source Files" FILES CMakeLists.txt)
#if enabled, use the sources directories as filters.
if(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
foreach(_SRC ${sources})
# remove ../'s
get_filename_component(_SRC_DIR ${_SRC} REALPATH)
get_filename_component(_SRC_DIR ${_SRC_DIR} DIRECTORY)
string(FIND ${_SRC_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/" _pos)
if(NOT _pos EQUAL -1)
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" GROUP_ID ${_SRC_DIR})
string(REPLACE "/" "\\" GROUP_ID ${GROUP_ID})
source_group("${GROUP_ID}" FILES ${_SRC})
endif()
unset(_pos)
endforeach()
else()
# Group by location on disk
source_group("Source Files" FILES CMakeLists.txt)
foreach(_SRC ${sources})
get_filename_component(_SRC_EXT ${_SRC} EXT)
if((${_SRC_EXT} MATCHES ".h") OR
(${_SRC_EXT} MATCHES ".hpp") OR
(${_SRC_EXT} MATCHES ".hh"))
foreach(_SRC ${sources})
get_filename_component(_SRC_EXT ${_SRC} EXT)
if((${_SRC_EXT} MATCHES ".h") OR
(${_SRC_EXT} MATCHES ".hpp") OR
(${_SRC_EXT} MATCHES ".hh"))
set(GROUP_ID "Header Files")
else()
set(GROUP_ID "Source Files")
endif()
source_group("${GROUP_ID}" FILES ${_SRC})
endforeach()
set(GROUP_ID "Header Files")
elseif(${_SRC_EXT} MATCHES ".glsl$")
set(GROUP_ID "Shaders")
else()
set(GROUP_ID "Source Files")
endif()
source_group("${GROUP_ID}" FILES ${_SRC})
endforeach()
endif()
endfunction()
@@ -234,8 +251,8 @@ function(blender_add_lib__impl
add_library(${name} ${sources})
if (NOT "${library_deps}" STREQUAL "")
target_link_libraries(${name} "${library_deps}")
if(NOT "${library_deps}" STREQUAL "")
target_link_libraries(${name} INTERFACE "${library_deps}")
endif()
# works fine without having the includes
@@ -243,7 +260,7 @@ function(blender_add_lib__impl
blender_source_group("${sources}")
#if enabled, set the FOLDER property for visual studio projects
if(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
@@ -696,7 +713,7 @@ macro(remove_strict_flags)
endif()
if(MSVC)
# TODO
remove_cc_flag(/w34189) # Restore warn C4189 (unused variable) back to w4
endif()
endmacro()
@@ -938,6 +955,7 @@ function(delayed_install
endif()
set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination})
endforeach()
unset(f)
endfunction()
# note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir
@@ -1220,3 +1238,26 @@ macro(WINDOWS_SIGN_TARGET target)
endif()
endif()
endmacro()
macro(blender_precompile_headers target cpp header)
if(MSVC)
# get the name for the pch output file
get_filename_component( pchbase ${cpp} NAME_WE )
set( pchfinal "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${pchbase}.pch" )
# mark the cpp as the one outputting the pch
set_property(SOURCE ${cpp} APPEND PROPERTY OBJECT_OUTPUTS "${pchfinal}")
# get all sources for the target
get_target_property(sources ${target} SOURCES)
# make all sources depend on the pch to enforce the build order
foreach(src ${sources})
set_property(SOURCE ${src} APPEND PROPERTY OBJECT_DEPENDS "${pchfinal}")
endforeach()
target_sources(${target} PRIVATE ${cpp} ${header})
set_target_properties(${target} PROPERTIES COMPILE_FLAGS "/Yu${header} /Fp${pchfinal} /FI${header}")
set_source_files_properties(${cpp} PROPERTIES COMPILE_FLAGS "/Yc${header} /Fp${pchfinal}")
endif()
endmacro()

View File

@@ -20,7 +20,7 @@
# 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
@@ -181,7 +181,7 @@ 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++)
@@ -393,16 +393,13 @@ if(WITH_OPENMP)
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()
# Copy libomp.dylib to allow executables like datatoc and tests to work.
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)
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()

View File

@@ -93,19 +93,14 @@ else()
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)
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")

View File

@@ -156,7 +156,7 @@ endif()
# Codecs
if(WITH_CODEC_SNDFILE)
find_package_wrapper(SndFile)
if(NOT LIBSNDFILE_FOUND)
if(NOT SNDFILE_FOUND)
set(WITH_CODEC_SNDFILE OFF)
endif()
endif()

View File

@@ -30,14 +30,14 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(MSVC_CLANG On)
set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables")
set(MSVC_REDIST_DIR ${VC_TOOLS_DIR})
if (DEFINED MSVC_REDIST_DIR)
if(DEFINED MSVC_REDIST_DIR)
file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR)
else()
message("Unable to detect the Visual Studio redist directory, copying of the runtime dlls will not work, try running from the visual studio developer prompt.")
endif()
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_FOLDERS})
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS})
if(NOT WITH_PYTHON_MODULE)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT blender)
@@ -190,6 +190,12 @@ if(NOT EXISTS "${LIBDIR}/")
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
endif()
# Mark libdir as system headers with a lower warn level, to resolve some warnings
# that we have very little control over
if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG)
add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
endif()
# Add each of our libraries to our cmake_prefix_path so find_package() could work
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
foreach(child ${children})
@@ -637,7 +643,7 @@ if(WITH_CYCLES_EMBREE)
endif()
endif()
if (WINDOWS_PYTHON_DEBUG)
if(WINDOWS_PYTHON_DEBUG)
# Include the system scripts in the blender_python_system_scripts project.
FILE(GLOB_RECURSE inFiles "${CMAKE_SOURCE_DIR}/release/scripts/*.*" )
ADD_CUSTOM_TARGET(blender_python_system_scripts SOURCES ${inFiles})

View File

@@ -20,6 +20,6 @@ set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths
REM The formatting script expects clang-format to be in the current PATH.
set PATH=%CF_PATH%;%PATH%
%PYTHON% %FORMAT_PATHS%
%PYTHON% %FORMAT_PATHS% %FORMAT_ARGS%
:EOF

View File

@@ -70,6 +70,8 @@ if NOT "%1" == "" (
shift /1
) else if "%1" == "nobuild" (
set NOBUILD=1
) else if "%1" == "nobuildinfo" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_BUILDINFO=Off
) else if "%1" == "pydebug" (
set WITH_PYDEBUG=1
) else if "%1" == "showhash" (
@@ -91,6 +93,8 @@ if NOT "%1" == "" (
set VERBOSE=1
) else if "%1" == "format" (
set FORMAT=1
set FORMAT_ARGS=%2 %3 %4 %5 %6 %7 %8 %9
goto EOF
) else (
echo Command "%1" unknown, aborting!
exit /b 1

View File

@@ -13,11 +13,12 @@ echo - update ^(Update both SVN and GIT^)
echo - code_update ^(Update only GIT^)
echo - nobuild ^(only generate project files^)
echo - showhash ^(Show git hashes of source tree^)
echo - format [path] ^(Format the source using clang-format, path is optional, requires python 3.x to be available^)
echo.
echo Configuration options
echo - verbose ^(enable diagnostic output during configuration^)
echo - with_tests ^(enable building unit tests^)
echo - noge ^(disable building game engine and player^)
echo - nobuildinfo ^(disable buildinfo^)
echo - debug ^(Build an unoptimized debuggable build^)
echo - packagename [newname] ^(override default cpack package name^)
echo - buildir [newdir] ^(override default build folder^)

View File

@@ -99,10 +99,9 @@ bm.free()
# Add the mesh to the scene
scene = bpy.context.scene
obj = bpy.data.objects.new("Object", me)
scene.objects.link(obj)
bpy.context.collection.objects.link(obj)
# Select and make active
scene.objects.active = obj
obj.select = True
bpy.context.view_layer.objects.active = obj
obj.select_set(True)

View File

@@ -19,9 +19,6 @@ if "Cube" in bpy.data.meshes:
# write images into a file next to the blend
import os
file = open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w')
for image in bpy.data.images:
file.write("%s %d x %d\n" % (image.filepath, image.size[0], image.size[1]))
file.close()
with open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w') as fs:
for image in bpy.data.images:
fs.write("%s %d x %d\n" % (image.filepath, image.size[0], image.size[1]))

View File

@@ -20,5 +20,5 @@ you would pass ``{'active_object': object}``.
# remove all objects in scene rather than the selected ones
import bpy
override = bpy.context.copy()
override['selected_bases'] = list(bpy.context.scene.object_bases)
override['selected_objects'] = list(bpy.context.scene.objects)
bpy.ops.object.delete(override)

View File

@@ -34,8 +34,8 @@ class OBJECT_PT_property_example(bpy.types.Panel):
bl_idname = "object_PT_property_example"
bl_label = "Property Example"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
bl_category = "Tools"
bl_region_type = 'UI'
bl_category = "Tool"
def draw(self, context):
# You can set the property values that should be used when the user

View File

@@ -17,8 +17,8 @@ class OBJECT_OT_evaluated_example(bpy.types.Operator):
def execute(self, context):
# This is an original object. Its data does not have any modifiers applied.
object = context.object
if object is None or object.type != 'MESH':
obj = context.object
if obj is None or obj.type != 'MESH':
self.report({'INFO'}, "No active mesh object to get info from")
return {'CANCELLED'}
# Evaluated object exists within a specific dependency graph.
@@ -42,7 +42,7 @@ class OBJECT_OT_evaluated_example(bpy.types.Operator):
# but has animation applied.
#
# NOTE: All ID types have `evaluated_get()`, including materials, node trees, worlds.
object_eval = object.evaluated_get(depsgraph)
object_eval = obj.evaluated_get(depsgraph)
mesh_eval = object_eval.data
self.report({'INFO'}, f"Number of evaluated vertices: {len(mesh_eval.vertices)}")
return {'FINISHED'}

View File

@@ -18,16 +18,16 @@ class OBJECT_OT_original_example(bpy.types.Operator):
# to request the original object from the known evaluated one.
#
# NOTE: All ID types have an `original` field.
object = object_eval.original
return object.select_get()
obj = object_eval.original
return obj.select_get()
def execute(self, context):
# NOTE: It seems redundant to iterate over original objects to request evaluated ones
# just to get original back. But we want to keep example as short as possible, but in real
# world there are cases when evaluated object is coming from a more meaningful source.
depsgraph = context.evaluated_depsgraph_get()
for object in context.editable_objects:
object_eval = object.evaluated_get(depsgraph)
for obj in context.editable_objects:
object_eval = obj.evaluated_get(depsgraph)
if self.check_object_selected(object_eval):
self.report({'INFO'}, f"Object is selected: {object_eval.name}")
return {'FINISHED'}

View File

@@ -18,15 +18,15 @@ class OBJECT_OT_object_instances(bpy.types.Operator):
depsgraph = context.evaluated_depsgraph_get()
for object_instance in depsgraph.object_instances:
# This is an object which is being instanced.
object = object_instance.object
obj = object_instance.object
# `is_instance` denotes whether the object is coming from instances (as an opposite of
# being an emitting object. )
if not object_instance.is_instance:
print(f"Object {object.name} at {object_instance.matrix_world}")
print(f"Object {obj.name} at {object_instance.matrix_world}")
else:
# Instanced will additionally have fields like uv, random_id and others which are
# specific for instances. See Python API for DepsgraphObjectInstance for details,
print(f"Instance of {object.name} at {object_instance.matrix_world}")
print(f"Instance of {obj.name} at {object_instance.matrix_world}")
return {'FINISHED'}

View File

@@ -34,22 +34,22 @@ class OBJECT_OT_object_to_mesh(bpy.types.Operator):
def execute(self, context):
# Access input original object.
object = context.object
if object is None:
obj = context.object
if obj is None:
self.report({'INFO'}, "No active mesh object to convert to mesh")
return {'CANCELLED'}
# Avoid annoying None checks later on.
if object.type not in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META'}:
if obj.type not in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META'}:
self.report({'INFO'}, "Object can not be converted to mesh")
return {'CANCELLED'}
depsgraph = context.evaluated_depsgraph_get()
# Invoke to_mesh() for original object.
mesh_from_orig = object.to_mesh()
mesh_from_orig = obj.to_mesh()
self.report({'INFO'}, f"{len(mesh_from_orig.vertices)} in new mesh without modifiers.")
# Remove temporary mesh.
object.to_mesh_clear()
obj.to_mesh_clear()
# Invoke to_mesh() for evaluated object.
object_eval = object.evaluated_get(depsgraph)
object_eval = obj.evaluated_get(depsgraph)
mesh_from_eval = object_eval.to_mesh()
self.report({'INFO'}, f"{len(mesh_from_eval.vertices)} in new mesh with modifiers.")
# Remove temporary mesh.

View File

@@ -30,16 +30,16 @@ class OBJECT_OT_mesh_from_object(bpy.types.Operator):
def execute(self, context):
# Access input original object.
object = context.object
if object is None:
obj = context.object
if obj is None:
self.report({'INFO'}, "No active mesh object to convert to mesh")
return {'CANCELLED'}
# Avoid annoying None checks later on.
if object.type not in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META'}:
if obj.type not in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META'}:
self.report({'INFO'}, "Object can not be converted to mesh")
return {'CANCELLED'}
depsgraph = context.evaluated_depsgraph_get()
object_eval = object.evaluated_get(depsgraph)
object_eval = obj.evaluated_get(depsgraph)
mesh_from_eval = bpy.data.meshes.new_from_object(object_eval)
self.report({'INFO'}, f"{len(mesh_from_eval.vertices)} in new mesh, and is ready for use!")
return {'FINISHED'}

View File

@@ -24,7 +24,7 @@ class SubMenu(bpy.types.Menu):
layout.separator()
# expand each operator option into this menu
layout.operator_enum("object.lamp_add", "type")
layout.operator_enum("object.light_add", "type")
layout.separator()

View File

@@ -20,7 +20,7 @@ class OBJECT_MT_display_presets(Menu):
bl_label = "Object Display Presets"
preset_subdir = "object/display"
preset_operator = "script.execute_preset"
display = Menu.display_preset
draw = Menu.draw_preset
class AddPresetObjectDisplay(AddPresetBase, Operator):
@@ -54,8 +54,8 @@ def panel_func(self, context):
row = layout.row(align=True)
row.menu(OBJECT_MT_display_presets.__name__, text=OBJECT_MT_display_presets.bl_label)
row.operator(AddPresetObjectDisplay.bl_idname, text="", icon='ZOOMIN')
row.operator(AddPresetObjectDisplay.bl_idname, text="", icon='ZOOMOUT').remove_active = True
row.operator(AddPresetObjectDisplay.bl_idname, text="", icon='ZOOM_IN')
row.operator(AddPresetObjectDisplay.bl_idname, text="", icon='ZOOM_OUT').remove_active = True
classes = (

View File

@@ -16,6 +16,7 @@ import bpy
class CyclesNodeTree(bpy.types.NodeTree):
""" This operator is only visible when Cycles is the selected render engine"""
bl_label = "Cycles Node Tree"
bl_icon = 'NONE'
@classmethod
def poll(cls, context):

View File

@@ -11,8 +11,8 @@ will not run. Modal operators are especially useful for interactive tools, an
operator can have its own state where keys toggle options as the operator runs.
Grab, Rotate, Scale, and Fly-Mode are examples of modal operators.
:class:`Operator.invoke` is used to initialize the operator as being by
returning ``{'RUNNING_MODAL'}``, initializing the modal loop.
:class:`Operator.invoke` is used to initialize the operator as being active
by returning ``{'RUNNING_MODAL'}``, initializing the modal loop.
Notice ``__init__()`` and ``__del__()`` are declared.
For other operator types they are not useful but for modal operators they will

View File

@@ -22,17 +22,11 @@ class ObjectSelectPanel(bpy.types.Panel):
def draw_header(self, context):
layout = self.layout
obj = context.object
layout.prop(obj, "select", text="")
layout.label(text="My Select Panel")
def draw(self, context):
layout = self.layout
obj = context.object
row = layout.row()
row.prop(obj, "hide_select")
row.prop(obj, "hide_render")
box = layout.box()
box.label(text="Selection Tools")
box.operator("object.select_all").action = 'TOGGLE'

View File

@@ -9,7 +9,8 @@ import bpy
class View3DPanel:
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
bl_region_type = 'UI'
bl_category = "Tool"
@classmethod
def poll(cls, context):

View File

@@ -79,11 +79,11 @@ class CustomRenderEngine(bpy.types.RenderEngine):
print("Datablock updated: ", update.id.name)
# Test if any material was added, removed or changed.
if depsgraph.id_type_update('MATERIAL'):
if depsgraph.id_type_updated('MATERIAL'):
print("Materials updated")
# Loop over all object instances in the scene.
if first_time or depsgraph.id_type_update('OBJECT'):
if first_time or depsgraph.id_type_updated('OBJECT'):
for instance in depsgraph.object_instances:
pass

View File

@@ -40,18 +40,6 @@ class MATERIAL_UL_matslots_example(bpy.types.UIList):
layout.prop(ma, "name", text="", emboss=False, icon_value=icon)
else:
layout.label(text="", translate=False, icon_value=icon)
# And now we can add other UI stuff...
# Here, we add nodes info if this material uses (old!) shading nodes.
if ma and not context.scene.render.use_shading_nodes:
manode = ma.active_node_material
if manode:
# The static method UILayout.icon returns the integer value of the icon ID "computed" for the given
# RNA object.
layout.label(text="Node %s" % manode.name, translate=False, icon_value=layout.icon(manode))
elif ma.use_nodes:
layout.label(text="Node <none>", translate=False)
else:
layout.label(text="")
# 'GRID' layout type should be as compact as possible (typically a single icon!).
elif self.layout_type in {'GRID'}:
layout.alignment = 'CENTER'
@@ -59,10 +47,10 @@ class MATERIAL_UL_matslots_example(bpy.types.UIList):
# And now we can use this list everywhere in Blender. Here is a small example panel.
class UIListPanelExample(bpy.types.Panel):
class UIListPanelExample1(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "UIList Panel"
bl_idname = "OBJECT_PT_ui_list_example"
bl_label = "UIList Example 1 Panel"
bl_idname = "OBJECT_PT_ui_list_example_1"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "object"
@@ -85,12 +73,12 @@ class UIListPanelExample(bpy.types.Panel):
def register():
bpy.utils.register_class(MATERIAL_UL_matslots_example)
bpy.utils.register_class(UIListPanelExample)
bpy.utils.register_class(UIListPanelExample1)
def unregister():
bpy.utils.unregister_class(UIListPanelExample1)
bpy.utils.unregister_class(MATERIAL_UL_matslots_example)
bpy.utils.unregister_class(UIListPanelExample)
if __name__ == "__main__":

View File

@@ -177,3 +177,37 @@ class MESH_UL_vgroups_slow(bpy.types.UIList):
flt_neworder = helper_funcs.sort_items_helper(_sort, lambda e: e[1], True)
return flt_flags, flt_neworder
# Minimal code to use above UIList...
class UIListPanelExample2(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "UIList Example 2 Panel"
bl_idname = "OBJECT_PT_ui_list_example_2"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "object"
def draw(self, context):
layout = self.layout
obj = context.object
# template_list now takes two new args.
# The first one is the identifier of the registered UIList to use (if you want only the default list,
# with no custom draw code, use "UI_UL_list").
layout.template_list("MESH_UL_vgroups_slow", "", obj, "vertex_groups", obj.vertex_groups, "active_index")
def register():
bpy.utils.register_class(MESH_UL_vgroups_slow)
bpy.utils.register_class(UIListPanelExample2)
def unregister():
bpy.utils.unregister_class(UIListPanelExample2)
bpy.utils.unregister_class(MESH_UL_vgroups_slow)
if __name__ == "__main__":
register()

View File

@@ -28,7 +28,7 @@ obj = bpy.data.objects["Armature"]
arm = obj.data
# Set the keyframe at frame 1.
arm.bones["Bone"].my_prop_group.nested = 10
arm.bones["Bone"].my_prop.nested = 10
arm.keyframe_insert(
data_path='bones["Bone"].my_prop.nested',
frame=1,

View File

@@ -7,5 +7,5 @@ import bpy
obj = bpy.context.object
# set the keyframe at frame 1
obj.location = 3.0, 4.0, 10.0
obj.location = (3.0, 4.0, 10.0)
obj.keyframe_insert(data_path="location", frame=1)

View File

@@ -24,7 +24,7 @@ def draw():
view_matrix = scene.camera.matrix_world.inverted()
projection_matrix = scene.camera.calc_matrix_camera(
context.depsgraph, x=WIDTH, y=HEIGHT)
context.evaluated_depsgraph_get(), x=WIDTH, y=HEIGHT)
offscreen.draw_view3d(
scene,

View File

@@ -27,4 +27,4 @@ col += mathutils.Color((0.25, 0.0, 0.0))
print("Color: %d, %d, %d" % (col * 255.0)[:])
# This example prints the color as hexadecimal
print("Hexadecimal: %.2x%.2x%.2x" % (col * 255.0)[:])
print("Hexadecimal: %.2x%.2x%.2x" % (int(col.r * 255), int(col.g * 255), int(col.b * 255)))

View File

@@ -29,4 +29,4 @@ vec.rotate(eul)
# transformations with more flexibility
mat_rot = eul.to_matrix()
mat_loc = mathutils.Matrix.Translation((2.0, 3.0, 4.0))
mat = mat_loc * mat_rot.to_4x4()
mat = mat_loc @ mat_rot.to_4x4()

View File

@@ -11,7 +11,7 @@ mat_sca = mathutils.Matrix.Scale(0.5, 4, (0.0, 0.0, 1.0))
mat_rot = mathutils.Matrix.Rotation(math.radians(45.0), 4, 'X')
# combine transformations
mat_out = mat_loc * mat_rot * mat_sca
mat_out = mat_loc @ mat_rot @ mat_sca
print(mat_out)
# extract components back out of the matrix

View File

@@ -13,7 +13,7 @@ print("Check quaternions match", quat_a == quat_b)
# like matrices, quaternions can be multiplied to accumulate rotational values
quat_a = mathutils.Quaternion((0.0, 1.0, 0.0), math.radians(90.0))
quat_b = mathutils.Quaternion((0.0, 0.0, 1.0), math.radians(45.0))
quat_out = quat_a * quat_b
quat_out = quat_a @ quat_b
# print the quat, euler degrees for mere mortals and (axis, angle)
print("Final Rotation:")

View File

@@ -32,11 +32,10 @@ vec_a <= vec_b
# Math can be performed on Vector classes
vec_a + vec_b
vec_a - vec_b
vec_a * vec_b
vec_a @ vec_b
vec_a * 10.0
matrix * vec_a
quat * vec_a
vec_a * vec_b
matrix @ vec_a
quat @ vec_a
-vec_a

View File

@@ -4,9 +4,6 @@ import mathutils
from bpy import context
obj = context.object
# 3d cursor relative to the object data
co_find = context.scene.cursor_location * obj.matrix_world.inverted()
mesh = obj.data
size = len(mesh.vertices)
kd = mathutils.kdtree.KDTree(size)
@@ -22,6 +19,8 @@ co_find = (0.0, 0.0, 0.0)
co, index, dist = kd.find(co_find)
print("Close to center:", co, index, dist)
# 3d cursor relative to the object data
co_find = obj.matrix_world.inverted() @ context.scene.cursor.location
# Find the closest 10 points to the 3d cursor
print("Close 10 points")
@@ -31,6 +30,5 @@ for (co, index, dist) in kd.find_n(co_find, 10):
# Find points within a radius of the 3d cursor
print("Close points within 0.5 distance")
co_find = context.scene.cursor_location
for (co, index, dist) in kd.find_range(co_find, 0.5):
print(" ", co, index, dist)

View File

@@ -6,7 +6,7 @@ vec = mathutils.Vector((1.0, 2.0, 3.0))
mat_rot = mathutils.Matrix.Rotation(radians(90.0), 4, 'X')
mat_trans = mathutils.Matrix.Translation(vec)
mat = mat_trans * mat_rot
mat = mat_trans @ mat_rot
mat.invert()
mat3 = mat.to_3x3()

View File

@@ -1,2 +1,2 @@
Sphinx==1.7.6
sphinx_rtd_theme==0.4.1
Sphinx==1.8.5
sphinx_rtd_theme==0.4.3

View File

@@ -1208,27 +1208,6 @@ offers a set of extensive examples, including advanced features.
:arg x, y, z: Specify the x, y, and z coordinates of a translation vector.
.. function:: glVertex (x,y,z,w,v):
B{glVertex2d, glVertex2f, glVertex2i, glVertex2s, glVertex3d, glVertex3f, glVertex3i,
glVertex3s, glVertex4d, glVertex4f, glVertex4i, glVertex4s, glVertex2dv, glVertex2fv,
glVertex2iv, glVertex2sv, glVertex3dv, glVertex3fv, glVertex3iv, glVertex3sv, glVertex4dv,
glVertex4fv, glVertex4iv, glVertex4sv}
Specify a vertex
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glVertex.xml>`__
:type x, y, z, w: Depends on function prototype (z and w for '3' and '4' prototypes only)
:arg x, y, z, w: Specify x, y, z, and w coordinates of a vertex. Not all parameters
are present in all forms of the command.
:type v: :class:`bgl.Buffer` object. Depends of function prototype (for 'v'
prototypes only)
:arg v: Specifies a pointer to an array of two, three, or four elements. The
elements of a two-element array are x and y; of a three-element array,
x, y, and z; and of a four-element array, x, y, z, and w.
.. function:: glViewport(x,y,width,height):
Set the viewport

File diff suppressed because it is too large Load Diff

View File

@@ -102,16 +102,16 @@ To avoid expensive recalculations every time a property is modified,
Blender defers making the actual calculations until they are needed.
However, while the script runs you may want to access the updated values.
In this case you need to call :class:`bpy.types.Scene.update` after modifying values, for example:
In this case you need to call :class:`bpy.types.ViewLayer.update` after modifying values, for example:
.. code-block:: python
bpy.context.object.location = 1, 2, 3
bpy.context.scene.update()
bpy.context.view_layer.update()
Now all dependent data (child objects, modifiers, drivers... etc)
has been recalculated and is available to the script.
has been recalculated and is available to the script within active view layer.
Can I redraw during the script?

View File

@@ -45,7 +45,7 @@ scene manipulation, automation, defining your own toolset and customization.
On startup Blender scans the ``scripts/startup/`` directory for Python modules and imports them.
The exact location of this directory depends on your installation.
See the :ref:`directory layout docs <blender_manual:getting-started_installing-config-directories>`.
See the :ref:`directory layout docs <blender_manual:blender-directory-layout>`.
Script Loading

View File

@@ -12,22 +12,22 @@ This API is generally stable but some areas are still being added and improved.
The Blender/Python API can do the following:
- Edit any data the user interface can (Scenes, Meshes, Particles etc.)
- Modify user preferences, keymaps and themes
- Run tools with own settings
- Create user interface elements such as menus, headers and panels
- Create new tools
- Create interactive tools
- Create new rendering engines that integrate with Blender
- Define new settings in existing Blender data
- Draw in the 3D view using OpenGL commands from Python
- Edit any data the user interface can (Scenes, Meshes, Particles etc.).
- Modify user preferences, key-maps and themes.
- Run tools with own settings.
- Create user interface elements such as menus, headers and panels.
- Create new tools.
- Create interactive tools.
- Create new rendering engines that integrate with Blender.
- Subscribe to changes to data and it's properties.
- Define new settings in existing Blender data.
- Draw in the 3D view using Python.
The Blender/Python API **can't** (yet)...
- Create new space types.
- Assign custom properties to every type.
- Define callbacks or listeners to be notified when data is changed.
Before Starting
@@ -51,7 +51,7 @@ A quick list of helpful things to know before starting:
| ``scripts/startup/bl_operators`` for operators.
Exact location depends on platform, see:
:ref:`Configuration and Data Paths <blender_manual:getting-started_installing-config-directories>`.
:ref:`directory layout docs <blender_manual:blender-directory-layout>`.
Running Scripts

View File

@@ -156,7 +156,8 @@ def api_dump():
for func_id, attr in funcs:
# arg_str = inspect.formatargspec(*inspect.getargspec(py_func))
func_args_ids = tuple(inspect.getargspec(attr).args)
sig = inspect.signature(attr)
func_args_ids = [k for k, v in sig.parameters.items()]
dump_class[func_id] = (
"func_py", # basic_type
@@ -175,7 +176,7 @@ def api_dump():
import pprint
filename = api_dunp_fname()
filehandle = open(filename, 'w')
filehandle = open(filename, 'w', encoding='utf-8')
tot = filehandle.write(pprint.pformat(dump, width=1))
filehandle.close()
print("%s, %d bytes written" % (filename, tot))
@@ -199,11 +200,11 @@ def compare_props(a, b, fuzz=0.75):
def api_changelog(api_from, api_to, api_out):
file_handle = open(api_from, 'r')
file_handle = open(api_from, 'r', encoding='utf-8')
dict_from = eval(file_handle.read())
file_handle.close()
file_handle = open(api_to, 'r')
file_handle = open(api_to, 'r', encoding='utf-8')
dict_to = eval(file_handle.read())
file_handle.close()
@@ -266,7 +267,7 @@ def api_changelog(api_from, api_to, api_out):
# also document function argument changes
fout = open(api_out, 'w')
fout = open(api_out, 'w', encoding='utf-8')
fw = fout.write
# print(api_changes)

View File

@@ -320,8 +320,6 @@ EXTRA_SOURCE_FILES = (
"../../../release/scripts/templates_py/ui_previews_custom_icon.py",
"../examples/bmesh.ops.1.py",
"../examples/bpy.app.translations.py",
"../static/favicon.ico",
"../static/blender_logo.svg",
)
@@ -401,7 +399,6 @@ is_release = bpy.app.version_cycle in {"rc", "release"}
# converting bytes to strings, due to T30154
BLENDER_REVISION = str(bpy.app.build_hash, 'utf_8')
BLENDER_DATE = str(bpy.app.build_date, 'utf_8')
if is_release:
# '2.62a'
@@ -409,9 +406,13 @@ if is_release:
else:
# '2.62.1'
BLENDER_VERSION_DOTS = ".".join(blender_version_strings)
if BLENDER_REVISION != "Unknown":
# '2.62a SHA1' (release) or '2.62.1 SHA1' (non-release)
BLENDER_VERSION_DOTS += " " + BLENDER_REVISION
BLENDER_VERSION_HASH = BLENDER_REVISION
else:
# Fallback: Should not be used
BLENDER_VERSION_HASH = "Hash Unknown"
if is_release:
# '2_62a_release'
@@ -988,6 +989,7 @@ context_type_map = {
"active_object": ("Object", False),
"active_operator": ("Operator", False),
"active_pose_bone": ("PoseBone", False),
"active_editable_fcurve": ("FCurve", False),
"armature": ("Armature", False),
"bone": ("Bone", False),
"brush": ("Brush", False),
@@ -1003,11 +1005,11 @@ context_type_map = {
"edit_movieclip": ("MovieClip", False),
"edit_object": ("Object", False),
"edit_text": ("Text", False),
"editable_bases": ("ObjectBase", True),
"editable_bones": ("EditBone", True),
"editable_gpencil_layers": ("GPencilLayer", True),
"editable_gpencil_strokes": ("GPencilStroke", True),
"editable_objects": ("Object", True),
"editable_fcurves": ("FCurve", True),
"fluid": ("FluidSimulationModifier", False),
"gpencil": ("GreasePencil", False),
"gpencil_data": ("GreasePencil", False),
@@ -1032,11 +1034,8 @@ context_type_map = {
"pose_object": ("Object", False),
"scene": ("Scene", False),
"sculpt_object": ("Object", False),
"selectable_bases": ("ObjectBase", True),
"selectable_objects": ("Object", True),
"selected_bases": ("ObjectBase", True),
"selected_bones": ("EditBone", True),
"selected_editable_bases": ("ObjectBase", True),
"selected_editable_bones": ("EditBone", True),
"selected_editable_fcurves": ("FCurve", True),
"selected_editable_objects": ("Object", True),
@@ -1046,6 +1045,7 @@ context_type_map = {
"selected_pose_bones": ("PoseBone", True),
"selected_pose_bones_from_active_object": ("PoseBone", True),
"selected_sequences": ("Sequence", True),
"selected_visible_fcurves": ("FCurve", True),
"sequences": ("Sequence", True),
"smoke": ("SmokeModifier", False),
"soft_body": ("SoftBodyModifier", False),
@@ -1056,11 +1056,11 @@ context_type_map = {
"texture_user_property": ("Property", False),
"vertex_paint_object": ("Object", False),
"view_layer": ("ViewLayer", False),
"visible_bases": ("ObjectBase", True),
"visible_bones": ("EditBone", True),
"visible_gpencil_layers": ("GPencilLayer", True),
"visible_objects": ("Object", True),
"visible_pose_bones": ("PoseBone", True),
"visible_fcurves": ("FCurve", True),
"weight_paint_object": ("Object", False),
"world": ("World", False),
}
@@ -1611,26 +1611,39 @@ def write_sphinx_conf_py(basepath):
fw("import sys, os\n\n")
fw("extensions = ['sphinx.ext.intersphinx']\n\n")
fw("intersphinx_mapping = {'blender_manual': ('https://docs.blender.org/manual/en/dev/', None)}\n\n")
fw("project = 'Blender'\n")
fw("project = 'Blender %s Python API'\n" % BLENDER_VERSION_DOTS)
fw("master_doc = 'index'\n")
fw("copyright = u'Blender Foundation'\n")
fw("version = '%s'\n" % BLENDER_VERSION_DOTS)
fw("release = '%s'\n" % BLENDER_VERSION_DOTS)
fw("version = '%s'\n" % BLENDER_VERSION_HASH)
fw("release = '%s'\n" % BLENDER_VERSION_HASH)
# Quiet file not in table-of-contents warnings.
fw("exclude_patterns = [\n")
fw(" 'include__bmesh.rst',\n")
fw("]\n\n")
fw("html_title = 'Blender %s Python API'\n" % BLENDER_VERSION_DOTS)
fw("html_title = 'Blender Python API'\n")
fw("html_theme = 'sphinx_rtd_theme'\n")
fw("html_theme_options = {\n")
fw(" 'canonical_url': 'https://docs.blender.org/api/current/',\n")
# fw(" 'analytics_id': '',\n")
# fw(" 'collapse_navigation': True,\n")
fw(" 'sticky_navigation': False,\n")
fw(" 'navigation_depth': 1,\n")
# fw(" 'includehidden': True,\n")
# fw(" 'titles_only': False\n")
fw(" }\n\n")
# not helpful since the source is generated, adds to upload size.
fw("html_copy_source = False\n")
fw("html_show_sphinx = False\n")
fw("html_use_opensearch = 'https://docs.blender.org/api/current'\n")
fw("html_split_index = True\n")
fw("html_extra_path = ['__/static/favicon.ico', '__/static/blender_logo.svg']\n")
fw("html_favicon = '__/static/favicon.ico'\n")
fw("html_logo = '__/static/blender_logo.svg'\n\n")
fw("html_static_path = ['static']\n")
fw("html_extra_path = ['static/favicon.ico', 'static/blender_logo.svg']\n")
fw("html_favicon = 'static/favicon.ico'\n")
fw("html_logo = 'static/blender_logo.svg'\n")
fw("html_last_updated_fmt = '%m/%d/%Y'\n\n")
# needed for latex, pdf gen
fw("latex_elements = {\n")
@@ -1650,12 +1663,13 @@ class PatchedPythonDomain(PythonDomain):
del node['refspecific']
return super(PatchedPythonDomain, self).resolve_xref(
env, fromdocname, builder, typ, target, node, contnode)
def setup(sphinx):
sphinx.override_domain(PatchedPythonDomain)
""")
# end workaround
fw("def setup(app):\n")
fw(" app.add_stylesheet('css/theme_overrides.css')\n")
fw(" app.override_domain(PatchedPythonDomain)\n\n")
file.close()
@@ -1674,14 +1688,14 @@ def write_rst_contents(basepath):
file = open(filepath, "w", encoding="utf-8")
fw = file.write
fw(title_string("Blender Python API Documentation", "%", double=True))
fw(title_string("Blender %s Python API Documentation" % BLENDER_VERSION_DOTS, "%", double=True))
fw("\n")
fw("Welcome to the API reference for Blender %s, built %s.\n" %
(BLENDER_VERSION_DOTS, BLENDER_DATE))
fw("Welcome to the Python API documentation for `Blender <https://www.blender.org>`__, ")
fw("the free and open source 3D creation suite.\n")
fw("\n")
# fw("`A PDF version of this document is also available <%s>`_\n" % BLENDER_PDF_FILENAME)
fw("This site can be downloaded for offline use: `Download the full Documentation (zipped HTML files) <%s>`_\n" %
fw("This site can be used offline: `Download the full documentation (zipped HTML files) <%s>`__\n" %
BLENDER_ZIP_FILENAME)
fw("\n")
@@ -1913,6 +1927,12 @@ def copy_handwritten_extra(basepath):
shutil.copy2(f_src, f_dst)
def copy_theme_assets(basepath):
shutil.copytree(os.path.join(SCRIPT_DIR, "static"),
os.path.join(basepath, "static"),
copy_function=shutil.copy)
def rna2sphinx(basepath):
try:
@@ -1947,6 +1967,9 @@ def rna2sphinx(basepath):
# copy source files referenced
copy_handwritten_extra(basepath)
# copy extra files needed for theme
copy_theme_assets(basepath)
def align_sphinx_in_to_sphinx_in_tmp(dir_src, dir_dst):
'''

View File

@@ -0,0 +1,11 @@
/* Prevent Long enum lists */
.field-body {
display: block;
width: 100%;
max-height: 245px;
overflow-y: auto !important;
}
/* Hide home icon in search area */
.wy-side-nav-search > a:hover {background: none; opacity: 0.9}
.wy-side-nav-search > a.icon::before {content: none}

View File

@@ -158,6 +158,10 @@ void CLG_logref_init(CLG_LogRef *clg_ref);
#define CLOG_ENSURE(clg_ref) \
((clg_ref)->type ? (clg_ref)->type : (CLG_logref_init(clg_ref), (clg_ref)->type))
#define CLOG_CHECK(clg_ref, verbose_level, ...) \
((void)CLOG_ENSURE(clg_ref), \
((clg_ref)->type->flag & CLG_FLAG_USE) && ((clg_ref)->type->level >= verbose_level))
#define CLOG_AT_SEVERITY(clg_ref, severity, verbose_level, ...) \
{ \
CLG_LogType *_lg_ty = CLOG_ENSURE(clg_ref); \

View File

@@ -20,10 +20,9 @@ bl_info = {
"name": "Cycles Render Engine",
"author": "",
"blender": (2, 80, 0),
"location": "Info header, render engine menu",
"description": "Cycles Render Engine integration",
"description": "Cycles renderer integration",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/render/cycles/",
"wiki_url": "https://docs.blender.org/manual/en/latest/render/cycles/",
"tracker_url": "",
"support": 'OFFICIAL',
"category": "Render"}
@@ -55,7 +54,7 @@ from . import (
class CyclesRender(bpy.types.RenderEngine):
bl_idname = 'CYCLES'
bl_label = "Cycles"
bl_use_shading_nodes = True
bl_use_eevee_viewport = True
bl_use_preview = True
bl_use_exclude_layers = True
bl_use_save_buffers = True

View File

@@ -20,6 +20,8 @@ import bpy
from bpy.types import Operator
from bpy.props import StringProperty
from bpy.app.translations import pgettext_tip as tip_
class CYCLES_OT_use_shading_nodes(Operator):
"""Enable nodes on a material, world or light"""
@@ -98,7 +100,8 @@ class CYCLES_OT_denoise_animation(Operator):
if not os.path.isfile(filepath):
scene.render.filepath = original_filepath
self.report({'ERROR'}, f"Frame '{filepath}' not found, animation must be complete.")
err_msg = tip_("Frame '%s' not found, animation must be complete") % filepath
self.report({'ERROR'}, err_msg)
return {'CANCELLED'}
scene.render.filepath = out_filepath

View File

@@ -291,6 +291,21 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
default=0.01,
)
min_light_bounces: IntProperty(
name="Min Light Bounces",
description="Minimum number of light bounces. Setting this higher reduces noise in the first bounces, "
"but can also be less efficient for more complex geometry like hair and volumes",
min=0, max=1024,
default=0,
)
min_transparent_bounces: IntProperty(
name="Min Transparent Bounces",
description="Minimum number of transparent bounces. Setting this higher reduces noise in the first bounces, "
"but can also be less efficient for more complex geometry like hair and volumes",
min=0, max=1024,
default=0,
)
caustics_reflective: BoolProperty(
name="Reflective Caustics",
description="Use reflective caustics, resulting in a brighter image (more noise but added realism)",

View File

@@ -237,6 +237,8 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
layout.separator()
col = layout.column(align=True)
col.prop(cscene, "min_light_bounces")
col.prop(cscene, "min_transparent_bounces")
col.prop(cscene, "light_sampling_threshold", text="Light Threshold")
if cscene.progressive != 'PATH' and use_branched_path(context):
@@ -1195,11 +1197,11 @@ class CYCLES_OBJECT_PT_visibility(CyclesButtonsPanel, Panel):
ob = context.object
col = flow.column()
col.prop(ob, "hide_viewport", text="Show in Viewports", invert_checkbox=True)
col.prop(ob, "hide_viewport", text="Show in Viewports", invert_checkbox=True, toggle=False)
col = flow.column()
col.prop(ob, "hide_render", text="Show in Renders", invert_checkbox=True)
col.prop(ob, "hide_render", text="Show in Renders", invert_checkbox=True, toggle=False)
col = flow.column()
col.prop(ob, "hide_select", text="Selectable", invert_checkbox=True)
col.prop(ob, "hide_select", text="Selectable", invert_checkbox=True, toggle=False)
if has_geometry_visibility(ob):
cob = ob.cycles

View File

@@ -91,16 +91,31 @@ static void blender_camera_init(BlenderCamera *bcam, BL::RenderSettings &b_rende
{
memset((void *)bcam, 0, sizeof(BlenderCamera));
bcam->nearclip = 1e-5f;
bcam->farclip = 1e5f;
bcam->type = CAMERA_PERSPECTIVE;
bcam->ortho_scale = 1.0f;
bcam->lens = 50.0f;
bcam->shuttertime = 1.0f;
bcam->rolling_shutter_type = Camera::ROLLING_SHUTTER_NONE;
bcam->rolling_shutter_duration = 0.1f;
bcam->aperturesize = 0.0f;
bcam->apertureblades = 0;
bcam->aperturerotation = 0.0f;
bcam->focaldistance = 10.0f;
bcam->zoom = 1.0f;
bcam->pixelaspect = make_float2(1.0f, 1.0f);
bcam->aperture_ratio = 1.0f;
bcam->sensor_width = 36.0f;
bcam->sensor_height = 24.0f;
bcam->sensor_fit = BlenderCamera::AUTO;
bcam->shuttertime = 1.0f;
bcam->motion_position = Camera::MOTION_POSITION_CENTER;
bcam->rolling_shutter_type = Camera::ROLLING_SHUTTER_NONE;
bcam->rolling_shutter_duration = 0.1f;
bcam->border.right = 1.0f;
bcam->border.top = 1.0f;
bcam->pano_viewplane.right = 1.0f;
@@ -108,6 +123,7 @@ static void blender_camera_init(BlenderCamera *bcam, BL::RenderSettings &b_rende
bcam->viewport_camera_border.right = 1.0f;
bcam->viewport_camera_border.top = 1.0f;
bcam->offscreen_dicing_scale = 1.0f;
bcam->matrix = transform_identity();
/* render resolution */
bcam->full_width = render_resolution_x(b_render);

View File

@@ -978,7 +978,7 @@ void BlenderSync::sync_curves(
/* obtain general settings */
const bool use_curves = scene->curve_system_manager->use_curves;
if (!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT)) {
if (!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT && b_ob.mode() != b_ob.mode_EDIT)) {
if (!motion)
mesh->compute_bounds();
return;

View File

@@ -1133,7 +1133,7 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph &b_depsgraph,
return;
}
/* TODO(sergey): Perform preliminary check for number of verticies. */
/* TODO(sergey): Perform preliminary check for number of vertices. */
if (numverts) {
/* Find attributes. */
Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);

View File

@@ -116,15 +116,18 @@ void BlenderSync::sync_light(BL::Object &b_parent,
/* test if we need to sync */
Light *light;
ObjectKey key(b_parent, persistent_id, b_ob_instance);
if (!light_map.sync(&light, b_ob, b_parent, key)) {
if (light->is_portal)
*use_portal = true;
return;
}
BL::Light b_light(b_ob.data());
/* Update if either object or light data changed. */
if (!light_map.sync(&light, b_ob, b_parent, key)) {
Shader *shader;
if (!shader_map.sync(&shader, b_light)) {
if (light->is_portal)
*use_portal = true;
return;
}
}
/* type */
switch (b_light.type()) {
case BL::Light::type_POINT: {
@@ -354,7 +357,8 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
#endif
/* Clear camera visibility for indirect only objects. */
bool use_indirect_only = b_parent.indirect_only_get(PointerRNA_NULL, b_view_layer);
bool use_indirect_only = !use_holdout &&
b_parent.indirect_only_get(PointerRNA_NULL, b_view_layer);
if (use_indirect_only) {
visibility &= ~PATH_RAY_CAMERA;
}

View File

@@ -138,7 +138,7 @@ static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
const char *result = _PyUnicode_AsString(py_str);
if (result) {
/* 99% of the time this is enough but we better support non unicode
* chars since blender doesnt limit this.
* chars since blender doesn't limit this.
*/
return result;
}
@@ -151,7 +151,7 @@ static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
return PyBytes_AS_STRING(*coerce);
}
else {
/* Clear the error, so Cycles can be at leadt used without
/* Clear the error, so Cycles can be at least used without
* GPU and OSL support,
*/
PyErr_Clear();

View File

@@ -147,9 +147,9 @@ void BlenderSession::create_session()
scene->image_manager->builtin_image_info_cb = function_bind(
&BlenderSession::builtin_image_info, this, _1, _2, _3);
scene->image_manager->builtin_image_pixels_cb = function_bind(
&BlenderSession::builtin_image_pixels, this, _1, _2, _3, _4, _5);
&BlenderSession::builtin_image_pixels, this, _1, _2, _3, _4, _5, _6);
scene->image_manager->builtin_image_float_pixels_cb = function_bind(
&BlenderSession::builtin_image_float_pixels, this, _1, _2, _3, _4, _5);
&BlenderSession::builtin_image_float_pixels, this, _1, _2, _3, _4, _5, _6);
session->scene = scene;
@@ -361,14 +361,14 @@ void BlenderSession::do_write_update_render_tile(RenderTile &rtile,
bool merge = (rtile.sample != 0) && (rtile.task != RenderTile::DENOISE);
if (merge) {
update_render_result(b_rr, b_rlay, rtile);
update_render_result(b_rlay, rtile);
}
end_render_result(b_engine, b_rr, true, highlight, merge);
}
else {
/* Write final render result. */
write_render_result(b_rr, b_rlay, rtile);
write_render_result(b_rlay, rtile);
end_render_result(b_engine, b_rr, false, false, true);
}
}
@@ -765,8 +765,7 @@ void BlenderSession::bake(BL::Depsgraph &b_depsgraph_,
sync = NULL;
}
void BlenderSession::do_write_update_render_result(BL::RenderResult &b_rr,
BL::RenderLayer &b_rlay,
void BlenderSession::do_write_update_render_result(BL::RenderLayer &b_rlay,
RenderTile &rtile,
bool do_update_only)
{
@@ -825,23 +824,16 @@ void BlenderSession::do_write_update_render_result(BL::RenderResult &b_rr,
if (buffers->get_pass_rect(PASS_COMBINED, exposure, sample, 4, &pixels[0], "Combined"))
b_combined_pass.rect(&pixels[0]);
}
/* tag result as updated */
b_engine.update_result(b_rr);
}
void BlenderSession::write_render_result(BL::RenderResult &b_rr,
BL::RenderLayer &b_rlay,
RenderTile &rtile)
void BlenderSession::write_render_result(BL::RenderLayer &b_rlay, RenderTile &rtile)
{
do_write_update_render_result(b_rr, b_rlay, rtile, false);
do_write_update_render_result(b_rlay, rtile, false);
}
void BlenderSession::update_render_result(BL::RenderResult &b_rr,
BL::RenderLayer &b_rlay,
RenderTile &rtile)
void BlenderSession::update_render_result(BL::RenderLayer &b_rlay, RenderTile &rtile)
{
do_write_update_render_result(b_rr, b_rlay, rtile, true);
do_write_update_render_result(b_rlay, rtile, true);
}
void BlenderSession::synchronize(BL::Depsgraph &b_depsgraph_)
@@ -894,21 +886,22 @@ void BlenderSession::synchronize(BL::Depsgraph &b_depsgraph_)
else
sync->sync_camera(b_render, b_camera_override, width, height, "");
builtin_images_load();
/* unlock */
session->scene->mutex.unlock();
/* reset if needed */
if (scene->need_reset()) {
BufferParams buffer_params = BlenderSync::get_buffer_params(
b_render, b_v3d, b_rv3d, scene->camera, width, height);
session->reset(buffer_params, session_params.samples);
/* After session reset, so device is not accessing image data anymore. */
builtin_images_load();
/* reset time */
start_resize_time = 0.0;
}
/* unlock */
session->scene->mutex.unlock();
/* Start rendering thread, if it's not running already. Do this
* after all scene data has been synced at least once. */
session->start();
@@ -1223,6 +1216,7 @@ bool BlenderSession::builtin_image_pixels(const string &builtin_name,
void *builtin_data,
unsigned char *pixels,
const size_t pixels_size,
const bool associate_alpha,
const bool free_cache)
{
if (!builtin_data) {
@@ -1272,12 +1266,14 @@ bool BlenderSession::builtin_image_pixels(const string &builtin_name,
b_image.buffers_free();
}
/* Premultiply, byte images are always straight for Blender. */
unsigned char *cp = pixels;
for (size_t i = 0; i < num_pixels; i++, cp += channels) {
cp[0] = (cp[0] * cp[3]) >> 8;
cp[1] = (cp[1] * cp[3]) >> 8;
cp[2] = (cp[2] * cp[3]) >> 8;
if (associate_alpha) {
/* Premultiply, byte images are always straight for Blender. */
unsigned char *cp = pixels;
for (size_t i = 0; i < num_pixels; i++, cp += channels) {
cp[0] = (cp[0] * cp[3]) >> 8;
cp[1] = (cp[1] * cp[3]) >> 8;
cp[2] = (cp[2] * cp[3]) >> 8;
}
}
return true;
}
@@ -1286,6 +1282,7 @@ bool BlenderSession::builtin_image_float_pixels(const string &builtin_name,
void *builtin_data,
float *pixels,
const size_t pixels_size,
const bool,
const bool free_cache)
{
if (!builtin_data) {

View File

@@ -70,12 +70,12 @@ class BlenderSession {
const int depth,
float pixels[]);
void write_render_result(BL::RenderResult &b_rr, BL::RenderLayer &b_rlay, RenderTile &rtile);
void write_render_result(BL::RenderLayer &b_rlay, RenderTile &rtile);
void write_render_tile(RenderTile &rtile);
/* update functions are used to update display buffer only after sample was rendered
* only needed for better visual feedback */
void update_render_result(BL::RenderResult &b_rr, BL::RenderLayer &b_rlay, RenderTile &rtile);
void update_render_result(BL::RenderLayer &b_rlay, RenderTile &rtile);
void update_render_tile(RenderTile &rtile, bool highlight);
/* interactive updates */
@@ -150,8 +150,7 @@ class BlenderSession {
protected:
void stamp_view_layer_metadata(Scene *scene, const string &view_layer_name);
void do_write_update_render_result(BL::RenderResult &b_rr,
BL::RenderLayer &b_rlay,
void do_write_update_render_result(BL::RenderLayer &b_rlay,
RenderTile &rtile,
bool do_update_only);
void do_write_update_render_tile(RenderTile &rtile, bool do_update_only, bool highlight);
@@ -162,11 +161,13 @@ class BlenderSession {
void *builtin_data,
unsigned char *pixels,
const size_t pixels_size,
const bool associate_alpha,
const bool free_cache);
bool builtin_image_float_pixels(const string &builtin_name,
void *builtin_data,
float *pixels,
const size_t pixels_size,
const bool associate_alpha,
const bool free_cache);
void builtin_images_load();

View File

@@ -1437,9 +1437,6 @@ void BlenderSync::sync_shaders(BL::Depsgraph &b_depsgraph)
sync_world(b_depsgraph, auto_refresh_update);
sync_lights(b_depsgraph, auto_refresh_update);
sync_materials(b_depsgraph, auto_refresh_update);
/* false = don't delete unused shaders, not supported */
shader_map.post_sync(false);
}
CCL_NAMESPACE_END

View File

@@ -216,6 +216,10 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
mesh_synced.clear();
/* Shader sync done at the end, since object sync uses it.
* false = don't delete unused shaders, not supported. */
shader_map.post_sync(false);
free_data_after_sync(b_depsgraph);
}
@@ -231,6 +235,7 @@ void BlenderSync::sync_integrator()
Integrator *integrator = scene->integrator;
Integrator previntegrator = *integrator;
integrator->min_bounce = get_int(cscene, "min_light_bounces");
integrator->max_bounce = get_int(cscene, "max_bounces");
integrator->max_diffuse_bounce = get_int(cscene, "diffuse_bounces");
@@ -238,6 +243,7 @@ void BlenderSync::sync_integrator()
integrator->max_transmission_bounce = get_int(cscene, "transmission_bounces");
integrator->max_volume_bounce = get_int(cscene, "volume_bounces");
integrator->transparent_min_bounce = get_int(cscene, "min_transparent_bounces");
integrator->transparent_max_bounce = get_int(cscene, "transparent_max_bounces");
integrator->volume_max_steps = get_int(cscene, "volume_max_steps");

View File

@@ -32,7 +32,7 @@
* todo: clean this up ... */
extern "C" {
void BKE_image_user_frame_calc(void *iuser, int cfra);
void BKE_image_user_frame_calc(void *ima, void *iuser, int cfra);
void BKE_image_user_file_path(void *iuser, void *ima, char *path);
unsigned char *BKE_image_get_pixels_for_frame(void *image, int frame);
float *BKE_image_get_float_pixels_for_frame(void *image, int frame);
@@ -75,11 +75,13 @@ static inline BL::Mesh object_to_mesh(BL::BlendData & /*data*/,
* UV are not empty. */
if (mesh.is_editmode() ||
(mesh.use_auto_smooth() && subdivision_type == Mesh::SUBDIVISION_NONE)) {
mesh = object.to_mesh();
BL::Depsgraph depsgraph(PointerRNA_NULL);
mesh = object.to_mesh(false, depsgraph);
}
}
else {
mesh = object.to_mesh();
BL::Depsgraph depsgraph(PointerRNA_NULL);
mesh = object.to_mesh(false, depsgraph);
}
#if 0
@@ -231,14 +233,14 @@ static inline int render_resolution_y(BL::RenderSettings &b_render)
static inline string image_user_file_path(BL::ImageUser &iuser, BL::Image &ima, int cfra)
{
char filepath[1024];
BKE_image_user_frame_calc(iuser.ptr.data, cfra);
BKE_image_user_frame_calc(NULL, iuser.ptr.data, cfra);
BKE_image_user_file_path(iuser.ptr.data, ima.ptr.data, filepath);
return string(filepath);
}
static inline int image_user_frame_number(BL::ImageUser &iuser, int cfra)
{
BKE_image_user_frame_calc(iuser.ptr.data, cfra);
BKE_image_user_frame_calc(NULL, iuser.ptr.data, cfra);
return iuser.frame_current();
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
/* This class implemens a ray accelerator for Cycles using Intel's Embree library.
/* This class implements a ray accelerator for Cycles using Intel's Embree library.
* It supports triangles, curves, object and deformation blur and instancing.
* Not supported are thick line segments, those have no native equivalent in Embree.
* They could be implemented using Embree's thick curves, at the expense of wasted memory.
@@ -23,13 +23,13 @@
* usage.
*
* Since Embree allows object to be either curves or triangles but not both, Cycles object IDs are
* maapped to Embree IDs by multiplying by two and adding one for curves.
* mapped to Embree IDs by multiplying by two and adding one for curves.
*
* This implementation shares RTCDevices between Cycles instances. Eventually each instance should
* get a separate RTCDevice to correctly keep track of memory usage.
*
* Vertex and index buffers are duplicated between Cycles device arrays and Embree. These could be
* merged, which would requrie changes to intersection refinement, shader setup, mesh light
* merged, which would require changes to intersection refinement, shader setup, mesh light
* sampling and a few other places in Cycles where direct access to vertex data is required.
*/

View File

@@ -980,14 +980,11 @@ class CPUDevice : public Device {
void thread_shader(DeviceTask &task)
{
KernelGlobals kg = kernel_globals;
KernelGlobals *kg = new KernelGlobals(thread_kernel_globals_init());
#ifdef WITH_OSL
OSLShader::thread_init(&kg, &kernel_globals, &osl_globals);
#endif
for (int sample = 0; sample < task.num_samples; sample++) {
for (int x = task.shader_x; x < task.shader_x + task.shader_w; x++)
shader_kernel()(&kg,
shader_kernel()(kg,
(uint4 *)task.shader_input,
(float4 *)task.shader_output,
task.shader_eval_type,
@@ -1002,9 +999,8 @@ class CPUDevice : public Device {
task.update_progress(NULL);
}
#ifdef WITH_OSL
OSLShader::thread_free(&kg);
#endif
thread_kernel_globals_free(kg);
delete kg;
}
int get_split_task_count(DeviceTask &task)

View File

@@ -47,6 +47,7 @@
#include "util/util_system.h"
#include "util/util_types.h"
#include "util/util_time.h"
#include "util/util_windows.h"
#include "kernel/split/kernel_split_data_types.h"
@@ -198,7 +199,7 @@ class CUDADevice : public Device {
fprintf(stderr,
"\nRefer to the Cycles GPU rendering documentation for possible solutions:\n");
fprintf(stderr,
"https://docs.blender.org/manual/en/dev/render/cycles/gpu_rendering.html\n\n");
"https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html\n\n");
first_error = false;
}
}
@@ -2659,6 +2660,14 @@ void device_cuda_info(vector<DeviceInfo> &devices)
cuDeviceGetAttribute(&timeout_attr, CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, num);
cuDeviceGetAttribute(&preempt_attr, CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, num);
/* The CUDA driver reports compute preemption as not being available on
* Windows 10 even when it is, due to an issue in application profiles.
* Detect case where we expect it to be available and override. */
if (preempt_attr == 0 && (major >= 6) && system_windows_version_at_least(10, 17134)) {
VLOG(1) << "Assuming device has compute preemption on Windows 10.";
preempt_attr = 1;
}
if (timeout_attr && !preempt_attr) {
VLOG(1) << "Device is recognized as display.";
info.description += " (Display)";
@@ -2666,6 +2675,7 @@ void device_cuda_info(vector<DeviceInfo> &devices)
display_devices.push_back(info);
}
else {
VLOG(1) << "Device has compute preemption or is not used for display.";
devices.push_back(info);
}
VLOG(1) << "Added device \"" << name << "\" with id \"" << info.id << "\".";

View File

@@ -214,12 +214,12 @@ void DenoisingTask::prefilter_color()
int num_color_passes = 3;
device_only_memory<float> temporary_color(device, "denoising temporary color");
temporary_color.alloc_to_device(3 * buffer.pass_stride, false);
temporary_color.alloc_to_device(6 * buffer.pass_stride, false);
for (int pass = 0; pass < num_color_passes; pass++) {
device_sub_ptr color_pass(temporary_color, pass * buffer.pass_stride, buffer.pass_stride);
device_sub_ptr color_var_pass(
buffer.mem, variance_to[pass] * buffer.pass_stride, buffer.pass_stride);
temporary_color, (pass + 3) * buffer.pass_stride, buffer.pass_stride);
functions.get_feature(mean_from[pass],
variance_from[pass],
*color_pass,

View File

@@ -34,7 +34,7 @@ class Tile;
class DenoiseParams {
public:
/* Pixel radius for neighbouring pixels to take into account. */
/* Pixel radius for neighboring pixels to take into account. */
int radius;
/* Controls neighbor pixel weighting for the denoising filter. */
float strength;

View File

@@ -359,7 +359,7 @@ class OpenCLDevice : public Device {
~OpenCLSplitPrograms();
/* Load the kernels and put the created kernels in the given
* `programs` paramter. */
* `programs` parameter. */
void load_kernels(vector<OpenCLProgram *> &programs,
const DeviceRequestedFeatures &requested_features,
bool is_preview = false);

View File

@@ -313,7 +313,9 @@ void Node::set_default_value(const SocketType &socket)
{
const void *src = socket.default_value;
void *dst = ((char *)this) + socket.struct_offset;
memcpy(dst, src, socket.size());
if (socket.size() > 0) {
memcpy(dst, src, socket.size());
}
}
template<typename T>

View File

@@ -174,7 +174,7 @@ ccl_device_inline bool scene_intersect_valid(const Ray *ray)
* From production scenes so far it seems it's enough to test first element
* only.
*/
return isfinite(ray->P.x);
return isfinite_safe(ray->P.x) && isfinite_safe(ray->D.x);
}
/* Note: ray is passed by value to work around a possible CUDA compiler bug. */

View File

@@ -42,6 +42,8 @@ typedef ccl_addr_space struct VelvetBsdf {
float invsigma2;
} VelvetBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(VelvetBsdf), "VelvetBsdf is too large!");
ccl_device int bsdf_ashikhmin_velvet_setup(VelvetBsdf *bsdf)
{
float sigma = fmaxf(bsdf->sigma, 0.01f);

View File

@@ -39,6 +39,8 @@ typedef ccl_addr_space struct DiffuseBsdf {
SHADER_CLOSURE_BASE;
} DiffuseBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(DiffuseBsdf), "DiffuseBsdf is too large!");
/* DIFFUSE */
ccl_device int bsdf_diffuse_setup(DiffuseBsdf *bsdf)

View File

@@ -43,6 +43,8 @@ typedef ccl_addr_space struct DiffuseRampBsdf {
float3 *colors;
} DiffuseRampBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(DiffuseRampBsdf), "DiffuseRampBsdf is too large!");
ccl_device float3 bsdf_diffuse_ramp_get_color(const float3 colors[8], float pos)
{
int MAXCOLORS = 8;

View File

@@ -44,6 +44,8 @@ typedef ccl_addr_space struct HairBsdf {
float offset;
} HairBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(HairBsdf), "HairBsdf is too large!");
ccl_device int bsdf_hair_reflection_setup(HairBsdf *bsdf)
{
bsdf->type = CLOSURE_BSDF_HAIR_REFLECTION_ID;

View File

@@ -48,6 +48,8 @@ typedef ccl_addr_space struct MicrofacetBsdf {
float3 T;
} MicrofacetBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(MicrofacetBsdf), "MicrofacetBsdf is too large!");
/* Beckmann and GGX microfacet importance sampling. */
ccl_device_inline void microfacet_beckmann_sample_slopes(KernelGlobals *kg,

View File

@@ -27,6 +27,8 @@ typedef ccl_addr_space struct OrenNayarBsdf {
float b;
} OrenNayarBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(OrenNayarBsdf), "OrenNayarBsdf is too large!");
ccl_device float3 bsdf_oren_nayar_get_intensity(const ShaderClosure *sc,
float3 n,
float3 v,

View File

@@ -44,6 +44,8 @@ typedef ccl_addr_space struct PhongRampBsdf {
float3 *colors;
} PhongRampBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(PhongRampBsdf), "PhongRampBsdf is too large!");
ccl_device float3 bsdf_phong_ramp_get_color(const float3 colors[8], float pos)
{
int MAXCOLORS = 8;

View File

@@ -30,6 +30,9 @@ typedef ccl_addr_space struct PrincipledDiffuseBsdf {
float roughness;
} PrincipledDiffuseBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(PrincipledDiffuseBsdf),
"PrincipledDiffuseBsdf is too large!");
ccl_device float3 calculate_principled_diffuse_brdf(
const PrincipledDiffuseBsdf *bsdf, float3 N, float3 V, float3 L, float3 H, float *pdf)
{

View File

@@ -28,6 +28,9 @@ typedef ccl_addr_space struct PrincipledSheenBsdf {
SHADER_CLOSURE_BASE;
} PrincipledSheenBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(PrincipledSheenBsdf),
"PrincipledSheenBsdf is too large!");
ccl_device float3 calculate_principled_sheen_brdf(
const PrincipledSheenBsdf *bsdf, float3 N, float3 V, float3 L, float3 H, float *pdf)
{

View File

@@ -42,6 +42,8 @@ typedef ccl_addr_space struct ToonBsdf {
float smooth;
} ToonBsdf;
static_assert(sizeof(ShaderClosure) >= sizeof(ToonBsdf), "ToonBsdf is too large!");
/* DIFFUSE TOON */
ccl_device int bsdf_diffuse_toon_setup(ToonBsdf *bsdf)

View File

@@ -30,6 +30,8 @@ typedef ccl_addr_space struct Bssrdf {
float channels;
} Bssrdf;
static_assert(sizeof(ShaderClosure) >= sizeof(Bssrdf), "Bssrdf is too large!");
/* Planar Truncated Gaussian
*
* Note how this is different from the typical gaussian, this one integrates
@@ -224,7 +226,7 @@ ccl_device float bssrdf_burley_eval(const float d, float r)
if (r >= Rm)
return 0.0f;
/* Burley refletance profile, equation (3).
/* Burley reflectance profile, equation (3).
*
* NOTES:
* - Surface albedo is already included into sc->weight, no need to

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