Move all header file into namespace.
Unnecessary namespaces was removed from implementations file.
Part of forward declarations in header was moved in the top part
of file just to do not have a lot of separate namespaces.
Pull Request: https://projects.blender.org/blender/blender/pulls/121637
Based on the design in #120230.
* Replaces the `Shade Smooth by Angle` operator with `Shade Auto Smooth`
in the object context menu menu.
* The new operator automatically adds and removes the modifier instead
of being a destructive operation.
* The `Shade Smooth` and `Shade Flat` operators now remove the
`Smooth by Angle` modifier automatically.
* Add a pin option to modifiers, which limits dragging and keeps the
modifier after newly added modifiers in the list.
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/121494
This is part of #121565.
Renames the `insert_blank_frame` function to `insert_frame`.
Instead of returning a boolean for if the keyframe was created,
return a pointer to the drawing. This aligns more with how
we're using this API. After inserting a keyframe, it's common
to then e.g. write to the newly created drawing.
Also use sensible default parameter values for the duration
(default = implicit hold) and the keyframe type
(dafault = `BEZT_KEYTYPE_KEYFRAME`).
With this change, we're moving closer to the goal of
only allowing to create drawings by creating keyframes.
Material index of faces could be a invalid value after booleaning in
exact boolean in "Index Based" mode against objects with no material
slots, this is caused by the lack of initilization material remapping
array. Now all initilized to 0.
Assigning 0 explicitly in Fast mode as well for consistency.
Pull Request: https://projects.blender.org/blender/blender/pulls/121380
This is because sse2neon.h might be used to emulate SSE intrinsics
on ARM64 architecture, and it uses some preprocessor which is not
available for C language when using MSVC.
The old-style math file math_matrix.c uses this header, so needed
to become C++. Simple rename did not work since there is a new math
utility math_matrix.cc exists. Following some existing convention
the math_matrix.c is renamed to math_matrix_c.cc. Eventually all the
code should switch to use C++ style math, and the C style removed,
so it seems reasonable to not mix old and new style of API in the
same file.
There should be no functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/121335
This makes the read and write API functions match more closely, and adds
asserts to check that the data size is as expected.
There are still a few places remaining that use BLO_read_data_address
and similar generic functions, these should eventually be replaced as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/120994
Move most code to `blender::bke::subdiv`. That helps organization
and makes using C++ in subdiv code easier, which will be useful for
removing the unnecessary opensubdiv C-API wrapper.
The recently added `modify_geometry_set` code path [1] inside the Mesh
Sequence Cache was meant to follow what was done inside `modify_mesh`
but failed to use the correct data type for the time offset. Double is
used throughout Blender when dealing with the frame time and this was
simply missed.
This results in rounding errors and downstream consumers like USD would
re-read the wrong frames. e.g. it would read frame 4 twice because the
values provided when switching from frame 4 to frame 5 were
`4.000000119209290` and `4.999999880790710` instead of
`4.000000000000000` and `5.000000000000000` with this patch.
[1] ea256346a8
Pull Request: https://projects.blender.org/blender/blender/pulls/120790
Support holding alt while invoking modifier operations for add, apply,
remove, and move to index in the property editor. This affects all selected
editable objects instead of just the active object.
Though the alt key is not that visible, it's consistent with the
existing multi-object property editing shortcut. If/when multi-
object editing is every made the default, the alt key could
be reversed here too.
Changes as part of #120230.
Pull Request: https://projects.blender.org/blender/blender/pulls/120695
Fall back to CPU subdivision when there are split edges and the mesh
normals domain is face corners. This is required because splitting the
normals on faces adjacent to sharp edges doesn't work well with the
performance requirements of GPU subdivision.
This is related to 1111903416
Pull Request: https://projects.blender.org/blender/blender/pulls/120674
- "Log Encoding with Chroma inset and rotation": add "of primaries" in
the description of the AgX Log color space to better explain the
operation, based on wording in !106355.
- Remove a few double spaces.
- Make Line Art title case everywhere, to convey it's the system /
brand / product name and not the generic concept.
- "Copy Absolute coordinates or Normal vector" -> "of Normal Vector":
typo.
- "Makes a link between selected output in input sockets" ->
"Make...", "output and input": typo.
- "Purge Unused Data From This File" -> "from this": title case as per
HIGs.
- GPencil -> Grease Pencil: no reason to use an abbreviation here.
- "Around Current Frame" -> "Around Frame": actual name of the
onion-skinning method.
- "... (layer height for layer tool, i.e.)" -> "(i.e. the layer height
for the layer tool)": put "i.e." at the start of the sentence.
- Expand description of toe-in stereo camera option.
- "Children collections their parent-collection-specific settings" ->
"Children collections with their...": typo.
- "Generate vertex weights base on..." -> "based on" : typo, lower
case.
- Expand description of GP modifier properties, based on their mesh
counterparts.
- "AEnvelope" -> "Envelope": typo.
- "Falloff type the feather" -> "of the feather": typo.
- "usually make transition as long as effect strip": rephrase.
- "When disabled a users extensions directory is created" -> "a
user's": typo.
- "successfull" -> "successful": typo.
- "Remove all attributes... a single wildcard (*).": remove trailing
".".
- "..., use "Save Preferences."": remove trailing ".".
Some issues reported by Marina Veselkova and Tamar Mebonia.
Pull Request: https://projects.blender.org/blender/blender/pulls/120649
UV rotation in the noise modifier was a todo since UVs were not
supported yet at the time the modifier was added. This patch adds the
missing UV rotation feature.
Pull Request: https://projects.blender.org/blender/blender/pulls/120336
Fix two issues with the current label:
1. "particle tab" should be "Particles tab" since that's the actual name
of the tab.
2. "Settings are in..." is inconsistent with similar labels where the
word used is "inside" instead of "in".
Pull Request: https://projects.blender.org/blender/blender/pulls/120319
This adds two functions to the `Drawing` class: `fill_colors()`
and `fill_colors_for_write()`.
In places where the attribute API was used directly, these
functions are now used instead.
This is part of #119080. The point is that developers
shouldn't need to remember the name, type, default value,
and domain of built-in attributes (e.g. used by the renderer).
Pull Request: https://projects.blender.org/blender/blender/pulls/120296
Because normals are calcualted lazily for all cases "depends_on_normals"
except for BMesh original normals, this is mostly unnecessary. It's actually
probably not necessary at all, because in practice there is always a separate
positions array stored in `EditMeshData` during mesh edit mode modifier
evaluation, bringing us back to the lazy calculation. But anyway, removing
the usage for topology-changing modifiers and modifiers which don't
accept BMesh as input anyway simplifies things.
Pull Request: https://projects.blender.org/blender/blender/pulls/120274
The GPv3 tint modifier will give incorrect result in fill tint due to
two reasons: 1) The material index being wrong; 2) The default value
for `fill_color` attribute needs to be explicitly assigned as
`ColorGeometry4f(float4(0.0f))` to ensure correct color mixing and
switching between fill/material color in the tint modifier.
Pull Request: https://projects.blender.org/blender/blender/pulls/120249
The simplify modifier uses
`bke::curves_copy_point_selection` but didn't
build the `points_to_keep` index mask correctly.
This fixes the indices in the index mask and also
optimizes the edge cases of removing all the points/
keeping all the points.
Move the public functions from the editors/object (`ED_object.hh`)
header to the `blender::ed::object` namespace, and move all of the
implementation files to the namespace too. This provides better code
completion, makes it easier to use other C++ code, removes unnecessary
redundancy and verbosity from local uses of public functions, and more
cleanly separates different modules.
See the diff in `ED_object.hh` for the main renaming changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/119947
There are still a few places that are more complicated where the replacement
to `IDP_New` isn't obvious, but this commit replaces most uses of the ugly
`IDPropertyTemplate` usage.