Commit Graph

14270 Commits

Author SHA1 Message Date
Jacques Lucke
f41a753e75 Geometry Nodes: new Material Assign node
This adds a new Material Assign node. It can be used to change the
material used by an existing mesh or to assign a material to a mesh
that has been generated from scratch.

Differential Revision: https://developer.blender.org/D11155
2021-05-20 12:22:13 +02:00
Jeroen Bakker
0fa4286ade Blender LTS: match download urls with latest changes in buildbot. 2021-05-19 16:39:22 +02:00
Campbell Barton
4402c3006b WM: check missing space-data & constraints in poll functions
Without this, menu search prints many errors in some contexts.
2021-05-18 20:57:40 +10:00
Campbell Barton
1f9eb7e2c6 Merge branch 'blender-v2.93-release' 2021-05-18 19:59:20 +10:00
Campbell Barton
aa06be9148 Fix error calling select-camera without a 3D view 2021-05-18 19:58:11 +10:00
Campbell Barton
1c1fa15ce1 Merge branch 'blender-v2.93-release' 2021-05-18 17:48:14 +10:00
Campbell Barton
b236653f8a Fix error in grease pencil flip color operator
- Used try/except instead of a poll function.
- The error case referenced a non-existent error handling module.

Prefer poll functions over exception handling where possible,
also having an operators logic in a try block isn't good practice
as it can hide more serious errors in the code.

Note that duplicate pencil settings access should be moved into a
utility function. This can be part of a separate cleanup.
2021-05-18 17:38:54 +10:00
Pablo Dobarro
73080ddf38 Add comment regarding Fade Inactive Geometry property in overlays popover
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D11249
2021-05-18 00:51:35 +02:00
Scurest
1a4e7b16b2 Collada import: respect zero-specularity
Collada shaders with black <specular> should import with Specular=0.
(A missing <specular> is the same as black.)

The general specular conversion is hard, but this case is common and easy.
Fixes the specular for all <constant>/<lambert> shaders, and <blinn>/<phong>
shaders with black/omitted <specular>. Before this they all looked too "shiny".

Reviewed By: gaiaclary

Differential Revision: https://developer.blender.org/D10939
2021-05-17 19:56:01 +02:00
Philipp Oeser
3458d09a74 Merge branch 'blender-v2.93-release' 2021-05-15 02:06:02 +02:00
Philipp Oeser
baf7f78f9f Fix T87715: Eevee: Holdout options not available in Outliner Collection context menu
Collection holdouts are now supported by eevee.

Maniphest Tasks: T87715

Differential Revision: https://developer.blender.org/D11233
2021-05-15 01:55:30 +02:00
Antonio Vazquez
f6cb9433d4 GPencil: Refactor Append operators
Now the operators work like other areas of Blender using the list of selected objects.

Also, the name has been changed to:

```Layers:
- Copy Layer to Selected
- Copy All Layers to Selected

Materials:
- Copy Material to Selected
- Copy All Materials to Selected```

Reviewed By: mendio, pablovazquez, pepeland

Differential Revision: https://developer.blender.org/D11216
2021-05-14 18:02:04 +02:00
Germano Cavalcante
b11499939c Python GPU: Replace part of the code that uses 'bgl' with 'gpu'
This is part of the process described in T80730.

The aim is to deprecate the bgl module.

Reviewed By: fclem, brecht, campbellbarton

Revision: D11147
2021-05-14 12:26:40 -03:00
Campbell Barton
265d97556a PyAPI: use iterators for ID property methods (keys, values & items)
- Matches changes in Python 3.x dictionary methods.

- Iterating now raises a run-time error if the property-group changes
  size during iteration.

- IDPropertyGroup.iteritems() has been removed.

- IDPropertyGroup View & Iterator types have been added.

- Some set functionality from dict_keys/values/items aren't yet
  supported (isdisjoint method and boolean set style operations).

Proposed as part of T85675.
2021-05-15 00:36:49 +10:00
Scurest
2953732fc5 Collada import: connect Emission texture to Emission socket
An emission texture is currently connected to the Base Color socket. It should connect to the Emission socket, like a constant does.

Reviewed By: gaiaclary

Differential Revision: https://developer.blender.org/D10990
2021-05-13 23:43:37 +02:00
Aaron Carlisle
f1ecbf26b7 UI: Use term 'Preferences' instead of 'User Prefs'
'Preferences' is the term used elsewhere in Blender so this commit makes 
the option more consistent.

In the future, the "default" target could be changed to something more 
descriptive.
2021-05-12 21:10:17 -04:00
Aaron Carlisle
a5d2c19a5c PyAPI Docs: Cleanup Formatting 2021-05-12 21:10:17 -04:00
Campbell Barton
8dc95f61f3 Merge branch 'blender-v2.93-release' 2021-05-12 22:20:51 +10:00
Campbell Barton
79b7c46eec Fix: IC keymap V-key view pie doesn't work in Weight Paint mode
Remove the V key for switching to vertex mode in Weight Paint mode
as it caused a key-conflict.

Ref D11192
2021-05-12 22:19:47 +10:00
Campbell Barton
aaa07a3a8f PyAPI: remove deprecated 'wiki_url' for add-ons 'bl_info'
This was only kept for compatibility with older add-ons and has been
deprecated since 2.83.

Ref T85675
2021-05-12 22:02:12 +10:00
Jeroen Bakker
3836d10faf Builder: updated download urls with upcoming naming scheme. 2021-05-12 13:17:06 +02:00
Charlie Jolly
93933ee8bb Geometry Nodes: Add Attribute Vector Rotate node
Port vector rotate node to geo attributes.

Request by @simonthommes

Reviewed By: simonthommes, HooglyBoogly
2021-05-11 11:15:06 +01:00
Yuki Shirakawa
fc5bf09fd8 Rigging: Add transform for custom bone shapes
Add translation/rotation/scale parameters for custom bones shapes. The
new scale is a 3D vector `custom_shape_scale_xyz`, and replaces the
`custom_shape_scale` float.

Reviewed By: #animation_rigging, sybren, zeddb

Differential Revision: https://developer.blender.org/D10974
2021-05-11 11:31:58 +02:00
Antonio Vazquez
c3de3c2749 GPencil: Rename prop dilate_pixels to dilate
Better avoid units in name.
2021-05-10 16:26:50 +02:00
Pratik Borhade
1b0890ccda Fix T54339: Shapekey Max value doesn't clamp existing value
Update the "current value" of the Shape Key blend amount when value is
not within the min/max range. New function `rna_ShapeKey_update_minmax`
used to update and clamp the current value.

Reviewed By: mano-wii, lichtwerk, #animation_rigging, sybren

Maniphest Tasks: T54339

Differential Revision: https://developer.blender.org/D11071
2021-05-10 15:53:37 +02:00
Alexander Gavrilov
bc868f7b52 Merge branch 'blender-v2.93-release' 2021-05-10 14:16:38 +03:00
Alexander Gavrilov
caf92a647f Animation: move Cycle-Aware Keying to the Keying popover.
The Cycle-Aware Keying option was added in 2.8 and is used
to allow keyframing over cyclic F-Curves without disturbing
the cycle (e.g. overwriting an end keyframe updates both ends).

This effect is not limited to auto keyframing and is applied
to any key insertion, but when the popovers were rearranged
it was put in the Auto-Keyframing related one for some reason.

This is misleading, especially since because of that the
option is incorrectly greyed out when auto keyframing is
disabled, so move it to the generic Keyframing popover.

Differential Revision: https://developer.blender.org/D11213
2021-05-10 14:16:16 +03:00
Hans Goudey
3185084efb Geometry Noes: Curve Resample Node
This node generates a naturally parametarized (even length edge) poly
spline version of every spline in the input. There are two modes,
"Count", and "Length". These are similar to the same options for the
line primitive node in end points mode.

I implemented this instead of a "Sample Points" node, because for this
operation it's trivial to keep the result as a curve, which is nice
since it increases flexibility, and because it can make instancing
simpler, i.e. using the transforms of each evaluated point rather than
requiring the construction of a "rotation" attribute.

Differential Revision: https://developer.blender.org/D11173
2021-05-07 15:37:06 -05:00
Antonio Vazquez
960535ddf3 GPencil: New Append operators
Now it's possible to append materials of one grease pencil object into another one. The operator allows active material or all materials.

Also, the Layer Copy To Object has been renamed to Layer Append to Object to keep consistency and now allows to append all layers at once.
2021-05-07 18:27:58 +02:00
Charlie Jolly
7d90b0ab11 Geometry Nodes: Parallelize Attribute Curve Map node
This adds `parallel_for` to the Attribute Curve Map node to improve performance.
Grain size set to 512.

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D11194
2021-05-07 15:27:15 +01:00
Antonio Vazquez
c58bf31aed GPencil: Add Bracket keymaps to increase/decrease brush size
This add the missing keymaps.

Requested by Jukien Kaspar.

Differential Revision: https://developer.blender.org/D11183
2021-05-07 15:30:57 +02:00
Charlie Jolly
ba06bc16ae Geometry Nodes: Add Attribute Curve Map Node
This node has the same functionality as the color and vector curve
mapping nodes in the shader editor. Here is works on every value for
the selected attribute, and it can also output a float value. Other
than that, the implementation is quite straightforward-- almost
completely boilerplate code.

Differential Revision: https://developer.blender.org/D10921
2021-05-06 23:47:51 -05:00
Campbell Barton
026a9cdc21 Cleanup: move UV element keymap items into a loop
Also add explanation for non-obvious dummy key-map item.
2021-05-07 13:36:29 +10:00
Aaron Carlisle
72cefdfd59 Update RNA to User Manual mapping 2021-05-06 17:23:39 -04:00
Pablo Dobarro
51b8032c70 Merge branch 'blender-v2.93-release' 2021-05-06 19:23:34 +02:00
Pablo Dobarro
ee0ec0f2af Fix T83398: Fade inactive geometry overlay option not visible depending on the mode
This option should always be available. Even if it does not affect the
current object depending on its mode, it affects the rest of the geometry
of the scene.

The rest of the options also work this way. For example, a grease pencil
object does not have face orientation, but the ovelay option is still
there for the rest of the scene.

Reviewed By: JulienKaspar, HooglyBoogly

Maniphest Tasks: T83398

Differential Revision: https://developer.blender.org/D10215
2021-05-06 19:16:40 +02:00
Campbell Barton
c17792a709 Merge branch 'blender-v2.93-release' 2021-05-06 11:35:10 +10:00
Campbell Barton
0499dbc5c1 PlayAnim: support limiting the cache by memory instead of frames
Partial fix for T81751 which exposes multiple playback performance
issues. Previously the cache was limited to 30 frames, without a way to
increase the cache for smooth playback with files that are slow to load.

Now the animation plays back smoothly once loaded into cache.

The cache limit from the system preference is used
when the player is launched from Blender.

A new player argument `-c <cache_limit>` was added to support this.
2021-05-06 11:31:44 +10:00
Severin
6c8c30d865 Fix T82002: ENTER does nothing when mouse cursor is over save dialog text field
The `file.execute` operator would early-exit because the mouse wasn't hovering
the file list. Caused by 4ba9d7d71e8f.

Although simpler solutions would have been possible, I decided it's better to
split add a new operator for executing based on the mouse (for double-clicking
files), to separate that from the window level execute operator
(`file.execute`). This allows more control and we can get rid of the implicit
assumption that the keymap would call `file.select` on mouse-press, and
`file.execute` on double-click, for the double-click behavior to work. The cost
is that we execute the file selection & activation logic twice on the
double-click, but that shouldn't be an issue at all.
Also removes the `need_active` property from the `file.execute` operator.
That's ancient and wasn't implemented well anyway.

To be clear, reason this fixes the bug is that `file.execute` works entirely
with the `execute()` callback now and doesn't early-exit based on the mouse
position anymore.

Might trigger warnings about the `need_active` property not being found for
custom keymaps. These can be ignored and the property can safely be removed
from the keymap. I don't expect other keymap breakages.
2021-05-05 20:53:06 +02:00
Ankit Meel
08f4bab658 System info: add OS version to sys_info.py
Match the output to the prefilled bug report script's output.
Make the output file self-contained.

Reviewed By: lichtwerk
Differential Revision: https://developer.blender.org/D11144
2021-05-05 10:08:04 +05:30
Antonio Vazquez
f8f6e0b256 GPencil: New Dilate parameter for Fill brush
Internally, when using Fill brush a dilate of the filled area was done, but this was hardcoded to 1 pixel.

In some situations, this was not enough, so now the value is accesible in the UI and can be set with different values.

Also, as this value is more used than `Leak Size`, the new Dilate is on Topbar, and Leak Size has been moved to Advanced panel.
2021-05-04 16:46:33 +02:00
Dalai Felinto
191664acd2 Docs: "File > External Data pack operator" lookup for the manual 2021-05-04 16:20:56 +02:00
Dalai Felinto
ee51e73355 "File > External Data" menu improvements and cleanup
All changes:
* Include `file.pack_libraries` and `file.unpack_libraries` to the menu
[1].
* Rename "Pack Blender Libraries" → "Pack Linked Libraries" [2].
* Rename "Unpack Blender Libraries" → "Unpack Linked Libraries" [2].
* Rename "Pack All Into .blend" → "Pack Resources" [3]
* Rename "Unpack All Into Files" → "Unpack Resources" [3]
* Rename "☑ Automatically Pack Into .blend" → "☑  Automatically Pack
Resources" [3]
* Rename "Make All Paths Relative" → "Make Paths Relative" [4]
* Rename "Make All Paths Absolute" → "Make Paths Absolute" [4]
* Add separators accordingly

---

[1] - This was never exposed since its original commit rB16411da41e40.
Now that operator not listed in menus don't
show up in the search, this became even more hidden.

[2] - The original name (Pack Blender Library) was not clear enough.
Pose Libraries and Asset Libraries are also technically Blender
libraries.

[3] - The term All was misleading since it didn't include the Linked
Libraries.

[4] - No need to use "All". It is not used in the Report/Find Missing
Files either.

This commit put this in the File > External Data menu.

Differential Revision: https://developer.blender.org/D11109
2021-05-04 16:20:56 +02:00
Hans Goudey
8216b759e9 Geometry Nodes: Initial basic curve data support
This patch adds initial curve support to geometry nodes. Currently
there is only one node available, the "Curve to Mesh" node, T87428.

However, the aim of the changes here is larger than just supporting
curve data in nodes-- it also uses the opportunity to add better spline
data structures, intended to replace the existing curve evaluation code.
The curve code in Blender is quite old, and it's generally regarded as
some of the messiest, hardest-to-understand code as well. The classes
in `BKE_spline.hh` aim to be faster, more extensible, and much more
easily understandable. Further explanation can be found in comments in
that file.

Initial builtin spline attributes are supported-- reading and writing
from the `cyclic` and `resolution` attributes works with any of the
attribute nodes. Also, only Z-up normal calculation is implemented
at the moment, and tilts do not apply yet.

**Limitations**
 - For now, you must bring curves into the node tree with an "Object
   Info" node. Changes to the curve modifier stack will come later.
 - Converting to a mesh is necessary to visualize the curve data.

Further progress can be tracked in: T87245
Higher level design document: https://wiki.blender.org/wiki/Modules/Physics_Nodes/Projects/EverythingNodes/CurveNodes

Differential Revision: https://developer.blender.org/D11091
2021-05-03 12:29:17 -05:00
Philipp Oeser
73a76608c8 Merge branch 'blender-v2.93-release' 2021-05-03 16:57:34 +02:00
Philipp Oeser
29e5504331 Fix T87926: Transform menu has operators guaranteed to not pass poll in certain modes
Reported for ops.transform.vertex_warp and ops.transform.vertex_random.
Polling will check with ED_transverts_check_obedit, if we know it will
fail e.g. for pose mode, we can do the same check in the UI already.

Maniphest Tasks: T87926

Differential Revision: https://developer.blender.org/D11128
2021-05-03 16:49:08 +02:00
Alexander Gavrilov
2b46606af1 Merge branch 'blender-v2.93-release' 2021-05-03 14:03:00 +03:00
Bastien Montagne
a53d34a28a Minor updates to i18n spellcheck tool. 2021-05-03 12:22:46 +02:00
Germano Cavalcante
6fff2427d6 Python GPU: Replace a few calls of the bgl module with gpu
Concludes these files:
[x]bpy_types.py
[x]operator_modal_draw.py

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D11129
2021-05-01 12:12:58 -03:00
Germano Cavalcante
c3a980436d Documentation: Replace the bgl API in the gpu module exemples 2021-04-30 10:50:50 -03:00