Commit Graph

23 Commits

Author SHA1 Message Date
Jacques Lucke 91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Campbell Barton 02c77e4e5c Fix animation player checkerboard drawing with alpha channels
Was using uninitialized theme values.
2020-04-30 17:45:02 +10:00
Jacques Lucke f48b46860b Cleanup: make remaining gpu headers work in C++ 2020-03-02 15:29:09 +01:00
Pablo Dobarro 4a373afa5f Sculpt: Cloth brush
This brush has a simple physics solver that helps when sculpting cloth.

- The mass and the damping properties of the simulation are properties of the brush.
- It has two additional radius control to limit the influence and falloff of the simulation.
- Masked vertices are pinned in the simulation, and it applies the sculpt gravity directly in the solver.
- The Cloth Brush has 7 deformation modes with 2 falloff types (radial and plane).

The brush can create the constraints only on the required PBVH nodes, so the simulation is isolated on high poly meshes. As long
as the brush size is not too big it should be possible to keep it real time.

Known issues:
- The way constraints are created is extremely basic and it creates repeated constraints. Maybe there is another way to create fewer constraints while keeping the simulation quality decent. This part can also be multithreaded. (As it is it works ok, but it could be better)

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6715
2020-02-28 17:03:20 +01:00
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Clément Foucault 2c347ebbba Fix T57874: Crash due to IMM_BUFFER_SIZE when drawing cached frames...
... in the timeline.
2018-11-16 19:26:23 +01:00
Brecht Van Lommel 342e73f90f Spelling fixes in comments and descriptions (2.8 changes), patch by luzpaz.
Differential Revision: https://developer.blender.org/D3719
2018-09-24 18:48:29 +02:00
Campbell Barton 9a77f33bad GPU: utility function to draw a partial circle 2018-09-24 16:22:22 +10:00
Clément Foucault 8cd7828792 GWN: Port to GPU module: Replace GWN prefix by GPU 2018-07-18 11:49:15 +02:00
Clément Foucault 247ad2034d GWN: Port to GPU module: Move files to GPU
This does not include all the struct and type renaming. Only files were
renamed.

gwn_batch.c/h was fusioned with GPU_batch.c/h
gwn_immediate.c/h was fusioned with GPU_immediate.c/h
gwn_imm_util.c/h was fusioned with GPU_immediate_util.c/h
2018-07-18 00:17:57 +02:00
Campbell Barton 1eb49f8a2f GPU_immediate_util: add cube drawing function 2017-09-26 17:51:47 +10:00
Campbell Barton 63dfb5bb97 Cleanup: naming (GPU immediate util) 2017-09-26 15:21:01 +10:00
Campbell Barton 55fb6e7096 GPU_immediate_util: Add x,y radius to circle draw
A version of circle drawing for non 1:1 aspects
2017-09-14 03:54:32 +10:00
Campbell Barton 6d359e4498 Cleanup: use explicit 2d suffix for imm utils
Avoid ambiguity between 2d/3d (which were already named).
2017-09-14 01:24:50 +10:00
Campbell Barton b4d053efc7 Gawain API naming refactor
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
2017-06-19 20:18:04 +10:00
Bastien Montagne bb5f4a1f67 Cleanup/followup to previous commit: get rid of dashed-specific helpers.
Those are no more needed.
2017-05-01 16:32:55 +02:00
Bastien Montagne 45eaad88e2 Getting rid of setlinestyle: add imm_draw_circle_wire_dashed() util.
Needed a bit of twisting in generic private func behind the imm_draw_circle
helpers, but think it's fine.

Note that this demonstrate yet another downside of new dashed shader
compared to olde line style: not only does it needs more complex setup,
and can only work with PRIM_LINES type of primitives, but it also
behaves totally wrong with chained short segments!

We really need to find a better way to do this effect at some point. :(
2017-04-29 19:31:36 +02:00
Bastien Montagne 88a7d3438d Move imm_draw_line_box_dashed to GPU_immediate_util. 2017-04-26 12:11:40 +02:00
Campbell Barton 2f700b8280 GPU_immediate_util: missed last commit 2017-04-05 18:53:34 +10:00
Campbell Barton a4fac21fc5 Cleanup: Move imm_draw utils into own file
These were in BIF_glutil which is documented to be removed,
so best not define new API's there.
2017-04-05 18:43:59 +10:00