Commit Graph

78570 Commits

Author SHA1 Message Date
Clément Foucault
7c3eaffbbd GPU: Move gpu_element.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
97b597cd04 GPU: Move and rename gpu_draw*.c to C++
`gpu_draw.c` was a misleading name, `gpu_texture_image.cc` is better
suited.
2020-07-26 17:28:48 +02:00
Clément Foucault
8b7802db85 GPU: Move gpu_debug.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
56803e2754 GPU: Rename gpu_context.cpp to .cc suffix 2020-07-26 17:28:48 +02:00
Clément Foucault
7b4a21077a GPU: Move gpu_batch.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
d3cecc5007 GPU: Move gpu_attr_binding.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
13afc81f6d BLI: Add MACRO for enum usage in C++
This is handy to add support for enums used in both C and C++
files. This removes the need to typecast each time for every
operation.

Only support bitwise operators for now.
2020-07-26 17:28:48 +02:00
Clément Foucault
a77175c9b6 GPU: Add extern "C" to intern headers 2020-07-26 17:28:48 +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
Campbell Barton
850234c1b1 UV: port smart project from Python to C
Use C for faster operation on high poly models,
in my tests this gave ~27x speedup.

D8311 by @andreasterrius with edits.
2020-07-26 21:27:32 +10:00
Campbell Barton
9482cc6865 UV: support creating ParamHandle without checking UV selection
Needed for unwrapping from the 3D view.
2020-07-26 20:42:11 +10:00
Jacques Lucke
6cecdf2ade Functions: move tests closer to code 2020-07-26 12:19:11 +02:00
Jacques Lucke
14326619a1 Cleanup: avoid using namespace name in many cases 2020-07-25 20:39:21 +02:00
Jacques Lucke
1e999c7bdb Particles: initial Quick Particles operator
This operator automates the following steps:
1. Create a point cloud object.
2. Create a simulation data block.
3. Add a small particle simulation to the node tree.
4. Add a Simulation modifier to the point cloud object.
5. Reference the particle simulation from the modifier.

You have to go back to frame 1 to start the simulation.
The simulation is not yet cached and cannot be rendered.

The bounding box of the point cloud object is enabled for now,
because otherwise it is hard to select the object.
2020-07-25 20:24:36 +02:00
Jacques Lucke
04d46bdb83 Pointcloud: workaround for a viewport drawing issue 2020-07-25 20:19:55 +02:00
Jacques Lucke
0ae2a1d12a Particles: improve emitter when object is animated 2020-07-25 14:51:15 +02:00
Campbell Barton
d52e45c89e Merge branch 'blender-v2.90-release' 2020-07-25 21:31:16 +10:00
Campbell Barton
a8d058dbf4 Fix T79260: Crash displaying the same mesh in two windows 2020-07-25 21:30:08 +10:00
Campbell Barton
790d3804d0 Merge branch 'blender-v2.90-release' 2020-07-25 20:50:38 +10:00
Campbell Barton
4ca8f25fa8 Fix T79239: UV path select crash 2020-07-25 20:48:40 +10:00
Campbell Barton
82db64ed80 Merge branch 'blender-v2.90-release' 2020-07-25 20:36:31 +10:00
Campbell Barton
537c57136f Fix T79254: FCurve editor crash when zooming out to limit 2020-07-25 20:32:07 +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
Germano Cavalcante
273f50a333 Merge branch 'blender-v2.90-release' 2020-07-24 13:13:42 -03:00
Germano Cavalcante
d7c4e96493 Cleanup: Rename 'isect_ray_seg_v3' to 'isect_ray_line_v3'
The name was misleading as it returns true whenever it intersects the
line represented by the points.
2020-07-24 12:07:58 -03: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
Jacques Lucke
50ff450202 Cleanup: can use guarded instead of raw allocator now 2020-07-24 13:47:57 +02:00
Jacques Lucke
74fcb4d4c2 Particles: initial particle birth action
A particle action is some function that is triggered by some event.
Right now, users cannot control this. There is just a
randomize-velocity on-birth action. So the direction of spawned
particles is slightly randomized now.

This also adds a new integer attribute called "Hash" which is
useful for a number of things. Mainly for generating random numbers
for a specific particle. The ID of a particle is not necessarily a good source
of randomness.
2020-07-24 13:37:55 +02:00
Jacques Lucke
f495b583be Merge branch 'blender-v2.90-release' 2020-07-24 12:40:20 +02:00
Jacques Lucke
ec17b45034 Depsgraph: use construct on first use idiom for graph registry
This is necessary to avoid false positive memory leaks.
2020-07-24 12:38:04 +02:00
Jacques Lucke
236ca8fbe8 Allocator: make leak detection work with static variables
When definining static variables that own memory, you should
use the "construct on first use" idiom. Otherwise, you'll get
a warning when Blender exits.

More details are provided in D8354.

Differential Revision: https://developer.blender.org/D8354
2020-07-24 12:26:11 +02:00
Jacques Lucke
b53c46d760 BLI: add MultiValueMap
This is a convenience wrapper for `Map<Key, Vector<Value>>`.
It does not provide any performance benefits (yet). I need this
kind of map in a couple of places and before I was duplicating
the lookup logic in many places.
2020-07-24 12:15:13 +02:00
Campbell Barton
141deeefff DNA: disable 'int8_t' since it's not properly supported
Currently negative values from this type will be changed if the
int8_t changes to a int16_t for e.g.
2020-07-24 19:41:50 +10:00
Sergey Sharybin
22b8ac80d2 Merge branch 'blender-v2.90-release' 2020-07-24 11:24:57 +02:00
Sergey Sharybin
3886392430 Fix interface artifacts on Intel GPUs
This is a continuation of fix for T78307. Turns out instancing do not
work at all, so enforce single widget drawing on macOS and Intel GPU.

It was also reported that certain AMD and Mesa driver suffer from
similar issue, so disabled instancing for this configuration as well.

Differential Revision: https://developer.blender.org/D8374
2020-07-24 11:23:39 +02:00
Campbell Barton
13fa4b9898 Cleanup: remove redundant glReadBuffer call when reading pixels 2020-07-24 19:01:13 +10:00
Campbell Barton
ba99b12287 Cleanup: use doxy sections, update comments missed from refactor 2020-07-24 13:58:32 +10:00
Jacques Lucke
698af2e774 Try to fix build error
Not sure if this is the correct fix, because I can't reproduce the error.
2020-07-24 00:35:51 +02:00
Jacques Lucke
0b50ea51cc Particles: simulate partial time steps on newly emitted particles 2020-07-23 23:03:19 +02:00
Jacques Lucke
f359672c35 Particles: spawn particles on mesh surface 2020-07-23 22:30:22 +02:00
Nathan Craddock
c049fe7979 Merge branch 'blender-v2.90-release' 2020-07-23 12:50:59 -06:00
Nathan Craddock
9cbf43801b Fix T79187: Outliner "Make Single User" crash
When "ID Data" -> "Make Single User" is chosen with selected elements
that are not curves, there is a crash. This fix ensures that the id in the
callback function is an Action.
2020-07-23 12:40:33 -06:00
Julian Eisel
5ccb0f46dd Merge branch 'blender-v2.90-release' 2020-07-23 18:10:28 +02:00