Commit Graph

18522 Commits

Author SHA1 Message Date
Clément Foucault
2d89cd7dd5 Cleanup: GPU: Move Image based function to GPU_draw.h
This makes it less confusing what functions are for blender
structures.
2020-07-29 15:54:51 +02:00
Jacques Lucke
cd3be9c46d Cleanup: too small loop variable 2020-07-28 20:56:34 +02:00
Jacques Lucke
814ca40c63 Merge branch 'blender-v2.90-release' 2020-07-28 16:37:01 +02:00
Bastien Montagne
fcf91bbf0d Merge branch 'blender-v2.90-release' 2020-07-28 18:32:11 +02:00
Bastien Montagne
9c1da81a4c Fix T54544: "Copy Materials to Selected" only works when materials are defined on the mesh.
Build a temp matarray storing materials from obdata and source object
(depending on slots 'allocation' of source object), and assign those to
targets.

Also remove limitation of 'using same obdata is forbidden', just never
edit obdata materials in that case...

Certainly not perfect, but already much better than existing code.
2020-07-28 18:31:51 +02:00
Jacques Lucke
b274d18aec Cleanup: correct usage of extern-C blocks in various places
This removes extern-C blocks around other includes and adds
such blocks for some headers that need them.
2020-07-28 16:33:43 +02:00
Campbell Barton
2a52c2d001 Cleanup: spelling, comments 2020-07-28 21:49:37 +10:00
Sybren A. Stüvel
ec80f1d376 Cleanup: Commented BKE_object_moves_in_time() does not consider physics
When an object is moved only by the rigid body physics system, the
function `BKE_object_moves_in_time()` will incorrectly return `false`.
This commit adds a comment to make this behaviour more explicit.

No functional changes.
2020-07-28 12:39:52 +02:00
Sybren A. Stüvel
19de9d1a9e Cleanup: spelling fix in comment 2020-07-28 12:39:52 +02:00
Jacques Lucke
e7dd89b50b Cleanup: remove redundant return statement
This was found by clang-tidy.
2020-07-28 11:00:08 +02:00
Campbell Barton
1675969152 Merge branch 'blender-v2.90-release' 2020-07-28 17:57:56 +10:00
Campbell Barton
a2a29327d9 Fix T79341: Crash evaluating curve 2020-07-28 17:53:22 +10:00
Pablo Dobarro
ace832bf7c Merge branch 'blender-v2.90-release' 2020-07-27 22:21:57 +02:00
Pablo Dobarro
0006526952 Fix T79074: Mesh Topology info not being updated after changes
All these data arrays are created for a specific topology, so they should be
freed and updated when the PBVH rebuilds. Previously, this was only
happening when freeing the SculptSession, but it also needs to happen in
BKE_sculpt_update_object_before_eval to avoid reusing out of date data.

Reviewed By: sergey

Maniphest Tasks: T79074

Differential Revision: https://developer.blender.org/D8357
2020-07-27 22:04:31 +02:00
Pablo Dobarro
4f3233dd53 Fix T78242: Crash when using a Sculpt color tools that needs connectivity for the first time
When there is no color layer available,
BKE_sculpt_update_object_for_edit creates a new one and tags the mesh
with ID_RECLAC_GEOMETRY, so this layer is inmediatly available when the
tool starts. This also deletes the PBVH and when it is created again in
BKE_sculpt_update_object_after_eval, the pmap is not initialized, making
the tool crash.

This moves the color layer creation to a separate function outside
BKE_sculpt_update_object_for_edit, which now runs after the color
layer is available, so it won't need to update again and the pmap will
still be available when the tool is used.

Reviewed By: sergey

Maniphest Tasks: T78242

Differential Revision: https://developer.blender.org/D8135
2020-07-27 21:58:59 +02:00
Jacques Lucke
38e65331a8 Particles: initial support for events and actions
The following nodes work now (although things can still be improved of course):
Particle Birth Event, Praticle Time Step Event, Set Particle Attribute and Execute Condition.

Multiple Set Particle Attribute nodes can be chained using the "Execute" sockets.
They will be executed from left to right.
2020-07-27 16:26:43 +02:00
Sybren A. Stüvel
71506698de Cleanup: Fix compiler warning about missing parentheses
The code was well-defined, given that `&&` binds stronger than `||`, but
still GCC warns about this.

No functional changes.
2020-07-27 15:25:33 +02:00
Jacques Lucke
bfeb94eccc Cleanup: quiet warning 2020-07-27 11:41:51 +02:00
Bastien Montagne
93e6ed9b45 Merge branch 'blender-v2.90-release' 2020-07-27 10:26:00 +02:00
Bastien Montagne
d906116eba Cleanup: comments. 2020-07-27 10:25:43 +02:00
Bastien Montagne
041904ceb8 Cleanup: Minor renaming. 2020-07-27 10:25:43 +02:00
Sebastián Barschkis
e76f64a532 Fluid: Added new option to control the maximum number fluid particles in the simulation
New option that lets users the define the maximum number of fluid particles that will be allowed in the simulation. This can come in handy, for example, to ensure that the particle count will not exceed the hardware capabilities, or to avoid excessive amounts of particles in a scene.
2020-07-26 22:04:59 +02:00
Sebastián Barschkis
04195b1e74 Fluid: Added new option to control the maximum number fluid particles in the simulation
New option that lets users the define the maximum number of fluid particles that will be allowed in the simulation. This can come in handy, for example, to ensure that the particle count will not exceed the hardware capabilities, or to avoid excessive amounts of particles in a scene.
2020-07-26 22:02:10 +02:00
Clément Foucault
54237994d8 Cleanup: Image: Rename redundant enum for clarity 2020-07-26 21:07:25 +02:00
Clément Foucault
18cca0e704 Cleanup: GPU: Remove GPU_glew.h outside of GPU module
Remove use of GL* constants and types inside the codebase. There is still
a few occurence to get rid of.
2020-07-26 17:29:49 +02:00
Richard Antalik
076d033e10 VSE: Refactor delete operator and API
Operator logic is limited to iterating over selection and executing
same code as python API does.

Functional changes:

 - No attempt to preserve effects is made. Dependant effects are deleted.
 - No attempt to change meta strip boundaries.

Partially fixes T73828

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6892
2020-07-26 16:07:34 +02:00
Richard Antalik
f0e370a650 Merge branch 'blender-v2.90-release' 2020-07-26 15:04:56 +02:00
Richard Antalik
7ceb6ffe57 Fix T74958: Infinite loop on using strip as modifier mask
Add recursion check before assigning strip as a mask for modifier.
Same check is used for recursion check when reassigning effect input, so it
should not be possible to create recursion at all.
2020-07-26 15:00:37 +02:00
Richard Antalik
f2907b06f4 Fix T78999: Crash when adjusting sequencer property
Sequencer was not initialized yet, and RNA update function tried to clean up cache.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8323
2020-07-26 15:00:37 +02:00
Campbell Barton
5414ccbd4c Merge branch 'blender-v2.90-release' 2020-07-26 22:00:13 +10:00
Campbell Barton
28b1c70895 Fix T79272: Dimensions fail on negative scaled axis 2020-07-26 21:58:47 +10:00
Jacques Lucke
eeaa4379aa Simulation: cleanup dna data 2020-07-25 11:54:06 +02:00
Campbell Barton
ddd4fec386 Merge branch 'blender-v2.90-release' 2020-07-25 17:19:49 +10:00
Campbell Barton
2308668bac Fix T72622: Transform object origin ignores shape keys
D8367 by @paul2t with edits.
2020-07-25 17:19:13 +10:00
Antonio Vazquez
9a117fcdae GPencil: Add more randomness to random stroke color
The old method produce a small range of similar colors.
2020-07-24 16:24:04 +02:00
Campbell Barton
ba99b12287 Cleanup: use doxy sections, update comments missed from refactor 2020-07-24 13:58:32 +10:00
Jacques Lucke
f359672c35 Particles: spawn particles on mesh surface 2020-07-23 22:30:22 +02:00
Jacques Lucke
67857b5d9f Cleanup: avoid zero byte memcpy
Asan reports warnings because of this.
2020-07-23 17:55:05 +02:00
Bastien Montagne
4619562e2f Merge branch 'blender-v2.90-release' 2020-07-23 17:15:58 +02:00
Bastien Montagne
50cb693f1d Cleanup: Clang format. 2020-07-23 17:15:32 +02:00
Bastien Montagne
706b690ec6 Fix (unreported) bad handling of pointers in overrides with shapekeys. 2020-07-23 17:15:32 +02:00
Jacques Lucke
634585aa68 Simulation: add depsgraph relations for ids referenced by node tree
I'll really have to refactor `ntreeUpdateTree` soon to avoid scanning
all node trees multiple times.
2020-07-23 12:09:36 +02:00
Bastien Montagne
6596891121 Merge branch 'blender-v2.90-release' 2020-07-23 11:45:44 +02:00
Bastien Montagne
60b80ce142 LibOverride: Add core functions to reset a library override.
This means that we delete all override properties except for those over
ID pointers *if* the assigned pointer matches the linked data hierarchy.

Then we reload affected datablocks.
2020-07-23 11:33:24 +02:00
Bastien Montagne
85157e74b3 LibOverride: Fix missing ID update tag in BKE_lib_override_library_update. 2020-07-23 11:33:24 +02:00
Bastien Montagne
ad602a3f03 LibOverride: change runtime data into a real struct.
Needed for upcoming changes.
2020-07-23 11:33:24 +02:00
Bastien Montagne
c8653e516d LibOverride: Optimize/fix new generic 'relation-based' make override code.
This commit mostly avoids following 'loop back' ID pointers, since those
should never define an actual relationship.
2020-07-23 11:33:24 +02:00
Jacques Lucke
944df0c784 Cleanup: remove incorrect comment 2020-07-23 10:39:22 +02:00
Campbell Barton
62e53788aa Merge branch 'blender-v2.90-release' 2020-07-23 17:35:40 +10:00
Campbell Barton
67002402bd Fix T79162: 'prop_search' includes ID prefix in string properties
Regression from d6cefef98f

This also fixes an unreported issue where finding an exact match
wasn't being detected for items that contained an ID prefix.
2020-07-23 17:24:17 +10:00