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
2020-10-02Cleanup: Move `EditBone` structure definition from `ED` to `BKE` area.Bastien Montagne
Access to this structure will be needed in BKE's armature code.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-25Object: Move Switch Active Objects to experimentalPablo Dobarro
The operator has some problems with Undo, so better put it in experimental for now. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D9007
2020-09-23LibOverride: Add operator to convert a proxy object into an override.Bastien Montagne
In the end the process is surpringly simple, we only need to manually convert the proxy itself into an override (which is trivial), and then run common code with the default 'make override' operation. Fix T81059: Add operator to convert proxies to library overrides.
2020-09-23Cleanup: remove 'r_' prefix for variablesCampbell Barton
This is for return arguments, also remove redundant NULL check.
2020-09-20Fix T80945: Build modifier not updating after outliner copyNathan Craddock
Build modifiers linked or copied to objects from the outliner would not animate until the file was saved and reopened due to a missing depsgraph relations tag.
2020-09-18Cleanup: Resolve warningsJulian Eisel
Unused variables, missing include for declaration, missing 'static' specifier. Also rename function to match naming convention.
2020-09-18Unify all XYZ symmetry options using Mesh SymmetryPablo Dobarro
This adds XYZ symmetry as a property of meshes and updates all modes to use the mesh symmetry by default to have a consistent tool behavior between all modes and when switching objects. Reviewed By: brecht, mano-wii, campbellbarton Maniphest Tasks: T79785 Differential Revision: https://developer.blender.org/D8587
2020-09-18Object: Switch Object operatorPablo Dobarro
This object operator exits and frees the edit data of the current object and enters the same mode in another one in a single step, without going through object mode or keeping multiple edit object data active. It is assigned to the D key. This solves all conflicts that the right/click select keymap and the emulate 3 button mouse produces for this operation and it is independent of the state of Lock object modes. Also, as the SculptSession is freed, when using Multires objects go back to their preview resolution level, so it is possible to work on high vertex count scenes without slowing down the viewport and other performance problems. Reviewed By: #user_interface, pablovazquez Differential Revision: https://developer.blender.org/D7510
2020-09-18Cleanup: use 'UI_icon_*' prefix for icons APICampbell Barton
- UI_collection_color_icon_get -> UI_icon_color_from_collection - UI_idcode_icon_get -> UI_icon_from_idcode - UI_library_icon_get -> UI_icon_from_library - UI_mode_icon_get -> UI_icon_from_object_mode - UI_rnaptr_icon_get -> UI_icon_from_rnaptr - UI_alert_image -> UI_icon_alert_imbuf_get - UI_preview_render_size -> UI_icon_preview_to_render_size - UI_id_icon_render -> UI_icon_render_id
2020-09-17Pointclouds: support mesh <-> pointcloud in convert operatorPhilipp Oeser
Just converts verts to points and vice versa. Materials and Attribute layers are preserved (so for example if you set custom radii on the pointcloud, convert to mesh, then convert back to pointcloud, this will be preserved). Also not add a Radius layer by default (it is still added and filled when adding a pointcloud object from the menu), a global Radius property that will be used if there is no radius attribute can be added later. A Radius attribute can also be added in the pointcloud data properties (and filled via python). This will also add a new utility function that copies materials between datablocks: BKE_id_materials_copy ref T75717 Differential Revision: https://developer.blender.org/D7391
2020-09-16Action Constraint: Add manual time factor input controlChris Clyne
Adds an optional slider to the action constraint so that it can be driven without a constraint target. This is very helpful for more complex rigging and mechanical rigs, as it means the action constraint can be controlled with a driver/custom property directly, currently if we want to use a driver to control it we must add a "dummy" bone/object inbetween to act as a control. Reviewed By: Sebastian Parborg, Sybren A. Stüvel, Demeter Dzadik, Julian Eisel Differential Revision: http://developer.blender.org/D8022
2020-09-16Modifiers: Add link and copy functionsNathan Craddock
Adds functions to copy a modifier between objects, and an ED_ level function for linking modifiers between objects. This will be used in outliner modifier drag and drop. These functions support both regular and grease pencil modifiers. Differential Revision: https://developer.blender.org/D8642
2020-09-16Constraints: Add link and copy functionsNathan Craddock
Add functions to copy a single constraint between objects or between bones, and another function to link constraints. This is in preparation for constraint drag and drop in the outliner. Differential Revision: https://developer.blender.org/D8642
2020-09-16Cleanup: Move notifiers to `move_to_index` functionsNathan Craddock
Move the notifiers and DEG tagging to the ED_* level functions for modifiers and gpencil shaderfx in preparation for outliner modifier and shaderfx drag and drop. No functional changes. Differential Revision: https://developer.blender.org/D8642
2020-09-16Cleanup: Extract editor function from constraint_move_to_index_execNathan Craddock
No functional changes. Move the constraint reordering logic into an ED_ level function to be used by outliner constraint drag and drop. Differential Revision: https://developer.blender.org/D8642
2020-09-16GPencil: Add link and copy functions for shaderfxNathan Craddock
Adds two functions: one to copy a shaderfx between two gpencil objects, and another to link all shaderfx between two gpencil objects. Added in preparation for outliner shaderfx drag and drop. Differential Revision: https://developer.blender.org/D8642
2020-09-15UI: Show color tagged collection icons in menusNathan Craddock
Draw color tagged collection icons in the link to collection, add collection instance, collection instance search, and remove collection menus. Manifest Task: https://developer.blender.org/T77777 Differential Revision: https://developer.blender.org/D8622
2020-09-15Cleanup: use doxy sectionsCampbell Barton
2020-09-15Fix T80597: Assigning material slot from Python console failsCampbell Barton
Regression in 12bc34b0b81b1, add assert so this doesn't happen again.
2020-09-12Cleanup: Remove GLEW dependencies outside of GL moduleClément Foucault
2020-09-11Fix T79464: Crash adding objects without an active screenCampbell Barton
Running add-objects operator without an active screen would crash as CTX_data_edit_object would return NULL in this case. This could happen when adding objects from frame-change handlers for e.g. In the case of adding new objects there is no need for a context lookup, pass this directly to ED_object_editmode_exit_ex.
2020-09-11Cleanup: spelling, correct commentsCampbell Barton
2020-09-10Fix T80191: GPencil - Improve Mesh conversionAntonio Vazquez
There were some problems when converted several objects at the same time, especially with the material conversion. The problems were more visible when bake an animation with several objects at the same time. * Now the layer name include the object name. * Reorganize how the materials are generated including object name. * Fix color not converted to sRGB. * Avoid triangles when generate the stroke. This fix a draw manager issue and also add more geometry to use later. * Code cleanup.
2020-09-09Fix for failing constraints testPhilipp Oeser
Caused by own rB6dc7266cf1f4. When overriding context for constraint operators (such as in constraint tests), it could happen that context "active_pose_bone" is set, but "pose_bone" isnt. Now check for both in ED_object_pose_constraint_list.
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-09Fix T80464: Crash deleting bone constraints when the armature layer isPhilipp Oeser
not active Caused by {rB608d9b5aa1f1} Prior to rB608d9b5aa1f1, the constraint was gotten using **context** [CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint) -- which is valid for bones on hidden layers]. After rB608d9b5aa1f1, the constraint is found (or isnt) using `edit_constraint_property_get` [this is **not** valid for bones on hidden layers because internally `BKE_pose_channel_active` checks if the bone is on an active layer]. Some observations: - Every operator using `edit_constraint_property_get` doesnt work for bones on inactive layers [delete, moveup, movedown, move to index (drag n drop nowadays)] -- moveup, movedown, move to index check if they could find a constraint beforehand though (dont crash) -- delete crashes (doesnt check if a constraint could actually be found) - Every operator using `edit_constraint_property_get` for constraint data doesnt work for bones on inactive layers [stretchto_reset, limitdistance_reset, childof_set_inverse, ...] -- these all check if they could find a constraint beforehand though (dont crash) This is because the poll function is using **context** to get the constraint, the operators themselves use **edit_constraint_property_get** which leads to inconsistent/unexpected results. Possible solutions were: - [1] let the delete operator just work with the context constraint again (like prior to rB608d9b5aa1f1) -- allows for deleting constraints on bones in inactive layers - [2] check if we could get a constraint -- prevents the crash, but does **not** allow for deleting constraints on bones in inactive layers - [3] make the poll `edit_constraint_poll_generic` be as strict as the operators -- dont use **context** to get the constraint, but something like **edit_constraint_property_get** - [4] make the operators be more graceful and let them act on bones on hidden layers -- let **edit_constraint_property_get** actually use the same **context** This patch implements [4], so poll an doperators are now in sync. - prevents reported crash - also enables operators for bone constraints on hidden layers - also enables drag and drop reordering of constraints on hidden layers This might be a candidate for 2.90.1? (if it is, take care to include prior "Refactor getting constraints" refactoring commit) Note: Adding constraints also doesnt work for bones on inactive layers [that was the case in 2.79 as well -- it is also using `BKE_pose_channel_active`] Maniphest Tasks: T80464 Differential Revision: https://developer.blender.org/D8805
2020-09-09Refactor getting constraintsPhilipp Oeser
This is the refactoring part of D8805 (should be no functional changes). - exposes pose-related part of former 'get_constraints()' from interface_templates.c to new ED_object_pose_constraint_list - rename ED_object_constraint_list_from_context --> ED_object_constraint_active_list Also clarify comments on both of these. ref T80464 ref https://developer.blender.org/D8805
2020-09-09Fix T80596: Convert to Curve from Mesh crashes BlenderSebastian Parborg
The point cache code needs a non NULL rbw pointer. This could have been avoided if there was a sanity check in the convert function, so added a check there as well.
2020-09-09UI: Rename "VCol" to "Vertex Colors"Aaron Carlisle
2020-09-08UI: Aesthetic tweaks to Select All by Type operatorPablo Vazquez
* Match menu items with Add Menu (order and naming e.g. Font -> Text) * Use Icons * Remove ellipsis from the name (policy is to use `...` only when triggering a window/popup) No functional changes. Thanks @HooglyBoogly for the help!
2020-09-08Cleanup: Refactor `ED_object_parent_set`Sybren A. Stüvel
Refactor `ED_object_parent_set`: - Mark parameters `ob` and `par` as `const` so that it's clear the function doesn't assign any other value to them. - Rename `pararm` to `is_armature_parent`; I mis-read it as `param` all the time, and it was very confusing. - Replace repeated `if-else` statements with `switch` statements. - Reorder preconditions to have some simple checks first. - Flip condition on a huge `if`-statement to return early and unindent the remainder of the function. This function still requires splitting up into smaller functions, but at least this is a step forward. No functional changes.
2020-09-07Cleanup: Refactor object.parent_set operatorSybren A. Stüvel
Refactor the operator exec function into a few smaller functions. The exec function was mixing up vertex-parent and non-vertex-parent code, including incorrect comments. No functional changes.
2020-09-07Cleanup: OBJECT_OT_collection_instance_addCampbell Barton
Minor changes to match OBJECT_OT_data_instance_add. - Access properties once & reuse them. - Early exit when the data to instance can't be found.
2020-09-07Cleanup: remove redundant scene argument in BKE_object_addCampbell Barton
2020-09-07Fix OBJECT_OT_data_instance_add creating empty data-blocksCampbell Barton
ED_object_add_type creates empty object data, add ED_object_add_type_with_obdata which can take existing object data.
2020-09-06Viewport: support dropping object-data to create instancesCampbell Barton
This allows orphan object data for example (meshes, curves, etc) to be dropped into the 3D View from the outliner, creating a new object instance. Previously the only way to do this was to add the same type of object then swap it's data through the ID selector drop-down.
2020-09-05Cleanup: clang-formatCampbell Barton
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-09-03Fix T63125: Gpencil: bones cannot be selected in weightpaint modePhilipp Oeser
Some underlying functionality was not ready for greasepencil: - BKE_modifiers_get_virtual_modifierlist (now introduce dedicated BKE_gpencil_modifiers_get_virtual_modifierlist) - BKE_modifiers_is_deformed_by_armature - checks in drawing code - checks in (pose) selection code A couple of changes to make this work: - `eGpencilModifierType_Armature` has to be respected (not only `eModifierType_Armature`) - `OB_MODE_WEIGHT_GPENCIL` has to be respected (not only `OB_MODE_WEIGHT_PAINT`) -- (now use new `OB_MODE_ALL_WEIGHT_PAINT`) - `gpencil_weightmode_toggle_exec` now shares functionality from `wpaint_mode_toggle_exec` -- moved to new `ED_object_posemode_set_for_weight_paint` This patch will also set the context member "weight_paint_object" for greasepencil (otherwise some appropriate pose operators wont work when in weightpaint mode) Reviewed By: campbellbarton Maniphest Tasks: T63125 Differential Revision: https://developer.blender.org/D8483
2020-09-03Fix T80391: Overrides: wrong check in constraint pollPhilipp Oeser
Condition was flipped, would allow actions on constraints coming from library, but prevented actions on local constraints. Mistake in rBS0b49fdd0ee0. Maniphest Tasks: T80391 Differential Revision: https://developer.blender.org/D8793
2020-09-02Cleanup: use bool instead of int in various placesJacques Lucke
2020-09-01Fix T80224: Crash after duplicating and hiding vertices while using X Axis ↵Germano Cavalcante
Mirror The mirror map can reference a hidden vertex that is currently ignored in the transformation. Thus the mirror element array is not filled.
2020-09-01Cleanup: correct doxy sectionsCampbell Barton
2020-08-31Fix T79973: Re-ordering face maps messes up the names of other face mapsGermano Cavalcante
Use a remap function instead a swap. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D8739
2020-08-30Object: support multiple objects for limit-total vertex groupsCampbell Barton
Also add this to the "Clean Up" menu.
2020-08-30Object: add ED_object_array_in_mode_or_selectedCampbell Barton
Use this utility function for render-shading & weight paint modes. This adds support for edit-mode & pose-mode where all objects in the mode are used in this case instead of the selected objects.
2020-08-30Object: support removing unused weights for selected objectsCampbell Barton
This is useful to run in object-mode, instead of from the property editor, note that this still only used the current object when activated from the property editor.
2020-08-28Cleanup 'make vertex parent' operator code.Bastien Montagne
More localized variables, avoid ugly 'offset by one' index usage in favor of explicit `INDEX_UNSET` define, etc. No behavior change expected from this commit.
2020-08-25Fix T80077: Objects disappear when joining with a zero scaled axisCampbell Barton
Use invert_m4_m4_safe_ortho when joining objects so zero scaled axis doesn't cause all points to be scaled to zero. Instead geometry is left un-scaled on degenerate axes. Report a warning in this case since users may want to adjust the active objects scale.