Age | Commit message (Collapse) | Author |
|
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
undo data is restored.
- Some undo types accumulate changes (image & text editing)
others store the state multiple times (with de-duplication).
This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
manage restoring correct ID's.
Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
Previously this wasn't done, making history fail in some cases.
This can be optimized to skip some combinations of undo steps.
grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.
See D3113
|
|
|
|
Use common prefix so adding related functions share the prefix.
|
|
D1518 from @mba105 w/ edits
|
|
Practically all access to enum data is read-only.
|
|
Intended to replace legacy GL_SELECT, without the limitations of
sample queries which can't access depth information.
This commit adds VIEW3D_SELECT_PICK_NEAREST and VIEW3D_SELECT_PICK_ALL
which access the depth buffers to detect whats under the pointer,
so initial selection is always the closest item.
The performance of this method depends a lot on the OpenGL
implementations glReadPixels.
Since reading depth can be slow, buffers are cached for object picking
so selecting re-uses depth data, performing 1 draw instead of 3
(for 24, 18, 10 px regions, picking with many items under the pointer).
Occlusion queries draw twice when picking nearest,
so worst case 6x draw calls per selection.
Even with these improvements occlusion queries is faster on AMD hardware.
Depth selection is disabled by default, toggle option under select method.
May enable by default if this works well on different hardware.
Reviewed as D2543
|
|
|
|
Initialize a rectangle from point+size.
|
|
Increment the seed on each use,
otherwise calling again selects the same order, unless you manually adjust the seed.
|
|
While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.
What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.
Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.
This commit includes:
- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
(this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
as well
Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit
Reviewed By: campbellbarton, juicyfruit
Differential Revision: https://developer.blender.org/D1680
|
|
Meta-balls would access freed memory on undo.
This fixes the bug and stores the active-meta in the undo state.
|
|
- use ED_ prefix for api calls
- use ED_*_select_pick for mouse selection (was already done in parts)
|
|
Add 'Seed' option for all random select operators
D1508 by @mba105, w/ edits
|
|
Our 'hard limit' values was too often max_int/float here, mis-typing could
lead to crash (or infinite hanging) of Blender, see e.g.
http://blender.stackexchange.com/questions/32790/blender-forces-computer-to-reboot-after-mistyping-extreme-value-for-resolution-i
|
|
Naming here is slightly misleading. We have:
* Number of elements (objects) that can be picked
* Buffer size
* Number of integers in buffer.
Interestingly enough, bufsize in OpenGL (as far as I could find in
examples on the web) and in most of the code refers to the latter and
actual buffer size is only used whenever we do allocations on the heap.
Added an extra defines here to make things a bit clearer:
* MAXPICKELEMS refers to the number of objects that can be picked
* MAXPICKBUF refers to the number of integers in the selection buffer
Also made all buffers use MAXPICKBUF where some used MAXPICKBUF * 4.
That means that some parts of blender will use less space for selection
now. MAXPICKBUF is set to 10000 for 2500 object selection, which can be
changed at any time, but I think 10000 integers on the stack touches the
borders of uglyland anyway.
|
|
|
|
|
|
- lamp
- camera
- font
- empty & effector
Also fix inconsistency with apply transform
(modified shape-keys for meshes but not curve/lattice)
|
|
This patch creates an interface for selection mechanisms in opengl. This
makes it possible to switch between occlusion query based or select
rendermode based selection transparently.
This is really useful on graphics drivers that do not accelerate the
select rendermode path (some ATI cards are notorious for this, and the
new path is used by default there), since occlusion queries are always
hardware accelerated due to their use in games.
The option can be found under system - selection. Auto just enables
occlusion queries for ATI users while the rest of the options enforce
one of the two methods always.
There is just one known change, previous code enforced nearest bone to
always get selected, even when mouse selecting near the same position, I
couldn't replicate the behaviour though.
patch by me with edits and review by Campbell.
Thanks!
|
|
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
|
|
|
|
|
|
also made metaball operator behave like the others.
Path originally from Walid Shouman, with own edits.
|
|
patch by Paolo Acampora with some edits.
|
|
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
|
|
|
|
|
|
from Lawrence D'Oliveiro (ldo)
|
|
from Cyrille Ruggero (kalado) with some edits.
|
|
objects
curves and metaballs now behave the same as meshes wrt grid scaling.
remove WM_operator_view3d_distance_invoke(), and replace with a function called from exec which initializes defaults, this way operators can have their own invoke functions.
|
|
takes a key as an arg and isnt popping any element from the hash as you might expect).
add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.
|
|
hangs Blender
Wiresize and rendersize were not handled regarding scene scale, leading to insane precision when working in cm or less...
|
|
Forward enum declaration is a bad idea, especially for C++ which requires
enum specification to dteermine which data type to use to store it.
Alternative would be to not use enum as an arument and pass it as int,
but actually would rather be strict on typing -- using explicit enum
as parameter type helps understanding the code and prevents possible
mistakes when using the function.
|
|
|
|
remove MEM_sys_types.h which was a duplicate.
|
|
include conflicts later on.
|
|
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.
Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
|
|
|
|
|
|
|
|
button mouse"
ShrinkFatten operator now uses scale key to toggle 'Even thickness' option.
With the default keymap this is Alt+S,S.
Added functionality so the header print can get the key used for the modal keymap, some other operators should make use of this too.
|
|
|
|
from Jesse Werner (vidjogamer), with own addition of RNA function, scale and rotation support.
|
|
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
|
|
|