Revision b05f4c7 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 05:32 (GMT) |
More self-contained fix for previous commit |
Revision 2e64865 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 05:30 (GMT) |
Cleanup: Various fixes * Remove redundant operations (e.g. extra copies of data) * Remove duplicate functions (e.g. vector copying, for non-floats) TODO: We still have copy_v2int_v2float() and copy_v2float_v2int() to fix (i.e. rename + move to BLI_math.h) * Cleanup redundant struct forward defs in headers (including some duplicates) * Hacky fix for compiler warning in gpencil_colorpick.c (about const vs non-const) UI_FSTYLE_WIDGET is const, but UI_text_clip_middle_ex() needs non-const |
Revision e1ae00c by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 04:27 (GMT) |
Cleanup: More simple fixes |
Revision 6701e83 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 04:22 (GMT) |
Cleanup: Style fixes |
Revision a99c4c7 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 04:06 (GMT) |
Cleanup: Move ED_gpencil_stroke_minmax() to blenkernel The rest of the boundbox/minmax code is already there. We might as well have the function for grabbing this info from a single stroke there too. |
Revision bc125b4 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 02:50 (GMT) |
Cleanup: Reshuffling order of code in file In future: Keep related code together, instead of just dumping it "wherever" (aka at the end of the file, since it's most convenient right now) (In the process, I've ended up flagging a few pieces of code for further investigation. They likely duplicate some code elsewhere in other modules) |
Revision b186698 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 01:23 (GMT) |
Cleanup: Prefix all exported functions with module prefix |
Revision 0cd8cdd by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 01:21 (GMT) |
Cleanup: Fix mixed use of tab/space whitespace |
Revision fdc1a1c by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 31, 2018, 01:10 (GMT) |
Cleanup: Move private/internal operator state data out of public header for GPencil module This commit moves the defines for several modal operators (Interpolate, Fill, and Add Primitives) out of the editors/gpencil module's public headerfile ("ED_gpencil.h") into the module's internal headerfile ("gpencil_intern.h"). We should not be spraying the internal implementation details of operators in public headers. In this case, these defines weren't even being used outside of the gpencil module - they were only put in a header so that drawgpencil.c (which lives in the same module) could access this data (and even then, I wonder those callbacks need access to everything). Note: I couldn't get rid of the ED_numinput.h include in the header yet, as several of the operators define NumInput members inline. |
Revision 833afb7 by Antonio Vazquez (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 16:45 (GMT) |
Fix error in fill stroke thickness To avoid gaps, the thickness of the internal strokes must be reduced, but the previous code only worked when the factor was different of 0. |
Revision 2aa5950 by Antonio Vazquez (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 16:18 (GMT) |
Merge branch 'blender2.8' into greasepencil-object |
Revision 0f8af3a by Antonio Vazquez (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 16:18 (GMT) |
Rename "lazy Mouse" to "Stabilizer" Also changed "Radius" to "Distance" Thanks Pablo Vazquez for the feedback. |
Revision 3fde390 by Antonio Vazquez (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 08:52 (GMT) |
Merge branch 'blender2.8' into greasepencil-object |
Revision 496064f by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 06:04 (GMT) |
GP Add Primitives: Attempted fix for double-clicking on the toolbar button Check for what type of mouse-press it was, instead of just assuming that the clicks are what we think they are. Note: If things still go wrong, there's also now a debug-print there (debug-mode only) to help track things down. |
Revision 7d48923 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 06:04 (GMT) |
GP Add Primitive: Don't make a copy of the new stroke. Just copy it over! |
Revision 4cd2f80 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 06:04 (GMT) |
Cleanup: Streamline logic here - just check once, not twice |
Revision e12b1c2 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 06:04 (GMT) |
GP Add Primitive Ops: Remove the "avoid fast double clicks" event hack This was making the operator unnecessarily clumsy to use, especially for anyone used to the way that drawing tools everywhere else work. Old workflow (with the hack): 1) Click Rectangle/Circle to start the operator 2) Click (Press & Release) in the 3D view to start drawing the shape 3) Click again (Press & Release) to stop drawing (4) Click again, realising that you forgot to release the mouse in step 2 (provided you realised why it "wasn't working") New workflow (more in line with standard workflows): 1) Click Rectangle/Circle to start the operator 2) Press and drag in the 3D view to start drawing the shape 3) Release to stop drawing |
Revision e70d497 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 06:04 (GMT) |
GP Add Primitives: Allow operator to work in Edit Mode too It didn't really make sense why this was restricted to Draw mode only. In particular, there are 2 good arguments for allowing it in editmode too: 1) In many ways, it's more similar to a Copy/Paste or Duplicate operation in that it just dumps a bunch of stroke geometry into the scene without you having to draw anything. We allow those, so why not this. 2) Users are used to being able to go into Edit Mode and add a primitive shape into the datablock to begin editing it. For consistency with other modes, and also to prevent the "Creation" tab looking stupid and redundant in EditMode, let's enable this. Note: * Sculpt/Weight Paint modes do not have this enabled for now. In those modes, users are less likely to be concerned with adding geometry, and more with modifying the existing geometry. |
Revision 388bb6e by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 06:04 (GMT) |
Cleanup: Use M_PI instead of converting from degrees to radians Note: While the center/radius calcs may benefit from using the BLI_math funcs, the current implementation is more direct. |
Revision 4d99df8 by Joshua Leung (experimental_gp_weight, greasepencil-experimental, greasepencil-object, greasepencil-refactor, soc-2019-npr, temp-gpencil-eval, temp-greasepencil-object-stacksplit, temp-greasepencil-vfx) January 30, 2018, 06:04 (GMT) |
GP Add Primitives: De-duplicate code Most of the logic in gp_primitive_rectangle() and gp_primitive_circle() was duplicated, and responsible for performing space-conversion stuff on the 2d/screen-space coordinates. This commit properly separates out these concerns, de-duplicating code, and fixing a few other minor issues at the same time (e.g. superfluous copies, and "edges" not getting initialised properly) |
|
|
|


Master Commits
MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021