Age | Commit message (Collapse) | Author |
|
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
|
|
D8367 by @paul2t with edits.
|
|
Replaces the modifier drop operator and works for modifiers,
constraints, and shader fx. Because these three elements share common
traits, it made the code simpler to combine the operator for all three.
Three types of actions are supported depending on where the element is
dropped:
* Drop within the same list to reorder.
* Drop on another object to copy.
* Drop the base (parent) element to link all to another object.
A few cases are yet unsupported but will be added to blenkernel.
|
|
Duplication and deletion code of modifiers was totally wrong for
particle system, that special weird thing needs its own custom
management.
Note that for now I chose not to duplicate the particle settings ID when
duplicating the modifier...
|
|
This can be useful to save the result of a cloth simulation as a
shape key without destroying the simulation, so it's possible to
e.g. re-run it to get other shapes, or simply use the new shape
key to start the simulation already in a draped state.
It also makes sense to allow applying as shape key even when the
mesh is shared, because the operation itself just adds a shape
key. To support this, split the apply operator into Apply and
Apply As Shapekey so that they can have different poll callbacks.
Differential Revision: https://developer.blender.org/D8173
|
|
Instead of manually checking the pinned object, use the existing
ED_object_active_context function. This requires adding const
to the context in that function.
|
|
I spotted a duplicate struct declaration, so I had to check for other duplicated as well
There might be some other but i am not confident enough for deleting them
this regex search for duplicate ^(.*;)$\n(\1)$
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D8146
|
|
Header and implementation signature for ED_object_add_duplicate
were not the same leading to a build error with clang on windows.
|
|
This patch implements the list panel system D7490 for grease pencil
shader effects. It also moves their drawing to a callback in
ShaderFxTypeInfo in line with the extensible architecture refactoring
goal T75724.
The implementation is basically exactly the same as for the modifier
patch (9b099c86123fc82).
Thanks to Matias Mendiola (@mendio) for helping to develop the layout
changes.
Differential Revision: https://developer.blender.org/D7985
|
|
This patch implements the list panel system D7490 for grease pencil
modifiers. It also moves their drawing to a callback in
GpencilModifierTypeInfo in line with the extensible architecture
refactoring goal T75724.
This also adds the "set_error" function for grease pencil modifiers,
which hadn't been copied from mesh modifiers yet.
The implementation is basically exactly the same as for the modifier
patch (9b099c86123fc82).
Thanks to Matias Mendiola (mendio) for providing mockups for many
of the layout changes.
Differential Revision: https://developer.blender.org/D7978
|
|
Using enum type itself in implementations, and uint in headers (as using
enums types in headers is a pain when enum are not defined and used in a
single same header file...).
|
|
This utils was only used for scenes' full copy, and was using old
deprecated ways to deal with ID relations and such. Good riddance!
|
|
This patch implements the list panel system D7490 for modifiers.
It also moves modifier drawing to a callback in ModifierTypeInfo
in line with the extensible architecture refactoring goal T75724.
This adds a PanelRegister callback and utilities for registering
panels and subpanels. It also adds the callbacks for expansion saving
and drag and drop reordering described in D7490.
These utilities, callbacks, and other common UI elements shared
between modifiers live in MOD_ui_common.c.
Because modifier buttons are now in panels, we can make use of
subpanels for organization. The UI layouts also use the single
column layout style consistently used elsewhere in Blender.
Additionally, the mode-setting buttons are aligned and ordered
consistently with the outliner.
However, the large number of UI changes in this patch may mean
that additional polishing is required in master.
Thanks to William Reynish (@billreynish) who did a fair amount of the
layout work and to Julian Eisel (@Severin) for consistent help.
Differential Revision: https://developer.blender.org/D7498
|
|
- ED_object_constraint_list_from_constraint was get_constraint_lb
- ED_object_constraint_list_from_context was get_active_constraints
- ED_object_constraint_active_get was get_active_constraint
- ED_object_constraint_active_set was ED_object_constraint_set_active
|
|
|
|
This caused an additional argument when exiting object modes
and many other low level functions which don't need to access context.
This simplifies fixing T77073.
|
|
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.
|
|
Needed for to create objects of a specific size.
|
|
|
|
|
|
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.
I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.
Differential Revision: https://developer.blender.org/D7653
|
|
|
|
Parenting in the outliner via drang and drop would always happen without
the 'Keep Transforms' option. Since this is often desired, this adds the
ability to hold Alt for doing this to the drop action.
Adding the hint to hold Alt to the operator name is not nice, but since
the operator name is used for the UI, there doesnt seem to be a nicer
way of doing this.
If modifier keys are needed back for other actions, spawning a menu
instead could be an alternative for the future.
Maniphest Tasks: T74649
Differential Revision: https://developer.blender.org/D7120
|
|
|
|
Also cleaned up code there, making a proper poll function for the apply
modifier operator, that way button is properly disabled in UI itself in
most invalid situations.
|
|
Resolves T69450
|
|
|
|
Allows to access/transform/restore edit-mode
coordinates in a generic way.
|
|
Allows to have a higher versatility in the API.
Should be no functional changes.
|
|
|
|
Currently supports mesh, armature, lattice, curve & metaballs.
Access from pivot popover.
|
|
No need to use BKE_object_where_is_calc() in this case: there is no
parenting or constraint system involved on object add.
So simply use direct object matrix calculation from it's local
transform. No need in dependency graph either in this case.
|
|
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.
|
|
|
|
|
|
|
|
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
|
|
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
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Logic to disable dyntopo when entering sculpt mode was applied on undo.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
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.
|
|
Call ED_object_editmode_enter_ex instead.
|
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|
|
Prevents clang-format wrapping text before comments.
|
|
|
|
Needed to port operator to use evaluated particle system.
But also changed interface to always show Convert button when
draw type is set to Path (Hair particle system is forced to
be draws as path). This avoid rather expensive lookup on every
redraw, but will show Convert button for un-baked particle
emitter.
Probably, an acceptable compromise.
|