Age | Commit message (Collapse) | Author |
|
|
|
|
|
Plus a few cuts in very long lines…
|
|
configured, pardon)
- Fixing typo in description of GP paint mode.
|
|
|
|
- It's like sketch mode for lines, but you're specifying line knots
by clicking on position you want to add next knot.
- View can be navigated between knots creation.
- Holding LMB down and sliding mouse will lead to new segment preview
so it can be created more accurate.
Additional change: fixed GP->Bezier conversion. Last point used to
be ignored in this operator.
|
|
- Implement own undo stack for grease pencil, so now there'll be no keymaps conflicts.
- Supported redo's during sketch session.
- Get rid of flag stored in Globals -- use undo stack to check if grease pencil session is active.
|
|
|
|
Causing a flurry of refresh file prompts post-commit,
Confusing local diffs and causing merge conflicts,
Stating the obvious; redundant and useless...
We shall not miss thou, blasted expand $keywords$
|
|
Currently, grease pencil conflicts with such operators
as undo and set object mode which makes behavior totally
unpredictable and crash for some cases.
The only way to solve this proper is to ger rid of pointers
to data which can chage stored in operator custom data.
|
|
frame which the session held a reference to.
|
|
|
|
|
|
always pass rv3d argument now.
also found a bug where hex_to_rgb could use un-initialized memory.
|
|
|
|
mval args const elsewhere too.
|
|
rather then 2 floats.
|
|
coordinates.
some functions had vague names, I even ended up re-writing some of these functions by accident!
also added doxy comments.
* ED_view3d_win_to_3d (was window_to_3d)
* ED_view3d_win_to_delta (was window_to_3d_delta)
* ED_view3d_win_to_vector (was window_to_3d_vector / viewvector)
* ED_view3d_win_to_segment_clip (was viewline)
* ED_view3d_win_to_ray (was viewray)
|
|
|
|
mouse coords would with cont. grab would wrap at short.
use mouse coords as int rather then short.
this problem still happens on linux because of XTranslateCoordinates
|
|
- BLF_height_max
- BLF_width_max
- BLF_descender
- BLF_ascender
use for tooltip and image stamp.
|
|
broken.
|
|
view3d_get_view_aligned_coordinate() could modify the event->mval.
|
|
If greasepencil became active, making Blender area full or restore
screen from full, the greasepencil handler was still running, using
outdated area pointer. This crashed Blender.
Now greasepencil modal() ends on the case its own stored area does
not exist anymore.
|
|
|
|
This manisfested as an inability to draw any more strokes after trying
to draw a stroke while the active layer was locked and then unlocking
that layer to try and draw on it again.
|
|
|
|
to sequential error by adopting a two-pass smoothing strategy instead.
This seems to give some minimal reductions in the amounts of unwanted
shrinkage that occurs
|
|
|
|
to curves.
added new functions
- view_autodist_depth_segment()
- plot_line_v2v2i(), which takes a callback and plots x/y points.
|
|
- invalid dimension type could be passed without raising an error.
- negative dimensions could crash blender, now they raise errors.
- zero length dimension arg was not detected.
- floating point lengths were accepted, now only allow ints.
also comment unused vars.
|
|
Sketching Sessions.
Fix for secondary issue noted in this bug report. Some of the code for
the fancy 3d view sketching options needed to be moved around so that
there is a clearer "paint/sketch session" and "stroke" separation
between various stages. There's still some more stuff that needs to be
done here before I think it's totally cleaned up.
|
|
Crazy users! Who on earth would try undoing in the middle of an action
(here the crash occurred while a mouse button was still held)?!
(At least it wouldn't have been possible for those using the DKEY +
mousedrag method of invoking strokes though...)
|
|
Session
As the key combination for undo was unhandled by Grease Pencil
operator and allowed to execute, some of the lingering Grease Pencil
data would get corrupted by undo as some flags may still have been
set.
This commit attempts to fix.workaround this problem by catching undo
events, using the internal "delete last stroke" functionality to
emulate undo-like behaviour as expected but without the associated
risks. The underlying functionality used was already part of the
original 2.4 implementation, but was exposed via the GUI instead there
where it was less useful.
---
Other tweaks related to Grease Pencil:
1) Spacebar can be used to end Sketching Sessions too now
2) Grease Pencil animation editor now displays GP datablocks in light
blue (i.e. "sub-id") colours as per dopesheet instead of them being
presented like groups. This better reflects their true nature.
|
|
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
|
|
GSoC10 work. Cheers Mike for catching this!
Also removing the use of sqrt() as noted in a "todo" comment there...
|
|
|
|
|
|
Due to popular request and usability considerations, this commit
reintroduces functionality similar to 2.4's "Draw Mode" for Grease
Pencil.
In the toolbar under the Draw/Line/Eraser buttons, you can find the
"Use Sketching Sessions" toggle, which enables this feature. This is a
per-scene setting, and defaults to off, so that the current 2.5
behaviour is still the default (i.e. the Grease Pencil operator will
only do a single stroke at a time).
With this option enabled, drawing with Grease Pencil will enter a
semi-modal state where you can draw multiple strokes without needing
to keep holding the DKEY throughout (though you'll still need to do so
to start the strokes, unless you use some toolbar buttons), while
still being able to manipulate the viewport. Header help-text prints
show the appropriate keybindings (i.e. press ESCKEY or ENTER to end
the sketching session).
Notes:
- To aid maintainability of the 3D-View toolbar code, I've taken the
liberty to factor out the groups of widgets which commonly occur in
most of the toolbars into separate functions (namely "Repeat" and
"Grease Pencil"). Perhaps it might make it slightly harder to newbies
to the toolbar code to grasp, though the physics panels are far worse
;)
- I've reshuffled some code in the Grease Pencil code to separate out
the various states of operation again more clearly, though some more
work is still needed there (TODO)
- There can now be only one Grease Pencil operator running at a time
- Redoing Grease Pencil operations where sketching sessions was
enabled still needs work. Namely, a way of delimiting the set of
points recorded into strokes is still needed (TODO)
- Ultimately, it should be possible to switch tools midway through a
session. Currently sessions are limited to only being able to be used
with a single drawing mode (TODO)
- After ending a drawing session, the titlebar contols may not work on
Windows without manually making the main window lose focus and then
regain (i.e. click on some other window in toolbar, then come back).
This may be related to (bug #25480)
|
|
|
|
intentionally ignores shift.
|
|
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
|
|
cursor mode
also made drawing in camera view stick to the camera border (belated durian request),
useful for animation review without worrying about screensize moving the overlay about.
|
|
|
|
- removed DNA_brush_types.h from DNA_scene_types.h (and some other similar cases)
- removed DNA_wave_types.h (never used)
- removed Main.wave
|
|
necessary due to the more accurate mouse move events that are useful for
sculpting and painting (at least on Linux/X11, not sure about other platforms).
If the update function takes a while to run, this in turn causes more mouse
move events to be accumulated, making things even slower, .. going into a spiral
of slower and slower redraws.
As a solution I've added a INBETWEEN_MOUSEMOVE event next to MOUSEMOVE. A
MOUSEMOVE event is automatically changed to INBETWEEN_MOUSEMOVE when a
MOUSEMOVE event is added after it. This new event type is only handled by
painting/sculpting operators, everything else can happily ignore it.
|
|
This cleans up things like transform and duplicate a lot, which previously exposed lots of options that didn't work with tweaking.
|
|
* Fixed crash with when/after undoing Grease Pencil sketches in the Image Editor. To get this working, I've had to sacrifice the backwards-compat loading for old .blend files from 2.49 which were using the same pointer as the new data (local data vs datablock data). If anyone has any ingenious hacks to fix this, go ahead, but otherwise, some caution is advised here...
* Grease Pencil block used for Image Editor instances can now be changed
* Enabled proper active polls on the advanced 3D-view projection methods for drawing. These are not valid in views other than the 3D-View, and so should not be shown as available for use elsewhere (though may still be shown just so that users know what mode an 'imported' datablock may be using).
* Enabled proper updates for Grease Pencil editing in the Image Editor. Was missing notifiers for this stuff.
* When drawing in the Image Editor with no image active, the system now (quietly) switches to using screen-space 'view' vs 'cursor' space for the strokes, since the previous behaviour was confusing with strokes disappearing after drawing them. IMO this is a much better option than the confusion that occurred before, even though it does change the user's settings under their feet!
|
|
at location 0,0,0.
Removed some code that I never finished working on to try and make the sketches get added relative to the owner. Perhaps will come back to that someday, but maybe we can just do without.
|
|
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing: UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
|