Age | Commit message (Collapse) | Author |
|
When changing the frame_number of a grease pencil frame, the grease
pencil object is not updated correctly. The frame stays where it
previously was.
The fix adds a `property_update` callback to the `frame_number` RNA
property.
Maniphest Tasks: T99524
Reviewed By: antoniov
Differential Revision: https://developer.blender.org/D15394
|
|
This commit makes PointerRNA passed to RNA path API const.
Main change was in the `path` callback for RNA structs, and indirectly
the `getlength` callback of properties.
|
|
|
|
The problem was when the stroke had less weights that the total number of vertex groups.
The API checked the total number of groups, but this is not required because `BKE_defvert_find_index` returns NULL is the vertex group index does not exist.
|
|
As the channel was not found, the relation data was not updated.
Now, if the bone is removed, the relation is set.
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
|
|
This implements the update cache described in T95401.
The cache is currently only used for drawing strokes and
sculpting (using the push brush).
**Note: Making use of the cache throughout grease pencil will
have to be done incrementally in other patches. **
The update cache stores what elements have changed in the
original data-block since the last time the eval object
was updated. Additionally, the update cache can store multiple
updates to the data and minimizes the number of elements
that need to be copied.
Elements can be tagged using `BKE_gpencil_tag_full_update` and
`BKE_gpencil_tag_light_update`. A full update means that the element
itself will be copied but also all of the content inside. E.g. when a
layer is tagged for a full update, the layer, all the frames inside the
layer and all the strokes inside the frames will be copied.
A light update means that only the properties of the element are copied
without any of the content. E.g. if a layer is tagged with a light
update, it will copy the layer name, opacity, transform, etc.
When the update cache is in use (e.g. elements have been tagged) then
the depsgraph will not trigger a copy-on-write, but an update-on-write.
This means that the update cache will be used to determine what elements
have changed and then only those elements will be copied over to the
eval object.
If the update cache is empty or the data block was tagged with a full
update, we always fall back to a copy-on-write.
Currently, the update cache is only used by the active depsgraph. This
is because we need to free the update cache after an update-on-write so
it's reset and we need to make sure it is not freed or read by other
depsgraphs.
Co-authored-by: @yann-lty
This patch was contributed by The SPA Studios.
Reviewed By: sergey, antoniov, #dependency_graph, pepeland, mendio
Maniphest Tasks: T95401
Differential Revision: https://developer.blender.org/D13984
|
|
The "Paint" mode is wrong, must be "Draw"
|
|
The API was not removing the weights, points and traingulation data. Only it was removing the stroke itself.
|
|
The API was checking the number of total weights with the first point of the stroke and this was not valid because each point can have different number of weight elemnts,
|
|
All props of annotations are not animatable by design and opacity must be equal.
As the opacity is reused by gpencil objects, a new prop has been created in order to use different props for annotations and GP objects.
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
This reverts commit f546b0800b9121b24b1292f1ec602ed9964d1848.
|
|
Also modified existing utility functions to take
care of the new surface normal interpolation and so on.
Reviewed By: Antonio Vazquez (antoniov)
Differential Revision: https://developer.blender.org/D11543
|
|
Fixes T88485
|
|
The newly added `disable_masks_viewlayer` RNA property did not conform
with the RNA naming scheme. This renames it to `use_viewlayer_masks`.
|
|
This patch adds an option in the Layers > Relations panel called "Disable Masks in Render".
When checked, no masks on this layer are included in the render.
Example:
| {F10087680} | {F10087681} |
See T88202 for why this is needed.
Reviewed By: antoniov
Maniphest Tasks: T88202
Differential Revision: https://developer.blender.org/D11234
|
|
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
|
|
Reviewed By: #grease_pencil, antoniov
Differential Revision: https://developer.blender.org/D11136
|
|
The text was not changed in the refactor and had the old text.
|
|
In Blender, we used to use the term 'draw' to refer to information
displayed to the user. For version 2.80, it was decided to change these
instances to 'display' instead. This was to avoid the ambiguity between
end-user drawing tools and display options.
From the Oxford English Dictionary:
- Draw: produce (a picture or diagram) by making lines and marks on
paper with a pencil, pen, etc.
- Display: show (data or an image) on a computer, television, or
other screen.
Therefore, we should use draw when referring to drawing tools for
making marks, but use display when referring to information
shown/displayed to the user. From a user POV, the computer displays
certain information, whereas the user draws a mark.
Apparently this change was not implemented consistently, so this patch
changes all remaining relevant instances of "draw".
Differential Revision: https://developer.blender.org/D10551
|
|
This makes the code more readable.
|
|
Following with the changes included to interpolate strokes of different number of points, a full review has been done in the interpolation tools.
* Interpolate now is a tool and not an operator. It was not logic to have this tool as a button.
* Interpolate tool parameters have been moved to topbar.
* Interpolate popover has been removed from topbar and interpolate `Sequence` operator has been moved to grease pencil menu.
* Interpolate Sequence now include a Redo panel.
* Interpolate tool now allows to select the strokes by pairs. This allows to interpolate any stroke with any stroke and not as before that it was only possible by drawing order. If no stroke is selected, the interpolation is done as before.
* Now is possible interpolate again if a previous keyframe exist. Before, it was impossible to interpolate two times in same frame and this made impossible to do the interpolation by groups of frames.
* New automatic option to `Flip strokes` if the stroke and end are not in the right position. Also the flip can be set manually for corner cases.
* Cleanup of menus related to interpolate.
* Fixed some bugs and removed parameters from scene because now all are tool or operator contained.
* Some code cleanup and function renames.
This commit also includes the some codebase to future implementation of the concept `Vertex Active` that now does not exist in grease pencil.
|
|
The old property never worked as expected because it was impossible expose the data as props.
Now, there are two methods to handle this: weight_get and weight_set
Example use:
```import bpy
ob = bpy.context.active_object
gpd = ob.data
gps = gpd.layers[0].frames[0].strokes[0]
i = 0
print("Weights\n================================")
for pt in gps.points:
gps.points.weight_set(vertex_group_index=0, point_index=i, weight=0.5)
i +=1
i = 0
for pt in gps.points:
weight = gps.points.weight_get(vertex_group_index=0, point_index=i)
print(weight)
i +=1
```
Reviewed By: brecht
Maniphest Tasks: T84967
Differential Revision: https://developer.blender.org/D10177
b3f989
|
|
In some python scripts, the coordinates of the points are manipulated, but there are no way to force the recalculation and need hack to force the refresh.
The new api allows to call to the refresh function directly.
example: `gp_stroke.points.update()`
|
|
Now it's possible to copy only part of the data. This will be used in future operators.
|
|
When using grease pencil for drawing Storyboards, it's very common to require a transform of the layers. This transform can be done using the offset modifier, but in some cases, the scene requires a lot of modifiers and makes the file hard to work.
This new feature adds a transforms Location, Rotation and Scale at Layer level, and allows to transform the layer without using a modifier, keeping the scene more clean.
{F9480695}
This feature was suggested by @pepeland after receiving feedback from several artists.
Also, done some code cleanup and rename some functions to get a better naming.
Maniphest Tasks: T83660
Differential Revision: https://developer.blender.org/D9761
|
|
Approximately 138 changes in the spelling of compound words
and proper names like "Light Probe", "Shrink/Fatten", "Face Map".
In many cases, hyphens were used where they aren't correct, like
"re-fit". Other common changes include:
- "Datablock" -> "data-block"
- "Floating point" -> "floating-point"
- "Ngons" -> "n-gons"
These changes help give the language used in the interface
a consistent, more professional feel.
Differential Revision: https://developer.blender.org/D9923
|
|
Approximately 195 changes of capitalization to conform to MLA title style.
UI labels and property names should use MLA title case, while descriptions
should be capitalized like regular prose, generally with only the start of
a sentence capitalized.
Differential Revision: https://developer.blender.org/D9922
|
|
|
|
Prepare for `BLI_str_unescape` which doesn't read well
without the separator.
|
|
Differential Revision: https://developer.blender.org/D8660
This patch is the result of the GSoC 2020 "Editing Grease Pencil Strokes
Using Curves" project. It adds a submode to greasepencil edit mode that
allows for the transformation of greasepencil strokes using bezier
curves. More information about the project can be found
here: https://wiki.blender.org/wiki/User:Filedescriptor/GSoC_2020.
|
|
Some of the naming was quite misleading.
|
|
Now by default the selection mode is All keyframes types.
Also removed the icon for All option and renamed from `All Types`to `All`.
UI review by @pablovazquez
|
|
This was changed in the refactor done in 2.83 and was not included by error.
|
|
This can be requiered for some add-ons and for some reason this prop was missing in RNA.
|
|
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves.
I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel..
Reviewed By: fclem, #user_interface, billreynish, Severin
Differential Revision: https://developer.blender.org/D7754
|
|
This can be used by some add-ons.
|
|
|
|
Maniphest Tasks: T76703
Differential Revision: https://developer.blender.org/D7715
|
|
|
|
layer renaming
The datablock was not tagged for updating.
|
|
|
|
|
|
|
|
This was forgotten by error. All Onion props must be disabled.
|
|
Make use lights and mask properties animatable.
|