Commit Graph

73787 Commits

Author SHA1 Message Date
Campbell Barton
c14e352d2c Fix error in recent gizmo tweak workaround 2019-12-19 15:50:48 +11:00
Campbell Barton
7ba1489bd7 Cleanup: use 'context' to make panels show in their section
All panels were calling poll to draw in their section causing a lot of
repeated boiler plate poll functions.

Also rename 'PreferencePanel' to 'CenterAlignMixIn'
since this is it's purpose.
2019-12-19 13:30:18 +11:00
Sybren A. Stüvel
9ae097e239 Animation: Clarified tooltip for Viewport Render Animation
The tooltip was static, so it was the same for viewport-rendering the
current frame and for the entire animation. It is now different for
those two.

The structure of `screen_opengl_render_description()` is such that it
allows for adding a new description for a soon-to-come feature (T72229).
2019-12-18 16:31:49 +01:00
Campbell Barton
d591c8a350 Gizmo: add the ability to postpone refreshing while tweaking
This resolves a logical problem using tweak as a fallback tool.
See: T66304#828742

The select action would immediately show the gizmo underneath it,
then the tweak would be handled by the gizmo instead of moving the item
under the cursor.

Currently this works by hiding the gizmo until the tweak event ends.
While it's simpler to check if the gizmo received a mouse-down event,
it causes flickering before each drag event which feels like a glitch.

This is optional for each gizmo type because there are cases where this
can be useful to activate the gizmo immediately (mesh rip for example).
2019-12-19 01:53:15 +11:00
Campbell Barton
5467f3de3a Cleanup: use wrapper function for gizmo group refresh
Allows for adding checks before/after refresh, not yet added.
2019-12-19 00:42:54 +11:00
Campbell Barton
838dc349ca Cleanup: const warning, unused var 2019-12-19 00:21:50 +11:00
mano-wii
61f4a7d1f5 Fix T72372: color picker is unreliable with large "clip end" values
By my tests, `planes_from_projmat` proved to be more accurate than the current solution.

Differential Revision: https://developer.blender.org/D6434
2019-12-18 09:41:14 -03:00
Jeroen Bakker
409d3f4880 Workbench: Force Vertex Colors in Paint Mode
Vertex colors behaved differently as the paint overlay mixed the colors
in display mode and the results was multiplied on top of the original
shading.

This patch will align the implementation to texture painting where the
colors are drawn by the workbench engine so the correct shading is
applied.

This also means that we don't show the vertex colors overlay when not
in solid mode.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6436
2019-12-18 13:31:12 +01:00
Jeroen Bakker
2a35383bb0 Fix T72353: Camera Limits Visibility
Due to recent refactoring of the overlay unification the camera limits
were also visible when the overlays were turned off. This was because
the `draw_extra` had an exception for when looking through the camera.

This change also takes the global hide overlays into account. So now the
camera limits will not be drawn when overlays are turned off. This also
fixed other camera related overlay drawing.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6394
2019-12-18 10:59:35 +01:00
Jeroen Bakker
b30a722f2d Fix T72124: LookDev Sphere Rendering
Due to the refactoring of the overlay engine the draw caches were
changed. The sphere batch used to have positions and normals. After the
refactoring it didn't had the normals anymore. The normals are needed
for shading. As they were not there the look dev spheres were rendered
black.

This change add the `nor` attribute to `DRW_cache_sphere_get` batch.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6393
2019-12-18 10:56:26 +01:00
Campbell Barton
a6b1c158c9 Cleanup: remove unused gesture event. 2019-12-18 15:47:48 +11:00
Campbell Barton
31b9ddd876 Fix error assigning the fluid particle flag to the wrong member 2019-12-18 12:57:28 +11:00
Campbell Barton
0019216722 Fix linking errors WITH_MOD_FLUID=OFF, again
Expose BKE_fluid_modifier_* functions for readfile versioning.
2019-12-18 12:52:15 +11:00
Lukas Stockner
bdbcb0df10 Image Editor: Load UDIMs even if secondary tile is selected
Previously the user had to select the 1001 tile for this to work,
now any tile will work as long as the 1001 tile still exists on disk.
2019-12-18 01:51:47 +01:00
Campbell Barton
87dba476fb Cleanup: use ELEM macro 2019-12-18 11:32:26 +11:00
Campbell Barton
0149b76dc6 Cleanup: warnings 2019-12-18 11:32:14 +11:00
Lukas Stockner
850aa3a6cf Image Editor: Disable tile operators if tile 1001 is missing 2019-12-18 01:05:02 +01:00
Lukas Stockner
e0cd5b980f Image Editor: Add option to create multiple tiles at once
Any existing tiles will be skipped.
2019-12-18 00:52:06 +01:00
Lukas Stockner
11d9271804 Image Editor: Add option to fill UDIM tiles during creation 2019-12-18 00:15:19 +01:00
Lukas Stockner
9a12f97f26 Fix T72487: Painting on unitialized UDIM tile crashes
The UDIM commit accidentally removed the check for whether an ImBuf exists
before trying to paint on it.
2019-12-18 00:04:47 +01:00
Sebastián Barschkis
e6a5e5077b Fluid: Fix placement of flag reset
Flag reset needs to be placed outside the object loop
2019-12-18 00:02:29 +01:00
Antonio Vazquez
5ad465c87f Fix T72430: GPencil normalize command crashes blender
When the stroke weights array was NULL, the function crash. Just check NULL value.
2019-12-17 19:54:34 +01:00
Pablo Dobarro
e998cb2c2e Sculpt: Use more saturated colors in the cursor
The previous cursor colors were chosen to match the toolbar icon color,
but the contrast on top of the default matcaps was not enough. This
commit uses more saturated colors, which are more visible on top of the
default matcaps.

Reviewed By: jbakker, billreynish

Differential Revision: https://developer.blender.org/D6194
2019-12-17 19:45:19 +01:00
Sebastián Barschkis
a04573f4aa Fluid: Fix that maps old smoke and fluid modifiers to new manta modifier 2019-12-17 18:00:27 +01:00
Sybren A. Stüvel
a601f54ba2 USD Exporter: show export options by default
There are options for the exporter that are relevant for each export, for
example the choice between Viewport or Render settings, or whether to
export the current frame or an animation. It's better to have the options
panel opened by default.
2019-12-17 17:00:18 +01:00
mano-wii
64116ca15a Fix unreported: Crash when confirms GRAPH_OT_decimate
`dgo` is MEM_freed just before.
2019-12-17 12:42:48 -03:00
Sybren A. Stüvel
aa7c1cdb7f UI: Prevent crash when opening file browser with mouse not in window
When the mouse is not inside the Blender window, `CTX_wm_area(C)` returns
`NULL`, but this wasn't checked for.
2019-12-17 15:55:48 +01:00
Sybren A. Stüvel
7830ea29c2 Fix T68665: FCurve group disappear on Curve/Surface object data
When going from EDIT to OBJECT mode, Blender updates the object data from
the edit-mode data. This took care of renaming FCurves that animate Curve
control points when control points are added/removed, but this didn't keep
the FCurve groups intact. Since the FCurve groups are tightly connected to
the Action channels, it's hard to keep the group pointers intact during
this process. Instead of making the code even more complex in an attempt to
do that, I implemented a function (`BKE_action_groups_reconstruct()`) that
rebuilds the group channel pointers.

The call to `action_groups_add_channel()` had to be removed because it
updates the the next/prev pointers of the FCurve while we're looping over
them, causing infinite loops.
2019-12-17 15:22:29 +01:00
Sybren A. Stüvel
3a5562151f Cleanup: Animation: mark function parameter as const
`fcurve_path_rename(..., rna_path, ...)` doesn't change `rna_path` at all,
so it can be marked as `const char *`.

No functional changes.
2019-12-17 15:22:29 +01:00
mano-wii
84c1e57dfe Fix T72507: Depth of bones missing for navigation
Regression introduced in rBb11272a0
2019-12-17 10:34:49 -03:00
Sebastián Barschkis
bda4a284d2 Fluid: Fix particle settings type 2019-12-17 11:39:23 +01:00
Campbell Barton
7d2d2ffa76 Cleanup: spelling 2019-12-17 16:30:39 +11:00
Campbell Barton
8ebc6be43d Cleanup: de-duplicate tool gizmo 2019-12-17 16:30:39 +11:00
Campbell Barton
aa1af7f8e4 Fix T72416: Tool settings ignored when activated from gizmo 2019-12-17 14:55:41 +11:00
Campbell Barton
2564e2a2ad Cleanup: RNA naming
- Use abbreviations min/max
  this is used throughout the existing API.
- Rename use_adaptive_stepping to use_adaptive_timesteps
  since this is used with timesteps_min/max it's clearer
  to use matching terms.
2019-12-17 14:49:11 +11:00
Campbell Barton
de8a19077e Cleanup: rename effec -> effector
Effector is already used elsewhere for this purpose.
2019-12-17 14:06:47 +11:00
Campbell Barton
ca277d7d60 Cleanup: renaming guiding -> guide
The term guide makes sense on it's own in this context.
2019-12-17 14:00:19 +11:00
Campbell Barton
79e51d9e5f Cleanup: replace verbose checks with read-only attributes
These attributes checked for any baked / baking
since this is a common test that was performed in layout code.

Also follow our naming convention - using an 'is_/has_' prefix
in this case since "cache_baked_data" reads as if it's used to access
the baked data.
2019-12-17 13:03:52 +11:00
Campbell Barton
db043e7e5b Cleanup: naming for BKE_fluid particle functions
Create/Destroy are more commonly paired terms in BLI/BKE API's.
2019-12-17 12:17:57 +11:00
Campbell Barton
f7745b15b7 Cleanup: use uint 2019-12-17 12:14:52 +11:00
Campbell Barton
d61d68a310 Cleanup: remove redundant string initialization
Fixed sized strings are always initialized & this is not done
elsewhere before calling BLI_path_join.

Remove since it's not needed and makes it read as if the function
might not initialize the output argument.
2019-12-17 12:11:28 +11:00
Campbell Barton
814a11be59 Cleanup: use snake case variable & function names 2019-12-17 12:04:57 +11:00
Campbell Barton
23940ff1e1 Cleanup: conform header guards to Blender's style 2019-12-17 11:42:19 +11:00
Campbell Barton
7f00b3a711 Cleanup: split smoke drawing out into it's own file
gpu_draw.c had generic sounding utility functions which were specific
to smoke drawing.

Split into it's own file so the functionality is clearly separated.
2019-12-17 11:35:26 +11:00
Campbell Barton
1ef6be3686 Cleanup: redundant struct declarations 2019-12-17 10:15:22 +11:00
Campbell Barton
f4d7d5e75d Cleanup: sort struct declarations 2019-12-17 10:08:47 +11:00
Campbell Barton
bc92d05522 Cleanup: sort file lists 2019-12-17 10:07:44 +11:00
Campbell Barton
9c82eac2c8 Cleanup: use BKE_fluid prefix for fluid API 2019-12-17 10:00:45 +11:00
Campbell Barton
5d1245cca9 PyAPI: disable threading hack when fluid is disabled 2019-12-17 09:55:25 +11:00
Campbell Barton
7e15638cce Cleanup: style, always use braces 2019-12-17 09:53:25 +11:00