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
2022-06-09Cleanup: spelling in comments & variablesCampbell Barton
2022-05-04Curves: add second experimental option for new curves toolsJacques Lucke
Now there are two experimental feature options: * "New Curves Type": Enables the new data type and a couple of tools that are meant to be in the first release that comes with the new curves object. * "New Curves Tools": This is only available when the new curve type is available as well. It mainly exists to keep some tools experimental even after the initial curves object is release officially. * For now this only includes the curves edit mode which is not usable yet and probably won't be for the initial release. Differential Revision: https://developer.blender.org/D14840
2022-03-11Fix out of order event handling when calling operators from gizmosCampbell Barton
Activating a gizmo used the windows eventstate which may have values newer than the event used to activate the gizmo. This meant transforms check for the key that activated transform could be incorrect. Support passing an event when calling operators to avoid this problem.
2022-02-18Cleanup: Rename original curve object type enumHans Goudey
This commit renames enums related the "Curve" object type and ID type to add `_LEGACY` to the end. The idea is to make our aspirations clearer in the code and to avoid ambiguities between `CURVE` and `CURVES`. Ref T95355 To summarize for the record, the plans are: - In the short/medium term, replace the `Curve` object data type with `Curves` - In the longer term (no immediate plans), use a proper data block for 3D text and surfaces. Differential Revision: https://developer.blender.org/D14114
2022-02-18Curves: add initial edit mode supportKévin Dietrich
This adds initial support for edit mode for the experimental new curves object. For now we can only toggle in and out of the mode, no real interraction is possible. This patch also adds empty menus in edit mode. Those were added mainly to quiet warnings as the menus are programmatically added to the edit mode based on the object type and context. Ref T95769 Reviewed By: JacquesLucke, HooglyBoogly Maniphest Tasks: T95769 Differential Revision: https://developer.blender.org/D14136
2022-02-15Curves: add initial sculpt modeJacques Lucke
This adds a new sculpt mode to the experimental new curves object. Currently, this mode can only be entered and exited, nothing else. The main initial purpose of this node will be to use it for hair grooming. The patch also adds the `editors/curves/` directory for the new curves object, which will be necessary for many other things as well. I added a completely new mode (`OB_MODE_SCULPT_CURVES`), because `OB_MODE_SCULPT` seems to be rather specific to meshes, and reusing it doesn't seem worth the trouble. The tools/brushes used in mesh vs. curves sculpt mode are quite distinct as well. I had to add DNA_userdef_enums.h to make the patch compile with C++ (forward declaration of enums isn't allowed). This follows the same pattern that we use for other enums in dna. Differential Revision: https://developer.blender.org/D14107
2022-02-11File headers: SPDX License migrationCampbell Barton
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
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-10-18Cleanup: use depends-on-cursor for "Object Transfer Mode" operatorCampbell Barton
Replace modal operator with the OPTYPE_DEPENDS_ON_CURSOR flag. This has the advantage of showing the shortcut in the menu.
2021-08-09Cleanup/fixes in UI messages.Bastien Montagne
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
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-02Object: support running transfer mode in any object modeCampbell Barton
There is no need to limit this to sculpt mode, prepare for key short cut changes, see: T88092.
2021-05-07Cleanup: remove OB_MODE_EDIT from GPencil compatibility checkCampbell Barton
All callers replace this with OB_MODE_EDIT_GPENCIL.
2021-05-07Cleanup: remove redundant NULL check in ED_object_mode_compat_testCampbell Barton
2021-05-07Object Mode: avoid error message with particle-edit mode switchCampbell Barton
Mode switching passed through when the mode wasn't supported for all modes except particle edit-mode. Add a check to ED_object_mode_compat_test to prevent the error message.
2021-04-13Object: Enable transfer mode functionality for switching objects in Sculpt ModePablo Dobarro
This implements the changes discussed in T87134 for including switch object funcionality in 2.93. This includes: - Remove the switch object operator experimental option - Remove the option for switching objects in Edit Mode. - Rename switch_object to transfer_mode. - Enable the operator only in sculpt mode. - Expose the operator in the Sculpt menu with an eyedropper modal option. On later releases, we could revisit enabling the operator in other mode and object types as well as its place in the UI. Reviewed By: JulienKaspar, JacquesLucke Differential Revision: https://developer.blender.org/D10953
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2020-11-30Cleanup: Use "region" for ARegion variable namesHans Goudey
As proposed in T74432 and already implemented in several commits, "region" is the preferred name for `ARegion` variables, rather than any variant of "ar". This commit changes a few "ar" variables that have popped up over time and also adjusted names of variants like "arnew".
2020-10-30Object: use undo-group for object.switch_objectCampbell Barton
object.switch_object no longer adds multiple undo steps from a user perspective.
2020-10-21Fix T81079: Switch object ignoring visibility settingsPablo Dobarro
Replace ED_transform_snap_object_context_create with ED_view3d_give_base_under_cursor & ED_view3d_autodist_simple so object visibility is respected and non-geometry objects can be supported. Ref D9255
2020-10-20Fix T81076: Crash on switch object operator undoPablo Dobarro
This fixes the crash and the assert, but undo is done in multiple steps Reviewed By: campbellbarton Maniphest Tasks: T81076 Differential Revision: https://developer.blender.org/D9256
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-23Cleanup: remove 'r_' prefix for variablesCampbell Barton
This is for return arguments, also remove redundant NULL check.
2020-09-18Cleanup: Resolve warningsJulian Eisel
Unused variables, missing include for declaration, missing 'static' specifier. Also rename function to match naming convention.
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-05Cleanup: clang-formatCampbell Barton
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-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-04Fix T77073: Objects cannot be activated after collection excludeNathan Craddock
When excluding a collection containing the active object in either texture paint or particle edit mode, the object could not be reactivated when the collection was re-enabled. This is because the object's mode was left in TEXTURE_PAINT or PARTICLE_EDIT, and the activation code did not have cases to handle these modes. This moves the code that is run when toggling out of texture paint or particle edit modes to functions so activation can properly toggle off the respective interaction mode.
2020-06-03Object: refactor mode switchingCampbell Barton
Functionality here has become confusing over time, this removes duplicate, similar functions, preferring to set the mode instead of toggle, enter, exit. Mode switching utility function behaved differently regarding undo, 'ED_object_mode_toggle' for example didn't skip the undo push where 'ED_object_mode_set' did. Some callers chose these functions based on the intended undo behavior, even when toggling didn't make sense. There was also ED_object_mode_generic_enter which was similar to ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit. Simplify object mode switching internals: - Replace ED_object_mode_generic_enter with ED_object_mode_set. - Remove ED_object_mode_toggle as nearly all callers needed to check the current mode so toggling would set the mode argument correctly. - Use ED_object_mode_set for the object mode switching operator to simplify logic. - Add ED_object_mode_set_ex which has an argument to disable undo, needed when loading undo data needs to set the mode. - Remove unused ED_object_mode_exit.
2020-03-15Cleanup: redundant checksCampbell Barton
In some cases moved the checks into asserts, to ensure changes in the future don't cause the checks to become necessary again.
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2019-08-02Object Mode: add back non '_ex' versions of mode-switching functionsCampbell Barton
While these aren't currently used, its strange to have extended versions of a function without the non-extended versions it also avoids callers needing to add them back if they need - or duplicating the same boiler plate when calling the '_ex' versions. Reverts 11da3b132aff1, 11da3b132aff1, adds depsgraph argument so the caller is responsible for the evaluation state.
2019-07-31Refactor access to dependency graphSergey Sharybin
This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-07-31Cleanup: Remove unused functionsSergey Sharybin
2019-06-28Fix T66126: Non-active Grease Pencil object stuck in draw modeAntonioya
Now the modes are reset for grease pencil objects. Differential Revision: http://developer.blender.org/D5138 Reviewers: @dfelinto
2019-05-31Fix T65200: Crash by hiting "tab" after sculpting with dyntopoSergey Sharybin
Make sure object is properly evaluated to the new state when it is expected to. Reviewers: brecht, mont29 Reviewed By: brecht Differential Revision: https://developer.blender.org/D4985
2019-04-22Cleanup: style, use braces for editorsCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-12-14GP: Rename CTX and OB modesAntonioya
Part of T59335.
2018-12-03Merge branch 'master' into blender2.8Campbell Barton
2018-12-03Fix T56331: Undo crash w/ sculpt on hidden layerCampbell Barton
2018-11-29Fix T57653: Fix T58075: Crash when switching between Edit and Sculpt/Paint ↵Bastien Montagne
modes. Sculpt (and paint) modes rely on valid evaluated data at their initialization. Added code to ensure that in `ED_object_mode_toggle()`, when relevant toggle operator requires it (looks like sculpt/paint should be the only ones affected, although particle edit may be too...).
2018-10-29Fix topbar tool UI being lost on undoCampbell Barton
Using operators to the object mode was resetting the tool. See: T56865
2018-07-31Cleanup: style, duplicate includesCampbell Barton