- 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.
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
- 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
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.
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.
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
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...
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!
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
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.
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
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
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
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.
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.
`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
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.
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
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
`DRW_STATE_CLIP_PLANES` has to be enabled independent of the workbench material.
Reviewers: fclem, jbakker
Differential Revision: https://developer.blender.org/D5278
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.
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
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).
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
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...
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
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
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
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
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...).
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.
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
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
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
Images were being freed often because the tagging for when the image was last
used was missing.
Differential Revision: https://developer.blender.org/D5252
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
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
'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
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
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
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
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
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.
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
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
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.
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
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
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.
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
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
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.
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
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
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.
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.
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.
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
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.
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
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.
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.
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
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
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.
Allows to disable keyframes from movie clips in dopesheet.
Reviewers: brecht
Reviewed By: brecht
Subscribers: sebastian_k
Differential Revision: https://developer.blender.org/D5203
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
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.
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! ;)
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.
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.
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.
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.
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.
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
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).
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
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
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.
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
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.
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.
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
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
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
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
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
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
'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
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.
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.
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.
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
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
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
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...
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.
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.
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.
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.
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.
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).
... 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.
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).
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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.
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.
* 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
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.
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
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.
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.
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.
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
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
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
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.
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
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.
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
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
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(),
...
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
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.
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...
- 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.
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
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
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.
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.
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.
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.
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
* 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
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.
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.
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
This solution checks if `persp_mat` has changed. If positive, the selection buffer is redrawn.
Differential Revision: https://developer.blender.org/D5081
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.
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
- 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
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
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
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.
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
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.
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
Also fixes bug where mesh with multires modifier is invisible in render
while in sculpt mode.
Differential Revision: https://developer.blender.org/D5099
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
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.
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
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.
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.
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.
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.
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.
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
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.
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
Percentage formatting of x% (used elsewhere) when using percentage display factor
Differential Revision: https://developer.blender.org/D5050
Reviewed by Brecht Van Lommel
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
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
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.
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
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.
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
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
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.
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.
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.
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.
- was using wrong offset [index instead of index * 4]
- also minor correction to variable naming
Reviewers: fclem
Differential Revision: https://developer.blender.org/D5082
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.
This only replaces ICON_GREASEPENCIL with ICON_OUTLINER_DATA_GP_LAYER icon
Differential Revision: https://developer.blender.org/D5073
Reviewed by Dalai Felinto
This adds the icon intended for Grease Pencil layer data, in SVG but currently marked as blank
Differential Revision: https://developer.blender.org/D5073
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.
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
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
- 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.
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.
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.
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
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.
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.
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.
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.
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.
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.
- 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
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.
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
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
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.
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.
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.
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.
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.
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).
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...
`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_`.
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...
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.
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.
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.
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
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
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.
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.
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. ;)
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.
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...
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.
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.
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
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
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
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
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.
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.
- 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.
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
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
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.
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
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
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.
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
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
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.
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.
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.
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"
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.
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.
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
- 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
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
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
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
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
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
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
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
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
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.
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.
- 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).
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
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.
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 ;) )...
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 ;) ).
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.
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.
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.
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
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
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
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
There is a keymap conflict with ctrl+tweak.
Therefore, I did not include this yet.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4999
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
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
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.
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
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
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"...)
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
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.
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
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
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.
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
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.
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
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).
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
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.
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.
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
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
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
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
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
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.
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.
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
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.
- 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
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
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.
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.
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.
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.
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
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.
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.
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).
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
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
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
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
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
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.
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
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.
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
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.
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).
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.
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.
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.
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
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
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.
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.
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
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
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
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.
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
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
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.
Caused by 5adfc51a0f, sharing keymaps caused changing tools to
unregister gizmos and remove their keymaps.
Workaround for now by not removing the keymap.
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.
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.
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).
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.
- 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
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
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.
- 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
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.
- 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)
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.
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.
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.
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
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.
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.
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.
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
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
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
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.
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
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
`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
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.
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).
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
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.
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.
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. :(
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)...
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.
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)...
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
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.")
* - 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
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.