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
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-01-04 06:14:01 +0300
committerJoshua Leung <aligorith@gmail.com>2011-01-04 06:14:01 +0300
commitcdc7d0b85f088967684c6b6efb7600d06398abc9 (patch)
tree309c828da7f6cafb48b056bc8cf06aa74315137b /source/blender/editors/include
parent522615536952c02fababd72ab9106c0a68a8071d (diff)
Grease Pencil Todos: "Sketching Sessions"
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)
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_gpencil.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 6c5a0cc3bf3..78edcc05586 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -55,6 +55,10 @@ typedef struct tGPspoint {
float pressure; /* pressure of tablet at this point */
} tGPspoint;
+
+/* Check if 'sketching sessions' are enabled */
+#define GPENCIL_SKETCH_SESSIONS_ON(scene) ((scene)->toolsettings->gpencil_flags & GP_TOOL_FLAG_PAINTSESSIONS_ON)
+
/* ----------- Grease Pencil Tools/Context ------------- */
struct bGPdata **gpencil_data_get_pointers(struct bContext *C, struct PointerRNA *ptr);