Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-15Cleanup: clang-formatCampbell Barton
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-07-13Cleanup: replace BKE_customdata.h in BKE_editmesh.hCampbell Barton
Only DNA_customdata_types.h is needed for BMEditMesh.
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-06GPencil: Rename BKE_gpencil_visible_stroke_iterAntonio Vazquez
Renamed to BKE_gpencil_visible_stroke_advanced_iter Also created a simple version of the iterator to be used without multiframe and onion skin.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-18Armature: add automatic B-Bone Scale toggles.Alexander Gavrilov
Currently B-Bone scaling can only be controlled via their properties, thus requiring up to 8 drivers per joint between B-Bones to transfer scaling factors from the handle bone. A Scale Easing option is added to multiply the easing value by the Y scale channels to synchronize them - this produces a natural scaling effect where both the shape of the curve and the scale is affected. In addition, four toggles are added for each handle, which multiply each of the X, Y, Z and Ease values by the matching Local Scale channel of the handle bone, thus replacing trivial drivers. The Scale Easing option has no effect on this process since it's easy to just enable both Length and Ease buttons. Differential Revision: https://developer.blender.org/D9870
2021-06-18Armature: add B-Bone Y scale channel and extra flag fields to DNA.Alexander Gavrilov
In addition to the base bone transformation itself, B-Bones have controls that affect transformation of its segments. For rotation the features are quite complete, allowing to both reorient the Bezier handles via properties, and to control them using custom handle bones. However for scaling there are two deficiencies. First, there are only X and Y scale factors (actually X and Z), while lengthwise all segments have the same scaling. The ease option merely affects the shape of the curve, and does not cause actual scaling. Second, scaling can only be controlled via properties, thus requiring up to 6 drivers per joint between B-Bones to transfer scaling factors from the handle bone. This is very inefficient. Finally, the Z channels are confusingly called Y. This commit adds a B-Bone Y Scale channel and extra B-Bone flag fields to DNA with appropriate versioning (including for F-Curves and drivers) in preparation to addressing these limitations. Functionality is not changed, so the new fields are not used until the following commits. Differential Revision: https://developer.blender.org/D9870
2021-06-13Cleanup: redundant initializationCampbell Barton
These were limited to obvious cases. Some less obvious cases were kept as refactoring might make them necessary in future.
2021-06-11Overlays: Make flash on mode transfer an operator propertyPablo Dobarro
This moves the flash on mode transfer effect option from the overlays to an operator property of the mode transfer operator. - This effect is intended to show the target object when no overlays or a minimal set of overlays is enabled. Making it part of the whole set of overlays invalidates this use case. - The effect is not intended to be configurable per viewport, it should be a global option. The effect is still implemented using the overlay engine (instead of a draw modal callback) due to performance and drawing artifacts. Having it implemented as an overlay with runtime timer data in the objects makes also possible to run multiple animations at the same time without any visual glitches. Reviewed By: campbellbarton, JulienKaspar Differential Revision: https://developer.blender.org/D11519
2021-06-03Overlay: Flash on Mode Transfer overlayPablo Dobarro
This implements T87633 This overlay renders a flash animation on the target object when transfering the mode to it using the mode transfer operator. This provides visual feedback when switching between objects without extra overlays that affect the general color and lighting in the scene. Differences with the design task: - This uses just a fade out animation instead of a fade in/out animation. The code is ready for fade in/out, but as the rest of the overlays (face sets, masks...) change instantly without animation, having a fade in/out effect gives the impression that the object flashes twice (once for the face sets, twice for the peak alpha of the flash animation). - The rendering uses a flat color without fresnel for now, but this can be improved in the future to make it look more like the shader in the prototype. - Not enabled by default (can be enabled in the overlays panel), maybe the defaults can change for 3.0 to disable fade inactive and enable this instead. Reviewed By: jbakker, JulienKaspar Differential Revision: https://developer.blender.org/D11055
2021-06-02Cleanup: spelling in commentsCampbell Barton
2021-05-27Fix incorrect BLI_snprintf usageCampbell Barton
Event though in practice this wasn't causing problems as the fixed size buffers are generally large enough not to truncate text. Using the result from `snprint` or `BLI_snprintf` to step over a fixed size buffer allows for buffer overruns as the returned value is the size needed to copy the entire string, not the number of bytes copied. Building strings using this convention with multiple calls: ofs += BLI_snprintf(str + ofs, str_len_max - ofs); .. caused the size argument to become negative, wrapping it to a large value when cast to the unsigned argument.
2021-05-19Materials: support changing materials during evaluationJacques Lucke
This commit allows that the evaluated geometry of an object has different materials from the original geometry. This is needed for geometry nodes. The main thing that changes for render engines and exporters is that the number of material slots on an object and its geometry might not match anymore. For original data, the slot counts are still equal, but not for evaluated data. Accessing material slots though rna stays the same. The behavior adapts automatically depending on whether the object is evaluated. When accessing materials of an object through `BKE_object_material_*` one has to use a new api for evaluated objects: `BKE_object_material_get_eval` and `BKE_object_material_count_eval`. In the future, the different behavior might be hidden behind a more general C api, but that would require quite a few more changes. The ground truth for the number of materials is the number of materials on the geometry now. This is important in the current design, because Eevee needs to know the number of materials just based on the mesh in `mesh_render_mat_len_get` and similar places. In a few places I had to add a special case for mesh edit mode to get it to work properly. This is unfortunate, but I don't see a way around that for now. Differential Revision: https://developer.blender.org/D11236
2021-05-13Cleanup: clang formatCampbell Barton
2021-05-12Fix custom bone shape scale affecting normal bone displaySebastian Parborg
Also some clang-format changes.
2021-05-11Rigging: Add transform for custom bone shapesYuki Shirakawa
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-11Fix T82155: Fade inactive geometry overlay not working with instanced geometryPablo Dobarro
This enables the overlay for instanced geometry. After this change, objects that are an instance of the current active object (which are also being modified in the current active mode) won't fade, which is different from the previous behavior. Reviewed By: fclem Maniphest Tasks: T82155 Differential Revision: https://developer.blender.org/D9362
2021-04-08Cleanup:Germano Cavalcante
2021-04-08Fix previous commit: wrong `is_mesh_verts_only` checkGermano Cavalcante
2021-04-08Fix T86762: Inconsistent show of result of modifier Screw in edit modeGermano Cavalcante
To check if an "is_mesh_verts_only" mesh, the overlay engine checks if the mesh has no "totedge" and has "totvert". However, sometimes this engine can check the wrong mesh since editmesh works on `embm->mesh_eval_final`. Reviewed By: fclem Differential Revision: https://developer.blender.org/D10917
2021-04-08Fix T81707: Spline IK Joints "Floating" above curveSebastian Parborg
The issue was that where_on_path uses a resampled curve to get the data from the curve. This leads to disconnects between the curve the user sees and the evaluated location data. To fix this we simply use the actual curve data the user can see. The older code needed a cleanup either way as there were hacks in other parts of the code trying to work around some brokenness. This is now fixed and we no longer need to clamp the evaluation range to 0-1 or make helper functions to make it do what we actually want. Reviewed By: Campbell, Sybren Differential Revision: http://developer.blender.org/D10898
2021-03-30Armature: Add Display Axis OffsetScott Wilson
Display the bone axes at the head (root) of the bone by default, instead of the tail (tip), and add a slider so that it's possible to adjust this position. Versioning code is in place to ensure existing files behave the same (axes shown at tail), whereas new Armatures will be using the new default (axes shown at head). Reviewed By: #animation_rigging, #user_interface, Severin, Sybren Differential Revision: https://developer.blender.org/D7685
2021-03-18Cleanup: spellingCampbell Barton
2021-03-15Fix T86542: Crash going to UV editing workspace with an instancer thatPhilipp Oeser
is hidden from the viewport Check visibilty (as done in workbench_cache_populate) in overlay_edit_uv_cache_populate as well. Maniphest Tasks: T86542 Differential Revision: https://developer.blender.org/D10724
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-02-18GPencil: Add missing edit lines in Multiframe modeAntonio Vazquez
When edit using Onion skin, the edit line was missing.
2021-02-15Merge branch 'blender-v2.92-release'Falk David
2021-02-15Fix T85499: Crash on switching to edit mode with uv editor openFalk David
A fix for T83187 (rBf83aa830) assumed in the overlay code of the uv editor that the object was a mesh when it did not have to be - causing a crash. The fix makes sure that the object is a mesh. Reviewed By: jbakker, campbellbarton Maniphest Tasks: T85499, T85495 Differential Revision: https://developer.blender.org/D10369
2021-02-14Cleanup: spellingCampbell Barton
2021-02-14Cleanup: spellingCampbell Barton
2021-02-14Cleanup: Source Code Typosluzpaz
Corrects approximately 36 spelling errors in source variable names. Differential Revision: https://developer.blender.org/D10347 Reviewed by Hans Goudey
2021-02-13Cleanup: macro hygiene, use parenthesis around operatorsCampbell Barton
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-02-06Cleanup: compare with zero for flag checksCampbell Barton
This is done almost everywhere already, use this more straightforward convention.
2021-02-05Merge branch 'blender-v2.92-release'Philipp Oeser
2021-02-05Fix T85396: Display Texture Paint UV only working in editmodePhilipp Oeser
Caused by rBf83aa830cd00. Since above commit, only meshes in editmode were considered for drawing (because BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs was used), but the option needs to work for texture paint mode as well, so use BKE_view_layer_array_from_objects_in_mode_unique_data instead on pass the draw_ctx->object_mode. note: there is no good filter_fn to check if we have UVs if mesh is not in editmode, this shouldnt cause much of a performance hit though. Maniphest Tasks: T85396 Differential Revision: https://developer.blender.org/D10319
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-02-02Merge branch 'blender-v2.92-release'Philipp Oeser
2021-02-02Fix T85301: Eevee does not respect collection instance offset for hairPhilipp Oeser
This resulted in hair drawing with an offset if an instance_offset was set. note: Usually the instance_offset gets combined with the objects obmat in 'make_duplis_collection' / 'make_dupli', see > /* Combine collection offset and `obmat`. */ Using the resulting DupliObject->mat instead does include the instance_offset, but this results in double-transforms (something that I have not investigated further), so now reconstruct the correct matrix from scratch. Maniphest Tasks: T85301 Differential Revision: https://developer.blender.org/D10285
2021-02-01Merge branch 'blender-v2.92-release'Clément Foucault
2021-02-01Fix T81843 Bones invisible using Weight Paint + Wireframe shading + Bone X-RayClément Foucault
This was caused by the paint overlay drawing after the infront pass. Moving the paint overlay before it fixes the issue. We might even do that for more mode overlays.
2021-02-01Overlay: Fix Z axis planes rendered even if not neededClément Foucault
This remove some drawn completely transparent pixels.
2021-01-29Merge branch 'blender-v2.92-release'Campbell Barton
2021-01-29Fix T85178: edit-mesh show_edges overlay option toggles face-dotsCampbell Barton
When this behavior was added it made sense, since then show_edges has changed to make edge-display more subtle (see 1a4b60c30db319b71bdc2e2fed2612c873fa8757) instead of removing edge-selection display entirely.
2021-01-27Merge branch 'blender-v2.92-release'Philipp Oeser