Age | Commit message (Collapse) | Author |
|
Make the UI API more consistent and reduce confusion with some naming.
mainly:
- API function calls
- enum values
some internal static functions have been left for now
|
|
Cursor mode
Eraser was not aware of possible transform matrix for the strokes.
|
|
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
|
|
- Drawing grease pencil fail without scene-lock.
- Converting to curve failed without scene-lock.
- Outliner drag into viewport failed with local-view.
|
|
|
|
|
|
|
|
OSX needs userdef for pixelsize, adjusted header to avoid this happening again.
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
View2D had some inconsistencies making it error prone in some cases.
- Inconstant checking for NULL x/y args.
Disallow NULL args for x/y destination pointers, instead add:
- UI_view2d_region_to_view_x/y
- UI_view2d_view_to_region_x/y
- '_no_clip' suffix wasn't always used for non-clipping conversion,
switch it around and use a '_clip' suffix for all funcs that clip.
- UI_view2d_text_cache_add now clips before adding cache.
- '_clip' funcs return a bool to quickly check if its in the view.
- add conversion for rectangles, since this is a common task:
- UI_view2d_view_to_region_rcti
- UI_view2d_region_to_view_rctf
|
|
use this for grease pencil stroke conversion to avoid float->int->float conversion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
also remove CDDM_Check, theres no need for it.
|
|
can safely assume we also have a previous stroke!
Better to assert here, than checking this randomly...
|
|
|
|
also increase precision of rctf print functions
|
|
gpf->framenum is an int, not a float. Hence, this type of rounding has no effect.
|
|
Issue was in GP draw code: line thickness was not initiated properly (and a null one makes OGL draw a unity-width line).
Also tweaked threshold (when to start a new, width-different OGL linestrip), to make it inversaly proportional to thickness
(so that now, it's 0.2 for a thickness of 1, 0.1 for a thickness of 2, etc.), avoids too big steps when using large thickness.
|
|
|
|
|
|
only where it really makes sense).
|
|
weight, when using 'linked' option.
This was (more or less) OK with hand-drawn strokes, as the number of points made it nearly unoticable, but broke completely with line and poly strokes!
Did this when I implemented linked curve feature because it was easier! Now, convert code always adds a heading and trailing point to the curve,
to get initial/final zero radius. Adds even more complexity to those functions... :/
|
|
|
|
and mark const values/parameters as such.
|
|
|
|
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
|
|
This makes a number of operators no longer ask for confirmation, rather it will
show an info message after performing the operation. Ref T37422 for decision. In
particular, these were changed:
* Delete objects, bones, keyframes, masks, mask curves, motion tracks, markers.
* Clear and delete keyframes in the 3D view.
* Align bone to parents.
* Separate bones from armature.
* Group/ungroup metastrips in sequencer.
* Copy/paste objects to/from buffer.
Reviewed By: brecht, dingto
Differential Revision: http://developer.blender.org/D35
|
|
|
|
OPERATOR_CANCELLED.
|
|
|
|
related functions.
|
|
|
|
Use scene's GPencil when active object is deselected. Else it can be tricky and not user-friendly to access to the scene's GPencil once some objects have GPencil data (you have to select/active a non-gpencil object, or switch to a layout without active object...).
|
|
gpencil_data_get_active and gpencil_data_get_active_v3d did not have consistent behavior when we had an active object, but not on any visible layer (the first would return the default scene gpd in this case, while the first was still returning active object's one). Now they both return scene's one.
|
|
indent.
also indent case's within the switch (we already did both of these almost everywhere)
|
|
|
|
When you convert a grease pencil stroke to a polygon curve and look at the
vertices, the first and last vertex have weight = 0, but all others have a -NaN
value. This was caused by division by zero issues when minmax_weights[0] ==
minmax_weights[1].
|
|
remove MEM_sys_types.h which was a duplicate.
|
|
layer to that area
Remove REGISTER flag from GP draw operator, so redo wouldn't screw up regions.
|
|
include conflicts later on.
|
|
|