1
1

Compare commits

..

5728 Commits

Author SHA1 Message Date
c650ea9a13 GPencil: Add automatic sorting for Mask List
Now the masking is sorted in the same order of the layers. The order is recalculated when any layer is created, deleted or moved.
2020-02-11 19:37:47 +01:00
ad8ec8d828 GPencil: Move mask functions to BKE and fix delete layer
When delete a layer, all layers using this layer as mask must be updated.
2020-02-11 19:03:45 +01:00
956fafbc13 GPencil: Refactor: Fix completely hard stroke not being 100% hard
This was a problem with intensily lit gpencil objects.
2020-02-11 18:58:36 +01:00
19d04ce349 GPencil: Refactor: Remove the hardcoded sRGB final transform for viewport
Now viewport and render has the same look and colormanagement applied to it
2020-02-11 18:57:41 +01:00
6b24232474 GPencil: Refactor: Fix blend modes broken 2020-02-11 17:18:26 +01:00
d8c99ac34e GPencil: Refactor: Add per mask inversion capability
With this commit, masks can be inverted per layer. Inversion means the
mask becomes subtractive instead of additive. The base visibility does not
change depending on the first type (i.e: if ther is nothing in the mask
layer, nothing will be masked regardless of the mask type).
2020-02-11 17:12:39 +01:00
bc25c6af69 GPencil: Change Stroke Order tooltip 2020-02-11 16:58:00 +01:00
b47affbd75 GPencil: Reset Mask list index when remove first element 2020-02-11 16:47:25 +01:00
2b9ca08276 GPencil: Replace Add mask with popover menu
Also removed iinternal property used.
2020-02-11 16:43:45 +01:00
2741a165e2 Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_engine.h
	source/blender/draw/engines/overlay/overlay_extra.c
	source/blender/draw/intern/draw_manager_exec.c
2020-02-11 15:40:15 +01:00
b69d051068 Merge branch 'master' into greasepencil-object 2020-02-11 15:29:39 +01:00
117fc08e51 GPencil: Change icons for Invert Mask: ON/OFF 2020-02-11 15:25:50 +01:00
8b6ecdb77f GPencil: Implement Stroke Hardeness
Still pending the aspect ratio
2020-02-11 15:18:19 +01:00
8f3e4c8625 GPencil: Fix typo error in struct name for write
This produced errors loading the mask list.
2020-02-11 11:58:20 +01:00
678ce13c72 GPencil: Fix merge layers operator to merge Mask list 2020-02-11 11:52:09 +01:00
5bdcbfc42b GPencil: Add new Hide and Invert icons to Masks 2020-02-11 11:24:56 +01:00
2954aa4c3b GPencil: Add limit control for number of masking layers 2020-02-11 10:53:04 +01:00
7763b8fe79 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-11 09:01:57 +01:00
9024f91ecc Merge branch 'master' into greasepencil-object 2020-02-11 09:01:21 +01:00
9ef18d8b36 GPencil: Refactor: Add implementation of new mask list system
This system makes it possible to have up to 256 layers in a GPencil Object
that can be used as masks. User can use more than 256 layers and use mask
on them but the masking one must be from one of the first 256.

This commit does not include optimizations.
2020-02-11 00:06:55 +01:00
377657b734 GPencil: Add header checkbox in Mask Panel 2020-02-10 19:11:53 +01:00
c6da0351bd GPencil: Don't hide blend mode for mask layers 2020-02-10 19:04:31 +01:00
11d7e5db6a GPencil: Change Mask panel layout 2020-02-10 18:54:39 +01:00
93516dd758 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-10 15:53:47 +01:00
f75445c17e GPencil: Fix compiler error after merge 2020-02-10 15:52:39 +01:00
9cb9a69dcd Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-10 15:46:04 +01:00
6a37a83fc0 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/gpencil.c
	source/blender/editors/sculpt_paint/paint_ops.c
2020-02-10 15:43:57 +01:00
ade92dc98d GPencil: Add option to add mask layer one by one
Now it uses a list of layer using a pure dynamic enum list.
2020-02-10 11:29:32 +01:00
9918b6c453 Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2020-02-10 10:08:07 +01:00
a1b0c4ab9d Merge branch 'master' into greasepencil-object 2020-02-10 10:06:39 +01:00
b1059489b4 GPencil: Add invert mask option to Mask subpanel 2020-02-10 08:56:03 +01:00
6fc6a735d4 GPencil: Make Mask panel as Subpanel 2020-02-10 08:52:58 +01:00
57c8a07d30 GPencil: Don't add mask layers to mask list
This avoid  cyclic relations
2020-02-09 19:06:18 +01:00
12dfdd3dd0 GPencil: Back Mask Switch to 2 modes: ON/OFF 2020-02-09 18:16:44 +01:00
ddd5d35fba GPencil: New list of Masking Layers
This replaces the old unique layer for masking with a full list.
2020-02-09 18:16:27 +01:00
f7b794dc48 GPencil: Fix missing eyedropper options in toolbar 2020-02-08 20:23:38 +01:00
e14f886e6b Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-08 18:33:58 +01:00
5200ac1ef9 Merge branch 'master' into greasepencil-object 2020-02-08 18:33:19 +01:00
a9194f061e GPencil: Rename masking layer references when rename mask layer 2020-02-08 10:46:31 +01:00
94335f7989 GPencil: Use new BKE_gpencil_layer_named_get() instead of generic BLI 2020-02-08 10:32:25 +01:00
12777fb0f4 GPencil: Fix compiler warnings 2020-02-08 10:27:24 +01:00
ac7dfab0cb GPencil: Refactor: Fix display bug of strokes endpoints 2020-02-08 03:00:40 +01:00
10f2e39f48 GPencil: Refactor: New linked mask system
The new system is more flexible and a bit simpler from the code side.

Each layer has a mask layer slot. If filled with a correct layer name,
the mask layer will be rendered again in a separate buffer. This buffer
will then be used in the blend pass to modulate the opacity of the layer.

This approach is not 100% equivalent to the standard layering in most 2D
applications if using varying alpha on a mask applied to multiple layers.
However this technique does support any ordering arrangement of the masks.

The layers used as mask can now still render normaly.
2020-02-07 23:43:42 +01:00
4e2cb23bbd Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-07 19:10:15 +01:00
323808ca5a Merge branch 'master' into greasepencil-object 2020-02-07 19:09:33 +01:00
6fda1c8073 GPencil: Rename collision to boundbox
The initial use of the variables was collision, but now are used for more things, so it's better put a more general name.
2020-02-07 17:12:56 +01:00
4c492acba6 GPencil: Fix merge errors
Also, the modiifer reuse precalculated bounding box data.
2020-02-07 16:46:12 +01:00
c9ebd5fc16 Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/blenloader/intern/readfile.c
2020-02-07 16:38:21 +01:00
c0146170af Merge branch 'master' into greasepencil-object 2020-02-07 16:36:48 +01:00
2a84bfccdd GPencil: Remove unused drawing code for interpolate operator 2020-02-06 20:08:00 +01:00
ff7ccae322 GPencil: Remove old drawing from Interpolate operator
Now the drawing is done using the normal drawing engine and not the old drawing code.
2020-02-06 19:38:23 +01:00
327e90ad46 Cleanup: Interpolate operator
Replace loops and remove old unused code
2020-02-06 17:45:31 +01:00
b372ce3ec0 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-06 15:13:08 +01:00
3846212d1e Merge branch 'master' into greasepencil-object 2020-02-06 15:12:34 +01:00
8003bbe006 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-06 11:34:17 +01:00
330c0d8f4a GPencil: Add missing flag after merge
The vertex paint mode was not in master.
2020-02-06 11:32:56 +01:00
6711e59b32 Merge branch 'master' into greasepencil-object 2020-02-06 11:32:09 +01:00
742c5a0018 GPencil: Initial implementation of the layer mask relationship
Now, there is a new parameter to define the mask used by layer.

Still pending to remove old `use_mask` property in C and python (not removed yet to keep running the masking UI).
2020-02-05 19:46:21 +01:00
3883ffbefb Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-05 17:27:33 +01:00
e2d4e2403a Merge branch 'master' into greasepencil-object 2020-02-05 17:22:37 +01:00
300c64299c Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/versioning_280.c
2020-02-05 17:07:43 +01:00
21f7accd3b include last master changes
There was a problem in the last merge
2020-02-05 16:54:56 +01:00
7a88e2c158 GPencil: Fix function renaming after merge 2020-02-05 11:46:18 +01:00
23018417d5 Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/blenkernel/intern/gpencil_modifier.c
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
	source/blender/draw/engines/gpencil/gpencil_engine.c
	source/blender/draw/engines/overlay/overlay_extra.c
	source/blender/editors/gpencil/gpencil_fill.c
	source/blender/editors/gpencil/gpencil_utils.c
	source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
	source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
	source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
	source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
2020-02-05 11:42:35 +01:00
5f8ee2a36b GPencil: Fix renamed functions after merge 2020-02-05 11:39:55 +01:00
bc7a4d5bad Merge branch 'master' into greasepencil-object 2020-02-05 11:31:10 +01:00
76ef2f55d2 Cleanup: Remove unused function: give_node_material() 2020-02-05 11:25:50 +01:00
5314efc4cc T73589: Code Quality: Renaming on BKE_material.h
Old Name                             New Name
=========                            =========
init_def_material                    BKE_materials_init
BKE_material_gpencil_default_free    BKE_materials_exit
test_object_materials                BKE_object_materials_test
test_all_objects_materials           BKE_objects_materials_test_all
give_matarar                         BKE_object_material_array
give_totcolp                         BKE_object_material_num
give_current_material_p              BKE_object_material_get_p
give_current_material                BKE_object_material_get
assign_material                      BKE_object_material_assign
assign_matarar                       BKE_object_material_array_assign
give_matarar_id                      BKE_id_material_array
give_totcolp_id                      BKE_id_material_num
assign_material_id                   BKE_id_material_assign
clear_matcopybuf                     BKE_material_copybuf_clear
free_matcopybuf                      BKE_material_copybuf_free
copy_matcopybuf                      BKE_material_copybuf_copy
paste_matcopybuf                     BKE_material_copybuf_paste
BKE_material_init_gpencil_settings   BKE_gpencil_material_attr_init
BKE_material_add_gpencil             BKE_gpencil_material_add
BKE_material_gpencil_get             BKE_gpencil_material
BKE_material_gpencil_default_get     BKE_gpencil_material_default
BKE_material_gpencil_settings_get    BKE_gpencil_material_settings
2020-02-05 11:23:58 +01:00
6c815ebc5b Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-05 11:11:26 +01:00
c0e989d3e5 Merge branch 'master' into greasepencil-object 2020-02-05 11:10:54 +01:00
d32e08aecf GPencil: New function to create strokes 2020-02-04 17:36:47 +01:00
1d81a59d7a GPencil: Hide rotation parameter for Radial gradients 2020-02-04 15:47:29 +01:00
697ec7b55e GPencil: Patch old gradient materials and remove old variables 2020-02-04 15:43:56 +01:00
9323d063b4 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-04 12:41:30 +01:00
b1748fbc6d Merge branch 'master' into greasepencil-object 2020-02-04 12:41:01 +01:00
adcee4f751 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-04 09:10:04 +01:00
d09002adc4 Merge branch 'master' into greasepencil-object 2020-02-04 09:09:30 +01:00
fdff148b6b GPencil: Fix variable out of scope 2020-02-04 09:08:35 +01:00
7ce7bf0856 GPencil: Hide other frames in multiedit if Overlay main switch is OFF 2020-02-03 19:16:18 +01:00
602e9e4732 GPencil: Recalc geometry only for deform sculpt 2020-02-03 18:35:02 +01:00
d58e2c36d9 GPencil: Remove double calculation of geometry in Push sculpt brush 2020-02-03 18:16:17 +01:00
ed29fca3c0 GPencil: Fix crash when remove points in cyclic strokes
The geometry must be calculated for new joined stroke, not for parts to join.
2020-02-03 16:58:20 +01:00
273068f6da GPencil: Cleanup duplicated context function call 2020-02-03 10:37:13 +01:00
694107bd49 GPencil: Cleanup 2D code in sculpt
This operator can be used in 3D space only.
2020-02-03 10:19:51 +01:00
c65d96d56b Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-03 09:10:59 +01:00
ad4b41063e Merge branch 'master' into greasepencil-object 2020-02-03 09:10:09 +01:00
71fc909601 GPencil: Optimize triangulation calc in sculpt 2020-02-03 09:06:08 +01:00
56a5ffbf08 GPencil: Optimize evaluated frame copy 2020-02-02 23:36:41 +01:00
afab7bca17 GPencil: Optimize update pointer origin
The Link now is calculated using index not using BLI function.

This speedup a lot the function.
2020-02-02 23:31:02 +01:00
18a8306a19 GPencil: Fix reset all brushes in other modes
The operator was working with Draw brushes, but not with Sculp/Weight or Vertex Paint.
2020-02-02 22:50:04 +01:00
656fab5ec0 GPencil: Simplify brush initialization code 2020-02-02 22:25:06 +01:00
2d00121cca Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-02 22:22:11 +01:00
1d0a157614 GPencil: Fix tablet errors after merge 2020-02-02 22:06:48 +01:00
762e92e8d8 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-02 16:46:39 +01:00
ae05c503ee Merge branch 'master' into greasepencil-object 2020-02-02 16:45:44 +01:00
fa405209e6 GPencil: Improve collision rectangle size
The problem was the rectangle for mouse it was using the internal rectangle, but must be the external rectangle, or the corners will not be detected.

Also some code cleanup.
2020-02-02 16:43:46 +01:00
25de271008 GPencil: Recalc triangulation for active frame and delay others 2020-02-02 16:24:34 +01:00
59f37adac3 GPencil: Use bounding box collision instead of radius 2020-02-02 10:37:28 +01:00
237b77954a GPencil: Add collision checking for Sculpt
Instead to check all points, first a general stroke checking is done in order to avoid reading thousands of points.
2020-02-01 20:14:33 +01:00
9449808a93 GPencil: Small loop optimization 2020-02-01 18:09:59 +01:00
ea544f378a GPencil: Sculpt optimization
Reduce the calculation of filling geometry and matrix repetitive.
2020-02-01 17:46:40 +01:00
de487a8b01 GPencil: Cleanup unused function 2020-02-01 15:59:10 +01:00
166bacebc9 GPencil: In multiframe show only lines for non active frame
When use multiframe, it's important to see in full color only the active frame, and the other frames just with a line if the option is enabled.
2020-02-01 12:44:20 +01:00
6e862487a4 GPencil: Make wider the advanced brush topbar menu
With the default width, the texts are not fully visible.
2020-02-01 11:35:14 +01:00
ad52ba8999 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-02-01 08:56:28 +01:00
9c82e3fd69 Merge branch 'master' into greasepencil-object 2020-02-01 08:54:49 +01:00
80290684a3 GPencil: Cleanup unused function 2020-01-31 19:18:37 +01:00
8da7317058 GPencil: Fix problem drawing in instances with modifiers
There is a problem of performance if a instance uses modifiers because need a full copy. Need more investigation to find a faster method to duplicate the full datablock.
2020-01-31 18:14:57 +01:00
d27e852cb7 GPencil: Moves buffer drawing data to eval data
Instead to put the sbuffer data in the original datablock, now is copied to evaluated data, but without tagging all datablock that makes things very slow in fast drawing.

This changes removes the hacks to use the original datablock for buffers in the drawing engine.

Note: still there is a problem when a datablock is used several times with modifiers.
2020-01-31 17:02:47 +01:00
42d3a160bd GPencil: Fix crash when mask layer is empty
When the layer is empty, the mask framebuffer must be created.
2020-01-30 16:59:11 +01:00
395987d223 GPencil: Fix parameter missing after merge 2020-01-30 10:45:18 +01:00
938d0b5e2f Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
2020-01-30 10:33:31 +01:00
7a8e57f03d Merge branch 'master' into greasepencil-object 2020-01-30 10:26:54 +01:00
e66cc7d8b7 GPencil: Update child transform when parent is transformed
Now, if you move the parent object, the child moves too.
2020-01-29 13:17:57 +01:00
7459722473 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-29 11:20:57 +01:00
223b6398ef Merge branch 'master' into greasepencil-object 2020-01-29 11:20:28 +01:00
d0b8b49b44 GPencil: Use stack order for build modifiers
With the new evaluation, is possible to evaluate the modifiers in stack order.

This fix T66744
2020-01-28 22:59:52 +01:00
fb38f0daae GPencil: Basic parenting working
Still looks one frame late.
2020-01-28 22:40:26 +01:00
aad7fc9557 GPencil: Include original reference to layer in runtime data 2020-01-28 22:40:20 +01:00
3105dde8b3 GPencil: Move parent matrix function to BKE module
Also, the function has been renamed to use a better naming.
2020-01-28 22:40:13 +01:00
46280f5997 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-28 10:02:05 +01:00
ba9f26d4af Merge branch 'master' into greasepencil-object 2020-01-28 10:01:37 +01:00
8a43814e03 Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_engine.c
2020-01-27 11:35:28 +01:00
5518ed8e23 Merge branch 'master' into greasepencil-object 2020-01-27 11:34:32 +01:00
a76c527072 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-26 17:54:20 +01:00
135eada2db Merge branch 'master' into greasepencil-object 2020-01-26 17:53:48 +01:00
8d6e1a864b Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-25 13:14:08 +01:00
ff93ed2801 Merge branch 'master' into greasepencil-object 2020-01-25 13:13:39 +01:00
db916edb05 GPencil: New parameter to add stroke at head
This makes the BKE_gpencil_stroke_add function more flexible.
2020-01-25 13:09:35 +01:00
b5f16581c0 GPencil: Cleanup - Rename BKE function 2020-01-25 12:57:33 +01:00
e9da262467 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-24 19:14:50 +01:00
bdd605b17d Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/makesdna/DNA_brush_types.h
2020-01-24 19:13:37 +01:00
602822a846 GPencil: Cleanup some loops 2020-01-24 16:24:35 +01:00
277a51dfb6 GPencil: Cleanup - Replace more loops with LISTBASE_FOREACH 2020-01-24 10:36:12 +01:00
4c8cd0b512 GPencil: Cleanup - Replace more loops with LISTBASE_FOREACH 2020-01-24 10:29:27 +01:00
0aa0d9b346 GPencil: Cleanup - Replace frame loops by Macro LISTBASE_FOREACH 2020-01-24 10:15:43 +01:00
e313dd69c6 GPencil: Cleanup - Replace layer loops by Macro LISTBASE_FOREACH 2020-01-24 10:10:02 +01:00
399e8223ff Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-24 09:44:44 +01:00
aa8a950689 Merge branch 'master' into greasepencil-object 2020-01-24 09:44:21 +01:00
14db677520 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-24 08:24:03 +01:00
1923736154 Merge branch 'master' into greasepencil-object 2020-01-24 08:23:20 +01:00
2e7764b8f0 GPencil: Refactor: Make Stroke as dot (lonely vert stroke) use obj orient.
This is to be more consistent with the UV behavior of a full stroke.
2020-01-23 22:34:27 +01:00
6e2710f479 GPencil: Refactor: Fix strokes with only 1 vertex 2020-01-23 22:25:30 +01:00
b41d22ea0d GPencil: Vertex Color must be enabled always in Render 2020-01-23 17:03:35 +01:00
cfe8d5f255 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-23 16:58:21 +01:00
9eb6e12c93 Merge branch 'master' into greasepencil-object 2020-01-23 16:56:59 +01:00
5da5acee38 GPencil: Recalc UV along the stroke while drawing
The data was not calculated for the buffer stroke and the texture was not right.
2020-01-23 11:24:15 +01:00
cd90711f07 GPencil: Fix onion skin in render
This commit fix two problems:

1) The onion skin was visible in render if the layer had the onion skin to ON, but the general onion swith was off. This made different viewport and render.

2) The option to render onion skin was not supported. By default, the onion skin is hidden in render, but there is an option to enable in render output.
2020-01-23 11:07:02 +01:00
8e7161c90b Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-23 09:18:54 +01:00
b642d36bc6 Merge branch 'master' into greasepencil-object 2020-01-23 09:18:26 +01:00
b72485e579 GPencil: Refactor: Fix missing material offset 2020-01-22 22:19:20 +01:00
ebbb7bde83 GPencil: Cleanup - Remove unused function 2020-01-22 19:49:25 +01:00
3956a51b93 GPencil: Rename BKE function to use stroke prefix 2020-01-22 18:24:09 +01:00
78aea2873b Revert "GPencil: Cleanup - Add parentesis"
This reverts commit d5deb59d3b.
2020-01-22 17:11:17 +01:00
8326973ac2 GPencil: Enable Lights in Render mode
The lights were not enabled in render
2020-01-22 17:10:01 +01:00
d5deb59d3b GPencil: Cleanup - Add parentesis 2020-01-22 16:47:55 +01:00
a3cc14c6d5 GPencil: Change Title for Vertex Color parameters 2020-01-22 16:20:27 +01:00
5fd3d0a797 GPencil: Do not use locked layers in Sculpt 2020-01-22 16:07:29 +01:00
62de0faa70 GPencil: Fix Material preview render
This bug was introduced with fade objects
2020-01-22 11:06:32 +01:00
9acebbb0f5 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-22 10:33:37 +01:00
8f3153285e Merge branch 'master' into greasepencil-object 2020-01-22 10:33:06 +01:00
6f4a24bb20 GPencil: Cleanup - Add BKE_prefix to kernel function 2020-01-22 10:31:31 +01:00
8171e086e7 GPencil: Fix Vertex and Weight Paint did not use Lock Layer 2020-01-22 10:28:01 +01:00
7f8e1e1669 GPencil: Fix tablet code error after merge 2020-01-21 19:30:01 +01:00
bada831b1d Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-21 19:01:25 +01:00
39e83ff843 Merge branch 'master' into greasepencil-object 2020-01-21 19:00:49 +01:00
9800890886 GPencil. Tag datablock when In Front property is changed 2020-01-21 18:06:05 +01:00
f988869434 GPencil: Add support for Object In Front option
Still need a small change in RNA to tag datablock when property is changed.
2020-01-21 18:06:00 +01:00
5203d0ca48 GPencil: Implement Fade 3D objects 2020-01-21 16:03:30 +01:00
0bd3484d7d GPencil: Implement grease pencil object fade 2020-01-21 15:39:02 +01:00
144f9e588e GPencil: Rename gpencil_paper to fade_objects
The name was not clear now because is not a "paper" in front of the 3d meshes as it was done in old system.
2020-01-21 15:38:55 +01:00
40ac43ba2b Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-21 10:51:29 +01:00
3fd72a59de Merge branch 'master' into greasepencil-object 2020-01-21 10:50:45 +01:00
762bf9f328 GPencil: Cleanup old debug line 2020-01-21 09:23:24 +01:00
43ce8e6308 GPencil: Use BKE function to duplicate stroke 2020-01-21 09:20:48 +01:00
29c37219bf GPencil: Add new parameter to BKE_gpencil_stroke_duplicate to copy points 2020-01-21 09:08:26 +01:00
abe51900fa GPencil: Fix missing triangles data duplication
Now this data must be copied all times when a stroke is duplicated.
2020-01-20 19:32:11 +01:00
689c042b2d GPencil: Implement Fade Layers 2020-01-20 17:49:02 +01:00
524fdc23f2 GPencil: Cleanup unused variable for old derived_frames array
The variable layer_index is not required now.
2020-01-20 16:51:58 +01:00
2df526651a Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-20 16:21:12 +01:00
edf310d324 Merge branch 'master' into greasepencil-object 2020-01-20 16:19:54 +01:00
8061f2a4d1 GPencil: Reduce Fill opacity while drawing
This is used when fill strokes to be able to see the lines below and make a more precise filling. This opacity will be reset in the final fill and it's only while drawing.
2020-01-20 15:47:12 +01:00
5babbdfc54 GPencil: Cleanup comment 2020-01-20 15:44:12 +01:00
44200957dd GPencil: Cleanup old runtime data not used 2020-01-20 15:43:29 +01:00
8c0dd76757 GPencil: Move duplicated sbuffer vertex color set to function 2020-01-20 15:35:28 +01:00
4109094362 GPencil: Fix missing stroke color while drawing when use Vertex Color 2020-01-20 13:46:38 +01:00
1593a3fda6 GPencil: Fix Fill color when using Vertex Color 2020-01-20 13:27:04 +01:00
366663e47b GPencil: Convert Vertex Color to Linear from Palette or Brush color
Grease pencil works in linear, but the brushes and palettes no.
2020-01-20 13:16:28 +01:00
134f8e19f5 GPencil: Fix Fill opacity factor in Fill tool 2020-01-20 11:55:54 +01:00
9cccf87cbb GPencil: Fix Fill missing while drawing and new draw strokes 2020-01-20 10:33:21 +01:00
bc889e5635 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-19 17:21:46 +01:00
7ed83fce96 Merge branch 'master' into greasepencil-object 2020-01-19 17:21:13 +01:00
78783b3e16 GPencil: Test modifiers Tint and Hue/Saturation to use material if the Vertex color is not active. 2020-01-19 17:20:24 +01:00
46ccd9efac GPencil: Fix error in convert to Vertex Color
It was not checking if the alpha of tha material was > 0 to detect if Fill and/or Stroke material.
2020-01-19 17:19:35 +01:00
cbce9a0c83 GPencil: Fix Color properties using sRGB
The colors were wrong because now all is Linear.
2020-01-19 16:46:35 +01:00
dbf4ddbe16 GPencil: Move opacity factor to stroke from runtime
If the modifier is applied, need to be in the stroke.

Note: Maybe we need to active this value in some sculpt brush to define the opacity of the Fill, because when you apply the modiifer, you can only replace the value using the modifier again. Other solution would be a reset opacity operator.
2020-01-19 16:35:54 +01:00
52c6857486 GPencil: Fix Opacity modifier for Fill
Now the modifier is able to apply opacity to the Fill area as it was in previous versions.
2020-01-19 16:21:44 +01:00
b847861b6c GPencil: Refactor: Reuse GPENCIL_MaterialPool across multiple objects
This minimize the number of UBO we create and the number of UBO switching
we have to do to render each objects.
2020-01-19 02:12:59 +01:00
0d0bfd3c36 GPencil: Fix slow calculation in Edit transformations
Now the triangulation is only calculated once by stroke, not for each point.
2020-01-18 16:31:47 +01:00
db18c87785 GPencil: Fix color modifiers
With new draw engine implementation the old system did not work.
2020-01-18 15:55:03 +01:00
c64c51ee4d Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-18 11:54:03 +01:00
b3c18f037f Merge branch 'master' into greasepencil-object 2020-01-18 11:52:58 +01:00
4d939ff47a GPencil: New evaluation of derived frames and Filling calculation
As grease pencil was created before depgraph, it was using a custom solution to create derived data to apply modifiers on top. With the new refactor of the drawing engine, we need to have the runtime data at datablock (bGPdata) level to share between instances, but also we neeed to have separated eval data because different objects can use different modifiers (equals to actual mesh_eval logic). The old derived frame array solution is not valid anymore.

The initial idea was to make a full copy of the datablock in a separated eval copy, but testing this solution, it was very slow, so now, the full copy is only done once, and later, only the active frame data is updated (see note below).

In a future development, the ideal solution would calculate all frames at the same time and only copy again if something changes, but now this change is out of scope. I have been performing tests and with this "only active frame" copy,

Also, this solution simplifies several areas of the code, because now it's not necessary to deal with derived frame array, and just use datablock as is.

This update also includes the following:

* How the filling information is managed. Before, the triangulation data was created only during drawing process, and it was not saved. With the new engine, this information must be available always, so instead to calculate in drawing time, now the information is saved and generated or updated each time the stroke is modified. To have the filling information calculated improves FPS and simplify drawing and modifier evaluation code.

* Remove unused parameters related to old Filling calculation logic. This also simplifies the UI panels.

* Added simplify modifier options. This was removed, but after last changes it's good to have as before.

Differential Revision: https://developer.blender.org/D6597
2020-01-18 11:51:14 +01:00
cb089c25e2 GPencil: Refactor: Speedup: Add drawcall merging of consecutive strokes
This reduces driver & DRW overhead when a lot of strokes are drawn with
the same material pool.
2020-01-18 00:42:43 +01:00
ffe04df25e Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-17 22:14:47 +01:00
8b7985e1e4 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-17 22:14:12 +01:00
2d791535bb Merge branch 'master' into greasepencil-object 2020-01-17 22:13:25 +01:00
f5ebc81cd9 Cleanup: Fix comment 2020-01-17 17:43:47 +01:00
018c3826de Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-17 16:38:52 +01:00
4a1df929be GPencil: Fix subversion patch number 2020-01-17 16:38:12 +01:00
b2303f1677 GPencil: Cleanup - Make function static 2020-01-17 16:34:03 +01:00
8ec723da8c GPencil: Use existing eval copy for single users 2020-01-17 16:32:26 +01:00
36d8042c94 Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-17 14:44:18 +01:00
455f972e69 GPencil: Fix previously selected strokes shows selected after lock their layer 2020-01-17 14:43:20 +01:00
512a077166 GPencil: Refactor: Fix assert caused by framebuffer usage optimisation 2020-01-17 13:56:17 +01:00
022e37a443 GPencil: Optimize when use only one user 2020-01-17 10:40:56 +01:00
56d63d604c Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-17 10:10:57 +01:00
79ade9203d GPencil: Fix versioning code to check version 2020-01-17 10:10:19 +01:00
f4a62215cb Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-17 10:06:42 +01:00
efce497f6b Merge branch 'master' into greasepencil-object 2020-01-17 10:05:39 +01:00
accf488a35 GPencil: Fix segment fault in triangulation
If the number of points is < 2, clear the triangles data.
2020-01-17 10:04:42 +01:00
630472a615 GPencil: Move triangulation to modifiers and remove force fill recalc 2020-01-17 08:55:33 +01:00
8b02f761d9 GPencil: Refactor: Allocate GPU framebuffers only if necessary
Also use signed format only if needed.

Note that you cannot see subtractive, overlay and divide blend modes in
the viewport because of the srgb hack AND the current viewport framebuffer
format.
2020-01-17 01:11:48 +01:00
4ce820c819 Cleanup: Rename BKE_gpencil_calc_stroke_uv function to BKE_gpencil_stroke_uv_update 2020-01-16 22:56:45 +01:00
467f65ca20 Calculate Filling data when stroke is modified
Instead to calculate the geometry data in runtime, now this data is calculated when the stroke is created or modified and saved.
2020-01-16 22:54:58 +01:00
7656611924 Revert "Tag any stroke using the material property"
This reverts commit 07c2a935cf.
2020-01-16 18:41:07 +01:00
e61e177e4c Remove gp_style parameter 2020-01-16 18:40:59 +01:00
07c2a935cf Tag any stroke using the material property
This is required to calculate triangulation if the material is changed from NO Fill to Fill
2020-01-16 16:29:47 +01:00
ca0dd753d3 Fixes after first code review 2020-01-16 15:49:19 +01:00
a26735ac91 Create duplication of material array for eval datablock
If this copy is not done, when the datablock is cleared, the first datablock that use the material array, destroy the array, and in the second time the pointer is used, it's invalid.

Now, each datablock, uses its own material array.
2020-01-16 13:19:40 +01:00
bd72aa8984 Cleanup: More use of LISTBASE_FOREACH 2020-01-16 10:32:03 +01:00
3edadc47bf Cleanup: Use LISTBASE_FOREACH 2020-01-16 10:24:43 +01:00
e9e9934d1b Fix bug introduced in previous commit checking number of users
If the eval is not used for 1 user, the modifier is added again and again.

To avoid this eval, it would be required a flag to check if the modifier was applied before, but this need more work and we will do in the future.
2020-01-16 10:09:00 +01:00
648b77bf4b Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-16 08:41:54 +01:00
329205ef78 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-16 08:41:07 +01:00
57bb8b0c8a Merge branch 'master' into greasepencil-object 2020-01-16 08:40:28 +01:00
5648e8c738 GPencil: Show overlap option for Texture materials 2020-01-16 08:39:26 +01:00
6ef909bdf9 Do not create eval data if users is 1
If only one user, the default eval data is used and don't need a new copy
2020-01-16 08:35:15 +01:00
9061736e29 Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-15 19:14:51 +01:00
5192d3ca04 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-15 19:13:51 +01:00
71386813de Merge branch 'master' into greasepencil-object 2020-01-15 19:13:13 +01:00
58328607e7 Fix Sculpt to use Eval data 2020-01-15 19:12:27 +01:00
82d2d770c1 Cleanup: Remove ToDo comments 2020-01-15 19:08:45 +01:00
85279c6883 Fix Weight Paint to use Eval data 2020-01-15 19:08:11 +01:00
2fd4893534 Fix Vertex Paint to use Eval data 2020-01-15 18:13:39 +01:00
1fa7b7c011 Save reference to original frame 2020-01-15 18:13:23 +01:00
3363a7f616 Copy relevant variables to eval datablock
Instead to copy full datablock (very slow), just copy the active frame, but also the variables related to GPD and GPL.
2020-01-15 17:23:59 +01:00
c3a01757f8 Copy full datablock to Eval
Need to copy all, or all tags are missing
2020-01-15 16:23:03 +01:00
7ff385d854 Revert "GPencil: Fix missing edit points with modifiers"
This reverts commit 6c9f72c1b2.
2020-01-15 16:05:05 +01:00
6c9f72c1b2 GPencil: Fix missing edit points with modifiers
The flag was updated in original datablock, but not in eval copy.
2020-01-15 11:51:36 +01:00
3e858b463b Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-15 11:11:11 +01:00
749c51181a GPencil: Set default vertex color to White 2020-01-15 11:09:57 +01:00
5838336801 Cleanup compiler warnings 2020-01-15 10:41:29 +01:00
b864fd7c66 Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-15 10:22:01 +01:00
2bcf9a7d22 GPencil: Fix merge error 2020-01-15 10:20:37 +01:00
ee91b4f9f8 Cleanup: Reformat fill functions 2020-01-15 10:10:15 +01:00
24c595c0d2 Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-15 08:52:12 +01:00
a008dba54c GPencil: Fix merge error 2020-01-15 08:51:39 +01:00
3e5475d12e Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/draw/engines/overlay/shaders/outline_prepass_frag.glsl
	source/blender/draw/intern/draw_manager_exec.c
	source/blender/editors/gpencil/drawgpencil.c
2020-01-15 08:48:43 +01:00
670d96f737 GPencil: Cleanup unused code 2020-01-15 08:40:23 +01:00
6a0ab6dbce Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2020-01-15 08:36:55 +01:00
927bcdac9a Cleanup: reduce if levels 2020-01-14 19:58:37 +01:00
d0865adc57 Fix missing modifiers when apply transform 2020-01-14 19:37:47 +01:00
75d0559b04 Cleanup: Remove unused code and old comments 2020-01-14 18:11:59 +01:00
2d943d616f Back again Simplify Modifiers option 2020-01-14 17:49:25 +01:00
bf488402df Fix error in previous commit
The do_modifiers var was wrong
2020-01-14 17:18:02 +01:00
e0bb1e8c07 Cleanup code 2020-01-14 17:05:42 +01:00
903242a817 Fix more problems with selection 2020-01-14 16:42:52 +01:00
680e3c3031 Use evaluated data for selecction 2020-01-14 16:05:51 +01:00
ee09d2c127 Keep orig pointer references updated 2020-01-14 13:51:07 +01:00
edbebeb44f Move filling data and orig pointers evaluation to Depsgraph 2020-01-14 13:30:41 +01:00
e621c426e6 Merge branch 'greasepencil-refactor' into temp-gpencil-eval 2020-01-14 12:00:41 +01:00
4aa4509000 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-14 12:00:01 +01:00
7e7f9dde91 Merge branch 'master' into greasepencil-object 2020-01-14 11:59:14 +01:00
1febe8caef Use index to get evaluated frame 2020-01-14 11:56:03 +01:00
1a229f2e60 Split triangulation calculation 2020-01-14 11:33:14 +01:00
5493a30520 Cleanup: clarify comments 2020-01-14 11:08:36 +01:00
85779228d0 Cleanup: Split assign pointers 2020-01-14 11:02:04 +01:00
356fe859f2 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-13 18:10:35 +01:00
1727ffafee Merge branch 'master' into greasepencil-object 2020-01-13 18:09:59 +01:00
272370ae75 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-13 11:46:25 +01:00
44278f89a0 Merge branch 'master' into greasepencil-object 2020-01-13 11:45:44 +01:00
619257c045 More changes to make eval 2020-01-13 10:20:52 +01:00
661f30df51 Minimum process working but very slow 2020-01-12 13:08:07 +01:00
9d7b023808 GPencil: Test to move cache to datablock
This move the cache and assign orig pointers to Stroke and Points
2020-01-12 13:08:07 +01:00
a8b339ed0a GPencil: Fix missing Vertex Top options in texture material 2020-01-12 10:04:22 +01:00
003bb94501 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-12 09:57:26 +01:00
54c83ba487 Merge branch 'master' into greasepencil-object 2020-01-12 09:56:21 +01:00
50da5bf2cb GPencil: Refactor: Remove per layer random color jitter in wireframe
This is barely noticeable and makes it more confusing than anything in the
code. It's also faster and follow solid mode more closely.
2020-01-12 00:40:02 +01:00
c6ac861c06 GPencil: Refactor: Fix gradient behavior in texture color mode 2020-01-11 20:28:03 +01:00
1da03b2e80 GPencil: Refactor: Make Texture UV transform behave like normal 3D ones
Meaning we apply location then rotation then scale. This makes positioning
using the parameters easier.

Also since the gradients now use the same UV space, we can reuse the same
properties for the transform.
2020-01-11 20:27:31 +01:00
1d25838eb4 GPencil: Fix vertex color draw tool color blending
This removes the darkened color artifacts due to incorect alpha blending.
2020-01-11 19:37:03 +01:00
2e609a4582 GPencil: Refactor: Add fill vertex color suppport
This is a waste of GPU memory tho. It is duplicated for each gp points.

A better approach would be to store a per stroke data that we could fetch
using a stroke id.
2020-01-11 19:36:03 +01:00
0ce14a8e58 GPencil: Rename mix_color to vert_color
Also renamed mix_color_fill to vert_color_fill
2020-01-11 17:19:50 +01:00
00feefba10 GPencil: Refactor: Enable Vertex color mode in vertex paint
This is to follow the same behavior as meshes.
2020-01-11 16:41:16 +01:00
1efd6f0bd2 GPencil: Refactor: Fix is_render flag
This should fix VFX toggling for render mode only.
2020-01-11 16:12:57 +01:00
710601b5d0 GPencil: Refactor: Support solid mode color modes
This should be a 1:1 feature parity with what the workbench do with meshes
objects.
2020-01-11 16:12:57 +01:00
ec9b7b56d8 GPencil: Cleanup more unused code 2020-01-10 22:10:37 +01:00
e55dc7667a GPencil: Remove unused variable 2020-01-10 19:35:17 +01:00
bc774caaac GPencil: Refactor: Make Lighting effect only happen in lookdev & render mode
This makes the lighting behavior much more consistent with the other objects.
2020-01-10 18:47:56 +01:00
988c45924a Cleanup: GPencil: Remove unecessary comment 2020-01-10 17:11:22 +01:00
bd0809da61 GPencil: Refactor: Fix depth sorting with workbench render 2020-01-10 17:11:06 +01:00
086a45f0b7 Cleanup: GPencil: Move shader static variable to gpencil_shader.c 2020-01-10 16:56:50 +01:00
a1c0d06404 GPencil: Refactor: Fix surface projected stroke not shown during stroke 2020-01-10 16:56:50 +01:00
2ccb645095 GPencil: Replace tooltip 2020-01-10 16:53:24 +01:00
37136803ce GPencil: Split overlay options in columns 2020-01-10 16:35:43 +01:00
2ae1c97ab3 GPencil: Remove Vertex Paint Opacity for Edi & Sculpt 2020-01-10 16:08:32 +01:00
4e957d406f GPencil: Remove duplicated code 2020-01-10 16:05:34 +01:00
5d6eb25858 GPencil: Refactor: Enable gpencil engine if xray is not used
Thus making the gpencil opaque. However, partial transparency is still
unsuported.
2020-01-10 14:00:35 +01:00
80109a69ea GPencil: Refactor: Remove 3D stroke offset
This is conflicting with overlays and makes objects poke through each
others. As the 3D mode is intended to 3D drawing, it should have correct
3D positionning. This will however create a lot of zfighting artifacts on
overlapping strokes.
2020-01-10 13:59:35 +01:00
4f2c19b423 GPencil: Refactor: Fix crash when drawing on blank gpobject 2020-01-10 13:35:41 +01:00
934b719d0b GPencil: Refactor: Fix degenerate line in edit mode 2020-01-10 13:14:36 +01:00
5363370299 GPencil: Remove patch old files to Lights ON at Object level
This option breaks the colors, so only must be enabled for new objects.
2020-01-10 11:18:59 +01:00
c2a1883e63 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-10 11:03:05 +01:00
2ec4438fbf Merge branch 'master' into greasepencil-object 2020-01-10 11:02:24 +01:00
1b62c4cf68 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-10 09:04:05 +01:00
926fc0f04f Merge branch 'master' into greasepencil-object 2020-01-10 09:03:33 +01:00
938a26be8f Gpencil: Refactor: Support per layer random color in wireframe overlay 2020-01-09 22:09:56 +01:00
de4c23384f GPencil: Refactor: Add support for GPencil wireframes 2020-01-09 22:09:56 +01:00
2942e7eb03 GPencil: Refactor: Don't draw Gpencil objects if drawtype is not solid 2020-01-09 22:09:56 +01:00
b33c61a4af GPencil: Refactor: Add gpencil case to BKE_object_is_in_editmode 2020-01-09 22:09:56 +01:00
40828b96fc GPencil: Fix typo errors 2020-01-09 19:20:19 +01:00
7654045981 GPencil: Move Show Material Name to Overlay
Before there was a trick to use the object name option, but now it uses a separated option.
2020-01-09 19:16:05 +01:00
7f7de6051a GPencil: Hide Guide tools for other modes
Still pending hide the guide if using a tool not related.
2020-01-09 18:10:52 +01:00
ae529faa87 GPencil: Refactor: Add back guides and control points overlays
This use a special shader to draw points using uniforms. This is to avoid
creating a batch for each frame.

This is ok since the number of points is really low.
2020-01-09 17:52:58 +01:00
a5cd3cb99f GPencil: Rename GP_STYLE_* to GP_MATERIAL_*
This makes code easy to understand.
2020-01-09 17:28:06 +01:00
4f5a8c40a7 Cleanup: GPencil: Reuse iterator for color name 2020-01-09 17:09:23 +01:00
1f26f4f3c2 GPencil: More cleanup of old code 2020-01-09 16:38:43 +01:00
99b94d5485 GPencil: Patch old files to use lights to ON
Also, when add a new OB_GPENCIL, this option is enabled by default.
2020-01-09 16:32:51 +01:00
8677b82357 GPencil: Refactor: Fix green clear color and use srgb only in viewport 2020-01-09 16:17:06 +01:00
a3677b4536 Cleanup: GPencil: Remove GCC warnings 2020-01-09 15:58:13 +01:00
c1fbef93dc Cleanup: GPencil: Remove unused cache function
Thoses were old duplicates
2020-01-09 15:51:56 +01:00
42ad3282c5 GPencil: Refactor: Rewrite the render pipeline
This was really outdated. We do everything on the GPU now.
2020-01-09 15:51:56 +01:00
07724a7c73 Cleanup: GPencil: Remove GCC warnings 2020-01-09 15:51:56 +01:00
2672ec429f Cleanup: GPencil: Make code more readable 2020-01-09 15:51:56 +01:00
5196533f91 GPencil: Refactor: Make sbuffer batches managment more robust
This fix the slowdown issue caused by the triangulation of the stroke even
when fill wasn't needed. Now the fill buffer is only computed on demand.
2020-01-09 15:51:56 +01:00
746657fb9f Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-09 08:47:48 +01:00
d632971e48 Merge branch 'master' into greasepencil-object 2020-01-09 08:47:05 +01:00
af5d559f3f Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-08 22:50:16 +01:00
f568899db2 Merge branch 'master' into greasepencil-object 2020-01-08 22:47:30 +01:00
5da15bf180 GPencil: Continue loop if active frame is NULL 2020-01-08 19:22:59 +01:00
bcf23c5d5d GPencil: Tag datablock when init stroke 2020-01-08 19:17:43 +01:00
b6ff712af2 GPencil: Refactor: Remove last occurence of stl->storage 2020-01-08 18:06:51 +01:00
27bd836326 GPencil: Cleanup compiler warnings 2020-01-08 17:41:06 +01:00
10c5a7bb4c Cleanup: Add const 2020-01-08 17:35:27 +01:00
cb385abfe7 GPencil: Remove unused parameter 2020-01-08 17:30:49 +01:00
c8aad8defa GPencil: Cleanup - remove more ToDo and unused code 2020-01-08 16:56:53 +01:00
baeac830ae GPencil: Cleanup - Remove unused function 2020-01-08 16:49:01 +01:00
141885f9a7 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-08 16:39:31 +01:00
d7222a59c8 Merge branch 'master' into greasepencil-object 2020-01-08 16:38:45 +01:00
0af4a286bc GPencil: Cleanup unused code 2020-01-08 16:34:26 +01:00
0801557bef GPencil: Cleanup - Remove unused code and module 2020-01-08 16:32:18 +01:00
1a3bc6087c GPencil: Cleanup - Rename functions 2020-01-08 16:28:21 +01:00
67e38d313b GPencil: Cleanup 2020-01-08 16:22:36 +01:00
5af6cd1a22 GPencil: More cleanup 2020-01-08 15:46:18 +01:00
38630072f3 GPencil: More cleanup 2020-01-08 15:46:18 +01:00
b171e40d0c GPencil: Refactor: Fix outline depth mixing
This uses a costly depth reprojection in the fragment shader. This might
get optimized a bit in the future.

Unfortunately it's the only way to get the same accurate depth as what the
gpencil engine outputs.
2020-01-08 14:57:13 +01:00
d9f0885050 Gpencil: Refactor: Overlay: Fix crash when no gpencil object is active 2020-01-08 14:57:13 +01:00
2aee22c769 GPencil: First step to clear old code after refactoring
Still need more clear.
2020-01-08 13:10:31 +01:00
eea8144eb7 GPencil: Display Points and Edit lines by mode
Support different selection modes.
2020-01-08 12:43:54 +01:00
66d9c828b7 GPencil: Cleanup compiler warning 2020-01-08 11:04:24 +01:00
96d8f1b927 GPencil: Replace value by define
Instead to use hardcoded value, use the define.
2020-01-08 10:51:51 +01:00
6d84d2d301 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-08 10:24:56 +01:00
39aa15caca Merge branch 'master' into greasepencil-object 2020-01-08 10:24:14 +01:00
3b27d75f45 GPencil: Refactor: Add canvas grid 2020-01-07 20:15:41 +01:00
3cf0895bde GPencil: Refactor: Fix crash when using alt+b clipping 2020-01-07 20:15:41 +01:00
62f4eb5f1d GPencil: Refactor: Fix weight paint not working 2020-01-07 20:15:41 +01:00
31700ba657 Overlay: Allow alpha blend passes to write to the line buffer 2020-01-07 20:15:41 +01:00
eb6a46be2d GPencil: Move Strokes Directions to Overlays
Before was part of the datablock.

Also some cleanup in annotations.
2020-01-07 19:53:25 +01:00
1762cd3412 GPencil: Refactor: Add Weight Paint support 2020-01-07 17:42:23 +01:00
6ac1f2eff2 GPencil: Refactor: Overlay: Add hide selection option back 2020-01-07 17:42:23 +01:00
9722468109 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-07 17:00:42 +01:00
d834783387 GPencil: Enable Annotations by default in 2D template 2020-01-07 17:00:02 +01:00
96c238dddb GPencil: Add Annotation tools to Vertex Paint mode 2020-01-07 16:55:12 +01:00
b9b577e3d1 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-07 16:45:47 +01:00
7ac0d86582 GPencil: Fix several issues with Vertex Paint
Using big brush radius gets weird values.
Add missing some UI options
2020-01-07 16:45:06 +01:00
6d479b4d2b GPencil: Refactor: Fix crash in vertex paint mode 2020-01-07 15:48:32 +01:00
7025910e88 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-07 15:46:50 +01:00
35c2d3fb5d GPencil: Fix damaged Overlay panel in Vertex Paint mode 2020-01-07 15:46:29 +01:00
8c378e8517 GPencil: Fix damaged Overlay panel in Vertex Paint mode 2020-01-07 15:45:34 +01:00
55f38e453c GPencil: Refactor: Edit Mode: Add support for minor features
Add support for stroke color, vertex opacity and show stroke endpoints.
2020-01-07 15:30:41 +01:00
41c45aef96 GPencil: Refactor: Fix multiedit having less predecence than onion skin 2020-01-07 15:30:41 +01:00
d333b0c6cb GPencil: Refactor: Disable GPencil Outline in edit mode 2020-01-07 15:30:41 +01:00
a1285eb4d8 GPencil: Refactor: Edit Mode support. 2020-01-07 15:30:41 +01:00
75fc2bdf02 GPencil: Refactor: Fix old implementation crashing on startup 2020-01-07 15:30:41 +01:00
b83692e11a GPencil: Refactor: Replace Stroke Miter break by rounded corners
Also fix stroke ends being twice too long.
2020-01-07 15:30:41 +01:00
981c49ff4c GPencil: Refactor: Add outline overlay
This does not work correctly on square & dot strokes.

Also another issue is the depth blending. We need to fix the depth of
the outline geometry to match the 2D projection we do in the gpencil engine.
2020-01-07 15:30:41 +01:00
fb51417370 GPencil: Refactor: Move vertex shader logic to gpencil_common_lib.glsl
This is to be able to reuse the code in other engines/shaders.
2020-01-07 15:30:41 +01:00
93c9347e9c GPencil: Refactor: Use drawcall matrices instead of custom one 2020-01-07 15:30:41 +01:00
41cef139ad GPencil: Refactor: Move batch cache functions to DRW module
This is in preparation of drawing the overlays.
2020-01-07 15:30:41 +01:00
a0caa9e6b1 Cleanup: GPencil: Move GP_MATERIAL_BUFFER_LEN define to a common place 2020-01-07 15:27:51 +01:00
154fa8b853 GPencil: Refactor: Move iterator to BKE 2020-01-07 15:27:51 +01:00
94e18b10be Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-07 14:15:31 +01:00
fb83859278 Merge branch 'master' into greasepencil-object 2020-01-07 14:14:51 +01:00
025cc51a5a GPencil: Fix wrong functions name after merge 2020-01-07 12:55:42 +01:00
8a28f6e08d Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/editors/gpencil/gpencil_data.c
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/gpencil/gpencil_utils.c
2020-01-07 11:38:39 +01:00
70264903a4 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
2020-01-07 11:35:30 +01:00
0f09693f2a Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-07 09:16:28 +01:00
70eef1a800 Merge branch 'master' into greasepencil-object 2020-01-07 09:15:51 +01:00
f226d9007e Fix T72945: Can't Change the Thickness of a Stroke 2020-01-07 09:10:41 +01:00
8c32004af1 GPencil: Patch old files to enable layer lights switch
With the new switch at object level, the layers must be set to ON by default.
2020-01-06 22:46:45 +01:00
20e249274f GPencil: Move Use Lights to new Panel 2020-01-06 22:07:51 +01:00
1f0f71eb95 GPencil: Use main Use Lights switch at object level 2020-01-06 20:32:19 +01:00
a1b71fe54c GPencil: Remove Lights VFX
This has been replaced with real scene lights
2020-01-06 20:23:20 +01:00
30cc8a1f44 GPencil: Enable Use Lights for Layer for new layers
Now by default the option is ON because we have a new switch at object level.
2020-01-06 20:11:12 +01:00
e84f405e4c GPencil: New Use Lights flag at object level 2020-01-06 20:07:46 +01:00
d36378ab47 GPencil: Cleaunp compiler warning 2020-01-06 17:31:35 +01:00
cbb182cf53 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-06 17:29:32 +01:00
926b392b7d Merge branch 'master' into greasepencil-object 2020-01-06 17:28:49 +01:00
708d96cd63 GPencil: Change Monkey and Stroke primitives to linear color
Before it was using sRGB, but now all must be linear.
2020-01-06 17:14:16 +01:00
5abe5b154a GPencil: More changes to Simplify Tint 2020-01-06 17:08:21 +01:00
fa65619856 GPencil: First steps to add Simplify to refactor
Also, we have decided to reduce the number of simplify options because now it's not logic.

Still pending the tinting option.
2020-01-06 16:53:47 +01:00
b2b4d43e88 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-06 11:30:19 +01:00
4f9d4775a5 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
2020-01-06 11:29:33 +01:00
f832a3c9b0 GPencil: Disable AA resource creation when enabling Simplify 2020-01-06 11:21:36 +01:00
c4120da72d GPencil: Disable AA using simplify 2020-01-06 11:16:02 +01:00
68ede39034 GPencil: Add new AA simplify option
Also some cleanup in other simplify options
2020-01-06 11:08:59 +01:00
0239f6eafb GPencil: Remove AA parameter from UserPrefs
This will be replaced by a simplify option with the new refactored drawing engine.
2020-01-06 10:56:57 +01:00
893c51ca98 Cleanup: Fix compiler warning 2020-01-06 10:45:13 +01:00
b20d1a4512 GPencil: Rename BKE functions to follow standard naming 2020-01-06 10:40:42 +01:00
a45cabf8f2 GPencil: Rename ED_gp_get_drawing_reference to ED_gpencil_drawing_reference_get 2020-01-06 10:31:24 +01:00
c283f9ffb0 Cleanup: Typo error 2020-01-05 12:51:01 +01:00
dc4564aae0 GPencil: Add ToDo comment 2020-01-05 12:28:34 +01:00
15c1a2a3fe Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-05 09:48:52 +01:00
f415fee0ab Merge branch 'master' into greasepencil-object 2020-01-05 09:48:12 +01:00
08a37ea5c1 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-04 22:03:38 +01:00
912b3dd1a5 Merge branch 'master' into greasepencil-object 2020-01-04 22:03:00 +01:00
bad96dfdce Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-04 19:33:36 +01:00
bf3900a555 Merge branch 'master' into greasepencil-object 2020-01-04 19:32:05 +01:00
0f7bde8f6f GPencil: Refactor: Add SMAA as Antialiasing solution
This removes the need of MSAA and the cost associated with it.
We run edge detection on both revealage and color buffer.

However the implemntation is not perfect: The source buffers are in linear
color space and the edge detection implies gamma corrected (display) space.
This mean the algorithm fails to capture some color changes. To workaround
this, we increase SMAA_LUMA_WEIGHT which has the same effect as decreasing
SMAA_THRESHOLD. This works ok in most scenes since GPencil objects have
clean and sharply defined shapes.
2020-01-04 17:42:09 +01:00
7fd76c2645 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-04 08:46:49 +01:00
b318024e7d Merge branch 'master' into greasepencil-object 2020-01-04 08:46:03 +01:00
f0ba75639a GPencil: Refactor: Fix frame drawn without color when in onion skin + loop 2020-01-04 00:34:22 +01:00
eca698867c GPencil: Refactor: Fix black GPobjects in hero files
This was due to missing light ubo. Now we use persistent uniform to avoid
missing a rebind.
2020-01-03 22:26:05 +01:00
94d228a4e4 GPencil: Refactor: Add stroke fast drawing
This use the same behavior as previous implementation. It uses a temp
buffer to store the screen and avoid redraw.

But this will be only on demand as the drawing may not match the final
look when releasing the pen. The UI option has not been added yet.

This mode still supports blending and VFX. Just stroke ordering with the
scene not supported.
2020-01-03 22:26:05 +01:00
08fa158f7a GPencil: Refactor: Improve current stroke drawing interleaving
This fixes issues with stroke sorting. The previous strokes were masking
the current stroke.
2020-01-03 22:26:04 +01:00
8a1cc77fdd GPencil: Refactor: Implement sbuffer stroke drawing
This is to be able to view strokes currently being drawn.
2020-01-03 22:26:04 +01:00
ce4005f806 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-03 10:07:00 +01:00
807fc09431 Merge branch 'master' into greasepencil-object 2020-01-03 10:06:16 +01:00
96a2c1bbc6 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-02 19:09:56 +01:00
b3b1e5f6c0 Merge branch 'master' into greasepencil-object 2020-01-02 19:09:10 +01:00
7f8b26aacf Cleanup: Fix compiler warnings 2020-01-02 13:01:01 +01:00
dd2f9525cb Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-02 12:55:40 +01:00
005df34aef Merge branch 'master' into greasepencil-object 2020-01-02 12:54:54 +01:00
12b5a1f919 GPencil: Fix missing Scale Thickness menu option
This was removed by error in merge.
2020-01-02 12:54:13 +01:00
7e014c9d06 Merge branch 'greasepencil-object' into greasepencil-refactor 2020-01-02 09:45:04 +01:00
6774c7bdb1 Merge branch 'master' into greasepencil-object 2020-01-02 09:43:31 +01:00
384f870f4d GPencil: Refactor: Add back gradient fill mode
For more consistent behavior, the radial gradient is drawn inside the 0..1
uv space as if it was a texture.
2020-01-02 02:01:54 +01:00
0de604f6ae GPencil: Refactor: Fix crash caused by material preview icons 2020-01-02 01:58:53 +01:00
9aff308902 Cleanup: GPencil: Fix Compiler warning about unused function 2020-01-01 03:58:32 +01:00
4d51bfecdb GPencil: Refactor: Fix onion overlay toggle
This make the assumption that the onion skins are always needed when.
This as a performance impact that will be fixed later.
2020-01-01 03:58:05 +01:00
1aeb21e56b GPencil: Refactor: Fix onion skining next frame drawing on top of active 2019-12-31 19:28:07 +01:00
589a889d23 GPencil: Refactor: Implement Onion skinning back
This new implementation changes a few things:
- The alpha is not dependent on the number of frames you choose to draw.
- The loop option affects more than one frame.
- The next frames are drawn on top of the active frame (TODO)
2019-12-31 19:28:07 +01:00
15525cac41 Cleanup: GPencil: Rename struct member 2019-12-31 19:28:07 +01:00
a6d30c064d GPencil: Refactor: Fix dot UV rotation at the end of strokes 2019-12-31 19:28:07 +01:00
6a51a61074 GPencil: Refactor: Remove image size from uv computation
Now UVs for line strokes is computed using only the pixel factor.
We can reintroduce the image size behavior easilly if needed but in a much
cleaner way.
2019-12-31 19:28:07 +01:00
6fead84d00 GPencil: Refactor: Fix issue with negative pressure
This happens to be a thing in some test file. Maybe at some point we will
patch them but for now we just fix the symptomes.
2019-12-31 19:28:07 +01:00
549a547f54 GPencil: Refactor: Add Stroke dot UV random rotation support
Note: This fixes a bug that was cropping the dots texture.
2019-12-31 19:28:07 +01:00
0d8a4528f7 GPencil: Refactor: Use stroke mask to cut dots shape
This removes the builtin fading of the dots. This should be reimplemented
as a material option for all stroke type instead.
2019-12-31 19:28:07 +01:00
3fc6f6c592 GPencil: Refactor: Add dot stroke object rotation mode 2019-12-31 19:28:07 +01:00
ac4abb99e9 Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-12-30 19:44:30 +01:00
433ab9018b Merge branch 'master' into greasepencil-object 2019-12-30 19:42:06 +01:00
d4046f8c47 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-30 13:42:46 +01:00
594f3b0cac Merge branch 'master' into greasepencil-object 2019-12-30 13:41:49 +01:00
e6372a6ad6 Cleanup: Add missing space line 2019-12-30 11:18:58 +01:00
1e9098efc1 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-30 11:17:44 +01:00
2e5548f25e Merge branch 'master' into greasepencil-object 2019-12-30 11:17:08 +01:00
6557695c8c GPencil: Fix Transform Fill toolbar and menu
This was removed by error in a merge
2019-12-30 11:15:23 +01:00
3037c84937 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-28 13:30:52 +01:00
9ac0441536 Merge branch 'master' into greasepencil-object 2019-12-28 13:30:19 +01:00
84bf68186d Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-27 17:40:13 +01:00
6faa749192 Merge branch 'master' into greasepencil-object 2019-12-27 17:39:29 +01:00
d5cd4f31b1 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-26 13:17:48 +01:00
0d1a4fcfde Merge branch 'master' into greasepencil-object 2019-12-26 13:17:10 +01:00
69af3e82c0 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-25 11:22:42 +01:00
03e038208f Merge branch 'master' into greasepencil-object 2019-12-25 11:21:54 +01:00
b7d1cd3e00 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-23 12:56:12 +01:00
becb1df4cc Merge branch 'master' into greasepencil-object 2019-12-23 12:55:30 +01:00
8beb7c838f GPencil: Refactor: Stroke Caps: Fix a few issues
- Fix stroke cap flickering
- Fix broken cyclic strokes
- Increase corner split angle from 45° to 60°.
2019-12-23 01:56:43 +01:00
e42f30d45e GPencil: Refactor: Implement rounded caps
This was a bit tricky to do it cleanly. We create a mask using the stroke
point coordinates and extend the stroke geometry to uncover the mask if the
round caps are needed.

This was needed to be able to workaround the projection artifact of uvs.

Note that this code could be used for stroke shape in the future.
2019-12-21 21:11:30 +01:00
fe7558cbe2 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-21 16:03:42 +01:00
14b697c972 Merge branch 'master' into greasepencil-object 2019-12-21 16:01:13 +01:00
c1bd862d3a Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-21 08:52:40 +01:00
a89beff293 Merge branch 'master' into greasepencil-object 2019-12-21 08:51:57 +01:00
6af1309e05 GPencil: Refactor: Make light power match cycles and EEVEE
This was eyeballed with colormanagement being off. So I wouldn't be
surprise if this comes out not perfect.
2019-12-21 01:53:15 +01:00
42580ddf92 GPencil: Refactor: Use more correct depth merge approximation for 2D object
We now use a plane that follows the computed shading normal.
The plane follows the camera rotation but also takes the gpobject volume
into account.
2019-12-21 01:21:46 +01:00
685c94eacb GPencil: Refactor: Use normal approximation for lighting
We compute the normal using the bounding box size and the view vector to
the center of the bounding box. We then scale the normal w.r.t. the BBox
size and transform it back to world space. This gives us a flat normal
for objects without depth and a rotating normal for object that are
not.

This will also be used for correct depth mixing.
2019-12-21 01:21:46 +01:00
c5492121df GPencil: Only patch grease pencil objects 2019-12-20 19:35:08 +01:00
9e10f0ef15 GPencil: Patch colors to Linear
All colors have been patched to Linear and also changed to PROP_COLOR instead of PROP_COLOR_GAMMA.

The colors have been patched in VFXs and Modifiers.
2019-12-20 19:27:48 +01:00
40528d14f9 GPencil: Remove use_solo_mode from Top Layer Popover 2019-12-20 16:55:40 +01:00
4d1ebfb55e Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-20 16:37:32 +01:00
1ee25cbebb Merge branch 'master' into greasepencil-object 2019-12-20 16:36:47 +01:00
f6e760b1fd GPencil: Change Eyedropper and Curve conversion to Linear 2019-12-20 16:34:04 +01:00
241ceceac8 GPencil: fix compilation error 2019-12-20 13:53:05 +01:00
c0ecde568e Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-20 10:46:32 +01:00
ceec52a45c Merge branch 'master' into greasepencil-object 2019-12-20 10:45:54 +01:00
38d0e417f4 GPencil: Remove temp color conversion to Linear 2019-12-20 10:43:15 +01:00
a00fdc2898 GPencil: Patch old files color to Linear
Still pending to review VFX and Modifiers.
2019-12-20 10:38:43 +01:00
8f9c04762e GPencil: Refactor: Blur Fx: Implement DoF option and fix radius world size
The size of the blur is now proportional to the distance to the camera
and the object scale (just like any other effects).

The Depth Of Field now works and always match the Circle of confusion of
cycles/EEVEE.
2019-12-20 01:51:20 +01:00
ec5b795d11 GPencil: Refactor: First step to get rid of sRGB
This patch removes sRGB from the rendering pipeline. All color that
enters shading is a Linear color. Only the final composite shader is
still using sRGB as display transform for now (will later be replaced by
full OCIO transform).
2019-12-20 00:14:16 +01:00
c0981f4a15 GPencil: Refactor: Add world ambient lighting 2019-12-19 22:38:51 +01:00
3d2d9c7c5a GPencil: Refactor: Implement "Use Lights" toggle
We use a ubo containing only a white ambient light to simulate no lighting.
2019-12-19 22:38:22 +01:00
907e99d08d GPencil: Refactor: Add other light types
We approximate area lights using the same code used by spot lights.
2019-12-19 21:20:36 +01:00
2d3e86f2b0 GPencil: Refactor: Add new basic light system
This new light system for now only support point lights.

The number of lights is limited to 128.
2019-12-19 21:20:36 +01:00
0900fa01c6 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-19 17:41:33 +01:00
0818565d0b Merge branch 'master' into greasepencil-object 2019-12-19 17:40:45 +01:00
6f84cef51a GPencil: Change tooltip 2019-12-19 17:26:44 +01:00
3d7a8062af GPencil: New Use Lights option for Layers
This switch will be used to enable layer affected by scene lights.
2019-12-19 17:23:34 +01:00
bef31e42e1 GPencil: Fix compiler error 2019-12-19 16:49:47 +01:00
58abc19dde Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-19 14:42:33 +01:00
76567d6817 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_paint_common.py
	release/scripts/startup/bl_ui/space_view3d.py
2019-12-19 14:41:30 +01:00
59b38297d1 GPencil: More changes after merge 2019-12-19 14:39:59 +01:00
22b700247b merge 'master' into greasepencil-object branch 2019-12-19 14:30:51 +01:00
53de7a6620 GPencil: Remove Transparent option in Swirl VFX
This has been deprecated.
2019-12-19 14:23:17 +01:00
ec3f0b7336 GPencil: Versioning patch for Colorize VFX
The old Gray and Sepia modes were not using the factor and now the blend is defined with that, so need to be set to 1.0f
2019-12-19 11:35:24 +01:00
12304efda8 GPencil: Display Colorize Factor for all modes
Now the factor is used in all modes.
2019-12-19 11:04:04 +01:00
b2cb2a703a Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-19 08:57:38 +01:00
408565a8dd Merge branch 'master' into greasepencil-object 2019-12-19 08:57:01 +01:00
96a3029ab9 GPencil: Fix missing mask icon in Dopesheet
The new mask icon was not displayed in Dopesheet channel.
2019-12-19 08:55:41 +01:00
0cc5a2bfd1 GPencil: Refactor: Add Swirl FX
The angle is no longer mulitplied by 8. We need to change the UI and patch
old files to preserve an appropriate slider feeling.

The Swirl FX (like others) is now affected by distance of the source object.

Transparent option has not been reimplemented as you can use masking for
that.
2019-12-19 01:30:54 +01:00
0509f4149e GPencil: Refactor: Add Wave FX
Use the same shader as flip fx because we only transform the uvs and
sample once.
2019-12-19 01:30:54 +01:00
27fa133435 GPencil: Refactor: Add Flip FX 2019-12-19 01:30:54 +01:00
c2d56d7caa Cleanup: GPencil: CamelCase for uniform and fix a wrong comparison 2019-12-19 01:30:54 +01:00
d56f1a5f44 GPencil: Refactor: Add Rim FX
Nothing has changed functionality wise.
2019-12-19 01:30:54 +01:00
c42ceb93c9 GPencil: Refactor: Put blend mode shader code into gpencil_common_lib.glsl
This is because the rim fx needs the same code.
2019-12-19 01:30:54 +01:00
7359bec21b GPencil: Refactor: Add Colorize FX
The behavior has been changed quite a bit to work with separated
transparency layer.

- The custom mode now just blend between the original image and the
  same image with the color changed and luma kept as is.
- Grayscale & Sepia mode now blend with the original image using the factor.
- The duo tone do not do a sharp separation of colors. It just color the
  original in 2 different color using a hard separation threshold.
2019-12-19 01:30:54 +01:00
6f6c25c681 GPencil: Set default VFX Shadow color to Gray 2019-12-18 19:16:24 +01:00
ce5e4f76dc Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-18 15:51:13 +01:00
b6dc2e4ba0 Merge branch 'master' into greasepencil-object 2019-12-18 15:50:38 +01:00
b4b08e37f0 GPencil: Remove arbitrary limit to only one VFX 2019-12-18 15:31:30 +01:00
426c04b921 GPencil: Change default values for Blur VFX 2019-12-18 15:28:01 +01:00
f9023f5196 GPencil: Replace hardcoded factor by definition 2019-12-18 10:54:44 +01:00
fa6a26e391 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-18 10:38:21 +01:00
c5e3ee26e7 Merge branch 'master' into greasepencil-object 2019-12-18 10:37:40 +01:00
eb5c5b3504 GPencil: Fix Layer UI 2019-12-18 03:13:59 +01:00
4f08463279 GPencil: Refactor: Add Shadow Effect
All the parameters are now locked in world space following the object
center.
2019-12-18 03:13:59 +01:00
2e5d299823 GPencil: Refactor: Add Glow effect
The glow effect is now additive. You cannot make black "glow" (whatever
that meant).
2019-12-18 03:13:59 +01:00
f2bc524e64 GPencil: Refactor: Add Pixelize effect
Bonus: the pixelize effect use the center of the object as pixelization
center. This improves stability of the effect.

We also use a 2pass downsampling to reduce the flickering.

The pixel size is now fixed in world space and dependant of object scale
and distance to camera.
2019-12-18 03:13:59 +01:00
3520b3379c GPencil: Refactor: FX: make the Blur not dependant on sampling parameter
The sampling parameter was in fact use as iteration step count in previous
implementation. New behavior is much more consistent and predicatble
2019-12-18 03:13:59 +01:00
38f537c588 GPencil: Refactor: Add invert masking 2019-12-18 03:13:59 +01:00
2d751d44ee GPencil: Refactor: Base implementation of VFX for gpencil
This new implementation is clearer and also process the colored alpha
compoment to preserve blending informations.

This is the base implementation containing a placeholder blur.

All the real effect implementation will follow in separate commits.
2019-12-18 03:13:59 +01:00
ecd3e224fa Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-17 19:56:30 +01:00
e2e89e92fe Merge branch 'master' into greasepencil-object 2019-12-17 19:55:43 +01:00
4a10a740eb Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-17 17:30:38 +01:00
9ddb20f9a3 Merge branch 'master' into greasepencil-object 2019-12-17 17:29:28 +01:00
bb0fc04609 Merge branch 'master' into greasepencil-object 2019-12-17 17:22:42 +01:00
42c7d533b6 merge branch 'master' into greasepencil-object 2019-12-17 17:19:11 +01:00
3673766ab9 GPencil: Hide Stroke panel for tools not equal to DRAW 2019-12-17 16:22:32 +01:00
e70cbd7208 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-17 15:58:28 +01:00
34a700dbc3 Merge branch 'master' into greasepencil-object 2019-12-17 15:57:49 +01:00
78d7b2b80a Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-17 08:53:55 +01:00
4fcfa08411 Merge branch 'master' into greasepencil-object 2019-12-17 08:53:17 +01:00
f6f30b490a GPencil: Remove Blur VFX limit of 1 effect 2019-12-17 08:49:47 +01:00
3fa64fe9b8 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-16 18:56:59 +01:00
cfb314bec4 Merge branch 'master' into greasepencil-object 2019-12-16 18:55:31 +01:00
d811bb724e GPencil: Move Stabilize Stroke subpanel lto bottom 2019-12-16 17:33:17 +01:00
f395e966bb GPencil: Cleanup commented lines of previous commit 2019-12-16 17:23:27 +01:00
e85354b15d GPencil: Group Brush panels in Stroke popover
Use too many popovers reduce space for layer popover.
2019-12-16 17:22:04 +01:00
60dac83b6e GPencil: Change again Eraser cursor to Display Cursor 2019-12-16 17:05:11 +01:00
8df7dfc85a GPencil: Change Show Brush to Show Cursor for Eraser 2019-12-16 17:00:51 +01:00
37f02905e7 GPencil: Change Cursor Panel texts 2019-12-16 16:59:51 +01:00
2ab0a44399 GPencil: Add cursor color for Tint 2019-12-16 16:26:17 +01:00
2f20d5ea13 GPencil: Ensure storage is initializated for renders
This failed in material preview generation.
2019-12-16 16:09:38 +01:00
01a8c68aca Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-16 15:41:12 +01:00
600ae498b3 Merge branch 'master' into greasepencil-object 2019-12-16 15:40:30 +01:00
a99ea06507 GPencil: Hide Panels depending of Tool 2019-12-16 15:39:56 +01:00
02836f3777 GPenciL: Fixes in UI
- Fix Sculpt stroke panel.
- Fis Subtract color in Cursor Panel.
- Move Boundary to Advanced panel
2019-12-16 15:31:23 +01:00
6662662fd8 GPencil: Remove duplicate custom cursor 2019-12-16 13:23:05 +01:00
cdb37889c5 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-16 12:38:29 +01:00
a16a6e2483 GPencil: Add missing options to Image menu after merge master 2019-12-16 12:35:22 +01:00
7e6e153799 Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
2019-12-16 10:56:05 +01:00
286ccc49b3 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_data_modifier.py
	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
	release/scripts/startup/bl_ui/properties_paint_common.py
	release/scripts/startup/bl_ui/space_view3d.py
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
2019-12-16 10:49:05 +01:00
e929968511 GPencil: Fix more damaged panels 2019-12-16 10:43:06 +01:00
5d8ed832a4 GPencil: Refactor: Fix mask blending 2019-12-16 01:18:32 +01:00
0742bc5087 Cleanup: GPencil: Simplify drawing logic. 2019-12-16 01:07:13 +01:00
0edf755317 GPencil: Refactor: Fix mask system not working in some scenes 2019-12-15 23:55:40 +01:00
e38cc86e78 GPencil: Add missing Vertex Panel 2019-12-15 23:46:09 +01:00
261c06019f GPencil: More UI fixes after merge
Still more issues pending.
2019-12-15 23:42:49 +01:00
c118b670f6 GPencil: First step to fix damaged UI by Brush panel refactor done in master
The patch done in master was done before the Sculpt and Weight brushes were real brushes and also before the Vertex Paint mode was implemented. As result of that, the merge of master has broken almost all panels of brushes and all Vertex Paint mode.

This commit only fix part of the damages.
2019-12-15 20:30:49 +01:00
a0b953374a GPencil: Refactor: Implement Opacity Masking
This is better than previous implementation but has a higher cost.

We render masked layer to a RGBA16F buffer and we then mask the revealage
and the color in a 2 pass blending.

This could maybe optimized a bit to reduce to 1 blending on recent hardware
but the cost will still be way higher than the stencil method.

On the plus side, there is less code change than with the stencil.
2019-12-15 15:42:11 +01:00
5e72f70d76 Revert "GPencil: Refactor: Add Top to bottom layer masking using stencil"
This reverts commit 6bcd877ebb.
2019-12-15 14:02:43 +01:00
5eacb5b237 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
	release/scripts/startup/bl_ui/properties_paint_common.py
	release/scripts/startup/bl_ui/space_topbar.py
	release/scripts/startup/bl_ui/space_view3d.py
	release/scripts/startup/bl_ui/space_view3d_toolbar.py

This commit has broken all new graese pencil Vertex Paint, Sculpt mode
and Weight mode and need a review.
2019-12-15 11:18:51 +01:00
6bcd877ebb GPencil: Refactor: Add Top to bottom layer masking using stencil
This uses the 8bits as binary mask layer. This is really
efficient but has the downside of not allowing gradient transparency.

This also allows for different masking ranges and even (maybe) masking
boolean operations (nested masks etc..) but implementing this sort of
this might complexify the UI and the implementation.

The reason we went for binary visibility is that our blending modes
cannot operate correctly if not using a bottom-up rendering of the
layers (due to low precision color buffers). So blending all masked
layers to another temp buffer or blending layer top to bottom is not
doable without loosing the blending features. The workaround for this
would be to use RGBA16F everywhere and use many double buffers. Which
would kill performance and is really unpractical.

Now we just limit the number of masks to be 8. Lifting this limit
is a todo.
2019-12-15 03:42:46 +01:00
9469f13b73 GPencil: Refactor: Fix crash caused by material preview render 2019-12-15 03:19:11 +01:00
3d78e02837 DRW: Add DRW_shgroup_stencil_set to set all stencil test values
This is to allow more fine tuning. The other function is
deprecated and need to be replace.
2019-12-15 03:14:19 +01:00
f8661a89f5 Revert "GPencil: Refactor: Change Mask Behavior"
This reverts commit eb3fe4c848.
2019-12-14 20:30:50 +01:00
eb3fe4c848 GPencil: Refactor: Change Mask Behavior
This is a work in progress Masking now done by a particular layer and
applied on all layers underneath.
2019-12-14 18:58:52 +01:00
8d6737a168 GPencil: Refactor: Fix broken selection 2019-12-14 18:58:52 +01:00
ecc5a50683 Cleanup: Sort flag options 2019-12-14 12:50:50 +01:00
d605ff84fb Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-14 10:02:15 +01:00
3b0ec6592b Merge branch 'master' into greasepencil-object 2019-12-14 10:01:38 +01:00
8ea92115f3 GPencil: Refactor: Speedup: Only blend pixels rendered in the layer 2019-12-14 03:31:10 +01:00
a3c998e4f3 GPencil: Refactor: Implement Layer Masking 2019-12-14 03:21:50 +01:00
fd548dea3c GPencil: Refactor: Fix Overlay Blend mode
There was a mistake in the implementation. The step were reversed and
alpha was affecting the blend result.
2019-12-14 03:21:29 +01:00
2cef0182fb GPencil: Refactor: Add depth merge pass
This pass merge the stroke depth to the 3D depth buffer. This makes GP objs
to mask overlays correctly.

2D objects depth is using the object center depth only. This is to be
improved.
2019-12-14 02:45:37 +01:00
dc2cc35a7b Cleanup: GPencil: CamelCase for uniforms 2019-12-14 02:39:21 +01:00
fc239df81c GPU: Framebuffer: Fix missing color mask 2019-12-14 02:36:59 +01:00
ecfb0b1273 GPencil: Refactor: Fix 3D stroke offset
The offset was way too big.
2019-12-13 21:25:07 +01:00
b9bcc12eb9 GPencil: Refactor: Add depth test in the fragment shader
Now the GPencil object can correctly intersect the scene.

Previously (old implementation) 2D GPencil objects would poke through
in front meshes in certain situations (depending on stroke order). This is
now fixed.

This does not fix the intersection with the overlays.
2019-12-13 21:24:12 +01:00
29b4dc1d16 GPencil: Refactor: Fix overlay blending math
A sign error in optimized code.
2019-12-13 20:18:29 +01:00
347a097a62 GPU: Texture: Fix mistake in format classification
sRGBA format is well defined for use with framebuffers (based on 3.3 spec).
2019-12-13 19:40:29 +01:00
436696b087 Cleanup: GPencil: Remove duplicated code 2019-12-13 19:40:29 +01:00
170680b544 GPencil: Refactor: Add support for layer blending
This break the compatibility of old blend files as the old implementation
was done incorrectly.

With new implementation, the layer blending can affect multiple object
and in certain case affect even the rendered background. Old implementation
was only affecting the layers beneath, not other objects.

This implementation is also ready to support vfx on top.

Some blend modes (divide and subtract) have some limitations. They cannot
be propagated to other objects. This is because we would need to use
signed float buffers everywhere (for background render) so that fixed
function blending does not clamp the blending values.
2019-12-13 19:40:29 +01:00
18c4fcb9a3 DRW: Add subtract blend logic
This is to support subtract blending with Multiple Render Targets
2019-12-13 19:40:29 +01:00
db21312bfb GPU: Framebuffer: Add GPU_framebuffer_multi_clear
This is to clear individual targets using a different color.
2019-12-13 19:40:29 +01:00
4ba94091be GPencil: Refactor: Add offscreen compositing foundation
This put all Grease pencil drawing into a separate buffer that is then
composited on top of the rendered image.

This framebuffer has 2 RGB color target (one color and one alpha) to be
able to record any color blend types.

Moreover these buffers are floating point (R11_G11_B10) which will allow
the use of linear colors.
2019-12-13 19:40:29 +01:00
4fbf78996b Merge branch 'greasepencil-object' into greasepencil-refactor
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-12-13 16:29:05 +01:00
200d8a1732 Merge branch 'master' into greasepencil-object 2019-12-13 16:27:29 +01:00
ab5a4bc51c GPencil: Refactor: Fix broken shader & undefined behavior 2019-12-13 00:34:32 +01:00
81436b95bd GPencil: Refactor: Implement Object sorting 2019-12-12 22:33:21 +01:00
3adcfeac96 GPencil: Refactor: Implement Stroke self overlap option
This is a novel approach were we use the depth buffer instead of the
stencil buffer. This allows up to ~1e24 different indices to draw to.
We use a DRW_STATE_DEPTH_GREATER to discard the fragment comming from the
same stroke.

Since we can have strokes that don't have this option, we use the point
indices instead of the stroke index to avoid changing the state during
drawing.
2019-12-12 22:33:21 +01:00
84b1a70f0d Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-12 20:24:38 +01:00
1682d9ff03 GPencil: Fix missing context menu in Sculpt 2019-12-12 20:24:00 +01:00
cb79f1b2cd Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-12 16:03:06 +01:00
ba78abef68 Merge branch 'master' into greasepencil-object 2019-12-12 16:02:29 +01:00
294b6730fe GPencil: Disable line for testing 2019-12-12 15:52:48 +01:00
9670645ccf GPencil: Remove Stencil Mask and Mix for Fill material
This is part of the refactor of the darwing engine.
2019-12-12 15:50:56 +01:00
bdb4e2b1c4 GPencil: Fix old files using Stencil Mask 2019-12-12 15:39:21 +01:00
1fbd437ccf GPencil: Remove properties use_stroke_pattern and use_stroke_texture_mix
WIP: Still the flags are used in drawing code to keep old files running and compare results. Need to be removed later.
2019-12-12 10:07:51 +01:00
80ed3e12e4 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-12 09:34:15 +01:00
d3c4d98246 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_data_modifier.py
	release/scripts/startup/bl_ui/properties_paint_common.py
	release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
2019-12-12 09:32:36 +01:00
458fa4c213 GPencil: Set Vertex Paint Opacity and Tint Factor to PROP_FACTOR 2019-12-12 09:30:04 +01:00
5cf56f6ae8 GPencil: Refactor: Implement layer tint 2019-12-12 03:05:48 +01:00
6e1eaa9160 GPencil: Refactor: Fix Fills texture color mixing 2019-12-12 02:47:49 +01:00
9ad8f9e3ba GPencil: Refactor: Add Dots & Square drawing type
Also add vertex color opacity
2019-12-12 02:24:20 +01:00
2494b982dd GPencil: Refactor: Improve stroke color mixing support
This is a more simple implementation. Blending is done in a way that it
supports the stencil functionallity out of the box. It is compatible with
vertex paint, stroke material color and texture color without exclusivity.

UI need to be reworked to remove the stencil option.
2019-12-12 02:24:20 +01:00
f883a9c9bb GPencil: Refactor: Add UV / Texture support to strokes 2019-12-12 02:24:20 +01:00
ea879f340a GPencil: Change order of the UI parameters for materials 2019-12-11 17:48:37 +01:00
2246ea1557 GPencil: Change step for Mix factors
The old step value was too high.
2019-12-11 17:31:33 +01:00
01af5f1768 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-11 16:48:11 +01:00
ff7e734f8c Merge branch 'master' into greasepencil-object 2019-12-11 16:46:48 +01:00
ce5454091c GPencil: Remove Checker Fill mode
This mode is redundant with textures and only adds complexity for something that can be solved easily using a checker texture.

Also, old files are patched as SOLID fill.
2019-12-11 16:43:27 +01:00
0f9486f4a4 Gpencil: Cleanup unused code 2019-12-11 16:19:53 +01:00
daf1a4f4fb Cleanup: GPencil: Use different random values for random effects 2019-12-11 16:15:35 +01:00
b1ac81095f Cleanup: GPencil: Rework code for clarity and remove compiler warnings
This should not change anythign
2019-12-11 16:18:41 +01:00
985a9dba61 GPencil: Refactor: Add basic vertex color support 2019-12-11 14:20:09 +01:00
25af6df87d GPU: VertexFormat: Fix assert off by one 2019-12-11 14:19:43 +01:00
a703faf38c GPencil: Fix error in Transform Fill
This code was damaged during a merge.
2019-12-11 11:39:53 +01:00
01eec04454 GPencil: Fix TRansform Fill UV error
During a merge, we removed this by error.
2019-12-11 11:31:11 +01:00
2d3c2510b9 GPencil: Rename "Boxes" mode to "Squares" 2019-12-11 10:35:50 +01:00
5f08a28304 GPencil: Remove ol UV data from triangle struct 2019-12-11 10:29:33 +01:00
6200ea886c GPencil: Refactor: Implement Checker Fill type
This is not matching the old implementation as the tranform order is
different. We may patch older files to match new impelementation.
2019-12-11 03:06:48 +01:00
076eb5c87a GPencil: Refactor: Add support for fill textures 2019-12-11 03:06:48 +01:00
018d778451 GPencil: Refactor: Put fill uvs into bGPDspoint
This is not the best place but that's a temporary solution.
2019-12-11 03:06:48 +01:00
24e6b2702d GPencil: Refactor: Rename gpencil_data.c to gpencil_draw_data.c
This is to avoid confusion with the already existing gpencil_data.c.
2019-12-11 03:06:48 +01:00
9d866f8b75 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-10 20:02:28 +01:00
969bb04703 GPencil: Fix errors after merge 2019-12-10 20:01:44 +01:00
89aa1a7f60 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/paint.c
2019-12-10 19:45:16 +01:00
9e448b035b GPencil: Remove UV from RNA
These were only for debug and now are not required
2019-12-10 19:09:45 +01:00
d2525ea872 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-10 14:10:14 +01:00
54c2f2644b Merge branch 'master' into greasepencil-object 2019-12-10 14:07:47 +01:00
6c608a25da GPencil: Moves filling recalc to evaluation section
Now, instead to recalc the filling of the strokes at drawing level, the calc is done when the derived frame is created after a depsgraph tag.

This separate the drawing of the evaluation process.
2019-12-10 12:17:59 +01:00
6bb9ec58d2 GPencil: Move cache recalc functions to shared module
This is the first step to move the recalc of the filling to the evaluation area (like modifiers) and not in the draw manager that must only draw.
2019-12-10 12:03:30 +01:00
456a2970ad Merge branch 'master' into greasepencil-object 2019-12-10 10:32:33 +01:00
910dea651c Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-10 02:11:32 +01:00
7734b00563 GPencil: Refactor: Add basic Material color support via UBO
For now there is at least one UBO per object. It is kept relatively small
to avoid overhead. When we implement sharing of UBOs accross objects we
could increase the material count per UBO and reduce the binding overhead.

This also put the BLI_memblocks in the ViewLayer instead of the viewport
storage list. This is because we need to correctly free UBOs when blender
quits. This can become a problem in the future but there are other places
like this in other engines so we should fix them all at once.
2019-12-10 01:43:41 +01:00
980d1d5527 BLI_memblock: Fix BLI_memblock_destroy not freeing all elements
This was happening if BLI_memblock_destroy was called on a memblock that
has not been cleared first.
2019-12-10 01:36:49 +01:00
5d80b481b4 GPencil: Refactor: Avoid crash when using the render pipeline 2019-12-10 01:01:19 +01:00
6d83b3ee3f Merge branch 'master' into greasepencil-object 2019-12-09 20:28:42 +01:00
a1f7ef4285 GPencil: Refactor how sample pixel 2019-12-09 18:24:15 +01:00
c9e4cc4f43 Merge branch 'master' into greasepencil-object 2019-12-09 16:57:26 +01:00
c5892a1c7d GPencil: Move get pixel function to shared module
Instead to have the code two times, move to BKE and share.
2019-12-09 16:56:24 +01:00
1f185740c4 GPencil: Refactor: Fix stroke end segment not drawn because of 180° angle
We just use safe normalize now. This just draw straight lines if the angle
is too sharp (or no lines at all if the line is parallel to the view).
2019-12-09 16:37:08 +01:00
4760d44e82 GPencil: Refactor: Rename variables to match naming convention 2019-12-09 15:48:57 +01:00
afecc4e976 GPencil: Refactor: Fix fill stroke indices 2019-12-09 14:02:38 +01:00
935198aa8a GPencil: Refactor: Fix miter of endpoints 2019-12-09 13:35:47 +01:00
02b25005a9 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-09 02:28:46 +01:00
090127099d GPencil: Refactor: Quick implementation of object matrices
This is just for testing. Not the final implementation
2019-12-09 02:28:06 +01:00
3701305e87 GPencil: Refactor: Add quick 3D/2D stroke ordering for testing 2019-12-09 02:16:40 +01:00
32b8eab5cf GPencil: Refactor: Add thickness support
This add CORRECT support for worldspace thickness to GPencil stroke.

However it does not perfectly match old implementation which was buggy.

Mitigation could be done via doversion but it is not the goal of this
commit.
2019-12-09 01:50:17 +01:00
6eb61d23c5 Merge branch 'master' into greasepencil-object 2019-12-08 17:06:14 +01:00
19e00afad9 GPencil: Fix error when srink stroke with Alt+S 2019-12-08 17:05:34 +01:00
6805012c48 GPencil: reduce pixel size in conversion 2019-12-08 17:00:32 +01:00
e87804f2ba GPencil: Refactor: Implement Miter corner logic
Not 100% complete, needs to fix the "corner" cases.
2019-12-08 15:14:57 +01:00
556d76c585 GPencil: Some tweaks to Generate from Image operator 2019-12-08 13:57:39 +01:00
a05408220d GPencil: New operator to generate Grease Pencil from images
This takes a image and generate a new grease pencil object and each pixel is a vertex point. THe image is generated by lines.

As an option, an inverted  mask can be generated
2019-12-08 13:16:58 +01:00
85da33681d Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-08 01:26:50 +01:00
8e3c891229 GPencil: Refactor: Add back basic fill drawing 2019-12-08 01:26:11 +01:00
a5e6e56a6d GPencil: Refactor: Draw gpencil strokes using instanced quad
Using the instance range drawing (DRW) & the attrib multiload (GPU) we
use the instancing of quad geometry to draw arbitrary thick lines using
only the vertex shader.
2019-12-08 01:23:17 +01:00
f7fc37e46c GPUVertFormat: Add GPU_vertformat_multiload_enable
This add the possibility to fetch multiple adjacent vertex data in a single
vertex shader invocation.
2019-12-08 01:18:27 +01:00
82c135816f Draw Manager: Add new DRW_shgroup_call_instance_range
This is to be able to create drawcalls that only render a range of the
instance buffer.

Very needed for the new GPencil stroke rendering.
2019-12-08 01:15:27 +01:00
bef4d2bf69 Merge branch 'master' into greasepencil-object 2019-12-07 20:03:34 +01:00
10c1823899 GPencil: Refactor: Use iterator to populate draw passes
Also remove a bug in gpencil_batch_cache_valid that prevented the use
of gpencil_batches_ensure more than once per redraw.
2019-12-07 18:22:16 +01:00
3d18884115 Merge branch 'greasepencil-object' into greasepencil-refactor 2019-12-07 14:57:14 +01:00
12034dc4aa GPencil: Refactor: Add new logic to create batches and store draw passes
We introduce a new set of temp objects (GPENCIL_tVfx, GPENCIL_tLayer,
GPENCIL_tObject) allocated in BLI_memblocks to allow fast traversal and
easy memory management.

We also introduce an iterator to iterate over visible strokes of an object
to avoid code duplication.

Strokes are all in one batch and the fill batch will only contain indices
to the stroke buffer.

For now the objects are only drawn at the center only with white 1px stroke
and all strokes are not interupted (the finish at center).
2019-12-07 14:56:27 +01:00
5c78ab5f6f Merge branch 'master' into greasepencil-object 2019-12-06 19:37:28 +01:00
e6fc0a39de GPencil: Use debug_value of 50 for testing new refactor
This is in order to test continuously while being able to compare against
previous implementation alongside.
2019-12-06 13:37:42 +01:00
71c7083e1e GPencil: Avoid full filling when no borders 2019-12-06 11:22:33 +01:00
669209b530 Merge branch 'master' into greasepencil-object 2019-12-06 10:27:52 +01:00
6e92345115 Merge branch 'master' into greasepencil-object 2019-12-05 13:46:47 +01:00
71ca840736 Merge branch 'master' into greasepencil-object 2019-12-05 10:20:40 +01:00
f2985489c2 Merge branch 'master' into greasepencil-object 2019-12-04 16:08:32 +01:00
f3e0287ca8 Merge branch 'master' into greasepencil-object 2019-12-04 14:35:09 +01:00
b50a7272f6 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
	release/scripts/startup/bl_ui/space_dopesheet.py
	source/blender/blenloader/intern/versioning_defaults.c
	source/blender/editors/animation/anim_channels_defines.c
2019-12-04 14:30:08 +01:00
3b6d39cc8f Merge branch 'master' into greasepencil-object 2019-12-04 10:06:52 +01:00
723db77e10 GPencil: Fix memory leak with sliders 2019-12-03 17:45:20 +01:00
9db6144e4e Merge branch 'master' into greasepencil-object 2019-12-03 16:17:41 +01:00
cb7440201a Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
2019-12-03 12:13:04 +01:00
405074f674 Merge branch 'master' into greasepencil-object 2019-12-03 11:20:54 +01:00
fdb4dc3413 GPencil: Remove duplicate panel code for layer properties
Now it uses a parent class for both panels.
2019-12-03 11:20:27 +01:00
342f9dfd5b Merge branch 'master' into greasepencil-object 2019-12-02 20:02:45 +01:00
0e4e7972d7 GPencil: Fix error after merge 2019-12-02 17:26:11 +01:00
cdae1ae99c Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/intern/draw_manager.c
2019-12-02 17:22:09 +01:00
13af059ed7 Merge branch 'master' into greasepencil-object 2019-11-30 17:09:50 +01:00
4b6c83a002 GPencil: Change tooltip 2019-11-30 17:02:44 +01:00
ee91697acb GPencil: Fix Time modifier error for frame Zero 2019-11-30 17:02:10 +01:00
e83beb786a Cleanup code 2019-11-30 16:48:12 +01:00
d646652d60 GPencil: Add option to scale thickness 2019-11-30 16:47:01 +01:00
ad80045128 GPencil: Show Vertex Paint parameter in Overlay in Object mode
Also hide depending of shading modes.
2019-11-30 16:21:20 +01:00
d7a9d0d9c3 Revert "GPencil: Object mode always use Vertex Paint mix"
This reverts commit 578db1e1a6.
2019-11-30 16:08:52 +01:00
578db1e1a6 GPencil: Object mode always use Vertex Paint mix 2019-11-30 13:47:45 +01:00
11516a14dc GPencil: Transform thickness when transform Scale in Edit mode 2019-11-30 13:32:05 +01:00
2883ce0311 GPencil: Fix versioning code after merge 2019-11-30 11:55:51 +01:00
0e8e0e3203 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-11-30 11:49:38 +01:00
7e4be8e629 GPencil: Update when shading mode changes 2019-11-29 23:51:54 +01:00
15f5cc7064 GPencil: Don't disable Vertex paint if Material mode 2019-11-29 23:48:02 +01:00
8418544a4d Merge branch 'master' into greasepencil-object 2019-11-29 23:15:42 +01:00
319df22970 GPencil: Fix error when parent a layer to Bone and don't scale thickness 2019-11-29 22:51:32 +01:00
8e7cc66522 Merge branch 'master' into greasepencil-object 2019-11-29 16:27:53 +01:00
62f45141ef Merge branch 'master' into greasepencil-object 2019-11-29 11:25:45 +01:00
5dab2575ae Merge branch 'master' into greasepencil-object 2019-11-29 10:28:01 +01:00
4d8de9a9b1 GPencil: Implement Vertex Overlay and set Vertex as default
Now in Material Overlay mode the Vertex Color is not used and by default the 2D template uses Vertex Mode
2019-11-28 20:18:38 +01:00
0d2d79b8df GPencil: Make Vertex Color works in Vertex Mode
WIP: Need to disable Vertex Color in Material mode
2019-11-28 19:48:55 +01:00
7f997d8269 GPencil: Resorder List icons to be consistent
Now the icons are in the same order in Dopesheet, Layers and Material list
2019-11-28 19:36:01 +01:00
a401014938 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-11-28 19:05:49 +01:00
7c76fc12c5 GPencil: Group all icons after opacity 2019-11-28 18:56:40 +01:00
f22121c55f GPencil: Add emboss only to opacity 2019-11-28 18:53:08 +01:00
5a20f4bc58 GPencil: Enable Sliders by default in 2D template 2019-11-28 18:48:48 +01:00
e39283c043 GPencil: Remove Emboss por Sliders 2019-11-28 16:58:55 +01:00
fa042ba487 GPencil: Add N Panel in Dopesheet 2019-11-28 16:42:21 +01:00
6f437aab4f GPencil: Fix icon for mask layer in Dopesheet 2019-11-28 16:10:44 +01:00
104e9b8a4a GPencil: Add layer operators to Dopesheet Header 2019-11-28 14:39:04 +01:00
7ceabd7264 GPencil: Keep current Tool when reset all brushes 2019-11-28 10:24:35 +01:00
de8b59e6c9 Merge branch 'master' into greasepencil-object 2019-11-28 08:37:57 +01:00
d234d22650 GPencil: Simplify Reset All brushes code 2019-11-28 08:36:31 +01:00
da29260ab6 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-11-27 20:29:04 +01:00
cb9f4fecad GPencil: Check NULL Pointer 2019-11-27 20:25:31 +01:00
5e2df157ba GPencil: Only reset Brushes of the same tool 2019-11-27 20:23:15 +01:00
978052ca4e GPencil: Add Use Mask to Dopesheet 2019-11-27 20:15:45 +01:00
0c3219ac94 GPencil: Fix segment fault using Reset All
The tool was null and need to be sure the toolslot is right.
2019-11-27 19:57:14 +01:00
a80801f396 GPencil: Cleanup code 2019-11-27 17:09:24 +01:00
8b06f63e98 GPencil: Add small offset to sliders 2019-11-27 17:02:47 +01:00
9b0fffbc74 GPencil: Add Opacity y Onion switch to Dopesheet
These options are visible when enable Show Sliders.
2019-11-27 16:52:14 +01:00
48409b33d2 Merge branch 'master' into greasepencil-object 2019-11-27 11:31:54 +01:00
393e439ff3 GPencil: Add missing notifier when reset brushes 2019-11-27 11:21:11 +01:00
a58a68fa54 Revert "GPencil: Decrease user count when the material is unpinned"
This reverts commit d76d1b7d21.

My change was totally wrong. The user count was already handled.
2019-11-27 10:57:49 +01:00
d76d1b7d21 GPencil: Decrease user count when the material is unpinned 2019-11-27 10:54:43 +01:00
050276a1e6 GPencil: Reset Brushes from old versions
Sometimes old version brushes are damaged and must be removed when use Reset All
2019-11-27 10:49:39 +01:00
a09cc3ee1a GPencil: Cleanup pep8 2019-11-27 10:18:04 +01:00
38840adb17 Merge branch 'master' into greasepencil-object 2019-11-27 08:19:44 +01:00
9cd1c5edde GPencil: Delete unknow brushes when Reset All 2019-11-27 08:18:32 +01:00
af2de3cfd7 GPencil: Change default preset to use range by mode
In this way is easier to include new brushes by mode.
2019-11-27 08:18:09 +01:00
e72e0321b3 GPencil: Remove debug printf 2019-11-26 23:08:46 +01:00
155c85b431 GPencil: Fix error in Reset All Brushes 2019-11-26 20:20:51 +01:00
251e4f9975 GPencil: Fix number of users for Brushes 2019-11-26 20:02:43 +01:00
e013596735 GPencil: Fist changes to reset brushes in the right way 2019-11-26 19:59:20 +01:00
4f68e802fb GPencil: Use right operator for new brushes
The old operator was working by luck, but the gpencil settings were not set.
2019-11-26 19:55:19 +01:00
992cbb2b31 Merge branch 'master' into greasepencil-object 2019-11-26 19:48:06 +01:00
f5d453ceef Merge branch 'master' into greasepencil-object 2019-11-26 19:06:16 +01:00
74231d7457 GPencil: Fix error opening old files 2019-11-26 16:37:16 +01:00
af7b95ac9f Merge branch 'master' into greasepencil-object 2019-11-26 14:06:01 +01:00
d455141b0f Merge branch 'master' into greasepencil-object 2019-11-26 13:40:46 +01:00
37ed27d88e Merge branch 'master' into greasepencil-object 2019-11-25 16:13:09 +01:00
8075566030 Merge branch 'master' into greasepencil-object 2019-11-25 08:31:43 +01:00
8cce5aab0a Merge branch 'master' into greasepencil-object 2019-11-24 12:07:51 +01:00
dc6178d264 GPencil: Change Vertex Paint label 2019-11-23 16:53:34 +01:00
54910df67d GPencil: Cleanup more spaces 2019-11-23 13:11:12 +01:00
77222d0430 GPencil: Cleanup spaces 2019-11-23 13:05:22 +01:00
1cf5cc790e GPencil: Fix wrong versioning default struct name 2019-11-23 12:14:16 +01:00
d830b21d00 GPencil: Add missing initialization in previous commit 2019-11-23 11:53:03 +01:00
52722da166 GPencil: New Vertex Opacity factor by Layer
This allows to define the opacity factor for each layer.
2019-11-23 11:46:17 +01:00
d00da676bd Merge branch 'master' into greasepencil-object 2019-11-23 11:24:01 +01:00
e2fef7c4bd GPencil: Cleanup warnings 2019-11-23 11:23:24 +01:00
e55bd11acf GPencil: Remove use_cursor and replace by show_brush property
As now all are brushes, we don't need a special flag for grease pencil and we can resuse standard property of brushes.
2019-11-23 11:00:00 +01:00
c8ef6efc01 GPencil: Add Fallof menu to Tint tool 2019-11-22 23:51:18 +01:00
156bfaf83b GPencil: Set Smooth curve by default to Brushes 2019-11-22 23:42:15 +01:00
5d51439600 GPencil: Fix problem with Fallof curve for non Custom mode 2019-11-22 23:32:52 +01:00
b9a4bbd2ce GPencil: Remove Icon from Display panel 2019-11-22 23:09:19 +01:00
172812b40c GPencil: Tweaks to Display panel 2019-11-22 20:27:38 +01:00
725def6e8b GPencil: Show text buttons for direction in properties panel 2019-11-22 19:53:37 +01:00
f54431efe7 GPencil: Fix topbar popover for Fill tool 2019-11-22 19:40:37 +01:00
bfb5aaedc5 GPencil: Tweaks in Brush panels 2019-11-22 19:16:16 +01:00
ae483d62c8 Merge branch 'master' into greasepencil-object 2019-11-22 17:41:05 +01:00
7929e47e77 GPencil: More tweaks to UI panels 2019-11-22 17:38:22 +01:00
50a0db12a6 GPencil: Display two colors only for required Tools 2019-11-22 17:04:41 +01:00
bd2c3a6418 GPencil: Add Add/Sub Brush color to Display Panel 2019-11-22 16:50:58 +01:00
fca9b055a5 GPencil: Use Standard Falloff curves for Sculpt/Weight Paint
As the tools are bruhes, we can use the standard Curves.
2019-11-22 16:29:32 +01:00
fd795ee43e GPencil: Cleanup - Reorder Make list 2019-11-22 16:11:54 +01:00
7b6d21b24d GPencil: Rename Panel 2019-11-22 16:11:28 +01:00
8c272fa243 GPencil: Use Object name for Palette from Vertex Color 2019-11-22 11:17:07 +01:00
6f77846c68 GPencil: Use image name for palette extracted
Now the palette name is equals to image name.
2019-11-22 11:12:05 +01:00
86ffea5be9 Merge branch 'master' into greasepencil-object 2019-11-22 10:33:30 +01:00
fc3cf89a69 GPencil: Allow to hide cursor in Sculpt/Weight and Vertex mode 2019-11-22 10:32:27 +01:00
5aa63f2bd4 GPencil: Add icons for each type of Tool 2019-11-22 10:31:54 +01:00
37285e9050 GPencil: Remove old 2.7x Pie menus
These menus are not used anymore.
2019-11-22 10:00:00 +01:00
37d1906b8f GPencil: Fix missing Sculpt Strokes panel 2019-11-22 09:55:32 +01:00
1a5fa01eb3 GPencil: Add missing Strength Sculpt Brush 2019-11-21 23:05:23 +01:00
f0ec2db3d6 GPencil: Cleanup unused flags 2019-11-21 22:50:07 +01:00
f5c349f55c GPencil: Add missing Brush weight initialization 2019-11-21 22:43:10 +01:00
5c74c9c333 GPencil: Fix struct padding after merge 2019-11-21 22:35:33 +01:00
8687eda619 Merge branch 'master' into greasepencil-object
Conflicts:
	release/datafiles/locale
	release/scripts/addons
	release/scripts/addons_contrib
	source/blender/blenkernel/intern/scene.c
	source/blender/blenloader/intern/versioning_280.c
	source/blender/makesdna/DNA_brush_types.h
2019-11-21 22:28:01 +01:00
452b1a02e4 Gpencil: Convert Sculpt and Weight Paint to Brushes
This commit convert the old hacked brushes for Sculpt and Weight paint into real Blender brushes.

All hacks have been removed and the weight paint mode has been separated from sculpt code.

New keymaps by tool also.

Related to T71711
2019-11-21 22:18:10 +01:00
0a109b71ba Merge branch 'master' into greasepencil-object 2019-11-20 16:49:54 +01:00
a304f04604 GPencil: Add support to sort palette by SVH 2019-11-20 16:48:58 +01:00
c8d376a151 Merge branch 'master' into greasepencil-object 2019-11-19 23:04:18 +01:00
b7f72aecda GPencil: Replace wrong values in luminance
The code is disabled but want to keep the right formula.
2019-11-19 19:54:13 +01:00
56bdf8f9be GPencil: Change sort comparison function 2019-11-18 20:04:33 +01:00
5e804d1d17 GPencil: More tweaks to sort colors 2019-11-18 17:10:08 +01:00
1d79231f0f GPencil: Fix memory leak in Join Palettes 2019-11-18 16:26:15 +01:00
070391998f GPencil: Fix memory leak sorting palettes 2019-11-18 16:23:11 +01:00
fd79536845 GPencil: Invert Sort for Palette Value 2019-11-18 16:22:58 +01:00
7e63b20327 Merge branch 'master' into greasepencil-object 2019-11-18 14:34:39 +01:00
df55ed8288 GPencil: Add extract colors to Image menu 2019-11-18 11:19:59 +01:00
73b8ea5f2b GPencil: Fix Sort function 2019-11-18 10:40:05 +01:00
523d8f7bc5 GPencil: Add Sort button to Palette 2019-11-18 10:19:52 +01:00
e53e601322 GPencil: Add new buttons to move Up/Down colors in Palette 2019-11-18 10:19:31 +01:00
deefd7fb31 GPencil: Some tweaks to Sort and Join Palettes 2019-11-18 09:52:14 +01:00
5260161acb Merge branch 'master' into greasepencil-object 2019-11-17 22:55:42 +01:00
4e8de29546 GPencil: Fix Fill tint problems
When the stroke was already tinted, the color changes with the first click. Now the color is mixed.
2019-11-17 19:47:13 +01:00
2f877747bf Merge branch 'master' into greasepencil-object 2019-11-17 19:14:23 +01:00
e862abaf64 GPencil: Draw Edit Lines for 1 point strokes 2019-11-17 19:12:58 +01:00
489ed1fb6a GPencil: Fix error in Multiframe when select Lines only
The problem was the first stroke was set to true, but the first stroke was hidden, so the pointer was wrong for the active frame.
2019-11-17 18:08:06 +01:00
6290fd5821 GPencil: Fix duplicate parameter in UI: use line in multiframe 2019-11-17 16:34:31 +01:00
008ff3387f GPencil: Fix error converting Stencil Materials to Vertex Color 2019-11-17 16:28:31 +01:00
38aba90e7b GPencil: New operator to Join Palettes
Still need to define final Menu options and location.
2019-11-17 13:33:03 +01:00
48614ca42a GPencil: New operator to Sort Palette Colors
This is useful for sorting by Hue and Saturation any palette (not only used by Grease Pencil)
2019-11-17 12:13:21 +01:00
b5405cd285 GPencil: Reorganize palette operators 2019-11-17 11:33:20 +01:00
e652dcc476 GPencil: New operator to extract Palette from Image 2019-11-17 11:32:43 +01:00
660ff65c97 GPencil: Show line in Multiframe for Vertex Paint 2019-11-17 10:30:17 +01:00
35bb81656f GPencil: Fix error with Stencil Strokes when convert to Vertex 2019-11-16 20:50:41 +01:00
618a28368a GPencil: New operator to extract palettes from Images
Also more changes to sort colors, add a threshold , etc.
2019-11-16 20:19:25 +01:00
ca6425824f GPencil: reorganize menus for new Vertex operators 2019-11-16 16:51:50 +01:00
f5fb5aff00 GPencil: Fix typo 2019-11-16 16:51:34 +01:00
9ac5691b78 GPencil: Add option for Convert and Palette to selected only 2019-11-16 16:27:30 +01:00
cb1a0eb555 GPencil: Change default material names in conversion 2019-11-16 16:20:41 +01:00
d480d5793b GPencil: Add Merge and Convert to Material context menu 2019-11-16 16:20:10 +01:00
497903f392 GPencil: Create Palettes from Vertex Color 2019-11-16 16:11:27 +01:00
622391fafa Merge branch 'master' into greasepencil-object 2019-11-16 12:26:09 +01:00
9cf325200f Gpencil: Convert Materials to Vertex Color mode
Instead to use the materials to define colors, this convert the color to use Vertex Color and merge materials by type.

Textured strokes (not stencil mask) and fill not solid are not converted.
2019-11-16 12:24:34 +01:00
2528417229 Merge branch 'master' into greasepencil-object 2019-11-15 16:00:08 +01:00
49f15e9a42 GPencil: Change default palette name 2019-11-15 14:27:06 +01:00
8959703679 GPencil: Small cleanup in previous commit
Look for brush only once.
2019-11-15 10:55:45 +01:00
172cc30215 GPencil: Set default draw brush in all templates 2019-11-15 10:53:24 +01:00
09a03ce5db GPencil: Init defaults for all templates 2019-11-15 10:47:19 +01:00
97ff2295d7 Merge branch 'master' into greasepencil-object 2019-11-15 10:26:48 +01:00
e0ded3e8b4 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_data_modifier.py
	source/blender/gpencil_modifiers/MOD_gpencil_modifiertypes.h
	source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
	source/blender/makesdna/DNA_gpencil_modifier_types.h
	source/blender/makesrna/intern/rna_gpencil_modifier.c
2019-11-14 19:40:16 +01:00
e03ebc88ca GPencil: Add new parameters to merge materials
Now the user can control de Hue, Saturation and Value range.
2019-11-14 16:16:29 +01:00
26933c4700 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_defaults.c
2019-11-14 12:38:21 +01:00
c832eb9c98 GPencil: Fix default vertex color
This error was introduced when fix the double default brushes.
2019-11-13 19:28:35 +01:00
ecccfff721 Merge branch 'master' into greasepencil-object 2019-11-13 17:21:47 +01:00
946985af92 Merge branch 'master' into greasepencil-object 2019-11-13 08:55:05 +01:00
051aca8844 GPencil: Add support to Vertex Paint for Eyedropper tool 2019-11-12 22:13:42 +01:00
c0b5817066 GPencil: Add small color box to context menu 2019-11-12 18:45:02 +01:00
dcdf548e54 GPencil: Fix double Brush initialization 2019-11-12 17:31:41 +01:00
ca12d75821 GPencil: Hide Edit lines in Vertex Paint mode 2019-11-12 17:15:50 +01:00
117b284f8a GPencil: New Set Vertex Color operator 2019-11-12 16:59:34 +01:00
827b5f48fa Merge branch 'master' into greasepencil-object 2019-11-12 16:33:55 +01:00
bd89367bd2 GPencil: New parameter for Vertex Paint mix
Also some cleanup.
2019-11-12 16:32:31 +01:00
5e4d6aee04 GPencil: Show Vertices in Vertex Paint always 2019-11-12 16:01:58 +01:00
62b527581a GPencil : Use different color for selected point sin Vertex Paint 2019-11-12 15:02:32 +01:00
84da2e2b54 GPencil: Show Vertex Opacity in Overlay for Vertex Paint 2019-11-12 15:01:58 +01:00
1942e1e27a GPencil: Move move below color wheel in context menu 2019-11-12 10:02:28 +01:00
6bc2e906ec GPencil: New operators for Vertex Paint
* Levels
* Invert
* Hue Saturation Value
* Bright/Contrast
2019-11-11 23:21:28 +01:00
37429691b5 GPencil: Show Edit points in Vertex Paint
Also added the option to hide edit points when disable Overlays in any mode.
2019-11-11 19:56:29 +01:00
a481be64cf GPencil: Remove Flip colors in Context menus 2019-11-11 19:42:59 +01:00
8acb506104 GPencil: Add color wheel to Draw mode context menu 2019-11-11 19:28:39 +01:00
e133343e71 GPencil: New menu Select in Vertex Paint mode 2019-11-11 19:15:27 +01:00
356ffdcc06 GPencil: New context menu for Vertex Mode 2019-11-11 19:05:33 +01:00
46b03f203d Merge branch 'master' into greasepencil-object 2019-11-11 17:41:03 +01:00
8c3d9c436c GPencil: Replaces how Select Color works.
Now only checks the Hue of the color to get all ranges of saturations.
2019-11-11 17:40:09 +01:00
3169640033 GPencil: Add a distance fallof to Smear tool
Calc distance from initial sample location and add a fallof effect
2019-11-11 16:54:41 +01:00
ed21ed3030 GPencil: Rename Transform UV to Transform Fill
This affects to reset_uv also.
2019-11-11 16:22:29 +01:00
8c32161c78 GPencil: Fix segment fault in Blur brush 2019-11-11 16:12:04 +01:00
486b0e04e6 GPencil: Fix Vertex Paint brush does not paint in center
The brush curve factor was inverted.
2019-11-11 15:52:40 +01:00
3b3ee4091b GPencil: Cleanup variable type 2019-11-11 11:29:55 +01:00
97d5085061 GPencil: Check grid cell index range
It could get wrong values in corner case situations.
2019-11-11 10:30:12 +01:00
c553e5d113 Merge branch 'master' into greasepencil-object 2019-11-11 10:18:35 +01:00
a283aa9505 GPencil: Redesign Vetex Paint Smear Tool
Now instead to rorate the grid, the point is extracted using the direction and not the cell above in a rotated grid. This simplifies the process and gets better results.
2019-11-11 10:17:59 +01:00
50017dcfcb GPencil: First steps for the new Smear tool
Note: Still not working.
2019-11-10 17:39:37 +01:00
089be921c1 Merge branch 'master' into greasepencil-object 2019-11-10 09:11:45 +01:00
8da22e5293 GPencil: New Blur Tool for Vertex Paint 2019-11-09 17:45:49 +01:00
e603f05b69 GPencil: Add curve falloff for Vertex Paint brushes 2019-11-09 16:15:06 +01:00
d13ed6391c GPencil: Cleanup comment 2019-11-09 13:49:46 +01:00
ea33022983 GPencil: New Vertex Paint Average Brush
This brush tint the points with the average of the colors below the cursor.
2019-11-09 13:45:41 +01:00
521358428d GPencil: Attenuate translate effect in Transform UV operator
The old attenuate value makes the transform too hard.
2019-11-09 12:28:26 +01:00
9c816eec26 GPencil: Initialize Brush only if the brush is new 2019-11-09 12:09:42 +01:00
2ab1485cb5 GPencil: New Select by Color operator 2019-11-09 11:53:12 +01:00
064f132000 GPencil: New Vertex Paint Replace Tool
This tool replaces the old mixed color with the current one, but keeps the same mix factor. This is not possible with Draw tool, because the draw tool replaces the mix factor.

With this tool is very easy tint previous colors, but keeping the same mix and pressure values to maintain the same artistic look and feel.
2019-11-09 11:01:27 +01:00
b60b92abd4 GPencil: Display Fill colors in Vertex Paint in Multiedit always
Don't use the option of multiedit "use_gpencil_multiedit_line_only"
2019-11-09 09:04:12 +01:00
c51d160ab5 GPencil: Fix origin of UV rotation using object location 2019-11-08 20:52:58 +01:00
6cddb446da Cleanup: Remove old commented lines 2019-11-08 20:34:53 +01:00
f0b5d47802 GPencil: Remove data from temp struct
These variables are not used now.
2019-11-08 20:14:15 +01:00
4449f8f8db GPencil: Review comments, remove unused code and make safe free memory 2019-11-08 20:08:46 +01:00
f99acbe54b Cleanup: More unused variables 2019-11-08 20:02:40 +01:00
d4ea8697f6 Cleanup: Remove unused variables 2019-11-08 20:00:31 +01:00
bfa94bfeee Cleanup: Fix typo error 2019-11-08 19:48:59 +01:00
0b3df9561d GPencil: Use an array to select Vertex Paint points
This is required for new brushes that need to have all points selected before applying the effect
2019-11-08 19:47:32 +01:00
9c5e02d1d3 GPencil: Rename Tint to Vertex Paint 2019-11-08 18:28:21 +01:00
900100e859 Merge branch 'master' into greasepencil-object 2019-11-08 17:09:59 +01:00
d3d1eee154 GPencil: Add multiframe support to Vertex Paint 2019-11-08 17:08:12 +01:00
5e4517819c GPencil: Don't check mask in Draw mode
Also some code cleanup
2019-11-08 16:51:01 +01:00
ea28ccc885 GPencil: Fix poll for all select tools in Vertex Paint 2019-11-08 11:46:15 +01:00
6e5ed5c89e GPencil: Reformat RNA code to extend selection in all modes 2019-11-08 11:43:07 +01:00
4cab8c06f8 GPencil: Fix error in Circle select for Vertex Paint 2019-11-08 11:21:39 +01:00
32efa6a16a GPencil: Attenuate colors when use mask in Vertex Paint 2019-11-08 11:21:19 +01:00
e2199b1673 Merge branch 'master' into greasepencil-object 2019-11-08 08:47:35 +01:00
4c5eebadae GPencil: Fix Box Selection Tool keymaps 2019-11-07 23:36:35 +01:00
5fc3ee0b92 GPencil: Use Mask in Vertex Paint operator 2019-11-07 23:13:13 +01:00
9bba2b729c GPencil: Fix error in versioning for old files 2019-11-07 23:06:58 +01:00
fcdb07c569 GPencil: Display Edit Points in Vertex Paint and Mask buttons
This is part of the masking functions.
2019-11-07 22:58:17 +01:00
f6931dd946 GPencil: Remove Draw menu in Vertex Paint mode 2019-11-07 22:26:54 +01:00
fcfdfc180a GPencil: Add mask options for Vertex Paint
Still not working, only defined the UI elements.
2019-11-07 22:24:26 +01:00
114d44ac4b GPencil: Move Vertex Mode to Brush 2019-11-07 20:43:22 +01:00
9ebb587791 GPencil: Fix versioning for Vertex Paint 2019-11-07 20:12:45 +01:00
0688f32812 GPencil: Remove Snap menu in Vertex Paint mode 2019-11-07 19:58:32 +01:00
3d28d648e4 GPencil: Put Vertex Paint mode before Weight Paint mode
This is to keep UI consistency.
2019-11-07 19:56:22 +01:00
92cdf9ad29 GPencil: Move Boundary parameter to popover
The topbar is too populate.
2019-11-07 19:54:17 +01:00
cc3019600c GPencil: Use Vertex Color in Fill Tool 2019-11-07 19:40:49 +01:00
e05ecbe519 GPencil: Use Brush color for Tint tool cursor 2019-11-07 19:25:47 +01:00
d33be9025f GPencil: Use Brush size for cursor in Vertex Paint mode 2019-11-07 19:24:16 +01:00
c3d8ca1290 GPencil: Fix Palette panels for Vertex Paint 2019-11-07 19:13:33 +01:00
a09b824642 Merge branch 'master' into greasepencil-object 2019-11-07 18:06:22 +01:00
d7fed89b21 GPencil: Use right Paint for Vertex Paint mode 2019-11-07 18:05:47 +01:00
bb48f177d9 GPencil: Fix default palette for Vertex Paint mode 2019-11-07 18:00:17 +01:00
52c9b6cdad GPencil: Basic Vertex Color mode working
Still pending panels and tools
2019-11-07 18:00:11 +01:00
c1168f9ef1 GPencil: More Keymap changes for Vertex Color 2019-11-07 18:00:05 +01:00
2df4db3ac6 GPencil: Fix brush icons 2019-11-07 18:00:00 +01:00
74d293d7ad GPencil: Solve problem with Keymap missing 2019-11-07 17:59:54 +01:00
6a5fa02cb9 GPencil: Add versioning code for new tool 2019-11-07 17:59:44 +01:00
4eb7027c64 GPencil: More changes to keymaps and tools 2019-11-07 17:59:38 +01:00
e226e0df50 GPencil: First steps to create a new Vertex Mode 2019-11-07 17:59:32 +01:00
add7b723bb Merge branch 'master' into greasepencil-object 2019-11-06 17:44:40 +01:00
7006ecf946 GPencil: Use Ellipsoid to determine Vertex Color tint
Now, the scale of the object is used to detrmine the final size of the radius using an ellipsoid.
2019-11-06 17:11:49 +01:00
203fcf7014 GPencil: Fix strength error in Tint Tool
The value must not be clamped.
2019-11-06 16:18:38 +01:00
d9cced733e Merge branch 'master' into greasepencil-object 2019-11-06 08:49:28 +01:00
e76de93f2e GPencil: Use parent matrix in Vertex Color modifier 2019-11-06 08:48:09 +01:00
c17b4b7f67 GPencil: Fix if mistake in previous commit 2019-11-05 20:01:36 +01:00
8239b07a53 GPencil: Use decay color in modifier 2019-11-05 19:51:45 +01:00
78e7a6ef13 GPencil: Fix problems with the vertex color modifier 2019-11-05 19:51:45 +01:00
50de645ed5 GPencil: Basic functionality of Vertex Color modifier 2019-11-05 19:51:45 +01:00
c79b00ad39 GPencil: More preparation of the Vertexcolor modifier 2019-11-05 19:51:45 +01:00
99c01fa330 GPencil: Basic structure of the new Vertex Color modifier
Still not working, only put in place all parts.
2019-11-05 19:51:45 +01:00
56fa4f6e17 Gpencil: Add mix_color interpolation to sample function. 2019-11-05 23:03:56 +08:00
711563594a GPencil: Use Vertex Color in Hue/Saturation modifier 2019-11-05 15:38:45 +01:00
621e3d46c1 GPencil: Use Vertex Color in Tint modifier 2019-11-05 15:34:58 +01:00
afbf41231c GPencil: Fix Title for Mix Factor
The text is inside the value if put the parameter in the same row and we want the text before value.
2019-11-05 14:22:00 +01:00
ef0ed19c3b GPencil: Fix RNA subtype error 2019-11-05 14:08:59 +01:00
41bd3c185b GPencil: Apply Layer Tint to Vertex Color 2019-11-05 11:04:42 +01:00
2fad49293c Merge branch 'master' into greasepencil-object 2019-11-05 10:41:20 +01:00
b09c5b8e86 GPencil: Tweaks to Vertex Panels 2019-11-05 10:40:36 +01:00
4029e72e58 GPencil: Use standard checkbox for Vertex properties panel 2019-11-05 10:10:31 +01:00
f6a67e3460 GPencil: Add Vertex Color to N Panel 2019-11-04 23:05:49 +01:00
a474bd865d GPencil: Add a switch to Vertex Color panels 2019-11-04 22:53:40 +01:00
e317484d00 GPencil: Replace default palette to Krita colors 2019-11-04 20:15:40 +01:00
dfc088fb57 GPencil: Exchange default colors for Tint and Draw 2019-11-04 19:29:52 +01:00
0b979ae46f GPencil: Reduce Palette popover width 2019-11-04 19:12:21 +01:00
8e14252df7 GPencil: Move default palette code to BKE 2019-11-04 19:02:48 +01:00
74f1cf3183 GPencil: Move variables in struct
Also this solves some alignment errors
2019-11-04 18:44:20 +01:00
1243aec8bc GPencil: Cleanup 2019-11-04 18:05:36 +01:00
15ea17b5db Merge branch 'master' into greasepencil-object 2019-11-04 17:50:37 +01:00
80be882666 GPencil: Add a default Palette 2019-11-04 17:49:15 +01:00
10eaa2834c GPencil: Apply Vertex Color to Fill areas 2019-11-04 16:59:19 +01:00
63eb3920d0 GPencil: Use Vertex Color for Fill areas in Draw tools 2019-11-04 16:25:00 +01:00
932375336f GPencil: Initialize Weight Paint data 2019-11-04 16:08:33 +01:00
5693cd9342 GPencil: Replace default Red by Violet color 2019-11-04 16:01:13 +01:00
fe21321644 GPencil: Use Icon like Dyntopo for Vertex Color 2019-11-04 16:00:04 +01:00
993b27b89f GPencil: Change default Tint and Vertex Color 2019-11-04 15:54:58 +01:00
8ee9cf9e7c GPencil: Set Tin tool Strength to 0.8 by default 2019-11-04 14:34:01 +01:00
56bae9ec3e GPencil: Use Fill Vertex Color mix in Fill 2019-11-04 11:03:47 +01:00
518db25122 GPencil: Use Stroke Vertex mode in Tint tool 2019-11-04 10:52:19 +01:00
9a727aefe1 GPencil: Use Stroke Vertex switch in paint and primitive tools 2019-11-04 10:46:59 +01:00
f55145c03a Merge branch 'master' into greasepencil-object 2019-11-04 10:31:38 +01:00
f69106f683 GPencil: New option to define if vertex color affect to Stroke and/or Fill
This commit only adds the parameters, but is not using them.
2019-11-04 10:30:58 +01:00
bf7e134a5b GPencil: Add a switch to enable Vertex Color
This is similar to Dynotopo, you can enable it or not.
2019-11-03 23:30:42 +01:00
e278b3fc42 GPencil: Add "Base" to Stroke and Fill color label 2019-11-03 22:51:37 +01:00
481de5a5c8 GPencil: Join Color and Vertex Color popover in UI 2019-11-03 20:39:31 +01:00
e26bd6e659 GPencil: More UI tweaks to Vertex Color panels 2019-11-03 20:33:31 +01:00
7c9c0d442f GPencil: Hide colorwheel in topbar 2019-11-03 20:14:04 +01:00
8610d6e9ce GPencil: Move Palettes to Subpanel 2019-11-03 19:47:03 +01:00
8146acd524 GPencil: Fix inverted color in Tint tool 2019-11-03 19:37:50 +01:00
9a2038d031 GPencil: Remove TOPBAR_PT_gpencil_vertexcolor
Only use the color and the menu Vertex Color
2019-11-03 19:33:40 +01:00
e75926277e Cleanup: Remove extra line 2019-11-03 19:26:40 +01:00
e826312d84 GPencil: Set Vertex Factor to 1 and invert default colors 2019-11-03 15:58:46 +01:00
e44b643450 Merge branch 'master' into greasepencil-object 2019-11-03 11:27:16 +01:00
5aee15c2c0 GPencil: Reorganize Vertex Color UI moving to Popover 2019-11-03 11:26:33 +01:00
27a7f4bf43 GPencil: Change materials defaults for 2D template 2019-11-03 10:56:34 +01:00
0349e82d8b GPencil: Rename "Vertex Factor" to "Vertex Color Factor" 2019-11-03 08:56:47 +01:00
3b29a921fb GPencil: Split Vertex Paint factor for Draw
This allows to use palettes.
2019-11-02 22:06:44 +01:00
5bbe385a9e GPencil: Replace duplicate brush preset code by function 2019-11-02 20:44:15 +01:00
54bc7901d5 Cleanup: Compiler warnings 2019-11-02 20:33:11 +01:00
ea367d7cb1 GPencil: Replace Mix Color by Vertex Color in UI 2019-11-02 20:30:31 +01:00
e27bcc4318 GPencil: Create default Tint brush for old files 2019-11-02 20:21:45 +01:00
52349f5d3d GPencil: Reduce attenuate factor 2019-11-02 17:23:30 +01:00
7c4fc7066f GPencil: Improve color blending in Tint 2019-11-02 17:17:14 +01:00
017d36b557 GPencil: More work to make Tint operator 2019-11-02 16:56:37 +01:00
27efbf447f GPencil: Basic structure for Tint Tool
Still not working, but all pieces put in place.
2019-11-02 14:08:28 +01:00
81d1840d7c GPencil: Fisrt steps to create new Tint Brush type 2019-11-02 12:20:31 +01:00
2e263fa91f Merge branch 'master' into greasepencil-object 2019-11-02 11:51:46 +01:00
7c3139f340 Merge branch 'master' into greasepencil-object 2019-11-02 11:14:46 +01:00
e31a5fa567 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/addons
	source/blender/editors/gpencil/gpencil_paint.c
2019-11-02 10:34:02 +01:00
4235fcce38 GPencil: Hide mix color in Topbar depending of material type 2019-11-01 20:13:53 +01:00
564b5a3549 GPencil: Remove side Mix Color panel for Texture materials 2019-11-01 20:06:04 +01:00
55e261a98e GPencil: Move to panel the Mix Color again 2019-11-01 19:53:39 +01:00
da43fde938 Revert "GPencil: Move mix color to top of he panel"
This reverts commit 9a252b5f50.
2019-11-01 19:50:09 +01:00
9a252b5f50 GPencil: Move mix color to top of he panel 2019-11-01 19:46:01 +01:00
8cbd52a27c GPencil: New Color Mix panel 2019-11-01 16:54:04 +01:00
e5ed4d53c0 GPencil: Fix compiler warnings 2019-11-01 16:19:44 +01:00
bd16d0d7fb Merge branch 'master' into greasepencil-object 2019-11-01 10:56:38 +01:00
af2263d5be GPencil: Add missing prop Update 2019-10-31 19:23:00 +01:00
d7b3d5c427 GPencil: Set Active Smooth to 0.35
With new design of sampling, the old value was too high.
2019-10-31 17:52:26 +01:00
09305099d0 GPencil: Double Random Pressure effect 2019-10-31 17:47:14 +01:00
c91336d9a3 GPencil: Remove Smooth Thickness and Randomness
These parameters are not needed with the new functions.
2019-10-31 17:40:29 +01:00
e28caf3073 Merge branch 'master' into greasepencil-object 2019-10-31 17:02:47 +01:00
63797f217c GPencil: Add Mix color to paint operators 2019-10-31 16:52:42 +01:00
253c05638a GPencil: Use new mix_color variable in functions
Still more changes pending.
2019-10-31 16:52:35 +01:00
2b6f8aaf68 GPencil: Add new variables for mix color
This will be used by Vertex Paint tools.
2019-10-31 16:52:26 +01:00
9887439349 Merge branch 'master' into greasepencil-object 2019-10-31 12:27:19 +01:00
a99e1afae0 GPencil: Add merge materials to Cleanup menu 2019-10-30 22:55:10 +01:00
b9dc338f0e GPencil: Basic Merge Material Stroke operator
Still needs more work on merge algorithm, but at least this is the basic structure.
2019-10-30 22:55:03 +01:00
7c44bfe7a8 Merge branch 'master' into greasepencil-object 2019-10-30 22:43:21 +01:00
9596fb577d Merge branch 'master' into greasepencil-object 2019-10-30 15:53:06 +01:00
da3928312a Gpencil: Add BKE_gpencil_add_stroke_existing_style() function.
This additionally copies the temp drawing color fields in gps->runtime.
So that when adding new strokes in the modifier the style is preserved.
2019-10-30 20:01:56 +08:00
d6b0c0329e Merge branch 'master' into greasepencil-object 2019-10-30 11:12:04 +01:00
8b7e3cc9b5 Merge branch 'master' into greasepencil-object 2019-10-29 17:24:47 +01:00
d12e7e4e08 Merge branch 'master' into greasepencil-object 2019-10-28 16:39:12 +01:00
562679bb0f Merge branch 'master' into greasepencil-object 2019-10-28 11:05:36 +01:00
3e840e9a02 Merge branch 'master' into greasepencil-object 2019-10-27 19:50:02 +01:00
231fd37a3e Merge branch 'master' into greasepencil-object 2019-10-27 10:06:19 +01:00
67ec16ff2d Merge branch 'master' into greasepencil-object 2019-10-25 16:46:25 +02:00
7394daf4b3 Merge branch 'master' into greasepencil-object 2019-10-24 13:49:25 +02:00
70a921237d Merge branch 'master' into greasepencil-object 2019-10-23 17:51:14 +02:00
39b9131a39 Merge branch 'master' into greasepencil-object 2019-10-22 11:24:42 +02:00
5293d87161 Merge branch 'master' into greasepencil-object 2019-10-21 20:08:14 +02:00
eed6ee0c15 Merge branch 'master' into greasepencil-object 2019-10-21 10:53:06 +02:00
36fc327005 Merge branch 'master' into greasepencil-object 2019-10-20 16:03:48 +02:00
d0d35e0fd4 Fix merge issue in gpencil_primitive.c 2019-10-20 10:45:43 +01:00
6a06dac6c3 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/presets/keyconfig/keymap_data/blender_default.py
	source/blender/editors/gpencil/gpencil_primitive.c
2019-10-19 17:02:09 +02:00
694623e3fd Merge branch 'master' into greasepencil-object 2019-10-19 10:02:10 +02:00
125bd83d6a GPencil: Fix compiler error
The icon must be added only when the icon is cretaed or the make fails.
2019-10-18 15:46:31 +02:00
610e1d1b1f Merge branch 'master' into greasepencil-object 2019-10-18 14:35:01 +02:00
84a9e2836c GPencil: Primitive: Polyline tool 2019-10-18 10:32:28 +01:00
2194d63c87 Merge branch 'master' into greasepencil-object 2019-10-18 10:25:27 +02:00
64b1b68a6a Merge branch 'master' into greasepencil-object 2019-10-17 17:30:27 +02:00
b580fdf0fe GPencil: remove code from Polygon mode from Freehand operator
This section of the code was from 2.7x and it's was not working and it will be replaced by a new primitive polyline tool.
2019-10-17 17:29:46 +02:00
f2aa4d9028 GPencil: Guides: Fix guides to work when using lazy mode
This now snaps the lazy mode output to the guides if they are enabled.
2019-10-17 14:48:50 +01:00
afe376d075 GPencil: Cleanup: remove unused variable 2019-10-17 13:47:35 +01:00
791bf43218 GPencil: Cleanup gpencil_add_guide_points function 2019-10-17 13:41:57 +01:00
33ea84f629 GPencil: Guides: Use angle sampling for Circular guide
Use angle sampling for missing points, this fixes fast stroke issues finally.
2019-10-17 13:20:43 +01:00
e30cf8a92f GPencil: Guides: Improve fake point sampling for Circular guides
This provides better spacing and improves fast strokes
2019-10-17 12:00:59 +01:00
96935969c5 GPencil: Guides: Fixed issue with start of very fast strokes
The interpolation now runs from the very first point.
2019-10-17 10:47:09 +01:00
15f6c71382 Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2019-10-17 10:31:14 +01:00
ef07bfbe29 GPencil: Fix guides after recent refactor
There is still an issue with the start of very fast strokes that needs solving.
2019-10-17 10:29:55 +01:00
a0e8ef1e31 Merge branch 'master' into greasepencil-object 2019-10-17 11:21:11 +02:00
71a7ef06ea Merge branch 'master' into greasepencil-object 2019-10-16 22:00:27 +02:00
601041794a GPencil: Don't apply smooth to position for guides 2019-10-16 18:33:59 +02:00
244667bff1 GPencil: Disable Arc fake points for guides
WIP: Need points for fast circles.
2019-10-16 18:07:29 +02:00
750eab8064 Merge branch 'master' into greasepencil-object 2019-10-16 16:40:36 +02:00
5e827607a8 GPencil: Remove Smart Smooth Brush parameter
This parameter is not required because a value of 0.15 is working fine in any OS (this parameter was added to UI to make test of different values).
2019-10-16 16:32:24 +02:00
b5329c4eb4 Merge branch 'master' into greasepencil-object 2019-10-16 10:34:22 +02:00
85c17ecae2 Merge branch 'master' into greasepencil-object 2019-10-15 16:43:27 +02:00
f499ec4964 GPencil: Don't calculate arc if the angle is too sharp
This occurs when the stroke change of direction abruptly.
2019-10-15 15:50:22 +02:00
13736b3f9f GPencil: More tweaks to brush settings 2019-10-15 14:04:47 +02:00
4a79cb53d7 GPencil: Don't generate fake point when using Stabilize mode
This mode is not compatible with fake points.
2019-10-15 13:18:32 +02:00
3d769f0e1b Merge branch 'master' into greasepencil-object 2019-10-15 12:48:43 +02:00
45bc21e7e2 GPencil: Redesign input samples management
Now, instead to generate fake events in a linear interpolation and try to smooth the line later, an arc is created between the points and try to reproduce the ballistic trajectory of the mouse/pen. This gets better results and especially when the mouse moves very fast getting a more organic result.

Also, the input samples maximum has been changed to 15.

Note: Still we need to test DOT materials to define if the samples are getting good result of we must make more dense the number of points for these materials.
2019-10-15 12:47:35 +02:00
a98369e6a6 GPencil: More tweaks to arc function 2019-10-14 17:07:02 +02:00
34da576bea GPencil: Fix error in previous commit with interpolate factor 2019-10-14 16:26:11 +02:00
e08c6dd293 Merge branch 'master' into greasepencil-object 2019-10-14 15:58:27 +02:00
22bd2be24e GPencil: Interpolate pressure and strength for arc points 2019-10-14 15:39:29 +02:00
e78cd7a417 GPencil: Add new ARC points for missing mouse events (WIP)
See T70765 for details
2019-10-14 13:44:55 +02:00
0bfa730db0 Merge branch 'master' into greasepencil-object 2019-10-14 09:04:29 +02:00
aa5084202d Merge branch 'master' into greasepencil-object 2019-10-11 19:59:01 +02:00
da8e276b28 Merge branch 'master' into greasepencil-object 2019-10-11 13:46:06 +02:00
7f8f29448e Merge branch 'master' into greasepencil-object 2019-10-10 20:21:50 +02:00
195cd35e2d Merge branch 'master' into greasepencil-object 2019-10-10 08:14:12 +02:00
97bb07f07a Merge branch 'master' into greasepencil-object 2019-10-09 09:06:51 +02:00
a0da32f9cd Merge branch 'master' into greasepencil-object 2019-10-07 20:41:02 +02:00
6ed8d5e281 Merge branch 'master' into greasepencil-object 2019-10-06 12:07:02 +02:00
5ed2189961 Merge branch 'master' into greasepencil-object 2019-10-04 21:00:25 +02:00
fc019244c8 Merge branch 'master' into greasepencil-object 2019-10-04 10:22:03 +02:00
3a557c32a9 Merge branch 'master' into greasepencil-object 2019-10-03 19:04:09 +02:00
0a033c4b69 GPencil: Disable Smart Smooth when Random is enabled
These options cannot be used at the same time because the Smart Smooth is designed to remove any imperfection in the stroke and the random options are designed to create these imperfections, so the smooth removes all randomnes.
2019-10-03 17:46:21 +02:00
6109704d58 Cleanup: Fix comments 2019-10-03 16:56:55 +02:00
6a0153590c Merge branch 'master' into greasepencil-object 2019-10-03 16:52:58 +02:00
0bb31c08b5 GPencil: Sculpt brushes uses affect position flag
This commit changes the following:

1) The affect parameters have been moved to brush. Before, this parameter was by toolsettings and this was wrong.
2) Intialize the affect postion to ON.
3) If affect position is OFF, don't apply Sculpt brush effect.
2019-10-03 16:25:58 +02:00
8571a28c6e Merge branch 'master' into greasepencil-object 2019-10-03 12:56:28 +02:00
adebd9813b GPencil: Limit internally Smart Smooth to range 0 to 0.5
In the UI we keep a range between 0.0 to 1.0 for usability reasons, but internally, the value is divided by 2 to limit the real between 0.0 and to 0.5 and also makes it less sensible.
2019-10-03 12:54:46 +02:00
dd9995e985 GPencil: Remove Active Subdivide parameter from Brush
This parameter is not required with the last changes in paint smooth.
2019-10-03 12:48:07 +02:00
f895c8f9fd GPencil: Use original strokes, not evaluated 2019-10-02 23:16:11 +02:00
2923b1feb9 GPencil: Fix wrong break line
This was kept in the code by error.
2019-10-02 16:27:49 +02:00
61ac5e5421 GPencil: Change default value for Scale change 2019-10-02 16:10:14 +02:00
d69c6b6f47 GPencil: Add missing stroke UV initialization. 2019-10-02 16:09:02 +02:00
9547085767 Merge branch 'temp-gpencil-uv' into greasepencil-object 2019-10-02 15:41:43 +02:00
e9dd688347 GPencil: Set Reset UV menu as one option only 2019-10-02 15:40:28 +02:00
f6c786102c Merge branch 'master' into greasepencil-object 2019-10-02 15:33:53 +02:00
ba9ac200ce GPencil: Rename Clear transform to Reset 2019-10-02 15:26:20 +02:00
f6de7a2314 GPencil: Fix memory leak
The return was breaking the memory free.
2019-10-02 11:19:09 +02:00
184006ed18 GPencil: Fix typo error 2019-10-02 11:11:08 +02:00
a49d8223a4 Merge branch 'master' into temp-gpencil-uv 2019-10-02 11:09:03 +02:00
26b3b64156 Merge branch 'master' into greasepencil-object 2019-10-02 11:07:12 +02:00
43f53078a2 GPencil: New operator to clear UV transformations 2019-10-02 11:04:14 +02:00
5829b32692 GPencil: Fix error of initialization 2019-10-01 22:54:22 +02:00
0e91daac6d GPencil: Set all tools in one Toolbar Icon 2019-10-01 20:15:22 +02:00
353244e52b GPencil: Improve messages 2019-10-01 20:15:22 +02:00
a4a7073f6c GPencil: New Tools for transforming UVs
The new tools are for translate, rotate and scale the UVs for any fill stroke using texture.

This was a missing option for UVs in grease pencil.
2019-10-01 15:32:54 +02:00
3da3883fc5 Merge branch 'master' into greasepencil-object 2019-10-01 15:29:37 +02:00
ea58426aa1 Merge branch 'master' into greasepencil-object 2019-09-30 10:35:36 +02:00
1e791f038b Merge branch 'master' into greasepencil-object 2019-09-29 20:05:52 +02:00
9f2048cd08 Cleanup: Remove wrong format 2019-09-27 23:41:32 +02:00
cabd3c9fba GPencil: Fix merge errors 2019-09-27 23:36:40 +02:00
0981884610 GPencil: SVG Remove exporter
This will be added in the future.
2019-09-27 23:34:29 +02:00
b5b414b562 Cleanup: Unused variables 2019-09-27 23:32:35 +02:00
623b7334dc Cleanup: Clang Format 2019-09-27 23:29:17 +02:00
cfef9632b6 GPencil: Remove unused functions
These functions were moved to a separated patch for modifiers: https://developer.blender.org/D5795
2019-09-27 23:21:07 +02:00
b75d07bf45 Merge branch 'master' into greasepencil-object 2019-09-27 23:16:49 +02:00
4c723d6c80 Merge branch 'master' into greasepencil-object 2019-09-27 22:59:21 +02:00
419157e3c5 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/brush.c
2019-09-27 16:56:07 +02:00
a5c1926a82 Merge branch 'master' into greasepencil-object 2019-09-27 15:31:20 +02:00
f4d9050eac Merge branch 'master' into greasepencil-object 2019-09-27 09:56:44 +02:00
9cf21e714a GPencil: Test new Smart Smooth parameter in UI 2019-09-26 23:29:30 +02:00
ce3d8cee4b Merge branch 'master' into greasepencil-object 2019-09-26 18:43:17 +02:00
27f8dd7242 GPencil: Change smooth loops to 5 2019-09-26 16:35:15 +02:00
8de1e8b5fe Cleanup: Fix comments typo 2019-09-26 16:35:08 +02:00
1f99309561 Merge branch 'master' into greasepencil-object 2019-09-26 16:04:07 +02:00
64f5b1d986 GPencil: Add smart smooth for interpolated points
When using the samples, the interpolated points get abrupt steps because the system cannot receive all events in a short period of time.

This is more noticeable when the samples are set to 10 and the pen is moved very fast. The problem with post-processing smooth is that is applied to all stroke and this removes details.

The smart smooth is automatic and detect only the segments in the stroke where the system was unable to capture all movements and apply a smooth algorithm.
2019-09-26 15:59:34 +02:00
3d67dd939f Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_paint.c
2019-09-25 16:18:07 +02:00
b1650a910e Clenaup: Fix typo error 2019-09-25 10:18:23 +02:00
4993a15498 GPenciL: Reduce lower limit for minimum pressure. 2019-09-25 10:15:39 +02:00
990019de56 GPencil: Add smooth in interpolated strokes 2019-09-25 09:42:59 +02:00
ce3b35de28 GPencil: Apply active smooth to Strength 2019-09-24 19:42:46 +02:00
8b584b3c16 GPencil: Truncate last stroke buffer points with very low pressure
This reduces the drag line when move very fast the pen.
2019-09-24 19:42:39 +02:00
99a2682b07 Merge branch 'master' into greasepencil-object 2019-09-24 19:42:29 +02:00
8d681eccf0 Merge branch 'master' into greasepencil-object 2019-09-24 10:37:20 +02:00
b77f87da5e Merge branch 'master' into greasepencil-object 2019-09-23 17:04:15 +02:00
33a9976637 Merge branch 'master' into greasepencil-object 2019-09-23 11:53:33 +02:00
7c45b87ec7 Merge branch 'master' into greasepencil-object 2019-09-22 13:16:40 +02:00
2ed03e831d Merge branch 'master' into greasepencil-object 2019-09-21 19:56:03 +02:00
0513f4e6ce Merge branch 'master' into greasepencil-object 2019-09-21 10:41:17 +02:00
47851e38e7 GPencil: Use Object location instead of 3D cursor for Grab Brush
Instead to use the 3D cursor as reference point (legacy code), it would be better use the object location.
2019-09-19 17:04:20 +02:00
7a9d4bafab Merge branch 'master' into greasepencil-object 2019-09-19 16:40:56 +02:00
8810aea9cd Merge branch 'master' into greasepencil-object 2019-09-19 11:21:00 +02:00
b3cad2b7b7 Merge branch 'master' into greasepencil-object 2019-09-18 21:12:05 +02:00
c88debb3c2 Merge branch 'master' into greasepencil-object 2019-09-18 17:42:01 +02:00
02c5663dea Merge branch 'master' into greasepencil-object 2019-09-17 15:53:42 +02:00
d3ad1b4a1c Merge branch 'master' into greasepencil-object 2019-09-17 13:16:22 +02:00
6cbb2968a9 Merge branch 'master' into greasepencil-object 2019-09-16 10:55:35 +02:00
28d1d31d17 Gpencil: Enable subdiv for 2-point strokes. 2019-09-16 16:06:34 +08:00
072c82f486 Merge branch 'master' into greasepencil-object 2019-09-15 22:29:32 +02:00
b54ccaca35 Merge branch 'master' into greasepencil-object 2019-09-15 18:59:23 +02:00
41c8487ba8 Gpencil: Fix register err from the last commit. 2019-09-15 21:35:55 +08:00
d31db29f78 Gpencil: Removed length & multiply modifiers.
They are in temp-npr-gpencil_modifiers branch cor cleanling up.
2019-09-15 21:27:19 +08:00
3da5f3d895 Merge branch 'master' into greasepencil-object 2019-09-15 12:22:31 +02:00
bbdffae8ac Merge branch 'master' into greasepencil-object 2019-09-14 08:59:25 +02:00
e0161ed2ff Merge branch 'master' into greasepencil-object 2019-09-13 23:06:12 +02:00
b842341a2f Merge branch 'master' into greasepencil-object 2019-09-13 19:30:10 +02:00
bb32382700 Merge branch 'master' into greasepencil-object 2019-09-13 16:27:02 +02:00
f3bf30d040 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/makesdna/DNA_brush_types.h
2019-09-13 15:59:27 +02:00
ccc0ae5b0d Merge branch 'master' into greasepencil-object 2019-09-12 16:30:21 +02:00
fe639017a4 Merge branch 'master' into greasepencil-object 2019-09-12 13:00:55 +02:00
be936b2229 Merge branch 'master' into greasepencil-object 2019-09-12 11:18:50 +02:00
3df8dc4b62 Merge branch 'master' into greasepencil-object 2019-09-11 19:23:05 +02:00
7c9db03cd6 Merge branch 'master' into greasepencil-object 2019-09-11 12:59:51 +02:00
80f73fcb78 Merge branch 'master' into greasepencil-object 2019-09-11 12:05:44 +02:00
6b44a6ca7a Merge branch 'master' into greasepencil-object 2019-09-10 19:55:57 +02:00
a86e936484 Merge branch 'master' into greasepencil-object 2019-09-09 16:27:04 +02:00
f0839ba3db Merge branch 'master' into greasepencil-object 2019-09-09 15:50:23 +02:00
3d3d313d1c Merge branch 'master' into greasepencil-object 2019-09-09 11:08:39 +02:00
4b4de3dab2 Merge branch 'master' into greasepencil-object 2019-09-08 15:50:49 +02:00
c5b364cd24 Merge branch 'master' into greasepencil-object 2019-09-05 19:30:25 +02:00
910bcad912 Merge branch 'master' into greasepencil-object 2019-09-05 17:08:13 +02:00
48bc16af60 Merge branch 'master' into greasepencil-object 2019-09-04 17:29:58 +02:00
5c22c1f90c Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_data_modifier.py
	source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
2019-09-02 13:40:50 +02:00
b247c14af0 Merge branch 'master' into greasepencil-object 2019-09-02 09:40:12 +02:00
e09026e553 Cleanup code 2019-09-01 11:30:26 +02:00
87a6b936b9 GPencil: Fix compiler warning 2019-09-01 10:35:40 +02:00
229d3d0b3d Merge branch 'master' into greasepencil-object 2019-09-01 09:38:31 +02:00
eb3bba9726 Merge branch 'master' into greasepencil-object 2019-08-31 17:54:49 +02:00
9beb47b802 GPencil: Update convert curves to fix Nurbs problems 2019-08-31 17:54:18 +02:00
64e8a61a8e Merge branch 'master' into greasepencil-object 2019-08-31 09:24:06 +02:00
878f561e55 Merge branch 'master' into greasepencil-object 2019-08-30 16:26:47 +02:00
c2f7315ccd Merge branch 'master' into greasepencil-object 2019-08-30 13:06:23 +02:00
ab4440244d Merge branch 'master' into greasepencil-object 2019-08-29 10:52:27 +02:00
0b11e828ae GPencil: Add support to convert Nurbs curves
Before the operator hadnle only Beziert types.
2019-08-28 13:59:59 +02:00
7892c8d7ff Merge branch 'master' into greasepencil-object 2019-08-28 11:22:47 +02:00
985bbf27b5 Merge branch 'master' into greasepencil-object 2019-08-27 16:00:48 +02:00
6626961234 Merge branch 'master' into greasepencil-object 2019-08-26 22:35:39 +02:00
0c9f8b6906 Merge branch 'master' into greasepencil-object 2019-08-26 15:58:41 +02:00
f5e4fc635f Merge branch 'master' into greasepencil-object 2019-08-26 11:54:03 +02:00
da9a464f94 Merge branch 'master' into greasepencil-object 2019-08-25 20:56:50 +02:00
e30d64cfc1 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_engine.h
2019-08-25 17:09:11 +02:00
901a5def00 GPencil: Reformat how the recalc of stroke is tagged
As now is working with the evaluated data for checking the brush effect, the original stroke must be tagged and not the evaluated one.

Also removed an unneeded copy-on-write tag.
2019-08-24 19:29:00 +02:00
0340f33096 GPencil: Fix typo (rna tooltip cannot end with point) 2019-08-24 18:56:10 +02:00
5fc7058bf9 Merge branch 'master' into greasepencil-object 2019-08-24 18:04:41 +02:00
7ce54d379a GPencil: Tag after sculpt to recalc data 2019-08-24 17:45:05 +02:00
b7cad6914f Cleanup: rename variables to eval instead of derived 2019-08-24 16:25:11 +02:00
279f38f46e Merge branch 'master' into greasepencil-object 2019-08-24 13:47:34 +02:00
5fd8caf715 Merge branch 'master' into greasepencil-object 2019-08-24 13:27:56 +02:00
6141029bfa Merge branch 'master' into greasepencil-object 2019-08-24 13:26:42 +02:00
49235428ff GPencil: Fix changes after merge
Some variables changed and need rename.
2019-08-24 13:20:20 +02:00
9a78dc806b Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenkernel/BKE_gpencil.h
	source/blender/blenkernel/intern/gpencil_modifier.c
	source/blender/draw/engines/gpencil/gpencil_cache_utils.c
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
	source/blender/draw/engines/gpencil/gpencil_engine.h
	source/blender/makesdna/DNA_object_types.h
2019-08-24 13:09:35 +02:00
cc0e7177e6 Merge branch 'master' into greasepencil-object 2019-08-23 17:20:57 +02:00
c3f8800d47 Merge branch 'master' into greasepencil-object 2019-08-22 18:01:59 +02:00
b8be8f54df GPencil: Verify duplicate SVG materials only for SOLID
For gradient types, each color is a different material.
2019-08-22 16:46:58 +02:00
cf251d5fd7 Merge branch 'master' into greasepencil-object 2019-08-22 12:03:11 +02:00
e9862431cc GPencil: Create Linear gradient fill colors in SVG conversion
There are several limitations in this conversion because SVG support multiple color, but GP only 2. For GP only the extreme colors (first and last) are used.

The mix factor is always set to 0.5.

The angle of the gradient is calculated using the direction of the line defined in Linear gradient.
2019-08-22 12:02:31 +02:00
3036c1fed1 Merge branch 'master' into greasepencil-object 2019-08-21 20:39:34 +02:00
a9c9a08a32 Merge branch 'master' into greasepencil-object 2019-08-21 12:36:51 +02:00
06e2b47490 Merge branch 'master' into greasepencil-object 2019-08-21 11:15:16 +02:00
43fac430e8 Merge branch 'master' into greasepencil-object 2019-08-20 18:13:17 +02:00
0a724fb441 GPencil: Avoid error when material slot is empty in Convert to 2019-08-20 17:04:51 +02:00
44622d063c GPencil: Check the material converted from curves has something
Check the material has Stroke or Fill enabled and avoid unactivated materials.
2019-08-20 13:58:27 +02:00
25b1744981 GPencil: When convert curve do not enable Stroke always
When the converted curve has only fill, the stroke must be set to off.
2019-08-20 12:12:57 +02:00
fac980a2ea Merge branch 'master' into greasepencil-object 2019-08-20 11:10:26 +02:00
c76a9add21 GPencil: Cleanup comments. 2019-08-19 20:56:10 +02:00
b3901a7d69 Merge branch 'master' into greasepencil-object 2019-08-19 20:37:16 +02:00
b056642287 GPencil: Fix last missing point in active Subdivide
The last subdivision point was missing and there was a gap in the point distribution.
2019-08-19 10:28:00 +02:00
a58c6a9cd9 GPencil: Make active Subdivide by pixel distance
Now the subdivision is base on the distance in pixels between last two mouse positions.
2019-08-18 21:03:37 +02:00
acb875be38 GPencil: New Active Subdivide for Brushes
This new option subdivide the last stroke segment while drawing.
2019-08-18 17:50:32 +02:00
3c393ba332 Merge branch 'master' into greasepencil-object 2019-08-18 11:41:49 +02:00
b1ada48b61 Revert "GPencil: Increase number of input samples to 50"
This reverts commit dd370cbf89.
2019-08-18 11:24:18 +02:00
46bdca99ab Revert "GPencil: Increase Input Samples and reduce distance"
This reverts commit 351f87fc84.
2019-08-18 11:23:19 +02:00
fd49a11424 Revert "GPencil: Several changes in Input Samples algorithm"
This reverts commit d78e3bfb33.
2019-08-18 11:23:14 +02:00
d78e3bfb33 GPencil: Several changes in Input Samples algorithm
Changes to test different setups of the algorithm.

Also, the UI value is from 0 to 10, but internally is used squared.
2019-08-17 20:24:18 +02:00
351f87fc84 GPencil: Increase Input Samples and reduce distance
This commit is to test new brushes.
2019-08-17 19:00:12 +02:00
b601109960 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_brush.c
	source/blender/editors/gpencil/gpencil_intern.h
2019-08-17 16:31:36 +02:00
c08e8867c1 GPencil: Fix merge errors 2019-08-16 21:33:22 +02:00
d853f74596 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_edit.c
2019-08-16 21:24:07 +02:00
4e9bcffc39 Merge branch 'master' into greasepencil-object 2019-08-16 12:35:57 +02:00
2551c5b6e6 Merge branch 'master' into greasepencil-object 2019-08-15 13:16:07 +02:00
6cb1a55141 Merge branch 'master' into greasepencil-object 2019-08-14 17:34:06 +02:00
1c22d8818a Merge branch 'master' into greasepencil-object 2019-08-14 16:00:38 +02:00
90183d7d5c GPencil: Smooth pressure in Active Smooth
This smooth is applied while drawing.
2019-08-14 10:23:35 +02:00
8826ecc2a8 GPencil: Run Simplify Adaptive before Smooth Thickness 2019-08-14 08:44:44 +02:00
0a3e04b13b GPencil: Add new Simplify parameter for Brush
This option is to test new types of brushes.
2019-08-13 22:51:46 +02:00
dd370cbf89 GPencil: Increase number of input samples to 50
For testing new brushes.
2019-08-13 22:51:37 +02:00
0e72dbafd2 Merge branch 'master' into greasepencil-object 2019-08-13 22:34:34 +02:00
00869ba1e8 Merge branch 'master' into greasepencil-object 2019-08-12 23:36:06 +02:00
7dec32ea40 Merge branch 'master' into greasepencil-object 2019-08-12 16:24:18 +02:00
62ed289c5f Merge branch 'master' into greasepencil-object 2019-08-10 17:31:13 +02:00
d7fd89bafc Merge branch 'master' into greasepencil-object 2019-08-10 13:18:13 +02:00
bc958747b7 GPencil: Add inverse matrix to macro
This makes the macro similar to editable macro.
2019-08-10 13:17:51 +02:00
295b2e793b Merge branch 'master' into greasepencil-object 2019-08-10 11:40:20 +02:00
7782f529ea Merge branch 'master' into greasepencil-object 2019-08-09 17:58:11 +02:00
b4aeb8df19 GPencil: Fix some minor problems with merge
As the code was ain the branch already, the previous merge had some problems.
2019-08-09 17:57:17 +02:00
a1bbf5200d Merge branch 'master' into greasepencil-object 2019-08-09 17:43:40 +02:00
9087cf593e Merge branch 'master' into greasepencil-object 2019-08-09 15:43:08 +02:00
6ae9dd0902 GPencil: More merge errors
All these errors are related to the problem when merge the LANPR branch to GPencil branch by error.
2019-08-09 13:59:43 +02:00
0ff6eb8681 GPencil: Fix old merge error 2019-08-09 12:38:59 +02:00
acd9ec5571 Merge branch 'master' into greasepencil-object 2019-08-09 12:15:06 +02:00
379aedc3d2 Merge branch 'master' into greasepencil-object 2019-08-09 11:38:04 +02:00
527ed0d320 Merge branch 'master' into greasepencil-object 2019-08-08 17:20:21 +02:00
1cdcbe666e GPencil: Fix merge duplication 2019-08-08 16:57:52 +02:00
c5efb2c3c3 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenkernel/BKE_gpencil.h
	source/blender/blenkernel/intern/gpencil.c
2019-08-08 16:50:21 +02:00
8c580ec944 GPencil: Fix merge error 2019-08-08 15:55:41 +02:00
94c416195e Merge branch 'master' into greasepencil-object 2019-08-08 15:49:36 +02:00
176adad89b Merge branch 'master' into greasepencil-object 2019-08-08 10:47:21 +02:00
c65c0b1045 Merge branch 'master' into greasepencil-object 2019-08-08 10:42:14 +02:00
167565f1dc Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
2019-08-08 10:34:35 +02:00
59db505b55 GPencil: Simplify Merge by Distance operator
The old method to interpolate the position created a wrong merge. Now, always the secondary point is merged with the first one, except the last point.
2019-08-07 20:12:46 +02:00
7c98af0a82 Merge branch 'master' into greasepencil-object 2019-08-07 18:25:31 +02:00
9024872ac8 GPencil: New Edit menu structure
Changes by @mendio
2019-08-07 17:01:39 +02:00
93fc7e4c3d GPencil: New operator merge by distance (WIP)
This operator joins points separated by a distance lower than factor. The point is moved to the middle location, except extremes that keep extreme location.
2019-08-07 13:11:21 +02:00
4a8b7904fa Merge branch 'master' into greasepencil-object 2019-08-07 12:16:07 +02:00
76e0123700 GPencil: Fix error after merge 2019-08-07 12:14:00 +02:00
d14ffd77df Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenkernel/BKE_blender_version.h
	source/blender/blenkernel/intern/gpencil.c
	source/blender/blenkernel/intern/gpencil_modifier.c
	source/blender/editors/gpencil/annotate_paint.c
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/object/object_hook.c
	source/blender/editors/space_clip/clip_graph_draw.c
2019-08-06 22:11:08 +02:00
0aa824cad2 GPencil: Revert wrong merge of LANPR branch
Due to an error, the code of LANPR branch was merged accidentally to the Grease Pencil branch.

This commit reverts all work to the last correct commit.

The command executed was: `git diff ff74822863 | patch -p1 -R`

Thanks to @dfelinto for fixing the error.
2019-08-06 19:44:24 +02:00
7356e92255 Merge branch 'master' into greasepencil-object 2019-07-29 16:46:03 +02:00
ec5d643d3e GPencil: Update stroke loop after merge using macro
During merge, the loop back to old style using for's and now it's using the macro.
2019-07-29 16:24:25 +02:00
c8e9cf3dad Merge branch 'master' into greasepencil-object 2019-07-29 16:13:14 +02:00
29259a318d GPencil: Merge by distance (WIP)
Initial implementation of merge by distance
GPencil: Fix duplicated CMake entry


GPencil: Add missing code for operator in previous commit
2019-07-29 13:56:48 +02:00
6022c2fae2 Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-29 09:06:33 +08:00
ff74822863 GPencil: Cleanup tarnsform rotation function 2019-07-28 17:29:47 +02:00
0473e4c50a Merge branch 'master' into greasepencil-object 2019-07-28 17:06:37 +02:00
a8037f4038 Merge branch 'master' into greasepencil-object 2019-07-27 11:44:21 +02:00
3eecb2806b GPencil: Add Edit support to Length modifier
Now the modifier is visible in edit mode.
2019-07-26 17:28:09 +02:00
9a7f7757f8 GPencil: Fix missing modifiers initialization
This was missing when the modifier was ported from NPR branch
2019-07-26 17:12:00 +02:00
0bbf47ce42 GPencil: Cleanup more compiler warnings 2019-07-26 16:48:22 +02:00
af7d3bb2db GPencil: Remove compiler warnings 2019-07-26 16:43:18 +02:00
4e017abc3d Cleanup: Fixed some warnings in editor/lanpr. 2019-07-26 17:29:43 +08:00
fbbbdf33f2 GPencil: two modifiers from LANPR branch. 2019-07-26 16:47:59 +08:00
bd26db98bc LANPR: UI refactor: line layer ui list use name. 2019-07-26 16:16:56 +08:00
56b29df5cb LANPR: UI refactor: collection usage panel. 2019-07-26 15:59:38 +08:00
a1e758801f LANPR: Object usage flag now in LANPR tab. 2019-07-26 15:54:12 +08:00
284f04a53d LANPR: UI refactor: modifier ui now put into separate tab. 2019-07-26 15:48:29 +08:00
05bf5dab1b GPencil: static and const flags for function/args. 2019-07-26 14:56:46 +08:00
02de8602c8 LANPR: Make flag marcos into enums. 2019-07-26 14:46:52 +08:00
dbd558d574 LANPR: Fixed drawing problems when chaining is enabled. 2019-07-26 12:20:52 +08:00
dd3f69a783 LANPR: Fixed "point" mode in normal control. 2019-07-26 11:33:36 +08:00
52db223bd6 LANPR: UI refactor: naming fixes in the main panel. 2019-07-26 11:09:11 +08:00
cbaab41450 LANPR: UI refactor: option sub panel fixes. 2019-07-26 11:04:58 +08:00
ee73885bd1 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-26 11:00:53 +08:00
a2fb1f367b Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-26 11:00:41 +08:00
80a6acd814 Cleanup: Remove . at the end of text 2019-07-25 14:03:02 +02:00
c6fbc1db41 Merge branch 'master' into greasepencil-object 2019-07-25 12:41:59 +02:00
9e4cc7c630 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-25 14:34:45 +08:00
caab047f9c LANPR: UI refactor: added script for object lanpr tab. 2019-07-24 17:10:44 +08:00
22e330b4b0 LANPR: Added a dedicated tab for feature line modifier options. 2019-07-24 16:59:13 +08:00
16a453dd9c LANPR: UI refactor: gpencil panel. 2019-07-24 16:11:40 +08:00
6e2f3ee26a LANPR: UI refactor: options panel. 2019-07-24 15:59:43 +08:00
6acc7d4015 LANPR: UI refactor: chaining panel. 2019-07-24 15:50:43 +08:00
86fa225164 LANPR: UI refactor: effects panel. 2019-07-24 15:44:46 +08:00
1616a6a57f LANPR: use LANPR_LineType for duplicated style storage. 2019-07-24 10:55:54 +08:00
b4f707424e LANPR: UI refactor: main panel. 2019-07-24 10:22:06 +08:00
349f7b8f32 Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-24 09:03:51 +08:00
09a774c3c0 GPencil: Remove duplicate self overlap option
The option was duplicated for textured strokes.
2019-07-23 13:32:57 +02:00
8441fa98f7 Merge branch 'master' into greasepencil-object 2019-07-23 09:48:00 +02:00
0abf6d349c Cleanup: Rename poll function 2019-07-22 16:54:42 +02:00
2f1c33d87b LANPR: Fixed render alpha in LANPR engine. 2019-07-22 10:09:11 +08:00
37ca6d2947 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-22 09:55:46 +08:00
b5c3dbc359 Fix assert in some cases when using DataTransfer modifier for custom normals.
Reported by @sybren on IRC, thanks.

Should be safe for 2.80.
2019-07-22 08:54:00 +08:00
6fff1f2b6e Merge branch 'master' into greasepencil-object 2019-07-21 22:34:05 +02:00
f491355c43 Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-20 16:41:35 +08:00
475aca05ab GPencil: Fix errors after merge and compiler warnings
The BKE_text_write function parameter list changed.

Added some UNUSED_VARS to functions in development.
2019-07-19 15:51:09 +02:00
c4b57de36e Merge branch 'master' into greasepencil-object 2019-07-19 15:29:45 +02:00
39341441f1 GPencil: Add frame parameter to deformStroke callback
This parameter can be necessary for some new modifiers in development. The parmeter was already there but it was removed, now we back again the parameter.
2019-07-19 15:26:29 +02:00
b07a0fe41d LANPR: Use GPU_BATCH_DISCARD_SAFE marco. 2019-07-19 17:05:13 +08:00
9b0c3c39a6 LANPR: Remove useless GPU_ATTACHMENT_LEAVE flags. 2019-07-19 17:03:06 +08:00
0c69893bd6 LANPR: Renamed freestyle edge mark constant into lanpr. 2019-07-19 16:26:08 +08:00
0a6dd063ef LANPR: Edge/face mark UI now forllows LANPR checkbox. 2019-07-19 16:26:08 +08:00
7dfb221aca LANPR: Remove freestyle #ifdef's. 2019-07-19 16:26:08 +08:00
a693068047 LANPR: Rename freestyle edge mark functions to LANPR. 2019-07-19 16:26:08 +08:00
3912e4439a Cleanup: Replace if else if, by Switch 2019-07-19 10:18:51 +02:00
69c8d314cf Merge branch 'master' into greasepencil-object 2019-07-18 22:24:14 +02:00
69218e4d9a GPencil: Remove old comments 2019-07-18 22:23:14 +02:00
b05570736c GPencil: Testing idea for changing weights when opacity factor is greater than 1.0 2019-07-18 20:50:03 +02:00
3f4e87e987 GPencil: Clamp weight in Opacity modifier for Material mode
If the value is not clamped, the opacity gets wild values.
2019-07-18 20:25:29 +02:00
092f9ead20 GPencil: Apply opacity only to vertex with weights 2019-07-18 20:22:54 +02:00
8fc1be0c2b GPencil: Fix unreported error in Brush option panel
The options of the material are from object material not pinned material.

If the brush is pinned, the material must be the brush material and not the object material.
2019-07-18 19:52:52 +02:00
2cef81ac4f GPencil: Modify opacity modifier to use weights inverted
It's more logic consider the no weight as opaque and the weight to transparent.

Also fixed some small issues.
2019-07-18 19:38:45 +02:00
71eda41ae9 GPencil: Fix error when apply material in Opacity/Hue and Tint 2019-07-18 18:07:56 +02:00
35af94cc86 GPencil: New Strength mode for Opacity modifier
Now it's possible to determine the opacity by Material (default) or by point Strength.

This new mode is required to get some effects using weight data.
2019-07-18 18:07:34 +02:00
8bfa7e1c72 GPencil: Fix error with evaluated colors after changing evaluation to depsgraph
The temporary colors were not copied when the derived frame was created.

The color must be copied in evaluation, not in draw manager because this replace any modifier change.
2019-07-18 18:03:14 +02:00
c6f6d6ef09 GPencil: Enable gradient factor for Line strokes
Now it's possible to use the same gradient used in Dots and Boxes with Line strokes. This was disabled, pending to solve the overlap glitches, but as this was fixed with stencil, we can enable it again.

Also, the gradient formula has been changed to use the same of Dots.
2019-07-18 16:50:43 +02:00
995c0f84a6 LANPR: Remove mode selector when not in LANPR engine. 2019-07-18 19:47:13 +08:00
ea4119b894 LANPR: Removed edge detection entry in the mode selector. 2019-07-18 19:29:48 +08:00
7c476569e5 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-18 15:55:48 +08:00
6e38a00d45 GPencil: Fix length modifier wrong callback. 2019-07-18 15:12:13 +08:00
c0bc74fb5e LANPR: Description of auto update write as "frame changes". 2019-07-18 14:36:44 +08:00
bf7727c976 Cleanup: Make format. 2019-07-18 14:34:32 +08:00
46b84938fa GPencil: Sample modifier accepts 3 points at least. 2019-07-18 14:33:34 +08:00
10ff3061dc GPencil: Relieable counter for sample function. 2019-07-18 14:23:12 +08:00
0507d41374 Merge branch 'master' into greasepencil-object 2019-07-17 23:02:30 +02:00
4759a0f0a6 Merge branch 'master' into greasepencil-object 2019-07-17 22:10:17 +02:00
fc40a09531 GPencil: Move initial curve control points apart
Based on feedback from @matiasmendio
2019-07-17 17:08:55 +01:00
80779629dc GPencil: Sample function new counter (not working properly). 2019-07-17 22:10:12 +08:00
2b17ee6cd4 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-17 20:03:31 +08:00
7f1acb3c51 Merge branch 'master' into greasepencil-object 2019-07-17 11:15:07 +02:00
e2a7fca986 GPencil: Make sample modifier a part of simplify modifier. 2019-07-17 14:40:00 +08:00
01e91a4215 LANPR: Feature line modifier UI consistensy with the rest. 2019-07-17 14:18:25 +08:00
957348116b GPencil: Renamed modifier "Length". 2019-07-17 14:12:18 +08:00
c7156dd30c GPencil: Renamed modifier into "MultiStroke". 2019-07-17 14:08:48 +08:00
93c4a93328 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-17 13:57:21 +08:00
1e0f4ba138 GPencil: Allow widng curve when normalize on in thickness modifier. 2019-07-17 11:20:15 +08:00
1ee17517f9 LANPR: Generate 100px wide original stroke for GPencil. 2019-07-17 11:06:33 +08:00
0d73e79966 Merge branch 'master' into greasepencil-object 2019-07-16 18:06:58 +02:00
c85f8ae5b2 Merge branch 'master' into greasepencil-object 2019-07-16 16:43:39 +02:00
665b57e0b9 Fix MSVC type error. 2019-07-16 22:42:30 +08:00
8a124f86c4 GPencil: Use alpha channel of curve material
Now the grease pencil stroke is using the alpha channel of the original curve material.
2019-07-16 16:30:55 +02:00
33596f237c LANPR: Stop splitting chains in CPU mode. 2019-07-16 20:50:53 +08:00
3afe60b2c4 LANPR: Auto update GPencil when in other engines. 2019-07-16 20:23:01 +08:00
0df10ebf3f GPencil: Use alpha component for converting splines
The alpha channel was not used before.

Note: This is a previous step before changing svg add-on to support alpha.
2019-07-16 13:45:33 +02:00
cb17dba738 Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-16 19:36:44 +08:00
9a0c100e6c LANPR: GPU mode batch refresh method changes. 2019-07-16 19:35:15 +08:00
575fff2209 GPencil: Cleanup MSVSC warnings 2019-07-16 13:11:34 +02:00
157dc60dc8 Merge branch 'master' into greasepencil-object 2019-07-16 12:14:36 +02:00
43343509b9 GPencil: Improve curve conversion when end points are very near
When the distance between first and last point of the curve was very small, there was a glitch in the join. Now the points are moved slightly to get good result.
2019-07-16 12:13:45 +02:00
4cda368ef6 GPencil: Improve Close stroke function for very small gaps
When the gap is very small, don't need to add new points to the stroke, just cyclic.
2019-07-16 11:31:05 +02:00
a808ade3a2 GPencil: Create one stroke for each spline
For curves with several splines, must create a stroke for each of them or the shape would be wrong.
2019-07-16 11:00:19 +02:00
cfdd663679 Merge branch 'master' into greasepencil-object 2019-07-15 17:22:35 +02:00
5b31532ec3 LANPR: Moved GPU batches to lanpr_share. 2019-07-15 22:18:23 +08:00
bb4c9ae09b LANPR: Fixing memeory leaking in GPU mode. 2019-07-15 21:29:21 +08:00
ba07ebb4cf Cleanup: Make format 2019-07-15 17:10:39 +08:00
43a15ac599 Cleanup: ED Declareations move into ED_lanpr.h 2019-07-15 17:05:43 +08:00
7f9a4d521a Cleanup: Redundant defines. 2019-07-15 16:51:56 +08:00
a0d8953335 Math: Double version of interpolate functions. 2019-07-15 16:45:09 +08:00
4a8167e026 Cleanup: Removed utility files. 2019-07-15 16:02:23 +08:00
67d493f6f2 Cleanup: LANPR draw engine codes. 2019-07-15 16:00:47 +08:00
31a71467e4 LANPR: Fixing function prefixes. 2019-07-15 15:55:14 +08:00
42b8ba32c1 Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-15 14:01:00 +08:00
648bd58595 GPencil: Change default value in python API
The gpencil_lines must be set to False by default.
2019-07-14 20:55:02 +02:00
7393ca434d GPencil: Set gpencil_lines parameter to False by default 2019-07-14 17:23:27 +02:00
58b7d61ebf GPencil: Fix problem when color is nofill in SVG
If the color in the SVG converted was nofill, the stroke had fill color in grease pencil and this creates glitches because the shape was not defined to be filled.

Now, the name of the color is checked to verify if the material is for stroke, and if only there is one material with this name, the fill is disabled.
2019-07-14 17:19:45 +02:00
e4c9f9d953 GPencil: Fix error generating strokes with curves with 2 points only
The number of segments must be 1 if the number of control points is 2. The problem was with the closed curves.

Also added tag of the databalock.
2019-07-14 14:33:23 +02:00
af6a5bc071 GPencil: Apply curve radius as pressure for stroke point
When convert the curve, the beziert point radius is used to generate the pressure of the grease pencil stroke point and this allows to generate different thickness.
2019-07-14 11:04:31 +02:00
f05a18f0fa GPencil: Rename python API function from convert_to_gpencil to generate_gpencil_strokes
The problem with old name was that it implied that original object was removed, but the function only creates the strokes, so the new name is better.
2019-07-14 10:46:22 +02:00
65bde9334d Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-14 14:23:03 +08:00
9546718f32 Merge branch 'master' into greasepencil-object 2019-07-13 11:35:27 +02:00
96339b8ea4 LANPR: Moved lanpr_util.c into ED. 2019-07-13 17:35:07 +08:00
141382d6f2 LANPR: Moved non-drawing related chaining code to ED. 2019-07-13 17:07:29 +08:00
ef16f19845 LANPR: Fixing local functions. 2019-07-13 16:28:22 +08:00
5b3ab68ae7 LANPR: Fixing local function and naming. 2019-07-13 16:19:55 +08:00
625fa7f276 LANPR: Moved CPU side calculations to ED. 2019-07-13 16:00:52 +08:00
f444749064 LANPR: Line layer operators now moved to ED 2019-07-13 15:23:55 +08:00
e6273ea3c7 LANPR: Changed to ED_ prefix. 2019-07-13 14:36:23 +08:00
897db2ba77 LANPR: Move GPencil operators into ED 2019-07-13 14:13:42 +08:00
8e8dac8160 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-13 10:44:24 +08:00
e1ce914c1e Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-12 09:13:44 +08:00
ae57188191 Merge branch 'master' into greasepencil-object 2019-07-11 17:21:22 +02:00
c6896fa780 Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-11 07:56:04 +08:00
ff12988a49 GPencil: Cleanup commet 2019-07-10 22:53:44 +02:00
3ba6576a32 GPencil: Remove extra parameters to Convert API
Scene can be removed using context. Also bmain can be removed too.
2019-07-10 21:09:18 +02:00
3ed7b3b37c GPencil: Add notifier to update new created stroke 2019-07-10 17:45:06 +02:00
8e8673483d GPencil: Change default parameter use_collections to True 2019-07-10 17:37:58 +02:00
8b3afb178a GPencil: Fix double definition
The gpl was out of scope due double definition.
2019-07-10 17:37:33 +02:00
097ae32e2b Merge branch 'master' into greasepencil-object 2019-07-10 17:12:31 +02:00
c524490425 GPencil: Basic python api to convert curve to strokes 2019-07-10 17:12:05 +02:00
9ad5e8cacc LANPR: Fix return type error. 2019-07-10 21:28:19 +08:00
74ae87d1d4 LANPR: Fix missed library linking. 2019-07-10 21:13:40 +08:00
8fc5c61974 LANPR: Move data defs and the svg modifier into editor/lanpr. 2019-07-10 21:09:39 +08:00
6cbc913b00 Cleanup: make format. 2019-07-10 20:32:35 +08:00
16ddb6a6f7 LANPR: use ED_ functions for SVG export. 2019-07-10 20:28:26 +08:00
88c5c92b03 Merge branch 'greasepencil-object' into soc-2019-npr 2019-07-10 20:14:44 +08:00
222deeee3d SVG: functions moved to editors/io for ease of external access. 2019-07-10 20:10:33 +08:00
905b70f9a4 LANPR: SVG export callbacks. 2019-07-10 13:43:35 +08:00
a412b5c7fb LANPR: Added operator for exporting svg. (Not functioning) 2019-07-10 11:08:40 +08:00
6a9c424b76 Merge branch 'greasepencil-object' into soc-2019-npr 2019-07-10 10:49:31 +08:00
fc34653ce2 Gpencil: Basic SVG export callback is running OK. 2019-07-10 10:48:10 +08:00
f27629c593 Gpenci: Fix missing path end markings in writesvg.c 2019-07-10 09:55:50 +08:00
ef7587c4d5 Gpencil: Renamed GPencilSVGWriter into GPencilSVGIterator. 2019-07-10 09:45:59 +08:00
b4f39f5ee9 Merge remote-tracking branch 'origin/greasepencil-object' into soc-2019-npr 2019-07-10 09:31:56 +08:00
00b5bda6ae Merge branch 'master' into greasepencil-object
Conflicts:
	release/datafiles/locale
	release/scripts/addons
	release/scripts/addons_contrib
	source/tools
2019-07-09 23:23:26 +02:00
2e7dee3fb9 GPencil: Add "Self Overlap" parameter to materials to disable Stencil
This parameter was removed in 2.80 and we decided to back again, but now is inverted.
2019-07-09 23:11:36 +02:00
2708e25e4e GPencil: Use dynamic array size for SBuffer while drawing
This is to solve the fixed limit defined before.

Also some cleanup and renames.
2019-07-09 22:53:06 +02:00
8742dedaab GPencil: Fix possible memory leak in function
The function exit before the END_ITER
2019-07-09 22:44:26 +02:00
58888e7f87 GPencil: Undo clang reformat lines and keep old format
These lines were changed by clang and don't need to be changed.
2019-07-09 16:44:07 +02:00
b76eb572fc LANPR: don't use zero value in chaining. 2019-07-09 22:01:53 +08:00
0fecf69adb Merge branch 'greasepencil-object' into soc-2019-npr 2019-07-09 15:42:30 +08:00
bf73c8bf39 Gpencil: svg export operator 2019-07-09 15:42:09 +08:00
11423f922b Gpencil: svg callbacks. 2019-07-09 14:47:58 +08:00
a4f499eb23 Merge branch 'greasepencil-object' into soc-2019-npr 2019-07-09 12:01:40 +08:00
f4b4e77312 Gpencil: error fixes. 2019-07-09 11:54:22 +08:00
91d21adabd Merge branch 'greasepencil-object' into soc-2019-npr 2019-07-09 11:42:32 +08:00
176ef101a0 Gpencil: Fixed include errors in writesvg.c 2019-07-09 11:41:46 +08:00
f3e08bbf50 Gpencil: fixed writesvg.c include errors. 2019-07-09 11:40:24 +08:00
37d111b30b Merge branch 'greasepencil-object' into soc-2019-npr 2019-07-09 11:33:04 +08:00
cd931d48a6 Gpencil: Fix non-return error. 2019-07-09 11:32:22 +08:00
97d6c9bae9 Merge branch 'greasepencil-object' into soc-2019-npr 2019-07-09 11:24:46 +08:00
c2e46946a7 Gpencil: svg exporter initial. 2019-07-09 11:23:29 +08:00
3ecac8b2e5 Merge branch 'master' into soc-2019-npr 2019-07-09 09:14:58 +08:00
710eb7b3a9 Merge branch 'master' into greasepencil-object 2019-07-08 20:50:48 +02:00
3fb21e6010 LANPR: Fix CPU mode overlay display error. 2019-07-08 22:24:03 +08:00
b922253366 Merge branch 'master' into greasepencil-object 2019-07-08 16:04:41 +02:00
aa25207c44 Cleanup: make format 2019-07-08 21:34:32 +08:00
b3b40fca75 LANPR: CPU mode camera view pan/zoom aligned. 2019-07-08 21:26:26 +08:00
e410f352d6 GPencil: Fix Select material operator not refresh viewport
With the change to depsgraph evaluation, need tag the datablock to refresh screen.
2019-07-08 12:21:06 +02:00
3ad90ba731 GPencil: Use secondary material for stroke color 2019-07-08 11:55:12 +02:00
b5da6a9126 LANPR: Fixing CPU mode camera view scale. 2019-07-08 17:52:56 +08:00
a04dafceff LANPR: CPU mode shaders now follow viewport zoom/pan values. 2019-07-08 17:29:42 +08:00
5e6e550861 GPencil: Use collection names as layer names in conversion from curves 2019-07-08 11:03:45 +02:00
ebeb3b84c0 LANPR: Panels in object and collection page always display when engine is selected 2019-07-08 16:29:51 +08:00
2a15303a8f LANPR: GPU mode now supports all three usage flags in objects and collections. 2019-07-08 16:24:35 +08:00
1f875e60b7 LANPR: GPU mode follow object/collection usage flag. 2019-07-08 16:15:20 +08:00
3f1072d827 Merge branch 'master' into greasepencil-object 2019-07-08 10:08:28 +02:00
f96f91512c LANPR: UI and operator guard for null camera situations. 2019-07-08 15:28:28 +08:00
4aa84a312a Fix line layer init level errors. Default follow world color 2019-07-08 15:11:16 +08:00
85d36aebf4 LANPR: able to toggle two background colors. 2019-07-08 14:58:09 +08:00
2948779839 LANPR: option to use the world background. 2019-07-08 14:29:31 +08:00
6120e6ef06 GPU preview and render mode now follows background alpha correctly. 2019-07-08 13:56:06 +08:00
b0385f514f LANPR: Modifier ui now deactivates correctly. 2019-07-08 13:07:52 +08:00
f1bfe10c82 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-08 12:27:34 +08:00
85f13246ad Merge branch 'master' into greasepencil-object 2019-07-07 09:39:40 +02:00
ae8976b596 Cleanup: Use zero_v4 to init the default value. 2019-07-06 23:47:00 +08:00
3bd56a33d9 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_engine.h
2019-07-06 16:16:08 +02:00
fe31148d16 GPencil: Remove custom equals functions and reuse BLI_math compare
I have found the compare function when looking at BLI_math to add my functions, so these are duplicatd and can be removed.
2019-07-06 11:56:08 +02:00
e57d50d4d4 GPencil: Cleanup equals functions and add for floats and V2 2019-07-06 11:48:48 +02:00
6702da509a Merge remote-tracking branch 'origin/master' into soc-2019-npr
# Conflicts:
#	source/blender/draw/intern/draw_manager.c
2019-07-06 10:03:47 +08:00
9c0b207819 Merge branch 'master' into greasepencil-object 2019-07-05 22:15:31 +02:00
e125f3d3ae Merge branch 'master' into greasepencil-object 2019-07-05 17:10:33 +02:00
b8b88b7d52 GPencil: Improve management of curves without material
The SVG to Curves add-on gets some curves without material. Now these curves are set to a Pink material.
2019-07-05 17:09:54 +02:00
0f606437c3 Cleanup: Fix build error with MSVC
space after \ is not allowed
2019-07-05 07:12:45 -06:00
eebcad2813 LANPR: Minor display fixes. 2019-07-05 20:55:41 +08:00
8697062438 LANPR: Fix MSVC errors. 2019-07-05 20:49:49 +08:00
741c286e2b GPencil: Improves color handling for converted curves
Reduce the number of very similar colors.

Note: Maybe equals_v3v3_limit and equals_v4v4_limit could be added to BLI_math but with some cleanup and adding v2 version too
2019-07-05 10:41:12 +02:00
693cecab70 LANPR: Disable header checkbox when in LANPR engine. 2019-07-05 15:57:20 +08:00
e9bac3a23a LANPR: Modified default values for better initial experience. 2019-07-05 15:18:11 +08:00
38b68fa8fa LANPR: Enable Freestyle mark functions when LANPR is enabled. 2019-07-05 15:05:34 +08:00
ee1e72a316 Gpencil: make format 2019-07-05 14:52:04 +08:00
b28eb5e339 Gpencil: Fading in duplicate modifier. 2019-07-05 14:33:22 +08:00
61ccd2fa38 Gpencil: Duplicator stroke fading data structures. 2019-07-05 13:37:28 +08:00
f7c0fce061 Gpencil: Fix stroke duplication offset and UI slider. 2019-07-05 12:04:01 +08:00
bcb12f6a6c Gpencil: Fixed distance interpolation in multiply modifier. 2019-07-05 11:27:16 +08:00
e2cc428686 LANPR: Fixed GPU mode
bug: contour is always on.
2019-07-05 10:44:56 +08:00
de1994174b LANPR: Fixed always-on contour in UI. 2019-07-05 10:17:41 +08:00
80939ade23 LANPR: Improved line layer display in the list. 2019-07-05 10:11:27 +08:00
4052d68a00 LANPR: Discard source object stroke update functions. 2019-07-05 09:57:13 +08:00
fb96cbcf21 LANPR: Stroke update button for GP targets and mesh source objects. 2019-07-05 09:15:00 +08:00
e6421de53b LANPR: GPU mode empty layer list prompt. 2019-07-05 08:29:18 +08:00
4ff47d66b3 LANPR: GP target updater overwrite option. 2019-07-05 08:21:10 +08:00
1c2a22bb18 LANPR: Improvements of disable_edge_splits function. 2019-07-05 07:55:15 +08:00
3f7ed2261e Merge branch 'master' into soc-2019-npr 2019-07-05 07:37:58 +08:00
ae3116b49d GPencil: Fix error in Convert to Stroke with materials
The material color was checked in linear, but the gpencil material is sRGB.
2019-07-04 23:16:14 +02:00
fa39bdacf0 GPencil: New convert Curve to Stroke
New operator to convert any curve to grease pencil stroke.

The conversion works as a new option for Convert To operator.

Added a new parameter for selecting the color of the stroke.
2019-07-04 22:57:00 +02:00
c9d046c992 Merge branch 'master' into greasepencil-object 2019-07-04 22:48:45 +02:00
1455e56f28 Merge branch 'master' into greasepencil-object 2019-07-04 17:05:00 +02:00
7aed5dcad9 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-07-04 22:35:59 +08:00
10098812d3 LANPR: Intersection cache now updates before lanpr_cache_finish(). 2019-07-04 22:12:07 +08:00
0e19957ea1 LANPR: CPU mode chaining use deep bounding areas. 2019-07-04 16:18:55 +08:00
59da33fdb6 LANPR: fixed one coordinate bug in triangle culling function. 2019-07-04 15:10:48 +08:00
e2d3553343 LANPR: Fix GPU overflow prevention. 2019-07-04 14:56:11 +08:00
4530bb4f4d LANPR: use minimum occlusion level needed to speed up CPU mode. 2019-07-04 14:31:23 +08:00
28212da97f LANPR: new layer now increase occlusion level automatically. 2019-07-04 13:49:52 +08:00
321f92424e LANPR: Remove composition operators. 2019-07-04 13:25:09 +08:00
fe573ce914 LANPR: GPU mode prevent overflow. 2019-07-04 12:47:31 +08:00
ff78b59b7c LANPR: GPU mode follow cache size settings. 2019-07-04 12:33:30 +08:00
09df147f8d LANPR: GPU mode cache size option. 2019-07-04 12:05:25 +08:00
5ddcffa17c Merge branch 'master' into soc-2019-npr 2019-07-04 10:46:15 +08:00
adab7242d4 LANPR: Fixed _UL_ name warnings. 2019-07-03 21:56:32 +08:00
6b179c7f86 LANPR: Image chaining threshold set higher bound. 2019-07-03 17:06:04 +08:00
a44d39800b Gpencil: Duplication modifier is working now. 2019-07-03 16:49:23 +08:00
1aa8870b95 Gpencil: Length modifier now handles relative lengths 2019-07-03 15:08:44 +08:00
caa004c6bc LANPR: GP update will now delete data in the original frame. 2019-07-03 14:33:37 +08:00
95cf3a3234 LANPR: Automatically update cache before drawing. (by a switch) 2019-07-03 14:04:15 +08:00
d7174b1860 LANPR: Automatically update LANPR calculation in gp update button. 2019-07-03 13:44:41 +08:00
0a13fde96d Gpencil: Multiply modifier angle split functions 2019-07-03 11:59:29 +08:00
89e1c3ca68 Gpencil: int/float length fix 2019-07-03 11:30:04 +08:00
c2ec2affd1 Gpencil: Stroke split function. 2019-07-03 11:09:58 +08:00
7e0a7639be Gpencil: clean up length modifier callback 2019-07-03 10:45:33 +08:00
f194ab1950 Merge branch 'master' into soc-2019-npr 2019-07-03 10:20:33 +08:00
54919b2543 Merge branch 'master' into greasepencil-object 2019-07-02 20:37:37 +02:00
f449908451 LANPR: GP target reset button 2019-07-02 17:46:26 +08:00
dfb78e2ba0 Gpencil: Cleanup debug prints and comments. 2019-07-02 16:55:03 +08:00
577d049336 Gpencil: Shrink functions and modifier is working properly. 2019-07-02 16:50:03 +08:00
889919e707 Gpencil: Multiply modifier added. (not functioning) 2019-07-02 15:21:16 +08:00
a562e1fa81 Gpencil: Renamed "Backbone" into "Length" modifier. 2019-07-02 14:38:56 +08:00
2d01192c4d LANPR: intersection update button in GPU mode, small UI modifications. 2019-07-02 14:27:08 +08:00
858539520e LANPR: Only calculates intersection lines when not in software modes. 2019-07-02 14:16:01 +08:00
c216cb6a69 Merge branch 'master' into soc-2019-npr 2019-07-02 13:11:58 +08:00
98e744c549 Merge branch 'master' into greasepencil-object 2019-07-01 15:50:53 +02:00
8d8200c173 Gpencil: Stretch function now handles short segments and double points. 2019-07-01 20:22:52 +08:00
aa111b0b91 Gpencil: Stroke stretch function use copy instead of directly assign. 2019-07-01 19:51:58 +08:00
563b784f2b LANPR: make format 2019-07-01 17:33:00 +08:00
1074150f2a LANPR: defaults in new line layers. 2019-07-01 17:21:18 +08:00
a083fb84d4 LANPR: Fixed line level error in engine self rendering. 2019-07-01 17:16:03 +08:00
570f2814ac Merge branch 'master' into greasepencil-object 2019-07-01 11:13:22 +02:00
e3b9dfd357 LANPR: viewport auto update in LANPR line layer operators. 2019-07-01 17:02:31 +08:00
6f090b3e37 LANPR: Updating GPencil will now automatically redraw. 2019-07-01 16:30:14 +08:00
c2254194f8 LANPR: Chaining is force enabled for engines other than LANPR. 2019-07-01 16:06:43 +08:00
506dbb8cff LANPR: discard very short chains. 2019-07-01 15:50:56 +08:00
5ac143dbe8 Modifier: EdgeSplit modifier now follows LANPR "disable_edge_splits" as well. 2019-07-01 15:35:14 +08:00
94bee8fa25 Modifier: EdgeSplit modifier now has ignore_lanpr option. 2019-07-01 15:15:46 +08:00
b2ca257e63 LANPR: modified buttons and panels for non-LANPR engine display. 2019-07-01 14:50:34 +08:00
a620a2442f LANPR: Add LANPR to COMPACT_ENGINES in relevant panels. 2019-07-01 10:30:35 +08:00
d3dcb70f61 LANPR: remove unnecessary options when only generating GPencil strokes. 2019-07-01 10:10:12 +08:00
27ca5cdfee Merge branch 'master' into soc-2019-npr 2019-07-01 09:49:08 +08:00
bc3ef662d8 GPencil: Fix error in Thickness and Strength for closing strokes
The values were inverted.
2019-06-30 11:07:12 +02:00
541f66ffea GPencil: Add support for multiframe to Cyclic operator
This operator was working with active frame only.
2019-06-30 11:02:16 +02:00
ddc12efa21 GPencil: Remove Close operator and reuse Cyclic operator
Cyclic could do the same, so it's not logic to have duplicate code.
2019-06-30 11:01:51 +02:00
fad8b45df5 Merge branch 'master' into greasepencil-object 2019-06-30 11:00:41 +02:00
7130eee812 GPencil: Change poll method for Close stroke operator
Must be edit mode and 3D view.
2019-06-29 21:02:00 +02:00
e7b49aa84a GPencil: Add F key to close strokes 2019-06-29 21:01:54 +02:00
b5d4c081de GPencil: New parameter to create geometry when set stroke to cyclic
In grease pencil is not logic to join without geometry.
2019-06-29 21:01:48 +02:00
d5bebb33b2 GPencil: New Close Stroke operator
This operator allows to close a stoke generating geometry for the closing gap.

This is totally different of Cyclic, because this was only a visual closing, but as there wasn't new geometry, you could sculpt or edit and need manual subdivide.
2019-06-29 16:43:10 +02:00
5e8f7c439b Merge branch 'master' into greasepencil-object 2019-06-29 16:42:46 +02:00
7b725f55e1 Merge branch 'master' into greasepencil-object 2019-06-28 15:41:24 +02:00
37c3aa8eab LANPR: fix readfile pointer address. 2019-06-28 19:59:19 +08:00
9fc9ee742e LANPR: intersection strokes are now generated in the first collection. 2019-06-28 19:00:31 +08:00
d1ed9ddef2 Merge branch 'master' into greasepencil-object 2019-06-28 11:49:51 +02:00
d1d7dc4373 Gpencil: fixed "totweight" count in sample functions. 2019-06-28 15:00:20 +08:00
ec580226e8 Gpencil: make format 2019-06-28 14:51:38 +08:00
715458f413 Gpencil: New sample function which handles weights. 2019-06-28 14:49:59 +08:00
dd9579ccd4 LANPR: Added error message for failed DPIX shaders. 2019-06-28 14:05:11 +08:00
6d3e0a94f6 Merge branch 'master' into soc-2019-npr 2019-06-28 13:08:51 +08:00
56bc8e929a Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
2019-06-27 16:44:09 +02:00
605f492237 LANPR: make format. 2019-06-27 16:40:56 +08:00
0ce9471b49 LANPR: Fixed an accidental if() bracket error in lanpr_line_crosses_bounding_area(). 2019-06-27 16:03:56 +08:00
2d247cbda1 LANPR: GP stroke bake function. 2019-06-27 15:48:54 +08:00
a0c45cdaa4 LANPR: selective line type now working for objects and collections 2019-06-27 14:43:37 +08:00
3c185098c6 LANPR: ensure chain only contains one type of segments. 2019-06-27 14:35:02 +08:00
7be203b070 LANPR: collection line type selecot and default values. 2019-06-27 14:27:07 +08:00
a230ab1571 LANPR: first-time chain only includes the same type of lines. 2019-06-27 14:00:15 +08:00
0af490ede4 LANPR: enable switch now operative in software mode 2019-06-27 13:55:48 +08:00
1067924979 LANPR: modified modifier and main panel UI for clarity. 2019-06-27 13:05:20 +08:00
2712d082d3 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-06-27 12:03:21 +08:00
f0a225f524 LANPR: modified "item" into prev/next in lanpr_data_types.h 2019-06-26 21:50:13 +08:00
0751c14dd3 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
2019-06-26 13:41:24 +02:00
a400ce4a3d LANPR: collection GP target now working. 2019-06-26 17:02:18 +08:00
3fffd652f6 LANPR: collection and object usage flags now effective. object flags overrides modifier. 2019-06-26 16:28:21 +08:00
0d0f3801cd LANPR: Object usage flag is effective now. 2019-06-26 15:32:53 +08:00
a943a2edaa LANPR: move "usage" settings into struct ObjectLANPR. 2019-06-26 15:20:35 +08:00
fbbffc0420 LANPR: separate thresholds for image/geometry space chaining. 2019-06-26 14:29:28 +08:00
a4147edb3e LANPR: Fixed occlusion bugs in first-step chaining. 2019-06-26 14:02:20 +08:00
85aa8ab273 LANPR: shaders now support main color/thickness. 2019-06-26 13:28:02 +08:00
c6f58fc523 Merge branch 'master' into soc-2019-npr 2019-06-26 12:44:13 +08:00
d6eeb656ea LANPR: all the if() statements now use {} brackets. 2019-06-25 17:43:01 +08:00
52e35cd224 Merge branch 'master' into greasepencil-object 2019-06-25 11:26:17 +02:00
47d04c4af4 LANPR: Added collection target and related options. 2019-06-25 16:54:47 +08:00
5a4dd8f7b9 LANPR: make format 2019-06-25 16:21:03 +08:00
ce48510462 LANPR: Added collection tab and put collection specific LANPR settings in it. 2019-06-25 16:18:58 +08:00
c10f834b32 GPENCIL: Prevent sampling from crashing. Need a new implementation to calculate acturate segment count. 2019-06-25 14:33:07 +08:00
abecf82b6e GPENCIL: removed weights sample. Needs new implementaion. 2019-06-25 14:04:41 +08:00
be138d3380 LANPR: target GP material selection working 2019-06-25 13:44:44 +08:00
c0aae838ab LANPR: red-out modifier name when target is not set. 2019-06-25 13:25:36 +08:00
d0ea6e306c LANPR: filter GP targets only. 2019-06-25 13:24:35 +08:00
185d319ea3 LANPR: Comment changed into C style. 2019-06-25 12:39:39 +08:00
419837b680 Merge branch 'master' into soc-2019-npr 2019-06-25 12:15:12 +08:00
a0d1198a8d LANPR: Fix compiler issues
Yo need define the variable to copy and not the pointer array.

Also some clang format fixes done automatically by VS editor.
2019-06-24 15:51:47 +02:00
794da0fa14 GPENCIL: Sample function now handles weights as well. 2019-06-24 19:16:18 +08:00
5c7577f05b LANPR: fix error in GPencilModifierType. allocate for GPencil weights. 2019-06-24 17:15:35 +08:00
e3f606fa65 Merge remote-tracking branch 'origin/soc-2019-npr' into soc-2019-npr 2019-06-24 16:51:04 +08:00
6e1be5b09e LANPR: removed GP Stroke modifier, Object modifier now only create visible strokes and follow level values. 2019-06-24 16:49:04 +08:00
a86cbbfa51 LANPR: Apply clang format 2019-06-24 10:48:41 +02:00
f29cf28bab LANPR: Fix pointer mistakes. 2019-06-24 16:15:39 +08:00
45074ae36f LANPR: use "master style" instead of following contour style. 2019-06-24 09:23:50 +08:00
fd803aba5e GPENCIL: use copy_v3_v3 for gp points. 2019-06-24 08:35:30 +08:00
c2e7ef36d9 LANPR: make format 2019-06-23 18:01:07 +08:00
332423a7ca LANPR: two step chaining, need a toggle for switching 2d/3d space priority. 2019-06-23 18:00:03 +08:00
7799374520 LANPR: Fixed modifier read pointer error by providing foreachObjectLink() callback. 2019-06-23 16:11:21 +08:00
dc61580638 LANPR: modifier controlled stroke generation is working. (only manual) 2019-06-23 15:30:16 +08:00
1d532325bd LANPR: feature line modifier manual update 2019-06-23 14:28:29 +08:00
93f75be1ef GPencil: Remove Stencil for Background texture 2019-06-22 18:09:10 +02:00
e23ea999a6 Merge branch 'gp_stencil' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
	source/blender/draw/engines/gpencil/gpencil_engine.c
2019-06-22 17:55:05 +02:00
d1a5617c76 Merge branch 'master' into gp_stencil 2019-06-22 17:47:50 +02:00
31fb6c1d8f Merge branch 'master' into gp_stencil
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
	source/blender/draw/engines/gpencil/gpencil_engine.c
2019-06-22 16:56:25 +02:00
f30e4cd236 Merge branch 'master' into soc-2019-npr 2019-06-22 16:20:07 +08:00
b1bd4810b6 Merge branch 'master' into gp_stencil 2019-06-20 19:51:19 +02:00
2708515de7 Merge branch 'master' into gp_stencil 2019-06-20 16:32:29 +02:00
67e594ea7c Merge branch 'master' into gp_stencil 2019-06-20 13:44:21 +02:00
3af63f17c2 GPencil: Undo changes to use evaluated data in paint
There are problems when delete points and strokes and need a full redesign.
2019-06-20 13:37:49 +02:00
e8c17d9902 Merge branch 'master' into greasepencil-object 2019-06-20 09:36:12 +02:00
42e094bb3f Merge branch 'master' into gp_stencil 2019-06-20 09:35:36 +02:00
ec95642e6b Merge branch 'master' into GP_STENCIL 2019-06-19 20:04:02 +02:00
6e465c92da GPencil: Fix problem with several objects
The loop was not checking the end group of the object
2019-06-19 16:41:30 +02:00
ed00bc16a7 GPencil: Fix problem with several objects
The loop was not checking the end group of the object
2019-06-19 16:41:22 +02:00
0ac8ef1131 GPencil: Separate Stencils in groups of 255
Also some more changes to improve drawing.
2019-06-19 12:57:37 +02:00
15afcb6dd9 DRW: New functions for getting stencil_mask id
Workaround functions waiting for the clearing operation to be available inside the shgroups.

Required to check if the stencil was activated in the shading group to calculate batches of 255 stencil masks and reduce number of stencil clearing.
2019-06-19 12:57:31 +02:00
16279cbbba GPencil: Remove parameter and use Stencil for lines solid only
Also removed the parameter from UI
2019-06-19 12:57:16 +02:00
caa7c9a36f Merge branch 'master' into greasepencil-object 2019-06-19 12:56:55 +02:00
0738dac300 Merge branch 'master' into GP_STENCIL 2019-06-19 12:56:35 +02:00
1fe3139477 GPencil: Separate Stencils in groups of 255
Also some more changes to improve drawing.
2019-06-19 12:25:15 +02:00
08f6566dbf LANPR: Default values now in versioning_280.c 2019-06-19 18:17:20 +08:00
4be8461b88 LANPR: make format 2019-06-19 17:42:31 +08:00
ca0c24c9df LANPR: Manual stroke update functions. (Not working yet) 2019-06-19 17:41:02 +08:00
b5ea252ac3 LANPR: Chaining threshold parameter. Disabled LANPR composition operators. 2019-06-19 16:47:32 +08:00
e38a32e58a DRW: New functions for getting stencil_mask id
Workaround functions waiting for the clearing operation to be available inside the shgroups.

Required to check if the stencil was activated in the shading group to calculate batches of 255 stencil masks and reduce number of stencil clearing.
2019-06-19 09:30:50 +02:00
b165d0a414 LANPR: Removed "Tip Extend" data and properties. GP Modifiers will handle this. 2019-06-19 15:20:36 +08:00
dbb151c02b LANPR: modified default UI for more logical display. 2019-06-19 15:09:04 +08:00
e61479bcec Merge branch 'master' into GP_STENCIL 2019-06-19 08:56:17 +02:00
6e38e95b96 Merge branch 'master' into soc-2019-npr 2019-06-19 13:23:43 +08:00
6d88f8eaad GPencil: Remove parameter and use Stencil for lines solid only
Also removed the parameter from UI
2019-06-18 20:44:47 +02:00
7d15efec15 GPencil: Add a new parameter to material to disable Stencil
Sometimes is good to disable the stencil and get the overlap. With this parameter the artist has the option to disable it.
2019-06-18 19:31:18 +02:00
c2c6c62ea1 GPencil: Add a new parameter to material to disable Stencil
Sometimes is good to disable the stencil and get the overlap. With this parameter the artist has the option to disable it.
2019-06-18 19:24:36 +02:00
280135da56 GPencil: Disable Stencil for Fill while drawing 2019-06-18 18:05:22 +02:00
5be1adf12a GPencil: Disable Stencil for Fill while drawing 2019-06-18 18:05:06 +02:00
12b867cf66 GPencil: Disable Stencil for Dots while drawing 2019-06-18 18:01:47 +02:00
84666bdc3e GPencil: Disable Stencil for Dot while drawing 2019-06-18 18:00:19 +02:00
1ea17f5c9e GPencil: Disable Stencil for Dots and Fill shading groups
This types don't need stencil check because the stencil "kill" artistic effects.
2019-06-18 17:41:57 +02:00
2e15d015cd GPencil: Disable Stencil for Dots and Fill shading groups
This types don't need stencil check because the stencil "kill" artistic effects.
2019-06-18 17:41:25 +02:00
d4d92bff82 Basic Stencil working
Still not working the 255  layer separation
2019-06-18 17:31:25 +02:00
1243299bee LANPR: Added collection properties. 2019-06-18 18:28:36 +08:00
3f0c51c881 GPencil: Basic stroke stencil to avoid alpha glitches
Still not completed, but this commit fix the ugly artifacts in strokes with alpha when the stroke intersect itself. Now, the stroke only use the first pixel color and don't add blends.
2019-06-18 11:24:12 +02:00
4adfa653b5 Merge branch 'master' into greasepencil-object 2019-06-18 11:14:17 +02:00
a4287db20d LANPR: Fix smooth contour modifier merge errors. 2019-06-18 16:22:27 +08:00
1fb871e804 Merge remote-tracking branch 'DarkdefenderRepo/npr_tess' into soc-2019-npr 2019-06-18 16:09:44 +08:00
013c6d6c38 LANPR:Added option to use the same style for different line types 2019-06-18 15:53:21 +08:00
30b2db0be7 LANPR: Add enable and auto update switches 2019-06-18 15:00:28 +08:00
13cff0d524 LANPR: Move main panel to render tab 2019-06-18 13:36:49 +08:00
384d417f5f Merge branch 'master' into greasepencil-object 2019-06-17 10:22:49 +02:00
7cb674d521 LANPR: make format 2019-06-17 15:08:06 +08:00
915a928067 Merge branch 'master' into soc-2019-npr 2019-06-17 14:58:39 +08:00
fe71389950 LANPR: Object modifier for line selection (not functional yet) 2019-06-17 14:50:34 +08:00
c45cfec2fd Merge branch 'master' into greasepencil-object 2019-06-16 11:01:53 +02:00
f4ed032ad0 Merge branch 'master' into greasepencil-object 2019-06-15 09:11:00 +02:00
4f5f19c1a8 Merge branch 'master' into greasepencil-object 2019-06-14 20:10:38 +02:00
df385eb0a9 Merge branch 'master' into greasepencil-object 2019-06-14 10:12:35 +02:00
0d159bf74e LANPR: Removed duplicated code in stroke modifier. 2019-06-13 23:09:22 +08:00
40a12b4a38 LANPR: Fix pointer conversion for MSVC. 2019-06-13 22:33:04 +08:00
82c6ebee9a Merge branch 'master' into greasepencil-object 2019-06-13 13:51:58 +02:00
5d689428b3 Merge branch 'master' into greasepencil-object 2019-06-12 16:04:01 +02:00
e09dfe644b Merge remote-tracking branch 'origin/master' into soc-2019-npr
# Conflicts:
#	release/datafiles/locale
#	release/scripts/addons
#	release/scripts/addons_contrib
2019-06-12 21:35:05 +08:00
6034edfb41 LANPR: Use root bounding area to allow longer chaining (need workarounds.) 2019-06-12 21:33:27 +08:00
bc1b7a7af1 LANPR: Chain connection is now working properly 2019-06-12 21:05:53 +08:00
c8ad50a4e3 LANPR: Chain connection working. 2019-06-12 19:33:25 +08:00
668c15d5bf LANPR: Chain image space connection (not working yet) 2019-06-12 17:55:57 +08:00
212351ad78 Merge branch 'master' into greasepencil-object 2019-06-12 08:46:38 +02:00
0dd47056eb Merge branch 'master' into greasepencil-object 2019-06-11 11:06:11 +02:00
d251aaeebe LANPR: Shader free. 2019-06-11 12:04:54 +08:00
1d68941e3b Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-06-10 19:57:59 +08:00
f59db22f51 LANPR: Software mode now allows camera lens shift. 2019-06-10 19:52:20 +08:00
5e2fab456d LANPR: sample and batch pool goes to lanpr_share. 2019-06-10 17:17:29 +08:00
5d534f947d LANPR: hide render_buffer from SceneLANPR, implemented copy and free functions. No memory leaks on software mode now. 2019-06-10 16:15:11 +08:00
d1c4790d61 Merge branch 'master' into greasepencil-object 2019-06-10 08:39:03 +02:00
d6456466e9 LANPR: Renoved workbench engine registeration. Now LANPR registers correctly. Memory free working. 2019-06-10 13:52:43 +08:00
7e5eeeeb9c LANPR: Fixed DPIX object position error. 2019-06-09 17:32:33 +08:00
1eb0994d38 LANPR: Fixed triangle culling algorithm errors. 2019-06-09 14:50:44 +08:00
a6678bc637 Merge branch 'master' into greasepencil-object 2019-06-07 13:01:49 +02:00
ee28432848 Merge branch 'master' into greasepencil-object 2019-06-07 10:40:53 +02:00
a391719afd Merge branch 'master' into greasepencil-object 2019-06-05 15:59:20 +02:00
a4b0a65909 GPencil: Backbone Stretcher modifier 2019-06-05 12:20:48 +08:00
f8f010887b Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-06-05 11:09:28 +08:00
1816e1f9ae GPencil: Sample modifier OK. 2019-06-04 21:43:16 +08:00
c536d7b778 LANPR: Added a placeholder for GPencil sample modifier. 2019-06-04 18:31:09 +08:00
c610ea5ad0 Merge branch 'master' into greasepencil-object 2019-06-04 11:15:51 +02:00
fd9c100e59 GPencil: Fix compiler error after merge 2019-06-04 11:14:41 +02:00
7f1a9480fc LANPR: Fixed last segment missing error on chain splitting. 2019-06-04 16:41:12 +08:00
b7067088fe Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
2019-06-04 10:40:35 +02:00
cbc0c4846b LANPR: Split chains based on occlusion value changes. 2019-06-04 16:24:40 +08:00
f23223ee26 LANPR: Fixed last point occlusion error on "this line" chaining. 2019-06-04 14:48:05 +08:00
181e4ba1cf LANPR: Fixing chaining occlusion values for GPencil to use. 2019-06-04 13:48:40 +08:00
00202210ca Make LANPR main panel show in all engines. Fixed "up" button bug. Crease value now in software mode as well. 2019-06-04 12:47:54 +08:00
902c358932 Merge branch 'master' into soc-2019-npr 2019-06-04 12:15:43 +08:00
2897c90597 LANPR: rollback no-depth composition for GP, use object in front. Fixing chaining artefacts. 2019-06-03 18:28:09 +08:00
acc075f33c LANPR: GP stroke now automatically updates LANPR cache. 2019-06-03 17:49:24 +08:00
4cc1426783 LANPR: Memory now all in RenderBuffer->pool. engine_free() not called. 2019-06-03 16:28:29 +08:00
90137bbfa4 Fix chaining occlusion error and formatted source files. 2019-06-03 15:24:15 +08:00
bb48fcac2f Render data distroy functions 2019-06-03 15:06:32 +08:00
461008a3e8 Image and viewport now both support GPencil stroke overlay 2019-06-03 14:20:52 +08:00
dfbd3e4d9e Grease pencil composition depth option added. 2019-06-03 13:57:52 +08:00
bff6b5330f Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-06-03 12:06:09 +08:00
be9ef613fc Fixed smooth contour modifier not showing up bug. 2019-05-31 10:47:57 +08:00
b3d98f3532 Grease pencil conversion now projects onto 3D space now. Need perspective correction fix for cut points. 2019-05-31 10:20:35 +08:00
4f2b6c95fa Merge branch 'master' into soc-2019-npr 2019-05-31 08:12:45 +08:00
ecfe74cf74 Fix remaining pointer conversion errors for MSVC 2019-05-30 09:48:21 -06:00
25987fef1d Fix pointer conversion error for MSVC 2019-05-30 22:33:56 +08:00
413b2256d9 Spell check 2019-05-30 21:10:16 +08:00
daf3610a95 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-05-30 19:22:46 +08:00
29f1a8f175 Added LANPR chain conversion funcitons. Now LANPR to GP is able to run. 2019-05-30 19:21:58 +08:00
1c2cda87b1 temporally add draw lib to gpencil modifier for lanpr 2019-05-30 16:11:46 +08:00
0d1bf0623b Adding lanpr to grease pencil strokes modifier. 2019-05-30 15:16:58 +08:00
200e5a77e2 Merge remote-tracking branch 'origin/master' into soc-2019-npr 2019-05-30 12:36:19 +08:00
5cfe6607d8 Remove obsolete memory pool 2019-05-30 12:35:16 +08:00
39ee04352d Merge branch 'master' into greasepencil-object 2019-05-29 16:54:15 +02:00
dac6485938 Merge remote-tracking branch 'origin/master' into soc-2019-npr
# Conflicts:
#	release/datafiles/locale
#	release/scripts/addons
#	release/scripts/addons_contrib
2019-05-29 16:23:33 +08:00
66f09eef29 Clean up of lanpr_util stuff. 2019-05-29 16:21:28 +08:00
6b9eb806dd Merge branch 'master' into greasepencil-object 2019-05-29 09:50:15 +02:00
14ffd94628 Finished structure naming convention changes in lanpr_all.h 2019-05-28 21:54:04 +08:00
28944549d6 Clang format the code. 2019-05-28 21:15:20 +08:00
19d3c5f9a6 Continue renaming structure variables. 2019-05-28 21:09:32 +08:00
37cc7063c7 Fixing LANPR structure naming to blender's style 2019-05-28 20:52:17 +08:00
847192b3d6 Use DRW_view APIs. (Potentially not doing it correctly.) 2019-05-28 16:32:11 +08:00
f37533fc44 Merge branch 'master' into soc-2019-npr 2019-05-28 15:39:42 +08:00
aa966ebf64 Merge branch 'master' into greasepencil-object 2019-05-27 16:26:14 +02:00
b50c7d7861 Merge branch 'master' into greasepencil-object 2019-05-27 10:14:06 +02:00
f78e1dea64 Merge branch 'master' into greasepencil-object 2019-05-26 16:24:51 +02:00
ef22ff0f79 GPencil: Redesign Grab evaluation transform calculation
Still problems with single points strokes
2019-05-23 17:01:14 +02:00
7acb5b91d5 GPencil: More test to apply evaluated rotation in Sculpt
This is an experimental commit
2019-05-23 12:55:14 +02:00
28748bb85c GPencil: Prepare data to calc transformation in derived data
This commits only prepares the information.
2019-05-22 10:52:09 +02:00
22c36bd7b3 Merge branch 'master' into greasepencil-object 2019-05-22 10:10:20 +02:00
fc0659a24b Merge branch 'master' into greasepencil-object 2019-05-21 20:26:00 +02:00
7155130911 GPencil: New function to get derived array
This utility is used to get the difference between original point and derived point
2019-05-21 19:52:59 +02:00
d5a8fe2282 Merge branch 'master' into greasepencil-object 2019-05-21 16:40:27 +02:00
6661855767 GPencil: Fix grab error in Sculpt with evaluated data 2019-05-21 16:13:57 +02:00
22768c2eff GPencil: Prepare fileds to implement Sculpt with eval data 2019-05-21 13:26:58 +02:00
2f3af2cc93 GPencil: Use evaluated data for Eraser
Now it's possible to erase an stroke in the position after applying a modifier. Before, this was not supported.
2019-05-21 12:42:59 +02:00
2b17ed31e2 Merge branch 'master' into greasepencil-object 2019-05-21 10:30:00 +02:00
76675d2eb7 Merge branch 'master' into greasepencil-object 2019-05-20 16:53:18 +02:00
4272fbae72 GPencil: Add multiframe support to reproject surface operator
This change solves T64814
2019-05-20 16:52:28 +02:00
f0e9ecd26b GPencil: Fix error in Multiedit
This error was related to the change to use depsgraph
2019-05-20 16:05:18 +02:00
Lukas W
0b8d2ab88c GPencil: Improve reproject operator in surface mode
See D4878 by  Lukas W (@geloescht)
2019-05-20 11:17:33 +02:00
69d338e254 Merge branch 'master' into greasepencil-object 2019-05-20 10:13:34 +02:00
a640228d92 Added support structure for material controlled line style.
Also with a primitive UI.
2019-05-19 14:37:03 +08:00
5b6b741ec0 Disable rendering of the orginal scene in the script. 2019-05-18 21:01:29 +08:00
abf50bc1db Merge branch 'master' into soc-2018-npr 2019-05-18 19:41:40 +08:00
78a8b208b7 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/makesdna/DNA_object_types.h
2019-05-17 10:45:23 +02:00
abe57249a5 GPencil: Fix crash adding new layer
The derived frame was not initializated to NULL.
2019-05-16 20:48:00 +02:00
818d2258b1 Merge branch 'master' into greasepencil-object 2019-05-16 20:13:31 +02:00
ba694d0e60 Merge branch 'master' into greasepencil-object 2019-05-16 16:17:51 +02:00
96caf9f4b7 Merge branch 'master' into greasepencil-object 2019-05-16 14:02:26 +02:00
e0dbedb708 GPencil: Apply Onion keyframe type to all modes 2019-05-16 13:43:40 +02:00
84f0aee3d7 GPencil: Change Onion key type filter to Range mode
The filter is more useful in this mode, not selected.
2019-05-16 13:38:23 +02:00
9faa0f7e6d GPencil: Remove animation for some properties 2019-05-16 12:15:25 +02:00
104c84a793 GPencil: New filter in Onion by keyframe type
This new filter allows to select only some type of keyframe (keyframe, breakdown, etc).

This was a request of artists that are used to work with other 2D softwares.
2019-05-16 12:03:56 +02:00
a0c890d3ef Merge branch 'master' into greasepencil-object 2019-05-16 12:03:28 +02:00
46866fb907 Solve merge errors in shader calls. 2019-05-16 10:03:21 +08:00
54804117e8 Merge branch 'master' into soc-2018-npr 2019-05-16 09:48:45 +08:00
f5e091095a Merge branch 'master' into greasepencil-object 2019-05-15 09:49:00 +02:00
21755dc610 Merge branch 'master' into greasepencil-object 2019-05-14 18:08:14 +02:00
c391f9daca Merge branch 'master' into greasepencil-object 2019-05-14 17:30:26 +02:00
977cfd62dc Merge branch 'master' into greasepencil-object 2019-05-14 16:32:33 +02:00
c15b10e227 Merge branch 'master' into greasepencil-object 2019-05-14 12:34:12 +02:00
6aa462128a Merge branch 'master' into greasepencil-object 2019-05-13 10:06:29 +02:00
5b2b1f053f Merge branch 'master' into greasepencil-object 2019-05-11 08:37:16 +02:00
cd82e3fcd4 Merge branch 'master' into greasepencil-object 2019-05-10 15:32:58 +02:00
c6acb31f70 Merge branch 'master' into greasepencil-object 2019-05-10 08:29:53 +02:00
fd9d4da257 GPencil: Fix errors after merge and minor cleanup 2019-05-09 13:36:21 +02:00
b914af26a2 Merge branch 'master' into greasepencil-object 2019-05-09 13:28:24 +02:00
ccd176046f GPencil: Move modifiers evaluation logic to Depsgraph (wip)
This commits is the first step to move all logic for evaluating modifiers to depsgraph evaluation and remove from the draw manager.  This was coded in the draw manager because when new grease pencil modules were written, the depsgraph was not ready.

Move all to depsgraph reduces the complexity of draw manager, and follows the standards for evaluated data.

This allows to use the evaluated data in edition modes.

Now, it's only working in selection operators, but in the future the different tools will work with the evaluated version and not with the original version as it was before.
2019-05-09 13:27:41 +02:00
767f1801fc Merge branch 'master' into greasepencil-object 2019-05-09 09:08:57 +02:00
bb0830816d Merge branch 'master' into greasepencil-object 2019-05-07 11:47:38 +02:00
2753611c4e Merge branch 'master' into soc-2018-npr 2019-05-06 10:09:12 +08:00
4a3fb26d34 GPencil: More code reorganization
Part of the reorganization to implement modifiers in Edit mode.
2019-05-04 10:59:35 +02:00
c6cf0b9999 GPencil: Move Runtime Cache data definition to BKE
This is the first step to prepare the code for using the modifiers data in Edit mode.
2019-05-04 10:52:37 +02:00
2c869e45c8 Merge branch 'master' into greasepencil-object 2019-05-03 18:44:05 +02:00
9a13815c49 Merge branch 'master' into greasepencil-object 2019-05-03 18:38:01 +02:00
3595919cba GPencil: Use default Brush material in Popover
For pinned materials, the stroke color must be the brush color, not selected slot.
2019-05-03 17:38:47 +02:00
8d6f4b75a7 GPencil: Change UI text 2019-05-03 10:29:24 +02:00
3928582d35 GPencil: Fix some errors in previous commit adding color to popover 2019-05-03 10:28:20 +02:00
3e7064f66e Merge branch 'master' into greasepencil-object 2019-05-03 10:16:50 +02:00
fc048122ce GPencil: Add Stroke Color to Popover panel 2019-05-03 10:16:19 +02:00
3d9bfd76b9 Merge branch 'master' into greasepencil-object 2019-05-03 09:49:27 +02:00
3947310ca8 Merge branch 'master' into greasepencil-object 2019-04-30 17:50:16 +02:00
f147becfd4 Merge branch 'master' into greasepencil-object 2019-04-29 16:25:16 +02:00
aafb17aeed Merge branch 'master' into greasepencil-object 2019-04-27 08:47:20 +02:00
abfd340bce Merge branch 'master' into greasepencil-object 2019-04-25 17:22:54 +02:00
eedb25087c Merge branch 'master' into greasepencil-object 2019-04-24 10:19:04 +02:00
fbb5edf974 Merge branch 'master' into soc-2018-npr
# Conflicts:
#	source/blender/blenloader/intern/readfile.c
2019-04-24 11:00:23 +08:00
cddccbc7b7 Merge branch 'master' into greasepencil-object 2019-04-22 17:30:18 +02:00
efcc83a07d Merge branch 'master' into soc-2018-npr 2019-04-22 09:46:20 +08:00
e630644fd4 Merge branch 'master' into greasepencil-object 2019-04-21 12:04:14 +02:00
2c5bce2300 Merge branch 'master' into soc-2018-npr Fix errors
# Conflicts:
#	intern/opensubdiv/internal/opensubdiv_evaluator.cc
#	intern/opensubdiv/internal/opensubdiv_evaluator_internal.cc
#	release/scripts/startup/bl_ui/properties_data_modifier.py
#	source/blender/CMakeLists.txt
#	source/blender/blenkernel/intern/scene.c
#	source/blender/blenloader/intern/readfile.c
#	source/blender/blenloader/intern/versioning_280.c
#	source/blender/blenloader/intern/writefile.c
#	source/blender/bmesh/intern/bmesh_polygon.c
#	source/blender/draw/CMakeLists.txt
#	source/blender/draw/intern/draw_manager.c
#	source/blender/draw/modes/object_mode.c
#	source/blender/editors/mesh/editmesh_tools.c
#	source/blender/editors/mesh/mesh_ops.c
#	source/blender/editors/render/render_intern.h
#	source/blender/editors/render/render_ops.c
#	source/blender/editors/space_outliner/outliner_draw.c
#	source/blender/editors/space_view3d/space_view3d.c
#	source/blender/makesdna/DNA_light_types.h
#	source/blender/makesdna/DNA_modifier_types.h
#	source/blender/makesdna/DNA_scene_types.h
#	source/blender/makesdna/intern/makesdna.c
#	source/blender/makesrna/intern/CMakeLists.txt
#	source/blender/makesrna/intern/makesrna.c
#	source/blender/makesrna/intern/rna_modifier.c
#	source/blender/makesrna/intern/rna_scene.c
#	source/blender/modifiers/CMakeLists.txt
#	source/blender/modifiers/intern/MOD_util.c
2019-04-20 14:10:24 +08:00
4d40187623 Merge branch 'master' into greasepencil-object 2019-04-19 10:30:11 +02:00
2a6abac705 Merge branch 'master' into greasepencil-object 2019-04-18 19:40:23 +02:00
fe9a87f879 Merge branch 'master' into greasepencil-object 2019-04-18 16:59:57 +02:00
4047ed1a9d GPencil: Add option to mix color with texture
This was already supported in Fill, but not in Strokes. This adds more artistic options when use textured strokes.
2019-04-18 14:29:19 +02:00
a656b6dacc Merge branch 'master' into greasepencil-object 2019-04-18 14:27:24 +02:00
0323111785 Merge branch 'master' into greasepencil-object 2019-04-18 09:47:43 +02:00
865bb3f948 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
	source/blender/draw/engines/gpencil/gpencil_engine.h
2019-04-17 18:09:12 +02:00
44acf0e331 Merge branch 'master' into greasepencil-object 2019-04-16 13:15:06 +02:00
24de946a4e GPencil: New Normalize All operator
This operator works similar to mesh operator but for Stroke and Points data.

Also minor cleanup in Normalize operator.
2019-04-16 12:12:35 +02:00
1fb43ba8c3 GPencil: Add lock icon to Vertex Groups list
Also check this flag in operators.

Note: This is required for the development of the new Normalize All operator.
2019-04-16 11:27:36 +02:00
565772bc70 GPencil: New Normalize Weights operator
This works similar to mesh operator, but using Stroke and Points data.
2019-04-16 10:47:30 +02:00
c85241bf32 Merge branch 'master' into greasepencil-object 2019-04-16 10:25:53 +02:00
2148ad3eb9 Merge branch 'master' into greasepencil-object 2019-04-15 16:45:08 +02:00
05db802421 Merge branch 'master' into greasepencil-object 2019-04-15 10:34:58 +02:00
2f36df9f37 Merge branch 'master' into greasepencil-object 2019-04-15 09:50:08 +02:00
ce90b6fb76 Merge branch 'master' into greasepencil-object 2019-04-13 13:33:51 +02:00
39ccfbc604 Merge branch 'master' into greasepencil-object 2019-04-13 11:21:37 +02:00
88928b6234 GPencil: Implement Opacity transform
Add Shift+F to transform points opacity in Edit mode
2019-04-13 10:48:53 +02:00
33a62c4277 GPencil: Add option to Follow Drawing Path
This option allows to enable or disable the automatic orientation of Dot and Box strokes.
2019-04-12 15:53:49 +02:00
8bfc689e83 Cleanup: Fix comment typo 2019-04-12 11:19:21 +02:00
d5b6f93523 Merge branch 'master' into greasepencil-object 2019-04-12 11:15:05 +02:00
dda2bdd819 GPencil: Improves Dot Texture rotation
Before when you use textures in a Dot stroke, the texture did not rotate with the stroke and always kept locked to North (0, 1).

Now, the rotation of the texture is calculated using the previous point to determine the direction of the stroke and rotate the texture following the drawing path.
2019-04-12 11:14:30 +02:00
11229c4d41 Merge branch 'master' into soc-2018-npr 2019-04-12 16:33:02 +08:00
e48795c20c GPencil: Cleanup unused shader variable 2019-04-11 18:31:00 +02:00
dfeb47e7ba GPencil: Cleanup unused vars 2019-04-11 18:06:16 +02:00
a27eb4dddb Merge branch 'master' into greasepencil-object 2019-04-11 16:37:07 +02:00
5740dc8f2a GPencil: Improve gradient stroke thickness
This change tries to improve the control of thickness when mix strength and gradient.
2019-04-10 20:01:25 +02:00
65d54f3023 GPencil: Replace gradient tooltip 2019-04-10 14:22:39 +02:00
30dea6af8d Merge branch 'master' into greasepencil-object 2019-04-10 10:42:52 +02:00
0c4144c472 GPencil: Improve Gradient in Dots mode
The old method was too complex and got weird results when mixed with brush strength. Now the result is far better.
2019-04-10 10:42:23 +02:00
39b32676d2 GPencil: Fix error with material context 2019-04-09 16:43:45 +02:00
ea90625acf GPencil: Active gradient only for DOTS 2019-04-09 16:25:04 +02:00
48bf837c8c GPencil: Disable gradient lines for Line strokes
Keep this disabled while the line glitch bug exists.
2019-04-09 16:01:14 +02:00
f415cbec5e Merge branch 'master' into greasepencil-object 2019-04-09 11:38:41 +02:00
c4fec789b2 GPencil: Remove Opacity parameter from Topbar 2019-04-09 11:30:15 +02:00
31066ef234 GPencil: Fix stroke opacity initialization 2019-04-08 17:22:48 +02:00
a016499d4a Merge branch 'master' into greasepencil-object 2019-04-08 16:32:00 +02:00
4f938d2cfe Merge branch 'master' into greasepencil-object 2019-04-07 17:05:26 +02:00
535899ae57 Merge blender2.8 into npr_tess 2019-04-05 23:38:45 +02:00
f1be941769 Merge branch 'master' into greasepencil-object 2019-04-05 18:29:11 +02:00
f1470a84f8 Fix modifier api 2019-04-04 21:57:00 +08:00
92a33e4599 Merge remote-tracking branch 'origin/master' into soc-2018-npr 2019-04-04 20:33:44 +08:00
47495f6f09 Fix errors 2019-04-04 20:33:16 +08:00
525c9034cd Merge remote-tracking branch 'origin/master' into soc-2018-npr
# Conflicts:
#	release/datafiles/locale
#	release/scripts/addons
#	release/scripts/addons_contrib
#	release/scripts/startup/bl_ui/properties_scene.py
#	source/blender/draw/intern/draw_manager_texture.c
#	source/blender/makesdna/DNA_scene_types.h
#	source/blender/makesrna/intern/rna_scene.c
#	source/tools
2019-04-04 19:14:41 +08:00
23c262192c Merge branch 'master' into greasepencil-object 2019-04-02 16:51:32 +02:00
dab0af9b0d Merge branch 'master' into greasepencil-object 2019-04-02 11:40:23 +02:00
6cf1f68725 Merge branch 'master' into greasepencil-object 2019-04-01 11:27:20 +02:00
5407c3a8b0 Merge branch 'master' into greasepencil-object 2019-03-30 11:37:22 +01:00
623b08d210 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-03-27 16:03:19 +01:00
1dbece8080 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-03-24 12:12:26 +01:00
46d35d00f6 Merge branch 'master' into greasepencil-object 2019-03-22 09:05:29 +01:00
a30dfaab64 Merge branch 'master' into greasepencil-object 2019-03-20 17:17:50 +01:00
24bab81d08 Merge branch 'master' into greasepencil-object 2019-03-19 16:25:10 +01:00
67143dba0d GPencil: Add gradient opacity parameter to topbar 2019-03-19 14:07:26 +01:00
12655c3590 GPencil: Cleanup unused code 2019-03-19 13:51:40 +01:00
b513f29a87 GPencil: Change Text for Gradient parameter 2019-03-19 13:49:41 +01:00
530d81c240 GPencil: More changes in gradient calculation for points 2019-03-19 13:44:24 +01:00
2ba4164072 GPencil: More changes to gradient factors 2019-03-19 12:27:58 +01:00
781a282caa GPencil: Pass gradient basic data to point shader 2019-03-18 11:04:31 +01:00
7f6d3d8fc4 GPencil: Add default gradient values to gizmo 2019-03-18 10:56:01 +01:00
bdbb0b0bd6 GPencil: Fix problem with gradient for Stroke and Monkey primitives 2019-03-18 10:53:15 +01:00
4ca31474ef GPencil: Pass basic data to shaders for gradients (wip) 2019-03-18 10:50:07 +01:00
dda3e48303 GPencil: Copy Brusg gradient data to stroke in drawing operators. 2019-03-18 10:29:13 +01:00
323ab6fdd7 GPencil: Set default gradient in new brushes 2019-03-18 09:06:11 +01:00
ac1adbc3f1 GPencil: New parameter for gradient
Add new fields and initialize.
2019-03-18 09:03:29 +01:00
13c1e7ffb7 Merge branch 'master' into greasepencil-object 2019-03-17 19:49:19 +01:00
738c8482de Merge branch 'master' into greasepencil-object 2019-03-17 15:56:55 +01:00
cf30fc24a8 GPencil: Reproject strokes to 3D cursor
Add a new option to reproject the strokes using the 3D cursor orientation.
2019-03-17 12:54:31 +01:00
9d13f18cce Merge branch 'master' into greasepencil-object 2019-03-17 09:38:31 +01:00
8ea91b34d7 GPencil: Back Canvas Grid to Draw position
Undo the previous commit and keep the Canvas in the position used in Draw mode. Change the position by mode looks strange.
2019-03-16 19:33:18 +01:00
df04d1242d Merge branch 'master' into greasepencil-object 2019-03-16 19:22:01 +01:00
9b50448e0d GPencil: Test the option to move the grid depending of mode. 2019-03-16 17:40:08 +01:00
4ee23876b5 Revert "GPencil: Show Canvas Grid only in Draw Mode"
This reverts commit a6ca1b27fb.
2019-03-16 17:15:05 +01:00
a6ca1b27fb GPencil: Show Canvas Grid only in Draw Mode
The grid is not used in Edit mode and in Sculpt mode the position depends of point, so the visual help is not valid.
2019-03-16 16:53:04 +01:00
4d390c2af6 Merge branch 'master' into greasepencil-object 2019-03-16 12:01:56 +01:00
c2fa4d18a0 GPencil: Fix compiler warning 2019-03-15 19:44:41 +01:00
3632e925c2 GPencil: Use the cursor lock in Sculpt mode
The point is locked to a plane with the last point and the normal of the cursor orientation.

The moved point is projected over the cursor/point plane and the closet point is used as result of the sculpt operation.
2019-03-15 19:36:34 +01:00
d4982f1911 GPencil: Canvas grid must be invisible for Stroke and Surface modes
In these modes, the grid is not used, so it's not logic show somthing that is not used.
2019-03-15 17:24:49 +01:00
0402db47b1 GPencil: Change cursor orientation Tooltip 2019-03-15 17:08:14 +01:00
fec90e08f7 Merge branch 'master' into greasepencil-object 2019-03-15 16:49:02 +01:00
6e8ac50dde GPencil: Improve origin location of new strokes
Before there was a mix between cursor and object origin. Now the origin is defined with one parameter and the lock defines the orientation.
2019-03-15 16:48:30 +01:00
cf5b7f97de Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/gpencil/gpencil_primitive.c
2019-03-15 10:10:27 +01:00
25b6802aca GPencil: Drawing locked to 3D cursor (wip)
Now it's possible to draw strokes attached to a plane locked to 3D cursor.

Still pending the lock in Sculpt mode.
2019-03-15 08:43:39 +01:00
f63255412f Merge branch 'master' into greasepencil-object 2019-03-14 19:54:31 +01:00
2bbcae2779 Merge branch 'master' into greasepencil-object 2019-03-14 19:50:24 +01:00
07c8f472cd GPencil: Cleanup unused shader code
After last changes, some code is not required and only adds noise lines.
2019-03-14 09:48:08 +01:00
b95c52d151 GPencil: Text flip vertical to texture stroke 2019-03-13 19:48:16 +01:00
11f5d0e339 GPencil: More test for textured strokes
Now the texture is inverted in alternate segments.
2019-03-13 16:36:08 +01:00
f3ee171917 Merge branch 'master' into greasepencil-object 2019-03-13 10:05:49 +01:00
712e898f28 Merge branch 'master' into greasepencil-object 2019-03-11 17:43:32 +01:00
55ca1d7c0e GPencil: Display color names only in Edit mode 2019-03-10 17:14:01 +01:00
bd4e21591b Merge branch 'master' into greasepencil-object 2019-03-10 16:53:25 +01:00
236353e385 GPencil: Add support to color names for selected strokes
When enable names display in object panel, the color of each selected stroke is displayed in the viewport near to the first selected stroke.
2019-03-10 16:52:43 +01:00
c7ce7f6f83 Merge branch 'master' into greasepencil-object 2019-03-08 22:09:50 +01:00
71e55d7a9a Merge branch 'master' into greasepencil-object 2019-03-08 19:55:53 +01:00
4bfe2a1638 Merge branch 'master' into greasepencil-object 2019-03-08 16:15:41 +01:00
a08bf336f5 Type error 2019-03-08 19:58:41 +08:00
c46ce1bc81 Merge changes 2019-03-08 19:39:02 +08:00
26fc7ef55f Merge branch 'master' into soc-2018-npr
# Conflicts:
#	release/datafiles/locale
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/blender/draw/intern/DRW_render.h
#	source/blender/makesdna/DNA_light_types.h
#	source/blender/makesdna/DNA_scene_types.h
#	source/blender/makesrna/intern/rna_scene.c
#	source/tools
2019-03-08 19:12:37 +08:00
51db1be858 GPencil: More test to textured strokes
Now, the UV is inverted by section (a full texture width) and not by point.
2019-03-08 10:24:54 +01:00
5a2e6d1a2f GPencil: Fix error after merge
Missing field rename.
2019-03-08 10:04:01 +01:00
3ff6b1b79e Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-03-08 08:44:03 +01:00
afbe476aa7 Merge branch 'master' into greasepencil-object 2019-03-07 19:16:08 +01:00
5b627da8ad GPencil: Invert texture UV for textured strokes
More test with textures to invert the UV depending of the random rotation.
2019-03-07 10:05:37 +01:00
f1966fae33 GPencil: Try to add some randomness to textured strokes
This is a test to check the sclae of the random value for UV in strokes.
2019-03-06 19:47:17 +01:00
3d60d3eb22 Merge branch 'master' into greasepencil-object 2019-03-06 19:31:38 +01:00
fe436f279c Merge branch 'master' into greasepencil-object 2019-03-06 19:23:24 +01:00
995113925f Merge branch 'master' into greasepencil-object 2019-03-06 16:26:30 +01:00
9c14b2442e Merge branch 'master' into greasepencil-object 2019-03-05 12:13:40 +01:00
10c15f2778 Merge branch 'master' into greasepencil-object 2019-03-04 20:57:35 +01:00
341d5f4cff Annotations: Reduce smooth factor to 0.5
The previous value was too high and deform too much if write text.
2019-03-04 20:38:03 +01:00
e897ec1295 Merge branch 'master' into greasepencil-object 2019-03-04 19:41:20 +01:00
46b6c97737 GPencil: Add a comment to tag pending change in gizmo
This comment is to tag this line to be removed when OB_MODE_EDIT_GPENCIL will be merged into OB_MODE_EDIT.
2019-03-04 19:28:35 +01:00
1d903d490b GPencil: Move Extrude Toolbutton to bottom group 2019-03-04 19:24:42 +01:00
8f6ef7563a GPencil: Add multiframe support to Extrude operator 2019-03-04 17:43:49 +01:00
2028ca8426 Merge branch 'master' into greasepencil-object 2019-03-04 17:32:55 +01:00
d56f4f55b1 GPencil: New extrude operator
If the extrude points are the first or last of the stroke, the stroke is extended.

If the extrude points are in the middle of the stroke, a new stroke is created because the grease pencil strokes can be only with 2 extremes.

Still pending define a new icon and set by default XYZ axis in gizmo.
2019-03-03 16:35:54 +01:00
283b516d88 Merge branch 'master' into greasepencil-object 2019-03-03 16:33:17 +01:00
fb0f740f81 GPencil: Fix merge error 2019-03-01 20:58:03 +01:00
89bb36edc6 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_engine.c
2019-03-01 20:55:19 +01:00
a001cdb3ad GPencil: Fill: UI Tweaks 2019-03-01 15:44:24 +00:00
aac875421f GPencil: Fill changes
+ Replace Strokes with Adaptive
+ Remove dilate option, always on
+ UI changes
2019-03-01 13:29:04 +00:00
34b32fbd2c GPencil: Fix merge error 2019-02-28 16:16:51 +01:00
63ea3ffa26 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_engine.c
	source/blender/draw/engines/gpencil/gpencil_engine.h
	source/blender/draw/engines/gpencil/shaders/gpencil_zdepth_mix_frag.glsl
2019-02-28 16:13:26 +01:00
07c6221925 GPencil: Rename variable name and add alpha to outline
The outline now has some alpha to be more consistent with other Blender areas.
2019-02-28 16:11:30 +01:00
a030e2fa15 GPencil: Disable Outline if Overlay is disabled
The main overlay switch and outline option must be checked.
2019-02-28 15:58:03 +01:00
8388f4b985 GPencil: Remove comment line added by error to header text
This line was added accidentally in the header text.
2019-02-28 12:23:58 +01:00
345ab3ab70 GPencil: Increase outline to 2 pixels
The selection outline of 1 pixel was too thin.
2019-02-28 12:12:52 +01:00
834942d121 GPencil: Hide selecction outline when play animation 2019-02-28 11:45:23 +01:00
770239fe61 GPencil: Draw Outline to Active and Selected objects
Now an outline is drawn when the grease pencil is selected.
2019-02-28 11:16:35 +01:00
ad9922516a GPencil: Remove dummy marker for Grease Pencil objects
After adding selecction using strokes, the dummy is not required because it was added as a provisional solution while we implement stroke selection.
2019-02-28 11:16:29 +01:00
db6fb2a719 GPencil: Add selection support for objects using strokes
Now it's possible to select a grease pencil object without using the dummy.
2019-02-28 11:16:24 +01:00
18c43863f4 GPencil: Draw Outline to Active and Selected objects
Now an outline is drawn when the grease pencil is selected.
2019-02-28 10:47:57 +01:00
370d6293dc GPencil: Remove dummy marker for Grease Pencil objects
After adding selecction using strokes, the dummy is not required because it was added as a provisional solution while we implement stroke selection.
2019-02-27 20:46:04 +01:00
0b0bda3860 GPencil: Add selection support for objects using strokes
Now it's possible to select a grease pencil object without using the dummy.
2019-02-27 19:50:58 +01:00
21bcc58c88 Merge branch 'master' into greasepencil-object 2019-02-27 19:50:10 +01:00
bb9422ec82 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/makesdna/DNA_brush_types.h
	source/blender/makesrna/intern/rna_brush.c
2019-02-27 16:32:47 +01:00
0425686754 Merge branch 'master' into greasepencil-object 2019-02-26 14:05:30 +00:00
7809ef8c57 Merge branch 'master' into greasepencil-object 2019-02-25 17:52:07 +01:00
6bebb39c1c Merge branch 'master' into greasepencil-object 2019-02-25 08:35:50 +01:00
c26ab6fe15 Merge branch 'master' into greasepencil-object 2019-02-23 11:49:48 +01:00
50293fd251 GP: Change Draw Mode Title 2019-02-22 14:35:20 +01:00
cd68ef4803 GP: Reorganize Draw Mode
Now, the parameter only works with 3D space depth ordering. The Back and Front depths are incompatible with 3D Space mode.

Options are:
- Back
- Front
- 3D Space->2D Layers (default)
-3D Space->3D Space (new mode)
2019-02-22 09:12:22 +01:00
70c511cecb GP: Cleanup style 2019-02-21 12:35:29 +01:00
2d7c903512 Merge branch 'master' into greasepencil-object 2019-02-21 12:28:39 +01:00
333f562cf7 GP: Define new Draw Mode
Add a new Draw Mode to display panel in order to define the z-.depth order of the strokes using the real 3D position and not the 2D layer position.

This change makes possible to use VR with grease pencil drawings because the depth of the strokes change with camera position.
2019-02-21 12:27:43 +01:00
14cd89149a Merge branch 'master' into greasepencil-object 2019-02-19 17:41:00 +01:00
5a3095ffb7 Merge branch 'master' into greasepencil-object 2019-02-17 12:22:20 +01:00
4f04859237 Merge branch 'master' into greasepencil-object 2019-02-14 23:04:15 +01:00
d1067b645d GP: Fill: Fix issue with textured strokes
Force textured strokes to use control lines for the fill boundary regardless of fill mode.
2019-02-14 11:10:39 +00:00
4311346e29 Merge branch 'master' into greasepencil-object 2019-02-14 10:03:28 +01:00
48355d7430 GP: Trim Strokes: UI Changes
+ Fix inner loop
2019-02-11 13:54:01 +00:00
3013afcc1e Merge branch 'master' into greasepencil-object 2019-02-09 19:09:52 +01:00
5f52ea5218 Merge branch 'master' into greasepencil-object 2019-02-07 16:32:47 +01:00
6535ce6e61 Merge branch 'master' into greasepencil-object 2019-02-07 15:37:53 +01:00
cee3b7b2d9 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_render.c
2019-02-06 10:02:51 +01:00
856ad07a71 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/makesrna/intern/rna_brush.c
2019-02-05 12:10:56 +01:00
41f2a8c861 GP: Cleanup blend render functions
This is the first step to try to fix the problems with colors.
2019-02-04 20:01:20 +01:00
7a6daa6b26 Merge branch 'master' into greasepencil-object 2019-02-02 09:34:05 +01:00
5aee6cbcbb Merge branch 'master' into greasepencil-object 2019-02-01 17:15:36 +01:00
53586f3fb2 Merge branch 'master' into greasepencil-object 2019-01-30 16:36:14 +01:00
d4eafa06a1 GP: Test for removing DEG_get_original_id()
Use depsgraph data and not original data in draw manager, except while drawing new strokes.
2019-01-29 17:19:02 +01:00
5bda55aec9 Merge branch 'master' into greasepencil-object 2019-01-29 16:34:20 +01:00
16eacc9196 Merge branch 'master' into greasepencil-object 2019-01-28 17:27:37 +01:00
eff62db361 Merge branch 'master' into greasepencil-object 2019-01-27 19:29:40 +01:00
685909272f Merge branch 'master' into greasepencil-object 2019-01-26 10:57:56 +01:00
e633707e0f Merge branch 'master' into greasepencil-object 2019-01-25 20:45:51 +01:00
b6fc2f1e12 Merge branch 'master' into greasepencil-object 2019-01-25 10:08:31 +01:00
67b31124e8 Merge branch 'master' into greasepencil-object 2019-01-24 18:36:05 +01:00
b0f8331b78 GP: Move trim to shared module and cleanup
- Moved trim function to shared BKE.
- Add support to multi frame edit.
- Cleanup debug code.
2019-01-24 18:12:05 +01:00
f6c25ed3ba GP: Draw: Stroke Trim
+ New 'Trim' edit mode operator and post-processing brush option.

Trim works on a single GP stroke. It removes trailing points before and after the first intersection (or loop) nearest to the start of the stroke.
2019-01-24 15:57:02 +00:00
1af7837e6d Merge branch 'master' into greasepencil-object 2019-01-23 13:40:28 +00:00
0d9e6c5acd Merge branch 'master' into greasepencil-object 2019-01-22 20:17:24 +01:00
bd5200f18f Merge branch 'master' into greasepencil-object 2019-01-22 17:56:00 +01:00
746d1904fe Merge branch 'master' into greasepencil-object 2019-01-21 19:14:14 +01:00
1651f53276 Merge branch 'master' into greasepencil-object 2019-01-21 15:03:19 +00:00
ca6b2bdc17 Merge branch 'master' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_paint_common.py
2019-01-21 11:05:58 +01:00
5cba4e1cb6 Merge branch 'master' into greasepencil-object 2019-01-20 20:41:25 +01:00
8c48e8d805 Merge branch 'master' into greasepencil-object 2019-01-19 14:34:40 +00:00
7625771e3e GP: Fill: Add end cap support to boundary strokes
+ Fill boundary stroke supports end caps
+ Fix pixfactor type
2019-01-19 02:24:43 +00:00
9e28e409bc Merge branch 'master' into greasepencil-object 2019-01-18 15:51:31 +00:00
022eca106e Merge branch 'master' into greasepencil-object 2019-01-18 10:56:44 +01:00
fedb278d31 GP: Fill: Temp fix for fill options in topbar
Topbar has a bug that means if there are too many items it won't display them.
This temp fix moves some of the Fill tool options to a popup panel.
2019-01-18 09:22:31 +00:00
5abe5050ed GP: Fix Fill Topbar
The column layout is not supported as expected.

Anyway, there is a bug in topbar when the size of the parameters is too big.
2019-01-17 20:34:39 +01:00
b4a172fe59 Merge branch 'master' into greasepencil-object 2019-01-17 19:34:19 +01:00
5f76b766d4 GP: Fill: Tweaks
+ Made Dilate an option for all fill modes for testing purposes
+ Pixel shift is enabled for all modes
2019-01-17 11:57:27 +00:00
171861eb5e Merge branch 'master' into greasepencil-object 2019-01-16 20:05:37 +01:00
c6467c3c4f Merge branch 'master' into greasepencil-object 2019-01-16 19:23:08 +01:00
9d5bae9d09 GP: Fill: Dilate into corner pixels
Dilate now fills corner pixels for more accuracy.

Devs: Not sure that the algorithm is the most efficient so if you have any tips let me know!!!
2019-01-16 17:44:27 +00:00
5cdd1d901b GP: Fill: Fix issue with dilate creep 2019-01-16 15:14:09 +00:00
4ca6d8e9d8 GP: Use multiframe falloff in Shear transform 2019-01-16 11:30:06 +01:00
efec93974e GP: Use multiframe falloff for Bend transformation 2019-01-16 11:25:12 +01:00
46f0093be3 GP: Fill: Adaptive mode
+ add naive dilate to filled area
+ shift points by half pixel
2019-01-15 21:40:43 +00:00
0fa111e74f Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_fill.c
2019-01-15 19:45:14 +01:00
1d2cb649f7 GP: Fill: New mode, adaptive
This is like both strokes and control mode but with narrower strokes.
2019-01-15 15:08:20 +00:00
6871f7bca2 GP: Fill: Reduce stroke thickness to minimum
Sets flag when using the fill tool to reduce strokes to minimum. This helps reduce white areas.
2019-01-14 23:03:16 +00:00
5e5496e6ea GP: Fill: Fix crasher when unable to create GPUOffScreen 2019-01-14 22:39:01 +00:00
fe570a2fea GP: Fill: Add Resolution multiplier
Default is 1, no change. Increasing this number improves accuracy at the expense of processing time and memory usage.

This value multiplies the resolution of the buffer image generated used to calculate the flood fill.
2019-01-14 19:03:47 +00:00
f49c07aaa7 Merge branch 'master' into greasepencil-object 2019-01-14 18:00:59 +00:00
76bcef3c98 Merge branch 'master' into greasepencil-object 2019-01-11 19:23:09 +01:00
e6cd8294d9 Merge branch 'master' into greasepencil-object 2019-01-11 18:56:47 +01:00
f7e1904f08 Merge branch 'master' into greasepencil-object 2019-01-11 16:59:25 +01:00
a5b1305cf2 GP: Guides: Set status back to idling after exiting cp mode 2019-01-11 15:31:38 +00:00
98542acb4f Merge branch 'master' into greasepencil-object 2019-01-11 11:01:07 +01:00
b6a09a0ff6 Merge branch 'master' into greasepencil-object 2019-01-11 10:26:46 +01:00
a99886d55c GP: Guides: Fix snapping distance
Use pre-existing code to determine the pixel scale.
2019-01-10 23:46:27 +00:00
cbc2c91356 Merge branch 'master' into greasepencil-object 2019-01-10 16:26:40 +01:00
89281f0dd8 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl
2019-01-10 13:17:31 +01:00
60cd64fe2e Merge branch 'master' into greasepencil-object 2019-01-09 16:44:38 +01:00
c863ad1a85 Merge branch 'master' into greasepencil-object 2019-01-08 16:55:32 +01:00
23aae7822b GP: If no collision restore selection of points
If no collision, the selection only selected the vertex as vertex mode and don't extend selection.
2019-01-08 11:26:22 +01:00
bdbc0f184f GP: Remove with Cutter strokes of 2 points
As thess strokes always generate an autocollision, it was impossible to delete them.
2019-01-08 11:16:59 +01:00
ee672ad4ea Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_paint.c
2019-01-08 09:28:08 +01:00
56a829145b GP: Guides: Change keys to release event 2019-01-08 00:41:02 +00:00
bc859fadad GP: Guides: Change units from px to blender
Based on GP team feedback

+ Tidy and also fix issue of not snapping to nearest guide
2019-01-08 00:26:26 +00:00
e6296a54f2 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/makesdna/DNA_gpencil_types.h
	source/blender/makesdna/DNA_scene_types.h
2019-01-07 19:05:48 +01:00
6d6985ff84 GP: Support Cutter in same stroke
Before the cutter only worked with different strokes, but now can handle selfcollisions.

Also added code to avoid infinite loops.
2019-01-07 18:43:49 +01:00
b21bb283b5 GP: Guides: UI Cleanup
Remove enable option from menu
Remove cursor location
2019-01-07 15:17:24 +00:00
3331c73564 GP: Cleanup compiler warnings 2019-01-07 16:12:28 +01:00
74f39165fd GP: Cleanup - Remove commented UI code 2019-01-07 10:08:30 +00:00
607e542087 Merge branch 'master' into greasepencil-object 2019-01-07 10:43:53 +01:00
bddb1c0f4d GP: Cleanup typo error 2019-01-07 10:42:47 +01:00
1d3d48fa4d GP: Cleanup - Move Guides RNA to separated function 2019-01-07 10:34:31 +01:00
431e7349e7 GP: Guides: Speedline drawing guides
Initial commit for final testing
2019-01-06 23:07:43 +00:00
014c2d5e03 GP: Rename Solo Mode property 2019-01-06 17:26:43 +01:00
38f844c078 Merge branch 'master' into greasepencil-object 2019-01-06 17:22:59 +01:00
c78fbccee8 GP: Set Cap mode as Enums
Now the Cap mode is an enum ready for future modes.

Add the cap mode to material is not logic because the stroke start and end depends on the drawing direction. Maybe in the future we could add to material, but will need more work at stroke level.

The Toggle operator keeps equal in a circular switch mode. We can improve it also in the future.
2019-01-06 16:41:02 +01:00
f51c34ec59 GP: Move Solo Mode to Layer level
WIP: Still pending the final UI location and name.
2019-01-06 16:12:39 +01:00
8e62b8907d GP: New Solo Mode to display keyframes only
When paint mode, now is possible display only layers with keyframes in the current frame.

This is very useful to fill strokes.
2019-01-05 19:44:40 +01:00
3c8cc073ad Merge branch 'master' into greasepencil-object 2019-01-05 19:03:17 +01:00
13fedec4ab GP: Allow different cap shape in each extrem of the stroke 2019-01-05 16:38:04 +01:00
ef57bc2d5f GP: New option to toggle Caps mode
Now it's possible to have flat or rounded (default) stroke caps.

The operator is accessible in edit mode.
2019-01-05 12:22:00 +01:00
d0da9054c6 Merge branch 'master' into greasepencil-object 2019-01-05 11:10:53 +01:00
0ed55524f1 Merge remote-tracking branch 'origin/master' into soc-2018-npr
# Conflicts:
#	release/datafiles/locale
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/blender/makesdna/DNA_scene_types.h
#	source/blender/makesrna/intern/rna_scene.c
#	source/tools
2019-01-05 17:29:09 +08:00
516019bc72 GP: Rename isect property 2019-01-05 09:06:30 +01:00
e6a9af4427 GP: Add Keymap for segment mode 2019-01-05 09:06:17 +01:00
6d92338179 GP: Remove hardcode factor for cutter point
This made the intersection to be over original point.
2019-01-04 22:19:13 +01:00
87ca0afe81 GP: Initialize intersection threshold 2019-01-04 20:18:13 +01:00
d2d2d2416b Merge branch 'master' into greasepencil-object 2019-01-04 18:16:34 +01:00
682ba1d001 GP: Minor threshold tweaks 2019-01-04 18:15:57 +01:00
eba3cb75b0 GP: Improve intersections and add Threshold parameter
Now the threshold can be defined using a UI parameter.

The parameter is available in Edit selecction and in Cutter tool.

Also improved the use of this threshold.
2019-01-04 17:52:29 +01:00
b2df4c5d5b GP: Cleanup code 2019-01-04 10:43:35 +01:00
ebf98b4c05 Revert "GP: Draw: Speedline guides"
This reverts commit e83bfeab81.
2019-01-04 10:31:58 +01:00
e48c4638f8 Merge branch 'master' into greasepencil-object 2019-01-04 10:29:45 +01:00
d337a3993b Merge branch 'master' into greasepencil-object 2019-01-03 20:14:33 +01:00
5c14270fd8 GP: Add small offset to collision point 2019-01-03 20:09:21 +01:00
c3f971fc10 GP: Fix segment fault whith Cutter
The problem was when the new intersection point was inside the lasso.

Also improved when select all stroke points.
2019-01-03 19:50:21 +01:00
6bc549d40d Merge branch 'master' into greasepencil-object 2019-01-03 16:49:26 +01:00
ba5a8d5992 GP: Improve collision detection
Now the stroke extremes are scaled for improving the collision detection.
2019-01-03 16:41:22 +01:00
fd552a77d7 Revert "GP: Remove correction factor in Cutter"
This reverts commit c05ac7bc58.
2019-01-03 13:58:33 +01:00
78994637ca GP: Fix problem when select same stroke several times 2019-01-03 13:47:27 +01:00
2648ef562b GP: Hide topbar options for Cutter 2019-01-03 12:12:56 +01:00
c808e33461 GP: Add Lasso Eraser to Cutter tool 2019-01-03 12:03:46 +01:00
b02d985ce3 Merge branch 'master' into greasepencil-object 2019-01-03 11:30:35 +01:00
950dc276a7 Merge branch 'master' into greasepencil-object 2019-01-03 10:52:12 +01:00
1d3aedfb2e GP: Fix segment fault using cutter
The layer can be empty without frames.
2019-01-03 10:50:50 +01:00
d99b647015 Merge branch 'master' into greasepencil-object 2019-01-02 19:56:27 +01:00
dc8eb55390 GP: Basic Lasso Cutter support 2019-01-02 19:40:30 +01:00
c05ac7bc58 GP: Remove correction factor in Cutter
This factor makes better cuts, but breaks other cuts, so the next operation is not working.

Maybe in the future we can add this as a parameter.
2019-01-02 19:40:30 +01:00
e83bfeab81 GP: Draw: Speedline guides
Initial commit for artist feedback.
Provides drawing guides or constraints for drawing lines.

Notes:
UI Panel in 3D view. Some settings only have keyboard access at the moment.
Alt-C: Screen space position of circular guide
C: Circular guide
L: Parallel line guide
M: Flip direction 90° degrees
V: Freehand mode (turn off)
J/K: For line guide, rotate guide (alt 45°, shift 15°)
Alt-L: Set angle to that of the last stroke (useful to align to freehand strokes)
Ctrl-L: Set angle to 0°

Todo:
On screen guidelines
2019-01-02 17:57:07 +00:00
0ab64a9297 Merge branch 'master' into greasepencil-object 2019-01-02 17:44:38 +01:00
63e34ee641 Merge branch 'master' into greasepencil-object 2019-01-02 10:19:22 +01:00
e5b7ebf71f GP: Fix possible NULL error 2019-01-02 10:05:38 +01:00
8d78a25ef4 Fixed clipping distance calculation, but clip plane triangle cutting still have problems. 2019-01-02 16:09:01 +08:00
27eb5c231e Merge branch 'master' into greasepencil-object 2019-01-01 17:42:23 +01:00
960455b232 GP: New Cutter tool
This tool is used to cut the extremes.
2019-01-01 17:41:09 +01:00
cd07dd2a1c GP: New Segment selection mode
New option to select points between stroke collision. This is useful to select the segment between two strokes to make merges.
2018-12-30 22:10:50 +01:00
fc23d501d3 Merge branch 'master' into greasepencil-object 2018-12-30 13:09:17 +01:00
13df6fb776 Merge branch 'master' into greasepencil-object 2018-12-30 12:49:05 +01:00
907ea48a52 Fixed intersection missings when bounding area separation occurs. 2018-12-30 11:28:36 +08:00
fd49ce1d7b Fixed hidden multi-thread error. 2018-12-29 21:31:32 +08:00
5ded8bc95f Fix triangle-point test function for a stupid condition. See comment. 2018-12-29 15:05:41 +08:00
628ff9b3d6 make rendering into a loop to avoid callback stack overflow. 2018-12-29 13:04:22 +08:00
a531f8528b remove INVOKE_DEFAULT for rendering, otherwise still cause trouble on windows. 2018-12-29 12:28:10 +08:00
a3b17a6c71 Fix scripts from external editings. 2018-12-28 21:49:50 +08:00
7d60b14676 Added one click composition to LANPR. 2018-12-28 21:20:19 +08:00
8ac8cb9ce1 GP: fix error after merge 2018-12-28 10:48:45 +01:00
e1aaeaf27e Merge branch 'master' into greasepencil-object 2018-12-28 10:42:48 +01:00
736bb18666 GP: Fix error when merge 1 stroke only 2018-12-28 10:41:27 +01:00
be0628b743 Merge branch 'master' into soc-2018-npr 2018-12-28 10:59:36 +08:00
28e2e688d9 GP: More cleanup and renames 2018-12-27 22:29:36 +01:00
b60e45164d GP: Remove unused variable 2018-12-27 22:22:06 +01:00
a5d66391ab GP: Mew Merge Strokes operator
This operator allows to create a new stroke joining several stroke selected points of different strokes.

The new stroke will use the current material.

To use, first select the points to be merged. Optionally can remove the old points and strokes.

The operator is available in Edit mode in the Specials menu and Stroke menu.
2018-12-27 17:48:28 +01:00
c68996c75a Merge branch 'master' into greasepencil-object 2018-12-27 17:07:22 +01:00
039af4f45c Merge branch 'master' into greasepencil-object 2018-12-25 11:11:09 +01:00
acb1f24178 GP: Remove temporarily chord primitive
As this primitive is not defined completely, we remove it now and we can add later. Keep this primitive in the source code can produce errors when move more stable options to master.
2018-12-25 10:47:02 +01:00
537b6681d8 Merge branch 'master' into greasepencil-object 2018-12-25 10:28:10 +01:00
be72963cc8 Merge branch 'master' into greasepencil-object 2018-12-24 11:18:15 +01:00
d28d0e4416 Merge branch 'master' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_intern.h
	source/blender/editors/gpencil/gpencil_primitive.c
2018-12-23 16:58:25 +01:00
Nick Wu
61d3c1261c Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-12-23 19:09:42 +08:00
4e84dd7106 Merge branch 'master' into greasepencil-object 2018-12-21 18:55:55 +01:00
22f1cb2121 Merge branch 'master' into greasepencil-object 2018-12-21 16:27:31 +01:00
9c91e6c857 GP: Primitive: Fix randomness bias 2018-12-21 12:19:41 +00:00
56873ae4fd GP: Primitive: Fix merge errors 2018-12-21 09:29:16 +00:00
c8f72541b6 Merge branch 'blender2.8' into greasepencil-object 2018-12-21 08:47:53 +01:00
93a341526c Merge branch 'blender2.8' into greasepencil-object 2018-12-20 17:39:35 +01:00
0a795fa99c GP: Fix merge conflict 2018-12-20 15:53:36 +01:00
2cc269fe8f GP: Fix merge error 2018-12-20 14:00:28 +01:00
f9a8662938 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_primitive.c
2018-12-20 13:36:41 +01:00
ef757a2ef8 GP: Primitive: Fkey to size brush 2018-12-20 11:45:51 +00:00
8d599e1e67 GP: Primitive: Add MMB to confirm 2018-12-19 15:33:24 +00:00
761c937a8e GP: Primitive: RMB does not cancel previous strokes
Based on GP team feedback.
2018-12-18 16:17:38 +00:00
05cb3fe584 GP: Primitive: Fix flickering when using a noise brush
Previously, the random values were generated every draw, now they are generated once.
2018-12-18 14:26:53 +00:00
90875f7d94 Merge remote-tracking branch 'origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/blender/makesdna/DNA_lamp_types.h
#	source/blender/makesdna/DNA_scene_types.h
2018-12-18 11:56:01 +08:00
6dfc7969f5 Merge branch 'blender2.8' into greasepencil-object 2018-12-17 19:14:30 +01:00
b4d0795be5 Merge branch 'blender2.8' into greasepencil-object 2018-12-17 18:35:43 +01:00
77b9002fa0 GP: Primitive: Chord shape
Similar to Arc but based on a chord. Can create bulbous curves.
2018-12-17 17:02:33 +00:00
ecfcb3948a Merge branch 'blender2.8' into greasepencil-object 2018-12-17 11:45:27 +01:00
b5c754ba11 Merge branch 'blender2.8' into greasepencil-object 2018-12-16 12:24:07 +01:00
e54e69764e Merge branch 'blender2.8' into greasepencil-object 2018-12-16 11:41:46 +01:00
e66165e0a3 Merge branch 'blender2.8' into greasepencil-object 2018-12-15 17:22:42 +01:00
ba9faca2a6 GP: M key only must works for Arcs 2018-12-15 16:57:38 +01:00
c29cb2a88a GP: Remove L keymap
Change the Tool using a keymap is not the best solution. The right way is use a different tool.
2018-12-15 16:37:02 +01:00
f6ecefa675 GP: Make C key works only with curves
If we enable this key in Arc it looks the curve and Arc and the same tool, but they are different, so to change the tool use toolbar not a keymap.
2018-12-15 16:35:02 +01:00
21df096161 GP: Change F keymap to M keymap
F means fill, M for mirror is better.
2018-12-15 16:27:56 +01:00
d1da89f73e GP: Replace A keymap by E keymap to be consistent. 2018-12-15 16:22:59 +01:00
50668ae249 GP: Remove C key for Line primitive
It's weird to have this option in lines because mix with arcs. For Arcs and Curves the C key is very useful.

Some changes in bottom text too.
2018-12-15 12:19:43 +01:00
8695adddb4 GP: More control points more transparent
This helps to see the extremes of the stroke.
2018-12-15 12:02:40 +01:00
6d0cec5e0b Merge branch 'blender2.8' into greasepencil-object 2018-12-15 11:52:45 +01:00
1a44501f57 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/presets/keyconfig/keymap_data/blender_default.py
2018-12-14 19:17:08 +01:00
b0df9b51b4 Merge branch 'blender2.8' into greasepencil-object 2018-12-14 16:53:17 +01:00
eea081cd5f GP: Primitive: Revert adding new cursor and use nsew instead 2018-12-14 15:28:21 +00:00
ca17bf014b GP: Primitive, fix move bug 2018-12-14 15:05:09 +00:00
081a964db5 GP: Cleanup code and comments 2018-12-14 10:55:55 +01:00
92398166b0 Merge branch 'blender2.8' into greasepencil-object 2018-12-14 10:29:48 +01:00
1d4ea9d881 Fix smooth contour modifier for API changes 2018-12-14 14:57:51 +08:00
39f22cc857 Merge remote-tracking branch 'origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/blender/makesrna/intern/rna_scene.c
2018-12-14 14:47:39 +08:00
feb24c13b9 Fix accidental merge error 2018-12-14 14:46:43 +08:00
41b580619b GP: Primitive: Enable manipulators for Line/Box/Circle
Based on GP team feedback, all primitive tools have consistent behaviour.

Additionally:
AKEY extends Line, Arc and Curve.
CKEY changes type to Curve/Arc (toggle).
LKEY changes type to Line.
GKEY moves shape.
2018-12-14 01:25:18 +00:00
a6c0ec0cec Merge branch 'blender2.8' into greasepencil-object 2018-12-13 23:38:10 +01:00
f9bffb5b70 GP: Add Subdivide Smooth option 2018-12-13 23:30:29 +01:00
2719824a2e GP: Add missing Main Overlay switch to previous commit 2018-12-13 23:17:25 +01:00
6bc7180ca9 GP: Hide Primitive Gizmos with Overrlay switches
If disable Gizmo or Tool Gizmo the manipulators are not displayed.
2018-12-13 23:07:22 +01:00
84b7624b80 GP: Primitive: Add support for brush jitter and random strength
Also fix extra point bug.
2018-12-13 18:57:27 +00:00
3ef40443d4 Merge branch 'blender2.8' into greasepencil-object 2018-12-13 19:50:32 +01:00
9f4e8108fd GP: Remove redundant text 2018-12-13 19:38:25 +01:00
b79feba4c1 GP: New Smooth Operator in Specials menu
This Smooth works as in Meshes when you are in Edit mode.
2018-12-13 18:34:34 +01:00
5fb4f472da GP: Cleanup inverse loops
Why use inverse loops when we can use normal loops.
2018-12-13 14:12:40 +01:00
6fbf02f2a7 GP: Check if z-depth has valid values
If the values are too high, disable because not surface to project.
2018-12-13 13:56:42 +01:00
8042e5405e GP: Fix bug when start new file and select Arc primitive 2018-12-13 13:20:38 +01:00
42fe035cd2 Merge branch 'Blender2.8' into greasepencil-object 2018-12-13 12:45:11 +01:00
fa9c7f41d7 GP: Primitives, fix add curve behaviour
Reported by @_pepeland_

Also, add TAB key to exit edit mode.
2018-12-13 11:34:31 +00:00
c191f8d35f Merge branch 'blender2.8' into greasepencil-object 2018-12-13 11:52:29 +01:00
671748d877 Merge branch 'blender2.8' into greasepencil-object 2018-12-13 10:53:17 +01:00
bc8384d8a3 GP: Fix missing control points after merge 2.8 2018-12-12 22:42:02 +01:00
c07ba23896 GP: Refactor reproject in primitives 2018-12-12 21:50:09 +01:00
76d5500298 Merge branch 'blender2.8' into greasepencil-object 2018-12-12 19:49:52 +01:00
0ac991611a GP: Primitive: Change defaults
Based on User feedback from @mmendio.

The Arc tool now starts as a perfect arc in all directions.
The two control points for the Curve tool can be constrained to a single point using Shift.
Add Thickness profile to Box and Circle tools.
2018-12-12 17:56:33 +00:00
0cb674cd87 GP: Primitive: Avoid duplicate point when adding new curves 2018-12-12 15:11:01 +00:00
4ce6dfcd85 GP: Primitive: Arc tool changes
Added back constraint option to draw perfect arcs
Added back flip option
2018-12-12 14:13:03 +00:00
0fe997ae05 Merge branch 'blender2.8' into greasepencil-object 2018-12-12 14:44:21 +01:00
f1222d6115 Resume default contour detection method. 2018-12-12 21:22:51 +08:00
a33a3dfd74 Merge remote-tracking branch 'origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/blender/makesdna/DNA_scene_types.h
2018-12-12 19:02:58 +08:00
18301bf2cc GP: Print number of edges for Curves
This information was missing in bottom text  but you could change it.
2018-12-12 10:30:57 +01:00
46cdecbd0f GP: Reduce default edges for Box and Lines
Also avoid saving of edge number to reset for each new shape.
2018-12-12 10:26:59 +01:00
42767c180c Merge branch 'blender2.8' into greasepencil-object 2018-12-12 08:44:10 +01:00
63360df98f GP: Primitives: Adjust control point styles 2018-12-12 01:19:01 +00:00
1569196cf2 GP: Change Circle primitive control points
Changed to small red style.
2018-12-12 01:08:19 +00:00
351cd57aa0 GP: Editable Arc tool
Arc tool is now editable like the Curve tool.
Unlike the curve (bezier) tool this uses an elliptical function.
Remove flip option as it is no longer needed.
2018-12-12 00:54:08 +00:00
03d84f2b22 Merge branch 'blender2.8' into greasepencil-object 2018-12-11 18:47:55 +01:00
5734e0c2f8 GP: Fix box and circle cyclic on preview stroke 2018-12-11 17:43:25 +00:00
8e2f213746 GP: Remove "Close" from Bottom text
This was missing in previous commit.
2018-12-11 18:42:14 +01:00
0c4be6546c Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_primitive.c
2018-12-11 18:08:06 +01:00
fcb0e8c75f GP: Cleanup. Rename Beziers to Curve
Beziers name can be misunderstood for users. Curve is more generic.
2018-12-11 18:05:29 +01:00
7567700b15 GP: Remove cyclic option
Not compatible with new brush drawing.
2018-12-11 16:48:45 +00:00
2475d76dd9 GP: Remove Radius control point in Circles
This only adds complexity and don't communicate the information of the radius in a easy way, so it's better keep UI as clean as possible.
2018-12-11 17:40:49 +01:00
4886ab72ef GP: Test moving origin point to start control point for Arcs and Curves 2018-12-11 17:37:28 +01:00
0ed319cb0c GP: Add number of divisions in bottom message for Boxes
It was impossible to see the number of divisions used.
2018-12-11 17:29:24 +01:00
5e8cd30db1 GP: Restore origin point for Lines
Maybe is good tohave where is the origin of the line
2018-12-11 17:21:01 +01:00
ca7fd606da GP: Merge errors 2018-12-11 15:47:32 +00:00
9615d6f44a GP: Primitive, add noise to box and circle 2018-12-11 15:43:54 +00:00
522fab74a4 GP: Change control points size and remove in line 2018-12-11 16:34:57 +01:00
7a5080de0b GP: Fix memory leak 2018-12-11 16:24:07 +01:00
4370bc0c6e GP: Change constants by define for Ctrl points size
This makes changes easier and can be replace by variables or parameters easily.
2018-12-11 16:18:53 +01:00
85e253a934 Merge branch 'blender2.8' into greasepencil-object 2018-12-11 15:51:26 +01:00
3e169f0220 GP: Fix wrong end cap when finish stroke 2018-12-11 15:37:55 +01:00
c438ca96ba GP: Fix control points size when change zoom
Also replaced the shader used.
2018-12-11 15:22:42 +01:00
13e7eaee22 GP: Primitive, add brush noise 2018-12-11 13:44:06 +00:00
1d3756d4f7 GP: Remove orange line in primitives
After adding the preview of real stroke, this does not make sense.
2018-12-11 13:15:01 +01:00
0a2d9c58ee GP: Undo change for Buffer z-depth
This breaks the previous fix of orange line, but it's needed for projected strokes.
2018-12-11 13:08:23 +01:00
608504351d GP: Move drawing of control points to Draw Manager 2018-12-11 13:02:55 +01:00
2b888f8d21 GP: Line primitive, add support for thickness profile
This means that by default lines are drawn with multiple points rather than two.
2018-12-11 11:01:59 +00:00
cc1af80116 GP: Move Control Points data to Runtime
As we maybe will use these control points in more operators is not logic keep  them in operator temp data. This makes also possible move drawing to Draw Manager.
2018-12-11 11:25:33 +01:00
90d1665738 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2018-12-11 10:32:10 +01:00
49bf43e63a GP: Fix orange lines in primitives
The orange lines must be on top of the stroke. Before, the current stroke was drawn in Front, but since we have speed painting functions, we can draw on back.
2018-12-11 10:18:37 +01:00
252460b50a GP: Change Thickness Profile panel 2018-12-10 22:21:59 +01:00
944f1d4ae8 Merge branch 'blender2.8' into greasepencil-object 2018-12-10 20:30:43 +01:00
63537e77c3 GP: Use a fixed UV data for buffer end cap 2018-12-10 20:09:39 +01:00
2e488107ad GP: Fix problems with stroke Caps
Now the start cap is done and during drawing the end cap is not set because needs to have a UV calculated and this is not done while drawing.
2018-12-10 20:04:17 +01:00
f9dbee0cac Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2018-12-10 19:16:07 +01:00
b17c8dfe28 GP: Tidy 2018-12-10 16:45:06 +00:00
6073037ad8 GP: Primitives: tidy up control point code
The display of control points is temporary as this is still wip.
2018-12-10 16:42:59 +00:00
ac7618d0dc GP: Primitives: tidy up control point code
The display of control points is temporary as this is still wip.
2018-12-10 16:23:19 +00:00
41e059d344 GP: Add missing depsgraph update 2018-12-10 17:15:47 +01:00
fdff9ce59e GP: Set Brush default material when add new GP Object
Before the brush color was not set equal to object active color.
2018-12-10 16:54:49 +01:00
811cf683f1 GP: Remove Object Onion Skin switch
It was confusing to have two switches.
2018-12-10 16:42:40 +01:00
0c0f355ae3 GP: Replace Clamp icon 2018-12-10 16:21:34 +01:00
64c64d21e5 GP: Use floats for primitive coords 2018-12-10 14:28:07 +00:00
208ff2eb86 GP: Make Onion Skin ON as default RNA value 2018-12-10 14:33:10 +01:00
cdd2bba0fc Merge branch 'blender2.8' into greasepencil-object 2018-12-10 10:45:46 +01:00
19b066c41b GP: Enable Object Onion Skin by default
Now, the main switchis on, and the layer onion skin is off.
2018-12-10 10:43:29 +01:00
a6eb1bbf57 GP: Add offset over surface 2018-12-09 09:41:23 +01:00
6acfdbb6e1 GP: Add missing initialization for surface projection 2018-12-09 09:36:54 +01:00
8582a432a5 GP: Add support for drawing control points [wip]
Also renamed variables top, bottom -> start, end
2018-12-09 00:59:17 +00:00
e08c70d11c GP: Experimental test for Stroke project 2018-12-08 23:35:44 +01:00
e1d0312d8c GP: Cleanup typo 2018-12-08 23:35:02 +01:00
a3e3e2f2f1 Merge branch 'blender2.8' into greasepencil-object 2018-12-08 17:19:22 +01:00
Nick Wu
54443b6d90 Fix merge errors. 2018-12-08 22:55:29 +08:00
71f8d998c4 GP: Allocate stroke memory only when required 2018-12-08 11:17:57 +00:00
d778b0cc00 Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2018-12-07 22:11:32 +00:00
9b429d721c GP: Changes to bezier curve tool
When extending line with AKEY, prevent editing of joining point.
Update curve on initial draw, fixes pressure curve issue.
Change RMB to save and quite when editing.
2018-12-07 22:10:59 +00:00
d77446a681 Merge branch 'blender2.8' into greasepencil-object 2018-12-07 23:09:41 +01:00
4b3a48901a GP: Reorder Sculpt brushes in Tool bar 2018-12-07 22:59:40 +01:00
0be4c38125 GP: Fix primitive memory leak 2018-12-07 20:05:32 +01:00
205bfe524d Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/depsgraph/intern/depsgraph_tag.cc
	source/blender/editors/gpencil/gpencil_primitive.c
	source/blender/makesdna/DNA_ID.h
	source/blender/modifiers/intern/MOD_meshdeform.c
	source/blender/modifiers/intern/MOD_surfacedeform.c
2018-12-07 19:24:31 +01:00
4685cb6885 GP: Fix merge errors 2018-12-07 16:12:46 +00:00
7690ab09ad add 'Control Points' and 'Segments' editmode menus for Surfaces
Fixes T58922

Reviewers: brecht, billreynish

Maniphest Tasks: T58922

Differential Revision: https://developer.blender.org/D4046
2018-12-07 16:00:41 +00:00
Dalai Felinto
a01ccd09a8 Update BVHTree.FromObject API, remove render argument
This information should come from the depsgraph.
2018-12-07 16:00:41 +00:00
e03fd3c446 Cycles: Do more user-friendly indication that GPU devices are not found 2018-12-07 16:00:41 +00:00
fbeae89071 Cycles: Disable OpenCL on macOS
This is unfortunate, but the number of bugs in this configuration
keeps growing, and almost all of them are caused by bug in OpenCL
compiler.

The compiler is not likely to be fixed, since Apple declared OpenCL
deprecated.

This evil commit is aimed to keep officially supported features
of Blender in a good working and stable state.
2018-12-07 16:00:41 +00:00
a17abec24b Fix T58902: error getting tools for Image Editor (modes Paint and Mask)
Maniphest Tasks: T58902

Differential Revision: https://developer.blender.org/D4044
2018-12-07 16:00:41 +00:00
9c509d6b51 Fix T57640: UV unwrap packing not working without sync selection. 2018-12-07 16:00:40 +00:00
Dalai Felinto
4c41f8e9ad Partial fix to T58917 - No valid cage
The fix itself simply is to store the cage object as a pointer instead
of a string/name.

That said baking with or without cage is yielding very different results
than in 2.7.
2018-12-07 16:00:40 +00:00
1b1b28f4bd GP: Refactor coordinates to float
See: D4030

Differential Revision: https://developer.blender.org/D4036
2018-12-07 16:00:40 +00:00
e7b9d49e91 Fix/workaround crash opening almost any Spring file
The issue was caused mpoly array urequired by the cache filling,
but the pointer was never set when preparing render data.

Seems this change is safe enough, in terms it shouldn't be
causing slowdown, since the assignment of mpoly is cheap, but
hard to tell if there is anything else affected by thing underneath.
2018-12-07 15:59:47 +00:00
f6a0a8b89e Depsgraph: Make data allocation dependency more robust
This fix aims to fix crash/assert failure related on wrong
evaluation order which happens when there is a cyclic
dependency involved.

The rationality of this change is that we can allow use
of uninitialized scalar value, but memory is better be
allocated.

This might not be ideal still, but worth a try.
2018-12-07 15:59:47 +00:00
6646d1a8c6 Depsgraph: Use shorter relation name
It is clear enough already that it goes From to To.
2018-12-07 15:59:47 +00:00
5ee8111f15 Depsgraph: Cleanup, line length 2018-12-07 15:59:47 +00:00
c11cfa8072 Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those:

- OB_RECALC* family of flags, which are rudiment of an old
  dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
  as a separate set since the graph itself did not handle
  particle systems.
- DEG_TAG_* which was used to tag IDs.

Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.

Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.

Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.

Fixes T58632: Particle don't update rotation settings
2018-12-07 15:59:47 +00:00
0e90627861 Cleanup/refactor binding code for MeshDeform modifier.
We had two different ways of doing it, SurfaceDeform and LaplacianDeform
would do it through a special modifier stack evaluation triggered from
binding operator, while MeshDeform would do it through a regular
depsgraph update/eval (also triggered from its binding op).

This enforces the later to search back for orig modifier data inside
modifier code (to apply binding on that one, and not on useless CoW
one).

Besides the question of safety about modifying orig data from threaded
despgraph (that was *probably* OK, but think it's bad idea in general),
it's much better to have a common way of doing that kind of things.

For now it remains rather dodgy, but at least it's reasonably consistent
and safe now.

This commit also fixes a potential memleak from binding process of
MeshDeform, and does some general cleanup a bit.
2018-12-07 15:57:47 +00:00
3323693ea0 Fix T58046: Crash when changing Particle type, when Hair has dynamics
thx @sergey for checking
2018-12-07 15:57:46 +00:00
4ff30177ad Cleanup: split mixed_bones_object_selectbuffer
Split basic object picking logic out into it's own function.
2018-12-07 15:57:46 +00:00
16ae5375fd Cleanup: style 2018-12-07 15:57:46 +00:00
a2201c870e Fix T58913 Won't focus on Grease Pencil
When the datablock was empty, the center was not calculated. Now it uses the object location.
2018-12-07 15:57:46 +00:00
df10669321 Fix T58911: Picking objects fails in pose mode 2018-12-07 15:57:46 +00:00
cc41bfb65c Fix T58811: Scale bezier handle uses tip as origin 2018-12-07 15:57:46 +00:00
9fc81d8cea Merge remote-tracking branch 'origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons_contrib
#	release/scripts/startup/bl_ui/properties_data_camera.py
#	release/scripts/startup/bl_ui/properties_material.py
#	release/scripts/startup/bl_ui/properties_particle.py
#	release/scripts/startup/bl_ui/properties_physics_common.py
#	release/scripts/startup/bl_ui/properties_physics_rigidbody.py
#	release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
#	release/scripts/startup/bl_ui/properties_physics_softbody.py
#	release/scripts/startup/bl_ui/properties_scene.py
#	release/scripts/startup/bl_ui/properties_view_layer.py
#	release/scripts/startup/bl_ui/properties_world.py
#	source/blender/draw/intern/draw_manager.c
#	source/blender/makesrna/intern/rna_scene.c
2018-12-07 22:53:30 +08:00
0eabdabfae GP: Clear selected flag for new primitives 2018-12-07 15:46:40 +01:00
d22455089c GP: Fix wrong extreme in primitive 2018-12-07 15:23:09 +01:00
8cfc8e6347 GP: Fix multi-segment curve
Currently, only last segment is editable.
2018-12-07 14:17:17 +00:00
a62728abea GP: Remove curve for Lines
Lines only have 2 points, so it's not logic.
2018-12-07 13:27:55 +01:00
f23bd736de GP: Curve edit mode is now default after initial line
No need to hold shift.
2018-12-07 12:27:21 +00:00
70297337e0 GP: Enable curve only for Arcs and Beziers 2018-12-07 13:25:56 +01:00
45fe039c14 GP: Change default primitive curve 2018-12-07 13:17:32 +01:00
70a2eeba9e GP: Fix segment fault with primitive curve 2018-12-07 12:53:42 +01:00
fc97baf73a GP: Fix problems with primitive curve and add to Topbar 2018-12-07 12:49:12 +01:00
d690a1e32c GP: Evaluate curve for thickness in primitives 2018-12-07 11:34:36 +01:00
60d953ae30 GP: New curve to define thickness in primitives 2018-12-07 11:16:09 +01:00
5a4166b9b8 Merge branch 'blender2.8' into greasepencil-object 2018-12-07 08:22:21 +01:00
8aa0188de5 GP: Use brush strength when draw primitves 2018-12-06 19:21:45 +01:00
fec794bd3e GP: Bezier tidy
Remove unused defines and prevent num input while editing
2018-12-06 18:18:32 +00:00
454563ffac GP: Add bezier tool [wip]
Shift drag to move curve.
Ctrl-shift to move both cps.
2018-12-06 17:10:54 +00:00
0013bfdf25 GP: Fix gap drawing Circle, Rectangle and Arc primitives 2018-12-06 17:02:20 +01:00
2bcc5f8bde Draw real stroke while using a primitive 2018-12-06 13:13:47 +01:00
51e39ce568 Copy drawing data to stroke buffer
Still the draw manager is not calling to draw this datablock.
2018-12-06 12:32:14 +01:00
5d7474ae01 Prepare buffer stroke to save points 2018-12-06 12:18:11 +01:00
5bed2a23c5 Fix merge errors 2018-12-06 11:57:18 +01:00
2e0ef10670 Merge branch 'blender2.8' into greasepencil-object 2018-12-06 10:49:48 +01:00
231355fd09 Merge branch 'blender2.8' into greasepencil-object 2018-11-28 19:23:17 +01:00
f2fdfbb735 Change default annotation onion colors 2018-11-28 18:08:18 +01:00
8a0ed1214e Cleanup: Fix comment typo 2018-11-28 17:21:57 +01:00
5dadb95909 Enable Onion Skin for Annotations
Back port and adapt to 2.8 the onion skin for annotations in View 3D and Sequencer.

Added only basic features. For onion skin advanced features use grease pencil object.
2018-11-28 17:19:41 +01:00
f2161312f2 Merge branch 'blender2.8' into greasepencil-object 2018-11-28 16:54:32 +01:00
2614f21412 Add vtx boundry setting 2018-11-27 17:25:15 +01:00
63c0427b55 Merge branch 'blender2.8' of https://git.blender.org/blender into npr_tess 2018-11-27 16:22:03 +01:00
54cf0461fc Merge branch 'blender2.8' into greasepencil-object 2018-11-26 17:47:37 +01:00
4b8d091c90 Reorganize Mask button and rename to Clamp
Now the Clamp is valid in Normal layers and the value is OFF by default.
2018-11-26 17:34:40 +01:00
a14da4a859 Use Stroke Alpha when mix Normal Layers 2018-11-26 16:17:58 +01:00
Nick Wu
a1a526e557 added example functions for accessing LANPR occlusion data 2018-11-26 21:47:11 +08:00
Nick Wu
e4d987d7fb Added temporary contour bypass for smooth contour modifier build. 2018-11-26 20:27:36 +08:00
Nick Wu
c94b494f20 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/blender/makesdna/DNA_scene_types.h
#	source/blender/makesrna/intern/rna_scene.c
#	source/tools
2018-11-26 20:15:13 +08:00
0669f08437 Rename Bled Layers to Layers Blending 2018-11-26 11:15:37 +01:00
ec07eeba1c Merge branch 'blender2.8' into greasepencil-object 2018-11-26 08:54:11 +01:00
1f9119a059 Fix multiply error when blend layer do not cover below layer 2018-11-25 20:12:04 +01:00
2104b22dad Merge branch 'blender2.8' into greasepencil-object 2018-11-25 19:35:53 +01:00
018d7039c4 Fix opacity problems when value is 0 2018-11-25 19:28:17 +01:00
6ce9e29296 Fix noise in blend layers
The antialiasing is generating noise in intermediate layers.
2018-11-25 19:04:24 +01:00
03d125b881 Fix problems with Mask button 2018-11-25 18:14:51 +01:00
f63633cc9d Fix ALT key for boundary fill strokes 2018-11-25 17:39:14 +01:00
dac044d03c Add Simplify Blend Layers option 2018-11-25 17:23:03 +01:00
5b7780920b Merge branch 'blender2.8' into greasepencil-object 2018-11-25 16:27:39 +01:00
fdb51ac280 Enable layer opacity in blend layers 2018-11-25 16:26:01 +01:00
3884d76645 Adjust Blend mode y Opacity to column 2018-11-25 16:12:14 +01:00
72cc5c291f Use multisample for nomal blend
The layers are multisampled before blend
2018-11-25 16:02:40 +01:00
c5acc7ae36 Hide Mask Icon in Layer list
By default is off and it's something that is using too much space
2018-11-25 14:17:04 +01:00
01d27d0b2b Use Box blur for Edges 2018-11-25 14:13:41 +01:00
6f66bcff3f Change tooltip 2018-11-25 14:13:31 +01:00
78c8a26322 Invert Mask flag to be ON by default 2018-11-25 09:44:25 +01:00
07d68ff0dc Fix problem when several objects 2018-11-24 13:39:55 +01:00
0d1e36cd18 Only show Mask icon for Blend layers 2018-11-24 13:15:45 +01:00
c4f5477dec Fix error when blend layers are consecutive 2018-11-24 12:44:40 +01:00
01a1b977dc GP: Reorganize Mask icons 2018-11-24 12:25:40 +01:00
3aa787a23a GP: New option to enable masking
Now the blend masking can be enabled or disabled
2018-11-24 12:02:37 +01:00
43237796a6 Merge branch 'blender2.8' into greasepencil-object 2018-11-24 10:12:38 +01:00
f2806a3b04 GP: Apply alpha to mix color 2018-11-23 20:18:04 +01:00
06c7d3ab28 Merge branch 'blender2.8' into greasepencil-object 2018-11-23 19:45:43 +01:00
1991bd5c65 GP: Exchange opacity and blend parameters in Panel 2018-11-23 19:22:49 +01:00
46567d982f GP: Disable opacity of Blend layers
The opacity parameter is not logic for blend layers because the opacity is determined by underlying layers.
2018-11-23 19:20:38 +01:00
fac51e039d Avoid error adding layer 2018-11-23 17:47:56 +01:00
d121071a0f GP: Cleanup unused variable 2018-11-23 17:01:38 +01:00
a8bcfe4c31 WIP: Support Blend layer
This new option for Layers allow to define the blend mode between layers to create effects and help with the painting of the frames.

Note: If use substract to open holes, you can get the transparent problem we already know and that it's pending to solve using OIT.
2018-11-23 16:53:41 +01:00
5ec6e95a75 Merge branch 'blender2.8' into greasepencil-object 2018-11-23 16:24:41 +01:00
e7d2f0e880 Add GP modifer to extract strokes 2018-11-23 00:16:07 +01:00
60d541c728 Add option to select contour verts 2018-11-22 23:05:26 +01:00
1c1ec90486 Merge branch 'blender2.8' into greasepencil-object 2018-11-20 20:17:01 +01:00
e39461d83b Merge branch 'blender2.8' into greasepencil-object 2018-11-20 19:12:53 +01:00
6083edbeea Merge branch 'blender2.8' into greasepencil-object 2018-11-20 16:35:13 +01:00
f32368591c Merge branch 'blender2.8' into greasepencil-object 2018-11-20 09:28:01 +01:00
ac197f50d5 Fix problem with onion in multiwindow mode 2018-11-19 20:09:18 +01:00
3798303749 Fix problem with storage index
The storage index was not updated and the object scale and other data were wrong
2018-11-19 19:47:27 +01:00
f1255ba320 Use Time Offset modifier to calc VBOs size
The active frame can be different if there is a time offset modifier.
2018-11-19 17:15:47 +01:00
ee58b97b44 GP: Small cleanup 2018-11-19 16:55:22 +01:00
9e38c89684 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_draw_utils.c
2018-11-19 16:30:04 +01:00
bdbbadab75 GP: Recalc VBOs size with modifiers
Some modifiers can change the total number of points.
2018-11-19 16:26:34 +01:00
461387051d GP: Alloc maximum size
The resize of the VBOs is very heavy for the CPU, so now the maximum size is allocated.
2018-11-19 11:37:30 +01:00
Nick Wu
3c7da86849 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/blender/makesdna/DNA_lamp_types.h
2018-11-19 12:51:52 +08:00
cb0934477e Change default VBO size for FILL 2018-11-18 20:36:34 +01:00
6357ac5409 Merge branch 'blender2.8' into greasepencil-object 2018-11-18 19:49:00 +01:00
371f53bd73 GP: Some fixes after merge 2018-11-18 17:06:41 +01:00
ca89a6b3a0 Merge branch 'blender2.8' into greasepencil-object 2018-11-18 16:39:31 +01:00
680f8039eb GP: Drawing Engine use only one batch
This is part of T57829.

Reduce the number of used batches to only one by shader type.  This reduces GPU overhead and increase a lot the FPS. As the number of batches is small, the time to allocate and free memory was reduced in 90% or more.

Also the code has been simplified and all batch management has been removed because this is not necessary. Now, all shading groups are created after all vertex buffer data for all strokes has been created using DRW_shgroup_call_range_add().

All batch cache data has been moved to the Object runtime struct and not as before where some parts (derived data) were saved inside GPD datablock.

For particles, now the code is faster and cleaner and gets better FPS.

Thanks to Clément Foucault for his help and advices to improve speed.
2018-11-17 17:52:19 +01:00
aef6f7d75e Merge branch 'blender2.8' into greasepencil-object 2018-11-17 09:58:15 +01:00
Nick Wu
13a654d0f3 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-11-14 11:34:27 +08:00
Nick Wu
821aa86d98 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/startup/bl_ui/properties_scene.py
2018-11-14 11:32:17 +08:00
3f1f1931e7 Update to new API changes 2018-11-12 14:57:52 +01:00
a2b31ed120 Merge branch 'blender2.8' into npr_tess 2018-11-12 13:20:58 +01:00
0277819b18 Fixed corner case with mult_face_search and shifted border verts 2018-11-09 19:17:08 +01:00
896dbf836b Fix strack smash for deg edges, move opti flip to own function 2018-11-08 00:45:59 +01:00
Nick Wu
fc650ae86a Make ui work under new api. 2018-11-07 22:37:14 +08:00
Nick Wu
b77c6a859e Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/blender/makesdna/DNA_scene_types.h
#	source/tools
2018-10-31 13:45:08 +08:00
4a90ddad76 Fix mixed indent 2018-10-29 20:25:29 +01:00
d18fa37cad Fix FB split face logic 2018-10-29 20:02:06 +01:00
Nick Wu
fc94e46f36 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-10-25 17:54:30 +08:00
Nick Wu
7a34d16d7a Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-10-21 14:16:32 +08:00
1c14aee5b1 Merge branch 'blender2.8' into greasepencil-object 2018-10-20 09:18:02 +02:00
Nick Wu
6a638e9555 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr, also fix errors in modifier code.
# Conflicts:
#	release/scripts/startup/bl_ui/properties_data_camera.py
#	release/scripts/startup/bl_ui/properties_data_speaker.py
#	release/scripts/startup/bl_ui/properties_render.py
#	release/scripts/startup/bl_ui/properties_scene.py
#	source/blender/makesrna/intern/rna_scene.c
2018-10-20 13:05:21 +08:00
270cd09afa Merge branch 'blender2.8' into greasepencil-object 2018-10-19 15:03:02 +02:00
8eff6c4223 GP: Fix problem with Onion Skin after last commit 2018-10-19 12:13:38 +02:00
c2aefb8ea4 GP: Redesign drawing cache to support particles
Full redesign of the cache system used for drawing strokes and handle derived frame data.

Before, the cache was saved in bGPdata and a hash was used to manage several objects with the same datablock.

Old design made the use of particles very inefficient and prone to bugs and segment faults, and especially when this was mixed with onion skinning and multiple objects using same datablock. Also, there were some conflicts with the depsgrah logic (the old design was done before despgraph was in place) that made the use of hash not working.

The new design saves the data in the object runtime struct and avoid the use of any hash to find the right data. This improves the speed and reduce a lot the complexity of the code, memory allocation, hash overload and adds full support for particles and reused datablocks.

The particles can reuse the modifiers and shader effects of the original grease pencil object.
2018-10-19 11:35:58 +02:00
e96f7ab0ed Merge branch 'blender2.8' into greasepencil-object 2018-10-19 11:11:31 +02:00
12d345af03 Made opti edge flip use actual face normals and fiddled a bit with cusps again 2018-10-16 17:04:38 +02:00
f8d633f3e7 Fix FB split uv bug and treat cusps more like in the paper 2018-10-08 19:50:43 +02:00
Nick Wu
0bc6e431cc Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/blender/makesrna/intern/rna_scene.c
2018-10-03 18:30:02 +08:00
Nick Wu
8ae40f4fcb Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
2018-09-19 22:24:36 +08:00
Nick Wu
74294b8686 Fix interface lock situation reported by DarkDefender. 2018-09-17 21:49:08 +08:00
Nick Wu
923f59a984 DPIX normal controlled line width 2018-09-16 15:35:41 +08:00
Nick Wu
843a57e3a5 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
2018-09-16 15:02:02 +08:00
Nick Wu
bef1fb79ee Vertical line hack: tip point threshod fix and a condition branch. 2018-09-16 15:00:57 +08:00
3a9e7bf92d Merge branch 'blender2.8' into greasepencil-object 2018-09-15 12:09:20 +02:00
Nick Wu
1bd6f3605d Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons_contrib
#	release/scripts/startup/bl_ui/properties_physics_cloth.py
#	source/tools
2018-09-15 11:03:29 +08:00
Nick Wu
85f6277e6c Possibly fixed shader errors, but don't know exactly what caused it. 2018-09-12 23:03:34 +08:00
Nick Wu
b3ed2a8751 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/tools
2018-09-12 22:27:01 +08:00
29cb9e057d Increased the amount of faces the inco check will search 2018-09-10 12:19:21 +02:00
c9961e4d0b Fix memleak when creating eval 2018-09-08 23:00:41 +02:00
d574014a91 Remove opti vert dissolve 2018-09-08 15:42:28 +02:00
cf3f8c46fd Merge branch 'blender2.8' into greasepencil-object 2018-09-08 11:14:47 +02:00
Nick Wu
4498126016 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/blender/draw/CMakeLists.txt
#	source/blender/makesrna/intern/rna_scene.c
2018-09-07 23:13:23 +08:00
Nick Wu
c44e716f9c Fixed still frame render cache out of date error. 2018-09-07 22:16:21 +08:00
9a51f1567b Merge branch 'blender2.8' into greasepencil-object 2018-09-07 09:21:29 +02:00
Nick Wu
dacceb573f Fixed vertical line missed calculations. 2018-09-06 13:39:55 +08:00
Nick Wu
fceb384ad1 Partly fixed "Absolute horizontal/vertical" situations. 2018-09-06 12:01:26 +08:00
Nick Wu
b6b0d986bb Fixed contour priority. Fixed software mode line type shader. 2018-09-06 10:49:22 +08:00
Nick Wu
3ab0ae97cd Merge branch 'soc-2018-npr' of git.blender.org:blender into soc-2018-npr 2018-09-06 09:54:20 +08:00
Nick Wu
7f4daea0c0 Fixed line width incorrect variations under different aspect ratios. commented weird code in culling. 2018-09-06 09:53:10 +08:00
Nick Wu
cdad75303a Fixed line width incorrect variations under different aspect ratios. 2018-09-06 09:48:04 +08:00
Nick Wu
eeeee3b10a Fixed software mode ortho condition errors in culling. Now working. 2018-09-06 09:25:22 +08:00
Nick Wu
592b2bd5e4 Fixed DPIX ortho view. 2018-09-06 09:01:50 +08:00
Nick Wu
4df5506b22 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/blender/makesdna/DNA_scene_types.h
2018-09-06 08:30:31 +08:00
57cf101dbd Merge branch 'blender2.8' into greasepencil-object 2018-09-04 17:35:12 +02:00
Nick Wu
de2c47cbf1 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/blender/makesdna/DNA_scene_types.h
2018-09-04 21:52:48 +08:00
Nick Wu
f0eca87df6 Fixed collection header name 2018-09-04 12:56:46 +08:00
b216e9e81b Merge branch 'blender2.8' into greasepencil-object 2018-09-03 08:29:24 +02:00
Nick Wu
3fc578d7cb Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	source/blender/CMakeLists.txt
2018-09-01 11:03:10 +08:00
Nick Wu
ef234a2e61 Software crease threshold follow DPIX's 2018-08-31 21:48:19 +08:00
ed9a4cb95f Merge branch 'blender2.8' into greasepencil-object 2018-08-31 10:11:54 +02:00
290d366b61 Merge branch 'blender2.8' into greasepencil-object 2018-08-30 15:57:34 +02:00
5d168135e8 Merge branch 'blender2.8' into greasepencil-object 2018-08-30 12:26:25 +02:00
ed47fc02e1 Merge branch 'blender2.8' into greasepencil-object 2018-08-30 11:22:23 +02:00
01823ea736 Merge branch 'blender2.8' into greasepencil-object 2018-08-30 10:21:15 +02:00
f558b43373 Merge branch 'blender2.8' into greasepencil-object 2018-08-29 20:29:21 +02:00
Nick Wu
552d256cfd Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr 2018-08-29 19:08:14 +08:00
4ab09aad67 Update tess mod UI split code to upstream changes 2018-08-29 13:07:31 +02:00
f4b65dd63c Merge branch 'blender2.8' into npr_tess 2018-08-29 12:58:16 +02:00
Nick Wu
e9d3c2e8fb Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr 2018-08-29 18:42:08 +08:00
7ef8404f4e Always use get_facing function when possible 2018-08-29 12:29:09 +02:00
b1d1ea8f8b Only check for FF/BB split on edges that are somewhat close to a zero crossing 2018-08-29 12:06:25 +02:00
7b32c913c1 Change how opti marks inco faces initially 2018-08-29 11:02:16 +02:00
2f1f4b5115 Cleanup code 2018-08-29 10:54:15 +02:00
dce768b263 Rename all armature modifiers
Now it's possible add several armature modifiers, so need rename all of them, not only first one.
2018-08-29 10:39:48 +02:00
6bf998a893 Merge branch 'blender2.8' into greasepencil-object 2018-08-29 10:18:47 +02:00
eb5efaa558 Merge branch 'blender2.8' into greasepencil-object 2018-08-28 21:57:16 +02:00
c16126246b Fix some errors in Simplify and Subdivide 2018-08-28 21:51:46 +02:00
2098adf2ea Fix several things 2018-08-28 17:03:47 +02:00
f8bd98194f Merge branch 'blender2.8' into greasepencil-object 2018-08-28 16:29:13 +02:00
7790545475 Cleanup: fix merge small mistake 2018-08-28 13:29:55 +02:00
792f92e983 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_paint.c
2018-08-28 13:18:34 +02:00
Nick Wu
1e70595e05 Fixed file data blocks linking error. 2018-08-28 18:52:40 +08:00
73de6c2725 Use default armature of Modifier
By default try to use the armature of first modifier, but allows to select different armatures.

This is required for special configurations with several armature modifiers.
2018-08-28 12:35:26 +02:00
Nick Wu
bcc3003cb4 Fixed chained line type display control 2018-08-28 18:23:58 +08:00
c3f2a5e0fc New parameter to select armature in Automatic Weights op.
Before, the operator always used the armature of the modifier, but now it's possible to have several modifiers, so it needs a parameter to select the armature.
2018-08-28 12:15:36 +02:00
Nick Wu
775df5a1d5 Fix directional object matrix error 2018-08-28 18:10:18 +08:00
Nick Wu
8072b68387 Directional light control object ok, fixing file rw 2018-08-28 17:34:12 +08:00
Nick Wu
f33c3d157c Fixed dropdown list reference lost issue. 2018-08-28 16:07:17 +08:00
Nick Wu
6b005517db Normal controlled normal thickness for software is ok. No direction and position variation. 2018-08-28 15:48:36 +08:00
613c920275 Merge branch 'blender2.8' into greasepencil-object 2018-08-28 09:31:03 +02:00
Nick Wu
0b758fd994 Software normal control thickness for non-chain situation 2018-08-28 14:13:57 +08:00
Nick Wu
db66c3a9a2 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/tools
2018-08-28 12:46:50 +08:00
c5924b3a64 Merge branch 'blender2.8' into greasepencil-object 2018-08-27 22:32:30 +02:00
6f4d709ad2 Fix vertex group functions after merge
The custom api has been replaced by standard functions.
2018-08-27 16:51:37 +02:00
9cdbe5b129 Merge branch 'blender2.8' into greasepencil-object 2018-08-27 16:32:54 +02:00
ccda31aa48 Redo Armature modifier using standard modules
Now the armature modifier is using the same functions used in Mesh and Lattice armatures and share the same parameters.

This makes the code easy to maintain.
2018-08-26 19:39:56 +02:00
714a133083 Merge branch 'blender2.8' into greasepencil-object 2018-08-26 17:27:13 +02:00
45edce5fa9 More fixes after merge 2018-08-26 17:12:32 +02:00
f94384afc6 Changes after merge and some cleanup
Added some initialization code and fixed some isues after merge.
2018-08-26 17:06:43 +02:00
e52b914782 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/gpencil_modifier.c
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/gpencil/gpencil_fill.c
	source/blender/editors/gpencil/gpencil_paint.c
2018-08-26 16:49:26 +02:00
Nick Wu
fba6d68915 Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr 2018-08-26 20:13:30 +08:00
Nick Wu
5d21c3089d Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-08-26 10:28:55 +08:00
8ecb34982e Allow wiggling of radial verts 2018-08-25 21:04:21 +02:00
80b44aaa26 Change name of 'is_C_vert' func to something more descriptive 2018-08-24 21:05:29 +02:00
925333e51d Merge branch 'blender2.8' into greasepencil-object 2018-08-24 10:18:44 +02:00
f79e734ff3 Merge branch 'blender2.8' into greasepencil-object 2018-08-23 16:15:23 +02:00
Nick Wu
8e58b88ea4 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/tools
2018-08-23 18:55:32 +08:00
Nick Wu
4b763f4cb2 Fixing perpective flag 2018-08-23 18:53:37 +08:00
b4f9b25107 Merge branch 'blender2.8' into greasepencil-object 2018-08-23 10:18:19 +02:00
462c69d288 Rename function and fix wrong pointer increment
The change done in previous cleanup broken the function.
2018-08-23 10:15:19 +02:00
5262e21c6c Cleanup style 2018-08-23 10:15:13 +02:00
7fc1d6cf96 Cleanup: Unused variable 2018-08-23 10:15:08 +02:00
39344493e3 Add Force Fill Data parameter
Add a general parameter to force the recalc of the triangulation data because some modifiers could change the geometry and the filling triangles would not be right.

Now, the parameter is visible in UI panel because this option reduces FPS, but maybe in the future we can keep always ON and remove the parameter.
2018-08-23 10:15:02 +02:00
ee212fd204 UI: Change text of force recalc 2018-08-23 10:14:56 +02:00
b91deea4dc Change calculation of automatic weights
There were several mistakes and now is using standard routines.
2018-08-23 10:14:48 +02:00
62f67b8bef Implement Parent with Empty and Automatic weights
This is an alternative way of define weights.
2018-08-23 10:14:43 +02:00
f92e13a4eb Enable Fade geometry in Pose mode
Now the grease pencil geometry is fade when the alpha value is enabled.
2018-08-23 10:14:38 +02:00
948e1de325 Rename parent layer when change bone name 2018-08-23 10:14:32 +02:00
7088c211a5 Rename bone if Armature modifier 2018-08-23 10:14:27 +02:00
b425c0a302 Add weight data when drawing 2018-08-23 10:14:21 +02:00
cdad9b4960 Keep weight when simplify with RDP 2018-08-23 10:14:15 +02:00
fbc2a8a604 Interpolate weights when subdivide 2018-08-23 10:14:10 +02:00
ec58cb0429 Manage weights in simplify operator and modifier 2018-08-23 10:14:04 +02:00
c91aaf5891 More changes to subdivide modifier 2018-08-23 10:13:58 +02:00
8ddbcd67f4 Add weights to subdivide points 2018-08-23 10:13:51 +02:00
9d3cea5e54 Improvements in automatic weight calculation 2018-08-20 11:22:25 +02:00
ad5dc176a7 New parameter to force Fill cache recalc
This is needed for extreme deformations
2018-08-19 20:50:32 +02:00
dfdf4514a5 New operator to generate automatic weights 2018-08-19 17:22:35 +02:00
643afc347b WIP: Operator to create vertex groups
Only works with the Empty mode.
2018-08-19 13:04:21 +02:00
89e8ccaacf Cleanup unused function 2018-08-19 11:41:14 +02:00
d634916624 Cleanup code and comments 2018-08-18 22:47:27 +02:00
b5301a185c Limit Armature modifier to only one instance 2018-08-18 22:32:00 +02:00
e9e1e8f6dc More cleanup 2018-08-18 20:17:26 +02:00
9d937032b9 Code cleanup: remove unused code 2018-08-18 19:22:17 +02:00
e4082db577 Put text to review 2018-08-18 18:43:03 +02:00
c3ba8910a1 WIP: Add basic functions to deform 2018-08-18 18:08:22 +02:00
31a1135829 Merge branch 'blender2.8' into greasepencil-experimental 2018-08-18 17:37:26 +02:00
96d9b20aa2 Put in place all pieces for Armature modifier
The modifier doesn't do anything yet.
2018-08-18 17:36:54 +02:00
Nick Wu
4594287191 Fixed some matrix fuction naming format 2018-08-18 17:51:13 +08:00
Nick Wu
4af59419fc Software mode FOV adapted. 2018-08-18 17:39:09 +08:00
Nick Wu
1f5b23318b Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons_contrib
#	release/scripts/startup/bl_ui/properties_physics_field.py
#	source/blender/makesdna/DNA_scene_types.h
#	source/tools
2018-08-18 14:04:38 +08:00
Dalai Felinto
57b5a4e805 Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object
Hard-core resetting the files to origin/blender2.8
2018-08-17 12:54:18 -03:00
Nick Wu
d40a1bc3cc Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr
# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/blender/editors/space_outliner/outliner_draw.c
#	source/blender/makesdna/DNA_scene_types.h
#	source/blender/modifiers/intern/MOD_mybmesh.c
#	source/tools
2018-08-16 15:37:02 +08:00
51ead449f7 Add sanity check in mult_face_search 2018-08-15 19:03:28 +02:00
ae4185f96f Merge with upstream changes 2018-08-15 18:09:17 +02:00
4c77b378a5 More opti step tweaks 2018-08-15 17:17:11 +02:00
c9831644e6 Make shift fold check and radial insert check more robust 2018-08-14 21:16:21 +02:00
e49f7e6b64 Add sanity check for radial insert face selection 2018-08-14 19:40:44 +02:00
d8a9fd7810 Do not shift cusp edges as they might lead to CCC triangles 2018-08-14 19:23:03 +02:00
3607e52a6b Remove fold check from opti wigg/split and fix new vert idx bug 2018-08-14 17:48:10 +02:00
Nick Wu
7aa1c544f7 Fix opensubdiv error when not enabled WITH_OPENSUBDIV 2018-08-14 16:20:19 +08:00
Nick Wu
dc03876c7b Fixed engine compatible panel for camera and speaker data. 2018-08-14 13:44:04 +08:00
Nick Wu
0b75e68500 Fixed lanpr field always NULL error. (caused by depsgraph scene copy) 2018-08-14 13:39:44 +08:00
dee286cdb9 Update new vert data if they are shifted 2018-08-13 17:30:07 +02:00
5ef6bcd645 Convert to opti wigg and edge slit to use st coords 2018-08-13 16:11:21 +02:00
b0489b96f7 Convert mult_face_search to use st space for better accuracy 2018-08-13 15:31:04 +02:00
7b1875b442 Make radial insert and exten work in 2d space (better accuracy) 2018-08-13 14:27:27 +02:00
1ef4dc3265 Fix broken normal calculation of flipped faces 2018-08-12 15:34:05 +02:00
23501383bb Add new heuristic in opti step 2018-08-11 18:58:28 +02:00
1a59bc7ecf Modify opti edge split and vertex wigg so they can move new verts 2018-08-11 17:19:53 +02:00
Nick Wu
cefcf402cb Fixed taper on software side 2018-08-10 17:13:57 +08:00
Nick Wu
18cc07076d Fixed taper on software side, merged tess modifier's osd adapter. 2018-08-10 17:13:09 +08:00
6d9f748e5a Merge branch 'blender2.8' into npr_tess and update to new blender OSD API 2018-08-10 10:43:59 +02:00
Nick Wu
251dbabdf1 Fixed enum in modifier IDs (npr tess modifier and a merged new one) 2018-08-10 16:18:31 +08:00
Nick Wu
2d01210ea7 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/datafiles/locale
#	release/scripts/addons_contrib
#	source/blender/editors/mesh/editmesh_tools.c
#	source/blender/editors/space_outliner/outliner_draw.c
#	source/blender/makesdna/DNA_modifier_types.h
#	source/blender/makesrna/intern/rna_modifier.c
#	source/blender/modifiers/MOD_modifiertypes.h
#	source/blender/modifiers/intern/MOD_util.c
#	source/tools
2018-08-10 15:56:46 +08:00
Nick Wu
83c85c9c98 Fixed shader variable naming style issue. 2018-08-10 15:51:08 +08:00
Nick Wu
89e9c1405c Python panel engine adaptations 2018-08-10 15:36:02 +08:00
874b1a38af Tweak how potential folds are detected in opti wigg 2018-08-09 23:24:39 +02:00
2c61729764 More work on radi insertion 2018-08-09 22:38:21 +02:00
0b8e41098c Rewrite mult_radi 2018-08-09 20:51:46 +02:00
Nick Wu
4d7d0b60d1 Modified UI for background color display and line layer on DPIX. Added console warning for software rendering. 2018-08-09 15:41:30 +08:00
80ff0dd03c Change cusp edge shift criteria 2018-08-08 17:23:43 +02:00
7b038b6a06 Added check if radial insertion flip will create a fold 2018-08-08 16:10:25 +02:00
Nick Wu
ca07177f5b Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr 2018-08-08 21:55:54 +08:00
bfae9afeb3 Fix faulty opti radi extend logic 2018-08-08 10:17:23 +02:00
0717bdea66 Fix some gcc warnings 2018-08-07 20:48:09 +02:00
189de98ac1 Added a very basic cache system 2018-08-07 19:30:07 +02:00
Nick Wu
d9b0c6711e Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-08-07 19:57:07 +08:00
cb1d57f0f7 Added a multithreaded variant of split ff bb 2018-08-06 23:57:43 +02:00
ba0a4372ca Comment spammy debug prints 2018-08-05 23:12:35 +02:00
33abe49d38 Fixed opti edge flip not nulling corrected face and add sanity opti checks 2018-08-05 22:20:09 +02:00
Nick Wu
80e3a97744 Adapted shader APIs to DRW_ 2018-08-04 09:53:03 +08:00
Nick Wu
356dc7892b Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-08-04 09:34:15 +08:00
71fbf963af Simplyified mutl_face_search (should now be more robust too) 2018-08-03 20:26:59 +02:00
3daac4d4cc More work on opti edge split 2018-08-02 18:53:12 +02:00
Nick Wu
44f0f14232 Fixed software triangle and render line culling bug. (crappy, but works correctly) 2018-08-01 23:21:20 +08:00
Nick Wu
d2f77ce653 Uncrustify processed. 2018-08-01 20:29:17 +08:00
Nick Wu
7866c2fb05 potentially fixed drawing command conflict error in F12 2018-08-01 18:50:08 +08:00
Nick Wu
64c2578228 Fixed software rendering intersection cache update 2018-08-01 16:19:34 +08:00
Nick Wu
9b06c78676 Adapted multisample functions. 2018-08-01 12:08:05 +08:00
Nick Wu
3b36c698cd Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	release/scripts/startup/bl_ui/properties_scene.py
#	source/blender/draw/CMakeLists.txt
#	source/blender/editors/space_outliner/outliner_draw.c
2018-08-01 10:15:47 +08:00
48c96f6f01 Merge branch 'blender2.8' into greasepencil-object 2018-07-31 09:54:05 +02:00
be27284b76 Only align to view by default Monkey GP object
The blank grease pencil object must be aligned to axis by default.
2018-07-31 08:57:55 +02:00
2e4527f3ca Add a warning in annotations if active object is GP
Now the annotations is not working with grease pencil object selected and we need inform the user.

We need find a better solution for this, but at least we have a notification and not something that looks a bug, but a not supported function.
2018-07-30 22:21:13 +02:00
64fff35c2e Merge branch 'blender2.8' into greasepencil-object 2018-07-30 20:18:06 +02:00
ae2e2386ac New grease pencil transform icons
Designed by Matias Mendiola
2018-07-30 20:16:23 +02:00
Nick Wu
002712d04c Merge branch 'soc-2018-npr' of git.blender.org:blender into soc-2018-npr
# Conflicts:
#	release/scripts/startup/bl_ui/properties_scene.py
2018-07-30 23:20:28 +08:00
Nick Wu
927c7aae0d Added init code for default LANPR values. Fixed render and scene panels to accept LANPR engine. 2018-07-30 23:19:17 +08:00
1e45155e7a Change icon names to define custom grease pencil icons
The standard icons for these operators don't fit in the grease pencil use and it's better to have icons more designed for grease pencil strokes.
2018-07-30 16:30:43 +02:00
480abbe839 Fix: Ensure that LANPR panel is only enabled when that engine is enabled
- Fixed incorrect COMPAT_ENGINES define

- Removed poll() callback that was preventing the COMPAT_ENGINES
  set from working

- Have panel opened by default (since it doesn't need to stay collapsed
  when other engines are active anymore)
2018-07-31 02:05:13 +12:00
91a4d28a1c Example commit for fixing panel visibility when LANPR is enabled
Following the examples here (for the Scene/KeyingSet settings),
all general non-engine-specific panels should include "BLENDER_LANPR"
in the COMPAT_ENGINES set.
2018-07-31 02:03:47 +12:00
277a7a527f Automatically refresh viewport when changing LANPR settings
Use the messagebus struct-subscription methods here (as used for EEVEE settings)
so that changing rendering methods or other settings immediately refreshes
the viewport instead of requiring the user to click on the viewport to force
a redraw.
2018-07-31 01:51:31 +12:00
4c088075f0 Fix compiler warnings (use 0 in enums for no icon, not NULL) + whitespace (mixed tabs/spaces) 2018-07-31 01:44:54 +12:00
ff471c95fc Compile Fix: Branch now compiles when WITH_OPENSUBDIV is disabled 2018-07-31 00:54:51 +12:00
9ce69d83d1 Adjusted vertex wig and edge flip opti 2018-07-30 14:39:58 +02:00
1c04f26efd Fix missing parameter after merge 2018-07-30 14:39:23 +02:00
8303df3b4e Merge branch 'blender2.8' into greasepencil-object 2018-07-30 14:25:44 +02:00
28c08117ef UI: Hide Opacity and Thickness in Annotations panel
We hide these parameters while we decide if they are required or not, but now it's better keep hidden.
2018-07-30 13:48:34 +02:00
0ad8b25cca Merge branch 'blender2.8' into greasepencil-object 2018-07-30 12:55:18 +02:00
Nick Wu
67d1949c5b Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
2018-07-30 18:27:46 +08:00
Nick Wu
63921c65e9 changed most of the list API into BLI_'s. Removed many unused functions 2018-07-30 18:26:39 +08:00
56f3473b85 Cleanup: remove unused code 2018-07-30 10:51:21 +02:00
76c3335c9d Cleanup: use __func__ for mallocN identifier 2018-07-30 18:47:16 +10:00
8aa1af5bc2 Cleanup: unused warnings, right shift 2018-07-30 18:31:13 +10:00
4e09b80fb0 UI: Changes in some text in Overlay panel 2018-07-29 20:48:28 +02:00
c00ec472ef Cleanup: Fix typo error 2018-07-29 17:33:27 +02:00
e0ae593a7c Set default values for Grid and Fade 2018-07-29 17:30:10 +02:00
9399ae1697 Change Grid to work as 3D Grid
Now the scale is the size and the subdivisions the number of cuts inside this "bounding box"
2018-07-29 17:21:38 +02:00
5ec0745e49 Fix first edit mode change with TAB key
The operator assumed the object editable was using always OB_MODE_EDIT, but for grease pencil the mode must be OB_MODE_GPENCIL_EDIT
2018-07-29 16:13:19 +02:00
aa503b5913 UI: Use slider type for grid opacity and fade factor 2018-07-29 15:51:50 +02:00
bfd27bfcc7 Fix TAB key to toggle Edit mode
This key was removed by error in the past.
2018-07-29 12:43:04 +02:00
5ef8b72d15 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/addons
2018-07-29 12:24:34 +02:00
a4023605dc Change number of subdivision to avoid int division problem in Grid
Before, if you selected 5 subdivisions, the number of boxes in the grid was 5/2= 2, so the odds values were not working.

Now, the subdivisions means the number of boxes in each side of the symmetry line 5= (5 Right side + 5 Left side) = 5 * 2 = 10 Boxes.
2018-07-29 12:22:43 +02:00
44bb85b919 UI: Reorder Grid parameters 2018-07-29 12:02:17 +02:00
1545203d86 Update Grid when change lock axis 2018-07-29 11:48:59 +02:00
94c459147e Enable grid when play animation 2018-07-28 20:42:07 +02:00
2198cd5067 Cleanup: Move view settings to overlay struct 2018-07-28 20:41:04 +02:00
bdeceba5f6 Add Lock to axis and opacity control to grid
Now, the grid axis can be automatically set to the current lock axis
2018-07-28 17:58:27 +02:00
e33a16317d Minor changes to grid
- Use half number of lines in loop to be equal UI parameter
- Cleanup typo errors
- Change default number of lines
2018-07-28 16:43:49 +02:00
d157584f59 Enable grid in different axis
Before only Y axis was supported.
2018-07-28 16:29:49 +02:00
ff683fc86b Merge branch 'blender2.8' into greasepencil-object 2018-07-28 12:08:06 +02:00
e920e1335d Full refactor of Grease Pencil grid
After testing the old grid locked to view, the artist found that old system was not usable and they requested a grid locked to grease pencil object.

Also fixed some problems with fade object
2018-07-28 12:02:29 +02:00
d977db77cd UI: Change old Grease Pencil Paper and remove color
Now, the color is always white. We still keep internally the color field because maybe we reuse it in the future.
2018-07-27 21:13:48 +02:00
3dbbaf15be Initial work on edge wiggle rewrite 2018-07-27 17:27:44 +02:00
eacc4ae316 Separate Paper and Grid and rename 2018-07-27 16:58:51 +02:00
6c68bea576 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/makesdna/DNA_view3d_types.h
2018-07-27 16:39:36 +02:00
d9e7a9ad5f Fix snap operator
There was a problem updating the scene due depsgraph missing tags
2018-07-27 16:27:55 +02:00
e4da722dd7 UI: Move draw on back button after lock options 2018-07-27 16:13:33 +02:00
5d060c3fb9 UI: Remove menu icons 2018-07-27 16:06:39 +02:00
65bc541f5d Implement Presets for Brush options
This is the first step to create a set of predefined settings.
2018-07-27 16:04:57 +02:00
6c8485ceec UI: Add additive drawing option to top header
This option was a menu option and must be a switch.
2018-07-27 13:13:42 +02:00
Nick Wu
9218730b2b DPIX and Snake's F12 is working now. 2018-07-27 18:17:18 +08:00
a6263a3c02 Merge branch 'blender2.8' into greasepencil-object 2018-07-27 12:16:07 +02:00
5d3082aa61 UI: Move lock options to Left Top Header
These options were not tool parameters but a general option, so we move to the same UI location used in mesh sculpt.
2018-07-27 12:15:21 +02:00
d7c410971f UI: More changes in menus 2018-07-27 12:03:22 +02:00
bb69ff8943 UI: Replace Weight Paint menus
Also some preparation for other modes
2018-07-27 12:03:22 +02:00
12ed26444e Fix: Forgot to rename a few properties in earlier RNA/DNA commit 2018-07-27 21:24:08 +12:00
Nick Wu
e941813e3c Debugging small problem in threads, in lanpr_triangle_line_imagespace_intersection_v2() 2018-07-27 15:53:13 +08:00
81b971b154 Fix: Refresh issues in Topbar with Grease Pencil and Annotations 2018-07-27 16:44:38 +12:00
a2dcac0a02 Cleanup: Remove unused code 2018-07-27 16:29:11 +12:00
aa8b7f4368 RNA/DNA changes to further decouple Grease Pencil and Annotation settings where clashes occurred
* Decouple stroke placement settings for 3D view
* Ensure that proper thickness controls are used in the topbar
2018-07-27 16:29:11 +12:00
f4f5c1152c Fix: Don't show GP Object's layer data in the Annotation topbar settings 2018-07-27 16:29:10 +12:00
Nick Wu
4ef26d98d3 Fixed intersection calculation memory leak, fixed snake UI error, added F12 supporting functions. 2018-07-27 11:41:16 +08:00
0300f6ee03 Merge branch 'blender2.8' into greasepencil-object 2018-07-26 22:28:38 +02:00
c581207556 Merge branch 'blender2.8' into greasepencil-object 2018-07-26 08:26:41 +02:00
Nick Wu
68374d3838 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-07-26 10:09:40 +08:00
7e0de88ce2 Merge branch 'blender2.8' into greasepencil-object 2018-07-25 20:39:12 +02:00
Nick Wu
d250cd950b Typo fix finalColor 2018-07-25 22:49:14 +08:00
Nick Wu
dd5fcd4d0f Fix camera access error, added report to no camera situation. 2018-07-25 22:25:18 +08:00
Nick Wu
3353221166 Fix code for strict compile. 2018-07-25 22:15:18 +08:00
0383854870 UI: Remove transform orientation options in Sculpt mode 2018-07-25 16:01:18 +02:00
ddd32b09ec UI: Hide snap options in Paint, Sculpt and Weight mode 2018-07-25 15:57:06 +02:00
0eb95d6ebc UI: Remove duplicated menu items
Some options were duplicated by error in previous commit.
2018-07-25 15:34:25 +02:00
b2d0bdf878 Merge branch 'blender2.8' into greasepencil-object 2018-07-25 13:21:39 +02:00
5417c39564 UI: Move Shapes panel to Header 2018-07-25 13:20:44 +02:00
6ef94c6407 UI: Remove more old Toolbar panels
The options has been moved to header or menu
2018-07-25 12:47:57 +02:00
bdf4967db7 UI: First changes in Edit Toolbar
- Add transform tools
- Move Bend, Mirror, Shear and ToSphere as Tools
2018-07-25 11:53:58 +02:00
Nick Wu
ea8f7878f6 Added debug shaders to find problems in f12 2018-07-25 16:43:30 +08:00
Nick Wu
88448dba15 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-07-25 13:43:14 +08:00
9afed02356 Annotation Eraser: Only erase the point within the cursor, not the whole segment 2018-07-25 16:46:43 +12:00
171e231a8a Fix: Crash in non-3d editors when using Annotations
The wrong shader was being used after removing the per-point
varying colors.
2018-07-25 16:39:56 +12:00
f806dd9bfc Merge branch 'blender2.8' into greasepencil-object 2018-07-24 22:16:26 +02:00
f0eaacc343 Change order of modes to reorder Pie menu
The Draw now is on N option and not in NW. In this way is easier change the most common modes (N, S, E, W)
2018-07-24 18:17:32 +02:00
d5c7fd54fd T55445: Add custom properties panel to materials 2018-07-24 16:45:54 +02:00
705b0631b3 UI: Harmonize Toolbar parameters
Some parameters have been moved to toolbar and removed from header.
2018-07-24 12:54:01 +02:00
bb66837116 Back opacity to annotations
This parameter is usefull to reduce visibility of annotations and was removed by error in a previous commit.
2018-07-24 11:30:26 +02:00
Nick Wu
7fa715cfb7 Modified UI for chaining. 2018-07-24 16:57:29 +08:00
2439ca1529 Merge branch 'blender2.8' into greasepencil-object 2018-07-24 10:57:16 +02:00
bd3f7816f9 UI: Improve Toolbar icons (group)
Now it's possible group new brushes
2018-07-24 10:53:53 +02:00
Nick Wu
483d5d7c93 Fixed c function and glsl file names. 2018-07-24 15:30:06 +08:00
a54c30da76 Hacky fix for Mode Switch Pie Menu overflowing to a submenu on GP Objects
With the introduction of the GP editing modes to the object/workspace
modes enum, this introduced a number of issues for the Ctrl-Tab mode
switching pie menu, e.g.
 * To access any of the GP Editing modes, you had to first navigate to
   the "More" sub-pie, before being able to see these values. In practice,
   this was tricky to use, and not ideal.
 * Particle Editing mode was also moved into a sub-pie by itself

This was due to the following reasons:
 1) Pie Menus for Enums use the "static" enum define to determine
    where items should go.  This was done to ensure spatial consistency
    of items (e.g. Edit is always in the "east" position).
 2) Each pie menu layout is only allowed to contain 8 items.
    (i.e. so that movements can be less precise, corresponding to the
    main compass directions only)
 3) The nature of the modes menu means that there is never any situation
    where all menu items need to be visible at the same time. Usually,
    there are only between 2-5 items in that menu at a time, and at least
    6 of the items are only valid for a single object type each.

Several other solutions were tried, but this hack is the simplest fix.
2018-07-24 17:47:28 +12:00
c8cf0e10e0 Annotations: Show "Stroke Placement" options in the topbar again
We may have to introduce a dedicated setting here for use with the
annotation tools, since the GP Object version is quite different now.
2018-07-24 17:25:54 +12:00
dc215a5851 Annotation Tools: Use different cursors to indicate that the tools are running 2018-07-24 17:25:54 +12:00
091db5fb96 Assorted Cleanup/Fixes 2018-07-24 17:25:53 +12:00
846f5d8f74 Annotations: Dynamically updating layer-color preview icons + "Active Note" enum
This adds a new enum with dynamically-generated icons to show previews
for the icons associated with each GP layer used for annotations. This
enum is used as part of the UI for annotations (specifically, in the
topbar settings for the active  tool), making it easier for users to
see what color strokes drawn using the active note/layer will look like.

I ended up needing to create a new icon type in BKE_icons.h so that
we can store references to the layer/color used.

Known issues:
* The icon seems a bit too big, and would look a bit nicer with
  rounded corners. But there are too many issues with the UI roundbox
  functions (e.g. _aa() makes colors too dark, and non-aa versions look
  too rough).

* Changing layer colors doesn't redraw the icons. A manual refresh
  (by mousing over the widget) is needed.
2018-07-24 17:25:53 +12:00
1b47790111 Cleanup: Whitespace 2018-07-24 17:25:51 +12:00
d62a48411d Cleanup: Remove need to set colors on each and every annotation point when drawing 2018-07-24 17:25:51 +12:00
Nick Wu
3f7d07ac97 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-07-24 10:12:03 +08:00
d3c463b6f5 Fix duplicate Brush in tool bar 2018-07-23 21:17:50 +02:00
8ad523b885 Merge branch 'blender2.8' into greasepencil-object 2018-07-23 20:28:04 +02:00
0050fc1cb5 UI: Improve brush toolbar
This is a temp solution to show all brushes and sort by use, not alphabetical.

This will be replace when new tool bar system is in place.
2018-07-23 20:27:20 +02:00
0b99dc1b25 Fix duplication error for Brushes
This produced an error when create a new brush and a memory leak when closed Blender.
2018-07-23 17:06:54 +02:00
Nick Wu
e406c67842 Provide a switch to enable chaining or not. 2018-07-23 22:33:59 +08:00
c013752625 Merge branch 'blender2.8' into greasepencil-object 2018-07-23 15:47:50 +02:00
Nick Wu
1ddd3d60bf Chain support line types and levels.
Still bugs in chaining, hard to find, but results good enough in most of the conditions.
2018-07-23 17:57:34 +08:00
610013da70 Clenup: Remove old unused code 2018-07-23 10:13:41 +02:00
5927e4cba4 Merge branch 'blender2.8' into greasepencil-object 2018-07-23 09:53:01 +02:00
Nick Wu
9f344c6b88 Merge and changed GWN APIs into GPU ones. 2018-07-23 11:34:30 +08:00
Nick Wu
aa6563d3a9 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	release/scripts/startup/bl_ui/space_view3d.py
#	source/blender/draw/intern/draw_manager.c
2018-07-23 10:55:48 +08:00
353c5a1c79 Merge branch 'blender2.8' into greasepencil-object 2018-07-22 12:15:31 +02:00
7201126e84 Merge branch 'blender2.8' into greasepencil-object 2018-07-21 14:21:17 +02:00
e0fc790da2 Merge branch 'blender2.8' into greasepencil-object 2018-07-21 14:14:05 +02:00
2d3a3d2241 Revert temp fix for materials preview 2018-07-20 22:30:22 +02:00
a7765d3511 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/render/render_preview.c
2018-07-20 22:19:59 +02:00
e2204f3fc5 Merge branch 'blender2.8' into greasepencil-object 2018-07-20 19:44:05 +02:00
768cb61181 Fix segment fault with material previews
This fix solves the issue with multiple previews at the same time. Maybe there wll be a more general solutions in render preview module, but we need keep the system running.
2018-07-20 19:43:15 +02:00
Nick Wu
67fa286f11 Fix render triangle size increment error. 2018-07-20 23:27:28 +08:00
Nick Wu
227c259873 Fix fileread error again. 2018-07-20 22:41:39 +08:00
Nick Wu
b3cea139a8 Fix taper on segment_count==1 situation 2018-07-20 22:26:32 +08:00
Nick Wu
efe7257a20 Fix detail reducing bugs 2018-07-20 22:14:02 +08:00
Nick Wu
b421eaa36d Chain first level preview ok. Simplification have bugs. 2018-07-20 21:06:36 +08:00
b7d2a47c06 Merge branch 'blender2.8' into greasepencil-object 2018-07-20 13:33:52 +02:00
ea0668e387 Remove unedeed flag in notifier 2018-07-20 11:53:52 +02:00
46f79f3f75 New version of Toolbar Icons 2018-07-20 09:09:22 +02:00
4eb3b3ce90 Fix Paint mode icons 2018-07-19 21:21:00 +02:00
c656a6dd6a Merge branch 'blender2.8' into greasepencil-object 2018-07-19 20:54:39 +02:00
9bacd9e3c9 Fisrt try of new Toolbar icons (WIP)
Designed by Matias Mendiola

Still problems with Paint Toolbar
2018-07-19 20:53:42 +02:00
Nick Wu
aceecd1749 Intersection chain now ok. (occlude level debug wait until tomorrow) 2018-07-19 23:44:30 +08:00
371b127043 Merge branch 'blender2.8' into greasepencil-object 2018-07-19 10:09:33 +02:00
Nick Wu
8bb97b6318 Fixed not updating normal error. now all lines properly calculated. 2018-07-19 15:50:50 +08:00
Nick Wu
4719b8f561 Fix occlusion error 2018-07-19 13:51:01 +08:00
1dbfd266a1 Tons of changes to fix GPU_* functions rename 2018-07-18 20:47:52 +02:00
b98e6d7742 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/intern/draw_cache.c
	source/blender/editors/gpencil/drawgpencil.c
	source/blender/editors/gpencil/gpencil_brush.c
2018-07-18 20:18:09 +02:00
1334f3639c Cleanup: Reorder modifier list 2018-07-18 20:13:13 +02:00
3260ab8a7f New Mirror modifier
Still some functions not implemented, but the basic functionality is in place.
2018-07-18 19:42:18 +02:00
Nick Wu
3b52d6c72c Chain works, but occlusion is broken. (memory not cleaned up, drawing function is still the old one) 2018-07-18 23:49:14 +08:00
Nick Wu
ac74aa8d7f Fix typo, added to cmake, compile ok. 2018-07-18 16:42:05 +08:00
Nick Wu
7431839712 Chain now accept line segments (multiple occlusion level on one line is possible) 2018-07-18 16:20:21 +08:00
7a2617a6a8 Fix soft/hard limit warning 2018-07-18 10:00:31 +02:00
3537020110 Merge branch 'blender2.8' into greasepencil-object 2018-07-18 09:05:04 +02:00
Nick Wu
4b67aa4848 Implementing Chaining. Have problems for half-occluded line. Still thinking for solution. 2018-07-18 14:54:24 +08:00
8ce5bdffca Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2018-07-17 20:27:37 +02:00
Nick Wu
1313409e67 Merge branch 'soc-2018-npr' of git.blender.org:blender into soc-2018-npr
# Conflicts:
#	source/blender/draw/engines/lanpr/lanpr_chain.c
2018-07-17 23:23:23 +08:00
Nick Wu
4069c15759 Implementing software result chaining. Do NOT compile! 2018-07-17 23:21:28 +08:00
1892434c47 Merge branch 'blender2.8' into greasepencil-object 2018-07-17 15:37:00 +02:00
cca1d1038f Fix problem with preview for not visible materials
The preview must be generated with the color enabled and not checking the current scene settings. If we don't do this, the preview is empty for these materials.
2018-07-17 15:08:19 +02:00
Nick Wu
07cb51e074 Implementing software result chaining. Do NOT compile! 2018-07-17 17:26:30 +08:00
369816e531 Change RNA update to avoid unnecessary preview updates 2018-07-17 11:21:53 +02:00
a633737d93 Merge branch 'blender2.8' into greasepencil-object 2018-07-17 11:12:00 +02:00
Nick Wu
67ac0da53c Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-07-17 15:34:14 +08:00
Nick Wu
78277fe3f8 Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr
# Conflicts:
#	intern/opensubdiv/opensubdiv_capi.h
#	intern/opensubdiv/opensubdiv_evaluator_capi.cc
#	source/blender/modifiers/intern/MOD_mybmesh.c
2018-07-17 15:33:54 +08:00
c617cb11ce Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/modes/object_mode.c
2018-07-16 22:25:26 +02:00
5b5d80e864 Invert thumbnail switch to make UI more consistent
Also changed icon.
2018-07-16 18:21:22 +02:00
ef49c6368a Visual Studio compile fixes 2018-07-16 17:19:27 +02:00
917ea324d0 Add delete button to Color Preview list
This makes the control more consistent and avoid flickering when change list mode.
2018-07-16 16:31:00 +02:00
Nick Wu
1ce41b9726 File RW OK 2018-07-16 22:25:06 +08:00
751c8dfce3 UI: Replace color by material previews in list
To make more consistent the UI, the list of colors must shows the preview, not the old color boxes.

Besides, the new materials are more complex that a simple color box and the image was not representative.
2018-07-16 16:22:19 +02:00
f895b3e6ea Merge branch 'blender2.8' into greasepencil-object 2018-07-16 16:03:30 +02:00
915e414c86 Use live icons to template_ID for graese pencil materials 2018-07-16 13:54:22 +02:00
5cd39ced65 Add new parameter to template_ID to use live icon in button
By default, the button uses a predefined fixed icon, but in some situations it's better to show the preview (materials)
2018-07-16 13:51:40 +02:00
260ee7a770 update to new OSD API again 2018-07-16 13:10:59 +02:00
1ab1b4c1d8 Update to new OSD blender API 2018-07-16 12:01:40 +02:00
56d0fcbb66 Fixed camera object tranformation matrix 2018-07-16 12:01:40 +02:00
4268554f12 Make vertex wig sampling reflect the method in the paper 2018-07-16 12:01:40 +02:00
937b491943 Added time reporting and optimized osd_eval creation 2018-07-16 12:01:40 +02:00
09d0db2654 Initial port to 2.8 2018-07-16 12:01:21 +02:00
daeb641d42 Remove console warnings for tool bar
This will chanage in the future, but we can keep running without warnings with the current implementation.
2018-07-16 11:45:31 +02:00
7d22f617dd Update Icon for materials when change something
Need update icon for compact list. becaus ethe thumbnail is not used.
2018-07-16 11:11:30 +02:00
f1d0c41dcf Add missing weight data management in RNA function
This code was missing in the initial fix.
2018-07-16 10:01:28 +02:00
e386d627f6 Cleanup: Remove duplicate code 2018-07-16 09:33:19 +02:00
4faa243dd6 Cleanup: Make RNA callback names more consistent with the general naming scheme used 2018-07-16 18:41:04 +12:00
d94a9f5fbb RNA: Material filtering for GP Brush Settings 2018-07-16 18:41:04 +12:00
3c1c626916 Merge branch 'blender2.8' into greasepencil-object 2018-07-16 08:37:46 +02:00
Nick Wu
84c0f57d35 Code style fixes. Uncrustify processed. 2018-07-16 14:35:01 +08:00
39886fbb92 RNA: Filter "normal" materials vs "GP Object" ones 2018-07-16 17:57:57 +12:00
3a82de14d1 RNA: Add pointer poll callbacks so that Annotation datablocks don't get used for GP Objects and vice versa 2018-07-16 17:05:31 +12:00
Nick Wu
6af71e8176 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
# Conflicts:
#	intern/opensubdiv/opensubdiv_evaluator_capi.cc
#	release/scripts/startup/bl_ui/properties_scene.py
2018-07-16 10:44:49 +08:00
Nick Wu
8bb1a5396e Fixed OpenSubdiv_FVarLinearInterpolation type error. 2018-07-16 10:05:30 +08:00
5249e4bb11 Add switch to chnage betwen thumbnails and list
Now it's possible to change between a compact list of colors or the default thumbnail mode.
2018-07-15 21:34:23 +02:00
86965e51e9 Fix function names after merge
The functions have a new name now.
2018-07-15 17:19:52 +02:00
a5a0bc33a5 Merge branch 'blender2.8' into greasepencil-object 2018-07-15 16:59:04 +02:00
96831600bb UI: Change default previews to 80% 2018-07-15 16:23:03 +02:00
c846fa132d Add new Scale parameter to template_greasepencil_color
Now it's possible to define the size of the previews.
2018-07-15 14:12:38 +02:00
6f4849c22b UI: Fix some error in previous commit
Also rearrange some buttons.
2018-07-15 11:53:55 +02:00
14f5c40b80 UI: Use icon for Material Link
Follow the same UI design used in commitd2b28a8bf1b4d5abd9507e02702c6dc511ccf2c6
2018-07-15 11:46:14 +02:00
8664f667b2 Merge branch 'blender2.8' into greasepencil-object 2018-07-15 11:37:35 +02:00
84567336a5 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	build_files/cmake/macros.cmake
	source/blender/editors/space_view3d/view3d_edit.c
	source/blender/makesrna/intern/rna_scene.c
	source/blender/makesrna/intern/rna_space.c
2018-07-15 09:14:14 +02:00
d9526e5cb6 UI: Change preview row number to 3 2018-07-14 20:55:58 +02:00
f932d7863d Fix overlay panel missing in Edit/Sculpt/Weight Paint 2018-07-14 20:49:31 +02:00
57e0ebdba1 New preview file for grease pencil
Designed by Matias Mendiola
2018-07-14 20:48:40 +02:00
4eafa4f26a New property to verify if the material is grease pencil type 2018-07-14 17:14:39 +02:00
2b0a83bc78 UI: Make list of colors preview more compact 2018-07-14 16:15:26 +02:00
27ba739fb7 Merge branch 'blender2.8' into greasepencil-object 2018-07-14 13:44:14 +02:00
231e894a7e Update preview panel for grease pencil materials
Also some test changes to preview_grease_pencil.blend file
2018-07-14 13:41:17 +02:00
96cdb57d6f Clenup: PeP8 2018-07-14 13:07:05 +02:00
965c723eb4 UI: Add previeww materials panel to grease pencil 2018-07-14 13:06:27 +02:00
998a9a0322 Remove Grease Pencil Color Picker
This operator has been replaced by the new preview system.
2018-07-14 12:46:21 +02:00
cb01afc0b1 Update previews when change material
Also split rna update for grease pencil parameters
2018-07-14 12:17:42 +02:00
abab0398a0 Fix grease pencil cache update problems when change material properties
Since commit f84956738b 6/07/2018 12:33, the update of the materials was not working because depsgraph only update the current ID and not all related.

This fix the issue but need a review.

@aligorith Could you take a look and check if this is the best solution, I'm not sure about the fix, maybe we could add a relationship between material and datablock when create a new material.
2018-07-14 11:13:33 +02:00
2d90ef872a Fix merge error and remove old code
This file was wrong from a previous merge and still had code about grease pencil modifiers that was not deleted when the GP modifiers were splitted.
2018-07-14 10:05:31 +02:00
122c375d6e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/object/object_modifier.c
2018-07-14 09:42:03 +02:00
915b63c95f WIP: Define a new preview blend file for grease pencil
The blend file is only a copy of old file. Put only as placeholder.
2018-07-13 20:12:32 +02:00
Nick Wu
27628fa68c Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr-tess-modifier 2018-07-13 23:05:34 +08:00
Nick Wu
8dbc12864e Modify code to standard api and style 2018-07-13 23:05:16 +08:00
ad60c90c9a Merge branch 'blender2.8' into greasepencil-object 2018-07-13 15:51:47 +02:00
1471c5a2ec Merge branch 'blender2.8' into greasepencil-object 2018-07-13 12:29:06 +02:00
46453b13e8 Merge branch 'blender2.8' into greasepencil-object 2018-07-13 10:33:52 +02:00
5432109170 Move depsgraph tag after brush creation
If the brush was created, the tag was not working because it was done before the brush was available.
2018-07-13 10:33:07 +02:00
3808776a86 Move Overlay options to View3DOverlay
It's better to keep all overlays in the same RNA.
2018-07-13 10:28:02 +02:00
fff4676feb Replace "Notes" by "Annotations" to keep UI consistency
We can not use the word "Notes" in the UI for annotations because it creates confusion for the user.
2018-07-13 10:14:56 +02:00
d6eccc1361 Change some old grease pencil code to annotation
Fixed the error in annotation panel for other editors.

The main Notes switch for 3D View has been removed of the Notes panel because must be in the overlays.
2018-07-12 19:50:33 +02:00
6780be066f Move annotations switch to Overlay struct 2018-07-12 19:27:13 +02:00
edfcaea299 UI: Add again show annotation overlay switch
This was removed by error in a previous merge.
2018-07-12 19:20:32 +02:00
78ddb3c5f1 Update to new OSD blender API 2018-07-12 17:45:51 +02:00
c775facfd8 Update depsgraph to active brush from toolbar
There is a problem with the synchronization of the brush if it's selected from toolbar.

This change maybe can be removed when new toolbar system will be ready, but we need it now to keep drawing brushes working.
2018-07-12 17:35:29 +02:00
f2852b4c14 Revert "Revert "OpenSubdiv: Make more flexible C-API to specify FVar interpolation""
This reverts commit 14c72f943a.
2018-07-12 17:31:45 +02:00
3caae7707f Revert "Revert "OpenSubdiv: Fix wrong topology refiner cast""
This reverts commit 551f181742.
2018-07-12 17:29:38 +02:00
bbe59591d0 Revert "DO NOT MERGE - revert opensubdiv commit 9a0634a253421c02dbb6d2864db49e4d382ea2a3"
This reverts commit 87ed11f0a7.
2018-07-12 17:29:11 +02:00
23a870a0a9 Merge branch 'blender2.8' into greasepencil-object 2018-07-12 16:23:21 +02:00
c9026b8802 Merge branch 'blender2.8' into greasepencil-object 2018-07-12 09:09:00 +02:00
ac46f45e5c UI: Hide old Tools panels: Animation and Shapes
Pending to decide where put these operators.
2018-07-11 21:36:18 +02:00
28ed04b367 Merge branch 'blender2.8' into greasepencil-object 2018-07-11 19:18:31 +02:00
3bab9673ae UI: Hide color picker operator in Top bar
This operator will be replaced by material preview selector.

We keep the code internally now, but it will be removed when the preview works fine.
2018-07-11 19:18:02 +02:00
Nick Wu
6e3726439b Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr-tess-modifier 2018-07-11 23:14:48 +08:00
Nick Wu
93113d9b77 modify the code to adapt VC and some API changes. 2018-07-11 22:51:36 +08:00
a51b0fd81c Fixed camera object tranformation matrix 2018-07-11 16:43:59 +02:00
86b53f79d3 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_scene.py
	release/scripts/startup/bl_ui/space_view3d.py
	source/blender/editors/space_view3d/space_view3d.c
2018-07-11 16:28:59 +02:00
a74a8dfede New template for grease pencil material previews
This is the initial step to prepare the use of material previews in the topbar as color selector.

We need a new template to hide some elements of the default template.

Still the preview of the material is not available.
2018-07-11 16:21:13 +02:00
b24fec55a4 UI: Add different parameter to TopBar for each type of brush 2018-07-11 15:48:29 +02:00
b662ff5cae UI: Make Tool text shorter and less repetitive 2018-07-11 15:41:51 +02:00
652826dc77 Fix broken Tools group by previous commit.
The commit f468302660 broke the groups for mesh tools.

This is a temp hack to make the tools work, but need a better solution.
2018-07-11 15:30:52 +02:00
d4b7d488ff Fix error in toolbar for mesh modes
The category array must be shared.
2018-07-11 13:26:20 +02:00
25b95b2736 Replace text for Show/Hide panel
Before the name was too long, but with new design is ok.
2018-07-11 13:21:43 +02:00
Nick Wu
51df987a06 Merge branch 'npr_tess' of https://github.com/DarkDefender/blender into soc-2018-npr-tess-modifier 2018-07-11 17:14:02 +08:00
0dfc34d2b5 Make vertex wig sampling reflect the method in the paper 2018-07-11 10:42:10 +02:00
8cc727b6c6 Added time reporting and optimized osd_eval creation 2018-07-11 10:42:10 +02:00
87ed11f0a7 DO NOT MERGE - revert opensubdiv commit 9a0634a253 2018-07-11 10:42:10 +02:00
893633527d Initial port to 2.8 2018-07-11 10:42:10 +02:00
14c72f943a Revert "OpenSubdiv: Make more flexible C-API to specify FVar interpolation"
This reverts commit c17cb50ae2.
2018-07-11 10:41:20 +02:00
551f181742 Revert "OpenSubdiv: Fix wrong topology refiner cast"
This reverts commit d0920fba16.
2018-07-11 10:41:08 +02:00
8dc7c6bc47 Fix problem with Eraser cursor
The blend modes were using the GPU functions but the parameters were the old GL mode.
2018-07-11 10:25:21 +02:00
e93a1db8ec GPU replace missing in previous commit 2018-07-11 10:03:28 +02:00
457934c247 Replace gl* functions by GPU* 2018-07-11 10:01:11 +02:00
Nick Wu
ee788360cc Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-07-11 15:03:52 +08:00
1b32fa0ef5 Merge branch 'blender2.8' into greasepencil-object 2018-07-11 08:34:35 +02:00
f468302660 Fix: All GP Paint brushes were getting added to the same group in the toolbar 2018-07-11 17:13:23 +12:00
20bdf114a5 WIP: Add Brush drawing settings to topbar 2018-07-10 19:36:58 +02:00
e03a04dec7 WIP: Set Paint toolbar
Still the bushes are inside same category
2018-07-10 19:25:03 +02:00
a3e7590bb8 Merge branch 'blender2.8' into greasepencil-object 2018-07-10 18:05:02 +02:00
09078d12c3 WIP: More changes to try to get Draw tools
Still not working
2018-07-10 17:00:56 +02:00
2bff2a33b4 Do not include object type in name for Brush enums 2018-07-10 16:35:51 +02:00
ffa21e7417 WIP: Changes to make Sculpt and Weight paint tools work
This is a temp solution while we get the new toolsystem in place
2018-07-10 16:02:44 +02:00
db6d0ca6e9 Undo context changes
This can be needed by pending areas.
2018-07-10 13:29:14 +02:00
bf6c5e935e WIP: More work in toolbars (still not working) 2018-07-10 12:04:11 +02:00
3583c3f8dd Move GPENCIL_PAINT context inside tools switch 2018-07-10 11:59:57 +02:00
4ca18ac8cd Set icon for Brush enum 2018-07-10 11:53:34 +02:00
659254c2d0 Create Enum with all Grease Pencil Drawing Brushes 2018-07-10 11:50:16 +02:00
ae6036e371 Add property to check brush type
This is required by Tool system.
2018-07-10 11:11:04 +02:00
4d67d4bfc9 Remove annotation tool in Sculpt
This tool is not logic here
2018-07-10 10:36:01 +02:00
73a191d0cb WIP: Initial steps to implement Sculpt brushes in Toolbar
This is not working yet and can produce segment faults.
2018-07-10 10:11:47 +02:00
b6b6ee3134 UI: Remove obsolete function 2018-07-10 10:11:47 +02:00
7a40a8c0ef Cleanup/Fixes
* Remove hack that's no longer needed

* Don't change the GP Eraser Size userpref property from GP Object
  drawing operator, as it doesn't use that anymore. Instead, the
  eraser brush's size gets adjusted instead.
2018-07-10 19:52:23 +12:00
0e967bfb76 Toolbar: Move Ruler into same group with Annotations (but as separate buttons)
This way, the items group up nicer when you have the 2 column
icon groupings.
2018-07-10 19:13:10 +12:00
a77c3d5cb3 Fix: Pinning GP Object data in Properties Editor wasn't showing the GP Data tab 2018-07-10 18:52:21 +12:00
a2d7cb8c75 Merge branch 'blender2.8' into greasepencil-object 2018-07-10 08:05:18 +02:00
e9f21519fe Fix building & linking on Linux 2018-07-10 08:04:47 +02:00
fe98aed876 Cleanup: Remove GPENCIL_OT_color_choose
This isn't used anywhere, and should really even need to be
used for any purpose.
2018-07-10 17:25:40 +12:00
76c80cf124 Annotations: Don't display Annotations properties panel when GP data in context is for GP Object 2018-07-10 17:21:59 +12:00
2c609f6175 Fix: Don't allow Annotation tool to paint on GP Objects and vice versa 2018-07-10 15:44:30 +12:00
e7dc57438a Merge branch 'blender2.8' into greasepencil-object 2018-07-10 14:49:22 +12:00
0c830cf90e Merge branch 'blender2.8' into greasepencil-object 2018-07-09 20:35:36 +02:00
d3afa14647 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
2018-07-09 17:17:05 +02:00
cd12b15756 Make Ruler works with Annotations not Grease Pencil object
Now, the ruler is using the annotation datablock (scene) and not a object with materials
2018-07-09 15:45:13 +02:00
117d304a90 Tweaks to GPENCIL_OT_new operator
* Correctly tag Annotation datablocks as such when adding them
* Add new layer by default. It saves users from having to manually
  add one after adding the datablock anyway.
2018-07-10 00:20:19 +12:00
c56e3bcb6f Fix: "New Note" didn't tag newly-created GP datablock for annotations when creating a new datablock 2018-07-09 23:47:33 +12:00
60d2ff134e Cleanup: Use GPU_* calls instead of gl* in annotate_draw.c 2018-07-09 23:28:02 +12:00
d884d41d17 Annotations: Change "New Layer" label to "New Note" 2018-07-09 23:15:51 +12:00
85f7f0fddf Make Annotations toggleable with main overlay switch 2018-07-09 10:47:56 +02:00
c8943925e5 Rename Grease Pencil to Annotation
Some properties and flags are more clear if the name is annotation.

Also changed some text and tooltips.
2018-07-09 10:37:44 +02:00
ff20577420 Merge branch 'blender2.8' into greasepencil-object 2018-07-09 09:49:19 +02:00
995a573d30 User Prefs: Make it clearer which properties affect Annotations only vs GP + Annotations 2018-07-09 19:45:21 +12:00
9cfd0c1720 Annotations: Change default color for new annotation layers
Although we've had a default color for new Grease Pencil layers for
years, hardly anyone ever changed the default color from the old
default of black. This commit changes this default to match the
color used in the annotation pencil icons, giving it a stronger
connection to the tool, and giving users a better default color
that will make the new strokes actually visible with the default
theme.
2018-07-09 19:42:37 +12:00
4a09bb1e8a Annotations: WIP access to tool settings in topbar
Lots of stuff to fix still - Not final UI at all
(in terms of widgets + properties exposed)

What works now:
* Exposed access to the setting controlling the default color to use
  when adding new layers
* Exposed access to change which color (layer) and thickness new strokes
  get drawn with (as per the current implementation). Now all annotation
  tools have tool settings exposed.

Big Todo's:
* Find a way to display color previews of GP Layers as icons
  (e.g. how to register all the necessary icon_id's, etc.)
* Replace the prop_search() with an enum prop
* Separate annotation RNA type defines? Context issues? etc.
2018-07-09 19:26:22 +12:00
6e05dc608c Annotation Eraser: Only operate on the active layer
Since we aren't exposing per-layer locks here (as we want to avoid
having lots of work enabling/disabling locks), the eraser now only
erases strokes on the active layer
2018-07-09 16:05:29 +12:00
3a53b24043 Cleanup: Assorted little tweaks/moving code around 2018-07-09 15:54:36 +12:00
2d2c03b8e4 Annotation Eraser Tweaks
* Remove the "soft" modes from the annotation eraser. Now, erasing
  strokes will immediately remove the stroke points. This works better
  for annotation use cases, as when erasing strokes, you usually just
  want to get rid of the notes quickly.

* Show eraser brush size setting in the topbar/tool settings when the
  eraser tool is active.  (Note: This setting still uses the userpref
  setting, which we should move to the scene toolsettings instead
  so that it doesn't get reset with each session)
2018-07-09 15:34:22 +12:00
7e6beb70ad Cleanup: Deduplicate stroke freeing code 2018-07-09 14:55:34 +12:00
85d61dfbd6 Merge branch 'blender2.8' into greasepencil-object 2018-07-09 14:32:40 +12:00
129c8fd684 Fix error when render
The v3d pointer is null when renders, so need to be checked before use it.
2018-07-08 20:43:09 +02:00
8fde165929 Fix errors and changes after merge 2018-07-08 16:45:16 +02:00
534c715bf5 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/drawgpencil.c
	source/blender/editors/gpencil/gpencil_brush.c
2018-07-08 16:17:35 +02:00
90a8ecc5ad Merge branch 'blender2.8' into greasepencil-object 2018-07-08 12:37:22 +02:00
646e90dee2 Move Vertex Opacity from Tolsettings to View3D
The vertex opacity is a parameter of the view and not of toolsettings as it was defined before.

With this commit we moved the last parameter to control the view look to the right place.
2018-07-08 12:36:39 +02:00
082b36934e Verify View3D is vailable before using it
This variable is not loaded when render.
2018-07-08 12:08:19 +02:00
4b84a25da9 Merge branch 'blender2.8' into greasepencil-object 2018-07-07 19:33:35 +02:00
82afe5c324 New Main switch at view level for Onion Skin
The switch is on top of GP datablock onion switch and allows to show/hide all datablocks in the view.
2018-07-07 19:17:27 +02:00
62526308ac Move Edit LInes and Multi Edit LInes switch at View level
This overlay must be by view, not by object.

Also changed the name to "gpencil_*" to some grease pencil paper to keep name consistency.
2018-07-07 18:30:07 +02:00
a8b63c3675 UI: Define a Header Text for Overlay Panel 2018-07-07 17:37:29 +02:00
9e7e926ed3 Try to fix the rim problem when the image ends outside view
The rim is disabled if the image to rim extends beyond the borders.
2018-07-07 11:13:01 +02:00
7ba438099b Improve Blur qualitty when the zoom factor changes
Now the number of pixels to blur depend of the pixel size and not as fix values as before.
2018-07-07 11:04:13 +02:00
fe68d0767f Fix animation path typo error
This error made impossible animate modifiers.
2018-07-07 10:51:21 +02:00
73cfbbcea9 UI: Reorganize Overlay panel
The separated panel for Paper and Options has been replaced by an unique panel, because two panels display too much empty space between them and make easier the maintenance.

Following how works other Blender panels, the paper options are hiddden when the paper is disabled, only required parameters are displayed.

We keep Onion switch here because is still pending the decission to use a general switch (mesh and GP) or keep separated switches.
2018-07-07 10:40:16 +02:00
5be3134ca0 Merge branch 'blender2.8' into greasepencil-object 2018-07-07 10:21:57 +02:00
158d55c2e6 UI: Move Vertex Opacity to Overlay 2018-07-07 10:21:26 +02:00
955a48384a UI: Small tweaks 2018-07-07 10:04:41 +02:00
924ff86814 Add Grease Pencil object to new View/Hide topbar control
Note: Used "GPencil" instead of "Grease Pencil" for Popup menu because full name is too long.
2018-07-06 22:55:47 +02:00
d809346eda Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/__init__.py
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_intern.h
	source/blender/editors/object/object_ops.c
	source/blender/editors/space_buttons/space_buttons.c
	source/blender/makesrna/intern/rna_internal.h
2018-07-06 22:31:03 +02:00
82a2bb2750 Enable Onion with Overlay button
The grease pencil onion skin need to set the cache as dirty to recalculate geometry, so a depsgraph recalc must be done when change Overlay switch.
2018-07-06 22:22:51 +02:00
55f01739c4 Undo hide Onion with overlay
There is a problem with the cache update and need a refactor. Remove the code while found a solution.
2018-07-06 20:54:48 +02:00
64abbdc192 UI: remove Edit Lines color from Overlay panel 2018-07-06 16:59:54 +02:00
2af322f3ba UI: Back Selected Mask options to Topbar
These options aren't overlays.
2018-07-06 16:55:16 +02:00
375dcdd5c4 UI: Add Edit LIne Color to Overlay 2018-07-06 16:41:00 +02:00
be13808886 Disable Onion y Edit lines with Overlay flag 2018-07-06 16:40:07 +02:00
8565fb5bce UI: Move some options to overlay (Edit lines, Onion) 2018-07-06 16:36:26 +02:00
ed5c6da73c Disable Grease Pencil Paper when disable overlays 2018-07-06 15:57:09 +02:00
974f2b6cfd U: Show grease pencil paper options in any GP mode 2018-07-06 15:37:43 +02:00
cf2a929bfe UI: Recover Pivot Point selector
After a merge, the pivot point disappear en Edit and Sculpt mode
2018-07-06 13:59:28 +02:00
4953892acf Check Weight data is available before duplicate or use
This is needed for using the functions in annotations where the weight data is not created
2018-07-06 11:06:32 +02:00
86f0549056 Merge branch 'blender2.8' into greasepencil-object 2018-07-06 10:23:54 +02:00
b5dfb62a2c Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/makesrna/intern/rna_gpencil.c
2018-07-06 09:30:22 +02:00
ca3cd8f916 New Shader FX implementation
This is the new implementation of the old VFX modifiers.

- All the BKE functions have been separated in new module and a new listbase was added to Object struct. Now the modifiers and the new shader FX are totally separated.

- Added a new section in properties panel for FX. ToDo: New Icon.

- Drawing methods improved aand new Rim and Colorize FX created.

Some functions and code (glsl and DRW_*) could be shared by other modules in the future, but as today only grease pencil is using it and the logic depend of the drawing engine, we decided to keep inside the GPencil drawing engine.
2018-07-06 08:46:00 +02:00
efc08aa600 Merge branch 'blender2.8' into greasepencil-object 2018-07-05 19:39:42 +02:00
2c19f296ce Fix: Icons for annotation tools now show in toolbar 2018-07-06 03:54:07 +12:00
4eefe33f77 Icons for Grease Pencil/Annotation tools
These were in the icon_geom.blend file in SVN (lib/resources),
but needed to be manually added to the Export group for this to
work.

They are needed for use for use with the annotation tools.

NOTE: There are currently problems running the icon generation
scripts in the gp-object branch due to some file loading pointer
remapping problems there causing segfaults when running the script.
Thus, I generated these icons using the 2.8 branch, then cherry-picked
that commit over to this branch.
2018-07-06 03:44:43 +12:00
b643f32354 Fixes for incorrect version patching code introduced in b6776304e7
* newlibadr() shouldn't be called from direct_link_* functions
  Besides, the pointers in question get corrected in
  lib_link_material() already

* Added expand_doit() calls for the sima and ima pointers.
  Following what's done for tex->ima, these also get expand_doit() calls,
  since they increase the usercount of images when used.
2018-07-06 00:38:33 +12:00
4b64b7e21c Cleanup: Remove the obsolete "ts->gp_brushes" field
This isn't used or accessed from anywhere anymore, so time to remove it
2018-07-06 00:38:32 +12:00
Nick Wu
68b0b7810e fix gcc warnings 2018-07-05 17:55:01 +08:00
41418be00d Merge branch 'blender2.8' into greasepencil-object 2018-07-05 09:49:23 +02:00
Nick Wu
ca4144a11a Provide a switch to turn on/off intersection line calculation to save time when intersection is not needed. 2018-07-05 15:25:07 +08:00
Nick Wu
ec2ccc7d60 software method preview now in correct aspect ratio 2018-07-05 14:53:01 +08:00
Nick Wu
9d71b50678 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-07-05 11:28:28 +08:00
Nick Wu
a75059cd44 fixed VC-specific warnings. 2018-07-05 11:17:36 +08:00
08b9036e3a Enable Grease Pencil paper in edit mode 2018-07-04 15:44:19 +02:00
8c45d279c9 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/object.c
2018-07-04 12:53:14 +02:00
b6776304e7 Fix missed materials after append GP object 2018-07-04 12:51:07 +02:00
Nick Wu
508a06e581 Merge branch 'soc-2018-npr' of git.blender.org:blender into soc-2018-npr
Conflicts:
	source/blender/draw/engines/lanpr/lanpr_engine.c
2018-07-04 17:38:13 +08:00
Nick Wu
42ddafedf5 debugging f12 weird behavior 2018-07-04 17:33:19 +08:00
Nick Wu
d5a1c5a4a0 debugging f12 2018-07-04 15:52:20 +08:00
ecb4a65460 Merge branch 'blender2.8' into greasepencil-object 2018-07-04 09:11:20 +02:00
Nick Wu
59d878aa5c Fixed multithread RenderTriangle size error 2018-07-04 13:32:40 +08:00
03082dd1dd Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
2018-07-03 19:46:29 +02:00
9d96302f47 Fix typo 2018-07-04 03:57:28 +12:00
891a944dfd Fix: Crash when erasing annotation strokes
The code was assuming that dvert data always exists on strokes
(it shouldn't, if we're doing everything correctly!), which
caused crashes when erasing annotation strokes (which definitely
don't have this data).

TODO:
Check that the rest of the code doesn't make similar assumptions!
2018-07-04 03:43:30 +12:00
cc7bbda849 Annotations: WIP first steps towards toolbar support
This adds a toolbar entry for activating the annotations tools
as active tools. Many things are WIP still (e.g. tool settings
are yet to come, as the necessary props aren't defined in DNA/RNA yet).

Todo's:
* Icons are missing.  The necessary icons *do* exist right now
  in the icon_geom.blend file, but I can't get them to export/generate
  .dat files that we can use in the UI here.  That said, the placeholder
  names (from that file) are now used.

* Key mappings need work/testing. They seem to work well enough as-is
  already though

* Tool settings (in topbar) are not implemented yet. Coming soon
  (aka tomorrow, after I get some sleep)

* Non-3D view toolbar support
2018-07-04 03:43:29 +12:00
179dfd0729 Cleanup: Remove 2D Editor support from gpencil_paint.c
The "GPENCIL_OT_draw" operator pretty much didn't support non-3D
views already (at least not without crashing). Now that we've got
a separate/dedicated operator for Annotation support (GPENCIL_OT_annotate),
we can remove the old 2D Editor support here.
2018-07-04 03:43:29 +12:00
c3f5c1dd20 Cleanup: Remove "Scene->gp_object"
This was from an earlier design for supporting Annotations,
where in the 3D view, we would have only had GP Objects.
Now that we've moved away from that idea, and are back to
having a separate "Annotations" system, this concept can
be removed from the code again.
2018-07-04 03:43:29 +12:00
6cb0327f17 Cleanup: Remove deprecated toolsettings->gpencil_src field
This was used to determine whether Grease Pencil data was stored
on the Scene level or per Object. It isn't actually used anywhere
in 2.8 now, with the GP Objects / Annotations. Removing now
to make space for storing the toolsettings for the annotation tools.
2018-07-04 03:43:28 +12:00
Nick Wu
74e029dcb6 Multithread OK. 2018-07-03 20:42:32 +08:00
Nick Wu
34db087c38 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-07-03 17:48:17 +08:00
Nick Wu
118cadf1ce move line layer and delete line layer component ok. 2018-07-03 17:43:35 +08:00
Nick Wu
54172dcab5 Line selection from object and collection is ok, material pending. 2018-07-03 16:28:39 +08:00
d86b7f53a8 Merge branch 'blender2.8' into greasepencil-object 2018-07-03 09:59:11 +02:00
339708d3eb GP UI: Make the "Grease Pencil Paper" panel/options part of the Overlays popover
This is a special feature only used during Draw Mode, and functionally
acts like an overlay. Some cleanups/tweaks to this are needed still,
but it's good to get it out of the way.
2018-07-03 17:15:37 +12:00
df1cf4af94 Cleanup: Variable Naming 2018-07-03 17:11:43 +12:00
ebbc047dfe Merge branch 'blender2.8' into greasepencil-object
# Conflicts:
#	release/scripts/startup/bl_ui/space_view3d.py
2018-07-03 13:20:38 +12:00
5abee2392f Fix for py errors in console, caused by bad poll callback for the "Animation" panel 2018-07-03 01:42:04 +12:00
9521de5583 Fix: Ensure correct names when using the "New Layer" operator for GP Object and Annotations
This replaces what 7931a1357a
tried to do.  We may still need to make these separate operators
to simplify things even further.
2018-07-03 01:42:03 +12:00
87a308ed33 GP Object: Don't show Add/Unlink datablock buttons for GP datablock ID selector
These buttons are not shown for any other object type,
so these shouldn't be shown for Grease Pencil objects.
2018-07-03 01:42:03 +12:00
105c0d178a Revert "Add annotation layer with the right name"
This reverts commit 7931a1357a.
2018-07-03 01:42:03 +12:00
bd53e9f2c5 Remove Animdata update for Palettes
This datablock is not animatable.
2018-07-02 13:24:16 +02:00
cb32dd9604 Fix parameter type after merge 2018-07-02 13:03:20 +02:00
fa73cd1854 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_data.c
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/gpencil/gpencil_intern.h
	source/blender/editors/gpencil/gpencil_utils.c
	source/blender/makesrna/intern/rna_internal.h
2018-07-02 12:48:37 +02:00
Nick Wu
07b7fae45d Updated ui, more easy to be used. (take advantage of new grouping api) 2018-07-02 17:11:00 +08:00
Nick Wu
f5b133fc2a Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-07-02 11:46:00 +08:00
6728b4a9b0 Cleanup: trailing space 2018-07-01 19:12:52 +02:00
31fee9b670 Merge branch '28' into greasepencil-object 2018-07-01 19:10:19 +02:00
531f833491 Cleanup: unused vars & comment block that doesn't run 2018-07-01 19:09:21 +02:00
014395cb53 Rename variable after merge 2018-07-01 11:09:59 +02:00
a1f0aed7d8 Merge branch 'blender2.8' into greasepencil-object 2018-07-01 11:01:04 +02:00
7931a1357a Add annotation layer with the right name
When adding layers, the name of the layer is different for grease pencil object and annotation.
2018-07-01 11:00:29 +02:00
552b954d30 Merge branch 'blender2.8' into greasepencil-object 2018-06-30 19:38:35 +02:00
02f4a180d9 Merge branch 'blender2.8' into greasepencil-object 2018-06-30 09:00:21 +02:00
cb144fe5ce Merge branch 'blender2.8' into greasepencil-object 2018-06-29 20:41:57 +02:00
1b13fdaf80 Annotations: Restore 3D View support for annotations (WIP)
Initial support for getting annotations to show up in the 3D
viewport again.  WIP and slightly hacky, but it restores basic
working functionality so we can focus on polishing the "new" parts.

Ultimately, the way these callbacks are integrated into the
drawing loop will probably need to change. For example,
* Perhaps we might need a full overlay engine for this one case
  (as for motionpaths), though that may also be overkill, and would
  further split the code in different places.
* The draw order (relative to manipulators) needs review. It probably
  should be below both sets of manipulators, not sandwiched between them.

Other notes:
* For this to work, we currently need to use the original (non-evaluated)
  scene data, or else we don't get the newly drawn strokes, as the
  scene->gpd stuff isn't copied by COW yet.
2018-06-30 02:52:20 +12:00
e2626831dc Annotations Keymap: Restore D-RMB for eraser 2018-06-30 02:52:20 +12:00
8308a051b4 Cleanup: Remove redundant code + note some code issues to fix 2018-06-30 02:52:19 +12:00
bc0f489619 Set annotions drawing mode always on top
The annotations must be visible on top of any other object in the scene.
2018-06-29 12:51:07 +02:00
Nick Wu
d4c5c2d76b Offline, DPIX, Snake working. no F12. DPIX draw intersection if cached. 2018-06-29 17:53:45 +08:00
ebadf391e3 Fix render type name error 2018-06-29 11:04:43 +02:00
0dbbedbf0f Cleanup code 2018-06-29 10:58:17 +02:00
0c1c619681 Fix draw back error due z-depth precission
The value 1.0 makes the image disappear.
2018-06-29 10:13:50 +02:00
f88f2b73c0 Merge branch 'blender2.8' into greasepencil-object 2018-06-29 09:55:11 +02:00
3587e5ca1e Fix problem when increase viewport qualitty
The reason of the problem was the precission of the background buffer. The original value was not enough when viewport qualitty was > 0.1
2018-06-29 09:52:30 +02:00
2784f1b6fc Cleanup unused extern definition
This was part of old VFX modifiers.
2018-06-29 09:43:34 +02:00
6ece125739 Fix again the pointer name for textures 2018-06-29 09:42:43 +02:00
Nick Wu
3ea9277205 removed line styles from SceneLANPR 2018-06-29 14:18:11 +08:00
Nick Wu
02b3e81793 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-06-29 12:03:27 +08:00
Nick Wu
141c2cf150 Multisample implementing, f 12 won't work either. 2018-06-29 12:01:12 +08:00
f19b34b43b UI: Rename Grease Pencil Simplify Panel 2018-06-28 17:45:56 +02:00
824ef929f6 Fix merge errors 2018-06-28 17:44:59 +02:00
823bb18425 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/datafiles/userdef/userdef_default_theme.c
	release/scripts/startup/bl_ui/properties_scene.py
	source/blender/editors/gpencil/drawgpencil.c
	source/blender/editors/gpencil/gpencil_brush.c
	source/blender/editors/gpencil/gpencil_paint.c
2018-06-28 17:33:55 +02:00
23ffb562b6 Move GPD runtime fields to runtime struct 2018-06-28 17:25:30 +02:00
Nick Wu
0065c907c4 remove linear depth conversion. now clipping finally works as expected. 2018-06-28 22:55:39 +08:00
e97f357b19 Annotations: Set better default name for new annotation layers
Note: Many of the add layer operators still need tweaks,
but this is a good start for the main ones.
2018-06-29 02:48:27 +12:00
8869939d58 Annotations: Restore color selector per layer
This shows up in the layer list, making it possible to quickly change it
inline, and to see what color the strokes in the layer are using.
2018-06-29 02:29:41 +12:00
630d1ac6fc GP/Annotations: Provide usage hints about the "Poly" tool 2018-06-28 21:32:51 +12:00
bfae260928 Annotations: Don't respect the "on back" option
This is too complicated for an annotation tool
2018-06-28 21:27:41 +12:00
91f7ba14f2 Remove "Continuous Drawing" flag/mode
* GP Object doesn't need this as it has a proper "Draw Mode"

* For Annotations, it just got in the way and was a confusing
  modal+blocking nuissance that randomly activates when you just
  want to draw a quick line
2018-06-28 21:25:49 +12:00
bec3a00e59 Annotations Fix: "Freehand" mode now works
Was over-zealous when removing code from the drawing operator
to remove all the non-essential additions here.

Now annotations work in some of the 2D views:
* Nodes/Image Editor are confirmed to work
* Sequencer Preview needs further work
* Movie Clip editor works
2018-06-28 21:15:31 +12:00
3de40395da Fix stabilizer cursor after annotations
The cursor was drawn to wrong position after use annotations.
2018-06-28 10:19:26 +02:00
894b3b1f4e Annotations: Put in place basic building blocks for Annoations UI (WIP)
This is still a rough draft, just restoring all the essential bits and
pieces to have a workable system.
2018-06-28 19:13:20 +12:00
398ce6d987 Cleanup: Change "Drawing Tools" panel to use the annotation tools, not old GP drawing operator
This panel is going away soon, to be replaced by the active tools system.
But in the meantime, we need to stop using this old panel as it will
cause crashes when used.
2018-06-28 19:13:20 +12:00
76f914d36c Fix: Errors in console when using annotations in viewport
Was caused by a missing poll callback for a GP object panel
2018-06-28 19:13:20 +12:00
f1470f8a20 Cleanup: Move GP-Object specific UI panels to the appropriate file 2018-06-28 19:13:20 +12:00
979a881e23 Cleanup: Remove unused stuff 2018-06-28 19:13:20 +12:00
6b42183120 3D Annotations: Restore ability to access annotations from the 3D view
For now, the "gpencil" context properties work as follows:
* If the active object is a GP Object, the GP data associated with
  that is returned
* Otherwise, the Scene's GP data (i.e. annotations) are used

We may need to revise this later. But in the meantime, I'm restoring
this so that we have a quick way of figuring out what parts of the
annotation tool workflow are currently broken.
2018-06-28 19:13:18 +12:00
f855bb52fb Annotations: Properly initialise annotation datablocks 2018-06-28 19:13:17 +12:00
560950776e TODO: Note some struct members that should be moved to runtime data struct 2018-06-28 19:13:17 +12:00
4726aa3d5e Annotations: Repurpose an ancient/rarely-used flag to indicate that a GP datablock is used for annotations 2018-06-28 19:13:16 +12:00
6df2bed1e9 Annotations: First steps towards having working annotations again
Copy-back (from 2.8) and split out "Annotations" drawing operator/rendering
code from the "GP Object" versions of the same code.

Notes:
* All "annotation" related things are now in the annotate_*.c files,
  while "drawgpencil.c" and "gpencil_paint.c" are for the GP Object only
  now. This will simplify maintenance of the two different usecases,
  as the GP Object versions are significantly more complicated and filled
  with extra cruft.

* The general "Grease Pencil" keymap (i.e. the one that allows DKEY+LMB-drag
  to draw) is now for annotation usage only. For GP Objects, you can add a
  blank GP Object, enter Draw Mode, and start drawing.

Code Changes:
* Removed all 2D drawing-code entrypoints from drawgpencil.c

* Cleaned up most of the annotate_paint.c and annotate_draw.c code
  to remove stuff that annotations won't use (e.g. brushes, palettes,
  fancy line effects, etc.)  As much as possible, these have been restored
  back to a pre 2.77 state - with the notable exception of per-layer
  Onion Skinning, for which the settings were removed already.
2018-06-28 19:13:16 +12:00
f3c42200d3 Cleanup: Remove all mention of annotations from GP drawing operator 2018-06-28 19:13:16 +12:00
57ef71c555 Cleanup: Move comments to sit above the right structs 2018-06-28 19:13:16 +12:00
b41d293a96 Set again mix pass to DEPTH_LESS
Using ALWAYS for this pass is wrong because when using several objects, only the less z-depth object is drawn.
2018-06-28 09:12:35 +02:00
Nick Wu
b6129384d7 Modified triangulator function 2018-06-28 13:46:07 +08:00
Nick Wu
a63777b879 Fixed normal matrix error. obmat needs double to produce better result. 2018-06-28 12:30:58 +08:00
Nick Wu
40b2263284 Fixed save/reading error on line style thing... 2018-06-28 09:31:18 +08:00
Nick Wu
84877dc53f Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
Conflicts:
	release/scripts/startup/bl_ui/properties_scene.py
2018-06-28 08:46:30 +08:00
b3ec99f176 Revert "Fix wrong engine name"
This reverts commit 7c3c256170.
2018-06-27 22:44:13 +02:00
8b1315facd Temp fix to compile
There is a problem with the generator for themes, and this is a temp fix while Campbell fix the generator,
2018-06-27 20:15:49 +02:00
b0ba7341bd Merge branch 'blender2.8' into greasepencil-object 2018-06-27 16:51:39 +02:00
411a8d13e9 Increase multisample texture precission
When use FX get glitches.
2018-06-27 16:45:04 +02:00
7c3c256170 Fix wrong engine name 2018-06-27 16:44:23 +02:00
01d9f8131e Merge branch 'blender2.8' into greasepencil-object 2018-06-27 11:43:20 +02:00
c11748475a Fix struct typo name errors 2018-06-27 11:33:48 +02:00
08a2176558 Fix FXAA problem when drawing
The internal passes never must check z-depth values, only in the final pass.
2018-06-27 11:28:11 +02:00
c6b1a931a3 Compile fixes after merge 2018-06-27 18:40:11 +12:00
3b34bc96ca Merge branch 'blender2.8' into greasepencil-object
# Conflicts:
#	source/blender/editors/gpencil/gpencil_interpolate.c
#	source/blender/editors/gpencil/gpencil_paint.c
2018-06-27 18:25:38 +12:00
Nick Wu
3a4515add9 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-06-27 11:12:43 +08:00
3bbf08cc15 Cleanup: Remove some obsolete defines 2018-06-27 00:03:15 +12:00
Nick Wu
4970b003ed Offline render running and display is ok. Don't render more than 1 time. 2018-06-26 18:31:10 +08:00
7caccf4bf2 Merge branch 'blender2.8' into greasepencil-object 2018-06-26 21:48:41 +12:00
Nick Wu
fd2036333b redo-ing draw code for offline rendering 2018-06-26 14:03:52 +08:00
Nick Wu
309f06c4ef rename LANPR_LineStyle into LANPR_LineLayer. 2018-06-26 09:29:40 +08:00
66b1de59b5 Merge branch 'blender2.8' into greasepencil-object 2018-06-25 22:30:25 +02:00
Nick Wu
e6821d3d27 Drawing code moved in, but most parts need redo. 2018-06-25 21:37:17 +08:00
f99830961a Merge branch 'blender2.8' into greasepencil-object 2018-06-25 11:04:48 +02:00
53447101f6 Merge branch 'blender2.8' into greasepencil-object 2018-06-25 09:21:00 +02:00
Nick Wu
1a8652192e Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-06-25 13:48:30 +08:00
b8cb4b5e01 UI: Hide layer panel if not GP object 2018-06-23 22:29:05 +02:00
af5f4f5d74 Merge branch 'blender2.8' into greasepencil-object 2018-06-23 22:02:25 +02:00
7d954885ff Fix z-depth error drawing new strokes
The new strokes must be on top of any other stroke.
2018-06-23 18:42:58 +02:00
4c58ab8754 Merge branch 'blender2.8' into greasepencil-object 2018-06-23 16:44:07 +02:00
67faa2d34d Fix missing thickness when scale or mirror
The line was reset to minimum thickness when it was scale with -1 or the mirror transform was used.
2018-06-23 16:28:41 +02:00
5eb25b1856 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/makesdna/DNA_scene_types.h
	source/blender/makesrna/intern/rna_scene.c
2018-06-22 22:54:07 +02:00
a10266310b UI: Changes in Specials and Deleet menus 2018-06-22 18:14:20 +02:00
b7bdae5304 Adapt code after merge 2018-06-22 16:53:50 +02:00
85674e73b0 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/makesdna/DNA_modifier_types.h
	source/blender/makesdna/DNA_object_types.h
2018-06-22 16:42:41 +02:00
018f2724f8 Fix segment fault in Noise Modifier
The random init seed was not done in the right function.
2018-06-22 16:09:33 +02:00
Nick Wu
0fb1e8fb03 Uncrustify processed. 2018-06-22 17:34:09 +08:00
Nick Wu
45a2126cc1 Offline intersection and occlusion test code complete. 2018-06-22 16:55:05 +08:00
Dalai Felinto
2ec28dd28f Fix reading modifier object pointers
Kudos to Bastien Montagne to help figure out the special modifier read code.
2018-06-22 10:15:09 +02:00
Dalai Felinto
71e2a5a56f Remove unused variable
(instead of poorly silencing it with UNSED =))
2018-06-22 09:08:54 +02:00
Dalai Felinto
161c67de14 Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object 2018-06-22 09:05:39 +02:00
Dalai Felinto
727f6d70fa Silence warning + cleanup 2018-06-22 09:05:27 +02:00
Nick Wu
d234d87295 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-06-22 13:31:25 +08:00
009f33b588 Fix name typo error 2018-06-21 17:23:29 +02:00
82ecee0a7b Small UI Fixes
* Fixed comment about the "Surface" panel. It's used after all
  (as a parent for two others). Adjusted comment to make that
  more obvious.

* Don't show decorators on the Parent Relations panel.
  None of those settings should be driven/animated.
  Maybe we put it back for overrides later though?
2018-06-22 02:18:47 +12:00
6d85d0f08a Cleanup: Delete unused code 2018-06-22 02:18:47 +12:00
8e4b87e9a5 Cleanup: Move some GP Object specific types to their respective files 2018-06-22 02:18:47 +12:00
788a6d078e Merge branch 'blender2.8' into greasepencil-object 2018-06-21 16:14:26 +02:00
36ce57f306 Merge branch 'blender2.8' into greasepencil-object 2018-06-21 15:50:31 +02:00
Nick Wu
801d037802 Render process ok. spin lock ok. DON'T COMPILE 2018-06-21 21:27:36 +08:00
7f6ec8c7fe Cleanup: Remove a few more references missed earlier 2018-06-21 23:25:34 +12:00
c719299bf2 Cleanup: Remove all old panels that Annotations will not be using 2018-06-21 23:14:21 +12:00
3012ea067f Remove various checks used in the general GP layers/data panel for isolation the GP Object 2018-06-21 22:57:59 +12:00
6e9b328a39 UI Tweak: Disable property split for GP Layers panel
There's just a single property here (opacity) under a
list widget that spans the full width of the panel.
It's not really worth having the half-size widget here.
2018-06-21 22:53:02 +12:00
71dd90c5c9 Decouple GP Object's "Layers" panel from that used for "Annotations" 2018-06-21 22:44:28 +12:00
208bf89fd2 UI: Simplify Panel default closed 2018-06-21 11:09:27 +02:00
d757771d27 Add depsgraph support for gpencil_modifiers_foreachTexLink 2018-06-21 10:58:45 +02:00
e584443af7 More depsgraph missing: modifiers_foreachIDLink 2018-06-21 10:39:39 +02:00
Nick Wu
de60a9646a Continue modifying files. Don't compile! 2018-06-21 16:36:01 +08:00
382db124d1 Changes to integrate depsgraph evaluation for modifiers
Still pending:

- void DepsgraphNodeBuilder::build_object
- void DepsgraphRelationBuilder::build_object
2018-06-21 10:33:50 +02:00
35d823c3e4 Merge branch 'blender2.8' into greasepencil-object 2018-06-21 10:07:08 +02:00
853da3babc New functions for ID Linking 2018-06-21 10:04:55 +02:00
Nick Wu
57d52826f6 Added almost all offline render code. adaptation pending, don't compile! 2018-06-21 15:56:49 +08:00
Nick Wu
7d062aabac turn off freestyle. preserve edge mark ops to to edit older files. 2018-06-21 11:12:21 +08:00
Nick Wu
c20e6ee66f UI fixed. active_layer is working now 2018-06-21 10:44:21 +08:00
ae8620b3ae Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
2018-06-20 19:26:07 +02:00
f23e999720 Cleanup: Rename shader to keep name consistency 2018-06-20 19:12:41 +02:00
67c7b58313 UI: Second round to fix panel
I made stupids errors in previous commit
2018-06-20 18:54:48 +02:00
06cff7dd8e Cleanup: Stupid duplicated line 2018-06-20 18:50:51 +02:00
b4284a99bf UI: Back proportional editing for Sculpt mode 2018-06-20 18:48:13 +02:00
Dalai Felinto
39c9d9035f Rename greasepencil callbacks since we are already in GP namespace 2018-06-20 18:40:18 +02:00
Dalai Felinto
a624e1b5ff Silence warning 2018-06-20 18:38:46 +02:00
Dalai Felinto
8703dafb51 Fix crash on tweaking greasepencil modifier
We were missing a proper copy of modifiers.

Note: there was a warning for the function not being declared in any header
it should be enough to find the error by following the warning.
2018-06-20 18:34:03 +02:00
6d4ee22da2 WIP: Free modifiers memory
This was missing, but this lines get a segment fault

Still memory leak present
2018-06-20 17:42:03 +02:00
b5247238bb Split Grease Pencil Stack modifiers
Now all modifiers logic is totally separated of mesh modifiers.

Thanks Dalai Felinto for his help and support doing this change.
2018-06-20 17:20:08 +02:00
6b1e6b2061 Cleanup: Rename fields 2018-06-20 17:08:46 +02:00
Nick Wu
5f08c4e819 implemented set() for active_layer but still. 2018-06-20 22:37:10 +08:00
83f5606b69 Fix random number functions after merge 2018-06-20 16:00:14 +02:00
Nick Wu
eaf9f696f5 lanpr.layers.active_layer always return None. weird. 2018-06-20 21:48:22 +08:00
7f1eddb5ab Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenlib/BLI_rand.h
	source/blender/blenlib/intern/rand.c
	source/blender/makesrna/intern/rna_gpencil.c
2018-06-20 14:30:08 +02:00
2f9b8c7bc6 Fix multisample textures were using default not local copies
The multisamples used were not the custom textures for GP.
2018-06-20 11:05:18 +02:00
Dalai Felinto
e9b91d5803 Fix lanpr DNA not compiled 2018-06-20 10:24:23 +02:00
Nick Wu
ae2d58f443 Adding LANPR structures. makesrna fails, very weird. 2018-06-20 15:59:26 +08:00
b281b0fb6c Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/space_outliner/outliner_draw.c
2018-06-20 09:43:55 +02:00
747c2814b0 Clenaup: Rename pass 2018-06-20 08:26:31 +02:00
eb3d80e6b8 Update depsgraph after adding Monkey 2018-06-19 17:19:21 +02:00
f0749f9f17 Merge branch 'blender2.8' into greasepencil-object 2018-06-19 17:07:14 +02:00
86dd04d540 UI: More panel adjustments 2018-06-19 17:06:04 +02:00
fe9e3ff97f Fix memory leak for RNG
After last changes in random number generation, there was a memory leak.
2018-06-19 16:58:11 +02:00
f195fc73b0 UI: Fix align in weight paint panel 2018-06-19 16:19:13 +02:00
e631871461 UI: Hide decorator icons
This icons break the design of the panel
2018-06-19 16:16:16 +02:00
b6fabaa83f UI: Set opacity parameter to single column layout 2018-06-19 15:52:29 +02:00
94c94e7a63 Merge branch 'blender2.8' into greasepencil-object 2018-06-19 11:21:50 +02:00
Nick Wu
2a7b4a84af Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-06-19 11:32:44 +08:00
Nick Wu
48e17cea96 Adding software render functions. don't compile! 2018-06-19 11:27:53 +08:00
967718b206 Merge branch 'blender2.8' into greasepencil-object 2018-06-18 17:45:22 +02:00
865f5ac173 Fix whitespace error breaking UI 2018-06-19 01:14:23 +12:00
556f23ab50 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_userpref.py
2018-06-18 11:08:16 +02:00
f0efa634b2 Git submodules
This commit was generated by Visual Studio
2018-06-18 10:50:53 +02:00
6782bdcc11 Hide internal properties in the viewport 2018-06-18 09:57:19 +02:00
15a58ebc31 UI: Expand direction buttons
This was disabled due layout bug
2018-06-18 08:35:17 +02:00
2a89323947 Merge branch 'blender2.8' into greasepencil-object 2018-06-18 08:24:07 +02:00
Nick Wu
c561923617 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
Conflicts:
	source/tools
2018-06-18 10:22:20 +08:00
a0c8cf8f36 Make properties not animatable
These properties must not use the icon to animate property.
2018-06-17 20:14:25 +02:00
8eeb857cab Fix merge error in Topbar
This errors broke the topbar
2018-06-17 19:43:57 +02:00
f1daff28a0 Merge branch 'blender2.8' into greasepencil-object 2018-06-17 17:12:26 +02:00
67747dc2c3 Merge branch 'blender2.8' into greasepencil-object 2018-06-17 16:57:51 +02:00
687d248486 UI: Changes in sculpt brush panel
* The direction is not expanded because enabling Expand=True rises an Assert.
2018-06-17 16:24:01 +02:00
0883e0c51d Add default icons for direction 2018-06-17 16:18:24 +02:00
1cf1ff17e0 Merge branch 'blender2.8' into greasepencil-object 2018-06-17 12:55:55 +02:00
1902d38ec9 Fix changes after merge 2018-06-16 19:51:56 +02:00
747d1a8989 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_brush.c
        source/blender/editors/gpencil/gpencil_intern.h
	source/blender/editors/gpencil/gpencil_paint.c
	source/blender/editors/gpencil/gpencil_utils.c
2018-06-16 19:39:59 +02:00
08a2bde685 Modify copy function after merge 2018-06-16 10:17:02 +02:00
9ad04b85ef Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/gpencil.c
2018-06-16 10:01:21 +02:00
Nick Wu
0944c31451 render_to_image implemented, but not working correctly. 2018-06-15 22:03:19 +08:00
64599aff4c UI: Move Draw on Back to Topbar 2018-06-15 10:31:08 +02:00
205cd86516 UI: Chnages in Sculpt Brush panel 2018-06-15 10:18:01 +02:00
c98b4ee52d UI: Cleanup Appearance panel 2018-06-15 09:52:54 +02:00
cabd84f4a2 UI: Move more Brush option panels as Subpanels 2018-06-15 09:48:36 +02:00
240a78377a UI: Move Brush Stabilizer to Subpanel 2018-06-15 09:35:48 +02:00
0e2e8381b8 Merge branch 'blender2.8' into greasepencil-object 2018-06-15 09:23:38 +02:00
10d948469c UI: Some cleanup of properties panels (WIP) 2018-06-14 20:14:33 +02:00
4bad42176b Check the context outside tool system
for grease pencil we don't use tool system yet, so we need check outside  workspace->tools_space_type because this value is not available.

Thanks Campbell Barton for his help fixing this bug.
2018-06-14 19:50:56 +02:00
d7439790d3 Cleanup: unused vars 2018-06-14 19:44:34 +02:00
39b0ac43cc UI: MOve topbar panels to Properties
WIP: Still some issues pending.
2018-06-14 19:30:46 +02:00
b468f18e86 Cleanup: Missing in previous commit 2018-06-14 18:46:55 +02:00
35c7876606 Cleanup: Remove unused parameter 2018-06-14 18:45:42 +02:00
484d44ccc4 Add missing context to buttons_main_region_layout_too() 2018-06-14 18:41:57 +02:00
Dalai Felinto
22ed3aa70b Fix building error, silence warning, stop double promotion 2018-06-14 18:28:53 +02:00
1f80f84d17 Cleanup: Remove excessive space 2018-06-14 17:36:16 +02:00
82edf15fd3 Merge branch 'blender2.8' into greasepencil-object 2018-06-14 16:16:35 +02:00
decc0f661a UI: Get back Pivot point origin
This control was removed by error in previous merges.

This change is temporary while the topbar is redesigned.
2018-06-14 16:13:48 +02:00
38aadd9a71 Merge branch 'blender2.8' into greasepencil-object 2018-06-14 09:52:06 +02:00
Nick Wu
62e4fb9113 Added DPIX crease fading. 2018-06-14 11:57:27 +08:00
Nick Wu
74ca16c418 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-06-14 09:50:06 +08:00
bebe6ce3ef Merge branch 'blender2.8' into greasepencil-object 2018-06-13 19:54:54 +02:00
9556e434b6 Fix errors after merge 2018-06-13 16:38:23 +02:00
401cdb36f8 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
	source/blender/blenkernel/intern/gpencil.c
	source/blender/editors/gpencil/gpencil_data.c
	source/blender/editors/gpencil/gpencil_paint.c
	source/blender/editors/space_view3d/view3d_manipulator_ruler.c
	source/blender/editors/space_view3d/view3d_ruler.c
	source/blender/makesrna/intern/rna_main_api.c
2018-06-13 16:27:34 +02:00
29bf8d456e Cleanup: More style changes 2018-06-13 16:18:12 +02:00
7053b00083 Cleanup: Remove unused struct
These lines were used by old palette system.
2018-06-13 16:07:15 +02:00
1ba5910098 Cleanup: Create macros for duplicate code 2018-06-13 16:04:13 +02:00
d1260a0820 Cleanup: Rename variables and comments 2018-06-13 15:49:02 +02:00
Nick Wu
813aea9b23 Now with seperate line thickness factor. 2018-06-13 21:18:37 +08:00
Nick Wu
9bc49a7c88 Seperate color demonstration. 2018-06-13 20:39:03 +08:00
Nick Wu
727104839d Added support for Freestyle edge mark. 2018-06-13 17:54:04 +08:00
Nick Wu
2076721e71 Seam and Material lines can be ena/disabled in dpix. Also added UI. 2018-06-13 17:27:17 +08:00
fa4100950d UI: Hack topbar to keep all running while found final design
These changes are only to keep running grease pencil with the last merge.

All these UI elements must be relocated to the right place, but if we don't show them in the UI while we get the final place, the grease pencil is unusable.
2018-06-13 10:35:32 +02:00
84d2d4e75e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_topbar.py
2018-06-13 08:40:46 +02:00
Nick Wu
625de6ef81 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-06-13 14:25:14 +08:00
7b2c840314 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenlib/intern/rand.c
2018-06-12 18:43:26 +02:00
1e611c1ce0 Remove Draw at Stroke Location
This option at layer level was only for very limited situations and added complexity not needed.
2018-06-12 17:11:08 +02:00
37ffbb292d Rename field gradient_boxsize to pattern_gridsize 2018-06-12 16:24:05 +02:00
bebc6bfee6 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/datafiles/CMakeLists.txt
	source/blender/makesdna/DNA_material_types.h
2018-06-12 15:46:08 +02:00
dc422dcdbf PEP8 Style 2018-06-13 01:40:28 +12:00
795a266697 Added missing "Custom Properties" panel for GP Objects 2018-06-13 01:40:28 +12:00
7d0ad0d441 UI: Check if the material has gpencil data to show panel 2018-06-12 15:38:45 +02:00
ce5ecd19b3 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/include/ED_object.h
	source/blender/editors/object/object_modifier.c
2018-06-12 13:56:46 +02:00
3721b857c6 GP Branch: Update gpl->actframe in depsgraph callbacks (fixes COW-related issues)
This commit fixes various problems across the codebase
caused by the fact that the gpl->actframe pointers no longer
get updated on redraw, meaning that various editing tools
were not working.

Applying a similar solution to 59a516913e
here: On the exit node for GP data evaluation, we flush the changed
actframe pointers back to main database, so that the main db
is consistent with the displayed time.

Notes:
- For now, we just reuse the BKE_gpencil_eval_geometry() callback,
  since it's the only one there and nothing else was happening there.
  In future, when we do convert the GP modifier stack evaluation away
  from its drawing-engine based approach, we should split this out into
  its own function.

- We also do the actframe update in the COW domain here. While it's
  not strictly needed for anything right now, this is something that
  should really have been happening, so let's do it the proper way now.

- The alternative approach would've been to modify all GP related
  context functions to set this whenever they were called. But that
  carries performance penalties, and isn't such a nice solution,
  as context getters should really not have side-effects.
2018-06-12 23:39:25 +12:00
d69ac37f85 Fixes after merge
Some parameter list change.

Also disabled some functions that will not be used in annotations. Keep the function as reference to be removed when annotation will be back.
2018-06-12 12:49:15 +02:00
e9964ed175 Merge branch 'blender2.8' into greasepencil-object 2018-06-12 12:40:39 +02:00
d3f35b58da Add comments to review context creation in render 2018-06-11 17:55:15 +02:00
3bacfa08f9 Add missing parameter after merge 2018-06-11 17:54:32 +02:00
d296a846c6 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
2018-06-11 17:41:11 +02:00
e00948e9e8 Fix errors after merge 2018-06-11 16:00:58 +02:00
7dbdd96912 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/object_update.c
2018-06-11 15:51:02 +02:00
Nick Wu
d3ba4b3535 depth behave weird, fixed multisample on snake result. 2018-06-11 18:22:39 +08:00
3faa0e6c54 Fix segment fault in weight paint for 2.8 old files
This code would be moved to versioning code after merge, but now it's required to manage files created with previous versions of 2.8 (not 2.7x)
2018-06-11 11:38:27 +02:00
e98b9d3c9c Remove mode switching custom code
This code is not required because the mode switching is not done with keys 1..9
2018-06-11 11:27:14 +02:00
Nick Wu
4a63d0c9f0 added depth-alpha line style control (pre multiply) 2018-06-11 15:02:27 +08:00
67cfa736b4 Merge branch 'blender2.8' into greasepencil-object 2018-06-11 08:55:55 +02:00
Nick Wu
d64862f778 Add: depth controlled line width. 2018-06-11 14:02:36 +08:00
Nick Wu
711c3f504e Added multisampe support functions in DRW. transform_to_screen later. 2018-06-11 10:38:23 +08:00
Nick Wu
28823638f1 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
Conflicts:
	source/tools
2018-06-11 09:54:18 +08:00
98021bd7d1 Move multisample textures to texture list
If the texture is in e_data is shared for all viewports and fails.
2018-06-10 20:56:56 +02:00
63dcb04a71 Cleanup GP multisample code 2018-06-10 20:18:53 +02:00
952d9559d2 Merge branch 'blender2.8' into greasepencil-object 2018-06-10 16:47:02 +02:00
e6995bb77f Merge branch 'blender2.8' into greasepencil-object 2018-06-10 10:47:42 +02:00
3b94a96fa1 Merge branch 'blender2.8' into greasepencil-object 2018-06-09 19:49:47 +02:00
e51e9bda6f Merge branch 'blender2.8' into greasepencil-object 2018-06-09 16:07:52 +02:00
ea7740addc Cleanup: Remove unused line 2018-06-09 13:37:13 +02:00
827b7de9d6 Add a new User Prefs parameter to control GP multisample AA
For general use of Viewport the multisample AA is not required and can produce errors in selection, but for grease pencil the AA is required all the time to get smooth lines, so a new parameter has been added to User Prefs screen to define this value.

If we use the same value for both AA (grease pencil and Viewport), the viewport would be intefered by grease pencil settings.

The new value is below Viewport Samples.

By default the value was set to 4 samples.

This changes was done as result of requirement of grease pencil development team artists.
2018-06-09 13:30:36 +02:00
1c85a74c44 WIP: Add parameter to multisample 2018-06-09 13:30:36 +02:00
6816582b5a Merge branch 'blender2.8' into greasepencil-object 2018-06-09 09:29:06 +02:00
71dc55e3bb Fix errors after merge 2018-06-08 18:02:51 +02:00
1beeff419e Merge branch 'blender2.8' into greasepencil-object
source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/gpencil/gpencil_paint.c
	source/blender/editors/gpencil/gpencil_utils.c
	source/blender/editors/space_view3d/view3d_ruler.c
2018-06-08 17:50:59 +02:00
b76343410b Changes in Fill tool
There were some problems with the mouse position and the new TopBar.

Some changes done in order to avoid get_pixel error, but I could not reproduce the crash in Windows.
2018-06-08 16:45:15 +02:00
42e6b9217f Merge branch 'blender2.8' into greasepencil-object 2018-06-08 10:58:21 +02:00
ad5196b075 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
	source/blender/editors/object/object_ops.c
2018-06-08 09:55:29 +02:00
7afa353d5e Redo stats calculation
Now the stat info is saved in the datablock to avoid recalculations and the stats are calculated in one function.

Still pending move the update of the stats to a better place to calculate only when the object change, maybe in depsgraph evaluation.
2018-06-08 09:44:19 +02:00
7b4fc58a2a Fix macro argument use 2018-06-08 08:23:46 +02:00
4846f644a9 Merge branch 'blender2.8' into greasepencil-object 2018-06-07 19:24:26 +02:00
3b5d9ce441 Move Info panel to Bottom Bar Statistics
Now the info appears in the same place that other object types.
2018-06-07 19:15:12 +02:00
9e1bdca3ba Merge branch 'blender2.8' into greasepencil-object 2018-06-07 18:00:21 +02:00
2882430d37 Reorganize Mix Color with Texture
Now, the mis is only with texture to avoid duplicate texture parameters that made the panel difficult to understand.
2018-06-07 17:51:12 +02:00
e5615c7835 UI: Include Stroke and Fill as subpanels of Surface Panel. 2018-06-07 17:39:21 +02:00
1f388a2188 UI: Move Pass Index to separate Panel 2018-06-07 17:23:03 +02:00
816d9beec2 UI: More changes in Viewport Display Panel 2018-06-07 16:47:03 +02:00
68a9bb0268 UI: Replace label to "Stroke Thickness" 2018-06-07 16:43:49 +02:00
aafeefe927 UI: Rename label "Use in Render" to "View In Render" 2018-06-07 16:42:13 +02:00
61b69af84f Remove unused Layer Onion Skinning fields
These fileds are not used because the Layer override was removed in a previous commit.
2018-06-07 16:39:59 +02:00
bd2c4ba698 Disable Onion Skinning for old Drawing methods
This code will be used for annotations and is not requiered.
2018-06-07 16:25:35 +02:00
dbc0ea9aff Disable debug lines to avoid compiler error 2018-06-07 16:20:51 +02:00
Nick Wu
42990349c6 Fixed include file error (caused by merge?) 2018-06-07 21:11:05 +08:00
89a843b7dc Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2018-06-07 14:39:29 +02:00
Nick Wu
38cb2515df Fix snake mode reload. 2018-06-07 19:49:39 +08:00
Nick Wu
30947f2208 Now use one-time scene loading. Line/Polygon smooth added. 2018-06-07 18:56:17 +08:00
c5fbf68d68 Cleanup: Fix comment 2018-06-07 09:35:19 +02:00
212477f6ee Fix uniform name
The uniform variable name was wrong.
2018-06-07 09:24:01 +02:00
5d2f63c090 UI: More changes in Fill panel
Fix some issues with pattern type.
2018-06-07 09:22:09 +02:00
b40df071d8 Remove Onion Skinning override by Layer
This option is not required and only add complexity.

The UI panel was removed in a previous commit.
2018-06-07 09:10:45 +02:00
Nick Wu
79407c7b6e Uniform assign error fixed 2018-06-07 14:56:43 +08:00
Nick Wu
ee7e4a7d95 Fixed snake line taper error induced by combined batch. 2018-06-07 14:45:47 +08:00
3763f61104 UI: Remove duplicate "Layer" Header text
Now these panels are subpanels of Layer, so it's better don't duplicate name.
2018-06-07 08:08:03 +02:00
Nick Wu
54670f2722 Seperated different algorithms into 3 files. Init code minor changes. 2018-06-07 11:42:58 +08:00
Nick Wu
054e889a93 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
Conflicts:
	release/scripts/addons
	release/scripts/addons_contrib
	source/tools
2018-06-07 10:30:18 +08:00
5b17fa3388 Merge branch 'blender2.8' into greasepencil-object 2018-06-06 21:43:02 +02:00
ebaccc96a5 Cleanup: Fix comment typo 2018-06-06 20:18:10 +02:00
84eae294ae WIP: More changes in Fill Panel 2018-06-06 20:17:18 +02:00
5ed5c45e20 WIP: Redesign Fill Material Panel and options
- Change the Pattern style as an option inside Texture.
- Define only a gradient type with Linear or Radial modes.

Still the panels are not working with the right options by mode.
2018-06-06 19:57:42 +02:00
484acb2b61 Remove Opacity parameter for Colors
In order to keep consistency with Blender UI, the color has included the alpha factor in the same property and not as separated value.

This improves the material slots too, because now you can set the alpha directly.
2018-06-06 18:53:04 +02:00
9ae27c2d24 UI: Move Panel Adjustments and Relations as Subpanels of Layers 2018-06-06 18:46:59 +02:00
97fbe76b7b UI: Small changes to Fill Panel 2018-06-06 18:16:04 +02:00
3a08a3aff2 UI: Changes in Stroke Panel 2018-06-06 18:03:02 +02:00
b119607691 UI: Changes in Viewport Display Panel 2018-06-06 17:57:49 +02:00
9256f8d306 UI: Remove Apply Layer thickness 2018-06-06 17:47:16 +02:00
6316a6753e UI: More changes in Onion Panel 2018-06-06 17:42:44 +02:00
0e9a0f21c9 UI: Remove Panel Onion skinning by Layer 2018-06-06 17:35:43 +02:00
1e0ecd6d6f UI: Remove Lock and Delete frame
This is available in Dopesheet and Timeline
2018-06-06 17:27:01 +02:00
17d035db09 UI: Change Onion and Parent panels 2018-06-06 17:22:45 +02:00
9394609d4e UI: Change panel Layer Adjustments 2018-06-06 17:04:18 +02:00
0b4ef212b4 UI: Remove Debug option
This options must not be in the panel
2018-06-06 16:54:06 +02:00
9093ffdfa6 Fix errors after merge
There were brackets missing.
2018-06-06 16:24:46 +02:00
973e9e925e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_topbar.py
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2018-06-06 16:23:23 +02:00
570c7280ff Fix errors after merge (main->bmain) 2018-06-06 10:39:45 +02:00
d82685f57e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
	source/blender/blenloader/intern/versioning_280.c
2018-06-06 10:37:25 +02:00
6a7deb0bd5 UI: Remove debug option (show points)
This option is not needed in the panel.
2018-06-06 10:21:04 +02:00
900fd5ea62 UI: Rename Panel Display to Viewport Display 2018-06-06 09:19:55 +02:00
6bfd7c600e Fix error after merge 2018-06-05 17:10:16 +02:00
28e107f510 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
	release/scripts/startup/bl_ui/space_view3d.py
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
2018-06-05 17:04:51 +02:00
6619fcc22d Merge branch 'blender2.8' into greasepencil-object 2018-06-05 14:01:03 +02:00
Nick Wu
3664b38618 Fixed depth occlusion stupid error. 2018-06-05 15:22:41 +08:00
Nick Wu
094e25752a Merge branch 'soc-2018-npr' of git.blender.org:blender into soc-2018-npr 2018-06-05 14:47:42 +08:00
Nick Wu
6a5cde3b74 Fixed complier-specific errors. Use force reload. 2018-06-05 14:39:34 +08:00
Nick Wu
3991d0805c Fixed complier-specific errors. 2018-06-05 13:34:01 +08:00
Nick Wu
9f8fbefc15 Added DPIX/Snake switch function. SceneLANPR out of sync with RNA, wierd 2018-06-05 11:36:22 +08:00
1609740341 Update submodule references
This change has been created by merge, but really does not change anything.
2018-06-04 20:12:06 +02:00
f2d856f3c6 Disable all modes after convert file 2018-06-04 20:11:12 +02:00
45c5d7a659 Disable missing flag
The WEIGHT flag must be disable too.
2018-06-04 20:08:56 +02:00
b9e62248ff Merge branch 'blender2.8' into greasepencil-object 2018-06-04 19:35:06 +02:00
Nick Wu
8d647a8f7d Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-06-04 23:43:47 +08:00
Nick Wu
4db17993a7 Removed debug Fragdata outputs 2018-06-04 23:42:27 +08:00
8ddf68b6a7 Fix rename missing in previous commit
These fields were not renamed in previous commit.
2018-06-04 17:25:17 +02:00
Nick Wu
1fe9a56112 DPIX implemented and running. 2018-06-04 23:18:00 +08:00
6f76154cf2 Remove deprecated data and move to new file conversion tools
These tools are included inside a file with DNA_DEPRECATED_ALLOW
2018-06-04 17:07:12 +02:00
e4f03e2304 Merge branch 'blender2.8' into greasepencil-object 2018-06-04 15:34:07 +02:00
3c03e24376 Merge branch '28' into greasepencil-object 2018-06-04 11:28:38 +02:00
604b673945 Merge branch '28' into greasepencil-object 2018-06-04 11:26:40 +02:00
71d300573a Merge branch 'blender2.8' into greasepencil-object 2018-06-04 09:06:15 +02:00
Nick Wu
6e44f612b0 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
Conflicts:
	release/scripts/addons
	release/scripts/addons_contrib
2018-06-04 10:14:22 +08:00
Nick Wu
cffef6cee5 Included DPIX Code, prevent compile. 2018-06-04 10:11:27 +08:00
fc2e0b6c6d Merge branch 'blender2.8' into greasepencil-object 2018-06-03 16:20:20 +02:00
47f4ca032b Merge branch 'blender2.8' into greasepencil-object 2018-06-03 09:41:32 +02:00
374e08db00 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/object.c
2018-06-01 19:38:27 +02:00
99cc3f81f3 Remap mode keymaps and solve merge issue
The keymap has been changed and there was a merge error.
2018-06-01 15:35:03 +02:00
ebd273db72 Merge branch 'blender2.8' into greasepencil-object 2018-06-01 15:20:37 +02:00
71d4bbf8da Merge branch 'blender2.8' into greasepencil-object
Conflicts:
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/makesrna/intern/rna_material.c
2018-06-01 13:21:20 +02:00
9911106534 More fixes after merge 2018-06-01 10:02:31 +02:00
d4eac6f998 Fix parameter values after merge
This python function needs different settings after merge.
2018-06-01 09:19:39 +02:00
4a9b3a76b5 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
release/scripts/startup/bl_ui/space_topbar.py
2018-06-01 09:13:08 +02:00
034c2c800e UI: Hide weight tools for non GP Objects
This poll method was missing in previous commit
2018-05-31 23:09:21 +02:00
93a61f4ab6 Merge branch 'blender2.8' into greasepencil-object 2018-05-31 19:26:06 +02:00
9e9453f1c6 Merge branch 'blender2.8' into greasepencil-object 2018-05-31 18:19:32 +02:00
6b53fc7b79 Fix color picker panel position
This is ahack to avoid the panel is shifted to the right. It looks the function to calculate the visible rect is using the toolbar size, but the view is full width.
2018-05-31 17:03:30 +02:00
1bc6089230 Merge branch 'blender2.8' into greasepencil-object 2018-05-31 16:50:13 +02:00
c3f08234aa UI: Back edit line button to previous place 2018-05-31 16:46:28 +02:00
bd7ccd4e95 UI: Remove redundanrt options moved to Top Bar 2018-05-31 16:11:33 +02:00
3a6328f389 UI: Replace icon 2018-05-31 16:06:45 +02:00
2e47506f8c UI: Move Multiframe ON/OFF to Topbar
Before it was inside the panel.

Thanks Pablo Vazquez for his help.
2018-05-31 16:02:49 +02:00
6e8a388e14 Do not hide grease pencil when disable Overlays
After adding the new grease pencil context modes, the draw must be done always.
2018-05-31 15:22:51 +02:00
7d294eade0 Merge branch 'blender2.8' into greasepencil-object 2018-05-31 13:29:57 +02:00
6c791e47ca UI: Fix multiframe ON/OFF option 2018-05-31 12:13:14 +02:00
76f84efcda Merge branch 'blender2.8' into greasepencil-object 2018-05-31 11:58:49 +02:00
9fc36300de UI: Fix curve controls
The template_curve_mapping is not working inside a box layout..
2018-05-31 11:58:08 +02:00
97f867f9f5 UI: Undo move to Top Bar for some panels with operators
The Top Bar must be used for settings only and never for operators.
2018-05-31 11:49:55 +02:00
2335390a3c Undo previous context change
These operators cannot be used in Top Bar, so this context is not required.
2018-05-31 11:47:37 +02:00
3e1fa48d39 UI: Move panels to Top Bar
Still some problems with operators using context data.
2018-05-31 11:07:18 +02:00
fc256d3233 Add TOPBAR context to poll functions 2018-05-31 11:06:41 +02:00
a155470363 Fix typo error in Stroke Panel 2018-05-31 09:52:55 +02:00
Nick Wu
e69e3553ed Implementing DPIX algorithm. (in progress, do not compile!) 2018-05-31 10:35:28 +08:00
9d47e56e47 UI: Move some panels to toolbar 2018-05-30 20:33:12 +02:00
2d65b34f16 Add new context modes for grease pencil
These modes were missing.
2018-05-30 20:15:53 +02:00
15b1acc6b5 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_scene.py
        source/blender/makesrna/intern/rna_object.c
2018-05-30 19:28:24 +02:00
b44e74cd77 Cleanup inactive code 2018-05-30 17:47:30 +02:00
73b91e0d05 Merge branch 'blender2.8' into greasepencil-object 2018-05-30 16:57:19 +02:00
21e2cdce54 Rework in modifers apply parameters
Instead to pass the Context variable that it was used to get bmain pointer,now bmain is passed as parameter to reduce data and avoid any use of Context.
2018-05-30 16:52:37 +02:00
9af8923d82 Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2018-05-30 16:34:54 +02:00
eb66c19a5c Remove context parameter
This parameter is removed because Context must be avoided.
2018-05-30 16:33:18 +02:00
30ccca03d4 Redo mode settings after merge
This code section was changed in the last merge
2018-05-30 16:28:42 +02:00
5560722e34 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/include/ED_object.h
	source/blender/editors/object/object_edit.c
	source/blender/editors/object/object_ops.c
2018-05-30 16:25:09 +02:00
0894fb5749 Cleanup: shadowed var 2018-05-30 16:01:49 +02:00
bdd290cb81 Modify mode set routine to enable grease pencil modes
Now, when you press the numeric key to change mode, if the object is grease pencil, the grease pencil mode is enabled.
2018-05-30 16:00:04 +02:00
d038c07e4c Remove keymap for changing brush using numbers
This brush selection wil be replaced with spacebar and a menu.
2018-05-30 15:46:31 +02:00
aa722e8193 Remove old mode switching Keymaps
These keymaps are conflicted with new mode switching keymaps.
2018-05-30 10:27:53 +02:00
6d8bc03252 Disable old mode switching code 2018-05-30 10:27:14 +02:00
ba064952cb Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/addons
	release/scripts/addons_contrib
	source/blender/editors/object/object_edit.c
2018-05-30 08:47:44 +02:00
5edc1d475d Fix parameter list for some functions after merge 2018-05-29 17:59:45 +02:00
22a14f8d5c Merge branch 'blender2.8' into greasepencil-object 2018-05-29 17:38:28 +02:00
958a509c37 Filter dopesheet channel to OB_GPENCIL only
This filter using ob->data is evaluated for any object type and this can produce problems.

In the future, when grease pencil dopesheet will be merge with "normal" dopesheet, this section must be recoded.
2018-05-29 17:34:43 +02:00
Nick Wu
8b2722b200 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-05-29 22:16:35 +08:00
Nick Wu
c4583135e7 line drawing in one batch, greatly improve performance. modified UI. 2018-05-29 22:04:19 +08:00
f71cd9fb1a Cleanup: Rename depsgraph variable 2018-05-29 12:49:40 +02:00
762a08399b Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/gpencil/gpencil_paint.c
2018-05-29 12:38:38 +02:00
9fad3cc35c Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2018-05-29 10:08:22 +02:00
6b238fd4ae Fix missing renames in previous commit 2018-05-29 08:51:53 +02:00
92a69a383f Cleanup: some missing renames from last commit
Also whitespace edits
2018-05-29 08:51:41 +02:00
ead47fa2a2 Merge branch 'blender2.8' into greasepencil-object 2018-05-29 08:40:22 +02:00
663e918b09 Cleanup: rename color members in gpencil style
It reads like a bug to store alpha in variables named 'rgb'

Also remove some redundant casts.
2018-05-28 20:19:36 +02:00
8e54aaf41f Cleanup: remove gp_ prefix from variable names
These are already in a grease pencil struct.
2018-05-28 19:28:16 +02:00
b1097f17c6 Merge branch 'blender2.8' into greasepencil-object 2018-05-28 17:39:52 +02:00
Nick Wu
a51a683993 Merge remote-tracking branch 'remotes/origin/soc-2018-npr' into soc-2018-npr
Conflicts:
	intern/cycles/blender/blender_python.cpp
2018-05-28 21:55:49 +08:00
Nick Wu
07a132f695 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr
f32a7.
2018-05-28 21:49:20 +08:00
e0f33eb662 Merge branch 'blender2.8' into greasepencil-object 2018-05-28 15:28:21 +02:00
Nick Wu
9bf620392f fixed weird problem in blender/blender_python.cpp 2018-05-28 21:26:19 +08:00
Nick Wu
eb90e6944b Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-05-28 12:38:05 +08:00
Nick Wu
afbda949cf Snake works. Added color options. Performance need optimization. 2018-05-28 12:36:29 +08:00
34592648b7 Merge branch 'blender2.8' into greasepencil-object 2018-05-27 22:06:34 +02:00
f03895b9c6 Merge branch 'blender2.8' into greasepencil-object 2018-05-27 09:02:12 +02:00
490a342555 Merge branch 'blender2.8' into greasepencil-object 2018-05-26 09:02:27 +02:00
46db0fe3c8 Merge branch 'blender2.8' into greasepencil-object 2018-05-25 19:28:36 +02:00
1c6a39c924 Merge branch 'blender2.8' into greasepencil-object 2018-05-25 15:53:00 +02:00
9de639b0d5 Cleanup: Remove unused flag GP_STROKE_RECALC_COLOR
This flag was used when the color name was the link to the palette color, but now with materials this flag is not required.
2018-05-25 12:08:21 +02:00
a8fc8a5f7d Merge branch 'blender2.8' into greasepencil-object 2018-05-25 10:14:34 +02:00
Nick Wu
fe815dc4da Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-05-25 14:35:02 +08:00
Nick Wu
788f35a4d5 Vector okay, CEASH EXPECTED! 2018-05-25 14:33:03 +08:00
5bc9b73944 Tag COW after select to update strokes 2018-05-24 19:17:22 +02:00
ab5ba0cef8 Merge branch 'blender2.8' into greasepencil-object 2018-05-24 19:05:49 +02:00
710b0b6e8e Merge branch 'blender2.8' into greasepencil-object 2018-05-24 16:49:13 +02:00
44ded54154 Fix error converting old 2.7 files
The color name was deleted before conversion and the memory allocation was wrong.
2018-05-24 16:42:10 +02:00
e3f221a844 Cleanup: unused variable 2018-05-24 14:01:39 +02:00
6e37800070 Merge branch 'blender2.8' into greasepencil-object 2018-05-24 13:54:44 +02:00
Nick Wu
cde785e986 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-05-24 15:38:04 +08:00
Nick Wu
21045172ac what... 2018-05-24 15:35:37 +08:00
Nick Wu
80ec390d07 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-05-24 15:11:43 +08:00
Nick Wu
e37ff11312 changed a bit of argument uniform to match the API.(not working properly) 2018-05-24 15:10:29 +08:00
ae0de604e4 Merge branch 'blender2.8' into greasepencil-object 2018-05-24 08:31:25 +02:00
Nick Wu
241873023e Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-05-24 09:51:07 +08:00
Nick Wu
ad228f8e46 Edge thinning shader ok 2018-05-24 09:49:17 +08:00
09924fcdd1 Merge branch 'blender2.8' into greasepencil-object 2018-05-23 19:35:33 +02:00
91b7ee2ca3 WIP: Fix errors converting old 2.7 files
The brushes were not created and the palette must be removed.

The operator only works if Eevee engine is enabled. Cycles engine selected always fails.
2018-05-23 19:35:13 +02:00
Nick Wu
5cef17a439 Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr 2018-05-23 23:39:40 +08:00
Nick Wu
c7ef4704f9 Image filters ok, added ui adjustment(stub), prepared for vectorization. 2018-05-23 22:50:18 +08:00
852b5c58ab Merge branch 'blender2.8' into greasepencil-object 2018-05-23 16:38:09 +02:00
572b147d5b WIP: New operator to convert 2.7 grease pencil files
The operator convert the old 2.7x files to the new materials of 2.8.

This code is not defined in versioning code to avoid conversion of annotations.

Still pending some issues.
2018-05-23 16:37:32 +02:00
fe22793515 Merge branch 'blender2.8' into greasepencil-object 2018-05-23 10:37:10 +02:00
478c1ebb23 Cleanup: Reformat code 2018-05-22 19:35:15 +02:00
938a6c972a Cleanup: Fix comment 2018-05-22 19:29:04 +02:00
3502953167 Merge branch 'blender2.8' into greasepencil-object 2018-05-22 19:21:56 +02:00
350b660b65 Cleanup typo error 2018-05-22 19:20:11 +02:00
b9256d122f Move simplify options to Scene->RenderData struct
Before these change, the settings were defined in ToolSettings struct, but must be in the same struct that other scene simplify options.
2018-05-22 19:18:37 +02:00
67960e8d79 Cleanup: unused warnings 2018-05-22 16:52:41 +02:00
00907964d9 Merge branch 'blender2.8' into greasepencil-object 2018-05-22 16:42:22 +02:00
Nick Wu
7d1224406c Made a switch under Scene, and added files for LANPR adoptation. 2018-05-22 15:01:16 +08:00
0464a65ac3 Merge branch 'blender2.8' into greasepencil-object 2018-05-21 16:13:20 +02:00
26d507fbc0 Merge branch 'blender2.8' into greasepencil-object 2018-05-21 10:29:40 +02:00
5713dc558b Merge branch 'blender2.8' into greasepencil-object 2018-05-20 19:30:35 +02:00
60c4e20d9f Merge branch 'blender2.8' into greasepencil-object 2018-05-20 11:19:52 +02:00
b5dfa1108d Move random array function to BLI_rand
This function fills an array of random numbers
2018-05-20 11:17:43 +02:00
1b1baeeb0f Merge branch 'blender2.8' into greasepencil-object 2018-05-19 18:21:42 +02:00
c0ed6a6bea Remove scene->gpd deprecated 2018-05-19 18:20:56 +02:00
a1be8ef68e Fix merge problems and parameter list changes 2018-05-19 13:24:56 +02:00
f46e914448 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/CMakeLists.txt
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/library_query.c
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/versioning_280.c
	source/blender/collada/SceneExporter.cpp
	source/blender/editors/gpencil/gpencil_convert.c
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_relations.c
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/editors/space_outliner/outliner_select.c
2018-05-19 13:05:23 +02:00
2406b8b8d0 Verify pointer before assign material 2018-05-18 18:41:52 +02:00
ca69d50031 Cleanup: Check pointer before link 2018-05-18 18:39:25 +02:00
8b76fb8c28 Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2018-05-18 18:35:38 +02:00
8fc732d419 Refactor Brush Setting to new struct
This change moves the settings of grease pencil brush to a new sub struct.

WIP: Still not working the brush curves in the UI. The curves are working but don't appear in the UI panel.
2018-05-18 18:35:26 +02:00
577f93c399 Replace CFRA with DEG_get_ctime()
The CFRA value is not updated using COW.
2018-05-18 16:40:39 +02:00
3eab7fa512 Merge branch 'blender2.8' into greasepencil-object 2018-05-18 12:19:37 +02:00
bf375544cc Cleanup: use function to free weights 2018-05-18 12:16:49 +02:00
630f4a07d2 Replace CFRA with Depsgraph time to fix animation
The animation was not working because the number of current frame was not evaluated from depsgraph.
2018-05-18 10:38:43 +02:00
fb5e3fe050 Merge branch 'blender2.8' into greasepencil-object 2018-05-18 09:54:23 +02:00
c038ac8cad Modify rotate around cursor to use Trans Object
Now the object pointer is saved in the transformation data struct instead to use the viewlayer active object.
2018-05-17 19:28:16 +02:00
77ea4174d5 Merge branch 'blender2.8' into greasepencil-object 2018-05-17 18:57:14 +02:00
768fa47cf6 Add fix for rotation around cursor
NOTICE: This fix solves the problem rotating around 3D cursor, but it will need a review to use with multiedit.
2018-05-17 18:55:02 +02:00
19f7e2e674 Merge branch 'blender2.8' into greasepencil-object 2018-05-17 16:19:59 +02:00
0b4450124b Merge branch 'blender2.8' into greasepencil-object 2018-05-17 14:13:32 +02:00
0da4f410fb Merge branch 'blender2.8' into greasepencil-object 2018-05-17 10:05:56 +02:00
e6e46425aa Merge branch 'blender2.8' into greasepencil-object 2018-05-16 19:09:41 +02:00
895f4415f8 Fix error after merge: Parameter list change 2018-05-16 17:47:16 +02:00
1919eb7c9b Merge branch 'blender2.8' into greasepencil-object 2018-05-16 17:38:05 +02:00
5739e30fcb Add missing realloc for weights in RNA api
Fixed wrong weight field name too.
2018-05-16 17:22:52 +02:00
7532d611be Fix ruler weights array allocation 2018-05-16 17:18:50 +02:00
ff709b3784 Add missing weights array memory copy 2018-05-16 17:14:16 +02:00
ef4a169b94 Missing allocN line in previous commit 2018-05-16 16:47:56 +02:00
2ffbbfd67e Fix add primitive operator
The weight array was not reallocated.
2018-05-16 16:45:59 +02:00
304cb33533 Add initialization code for weights array
Cleanup unused code too.

Warning: This code is disabled, but add the fix for future use.
2018-05-16 16:40:26 +02:00
fceaa5f5f4 Define RNA properties for stroke weights 2018-05-16 16:34:57 +02:00
5c260a779c Cleanup: Remove old weights code 2018-05-16 16:10:37 +02:00
bd79c02c4b Fix error loading saved files
The weight array was not initializated.
2018-05-16 16:07:48 +02:00
5304756e2d Cleanup: Remove old unused functions
These functions were used by old drawing methods, but now they have been replaced with draw manager.
2018-05-16 16:00:13 +02:00
a7625df93e Cleanup: Remove unused parameter 2018-05-16 15:33:29 +02:00
82bffc68d8 Fix dissolve operator
The indices were wrong
2018-05-16 11:02:24 +02:00
f29b8c7fa8 Cleanup: Remove unused parameter 2018-05-16 10:51:17 +02:00
3e218ed6f5 ix simplify stroke segment fault
The index of the weights array was wrong.

WIP: Still there is a problem with  simplify adaptative.
2018-05-16 10:49:20 +02:00
03bb81f08d Fix field name error 2018-05-16 10:34:41 +02:00
619cc12b57 Add missing main weight array duplication 2018-05-16 10:16:31 +02:00
8f9e7de138 Fix segment fault when draw strokes
The subdivide was not reallocating the weights array.
2018-05-16 10:04:26 +02:00
9750e5c6f3 Cleanup: Remove duplicate and unused code 2018-05-16 09:48:34 +02:00
54be35123d Merge branch 'greasepencil-object' into experimental_gp_weight 2018-05-16 09:17:35 +02:00
cf53e1ca00 Merge branch 'blender2.8' into greasepencil-object 2018-05-16 09:16:54 +02:00
cffa00cbba Cleanup redundant code 2018-05-15 20:16:23 +02:00
13d411ccba Cleanup free code 2018-05-15 20:12:41 +02:00
c1c7df1c9c Move dupalloc outside duplicate function 2018-05-15 18:34:11 +02:00
3fe4232223 WIP: First compilation after change weights
This code is not tested, but as this is the first compilation without error, save this point as backup.
2018-05-15 17:55:49 +02:00
30beb53b78 WIP: Initial change of weight struct
This commit is not completed. Saved to get a backup point.
2018-05-15 14:04:15 +02:00
c5b72fd70e Rename field factor to weight
This is a previous step to move weights to MDeformVert
2018-05-15 12:52:45 +02:00
16ded67d80 Rename weight index field
This commit is a previous step to move the weights to MDeformVert and MDeformWeight
2018-05-15 12:45:38 +02:00
e6daa661bc Remove some deprecated scene->gpd
Still some pending.
2018-05-15 11:30:44 +02:00
f2f3bf48f8 Merge branch 'blender2.8' into greasepencil-object 2018-05-15 10:41:56 +02:00
2521a18dd7 Cleanup code 2018-05-15 10:17:17 +02:00
c5971d1f80 Cleanup: Define alpha field. 2018-05-15 10:17:17 +02:00
b5e1b13fe8 Fix inconsistent usercount handling of MaterialGPencilStyle.ima/.sima
Readfile was treating them as refcounted, RNA as user-one, and libquery
as not refcounted at all!

Full usercount makes more sense here, those images are used as 'real'
data for GP materials, not as temp setting of a brush!
2018-05-15 10:13:00 +02:00
6b5a67a0ae Cleanup: Fix unused parameter warning. 2018-05-15 10:12:33 +02:00
98bc64731f Cleanup: fix error w/ const arg 2018-05-15 09:37:41 +02:00
dfa87d3729 Cleanup: Remove duplicate parameter (cont.) 2018-05-15 09:31:32 +02:00
fcc41fafeb Cleanup: Remove duplicate parameter 2018-05-15 09:27:20 +02:00
5b12f86c84 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/transform/transform_snap_object.c
2018-05-15 09:09:53 +02:00
8839d96395 Merge Object cache allocate and add functions
As both functions are called always together, it's better to have in one only.
2018-05-14 20:26:31 +02:00
64e8d0eaa6 RNA: Replace material api 2018-05-14 19:54:57 +02:00
69bc2cb538 Remove DNADEPRECATED Scene->gpd from library_query.c
Deprecated DNA shall only be used in readfile?versionning code...
2018-05-14 18:32:56 +02:00
35e8acfe79 Add missing Object parent pointer from bGPLayer to library_query. 2018-05-14 18:32:56 +02:00
bff285a01a Merge branch 'blender2.8' into greasepencil-object 2018-05-14 18:27:18 +02:00
73b0aaacb8 Cleanup: Modify comments 2018-05-14 18:18:20 +02:00
05ab5b98c7 Cleanup: Add Comments 2018-05-14 18:07:07 +02:00
478cb94161 Fix merge error 2018-05-14 16:15:02 +02:00
e121fb7bfe Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
2018-05-14 16:02:14 +02:00
7a6fa7eab9 Merge branch 'blender2.8' into greasepencil-object 2018-05-14 09:33:46 +02:00
40eda4f69c Cleanup: Remove unused header file 2018-05-13 17:56:26 +02:00
3cc2165ec5 Merge branch 'blender2.8' into greasepencil-object 2018-05-13 17:23:48 +02:00
4735ea927b Add Depsgraph parameter to calculate evaluate object matrix
The matrix for object and parent object need to be evaluated using depsgraph to get the right value.
2018-05-13 17:21:53 +02:00
f492e4a96b Fix error with parent matrix using COW
The obmat must be the evaluated object, not the object itself.
2018-05-13 14:07:56 +02:00
7cd3a98417 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/transform/transform.c
	source/blender/editors/transform/transform_conversions.c
2018-05-13 13:08:24 +02:00
83df53ccc8 Cleanup: Rename eGP_BrushIcons items 2018-05-13 13:00:19 +02:00
7c2db4036d Remove duplicate colors properties
These properties were to allow to change alpha in list of colors, but it can produe errors with animation.
2018-05-13 12:06:38 +02:00
51c9497d19 Merge branch 'blender2.8' into greasepencil-object 2018-05-12 21:06:39 +02:00
930a7a7b76 Cleanup: Rename function 2018-05-12 21:06:00 +02:00
e8f5844b58 Cleanup: Rename inverse_xxx to invert_xxx and GP_xxx_INVERSE_xxx to GP_xxx-INVERT_xxx 2018-05-12 20:08:29 +02:00
93114b508a Cleanup: Rename gpencil_fill_simplyfy_lvl to gpencil_fill_simplyfy_level 2018-05-12 19:56:22 +02:00
8f1224688e Cleanup: Rename keep_stroke_thickness to show_constant_thickness 2018-05-12 19:53:50 +02:00
16037ceff0 Rename field cur_thickness to curve_thickness 2018-05-12 19:46:07 +02:00
7c78f66926 Cleanup: Remove unused declaration 2018-05-12 19:45:41 +02:00
8bfb6dbdae Add DNA_DEPRECATED to old scene gpd field 2018-05-12 19:45:21 +02:00
ad4e9ef956 Move bGPdata runtime data to bGPdata_runtime struct 2018-05-12 19:11:06 +02:00
e442206701 Add DNA_DEPRECATED to old Palettes 2018-05-12 19:05:59 +02:00
98f8f324d0 Move bGPDlayer runtime data to bGPDlayer_runtime struct 2018-05-12 19:03:49 +02:00
879a77b08b Remove view_layer option for render (F12)
This option allowed to filter a grease pencil layer by view layer, but after merge review it was decided to remove.
2018-05-12 18:57:51 +02:00
b038e849a7 Move bGPDframe runtime data to bGPDframe_runtime struct 2018-05-12 18:47:38 +02:00
e471663da6 Move bGPDstroke runtime data to bGPDstroke_runtime struct 2018-05-12 18:43:26 +02:00
ad9ed38594 Cleanup: Rename field falloff to multi_frame_falloff 2018-05-12 18:29:35 +02:00
7d9043511c Cleanup: Remove unused code 2018-05-12 17:36:16 +02:00
7507432ccf Cleanup: Remove unused total shaders fields
These fields were added to debug the nuber of shading groups created and to be sure all was removed.
2018-05-12 17:28:23 +02:00
607d2e807e Cleanup: Rename gpencil_geom.c to gpencil_draw_cache_impl.c 2018-05-12 17:15:36 +02:00
5c1c9a814e Cleanup: Rename gpencil_draw_cache_impl to gpencil_draw_utils.c 2018-05-12 17:12:34 +02:00
fcd6727f0e Cleanup: Reorganize functions 2018-05-12 17:08:04 +02:00
94130eff34 Fix stabilizer cursor line drawing
The cursor line was not correct because it was not using the Region visible rectangle and the line to last stroke point was adjusted as the stroke.
2018-05-12 16:49:59 +02:00
0aa2238205 Merge branch 'blender2.8' into greasepencil-object 2018-05-12 16:09:55 +02:00
a17123f670 Cleanup: modifier arg wrapping 2018-05-12 08:28:58 +02:00
986f895989 Merge branch 'blender2.8' into greasepencil-object 2018-05-12 08:28:11 +02:00
18b891111a Cleanup: warning 2018-05-12 08:27:35 +02:00
8f5bd85f39 Merge branch 'blender2.8' into greasepencil-object 2018-05-12 08:27:23 +02:00
1d0245b396 Move Render code to separate file 2018-05-11 20:02:20 +02:00
f5f64794c5 Fix cache_used error in previous commit 2018-05-11 19:44:22 +02:00
c3a9e6ad90 Reuse fullscreen quads instead to create new ones 2018-05-11 19:36:03 +02:00
f7f55485ba Cleanup: Remove debug lines 2018-05-11 19:33:19 +02:00
af0ba709f8 Remove DRW_gpencil_create_blank_texture function
This function is not needed and the same can be done with less lines.
2018-05-11 19:30:57 +02:00
c127e6cf83 Don't pass cache_used as pointer
The value is not changes and don't need the pointer.
2018-05-11 19:24:22 +02:00
bdc5b35c74 Move matrix initialization to stl initialization block 2018-05-11 19:16:28 +02:00
97507ba563 Cleanup: Remove unused code 2018-05-11 19:15:51 +02:00
65862c549e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/space_outliner/outliner_draw.c
2018-05-11 18:29:25 +02:00
aa2dfe1b02 Rename grease pencil modifier callbacks
Add the prefix gp_
2018-05-11 18:27:00 +02:00
3001ce368b Fix operator to change brush size
The field was wrong after last rename
2018-05-11 18:17:48 +02:00
534a713dbf WIP: Remove duplicate fields gp_lazy_radius and gp_lazy_factor
These fields have been moved to existing smooth_stroke_radius and smooth_stroke_factor.
2018-05-11 18:09:32 +02:00
2f29a45986 Resuse Brush size field instead to use separated thickness field
Pending to reorganize Brush struct to remove unused pad bytes.
2018-05-11 17:54:35 +02:00
d2b6195bad Rename brush cur_xxxx to curve_xxx 2018-05-11 17:35:23 +02:00
a62cc866b1 Cleanup: More renames 2018-05-11 17:30:25 +02:00
9771c008da Rename gradient and texture fields 2018-05-11 17:13:55 +02:00
287703cc4f Rename functions to use "material" instead of "color" 2018-05-11 16:59:13 +02:00
60a99fbff6 Rename GPC_xxx to GP_STYLE_xxx 2018-05-11 16:56:50 +02:00
26f6036242 Rename struct GpencilColorData to MaterialGPencilStyle 2018-05-11 16:49:53 +02:00
ca20817c7c Rename field gpcolor to gp_style 2018-05-11 16:43:38 +02:00
2e9a10c9a3 Remove unused ADS_FILTER_NOPALETTE 2018-05-11 16:31:57 +02:00
6ddb176e7a Cleanup: More function rename 2018-05-11 16:25:09 +02:00
2079edea93 Rename BKE_gp_smooth_stroke to BKE_gpencil_smooth_stroke 2018-05-11 16:23:12 +02:00
cffb84d8b2 Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2018-05-11 16:20:11 +02:00
41957200b9 Rename BKE_gpencil_free_frame_temp_data to BKE_gpencil_free_frame_runtime_data 2018-05-11 16:19:53 +02:00
3a2935983c Cleanup: make LatticeDeformData private again
Matches master/2.8 branch.
2018-05-11 16:17:35 +02:00
c0e1771421 Cleanup: quiet warnings 2018-05-11 16:17:35 +02:00
b5f8c9d33e Cleanup: Replace () with {} 2018-05-11 16:16:42 +02:00
745ce35f8c Add missing break statement 2018-05-11 13:55:31 +02:00
6cb893f932 Merge branch 'blender2.8' into greasepencil-object 2018-05-11 13:53:34 +02:00
af88ef8336 Merge branch 'blender2.8' into greasepencil-object 2018-05-11 11:02:12 +02:00
ee11d4d556 Merge branch 'blender2.8' into greasepencil-object 2018-05-11 08:50:55 +02:00
6dd4622102 Merge branch 'blender2.8' into greasepencil-object 2018-05-10 17:53:28 +02:00
d0946b8420 Rename Gpencil<ModName>ModifierData to <ModName>GPencilModifierData 2018-05-10 17:52:49 +02:00
43993d7a55 Rename eModifierType_Gpencil<ModName> to eModifierType_GPencil_<ModName> 2018-05-10 17:00:43 +02:00
11cfa9eeda Merge branch 'blender2.8' into greasepencil-object 2018-05-10 08:41:40 +02:00
d2fc17fde3 Enable AA disabled by error in previous commit
This line was disabled by a temp commit to compile and must be enabled again.
2018-05-09 22:06:27 +02:00
77b58ec582 Merge branch 'blender2.8' into greasepencil-object 2018-05-09 19:00:24 +02:00
affd736c32 Cleanup: Style 2018-05-09 16:36:03 +02:00
00591fc2a7 Cleanup: Removing stuff that was added earlier but is no longer needed 2018-05-09 16:36:03 +02:00
05e5a72af5 Fix segment fault for modifiers with COW enabled
The curves in copyData was freed, but the pointer was not set to NULL.
2018-05-09 16:23:35 +02:00
8e4604949c Merge branch 'blender2.8' into greasepencil-object 2018-05-09 15:23:15 +02:00
52cf83d5a4 UI: Move "Move to Color" and "Select Strokes" operators from popup menu into the UI proper
This brings the GP materials UI more into line with the standard object materials UI
2018-05-09 15:10:35 +02:00
641eac4eab Cleanup: Remove unused code (was from when we still used palette colors) 2018-05-09 14:43:56 +02:00
5f6ade530b Fix: Don't show panels/complain if material doesn't have GP material settings 2018-05-09 14:24:46 +02:00
6674a754e6 Cleanup: Remove old cruft 2018-05-09 14:24:46 +02:00
5feb8317d8 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_scene.py
2018-05-09 14:07:57 +02:00
96e759dd31 Merge branch 'blender2.8' into greasepencil-object 2018-05-09 10:04:57 +02:00
5484a03b2f Merge branch 'blender2.8' into greasepencil-object 2018-05-09 09:21:31 +02:00
ed5c95f2cd Cleanup: Remove "colorname" from GPStroke.new()
This isn't used now, so remove it to silence the compiler warnings here
2018-05-08 19:36:10 +02:00
ca8b80c321 Fix compiler warnings after API changes in 2.8 2018-05-08 19:12:28 +02:00
4d506e981e Merge branch 'blender2.8' into greasepencil-object
# Conflicts:
#	source/blender/blenloader/intern/versioning_280.c
#	source/blender/editors/gpencil/gpencil_edit.c
#	source/blender/editors/gpencil/gpencil_paint.c
#	source/blender/editors/gpencil/gpencil_utils.c
#	source/blender/editors/object/object_transform.c
2018-05-08 19:07:23 +02:00
74119ec5b0 Remove VFX simplify option 2018-05-08 18:15:07 +02:00
f010d2ef27 Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object
Conflicts:
	source/blender/draw/engines/gpencil/gpencil_engine.c
2018-05-08 18:08:42 +02:00
6537ab8812 WIP: Temporary/placeholder commit to get compiling working
Commented out all lines referring to vfx-related passes/buffers.
(Antonio: Please revert this commit, then commit proper fixes for each of these lines)
2018-05-08 17:56:38 +02:00
0b7cc1198b Remove VFX (more cleanup)
More changes to remove VFX modifiers and DOF.

Removed some unused code not removed in previous commit.

The temp texture A reused by general drawing has been enabled again (removed by error in previous commit) and renamed.

Fixed some lines removed by error in previous commit.

The modifer number in DNA_modifiers_types.h has been realigned to avoid any gap. This could produce some problems importing Hero files. Need check.
2018-05-08 17:55:14 +02:00
904e16f746 More build fixes - Removing more lingering modifier/dof defines 2018-05-08 17:55:04 +02:00
da246ccc50 More build fixes for VFX removal
Still not building, but these should also be safe
2018-05-08 17:33:01 +02:00
3e158b0a46 Remove VFX Modifiers + Defunct "DOF" Code
* As per code reviews (see T54721 and T54769), it was decided that the "VFX Modifiers"
  should not be in the modifiers stack, as they are not really modifiers. Instead, they
  are more like placeholders for shader effects on the object. For now, we simply remove
  these from the code, with a view towards designing a more general solution for all
  object types in 2.8 in future (e.g. as a "Viewport Effects" tab or similar in the Properties
  Editor)

* Also removed the "DOF" code. This was trying to copy what was done for Eevee, but the
  results were low quality, and the relevant code paths were already commented out.
  This code is also removed in this commit, as it depended a lot on many of the things
  put in place for the VFX modifiers, making removal of the VFX buffers complicated.
  Since it's not used now, it's not a big loss. Besides, with version control, we can
  bring this back in future.

NOTE: Blender still doesn't compile - there are still too many extra buffers hanging around
that need to be removed
2018-05-08 16:28:34 +02:00
44a4ed99ea Cleanup: Fix tabulation 2018-05-08 16:00:34 +02:00
3d60d221e4 Fix warning when select a object not GP
The onion skin panel needs a grease pencil layer.
2018-05-08 15:32:58 +02:00
8b9bd8a557 Cleanup: Operator properties for "GPENCIL_OT_multiedit_toggle"
* RNA_int -> RNA_boolean
* Rename "lines" to "toggle_visibility", as the previous name was ambiguous
2018-05-08 12:43:47 +02:00
d5ba36ecc1 Cleanup: Change the "back" parameter on GP editmode toggle operators from int to bool
It should have been a bool all along. However, it's debatable whether we should
even have this property to begin with, or a bunch of operators...
2018-05-08 12:38:35 +02:00
a6f9c29370 Fix: Re-enable toolshelf panels for GP tools
We will convert the UI later, so it can stay like this for now.
2018-05-08 11:48:00 +02:00
b4a4cbe7bb Cleanup: Simplify logic 2018-05-08 11:39:36 +02:00
cae3d19a8d Cleanup: Remove the old "total palettes" entry from the "Information" panel 2018-05-08 11:19:40 +02:00
46a58185ef Reshuffle order of panels in Propertes Editor -> Data, so that Datablock vs Layer settings aren't as mixed up 2018-05-08 11:18:25 +02:00
2eb0699272 Fix compiler warning - comment within comment 2018-05-08 11:05:06 +02:00
de00a05ade Merge branch 'blender2.8' into greasepencil-object 2018-05-08 10:49:37 +02:00
5bf9aca612 Merge branch 'blender2.8' into greasepencil-object 2018-05-07 17:28:05 +02:00
af11366d40 Fix AA error after draw manager changes
The AA was not working and the stroke was not visible while drawing due some changes in the draw manager.
2018-05-07 16:36:23 +02:00
b1accfaa19 Merge branch 'blender2.8' into greasepencil-object 2018-05-07 15:42:04 +02:00
74b338e57e Merge branch 'blender2.8' into greasepencil-object 2018-05-07 09:48:22 +02:00
a334ba5940 Merge branch 'blender2.8' into greasepencil-object 2018-05-06 17:41:38 +02:00
b9d8534161 Merge branch 'blender2.8' into greasepencil-object 2018-05-06 15:13:29 +02:00
a78341fe16 Cleanup: Remove unused and change comments 2018-05-06 15:12:17 +02:00
47402dd560 Color PIcker use list of materials not object materials
Now, the list shows all grease pencil materials and not only the materials of the active object.

If the material selected is not in the active object material slots, the material is added automatically when draw.
2018-05-06 13:37:48 +02:00
d10688dcee Cleanup: Rename function 2018-05-06 12:02:11 +02:00
a1b159d2f0 Cleanup: Remove unused parameter 2018-05-06 12:00:46 +02:00
8411afa034 Cleanup: Remove unused variable 2018-05-06 11:27:28 +02:00
2eb8779094 Use Brush material for Fill brush
Now the color used is the assigned to the brush and not the active color in material slots.
2018-05-06 11:25:22 +02:00
31a371f795 Fix compiler errors after merge 2018-05-06 10:51:19 +02:00
9b4931fdb7 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/makesdna/DNA_scene_types.h
2018-05-06 10:35:55 +02:00
c061daac12 Use as Brush Material default slot 1
Use always the first material as default if the brush hasn't assigned a material.

Before, the current slot was used as default, but this could create a misunderstanding and make the artist believe he could select the color in properties.
2018-05-05 17:17:32 +02:00
e4c6dee1d0 Merge branch 'blender2.8' into greasepencil-object 2018-05-05 12:06:45 +02:00
8c6a4a6512 Cleanup: Remove redundant function (and cleanup compiler warnings in the process)
BKE_gpencil_frame_color_duplicate() is no longer needed to perform Grease Pencil's
in-house "COW" operations. It was previously used to create a copy of the palette
datablock being used, and to then reassign all the color pointers. Now that that's
no longer needed, we can just use the standard one.

Note: BKE_gpencil_stroke_duplicate() has now been modified to NOT clear the triangles
array anymore. Instead, since most places that use this will clear/reallocate it
themselves, it's easier to just keep it there, making the COW stuff easier.
2018-05-04 18:53:18 +02:00
7726e46fe6 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2018-05-04 18:43:27 +02:00
e455c54eae Cleanup: Fix code format broken by previous commit 2018-05-04 17:34:56 +02:00
ba770b0160 Make color picker panel set Brush Material
When select  a color in the panel, the color is assigned to the current Brush as its default material.
2018-05-04 17:19:51 +02:00
9dab54562b Use Brush material for drawing instead of Active slot
Instead to use the active material in the list of materials, now always use the material assigned to Brush.

If the brush hasn't a material assigned, then the current slot is assigned as the brush material and it will be used in the next drawings of this brush.
2018-05-04 16:53:49 +02:00
6075b7d362 Fix: Only show GP add shapes panel when GP object is active 2018-05-04 16:27:17 +02:00
3a605ed044 Fix print about removed properties
* show_only_render has been removed. Instead, this is now handled through the
  overlays popovers. Therefore, we no longer need (or should have) a dedicated
  button for this.

* Removed also the lock camera button. This shouldn't be here in the first place,
  as it was a dedicated workflow-specific hack added for the Hero production workflow
  only.
2018-05-04 16:13:10 +02:00
8d3684c8b9 Cleanup: Remove the now unnecessary modifier_index parameter from Modifier->generateStrokes() 2018-05-04 16:03:17 +02:00
38718a6b6a Merge branch 'blender2.8' into greasepencil-object 2018-05-04 15:48:58 +02:00
0a28eb6dbe Fix compiler warnings after merge
* Adapted various DRW_* identifiers that got cleaned up in 2.8

* BKE_gpencil_frame_color_duplicate() - should be removed

* File versioning code for GP annotation datablocks - knock this out for now
  (since it's causing compiling problems due to the view layer stuff being
  deprecated). We need to review whether we do this type of patching automatically,
  since we don't really want GP annotations to show up on Cycles renders for example.
2018-05-04 15:48:22 +02:00
68b8ea0d06 Fix GP modifiers after merge (formatting/extra fields added to modifiers) 2018-05-04 12:41:21 +02:00
d6a38803e1 Merge branch 'blender2.8' into greasepencil-object
# Todo's / Need Further Review:
# - material.c - "man->gpcolor = NULL" (commented out for now)
# - rna_material.c - "rna_Material_update()" - Should GP material settings use their own update?
# - GP Modifiers typedefines need updating for the new struct layout
# - Merge conflicts in properties_gp_common.py - Mostly due to panels being removed in GP branch
# - GP Panels in 3D View (toolbar/topbar fixes postponed till after branch merge)
# - GP "Paper" Option/Settings (should become overlay? Design work needed)

# Conflicts:
#	release/scripts/addons
#	release/scripts/addons_contrib
#	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
#	release/scripts/startup/bl_ui/space_view3d.py
#	release/scripts/startup/bl_ui/space_view3d_toolbar.py
#	source/blender/blenkernel/BKE_modifier.h
#	source/blender/blenkernel/intern/material.c
#	source/blender/editors/object/object_transform.c
#	source/blender/editors/space_outliner/outliner_select.c
#	source/blender/gpu/intern/gpu_shader.c
#	source/blender/makesrna/intern/rna_material.c
#	source/blender/modifiers/intern/MOD_armature.c
#	source/blender/modifiers/intern/MOD_array.c
#	source/blender/modifiers/intern/MOD_bevel.c
#	source/blender/modifiers/intern/MOD_boolean.c
#	source/blender/modifiers/intern/MOD_build.c
#	source/blender/modifiers/intern/MOD_cast.c
#	source/blender/modifiers/intern/MOD_cloth.c
#	source/blender/modifiers/intern/MOD_collision.c
#	source/blender/modifiers/intern/MOD_correctivesmooth.c
#	source/blender/modifiers/intern/MOD_curve.c
#	source/blender/modifiers/intern/MOD_datatransfer.c
#	source/blender/modifiers/intern/MOD_decimate.c
#	source/blender/modifiers/intern/MOD_displace.c
#	source/blender/modifiers/intern/MOD_dynamicpaint.c
#	source/blender/modifiers/intern/MOD_edgesplit.c
#	source/blender/modifiers/intern/MOD_explode.c
#	source/blender/modifiers/intern/MOD_fluidsim.c
#	source/blender/modifiers/intern/MOD_hook.c
#	source/blender/modifiers/intern/MOD_laplaciandeform.c
#	source/blender/modifiers/intern/MOD_laplaciansmooth.c
#	source/blender/modifiers/intern/MOD_lattice.c
#	source/blender/modifiers/intern/MOD_mask.c
#	source/blender/modifiers/intern/MOD_meshcache.c
#	source/blender/modifiers/intern/MOD_meshdeform.c
#	source/blender/modifiers/intern/MOD_meshsequencecache.c
#	source/blender/modifiers/intern/MOD_mirror.c
#	source/blender/modifiers/intern/MOD_multires.c
#	source/blender/modifiers/intern/MOD_none.c
#	source/blender/modifiers/intern/MOD_normal_edit.c
#	source/blender/modifiers/intern/MOD_ocean.c
#	source/blender/modifiers/intern/MOD_particleinstance.c
#	source/blender/modifiers/intern/MOD_particlesystem.c
#	source/blender/modifiers/intern/MOD_remesh.c
#	source/blender/modifiers/intern/MOD_screw.c
#	source/blender/modifiers/intern/MOD_shapekey.c
#	source/blender/modifiers/intern/MOD_shrinkwrap.c
#	source/blender/modifiers/intern/MOD_simpledeform.c
#	source/blender/modifiers/intern/MOD_skin.c
#	source/blender/modifiers/intern/MOD_smoke.c
#	source/blender/modifiers/intern/MOD_smooth.c
#	source/blender/modifiers/intern/MOD_softbody.c
#	source/blender/modifiers/intern/MOD_solidify.c
#	source/blender/modifiers/intern/MOD_subsurf.c
#	source/blender/modifiers/intern/MOD_surface.c
#	source/blender/modifiers/intern/MOD_surfacedeform.c
#	source/blender/modifiers/intern/MOD_triangulate.c
#	source/blender/modifiers/intern/MOD_uvproject.c
#	source/blender/modifiers/intern/MOD_uvwarp.c
#	source/blender/modifiers/intern/MOD_warp.c
#	source/blender/modifiers/intern/MOD_wave.c
#	source/blender/modifiers/intern/MOD_weightvgedit.c
#	source/blender/modifiers/intern/MOD_weightvgmix.c
#	source/blender/modifiers/intern/MOD_weightvgproximity.c
#	source/blender/modifiers/intern/MOD_wireframe.c
2018-05-04 12:21:12 +02:00
c52f6b11c0 GP Properties: Separate onion skinning for datablock + per-layer override into separate panels
The panel layouts are still a mess, but at least there's less code duplication
and weirdness now, with everything taking advantage of more conventions here.
2018-05-01 19:12:58 +02:00
00c54fb23a Cleanup: Material Buttons for GP
* Don't collapse panels by default
* Cleanup old code/names/etc.
2018-05-01 19:12:58 +02:00
60549a6680 Remove dirty cache calls from kernel
The function BKE_gpencil_batch_cache_dirty() must be called only from operators or RNA.

Besides, the calls removed were redundant.
2018-05-01 17:36:24 +02:00
dca23ccc4e Cleanup: Fix some more warnings
NOTE: For rna_GPencil_stroke_new(), the problems aren't entirely eliminated yet.
Specifically, the colorname arg is now unused - it was used in the past to
specify what color the new strokes should have.
2018-05-01 16:27:07 +02:00
69c042b7c9 Code Cleanup: Clearly label which parameters are used for input/output 2018-05-01 16:27:07 +02:00
356ce71a5f GPencil Editors API: Added utility function to be called to get Copy-on-Write evaluated copies of data
* Use ED_gpencil_get_active() for writing settings back to the original datablock
  (existing callback used in most operators now)

* Use ED_gpencil_get_active_evaluated() for getting the COW-evaluated geometry
  (i.e. with modifiers, etc.) applied. i.e.,
  ``` const bGPdata *gpd_eval = ED_gpencil_get_active_evaluated(C); ```
2018-05-01 16:27:07 +02:00
ed29a6fcbb Cleanup: Remove unused var 2018-05-01 16:27:07 +02:00
c70de3abab Cleanup: Fix indentation 2018-05-01 16:27:07 +02:00
4cb2d6d58c Revert to use again BKE_gpencil_batch_cache_dirty()
These functions were changed by error when replace dirty management by depsgraph.

The depsgraph is only valid for operators and the files included in this commit must call the function directly and don't use depsgraph tag.
2018-05-01 15:59:26 +02:00
7c5a146243 Back BKE_gpencil_batch_cache_dirty function
This function was removed by error in previous commit.
2018-05-01 15:50:15 +02:00
82150ed577 Cleanup: Add new line at EOF 2018-05-01 13:51:09 +02:00
63c91f2bbd Remove BKE_gpencil_batch_cache_dirty()
This remove the function because is not used.
2018-05-01 13:48:09 +02:00
8098dc3d10 Replace DRW_gpencil_batch_cache_dirty() with DEG_id_tag_update 2018-05-01 13:44:17 +02:00
a597e21dbd Cleanup. Rename material variable to "ma"
The old name "mat" could be confused with matrix.
2018-04-30 19:41:51 +02:00
50e91b6a61 WIP depsgraph fixes for GP and depsgraph
Still not working yet - somehow the updates aren't getting flushed yet
(perhaps COW related)
2018-04-30 17:41:56 +02:00
d45f1e93a8 Cleanup: Indentation 2018-04-30 17:41:56 +02:00
e6d4465f7f Add default brush material to object materials
When draw using a brush that uses a default material, the material must be added to the object material slots if this material was not before.
2018-04-30 17:22:21 +02:00
7a5747d559 Rename Grease Pencil Array Modifier to Instance Modifier
The new name is more clear and does not create confusion with 3D objects array modifier.
2018-04-30 17:09:42 +02:00
09c900b1bf Fix error drawing with no object active 2018-04-30 16:18:34 +02:00
f5608c3655 Cleanup: Remove redundant parameter 2018-04-30 14:07:54 +02:00
3397007cb6 Fix wrong Material name
The name was using the ID type.
2018-04-30 11:27:12 +02:00
Nick Wu
644cd00d1a Merge branch 'blender2.8' of git://git.blender.org/blender 2018-04-30 08:58:47 +08:00
77e79bea56 Fix error in Join objects
The index of the material must be stroke value + 1.
2018-04-29 16:59:02 +02:00
95fa3ab416 Cleanup: Remove old unused code for bGPDpalettes
This commit removes some functions not used from old bGPDpalette and bGPDpalettecolor.

These structs were used in version 2.78 and 2.79 and only keep the minimum number of functions to convert old files.
2018-04-29 16:01:49 +02:00
0b476cd44e Cleanup: Remove unused function 2018-04-29 15:48:03 +02:00
bab586e254 Cleanup: Reduce calls to get GpencilColorData
This avoids some duplicate calls.
2018-04-29 15:37:24 +02:00
e2893dad4f Fix separate operator using Materials 2018-04-29 12:42:42 +02:00
14ec05f561 Cleanup: Fix old comments 2018-04-29 11:36:42 +02:00
21a530e76d Enable again select by color using Materials 2018-04-29 11:33:52 +02:00
7dc60eac13 Cleanup: Comments 2018-04-29 11:24:26 +02:00
1115a3eef5 Enable default material by brush
This is an essential feature for pipeline.
2018-04-29 11:02:55 +02:00
e693329ea6 Fix comment typo error 2018-04-29 11:02:10 +02:00
27a41b45af WIP: Add Material to GP datablock relation node
This is only the first step to prepare the node
2018-04-28 19:54:49 +02:00
913693839c Fix memory leak when paste 2018-04-28 16:49:51 +02:00
1ecb9b6cc6 WIP: Fix more operators for copy
Still a memory segment fault when copy several strokes.
2018-04-27 19:33:08 +02:00
5512f02c51 Create hash of material colors for copy buffer 2018-04-27 18:34:07 +02:00
d6b0d2ae9b Fix operators to use Materials instead of Palettes 2018-04-27 17:58:11 +02:00
0cb40164f8 Convert old 2.7x files from Palettes to Materials 2018-04-27 17:29:22 +02:00
e19f017800 Clear deprecated colorname field when write data
This field must be cleared because the string is not used (deprecated).
2018-04-27 16:44:46 +02:00
a4642040df Fix mermory leak for materials
The materials array must be duplicated and free in every undo step.
2018-04-27 16:39:12 +02:00
7ce63dcf97 Add comment to make annotation for ToDo 2018-04-27 11:09:12 +02:00
da8ef484a5 Remove Palette animation Depsgraph node
As the Palette animation has been removed, these modules must  be removed.
2018-04-27 10:51:58 +02:00
8df4d2de02 Add notifier flag to update viewport
Whitout this flag, the viewport is not updated when change something in the material.
2018-04-27 10:27:50 +02:00
a042d30745 Fix error of missing slots
The problem was in the creation of material slot all the time. By default, the material is created when we have a slot already created.
2018-04-27 09:07:20 +02:00
98b58db9cb WIP: Fix error when drawing using a material
Still a problem adding slots
2018-04-27 08:56:01 +02:00
1e30188d68 Add GpencilColorData path for animation 2018-04-26 18:28:14 +02:00
5c9312afee Improve default Material use
If the default material has not the Grease pencil settings, add it instead to create a new material.
2018-04-26 17:42:07 +02:00
4141fd6be6 Undo previous commit for newlibadr_us
I added this by error.
2018-04-26 16:54:15 +02:00
57f83110da Create Grease Pencil Materials Settings for GP Objects only
If the material is created for a grease pencil object, a new GpencilColorData settings is initializated
2018-04-26 16:52:29 +02:00
473b95bb0b Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2018-04-26 16:23:20 +02:00
69383f6b5d Use newlibadr_us for layer parent object 2018-04-26 16:22:54 +02:00
4b469806fb Code Cleanup / Fix ASAN Crash
With ASAN enabled, Blender crashed when deleting the default cube
(why GP engine is even running at that point is a bit of a mystery to me).
Checking on this, I discovered that the code here had multiple pointers with
different names to the active object and the GP datablock it uses... time to
clean this mess up!
2018-04-26 16:16:03 +02:00
38f1aa8d66 Replace allowed types from Palettes to Materials 2018-04-26 16:15:11 +02:00
87c38a2ed7 Remove newdataadr and use newlibadr_us for images 2018-04-26 16:08:51 +02:00
5b633d7abe Fix several compiler warnings 2018-04-26 15:31:38 +02:00
ad36cee68b Fix recalc of UV using materials instead of Palettes 2018-04-26 12:54:05 +02:00
83a1498cea Change Default Brush material after refactor 2018-04-26 12:35:28 +02:00
1df04cb661 Fix missing palette reference 2018-04-26 11:50:12 +02:00
ee94211eb3 Merge branch 'experimental_gp_material' into greasepencil-object 2018-04-26 11:38:50 +02:00
792bd2a9f1 WIP: More work in the huge material refactor
The Monkey primitive, colorpicker and basic color handle operators working.

Still a big problem with save/load that produces a segment fault with any undo operation.
2018-04-26 11:33:37 +02:00
e20cbe29f9 WIP: Convert old palette operators
These operators are used to manage the strokes lock and hide.
2018-04-26 10:31:28 +02:00
55c2e89222 WIP: Mega Refactor to replace Palettes with Materials - 1 2018-04-25 20:19:49 +02:00
15bb1b4b45 WIP: Rename settings function in Draw Manager 2018-04-25 09:54:29 +02:00
1e126fb8a4 WIP: Replace field name for palettecolor 2018-04-24 19:31:06 +02:00
5396e284f7 WIP: First step to remove Palettes from Draw Manager
Still is not working.
2018-04-24 19:14:07 +02:00
da49c11d5d Cleanup: Rename material index field
Now the name is equal to other Blender areas.
2018-04-24 18:08:39 +02:00
0639de4ceb WIP: Start the working in operators
- Delete Material->Strokes
- Move material in the list->Reasign Strokes
2018-04-24 17:38:15 +02:00
b1e4f1a832 Remove Palette panels and fix write/read bugs
Now the panels works with materials but still the drawing engine and operators is using the old palettes.
2018-04-24 16:59:43 +02:00
9c1a5b0641 Fix error reading materials
The link materials section was missing.
2018-04-24 15:46:44 +02:00
1746aaa86f WIP: More work converting to materials
There is a problem with the loading of converted files.

The conversion of Hero data is correct, but something is still missing.
2018-04-24 13:48:45 +02:00
5f49b21c5e More work to prepare material conversion
Doing RNA stuff and preparing for convert Hero files
2018-04-24 11:19:31 +02:00
d5b6419878 Create new fields in material for moving palettecolor 2018-04-23 19:55:48 +02:00
d036fa0d6a Fix: ASAN-related crash when scaling points in editmode 2018-04-23 15:45:18 +02:00
43f95cd616 Merge branch 'blender2.8' into greasepencil-object 2018-04-23 15:42:45 +02:00
6b33e71843 Fix merge error 2018-04-23 10:09:13 +02:00
09b41b9ef1 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/addons
	release/scripts/addons_contrib
	source/blender/blenloader/intern/versioning_280.c
2018-04-23 10:08:20 +02:00
8e939dedfe Merge branch 'blender2.8' into greasepencil-object 2018-04-22 19:34:52 +02:00
8cd6f60695 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_material.py
	release/scripts/startup/bl_ui/space_dopesheet.py
	source/blender/draw/modes/draw_mode_engines.h
	source/blender/editors/space_buttons/buttons_context.c
	source/blender/editors/space_time/space_time.c
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/space_view3d/view3d_draw_legacy.c
2018-04-22 16:54:08 +02:00
1c53becdf7 Fix Tint and Hue/Saturation modifiers
Now the modifiers don't use the palettecolor pointer
2018-04-20 11:01:36 +02:00
63fcb0e749 WIP: Remove palettecolor pointer
Still Hue/Saturation and Tint pending.

Now both are disabled while found a solution.
2018-04-19 19:19:10 +02:00
036c95a655 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
	source/blender/editors/space_view3d/view3d_header.c
2018-04-19 17:13:17 +02:00
527d9c7295 Fix missing library Palette relink
The palette pointer was not relink as expected for Brushes and GP strokes.
2018-04-19 17:02:39 +02:00
378969bb25 Merge branch 'blender2.8' into greasepencil-object 2018-04-18 16:33:52 +02:00
51b282f404 Fix various compiler warnings/errors 2018-04-18 10:57:09 +02:00
46422a3517 Merge branch 'blender2.8' into greasepencil-object
# Conflicts:
#	source/blender/blenloader/intern/versioning_280.c
#	source/blender/makesrna/intern/rna_scene.c
2018-04-18 10:52:24 +02:00
8e9b1e3e80 Cleanup: Whitespace + Code Redundancy 2018-04-17 18:37:56 +02:00
3d3cc30df4 Merge branch 'blender2.8' into greasepencil-object
Tempting fate by merging in the Game Engine removal in here too...
We might as well do this now though, since it'll have to happen at
some time anyway!

# Conflicts:
#	release/scripts/startup/bl_ui/properties_scene.py
#	source/blender/blenkernel/intern/object.c
#	source/blender/blenloader/intern/versioning_280.c
#	source/blender/gpu/CMakeLists.txt
#	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-04-17 18:28:08 +02:00
6d0795628d Fix: Putting back bakeModifierGP() for Lattice and Hook
Ideally, we'd run this on a depsgraph-copy, on a background thread. But, that's
that's something that we'd be passing through to the modifier bake callbacks.
2018-04-17 18:16:28 +02:00
19716326f4 MOAR compile fixes for GP branch after merge
Lots more fixes for various little things that broke after the merge and the
fixes required for that.

Unfortunately, I've had to disable a few things to get Blender compiling
again - those will require a bit more attention to fix.

Things currently broken/disabled:
* Apply/Bake for Hook and Lattice modifiers - disabled as we need to rethink how
  this works after EvaluationContext removal. Probably should go to a new depsgraph
  copy (instead of working in main depsgraph).

* Helplines for GP point edit - 1c9690e760 has been
  temporarily reverted due to conflicts with multiedit changes
2018-04-17 17:04:39 +02:00
261d64922b Merge branch 'blender2.8' into greasepencil-object
Note:
There were some additional changes needed due to the EvaluationContext -> Depsgraph
cleanups + MultiObject edit that happened in 2.8 since the last merge of 2.8 into
this branch.


# Conflicts:
#	release/datafiles/locale
#	release/scripts/addons
#	release/scripts/addons_contrib
#	source/blender/blenkernel/BKE_modifier.h
#	source/blender/editors/gpencil/gpencil_paint.c
#	source/blender/editors/include/ED_object.h
#	source/blender/editors/object/object_modifier.c
#	source/blender/editors/screen/screen_context.c
#	source/blender/editors/space_view3d/view3d_draw_legacy.c
#	source/blender/editors/transform/transform.c
#	source/blender/editors/transform/transform_conversions.c
#	source/blender/editors/transform/transform_generics.c
#	source/blender/editors/undo/ed_undo.c
#	source/tools
2018-04-17 16:05:37 +02:00
5626738541 Cleanup: Various code/style tweaks to GP code 2018-04-17 12:57:09 +02:00
00636eb618 Compiler warning fixes on GCC
* gpencil_add_*_shgroup() - Removed unused parameters (gpd)

* Fix warning about rgba being uninitialised in gpencil_fill.c::get_pixel()
  - The non-float case here looks like it shouldn't ever happen, but for good measure,
    I've added an assert + set a value here to keep compiler happy.

* Fix uninitialised var in gp_brush_drawcursor() - paintbrush

* GPencilOffsetModifier defined an RNA vertex group name set function, but didn't use it
2018-04-17 12:20:36 +02:00
a27a206902 Cleanup: various warnings
Now compiles w/o warnings for GCC
2018-04-16 21:20:51 +02:00
30575f9eaf Fix invalid brush assignments 2018-04-16 21:08:21 +02:00
c2517ae75a Cleanup: unused variables & args 2018-04-16 21:07:33 +02:00
6f0408f79d Cleanup: -Wparentheses & line length 2018-04-16 20:52:59 +02:00
a7c7d23542 UI Tweak: Rename "Grease Pencil" menu in 3D View to "Strokes"
Menu names in general should be a single word. Having two separate words makes it
visually confusing (i.e. it looked like there were 4 menu items, when in fact there
were only 3). Since the operators here operate on the GP strokes, it's reasonable
to use this term instead.

(Discussed with William as part of an informal UI review of GP branch)
2018-04-16 19:01:01 +02:00
8f22682a1a Fix compile error: Was missing 'const' qualifier 2018-04-16 18:57:48 +02:00
b2b02c6522 Merge branch 'blender2.8' into greasepencil-object 2018-04-16 09:58:44 +02:00
ba477d9ccf Merge branch 'blender2.8' into greasepencil-object 2018-04-15 16:18:33 +02:00
507113543a Fix compiler error in Windows 2018-04-14 16:24:06 +02:00
39ac621c2a Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/object.c
2018-04-14 16:11:12 +02:00
7281d36a20 Fix parameter list errors after merge 2018-04-13 16:05:33 +02:00
67801591f6 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/readfile.c
2018-04-13 15:54:39 +02:00
025615fe78 Fix compiler warning 2018-04-12 17:33:07 +02:00
3b203b738e Merge branch 'blender2.8' into greasepencil-object 2018-04-12 17:08:51 +02:00
e601228e01 Fix wrong color pointers for old files
Some files created for Hero during development had wrong color pointers. This fix this error and avoid a segment fault.
2018-04-12 17:03:35 +02:00
b95cd2f97d Fix compiler error after merge 2018-04-12 16:20:14 +02:00
c8f56d6613 Merge branch 'blender2.8' into greasepencil-object 2018-04-12 10:04:28 +02:00
02e60d6ffa Merge branch 'blender2.8' into greasepencil-object 2018-04-11 09:01:59 +02:00
8a6a173435 Merge branch 'blender2.8' into greasepencil-object 2018-04-10 13:47:04 +02:00
1c9690e760 Fix transform center after merge
This code fix the error of rotation center calculation, but need a review to check if this is the best way to do it.

I commit the change while we check other solutions  to be sure we have a correct rotation function.
2018-04-10 10:54:53 +02:00
17c8b2e4a8 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/transform/transform.c
2018-04-10 09:39:06 +02:00
07b304bc03 Merge branch 'blender2.8' into greasepencil-object 2018-04-09 10:17:09 +02:00
6635886df4 Fix error drawing in 2D editors
The UV calculation is only valid for 3D view.
2018-04-09 10:16:33 +02:00
2abd5fd8f9 Merge branch 'blender2.8' into greasepencil-object 2018-04-08 16:52:43 +02:00
073efa89cb Merge branch 'blender2.8' into greasepencil-object 2018-04-08 12:02:35 +02:00
68eeb56104 Refactor to reduce number of textures and framebuffers used 2018-04-08 11:21:04 +02:00
b2a549b010 Fix memory error for duplicated objects when exit
When duplicate an object, the batch cache was pointing to the original address and when close Blender, the pointer was invalid.
2018-04-07 16:10:49 +02:00
86f7bd43b6 Merge branch 'blender2.8' into greasepencil-object 2018-04-07 11:38:48 +02:00
d13a685d1c Revert antialiasing commit
The antialiasing was not working because the final image in default framebuffer is not used to calculate the AA pixels, so this double antialiasing was only adding drawing time.

We need to find a way to mix the grease pencil with the current default framebuffer with antialiasing.
2018-04-07 11:37:45 +02:00
25a3c3f11f Cleanup: Remove unused code 2018-04-06 16:17:44 +02:00
47051a44a0 Merge branch 'blender2.8' into greasepencil-object 2018-04-06 16:07:19 +02:00
034207497e Set cursor when change object mode
Cleanup workspace code and replace by change cursor function.
2018-04-06 15:52:59 +02:00
309b6378d3 UI: Fix object mode after merge 2018-04-06 14:25:36 +02:00
642bf42040 Add bContext to function
This parameter is required for grease pencil modifiers

Maybe need more work to remove the bContext, but we need it now to compile.
2018-04-06 14:20:13 +02:00
2d93fa6231 Try to fix the merge problems.
Warning: Now this source code does not compile
2018-04-06 10:37:21 +02:00
987b60100a Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/object/object_edit.c
	source/blender/editors/object/object_modes.c
	source/blender/makesrna/intern/rna_brush.c
2018-04-06 10:14:12 +02:00
23c5eee284 New Line Primitive
The straight lines could be done using Alt key while drawing, but it's better to have a simple primitive.

This has been requested by artists.
2018-04-06 10:11:04 +02:00
9920155e31 Add antialiasing when mix with default buffer on viewport
Still pending antialiasing if there are objects when render.
2018-04-05 19:05:12 +02:00
11bacaa705 Merge branch 'blender2.8' into greasepencil-object 2018-04-05 17:12:51 +02:00
38cdaa97fb Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/gpu/GPU_shader.h
2018-04-05 16:14:18 +02:00
8f366d494e Fix render after merge 2018-04-05 11:55:41 +02:00
64b778f666 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/render/intern/source/external_engine.c
2018-04-05 11:44:18 +02:00
159358e4ee Remove aspect ratio from VFX Blur on y-axis
The aspect ratio was not required here because deform the image.
2018-04-05 11:38:07 +02:00
659c5dcffb Improve render image blending
The blend of the Eevee/Cycles render and grease pencil render was not working as expected when grease pencil used transparency.

Now the blend is using blend equation with GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA
2018-04-05 11:34:07 +02:00
f18d8d84d1 Cleanup: Style 2018-04-04 17:41:50 +02:00
72204e2163 Cleanup: Add comments 2018-04-04 17:14:41 +02:00
9e46bbd305 Cleanup: Move cache functions to own module 2018-04-04 17:02:41 +02:00
162711fee2 Cleanup: Move vfx code and solve VFX order
All the code moved to vfx module and now the VFX modifiers are evaluated in the same order defined in the interface. Before, the order was always the same and did not use the interface order.
2018-04-04 16:37:28 +02:00
f536d5f821 Cleanup: Define variable using #define 2018-04-04 16:23:15 +02:00
dcd049321f Cleanup: Remove redundant object parameter for VFX 2018-04-04 16:17:07 +02:00
b756456929 Cleanup: Remove object index parameter for vfx 2018-04-04 16:10:55 +02:00
0a5c958275 Cleanup: More work to structure code 2018-04-04 16:07:22 +02:00
e286b359bb Cleanup. Create framebuffers in separate function 2018-04-04 16:00:18 +02:00
637b0154ad Cleanup: Create shaders in a separate function 2018-04-04 15:54:29 +02:00
96f4c3438e Merge branch 'blender2.8' into greasepencil-object 2018-04-04 15:44:58 +02:00
b8d9ff2989 Merge branch 'blender2.8' into greasepencil-object 2018-04-04 10:02:50 +02:00
e32c22d3a4 Add Lock to Focal Plane to Blur VFX
This optn works only in camera view and defines the blur factor depending of location of the object in depth of field. If the object is on a location inside near and far  depth of filed values, the blur is disabled.
2018-04-03 19:31:13 +02:00
3bfeb28b1e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_data.c
	source/blender/editors/gpencil/gpencil_paint.c
2018-04-03 18:40:11 +02:00
5ed07515f5 Refactor VFX code
Make code more consistent and clear to understand.
2018-04-03 18:28:14 +02:00
d983eb44bc Allow zero samples for VFX Blur
When the number of samples is set to zero, the blur is dissabled, but this can be used to get effects animating the samples parameter.

If the zero is not a valid value, it is impossible to disable the blur with only this parameter.
2018-04-02 17:23:42 +02:00
ff0d4c7f1a Fix reproject error drawing lines
The reproject was done two times and must be done only once.
2018-04-02 16:40:54 +02:00
2f46b16b0e Cleanup redundant variable 2018-04-02 16:33:45 +02:00
b6d63d5a97 Fix errors after merge 2018-04-02 16:18:52 +02:00
f01b8bcd0b Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/space_outliner/outliner_select.c
2018-04-02 15:58:34 +02:00
70d7939778 Cleanup: Make code more compact 2018-04-01 16:23:50 +02:00
0890922dbd Recover line deleted by mistake in previous commit
Still there is a problem when the undo change to a non GP object.
2018-04-01 16:03:44 +02:00
627a27dc69 Fix error after merge 2018-04-01 12:45:21 +02:00
7e4d6bcb88 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_data.c
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/util/undo.c
2018-04-01 12:25:58 +02:00
b9c5863fb6 Fix color names for monkey
The colors were missing after save and load again.
2018-03-31 18:56:01 +02:00
b1e3bb9eb4 Cleanup: Move all Shader creation to engine_init 2018-03-31 18:55:49 +02:00
7d27a537b9 Merge branch 'blender2.8' into greasepencil-object 2018-03-31 09:01:45 +02:00
4d45ea99e0 Fix blur shift when add more samples
The image was moved to top when increase the sample number. This was due the shader was bluring both axis at the same time.
2018-03-30 16:38:50 +02:00
3a8a749212 Cleanup: Use always even numbers for samples 2018-03-30 16:29:17 +02:00
e2100a698b Cleanup: Simplify shader parameters 2018-03-30 16:16:41 +02:00
984d5da990 Restructure VFX Blur, add Samples and cleanup
Now, the number of defined passes is low and there is a new parameter to define number of samples.
2018-03-30 13:47:34 +02:00
1e163414da Merge branch 'blender2.8' into greasepencil-object 2018-03-30 12:17:43 +02:00
ee1931e306 Cleanup unused variable 2018-03-29 19:58:12 +02:00
a954837eae Replace constant bokeh value by parameter 2018-03-29 19:38:43 +02:00
68aff2fb88 Fix compilation error after merge 2018-03-29 17:58:09 +02:00
d1130c5f4e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/gpu/GPU_shader.h
2018-03-29 17:40:51 +02:00
c80bb336d6 Fix DOF render segment fault and use Eevee UI options
To activate the DOF for grease pencil, the Eevee option is used as main flag.
2018-03-29 16:56:47 +02:00
67638e3136 Merge branch 'greasepencil-object' into GP-DepthOfField 2018-03-29 10:27:21 +02:00
bbde146ebc Merge branch 'blender2.8' into greasepencil-object 2018-03-29 10:26:47 +02:00
71bac9a99f WIP: Fix alpha channel and replace by weights
Still there is a problem with the external border.

Thanks Clément for the help.
2018-03-29 10:23:25 +02:00
e4c6746c31 WIP: More work on shaders and framebuffers for DOF
Still there are problems with the alpha factor and all the scene is empty because alpha is always 0.
2018-03-28 19:59:08 +02:00
fbc1b12aa8 Remove texture Free for DOF
These textures are freed by draw manager and don't need explicit free.
2018-03-28 19:11:27 +02:00
db9244bb7e Fix wrong function to assign texture to shader 2018-03-28 19:06:33 +02:00
b8272f724a WIP: Start to add DOF support
Still is not working. Save this commit as reference.
2018-03-28 18:09:12 +02:00
96666d38c6 Merge branch 'blender2.8' into greasepencil-object 2018-03-28 08:54:10 +02:00
c4b4719dcf Cleanup comments 2018-03-27 19:27:11 +02:00
9e0674d519 Cleanup shader code 2018-03-27 19:11:13 +02:00
2f9f3d09a9 Fix alpha double blend
The color when used alpha factor always got darker. The problem was a double blend that produced a reduction in the color saturation.

Now, there is a premult of the alpha factor before doing last blend pass.

As a result of this change, now the drawing process can be simplified and a pass can be removed. Some cleanup done too.

Still need more work in render mode. Maybe the problem in render is related to Tonemapping.

Thanks Clément Foucault for his help solving this issue.
2018-03-27 18:03:26 +02:00
d7046c4668 Merge branch 'blender2.8' into greasepencil-object 2018-03-27 10:47:11 +02:00
7bacfd320a Merge branch 'blender2.8' into greasepencil-object 2018-03-26 17:46:03 +02:00
c3c6f6e3b5 Fix multisample for render
After last merge, the multisample was not working in render mode.
2018-03-26 17:44:46 +02:00
e15e307d4c WIP: Fix texture format after merge 2018-03-26 11:32:33 +02:00
32beb07b25 WIP: Refactor darwing code after merge
A lot of changes were done in draw manager in the last merge.

This commit fix the main area, but still problems with multisample frame buffer.
2018-03-26 11:29:08 +02:00
69dfaeb96e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/intern/DRW_render.h
	source/blender/draw/intern/draw_manager_framebuffer.c
2018-03-26 10:40:29 +02:00
3265ed2d2e Fix grease pencil paper reset loading files
The paper was reset loading any file, not only old files.
2018-03-24 13:45:35 +01:00
c3fa124d46 Make less sensible strength brush and smooth
Now the factor to apply is less sensible and after apply the strength a smooth operation is done with surrounding points.

Before the change in the opacity changed too much with small input.
2018-03-24 13:09:46 +01:00
60e18bf431 Cleanup: Fix comments 2018-03-24 12:54:34 +01:00
dcbd96eb18 Merge branch 'blender2.8' into greasepencil-object 2018-03-24 12:20:37 +01:00
eaa9d64ce9 Merge branch 'blender2.8' into greasepencil-object 2018-03-23 14:05:51 +01:00
176d2acbb5 Merge branch 'blender2.8' into greasepencil-object 2018-03-22 19:22:20 +01:00
ccf3889b30 Merge branch 'blender2.8' into greasepencil-object 2018-03-22 19:13:41 +01:00
4c078cb2af Cleanup: Make code more compact 2018-03-22 17:24:40 +01:00
619d989600 Update depsgraph for stroke transforms
This is required to work with COW
2018-03-22 16:45:44 +01:00
d767fc2e27 Update depsgraph for sculpt and select
This is required to work with COW
2018-03-22 16:45:18 +01:00
6ebab4a90a Fix simple points drawing with line mode
If using line mode, simple points must be drawn with point shader, not line shader.
2018-03-22 16:20:32 +01:00
e3af67703e Cleanup unused code block 2018-03-22 16:13:54 +01:00
cf521a7f32 Update depsgrah tag while painting
If this update is not done, the cow object used for display, does not show the current stroke.
2018-03-22 16:10:22 +01:00
54ede1d53a Force Depsgraph recalculation when cache is dirty 2018-03-22 10:23:11 +01:00
0b0d3e67c6 Cleanup: Remove redundant code 2018-03-22 10:06:42 +01:00
3fc0c418a1 Remove Custom Brush icon
Now the user can assign as icon any custom image with the brush options.
2018-03-21 19:49:12 +01:00
fc18bfc532 UI: Replace Eraser icons 2018-03-21 19:44:13 +01:00
c47c6a32ea Cleanup: Rename field and add comments 2018-03-21 17:35:31 +01:00
71f465b01a Use evaluated camera for render 2018-03-21 17:14:11 +01:00
2c0acc9eb5 Merge branch 'blender2.8' into greasepencil-object 2018-03-21 16:48:17 +01:00
28a6ed8885 Remove use of LIB_TAG_NO_MAIN for temp objects
Instead to use the tag to identify temp objects, now a internal flag managed by cache is used.

This is required because the LIB_TAG_NO_MAIN created conflicts with depsgraph.

This solves any concern of D3111
2018-03-21 16:47:01 +01:00
9bdd8a4aa5 Cleanup: Get rid of last uses of BKE_gpencil_batch_cache_alldirty_main()
* For any cases that weren't operating on a specific bGPdata instance,
  the DEG_id_type_tag() should do the trick to tag all GP datablocks.

* For the palette case, tagging the palette should trigger just the
  GP datablocks using that palette (and not all of them) to get updated.
2018-03-21 19:19:59 +13:00
b59139eddc Merge branch 'blender2.8' into greasepencil-object 2018-03-20 19:47:36 +01:00
9ab33bf9be Cleanup: Remove unused definition 2018-03-20 19:47:04 +01:00
c01e6a3c50 Cleanup: Improve comments 2018-03-20 19:30:40 +01:00
286d4e77a7 Fix error with copy-on-write
Verify tag of cow before remove temp objects.
2018-03-20 18:59:59 +01:00
5c47c5de68 Fix Users count
The value must be 2, not 3.
2018-03-20 15:56:32 +01:00
d0ce4d838b Fix problem to enter in edit mode with Tab key 2018-03-20 12:41:58 +01:00
3c5342649b Cleanup: Move GP Object specific properties panels to properties_data_gpencil.py
Note:
* Layers and Onion Skinning panels haven't been moved yet.
  This is so that we can reconsider what (if any) changes
  need to be made to share common elements between GP Object
  and annotation GP use cases.
2018-03-20 20:14:48 +13:00
e2b78f68a8 Cleanup: Remove unused code 2018-03-20 17:13:56 +13:00
5dd8c7fa42 More Brush Appearance Panel tweaks
* Always show this panel. Previously, it wouldn't get shown for the Eraser,
  meaning that if you accidentally changed a brush to an eraser, you couldn't
  change it back

* Always allow changing the brush icon. Previously, this could only be done
  for "Draw" brushes, but there isn't really any reason why this shouldn't
  be allowed.
2018-03-20 17:01:48 +13:00
c6ecbb9508 Brush Appearance Panel - Cleanup + Tweaks
* The "Draw" case was discarding the settings.brush value and redefining
  its own brush variable. Reoranised code so that this doesn't need to
  happen
* Reorganised order of properties - all brush type/icon related stuff
  comes first now
* Remove extra/excess layout elements/lines
2018-03-20 16:58:28 +13:00
5d96c8abb4 Don't collapse "Brush Appearance" panel
It's in a tab by itself already, so there's no need to make ti even harder
to access its settings.
2018-03-20 16:37:09 +13:00
404e817a11 Merge branch 'blender2.8' into greasepencil-object 2018-03-20 16:14:20 +13:00
4e33ce736f Change library order 2018-03-19 20:35:31 +01:00
350cd7fce2 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	build_files/cmake/macros.cmake
2018-03-19 19:46:31 +01:00
dd4e968bea UI: Move brush type to appearance panel
This option is not used all the time and putting in the main panel, near of the brush selector, can be weird for the user.
2018-03-19 19:43:28 +01:00
03c3136c10 Cleanup: use MEM_SAFE_FREE 2018-03-19 09:56:41 +01:00
cb8ebffa48 Merge branch 'blender2.8' into greasepencil-object 2018-03-19 09:39:28 +01:00
d435719fb4 Do not draw fill control lines in multiwindow
If enable the fill control lines, these must be drawn only in the current window.
2018-03-19 09:38:01 +01:00
2042995dce Cleanup: Warnings and Codepage errors 2018-03-18 12:10:42 +01:00
ae1a08632c Merge branch 'blender2.8' into greasepencil-object 2018-03-18 11:48:36 +01:00
5c47a33362 Enable Loop Onion in Relative mode 2018-03-18 11:48:06 +01:00
d5a6568816 Fix link Palette error with textures
The link was not loading the referenced images.
2018-03-17 17:01:10 +01:00
ea63d431f1 New Onion Skinning Loop option
When draw an animation with a loop it's very useful to have an indication of the first frame.

Some changes in the order of the parameters too.
2018-03-17 16:48:46 +01:00
5330415de2 UI: Move angle factor to top of the panel 2018-03-16 18:54:29 +01:00
ab42439d52 Merge branch 'blender2.8' into greasepencil-object 2018-03-16 18:07:52 +01:00
a900b2d2a1 Replace Random checkboxes by Factors
As we have a new Random section in the stroke panel, it's not logic to have buttons in the main panel.

Now, these random parameters work equal to other random factors.
2018-03-16 18:07:06 +01:00
988d180616 UI: Remove unlink text for default palette
This is not standard and we remove while we found a better solution.
2018-03-16 15:44:33 +01:00
bccbc935a0 Outliner: Clicking on GP Layers will activate them 2018-03-17 03:09:26 +13:00
Dalai Felinto
82ab5668d0 Fix bug: Appended brush comes with empty palette 2018-03-16 10:10:39 -03:00
06d9f59a42 Merge branch 'blender2.8' into greasepencil-object 2018-03-16 10:55:03 +01:00
7ded480dff Reset color name only if not valid for the palette 2018-03-16 10:51:38 +01:00
a107b3d8d7 Fix compiler error (field name wrong) 2018-03-16 10:48:10 +01:00
80840750e8 GP Color Picker - Make the highlight cover the names of each color too
This makes it more consistent with the normal big-icon popup menus
2018-03-16 19:33:12 +13:00
be53b9afe5 Fix: Adding GP Monkey didn't refresh Properties Editor 2018-03-16 19:19:19 +13:00
b9090d9229 Fix: Prevent GP Primitives (Rectangle/Circle) from getting added when active layer is locked/hidden 2018-03-16 19:06:34 +13:00
6cdba8893f GP "Add Monkey" - Shift-A can now be used in EditMode to bring up the "Add GPencil Object" menu
TODO:
It shouldn't trigger in other editors, but right now, the keymaps are
shared, so there's not much that can be done about that.
2018-03-16 18:50:27 +13:00
fabfa5a959 GP "Add Monkey" - Check if there's an existing palette/colors with the required names before adding new ones
Now, when adding a Monkey primitive to the same GP object more than once,
you won't get two separate palettes (with two separate sets of colors)
created - one for each instance. Instead, the second (and subsequent)
copies will all use the initial/existing palette instance.

Note: For layers, we still just create new ones, as it makes it easier to
isolate the instances.
2018-03-16 17:16:28 +13:00
a5e8b369e7 GP "Add Monkey" - Make this behave like a standard "Add Object" operator
* "Add GP Object" operator now works in Edit/Paint modes (so the button
  in the Create tab works)

* Multiple "Suzanne" objects can be added within the same GP datablock now
  (if in Edit/Paint modes when activating the "Add GP Object" operator)

* "Radius" operator property is respected, albeit, setting this to values
  other than 1.0 may result in weirdness as the line thickness values do
  not get adjusted.
2018-03-16 16:09:17 +13:00
0481990044 GP "Add Monkey" - Primitive geometry can now have arbitrary transforms applied to it when created 2018-03-16 16:09:16 +13:00
d00b952d4d Remove duplicate RNA name set
This broke the name property of the layer.
2018-03-15 18:49:37 +01:00
9c0eb5fe8b Merge branch 'blender2.8' into greasepencil-object 2018-03-15 17:38:36 +01:00
1c58439bef Save Simplify flags at drawing start
As the simplify can change during play, the cache was not initializated and could get an error.

Saving the flags at the start solves this issue and improve the play animation in few mseconds.
2018-03-15 17:24:31 +01:00
b3638bdd20 Missing copy curves for brushes 2018-03-15 13:23:17 +01:00
1730ef7527 Fix simplify bug due cache corruption
When enable/disable simplify options, the cache must be set as dirty.

Now, the update is done using depsgraph.
2018-03-15 13:07:04 +01:00
3b11365e96 Merge branch 'blender2.8' into greasepencil-object 2018-03-15 12:41:24 +01:00
37e8dd2b94 Add filter by View Layer when render (F12)
Now it's possible to filter the grease pencil layers by view layer for render. The filter can be inverted.

This is an additional level of object visibility.

This is used for compositing.
2018-03-15 12:02:33 +01:00
c1cd722171 Fix assert error linking palettes
Must check if the hash key was inserted before.
2018-03-14 19:44:09 +01:00
c05da356b1 Merge branch 'blender2.8' into greasepencil-object 2018-03-14 18:59:40 +01:00
3c9c9dcb32 Merge branch 'blender2.8' into greasepencil-object 2018-03-14 10:21:12 +01:00
7ac4a31ab1 UI: Add icon selector
Now it's possible to select the standard icon used by brush. This can be required when change the brush type and want to back to old icon.
2018-03-14 10:10:35 +01:00
94597cd43c Cleanup: Move enum definition to right file 2018-03-14 09:54:26 +01:00
08970951c6 Cleanup: Group all paint creations in function 2018-03-14 09:49:44 +01:00
7438a391d8 UI: Expand brush type icons
The old dropdown list button was too wide and the look of the icons below was strange.
2018-03-14 09:40:57 +01:00
3347e8f812 Add missing ID types for Brushes and Grease Pencil 2018-03-14 08:44:19 +01:00
46b2492fb2 Merge branch 'blender2.8' into greasepencil-object 2018-03-13 19:44:18 +01:00
3fd7dcad9e Fix cursor error after erase brush
When the brush is not selected, the cursor must be hidden.
2018-03-13 19:42:46 +01:00
7771049641 UI: Add a text for not linked palettes
I had to use a trick with a disabled button because the template_id collapse when nothing is selected.

Here  the operator new is not logic, so we cannot add the common "+ new" button.
2018-03-13 16:11:16 +01:00
90e005e567 UI: Hide cursor color for drawing brushes 2018-03-13 15:49:40 +01:00
09ede1f3bb UI: Move default color to main brush panel 2018-03-13 15:47:18 +01:00
118f7e28f3 Increase User number for palettes 2018-03-13 15:45:21 +01:00
fde0e44aa4 Use Brush default color for cursor
If the brush has assigned a default color, the cursor must use this color, not the context default color.
2018-03-13 15:16:17 +01:00
6f83bc24b5 Fix problem when change mode in brush color default 2018-03-13 13:06:25 +01:00
338903f5f5 New default color for Brush
If the brush defines a default Palette and Color, when draw the color used is this and not the current context default color.

Still there is problem when change drawing mode from Line to Dots.
2018-03-13 12:59:19 +01:00
8d1538fbf5 Merge branch 'blender2.8' into greasepencil-object 2018-03-13 10:55:40 +01:00
f9e280dafe Cleanup unused code 2018-03-12 16:48:34 +01:00
5f3bcba63e UI: Change brush type icon and panel layout
Small modifications to some parameters and added text to type of brush.
2018-03-12 16:34:39 +01:00
6722c6e5a8 Cleanup: Remove duplicated condition 2018-03-12 10:36:03 +01:00
f012e1de32 Remove brush mode panel and add icon
The panel was not needed and was replaced by icons in the main panel.

Notice: I have reused standard icons, but maybe need custom icons in the future, but we will wait to the main redesign 2.8 interface task.
2018-03-12 10:30:02 +01:00
a83065a5d3 Merge branch 'blender2.8' into greasepencil-object 2018-03-12 10:00:46 +01:00
301651ae51 Change Brush names to organize alphabetically
As the panel is sorted by name, it's better to have names that keep brushes grouped.
2018-03-12 09:53:53 +01:00
95655f008c Change Eraser icon depending of eraser mode 2018-03-12 09:49:25 +01:00
ff2260527f Remove unused and duplicate code
After moving bGPDbrush to Brush, some data is duplicated or not used.
2018-03-12 09:37:03 +01:00
944812a1e8 Fix problem when change mode if no brushes
When chnage mode, create the default brushes if they are missing.
2018-03-11 20:12:18 +01:00
03c4d48cda Fix problem with Brush Datablock icons
The icons of grease pencil brushes did not work because the poll return false.
2018-03-11 20:04:11 +01:00
4071460fe1 WIP: more work moving datablock
All references to old bGPDbrush struct has been removed and basic functionality working again now.

Still the icons of the brushes are missing.
2018-03-11 18:03:30 +01:00
c44e8a016b WIP: Fist step moving bGPDbrush to Brush datablock
Still a lot of work ahead, but this commit is to save the situation before remove bGPDbrush struct.
2018-03-11 11:48:29 +01:00
d093792ab6 Code refactor: Missing in previous commit 2018-03-10 13:29:07 +01:00
20ddf3a147 Code refactor: Rename fields to prepare for ID datablock
Rename some fields to prepare the code to move the brushes (bGPDbrush) to reuse ID datablock ID_BR (Brush).
2018-03-10 13:25:36 +01:00
739a9cef23 Merge branch 'blender2.8' into greasepencil-object 2018-03-10 12:24:01 +01:00
65ec69492d Cleanup: Rename brush input_samples field 2018-03-09 19:38:07 +01:00
d610ef059a Cleanup: Rename brush type field 2018-03-09 19:27:22 +01:00
040ec894a4 Cleanup: Rename brush icon field 2018-03-09 18:31:48 +01:00
827a5289ef Cleanup: Rename subdivide field 2018-03-09 17:52:49 +01:00
afcacf987a Cleanup: iterator macros 2018-03-09 11:07:15 +01:00
d1658af025 Merge branch 'blender2.8' into greasepencil-object 2018-03-09 10:53:02 +01:00
6fe83d88b9 Enable Settings by default in predefined brushes 2018-03-09 10:31:56 +01:00
052105b72f Reorganize Stroke panel grouping Settings 2018-03-09 10:29:03 +01:00
b74e90656e Reorganize Brush parameters panel
As we have a lot of options, the panel required a reorganization and clarify what parameters affect after the stroke is created.

Also added options to enable/disable effects like smooth without changing the values.
2018-03-08 19:50:24 +01:00
0dc8adbbab Cleanup smooth code and add one step more
It's better add a loop instead to repeat function call. This is cleaner and we can add more steps if required.
2018-03-08 16:01:58 +01:00
dd9855ed50 Colorpicker must be only in active window
When there are multiwindows, the color picker only must work in the region that originated the operator.
2018-03-08 11:02:59 +01:00
a2a4608a3d WIP: Make active smooth for 2 last points
The smooth now works with the last two points, but for oldest (p-2), uses a reduction factor to avoid strong changes.

This commit is part of the experimental smooth test.
2018-03-08 10:00:53 +01:00
a5e881c9fd Merge branch 'blender2.8' into greasepencil-object 2018-03-08 09:36:57 +01:00
bc99d6246c Missing in previous active smooth commit
The parameter must be used when call smooth function.

Fix error in values too.
2018-03-07 19:10:40 +01:00
ff5eba33ae Minor tweaks to input samples function
Now, the thickness is reduced at different levels depending of samples. The values have been obtained by experimentation.
2018-03-07 18:10:44 +01:00
9e23f80d82 WIP: Smooth while drawing stroke
Initial implementation of active smooth while drawing.

The UI parameter is experimental, so maybe in the future is removed/replaced.
2018-03-07 17:44:41 +01:00
7cc8d31f4c Remove unused affect_pressure parameter in smooth
This parameter was defined but internally was never used. The reason to disable this was that after testing, smooth the pressure got weird autistics results.
2018-03-07 11:06:05 +01:00
1b4ee92652 Chnage overlap factor for Dots to 0.5
The value used before was affected by a bug in point fragment shader. After fixing this bug, the right value here is 0.5 not 0.3.
2018-03-07 10:50:25 +01:00
ef80c41fb9 Make Dots mode thickness equal to Line mode
The dots was using half of thickness and when change the mode to line, the line was thicker.

Now, both thickness are equal.
2018-03-07 09:44:19 +01:00
d8689a421a Merge branch 'blender2.8' into greasepencil-object 2018-03-07 08:23:21 +01:00
40b1caae8f Merge branch 'blender2.8' into greasepencil-object 2018-03-06 19:15:23 +01:00
6fa4ac542d WIP: Integrate Cycles render
This is the first try to integrate the Cycles render with Grease Pencil.

Eevee uses its own call and don't need all this stuff because reuse all Eevee initialization code.
2018-03-06 19:14:04 +01:00
2ac968c167 Merge branch 'blender2.8' into greasepencil-object 2018-03-06 15:45:12 +01:00
6901b7294e Merge branch 'blender2.8' into greasepencil-object 2018-03-05 15:52:40 +01:00
7d9427aa77 Prepare eraser icon to use different images
The code is ready to change the icon for each type of eraser, but as it's not decided yet, we keep the same image in all of them while we decide new design.
2018-03-05 15:51:53 +01:00
3c28f6f727 Move mode type check before set mode
The mode must be verified for this object type before apply new mode.
2018-03-04 16:13:50 +01:00
1010b75aaf More changes in object mode switch
The outliner does not need special code.

Mode change still need more work, because in some situations, still the old mode remains activated.
2018-03-04 13:52:03 +01:00
7c466e1699 UI: Move brush mode to separated panel
This option has been moved to a separated panel because   is too disruptive to have in the main brush panel.

Maybe in the future must be moved to new location, but we put here while we found a better place.
2018-03-03 16:52:12 +01:00
629a5dfb42 UI: Change Pin icon location 2018-03-03 16:18:18 +01:00
d6a25d6262 Fix error using different eraser modes
If the bursh was eraser, the brush was not using the eraser mode.
2018-03-03 16:08:09 +01:00
abbcf1172f UI: Define pin icon for default eraser
Using pin button keep UI consistency better than a checkbox.
2018-03-03 11:38:16 +01:00
34296ab1d8 Merge branch 'blender2.8' into greasepencil-object 2018-03-03 10:55:08 +01:00
9321612879 Avoid drawing with Eraser brush
If the current brush is eraser and try to draw, cancel the operator.

This could be activated with the D key and must be forbidden.
2018-03-03 10:51:55 +01:00
16e0f2fa86 Implement brush eraser quick switch
This eraser switch works very similar to smooth sculpt brush in object sculpt mode.

When the user press Ctrl, the current drawing brush is replaced by the default eraser brush while hold the key.

After release the override key, the brush back to the drawing brush.
2018-03-03 10:39:33 +01:00
cc93479e3b UI: Hide appeareance panel for Eraser brush 2018-03-03 10:17:31 +01:00
c691ab8c79 Create a full set of eraser brushes
Create Soft, Hard and Stroke eraser brushes.
2018-03-03 10:12:15 +01:00
d1d5c99d12 Add new property Default Eraser
This property will be used when the eraser is enabled using fast switch key while drawing with other type of brush.
2018-03-03 00:07:16 +01:00
a2f8d2eb28 Merge branch 'blender2.8' into greasepencil-object 2018-03-02 23:24:25 +01:00
68683f2d4a Add new Eraser modes to UI panel
Now there are 3 types of Eraser in UI panel:

Soft: Need several passes to clean stroke.
Hard: One pass, clean points.
Stroke: Clean all stroke when touch any point.

This modes were available before using modifier keys, but it was not easy to discover.
2018-03-02 23:19:40 +01:00
4a7d969702 Cleanup: Move eraser brush draw to function and avoid duplicated code 2018-03-02 21:13:06 +01:00
9387647ee0 Fix problem with Eraser cursor size
The problem was the internal red area was not using the same size of the external lines.
2018-03-02 20:56:41 +01:00
7a0ee16f25 Change Eraser brush to use brush radius not global value
The old configuration uses a global user prefs value, but now must be the brush size.

Still need to fix the problem when resize size of the brush.
2018-03-02 20:15:51 +01:00
3058310638 Enable right cursor for Erase brush
The cursor must show that you are using the eraser
2018-03-02 20:04:47 +01:00
32c4bc3417 WIP: New Eraser brush
This new brush is equal to the old eraser, but it makes the interface more consistent.

Still need more work to adapt all eraser features, limit other actions not related to eraser and brush switching.
2018-03-02 19:30:39 +01:00
4a2cb1937c Cleanup previous commit
Make more compact the code
2018-03-02 16:57:15 +01:00
5b07881c52 Hide Draw cursor when Eraser is enabled
If the eraser is enabled, the little color dot used as cursor for drawing must be hidden and replaced by dash line circle cursor only.
2018-03-02 16:53:37 +01:00
90b8960bf6 Remove duplicate line
This line had to be removed in a previous commit.
2018-03-02 16:41:00 +01:00
a8818d53a9 Merge branch 'blender2.8' into greasepencil-object 2018-03-02 16:00:05 +01:00
a73d902b02 Fix again grease pencil modes after merge 2018-03-02 15:53:39 +01:00
40c13d2a7a Small change to capture algorithm 2018-03-02 14:15:09 +01:00
c652eb0a45 Adapt code after merge
THe code was moved to new module
2018-03-02 11:39:12 +01:00
b98df2831c Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/object/object_edit.c
	source/blender/editors/object/object_select.c
2018-03-02 11:29:28 +01:00
5855c23a64 Tweak missing event algorithm for extreme zoom
Due int number limitations, when the zoom factor is extreme, the points are captured with gaps. This change try to minimize this effect, but it's impossible to solve this issue completely.

The problem is the mouse position is always defined by a pair of int number, so the maximum precision is limited to that, so when project the point in 3D space, there are small precission erros.
2018-03-02 11:26:04 +01:00
e8ba703f80 Cleanup: macro's w/ an _END need a matching _BEGIN 2018-03-01 19:02:39 +01:00
31df0f7508 Merge branch 'blender2.8' into greasepencil-object 2018-03-01 18:44:04 +01:00
ccf99ea3b4 Cleanup more compiler warnings 2018-03-01 18:43:36 +01:00
bd769050cd Cleanup: Silent multiple compiler warnings 2018-03-01 17:30:25 +01:00
2d0babbbc7 Cleanup variable initialization 2018-03-01 16:47:34 +01:00
893694ffc0 Cleanup comment mistake 2018-03-01 16:31:29 +01:00
ca0ecfc234 Fast mouse event capture afected by zoom factor
Before, the number of points was not equal at different zoom levels.

To get this work, the pixel size is calculated and the distance is relative to 30% of the brush thickness multiplied by the number of samples.

The number of samples has been reduced too, because the new method doesn't need big values.
2018-03-01 16:30:25 +01:00
Dalai Felinto
c5950874b2 Fix blenderplayer (tm) 2018-03-01 10:50:18 -03:00
a474726eb2 Merge branch 'blender2.8' into greasepencil-object 2018-03-01 11:32:00 +01:00
a057e55981 Fix grease pencil mode problems after merge 2018-02-28 20:03:12 +01:00
b45349dee1 More merge fixes 2018-02-28 19:05:10 +01:00
ee93194f9c Fix missing line after merge 2018-02-28 18:34:04 +01:00
073d6d07e4 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/scene.c
	source/blender/editors/object/object_select.c
2018-02-28 18:28:38 +01:00
65b450d9cd Add new Brush Eraser icon
This is part of the new eraser brush.

Design by Matias Mendiola
2018-02-28 18:22:49 +01:00
55772c2c67 Fix error in Fill due pixscale
I missed to change this pixel factor
2018-02-28 17:54:39 +01:00
c6ef2f587e Replace brush type by enum
This is the first step to add eraser brush
2018-02-28 17:21:43 +01:00
6f5c47ea3e Change icon for Fill Brush
After some reviews by Pablo Vazquez and Matias Mendiola, they decided to change color to keep UI icons consistency.
2018-02-28 17:20:49 +01:00
611337cad5 Fix refresh error when change mode to Boxes
I had forgotten to pass the parameter to shader.
2018-02-28 14:23:16 +01:00
aa342de7c0 Cleanup: Remove typo error
Thanks to Nikola Ivanov for catch the error.
2018-02-28 14:18:46 +01:00
edb1c5c10b Cleanup: Make function static 2018-02-28 10:38:15 +01:00
5a37f69467 New Draw mode "Boxes"
This draw rectangles instead of Dots and allow new artistic effects.
2018-02-28 10:28:24 +01:00
ee71026222 Fixes after merge 2018-02-28 10:14:05 +01:00
811a6c298c Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/intern/DRW_render.h
        source/blender/draw/intern/draw_manager.c
2018-02-28 10:05:27 +01:00
019365698a More tweaks to samples algorithm 2018-02-27 17:12:56 +01:00
85dbec66e2 Merge branch 'blender2.8' into greasepencil-object 2018-02-27 17:00:40 +01:00
3b8fa28855 Minor changes to Input Samples algorithm
Now the number of slices is rounded using a ceiling value.
2018-02-27 16:59:28 +01:00
21a09cbdcc Merge branch 'blender2.8' into greasepencil-object 2018-02-27 12:05:47 +01:00
6ba26e6ab5 Fix infinite loop if color is missing
Usually, this never happens, but if any color is missing, needed to add to hash to avoid the creation of duplicate materials.
2018-02-27 11:47:03 +01:00
98d1b46417 Fix wrong interpolation for fake events
The distribution was not even and it was slightly moved because it was not necessary to copy point between segments.
2018-02-27 09:53:29 +01:00
0336d60151 Merge branch 'blender2.8' into greasepencil-object 2018-02-26 22:11:02 +01:00
1c045f64d0 Merge branch 'blender2.8' into greasepencil-object 2018-02-26 19:37:08 +01:00
c1c1b52556 Invert Input Samples value
In order to keep UI consistency, the value now it's inverted. Bigger values, means more precission.

A value of Zero means, no additional sampling.
2018-02-26 19:34:52 +01:00
a636f3fbd1 Generate missing mouse event
When the artist moves very fast the mouse, there are event that are not captured due hardware limitations, so need to interpolate the position and generate the missing control points in the stroke.
2018-02-26 18:38:03 +01:00
0014d0959c Fix Monkey stroke scale
This was missing when Pixfactor was changed
2018-02-26 14:54:18 +01:00
841745a33b Use Onion colors for Textured strokes
Before, if the stroke was textured, the onion frames were not using the assigned for prev and next frames in the onion skin panel.
2018-02-25 19:24:59 +01:00
ecad07aeae Merge branch 'blender2.8' into greasepencil-object 2018-02-25 17:02:20 +01:00
36efa02db3 Revert "GWN: Fix immediate mode when closing a window."
This reverts commit https://developer.blender.org/rBe7c4a9d1ef76f6edff95ca9f418a65fc42a453dc
2018-02-25 16:54:11 +01:00
1c375729c6 Cleanup: Fix stupid typo error in previous commit 2018-02-25 11:40:40 +01:00
1f19e0fd6c Merge branch 'blender2.8' into greasepencil-object 2018-02-25 11:30:23 +01:00
9dab2a5892 Back removed property and set as deprecated 2018-02-25 11:29:33 +01:00
ab3d9b6e8c Enable Fill for DOTs mode
The fill was disabled for dots mode and only used in line mode. Now, as Dots can be used to draw, the fill is required.
2018-02-25 11:16:45 +01:00
debf38840b Replace Use Dots for a Enum menu
Instead to define a checkbox, now the dots is a mode.
2018-02-24 21:58:28 +01:00
8198668228 Apply strength factor to textured strokes 2018-02-24 20:01:14 +01:00
208b018edf Adapt render code after merge
Again, the function parameter list has changed in Draw Manager and the gpencil code need changes.
2018-02-24 18:28:19 +01:00
e5220e2f7e Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/intern/draw_manager.c
2018-02-24 18:02:36 +01:00
803f80c673 Add UV rotation option to Smooth and Noise modifiers
To be consistent, the modifiers must work with UV rotation as the sculpt brushes do.
2018-02-24 18:00:07 +01:00
71f0e59b2e Apply Smooth and Random sculpt to UV rotation
Now it's possible apply the sculpt to the rotation of the UV texture.
2018-02-23 23:55:27 +01:00
4f504f2780 Update strokes UV when change UV factor in color
Recalc UV data for any stroke that is using the color.
2018-02-23 23:33:57 +01:00
59bd7c34ba UI: Rename Pixel Factor to Scale
From artist point of view it's more clear the new name. Pixel factor can be technically correct, but it's look weird.
2018-02-23 17:08:50 +01:00
3d479a5cc5 Cleanup extra empty line
This line was introduced in previous commit by error.
2018-02-23 10:49:52 +01:00
89316bc784 Merge branch 'blender2.8' into greasepencil-object 2018-02-23 10:39:13 +01:00
45f94cb02a Rescale Pixel Factor to to something more manageable
The old scale between 30 and 10000 was not user friendly and it was inverted (bigger value got smaller stroke)

Now the default scale is 1.0 and bigger values get thickerr strokes.
2018-02-23 10:37:01 +01:00
8299296ed1 Cleaunp previous commit
This avoid pass one matrix
2018-02-22 18:52:29 +01:00
42f2ec08d2 Fix error in VFX Pixelate modifier
The location must be multiplied by ModelViewProjection matrix.
2018-02-22 18:35:09 +01:00
055123bd58 Depsgraph: Wrap all arguments for modifiers relations update into a struct 2018-02-22 16:03:34 +01:00
3bb51bb162 Merge branch 'blender2.8' into greasepencil-object 2018-02-22 15:48:25 +01:00
b2bde994e9 Merge branch 'blender2.8' into greasepencil-object 2018-02-22 12:59:20 +01:00
f175657591 Rename pixel parameter
The name pixel can be confusing. It's better use UV factor because pixel concept is something intern.
2018-02-22 10:03:37 +01:00
b9ee2fb77c MSVC 2013 Compile Fix/Workaround for "static thread_local" vars
Apparently MSVC 2013 has trouble with stuff that's been declared
"static thread_local" (and/or maybe even the "thread_local" keyword).

https://stackoverflow.com/questions/29399494/what-is-the-current-state-of-support-for-thread-local-across-platforms
2018-02-22 19:22:50 +13:00
d9d57fe8f5 Merge branch 'blender2.8' into greasepencil-object 2018-02-22 19:10:40 +13:00
280fe8f91c Merge branch 'blender2.8' into greasepencil-object 2018-02-21 20:28:50 +01:00
e9727767a2 Calculate UVs while drawing
Now the UV while drawing is calculated using same logic used in final UV.

There will be differences between drawing and final due simplify and smooth postprocessing, but the look is more similar now.
2018-02-21 19:59:18 +01:00
f3370eb2bb Redo UV calculation using color factor
Now the Pixel size ratio is determined by a parameter of the color and not by view pixelsize.

This solves various problems and allow the user define dfifferent effects.

NOTE: Still pending to use the same logic while draw.
2018-02-21 19:32:17 +01:00
c4c60b3f94 Cleanup: Rename function 2018-02-21 16:21:42 +01:00
ca6ee0ef72 Use UV randomness UV rotation parameter 2018-02-21 11:09:27 +01:00
11910fdb50 New UI parameter to define UV rotation randomness 2018-02-21 11:04:14 +01:00
a12b8dbc40 Merge branch 'blender2.8' into greasepencil-object 2018-02-21 10:39:13 +01:00
e07aa09bd2 Fix pattern for Fill stroke 2018-02-21 09:35:07 +01:00
36b2a8fb6c Fix pattern mode for strokes
Now use the alpha channel
2018-02-21 09:30:09 +01:00
23f5f28a15 Adapt grease pencil render code after last merge 2018-02-20 17:01:49 +01:00
f7dad2b0f8 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/intern/draw_manager.c
2018-02-20 16:13:05 +01:00
0b03ef7000 Use same rotation factor in both sides 2018-02-20 16:09:24 +01:00
b0744c7855 Use fix UVs for solid stroke
If the stroke is solid, use fixed uvs to avoid any possible gap.
2018-02-20 16:06:36 +01:00
30096e1e18 Extract Render code to separated function 2018-02-20 10:25:30 +01:00
3a5f46bd7f Fix error in UV rotation when subdivide 2018-02-20 10:15:58 +01:00
44d3c80a74 WIP: Add UV rotation for Dot texture
Now the ramdom is fixed. Need parameters to adjust.
2018-02-20 10:07:15 +01:00
978f50a0c8 Add ToDo comment for fixing later 2018-02-19 19:28:23 +01:00
2c2ff7826a Missing in previous commit (encaps for solid only) 2018-02-19 19:25:17 +01:00
bc30fbd832 Use stroke encaps only for solid mode
If use endcaps in texture mode, sometimes the texture is not correct if the type of texture used is not defined in a way that can be doubled.
2018-02-19 19:08:45 +01:00
32a1cba504 Calc UV data while painting 2018-02-19 19:07:06 +01:00
3e468e5556 WIP: Improved use of UV along the path and speedup
Now the texture is calculated using the pixelsize along the stroke.

Added a precalculation of fill and Uvs caches in order to avoid recalculation on frame change. This makes first play a little more slow (few miliseconds), but the next time the frame is used, all cache data is precalculated and the overall FPS is better when use fill strokes.
2018-02-19 17:54:00 +01:00
d674891da3 Add new UV data parameters to shaders
Add new parameters to transfer UV data information in order to texture the stroke along the path.

WIP: Still not working
2018-02-19 11:01:21 +01:00
63d331b5de Calc UV factor along the stroke
This data will be used in texture strokes
2018-02-18 18:19:40 +01:00
f0419a4a2a New point fields for UV data
These fields will be used to save information about texture coordinates of the point.
2018-02-18 17:11:53 +01:00
b767d3ac08 Fix compiler warnings (extra parameter)
This was missing in previous commits
2018-02-18 16:52:14 +01:00
388eeebdfa Rename include after merge 2018-02-18 16:50:42 +01:00
7c3be5bfb5 Merge branch 'blender2.8' into greasepencil-object 2018-02-18 16:38:09 +01:00
94daab8ba0 Fix tone mapping error in vfx
The tone mapping parameter for shader was missing.
2018-02-18 12:23:47 +01:00
7245f72b8a Remove old tonemapping code
This code was slower than current fragment code.
2018-02-18 12:16:55 +01:00
14533f446c Change tonemapping to shader
This makes faster the tonemapping and fix texture issues.

Still pending clear old colorspace code.
2018-02-18 12:04:43 +01:00
57279f84f9 Merge branch 'blender2.8' into greasepencil-object 2018-02-17 15:56:07 +01:00
36eef07e3b Fix UV scale for stroke endcaps 2018-02-16 19:06:33 +01:00
41b962f19e Fix UV coordinates for strokes 2018-02-16 18:42:07 +01:00
b0455220bf Use DRW function to check opengl render
Instead of check global value, use draw manager function to verify if it's running an opengl render.
2018-02-16 17:08:44 +01:00
ad50e0f7ca Merge branch 'blender2.8' into greasepencil-object 2018-02-16 16:53:38 +01:00
ee7134fdd3 Merge branch 'blender2.8' into greasepencil-object 2018-02-16 10:35:28 +01:00
3a0febbb75 Add warning message to enable passes
This message would be added to the main operator, or maybe if grease pencil is present, enable these passes by default.
2018-02-16 10:32:13 +01:00
f2492ab712 Cleanup: Remove unused file 2018-02-16 10:27:43 +01:00
ed6d64320e UI: Hide grease pencil paper if not gpencil object 2018-02-15 19:57:35 +01:00
1534ffe42c Fix pixelate for negative values
If the object was in negative location, the draw got full opaque.
2018-02-15 18:52:10 +01:00
db171b93f0 Fix error for render onion skin
The flag was not working as expected in renders
2018-02-15 17:02:20 +01:00
78e9821df7 Rename function macro after merge 2018-02-15 16:10:25 +01:00
f51aa64db3 Merge branch 'blender2.8' into greasepencil-object 2018-02-15 16:01:43 +01:00
adcdd047e1 Fix merge error
The line must be after grease pencil code
2018-02-15 10:32:45 +01:00
a556f170f7 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/intern/draw_manager.c
2018-02-15 09:31:51 +01:00
d284633e80 Merge branch 'blender2.8' into greasepencil-object 2018-02-14 17:01:30 +01:00
0ea09fb553 Fix merge errors 2018-02-14 10:45:38 +01:00
79a18e1550 Merge branch 'blender2.8' into greasepencil-object 2018-02-14 10:35:21 +01:00
535277144a Fix merge compiler error 2018-02-13 17:51:26 +01:00
27ce492edb Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/space_outliner/outliner_select.c
	source/blender/editors/space_view3d/view3d_draw_legacy.c
	source/blender/makesrna/intern/rna_sculpt_paint.c
2018-02-13 17:38:38 +01:00
00c6e57faa Remove duplicate line 2018-02-13 17:34:18 +01:00
86cb87c0fa Chnages to use OCIO 2018-02-13 13:22:34 +01:00
0453d2fe39 Cleanup Style
Changed by error in previous commit
2018-02-13 12:59:42 +01:00
a0d6bc6af0 Fix undo modes and mode changes
Now the Ctrl+Z does not undo the mode.
2018-02-13 11:48:31 +01:00
8c5f2e1bbc Chnage lasso eraser keymap to Ctrl+Alt 2018-02-13 09:11:36 +01:00
3d55a721bc Refresh cache if render to refresh viewport 2018-02-12 20:54:49 +01:00
be9f43e57d Cleanup: Use macro 2018-02-12 19:31:59 +01:00
a8d4b0154d Create multiframe buffer only if multisample enabled 2018-02-12 17:14:31 +01:00
acd903e16e Cleanup style 2018-02-12 17:01:00 +01:00
58d293dfb3 Merge branch 'blender2.8' into greasepencil-object 2018-02-12 16:40:16 +01:00
11cbbf2855 Cleanup unused code 2018-02-12 16:35:53 +01:00
e0ea483bd7 First try to fix grease pencil object modes
After last merge of 2.8 the object modes was not working. Now we back to previous situation where the user can switch between objects and handle different modes.
2018-02-12 16:30:22 +01:00
74032304c0 Fix multisample error in render
It was checking the wrong default_fb instead of multisample_fb, so it was never created.
2018-02-12 11:21:55 +01:00
5fb9d70821 Merge branch 'blender2.8' into greasepencil-object 2018-02-12 09:15:34 +01:00
33654d77c2 Remove select operator hack
This hack was used when all modes shared the same keymaps, but now it's not necessary.
2018-02-12 09:10:52 +01:00
a18f1656c1 Fix keymap error 2018-02-11 16:58:26 +01:00
f990cf29c1 Back Lasso and Border eraser
These options were removed by error.

Due keymap conflicts, the new keymaps are:

Lasso: LMB + Ctrl + Shift
Border: B
2018-02-11 16:31:29 +01:00
6b924d1b44 Fix error when init drawing
The object is already activated, so if reactivate, the mode is missing.
2018-02-11 12:36:20 +01:00
8b2c3704db Merge branch 'blender2.8' into greasepencil-object 2018-02-11 12:07:56 +01:00
753e83e608 UI: Back Brush appearance panel and fix active mode
Back the brush appearance panel to separated tab and fix error introduced in previous commit because workspace hasn't active_object_mode
2018-02-11 11:34:48 +01:00
40cb8bf45f Change color picker keymap to P key
Replace old F6 keymap to avoid conflicts.
2018-02-11 11:23:23 +01:00
377ff0fee6 Back eraser to Ctrl keymap
Soft Eraser: LMB + Ctrl
Hard Eraser: LMB + Ctrl + Shift
Stroke Eraser: LMB + Ctrl + Alt

Straight Line: LMB + Alt
Polyline: LMB + Shift + Alt
2018-02-11 11:17:43 +01:00
6bdd1ee77b Cleanup: Rename property to avoid negative names 2018-02-11 10:49:59 +01:00
a596d5df05 Fix error in OpenGL render
As F12 and OpenGL are detected as render mode, the pixel size was not correct.

I have added a check to verify if it is a real F12 render or it's a OpenGL.

Maybe this check must be removed if the OpenGL render operator is deprecated by a new system, but we need to keep the verification until them.
2018-02-10 20:04:24 +01:00
ca550d2073 Create multisample buffer for render
As render does not create default buffers by default, the render needs to create multisample default buffer in order to use antialiasing.
2018-02-10 17:58:25 +01:00
eb54e97784 Fix render artifacts
When 3D object was in front there was some noise.
2018-02-10 17:16:29 +01:00
d7c3a09aac Fix render error when previous result is NULL 2018-02-10 13:12:28 +01:00
9ead9396d8 Fix error when sky is transparent
If the sky is transprarent the zdepth value is not valid to check, so it's better don't copy the pixels.
2018-02-10 12:56:52 +01:00
5d4b766a49 Interpolate render result for transparent colors
There is still some problems with AA.
2018-02-10 12:37:36 +01:00
294ff5ec16 Cleanup: Rename variables 2018-02-10 11:28:48 +01:00
692704543b Check exist grease pencil objects before render
If the scene has not grease pencil objects, it's not required to call grease pencil rendr functions.
2018-02-10 11:26:40 +01:00
1e7ed3d85c Missed in previous commit 2018-02-09 20:10:41 +01:00
ee6a257cab WIP: Render mixing GP and Eevee or Cycles
Still there are problems with AA, but now it's possible to get a composed result with Cycle/Eevee and Grease Pencil.
2018-02-09 20:05:26 +01:00
65f62b70c2 Temp fix for object mode
The function ED_object_base_activate() was calling again the mode set and undo the mode change.

Do we need this function? Really the object is already the active one.
2018-02-09 18:11:06 +01:00
a8fa2d9321 Fix infinite loop in mode set
The mode set entered in an infinite loop
2018-02-09 17:50:11 +01:00
f9d6b3565d Fix compiler error after merge 2018-02-09 17:09:12 +01:00
c5dc05b038 Fix on previous commit to use active_object
Need to use active_object, not object
2018-02-09 17:07:16 +01:00
50ab5db1c3 Fix python object mode changes
After last changes, need to use workspace mode
2018-02-09 17:03:40 +01:00
2f6269ca74 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenkernel/intern/paint.c
2018-02-09 16:39:17 +01:00
507e3e12b6 Merge branch 'blender2.8' into greasepencil-object 2018-02-09 10:27:55 +01:00
3df45f7f97 Cleanup: Rename function to keep render grouped
Keep all render functions name with _render prefix.
2018-02-09 10:24:59 +01:00
840612bd9d More compile Fixes for object->mode refactor
TODO: I've come across some rather fishy-looking code in a few places
      that will need more careful review later

* gpencil-select.c - 1181
* object_edit.c - 1596
* view3d_select.c - 1626
* undo.c - 230
2018-02-09 19:32:39 +13:00
3fb46529a5 Cleanup: Rename variables 2018-02-08 16:31:39 +01:00
9e2faaf0f5 WIP: Initial commit to use zdepth render data
Still not tested (branch is broken), but this commit is to keep log of the changes.
2018-02-08 16:08:44 +01:00
71b3495a08 Compile Fix: ob->mode lookups 2018-02-09 03:25:49 +13:00
99e8154098 Compile Fix: Fixes for the mode toggle operators
* Changed ob->mode / ob->restore_mode to
  workspace->object_mode_restore / workspace->object_mode

* BKE_workspace_object_mode_set() got removed.
  From the changes in rna_wm.c in (345c6298e9)
  it looks like this is all we still need to do now.
  However, this will need to be reviewed more carefully later.
  For now, this will do!
2018-02-09 03:17:07 +13:00
781cf304a4 Compile Fix: Use proper flag for tagging temporary datablocks created for drawing only 2018-02-09 00:20:04 +13:00
ffc77a4e67 Merge branch 'blender2.8' into greasepencil-object 2018-02-08 23:47:09 +13:00
46c5fe3d8c WIP: Temporary hack to get something showing up when using GP in 2D editors for annotations
Temporary restoration of init_palettes() for the non-2D case. Ultimately,
this will not remain, but we need to retain support for this until the
drawing code is sorted out.
2018-02-08 23:43:42 +13:00
51a60c9990 Fix render pixel size
The calculation must be equal to the viewport, because using the camera pixel size, the result is not correct.
2018-02-08 11:07:42 +01:00
225f174970 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/space_outliner/outliner_draw.c
2018-02-08 16:16:58 +13:00
e89ac16ac0 Fix: Data-Blocks view in Outliner no longer displayed property values, making it semi-useless
Partially revert efe1af3d11

The offending commit over-zealously removed the datablocks viewer case
as well, when only the condition needed to be modified.
2018-02-08 16:13:55 +13:00
106c212b1a Cleanup - Use builtin function for clarity 2018-02-08 16:09:15 +13:00
5fb42459e6 Fix crashes trying to draw GP strokes in 2D editors
Currently nothing appears when you try to draw still, but at least it
won't crash.
2018-02-08 15:46:07 +13:00
27c63de39c Cleanup
* Reduce number of extra/excess layout.row() elements with a single item
* Simplify logic (redundant check)
2018-02-08 14:54:07 +13:00
ecb4d23df9 Try to fix pixsize in render mode
Still the pixsize is not working becaus ethe values are not valid.
2018-02-07 19:41:11 +01:00
f1dfddd723 WIP: More work on render
Now get a result, but still the stroke is missing and replace any other render image.
2018-02-07 18:18:56 +01:00
690f118cfb WIP: Initial steps to define render to image functions
This commit is to put in place all components of the render, but still not working and only enabled in debug mode.
2018-02-07 16:58:28 +01:00
316a356c54 Calculate zdepth relative to camera plane if rv3d is null
If the viewport is not available, RegionView3D is null, so to calculate the z-depth must use the camera plane.

This is a preliminary step to integrate render (F12)
2018-02-07 16:32:14 +01:00
f828777fbe Disable grease pencil paper in render mode
This is a preliminary step to integrate render (F12)
2018-02-07 14:12:32 +01:00
0bcde767a9 Merge branch 'blender2.8' into greasepencil-object 2018-02-07 11:07:31 +01:00
1e6e4b326d Cleanup: Reduce number of passes using pointers
Instead to define different passes for mixing final result, now reuse the passes and use pointers to replace input textures.
2018-02-07 11:04:44 +01:00
f4051f05cb Cleanup style 2018-02-07 10:31:12 +01:00
5d274778f5 Fix: Don't show "Brush Appearance" panel in Edit Mode 2018-02-07 21:00:56 +13:00
f3d894db65 GP UI: WIP Attempt to cleanup some weird alignment/nesting/spacing issues
It's unclear to my why all these fields seemed to be individually wrapped
in both a row and column layout, but with "align=True" enabled, causing
the widgets to be oddly separated in the UI
2018-02-07 15:58:09 +13:00
bb30a721b4 GP Eraser Panel: Expose button to activate eraser
It's currently impossible to activate the eraser in the 3D view otherwise
if you're using a mouse (unlikely for most serious 2D artists, but possible
for non-sculpting modellers/animators) or if your tablet doesn't have an
eraser end (IIRC some non-Wacom styluses may have this limitation)

Also noted that we should also expose the hard/soft mode, and/or strength
settings here too (as opposed to having these hardcoded and/or mapped to
hardcoded modifier keys only)
2018-02-07 15:28:33 +13:00
6c13ef9f94 GP UI - 2D/3D Split: Move all 3D toolbar only panel code to space_view3d_toolbar.py
* All toolbar panels that are only used in the 3D view have now been
  moved out of properties_gpencil_common.py, as they are *only* used
  in that editor.

* Sculpt, Edit, and Eraser panel definiitions remain in the common file
  for now, as it's still possible for these to be used in other editors
  (at least in theory - there may be some new limitations I haven't found yet)
2018-02-07 15:14:00 +13:00
c8844ef24b GP UI - 2D/3D Split: Split out the "Create Shapes" and "DrawingToolsPanel" into separate classes
The 3D/GP Object only used part of the old "DrawingToolsPanel" to
draw the "Shapes" panel, going so far as to use an empty label +
custom draw header function to dynamically change the label.

This commit properly fixes the code here by separating out the code for
the two use cases:
* The GP object case is now handled by a dedicated "GreasePencilCreateShapesPanel"
  that only does the "Shapes" stuff
* I've reverted the other case back to the master version, as this is more
  suitable for use by all the other 2D editors
2018-02-07 14:36:10 +13:00
17fa87aa5a Clean Boundary Fill: Clarify Labels/Tooltips 2018-02-07 14:18:11 +13:00
3ec422182f GP "Strokes Edit" Panel: Consolidate a few items in preparation for restoration of 2D GPencil (WIP)
The groupings here are not final, and can still be adjusted/scrapped.

1) Used "operator_menu_enum"'s in place of listing out all the modes of
   certain operators with multiple modes. This brings those operators more
   in line with the other ops here (and in other parts).

2) Fixed the code to not show 3D only operators if this panel gets used
   anywhere else.
2018-02-07 14:17:47 +13:00
f78059a4f0 Cleanup: Style fixes 2018-02-07 13:52:31 +13:00
70a41a5200 Cleanup: Move modal operator draw callbacks out of ED_gpencil.h
Turns out that these were only actually used from within the gpencil
module (i.e. they were defined in drawgpencil.c, and called from the
gpencil_<opname>.c files), so it's not even necessary to export these
function prototypes in the ED_gpencil.h header.
2018-02-07 13:09:19 +13:00
a4b72a41a4 Cleanup: Remove color picker defines from headers
There's no need for these defines to be in any headers, as this operator
is entirely self-contained in its own file now.
2018-02-07 12:33:28 +13:00
96ba61cf21 Merge branch 'blender2.8' into greasepencil-object 2018-02-06 17:23:18 +01:00
c0cef0a393 Remove limitation of fill only colors
Now, when a fill brush is selected, the color picker shows all colors, not only fill colors. This makes the palette more consistent.
2018-02-06 17:17:09 +01:00
d56a035f7d Fix enum after merge
The code has been moved to new header file, so new definitions were missed.
2018-02-06 16:30:04 +01:00
c1401c7966 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/object/object_modifier.c
	source/blender/editors/space_outliner/outliner_tree.c
	source/blender/makesdna/DNA_object_types.h
2018-02-06 16:18:59 +01:00
36b64064f1 GP Toolbar UI: Move the "Eraser" and "Brush Appearance" panels to the Tools tab in Draw Mode
It was awkward having these in the "Options" tab, where they were
likely to get missed. This change will perhaps make more sense
after some of my other upcoming changes here.
2018-02-07 03:05:03 +13:00
f4f230381d Cleanup: Simplify various bits of the GP Color Picker code
* Removed the redundant init() wrapper
* Got the "focus" text highlight working again (missed from previous commit)
* Removed some unused vars
* Clarified reason why poll fails
2018-02-07 03:05:02 +13:00
2bc6c2de06 Fix: GP Color Picker text positioning/sizing was using an absolute pixel size for an offset
This would break when changing the DPI settings
2018-02-07 03:05:02 +13:00
c9c2e888e2 GP Color Picker: Highlight the color under the mouse
Previously, the color picker provided no feedback on which
color under the mouse would get applied when clicking.
It also wasn't that clear what the current active color
was.

This commit fixes this, making the UI feel more like a
standard Blender menu/popup, and less like a glitchy
non-interactive graphic, by drawing a highlight rect
behind the item currently under the mouse. By default,
the current/active color will be highlighted before
the mouse enters the panel.
2018-02-07 03:05:01 +13:00
71c423f6b3 GP Color Picker: Shrink thickness of outlines around color swatches
Now it looks less cartoonish, and more in line with other UI widgets
2018-02-07 03:05:00 +13:00
6861ea7cdd Cleanup: Use BLI_rect functions instead of inlining boundbox range checks 2018-02-07 03:05:00 +13:00
2637686bd1 Fix error of render when select object not GP
The problem was the cache was not set to dirty if the active object was not a GP object.
2018-02-05 18:03:47 +01:00
90387cfa0f Merge branch 'blender2.8' into greasepencil-object 2018-02-05 16:12:37 +01:00
f276b08714 Convert colors to linear for OpenGL render
This is a workaround to convert the colors to linear space instead of sRGB for opengl render.

This can change in the future, but now this fix is required in order to produce the renders of Hero open movie.
2018-02-04 20:05:45 +01:00
e59a9210fd Merge branch 'blender2.8' into greasepencil-object 2018-02-04 13:42:19 +01:00
cb72b906d8 Merge branch 'blender2.8' into greasepencil-object 2018-02-03 16:26:14 +01:00
49cf21487a Replace BKE_object_is_visible by context function 2018-02-03 12:37:22 +01:00
18e4a28665 Add missing initialization values to DrawEngineType
Some new callback variables have been added to the DrawEngineType struct. These values are not used, but need to be initializated properly with NULL.
2018-02-03 11:10:54 +01:00
ef3a03c810 Improve Stabilizer tooltip 2018-02-03 11:03:12 +01:00
1c32299a2b Merge branch 'blender2.8' into greasepencil-object 2018-02-03 09:51:14 +01:00
f2d0df82fa Keep selection after Split stroke
When split a section of the stroke is better to keep the selection.
2018-02-02 20:39:32 +01:00
59828ced95 Cleanup: Remove unused variables 2018-02-02 20:15:46 +01:00
bd77846825 Cleanup: Fix comments 2018-02-02 17:48:19 +01:00
20d85e457c Merge branch 'blender2.8' into greasepencil-object 2018-02-02 17:32:17 +01:00
2987202deb Merge branch 'blender2.8' into greasepencil-object 2018-02-02 17:01:38 +01:00
d7a3669304 New Split operator
Split selected points in a new stroke in the same frame. The stroke is not created in the current frame, but in the frame of the original stroke.

Shortcut: V
2018-02-02 16:59:10 +01:00
3586981e8f Cleanup: Remove duplicate operation
It was stupid add and sub the same value
2018-02-02 11:22:34 +01:00
814373f13e Make color picker panel more compact
There was too many space between colors and panel borders.

Also changed the aspect ratio for small number of colors.
2018-02-02 10:49:54 +01:00
19aec0a376 Merge branch 'blender2.8' into greasepencil-object 2018-02-02 10:34:37 +01:00
0cc0b89013 Cleanup: Create function to duplicate stroke to avoid code duplication. 2018-02-02 10:34:04 +01:00
23aa0fdc36 Cleanup: De-duplicate dynamic enum function used for setting GP brush icons
It turned out that there were slight differences between these two
versions (namely, where they searched for the list of active brushes),
but it's not too much of a stretch to use the same code for this with
a few minor tweaks, as per this commit.
2018-02-02 19:43:27 +13:00
ea55e31f27 Cleanup: Remove unused/deprecated dynamic enum stuff 2018-02-02 16:15:41 +13:00
27e3b782e4 New option to separate Points
Added an option to separate selected points and not only whole stroke.

Also some cleanup task as rename vars and reorganize code.
2018-02-01 19:18:05 +01:00
af1c1ff2a1 Add P key shortcut for Separate operator 2018-02-01 18:23:16 +01:00
faaf20c3a2 UI changes for color picker
* Colors have labels, so previews don't need to be as big, GP_BOX_SIZE  set to 32.
* More padding between items, they are too close to each other at the moment GP_BOX_GAP set to 24.
* Round boxes  are  a bit less round to match the rest of the UI 0.2f  (before used 0.4f)
* Cursor should not change to color picker. We are performing an action (selecting an item), not picking UI colors per se.

Thanks Pablo Vazquez for the feedback
2018-02-01 17:11:03 +01:00
0319fd82e4 Merge branch 'blender2.8' into greasepencil-object 2018-02-01 16:31:49 +01:00
cbe20b9a2d Cleanup: Define a shared poll method for edit 3D 2018-02-01 16:22:03 +01:00
e5989702ee New Separate operator
This operator works similar to mesh separate operator, but for grease pencil strokes.

Two options:

a) Selected Strokes
b) Active Layer
2018-02-01 16:22:03 +01:00
dd7e0353c7 Cleanup: Remove unnecessary flags and fix typo 2018-02-01 16:22:03 +01:00
28b9dfeece Move int <-> float 2d vector funcs from GP code to Math Lib
We now have the following two new functions:
* copy_v2fl_v2i(float r[2], const int a[2])  <-- Copies 2D int vector to float vector
* round_v2i_v2fl(int r[2], const float a[2]) <-- Copies 2D float vector to int vector, by rounding the values
2018-02-01 20:38:41 +13:00
e6b8221652 Merge branch 'blender2.8' into greasepencil-object 2018-01-31 10:17:30 +01:00
8115103911 Cleanup: Use standard mathlib functions here, instead of inlined pointer magic/etc. 2018-01-31 18:58:27 +13:00
b05f4c7132 More self-contained fix for previous commit 2018-01-31 18:32:19 +13:00
2e64865c51 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
2018-01-31 18:30:29 +13:00
e1ae00c38b Cleanup: More simple fixes 2018-01-31 17:27:44 +13:00
6701e8348e Cleanup: Style fixes 2018-01-31 17:22:06 +13:00
a99c4c7290 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.
2018-01-31 17:06:21 +13:00
bc125b415d 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)
2018-01-31 15:50:04 +13:00
b186698d9b Cleanup: Prefix all exported functions with module prefix 2018-01-31 14:23:04 +13:00
0cd8cdd8d4 Cleanup: Fix mixed use of tab/space whitespace 2018-01-31 14:21:58 +13:00
fdc1a1c06b 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.
2018-01-31 14:10:04 +13:00
833afb75ae 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.
2018-01-30 17:45:08 +01:00
2aa5950562 Merge branch 'blender2.8' into greasepencil-object 2018-01-30 17:18:54 +01:00
0f8af3a5ce Rename "lazy Mouse" to "Stabilizer"
Also changed "Radius" to "Distance"

Thanks Pablo Vazquez for the feedback.
2018-01-30 17:18:22 +01:00
3fde3902c1 Merge branch 'blender2.8' into greasepencil-object 2018-01-30 09:52:08 +01:00
7d48923671 GP Add Primitive: Don't make a copy of the new stroke. Just copy it over! 2018-01-30 19:04:54 +13:00
496064f1f3 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.
2018-01-30 19:04:54 +13:00
4cd2f80f9d Cleanup: Streamline logic here - just check once, not twice 2018-01-30 19:04:53 +13:00
e12b1c2a27 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
2018-01-30 19:04:52 +13:00
e70d497e3e 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.
2018-01-30 19:04:52 +13:00
388bb6ec85 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.
2018-01-30 19:04:51 +13:00
4d99df8a9b 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)
2018-01-30 19:04:50 +13:00
de29d5fe00 GP Add Primitives: Removed the requirement for an active layer
Previously, the add primitive operator (rectangle/circle) required
there to be an active layer present before it would allow you to draw
a new primitive. However, this reduced the usefulness of this tool
(especially if you intended to use these tools to roughly block out
the requried shapes first in a new/blank GP object).

There was no real reason for this limitation, so no, the operator will
create a new layer itself if necessary, just like the Draw operator
has done since day one!
2018-01-30 19:04:50 +13:00
00fe5d45d3 Cleanup: Remove redundant functions
These were just adding extra layers of abtraction/complexity
without serving any actual purpose.
2018-01-30 19:04:49 +13:00
498c203130 Rename "Chessboard" to "Checker Board" 2018-01-29 23:11:57 +01:00
240dbd295f Support multiframe for change color operator 2018-01-29 19:59:48 +01:00
c85edc8bcc Fix Undo problem with color picker 2018-01-29 19:48:11 +01:00
458aee0a94 Redesign off GP icons
Designed by Matias Mendiola

Thanks Pablo Vazquez for the feedback
2018-01-29 19:45:18 +01:00
99ee18c5a2 Merge branch 'blender2.8' into greasepencil-object 2018-01-29 18:33:11 +01:00
8f7f79e825 Enable drawing start with Shift + Mouse
This is necessary for lazy mode start
2018-01-29 18:24:09 +01:00
32a2edb985 Change Pattern drawing to use standard functions
Now the drawing is using the standard functions instead of custom drawing.

Thanks Pablo Vazquez for the trick
2018-01-29 18:15:09 +01:00
c5786b5430 Disable brush temp override for lazy mouse 2018-01-29 18:03:48 +01:00
5fc8ecd129 Use Shift key to toggle Lazy Mouse
Now while drawing you can enable or disable the lazy mouse with the shift key.

If the brush has lazy enabled, shift key disable it. If the brush has lazy disabled, shift key enable it.
2018-01-29 17:45:02 +01:00
5662874163 Replace Polygon Keymap to Ctrl+Shift
This keymap has been changed in order to free the shift key for Lazy Mouse
2018-01-29 16:54:26 +01:00
43a25f9e0f Remove Select keymaps in Drawing mode
These keymaps were enabled by error in this mode
2018-01-29 16:48:25 +01:00
db58fb6c9d Fix cursor error drawing polygons
The cursor had a wrong line due lazy mouse cursor mode that must be hidden in poly mode.
2018-01-29 16:39:52 +01:00
b7df69d3f4 Refine filter event for lazy mouse 2018-01-28 16:33:34 +01:00
bc309de654 Redesign how lazy mouse works
Before it was smoothing the stroke, but this was not the request. Now interpolate mouse position only.
2018-01-28 16:28:10 +01:00
e17f5584e1 Disable cursor color for fill brush 2018-01-28 13:56:15 +01:00
46d4ae5846 Changes in cursor size for lazy mouse 2018-01-28 13:43:54 +01:00
1a2dabbdc7 Small adjust to lazy mouse parameters 2018-01-28 13:36:14 +01:00
e99d2e2b82 Use brush color for lazy mouse line 2018-01-28 13:17:24 +01:00
8ae3c555ec Merge branch 'blender2.8' into greasepencil-object 2018-01-28 11:35:02 +01:00
b3e2c36c87 Fix error in rotation
When rotate using falloff the stroke was scaled because the scale factors was changed by falloff.
2018-01-28 11:20:33 +01:00
04da7dadbb Fix error in cursor color for sculpt modes
The cursor color only must be vsisible in draw mode, not in sculpt
2018-01-28 10:49:45 +01:00
b6d456b5de Fix error when delete all colors and redraw
When delete all colors and draw again, the color index was wrong.
2018-01-27 18:35:03 +01:00
459d4d0e43 Display current color on cursor 2018-01-27 18:27:27 +01:00
8b4dd2a234 More work for Lazy Mouse
Now, the last point is always added in order to get precise end points.
2018-01-27 17:19:26 +01:00
d3834fef65 UI: Move Lazy Mouse options to Stroke panel 2018-01-27 13:44:47 +01:00
6e2ac778b1 Merge branch 'blender2.8' into greasepencil-object 2018-01-27 13:34:17 +01:00
e44fa49310 New Lazy Mouse option
This option delays the mouse movements to create more controlled strokes.

The function calculate the optimal location anmix with th current location.
2018-01-27 13:25:02 +01:00
634e269887 Apply onion opacity factor when fade disabled
If the fade option is disabled, the opacity of the onion strokes is defined by opacity factor and not fixed as before.
2018-01-26 18:19:34 +01:00
bc1f58723c Rename new GP monkey object to "Suzanne"
(Same as we do for mesh monkey)
2018-01-26 16:29:14 +01:00
e3c802a404 Rename empty Grease Pencil object from "GP Object" to "Blank"
Also, name the Monkey palette "Suzanne" (same as we do for mesh datablock/object name)
2018-01-26 16:16:57 +01:00
e38b5adc4f Change minimum alpha value for Onion
Sometimes is necessary to make transprarent and before it was not possible using opacity slider.
2018-01-26 16:07:29 +01:00
13afe1db81 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/space_action/action_select.c
2018-01-26 10:54:44 +01:00
501f6b2f75 Merge branch 'blender2.8' into greasepencil-object 2018-01-25 12:25:45 +01:00
a43d39387c Merge branch 'blender2.8' into greasepencil-object 2018-01-24 16:43:39 +01:00
d695bcf28c Merge branch 'blender2.8' into greasepencil-object 2018-01-24 09:44:11 +01:00
fd2517559a Use "Grease Pencil" (not "GPencil") in the Add and Edit menus 2018-01-23 16:46:13 +01:00
Dalai Felinto
1cdcd77831 Fix one of many warnings ... 2018-01-23 12:14:02 -02:00
Dalai Felinto
1d5db1cf43 Icon names fixes after last merge
Bonus: Fix tooltip of GP object
2018-01-23 12:11:11 -02:00
Dalai Felinto
8a9ab51f4d Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object 2018-01-23 12:02:08 -02:00
6ac4f76fd2 Merge branch 'blender2.8' into greasepencil-object 2018-01-23 10:34:47 +01:00
c695406536 Remove experimental brush 2018-01-22 19:22:16 +01:00
b0993bf7ec Set BOTH mode as default for fill brush 2018-01-22 19:22:16 +01:00
Dalai Felinto
adf93be121 Fix old .dat file for object origin icon 2018-01-22 15:47:52 -02:00
Dalai Felinto
38735cbb1c Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object 2018-01-22 15:42:05 -02:00
Dalai Felinto
ec90897383 Leave it out uneeded changes from the .svg file 2018-01-22 15:21:48 -02:00
Dalai Felinto
779591efc6 Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object 2018-01-22 15:14:17 -02:00
0813b3fd42 Merge branch 'blender2.8' into greasepencil-object 2018-01-22 17:54:30 +01:00
fa4c1ad525 Add option to reproject fill on Surface
Before, only origin was supported, now it can be reproject on object surface
2018-01-22 17:21:37 +01:00
55f7d9c127 Merge branch 'blender2.8' into greasepencil-object 2018-01-22 09:19:21 +01:00
d5db310737 Change Special menu to call picker
When the list of colors is too long, the menu is too long, so it's better call the picker menu.
2018-01-22 09:17:39 +01:00
23e365f559 Do no render edit points
The edit points are only visible in viewport but are disabled when make a render.
2018-01-21 16:40:56 +01:00
b8b2fc5660 Add color picker button 2018-01-21 16:25:57 +01:00
1899f24018 Use menu theme colors for color picker panel
Now, the panel colors are consistents with other UI areas.
2018-01-21 16:21:09 +01:00
e631de9a72 Change look of grease pencil color picker
As first step to convert to template, use rounded boxes and standard drawing routines.
2018-01-20 19:10:11 +01:00
4566ff6670 Use different Texture quality for render 2018-01-20 17:35:24 +01:00
689ddd24d8 Merge branch 'blender2.8' into greasepencil-object 2018-01-20 17:10:44 +01:00
bbd71c879e Fix modifier enable/disable on render mode
The old test to verify if the modifier was enabled in render mode used G_RENDER_OGL flag, but for new draw manager, there is a function for that: DRW_state_is_image_render()

Also fixed the problem the cache was not set as dirty before render, so the flags were not updated to draw the correct image.
2018-01-20 16:51:31 +01:00
b0c08068e8 Remove simplify render options
This options are not necessary because for render and viewport use the same options
2018-01-20 13:18:19 +01:00
e4e3f9a244 Fill stroke boundary must be included in strokes draw
If the option of boundary is Strokes, the special boundary strokes must be included as limits.
2018-01-19 16:52:53 +01:00
9533811eac Several fixes after merge
Mainly due parameter list changes and rename of macros.
2018-01-19 16:39:38 +01:00
d314cbe06d Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/gpencil_paint.c
	source/blender/editors/include/ED_gpencil.h
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/editors/space_view3d/view3d_draw_legacy.c
2018-01-19 16:31:03 +01:00
b1de16e8c2 Merge branch 'blender2.8' into greasepencil-object 2018-01-18 16:59:18 +01:00
6d37f37cf2 Cleanup redundant parameters 2018-01-18 13:16:21 +01:00
4492e1d08a Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/makesdna/DNA_scene_types.h
2018-01-18 12:01:18 +01:00
cfa7daf3a9 Fix problem with buffer when cursor outside camera view
Before, the stroke buffer was converted using the 3D cursor location, but if the camera moves and the cursor was on back of camera, the stroke buffer was not visible while painting.

Now, the conversion is done using the origin of the object and this avoid this problem.
2018-01-18 11:58:17 +01:00
c4a2515628 Merge branch 'blender2.8' into greasepencil-object 2018-01-17 16:09:09 +01:00
dff3ea0647 Change default smooth parameters for brushes 2018-01-17 14:14:17 +01:00
cd3c95afab Merge branch 'blender2.8' into greasepencil-object 2018-01-16 17:20:02 +01:00
0ff7c037bf Merge branch 'blender2.8' into greasepencil-object 2018-01-15 19:21:15 +01:00
abc361736b Fix error with normal vector calculation
In some weird situations, the normal vector of the stroke cannot be calculated and this produces errors, specially in modifiers like lighting modifier.

Now, if the stroke selected is not valid, try with the next stroke to get a right value.
2018-01-15 19:18:21 +01:00
b4a491234c Cleanup and fix comments 2018-01-15 10:47:27 +01:00
f65dbc81d7 Merge branch 'blender2.8' into greasepencil-object 2018-01-15 09:43:09 +01:00
a19b54a1c2 Changed panel back color
The panel back color makes the boxes more visible.
2018-01-14 14:41:40 +01:00
67d9b53868 Change text color for active color
The color of name text change if the color has the focus.
2018-01-14 14:36:57 +01:00
231efa8d58 Fix pattern error
After adding the color name in previous commit, the BLEND option was disabled and the pattern was invisible
2018-01-14 12:09:22 +01:00
43a226cc0a Allow a very long list of colors in picker
For very long palettes, resize panel.
2018-01-14 12:02:20 +01:00
ddcce00885 Merge branch 'blender2.8' into greasepencil-object 2018-01-14 11:17:07 +01:00
09f376ad8d New full set of Brush icons
Icons designed by Matias Mendiola
2018-01-14 11:10:21 +01:00
efe41cecfc Avoid colorpicker window outside view area
Some minor changes too.
2018-01-13 19:04:46 +01:00
de0ca25d6e Make color picker a floating panel 2018-01-13 18:25:22 +01:00
800dae17f9 Include color name in picker 2018-01-13 17:02:20 +01:00
d1f89c9362 New operator to clean boundary strokes
This operator is used to remove the boundary strokes that were created during fill.
2018-01-13 16:26:28 +01:00
25579ab43a Copy color name to color picked temp data 2018-01-13 16:03:11 +01:00
74d3f3c980 Merge branch 'blender2.8' into greasepencil-object 2018-01-13 13:05:17 +01:00
c29fccbccc New no fill strokes for fill boundaries
This special strokes can only be generated using a fill brush and pressing Alt key.

This type of strokes are required to draw fast boundary with the fill color for opened areas to use the automatic fill later.

The color of these strokes will be the fill color and not the stroke color.
2018-01-13 12:50:55 +01:00
d6a5007c81 Merge branch 'blender2.8' into greasepencil-object 2018-01-12 20:02:44 +01:00
b0595c30da Reformat draw mode and help lines for fill
Now the show help lines is a separated option and the draw mode can be used internally without intermediate step.
2018-01-12 20:01:56 +01:00
fad223212f Separate help modes for filling
Now the selector for help lines is separated. Before, some modes where not available because there was some UI options conflict.
2018-01-11 17:19:23 +01:00
e8e47db11e Cleanup. Fix comment 2018-01-11 16:49:19 +01:00
6812848350 Fix error when use fill only colors
The index of the color used was wrong.
2018-01-11 16:47:37 +01:00
520cfab17a Merge branch 'blender2.8' into greasepencil-object 2018-01-11 16:28:22 +01:00
b1af3e26e6 Minor adjust to pattern color transparency 2018-01-11 16:26:59 +01:00
cefa6ca482 Add Ctrl keymap while fill for free drawing
If press Ctrl key while using a fill brush, the brush is used as a normal drawing brush and the artist can draw any shape freely.
2018-01-11 16:11:06 +01:00
430091c8f3 Cleanup unused code 2018-01-11 15:51:12 +01:00
85d4986b7f Fix error after merge
The function name has changed
2018-01-11 12:25:12 +01:00
8df44ca45d Merge branch 'blender2.8' into greasepencil-object 2018-01-11 12:06:10 +01:00
f6b7278a89 For fill brush use only fill colors
If the brush is for fill, the list of color must be limited to fill colors only, except the flag to override this, is enabled.
2018-01-11 12:05:24 +01:00
7e49ba94b3 Small adjust to panel size 2018-01-11 11:55:58 +01:00
63b05784bc Change panel back color 2018-01-11 11:54:04 +01:00
c3e28bad8d Add a pattern to see alpha colors
If the color has alpha, need a pattern to see the transparency effect.
2018-01-11 11:48:33 +01:00
ecba7db010 Add diagonal line if fill color
Add a line if the color box include stroke and fill color.
2018-01-11 11:25:09 +01:00
3fea7cb073 Add ui_scale factor to color picker 2018-01-11 10:04:36 +01:00
50da4885c9 Merge branch 'blender2.8' into greasepencil-object 2018-01-10 19:27:26 +01:00
682685ba22 End operator if click out of panel 2018-01-10 19:15:52 +01:00
b929682dab Remove header text functions
This text is not used in this operator
2018-01-10 19:12:17 +01:00
5d2975382c Set color function 2018-01-10 19:09:36 +01:00
f9426cd686 WIP: Redo colorpicker drawing and mouse cursor 2018-01-10 18:06:05 +01:00
88381086b2 Cleanup code 2018-01-10 14:22:49 +01:00
b8475a1d4c Replace reverse findlink
Fix error in previous commit using reverse find
2018-01-10 14:20:28 +01:00
3138d4468e WIP: Display colors bar
Basic display of colors.

Still the selector is not working.
2018-01-10 11:17:36 +01:00
2549076da1 WIP: Basic structure for new Color PIcker
This operator is enabled using F6.
2018-01-09 19:36:27 +01:00
2774a47f38 Merge branch 'blender2.8' into greasepencil-object 2018-01-09 17:32:25 +01:00
3a7c7c621a Merge branch 'blender2.8' into greasepencil-object 2018-01-09 16:41:46 +01:00
d8ff7b2d15 Disable points if disable_fill is enabled 2018-01-09 08:59:41 +01:00
0c11d68b22 if disable fill, the colors with fill must be omitted
This is done to avoid double borders when fill a previous filled area.
2018-01-08 17:28:19 +01:00
b043ea26ca Use Shift key to fill on back
This key override the draw on back option of the panel for the current fill only.
2018-01-08 17:23:41 +01:00
87d2586c9d Fix Fill over filled colors
The fill offscreen render never must use the fill to avoid false filled areas.
2018-01-08 16:43:08 +01:00
ad29094f91 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/datafiles/locale
        release/scripts/addons
	release/scripts/addons_contrib
2018-01-08 10:41:43 +01:00
807c7b7819 New Weight Smooth operator
Operator to smooth the weights of strokes.
2018-01-07 22:24:59 +01:00
40229d2ab9 Include Thickness of new Fill Stroke
This parameter defines the thickness of the stroke created by fill operator.
2018-01-07 20:27:25 +01:00
c9fb4c8932 Fix problem with drawing flags 2018-01-07 20:15:18 +01:00
f59bbc8524 WIP: More work on fill using new drawing method 2018-01-07 18:09:36 +01:00
7bca6c0b94 Apply new shader to old draw method
(used in modal operators like fill, primitives or interpolate)
2018-01-07 17:46:20 +01:00
607b72584d Missing in previous commit 2018-01-07 17:31:24 +01:00
b31f3c556d WIP: Reorganize parameters in old draw mode
The list of parameters was too long and it's better pass a struct.

This is the first step to use the new shaders with the same functions of Draw manager. This is used in interpolations, filling and primitives while the operator is running.
2018-01-07 17:22:08 +01:00
0562da8166 New Weight Invert operator
This operator invert the weights of the strokes.
2018-01-07 11:59:22 +01:00
bb809c27b2 Make weight paint vertices smaller 2018-01-06 20:17:58 +01:00
33b0d64b24 UI: Change Simplify Name 2018-01-06 17:02:17 +01:00
4b644ea59f Enable Draw on Back for fill Brushes 2018-01-06 14:17:42 +01:00
a21a04efe4 Merge branch 'blender2.8' into greasepencil-object 2018-01-06 10:56:42 +01:00
617839721d Scale stroke thickness when scale stroke
Now when scale a stroke, the thickness is scale to.

The operator to scale only thickness is available too using Shift+S
2018-01-06 10:53:17 +01:00
3c705f4b49 Merge branch 'blender2.8' into greasepencil-object 2018-01-05 17:28:30 +01:00
5606eeeb19 Apply falloff to Scale 2018-01-05 17:24:28 +01:00
67a03921fd Apply falloff to rotation 2018-01-05 17:18:22 +01:00
f2c2f6edec Apply falloff to transform 2018-01-05 16:35:12 +01:00
7ce68ff910 WIP: Save falloff factor for transformations
This data must be used by transformation to determine the effect of the change.

Also enabled the falloff option for edit mode.
2018-01-05 10:48:28 +01:00
a8eec08cf3 Add new parameter after merge
The function has a new parameter
2018-01-04 11:44:19 +01:00
232e805cf4 Merge branch 'blender2.8' into greasepencil-object 2018-01-04 11:31:32 +01:00
abdce7f6ac New simplify fixed operator
This simplify used the same algorithm used in modifier.
2018-01-04 11:29:25 +01:00
2b0c317fb2 New option to fill using colors without fill
This option allows to use for filling a color without fill. This can be very useful for create clean strokes base on several strokes.
2018-01-04 11:13:06 +01:00
96e33c428e Add simplify level
Added a new parameter to define the number of times the new fill stroke is simplified using fixed simplify algorithm.

This simplify reduces the number of points but also the precision of the filling shape for large values.
2018-01-04 11:03:03 +01:00
902c9d01d9 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2018-01-04 09:44:50 +01:00
dfb68726eb Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
2018-01-04 09:41:09 +01:00
2dfdff0c2e WIP: Improve interface for fill brush
Now is possible to delete it and can have several of them.
2018-01-04 09:37:20 +01:00
b744f47eed Cleanup: Remove dead code, Fix incorrect labels, and Make things more Pythonic 2018-01-04 13:13:14 +13:00
80caab7f5d Don't show edit lines while play animation
The edit lines and points are hidden when the animation is playing.
2018-01-03 19:31:15 +01:00
bd30471479 UI: Make visible only fill color in fill mode
The special menu only shows colors with fill when using fill brush
2018-01-03 19:25:52 +01:00
889a0707c1 Make boundary lines display optional
Now the red lines display that help to show the boundary of strokes is optional.
2018-01-03 19:21:47 +01:00
7f3c86731a WIP: More work for filling brush 2018-01-03 17:46:42 +01:00
99645fcb0c UI: Remove fill operator
Now it's a brush
2018-01-03 17:46:42 +01:00
ba85cecc63 New icons for drawing brushes
Icons designed by Matias Mendiola
2018-01-03 17:46:42 +01:00
b26307991b WIP: Use a brush for filling
Still need more work, but this commit adds the basic structure.
2018-01-03 17:46:41 +01:00
37dab69d96 Merge branch 'blender2.8' into greasepencil-object 2018-01-03 13:00:32 +13:00
8353739de6 Merge branch 'blender2.8' into greasepencil-object 2018-01-02 22:14:09 +01:00
e91f2852eb WIP: Add a leak tolerance for narrow gaps
This is a initial implementation for filling areas with narrow gaps between strokes.

Maybe the limit of the pixel size must be visible in UI panel.
2018-01-02 22:12:56 +01:00
f094eb7c5f Fix memory leak 2018-01-02 13:35:13 +01:00
1d56dce4b7 Cleaunp blank line 2018-01-02 12:58:08 +01:00
a37437af56 UI: Reorganize draw specials menu options 2018-01-02 12:23:20 +01:00
98174d2fa4 New color selection in draw specials menu
A quick color selection in draw special menu. In the future it would be good to add a small icon with the color, but now is not working in the menu
2018-01-02 12:17:30 +01:00
160e02e570 UI: Fix pie menu 2018-01-02 11:57:44 +01:00
905e079dea Add P keymap for fill operator 2018-01-02 10:22:27 +01:00
b0cb6135c2 Remove use of Global Main 2018-01-02 10:17:45 +01:00
6559123149 Cleanup code 2018-01-01 17:45:04 +01:00
dca261bb25 Cleanup: Remove redundant code 2018-01-01 17:22:53 +01:00
18f31a1bc9 Free image memory 2018-01-01 17:13:22 +01:00
389c25e438 Fix problem with axis reproject
Need to convert to object space before reproject
2018-01-01 11:30:01 +01:00
b3848230b3 New reprojection mode: Axis
This new mode reproject the strokes using the same logic of drawing in a locked axis.
2017-12-31 17:16:05 +01:00
240b47b69d Fix error with colorname
This solve the Undo problems too.
2017-12-31 11:03:21 +01:00
60357ef217 Fix error with colorname 2017-12-31 11:03:00 +01:00
26fcf08a4a WIP: First step to support undo in filling 2017-12-30 19:44:11 +01:00
d6d0fbf824 Remove Undo flag 2017-12-30 19:28:23 +01:00
2e57a146ed Cleanup code 2017-12-30 19:13:10 +01:00
0984218adb WIP: Add fixed simplify
The RDP simplify is not working fine, so the simple mode is used now.
2017-12-30 19:11:38 +01:00
42573e00a5 Add stroke to tail
The initial idea was to add to head (on back), but after testing it's better add at the end on top of previous strokes.
2017-12-30 17:25:14 +01:00
be6a5008d7 Merge branch 'blender2.8' into greasepencil-object 2017-12-30 16:58:55 +01:00
c59f6df5eb Fix reproject error for filling 2017-12-30 16:58:03 +01:00
a53a6a80fd Fix problem with primitive reproject
The apply parent must be applied after reproject.
2017-12-30 13:18:07 +01:00
d5ca7d20ed Add primitives to draw special menu 2017-12-30 12:50:58 +01:00
c6ff9d7164 Avoid fill with color without fill enabled 2017-12-30 12:04:05 +01:00
9b60e79b65 Add fill operator to special menu 2017-12-30 12:03:25 +01:00
6726150803 WIP: Fix problems with stroke location
Still problems with reproject
2017-12-29 18:03:47 +01:00
f0ce194137 Use general function to reproject stroke 2017-12-29 17:06:14 +01:00
1fac2cda96 WIP: Add status message and new keys
Still on progress
2017-12-29 10:24:29 +01:00
9c59025289 Remove warning message 2017-12-28 22:12:44 +01:00
5d5a146f6a WIP: Apply smooth to fill 2017-12-28 22:12:28 +01:00
4ca90c7a99 WIP: Create stroke for fill
First step to create strokes
2017-12-28 19:45:48 +01:00
24c6476daf Extract function to be shared in other modules 2017-12-28 16:25:40 +01:00
76518e2a9b WIP: First steps to implement Moore-Neighborhood algorithm
This algorithm is to detect the outline of a image. Now, the function only adds a blue line with the shape to the debug image.

Next step is use this array of points to create a stroke.
2017-12-28 13:34:43 +01:00
6cc0e65f70 Merge branch 'blender2.8' into greasepencil-object 2017-12-28 11:12:31 +01:00
87353fd9f3 Cleanup: Remove debug lines and change some comments 2017-12-28 11:10:55 +01:00
919cdad3e4 New duplicate frame operator and special menu
This operator duplicates the active frame in active (or all) layers. This is very handy for creating step by step animation.

Also, added new special menu in sculpt with W key.
2017-12-28 10:57:51 +01:00
b5696a4701 Merge branch 'blender2.8' into greasepencil-object 2017-12-27 17:04:58 +01:00
d49c6bbd6d WIP: More work in boundary fill 2017-12-27 17:04:00 +01:00
a56c7a5cac WIP: Improve offscreen render
Now, all the render is done in a image to debug results.
2017-12-26 17:58:49 +01:00
6e81d08783 WIP: Add debug lines to show boundary 2017-12-26 12:34:19 +01:00
02680cab7e WIP: Implement Boundary fill algorithm
This algorithm is used to fill the shape that will be used to create the new stroke after analyze the external outline.

The fill is no working yet becaus ethe offscreen drawing is still on progress.
2017-12-25 17:19:02 +01:00
2c6605cd79 Merge branch 'blender2.8' into greasepencil-object 2017-12-23 12:38:39 +01:00
08edee5736 Fix fill problem in opacity modifier
The fill color must be set separated of stroke color. This error was produced by previous commit.
2017-12-22 22:10:36 +01:00
feb0b0ddec Fix opacity modifier using vertex group
Changes in how the vertex group is used in modifier.
2017-12-22 20:02:08 +01:00
3e9db0a92b Fix merge error in brackets 2017-12-22 16:58:41 +01:00
046d8ef6f1 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2017-12-22 16:46:27 +01:00
4523a35c1f Cleanup: Put includes in alphabetical order 2017-12-22 17:07:47 +13:00
3c5d358d89 Joining GP objects also merges + fixes animation data for the merged datablocks 2017-12-22 17:04:22 +13:00
8931c901bf Cleanup: Make it clearer which datablock/object we're dealing with
* gpd_act -> gpd_dst   ("_act" could also mean "active one we're looking at now)
* gpd     -> gpd_src   (we sometimes refer to "gpd" as the active one we're working on)
2017-12-22 15:03:44 +13:00
3d7732eca0 Fix parameter list after merge 2017-12-21 18:21:46 +01:00
aef22a2bb5 Merge branch 'blender2.8' into greasepencil-object 2017-12-21 18:10:31 +01:00
43adb12a1c Cleanup: comments and reorganize 2017-12-21 18:08:55 +01:00
e6e7ba4a08 Apply all modifiers first
The previous commit was the Context missing as parameter and this was the reason of the errors
2017-12-21 17:59:16 +01:00
5f39d41c1f WIP: Initial code to apply modifiers 2017-12-21 16:55:50 +01:00
0362987c0a Copy Vertexgroup when join
The vertex groups were not included in the join.
2017-12-21 16:29:38 +01:00
b7e96c5001 Fix duplicate layer name when join 2017-12-21 13:33:05 +01:00
d92bc7d09a WIP: Basic Join object operator for grease pencil
Still pending:

- Modifiers
- Animation data
2017-12-21 12:52:17 +01:00
be58b71cfc Merge branch 'blender2.8' into greasepencil-object 2017-12-21 10:44:46 +01:00
Dalai Felinto
143f4e52c5 Fix for T53599: OpenGL render with transparent background
I had to make Eevee draw its scene in the scene pass (before it was doing it
in the background pass). This is not ideal since reference images require
a separation between scene and background.

But it's the best way to solve it now. Clay is working fine.
2017-12-20 19:11:38 +01:00
44408d6539 Add warning for Fill operator not implemented yet 2017-12-20 17:47:44 +01:00
796aae61d9 WIP: Define basic struct/functions for modal fill
Not implement yet.

Prepare the different elements required by modal operator.
2017-12-20 17:38:50 +01:00
5cb127a7bd Merge branch 'blender2.8' into greasepencil-object 2017-12-20 16:55:16 +01:00
1dba3b5a23 Remove temp hack for MSVSC2017 compiler 2017-12-20 10:24:32 +01:00
54feb32d9c Fix segment fault when rotate in empty frame
The problem was with the new created frame that was not assigned to loop variable.
2017-12-19 19:41:50 +01:00
9f0978ace6 Provisional hack for fixing MSVC2017 error
This fix will be replaced by final Sergey solution.
2017-12-19 19:15:58 +01:00
6cc85be8c9 Fix desgraph code missing in merge 2017-12-19 17:54:48 +01:00
bb81a12459 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/datafiles/blender_icons.svg
	release/datafiles/locale
	source/blender/depsgraph/intern/depsgraph_tag.cc
	source/tools
2017-12-19 17:43:29 +01:00
259d7a23e6 Reorganize versioning code
After last 2.80.3 version bump, the code can be reorganized and it can be removed any custom hack for Hero files.
2017-12-19 17:06:38 +01:00
cd0f974ce3 Fix segment fault when play with onion
For some reason, when press play there is a delay in the animation flag check and this produces errors. To be sure, we set cache as dirty because the frame is changing.
2017-12-19 16:47:41 +01:00
dc834e25ba Fix compiler warning
The previous commit was wrong
2017-12-18 19:20:16 +01:00
2d533461f1 Fix compiler warning 2017-12-18 19:17:07 +01:00
86c3fbf0db Add alpha factor to mask while filling
If the color fill opacity is equal to 1.0, it's very hard to see the strokes that you want to fill. With this change, always the stroke is visible while painting.
2017-12-18 17:50:21 +01:00
0a3e36df55 Fix UI warning 2017-12-18 17:43:52 +01:00
a6730c6995 Fix problem with merge down
The problem was if the layer below had animation in frames not present in top layer. As the active frame of top layer was the previous keyframe, after merging, the draw of bottom layer replaced the draw of top layer and the result was that some drawings were missing.

The solution was to duplicate the active frame in top layer before merge the bottom layer.
2017-12-18 17:29:09 +01:00
6efbe39712 Fix: Don't assume that rect starts from 0,0 2017-12-19 01:14:49 +13:00
140649b872 Fix: Missed these in last commit 2017-12-19 01:13:33 +13:00
cbe4c97de3 Cleanup - Save off multiedit state instead of querying it all the time 2017-12-19 00:53:47 +13:00
9c30702372 Cleanup - Split out the GP stroke sculpting loop-over-strokes logic into a separate function 2017-12-19 00:35:35 +13:00
4015bed382 Cleanup + Optimisations for GP Sculpt Multiframe
* Only initialise the falloff curve's internal data once per run,
  instead of once per layer. We can probably even make this only happen
  once for each run of the operator, as it shouldn't be possible to change
  the curve in the meantime (requiring the data to be recalculated)

* Save off the multiframe falloff option into a variable instead of
  doing the full check each time.

* Only calculate "diff_mat" once for each layer, instead of once for
  each GP frame for multiedit. (Note: We weren't taking the frame numbers
  into account anyway, so it doesn't matter to pull this out. However,
  technically, if the layer was parented, we'd actually need to have been
  recalculating the parents transforms for each of the multiedit frames
  to get the real intended effects)
2017-12-18 21:47:28 +13:00
f1996fa124 Minor Optimisation for GP Grab brush
Write directly to the point instead of writing to a temporary value first
2017-12-18 21:29:30 +13:00
56e73e31ce WIP: Replace GL types by generic types 2017-12-17 20:36:08 +01:00
5fdb22ffd7 WIP: Initial test for offscreen render
Initial test to make a proof of concept of the render in textures.
2017-12-17 20:16:29 +01:00
92c3b81490 Fix segment fault when delete object
The active object got null and this produced a segment fault.
2017-12-17 19:57:33 +01:00
09bc242bfd Use round caps while drawing 2017-12-17 17:16:41 +01:00
6147d8c9d3 Reduce size of round cap 2017-12-17 17:16:25 +01:00
7e52e6839c Merge branch 'blender2.8' into greasepencil-object 2017-12-17 16:28:02 +01:00
95dcd183fe New rounded end caps
Now the stroke ends are rounded to get more artistic look.
2017-12-17 16:18:16 +01:00
51a22cd6db Merge branch 'blender2.8' into greasepencil-object 2017-12-16 10:54:31 +01:00
2dff68f423 Fix multiframe error when lock layer
There was a segment fault if the some layer was locked and enable multiframe edit / sculpt or weight paint.

The shading group must be created because is used in multiedit lines.
2017-12-16 10:46:09 +01:00
5f527f0885 WIP: Experimental Offscreen buffer for fill
Simple implementation of stroke drawing to texture
2017-12-15 18:34:27 +01:00
8dfc08d14e Fix merge errors
There was a problem with struct byte alignment.
2017-12-15 13:17:20 +01:00
384d1f80ad Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
	source/blender/draw/intern/draw_cache_impl.h
	source/blender/makesdna/DNA_scene_types.h
2017-12-15 12:44:37 +01:00
ca6588d5da Delete with Border select in paint mode
This commit is similar to Lasso, but for border select.
2017-12-15 12:34:31 +01:00
c4dbe9448c New Eraser with Lasso select
When you are in paint mode, if press Ctrl+Alt and select with lasso tool, the points are removed.

This is a request of the Hero team after been working in cleanup process. The Lasso delete allows to remove very fast areas of the drawing.
2017-12-15 12:31:13 +01:00
4de69e3e1a Cleanup: Function to avoid code duplication 2017-12-15 11:44:38 +01:00
fa2cd280ac Add Erase stroke with Ctrl key
If press Ctrl over a stroke while using the eraser, the stroke is fully deleted, not point by point
2017-12-15 11:40:22 +01:00
7f419a5615 Enable Hard Eraser with SHIFT
While you are drawing, if press Shift key, the eraser delete points with one contact only and does not depends of pressure.

This is very useful for fast remove.
2017-12-14 18:16:09 +01:00
fe4f00d31b WIP: Basic modal structure for fill operator
This is the first step to implement a fill operator.

This commit only adds the modal operator but the filling is not implemented yet.
2017-12-14 17:05:20 +01:00
858cc7ac9d Merge branch 'blender2.8' into greasepencil-object 2017-12-13 16:48:31 +01:00
e4a3c50d12 Cleanup: Use mathlib funcs instead of inlined math 2017-12-13 22:28:21 +13:00
aed2a49571 Cleanup: Whitespace 2017-12-13 22:18:37 +13:00
f775fff246 Cleanup: Split GP Sculpt and Weight Paint panels into separate classes
This resolves the need for the draw_header() + empty bl_label
hacks used to try and get this changing dynamically.
2017-12-13 22:09:43 +13:00
54aefbf789 Cleanup: Various small issues noticed earlier
* Rename BKE_get_falloff_factor() to BKE_gpencil_multiframe_falloff_calc()
  and make it return value instead of passing in a pointer to fill.

* Rename "gso->falloff" to "gso->mf_falloff" to be less ambiguous

* Fix indentation issues in gpencil_brush.c
2017-12-13 22:09:41 +13:00
411e9b6731 Fix: Remove leftover debug print 2017-12-13 22:09:40 +13:00
a0c462ed42 Fix problem when hide collection
When hide the collection the strokes were not hidden.
2017-12-12 17:24:03 +01:00
2bba82ad7f Merge branch 'blender2.8' into greasepencil-object 2017-12-12 10:32:31 +01:00
d1cf5b54b5 Apply scale weight to Offset modifier
This parameter was using the weight in a wrong way. As the offset is a change in the values, the default value change is 0, not 1, so a scale offset of 1 means add 1 to default scale.
2017-12-12 09:29:22 +01:00
dd5e338661 Merge branch 'blender2.8' into greasepencil-object 2017-12-11 10:40:03 +01:00
7babe1f40c Improve Simplify modifier
- Now it's possible to define number of iterations for fixed mode.
- New mode selector instead of checkboxes
- Changes in UI
2017-12-10 17:10:49 +01:00
2ed89b09d2 Added ID_GD to the OB_DATA_SUPPORT_ID/OB_DATA_SUPPORT_ID_CASE macros
From the looks of things, all object-linked ID types should be
included in here.

While checking on this, I also found a missing case for GP object
in Main.objects.new()
2017-12-11 00:42:40 +13:00
5b56788cee Merge branch 'blender2.8' into greasepencil-object 2017-12-10 10:21:16 +01:00
ad7d868870 Change Hook modifier flags
There were some flags that must be removed.
2017-12-10 10:20:28 +01:00
dc686e1d82 Simplify use of VFX shading groups
The drawing functions was using an additional shading group pointer that it was not used, so it can be removed.
2017-12-10 10:16:51 +01:00
87fe1e5af2 Cleanup: Remove intermediate variable for Wsize 2017-12-10 09:24:14 +01:00
e166558ddd Rename property for full color and fill 2017-12-10 09:20:37 +01:00
df07efeeef Fix typo error using wrong variable 2017-12-09 23:27:45 +01:00
6957967e99 Apply weight only for loc/rot
The weight cannot be used for scale.
2017-12-09 22:52:57 +01:00
eb47e7e219 Offset modifier cannot use weight
The weight is a parameter that produces weird results.

Remove this option while find a better solution.
2017-12-09 20:58:59 +01:00
740506c7af Add new option to simplify alternate points
THis option remove alternated vertex from stroke except the extremes
2017-12-09 20:52:20 +01:00
c4e595aaf3 New Normalize thickness parameter
Now the thickness modifier has a parameter to assign the same thickness to all strokes.
2017-12-09 20:09:43 +01:00
fc38575461 New Vertex Group menu with Ctrl+G in Edit mode 2017-12-09 19:54:12 +01:00
40e6d673d8 UI: Expand default palette color list
The gray color was hidden.
2017-12-09 19:34:49 +01:00
62c694817e Change name in Add Object menu 2017-12-09 17:44:24 +01:00
25dbc0a9d4 Change Q key to show editlines and multiedit lines
New keymap:

Q: Toggle Edit lines
Shift+Q: Toggle Multiframe lines
2017-12-09 17:40:30 +01:00
4aee6cf376 Show Edit Lines must be a main switch
This option must be a general switch and not be affected by multiframe edition
2017-12-09 17:23:08 +01:00
fbdc28bab7 Disable by default simple subdivision 2017-12-09 17:15:20 +01:00
b1e9fd5e2b UI: Add alpha to colors in color list
Sometimes is better to access to alpha from here and not from stroke or fill panel.
2017-12-09 17:09:57 +01:00
7335e09129 Add default grey color with fill to default Palette 2017-12-09 17:02:35 +01:00
73d5253681 UI: Remove slider mode for thickness change 2017-12-09 16:58:01 +01:00
23a0b821d3 Remove strength curve in Pencil brush
This default was not working fine in all devices.
2017-12-09 16:52:48 +01:00
568f55e3cc New Draw Specials menu with X key
Now this menu only has the option to delete frame, but can hold more options in the future.
2017-12-09 16:50:33 +01:00
9c350fa98f Change default onion mode to keyframes 2017-12-09 16:42:10 +01:00
7141870483 Cleanup: Remove unused code 2017-12-09 16:35:21 +01:00
1955607d69 Fix pixel scale in VFX pixel 2017-12-09 16:34:34 +01:00
4cf759493d Avoid div by zero 2017-12-09 16:30:38 +01:00
b6b9e14fb6 Remove unused field 2017-12-09 16:25:43 +01:00
8707d29917 Fix VFX Swirl modifier
There was a problem with the conversion between screen space and camera space.
2017-12-09 16:20:39 +01:00
ac102ff163 Change Energy scale * 100 2017-12-08 19:48:21 +01:00
dc70a28c89 Fix problems with vfx light modifier
There was some problems with coordinate system between screen space and
camera space.
2017-12-08 19:19:22 +01:00
4286b5d424 Fix problems with VFX light modifer
There was a problem with the conversion of coordinate system between screen space a camera space.
2017-12-08 19:12:29 +01:00
3052223870 Fix: Add depsgraph relations from Palettes to GP data
This fixes problems where changing Palette setings (such as fill opacity)
should refresh the viewport (e.g. if there wasn't a fill before, changing
the slider should make it appear, instead of requiring a framechange to
make that happen).
2017-12-08 18:25:14 +13:00
401b9ee907 Fix compiler warning 2017-12-08 17:13:50 +13:00
28d9ad0ce1 Merge branch 'blender2.8' into greasepencil-object 2017-12-08 15:50:23 +13:00
a8fac7eca9 WIP: Testing new system to define light position 2017-12-07 22:50:17 +01:00
e77117f87f Cleanup: Remove unused variables 2017-12-07 10:07:50 +01:00
9df920be2e WIP - Some debug code to try to figure out why artists are getting random crashes here
Start blender with the debug (-d) flag to see debug prints for
cases of unhandled updates.
2017-12-07 19:40:09 +13:00
b2c84c5363 Fix merge error 2017-12-06 22:22:59 +01:00
35f774d269 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2017-12-06 22:15:18 +01:00
e051af9cfd Add VFX Light a object to define light position 2017-12-06 22:07:14 +01:00
2772e1564e Remove color of light
After run some test, this value is not valid in 2D. To tink there is a modifier already.
2017-12-06 21:32:05 +01:00
fabf8717b3 Use function to avoid duplicated code 2017-12-06 17:50:10 +01:00
a3930268e1 New VFX light modifier
This modifier simulates a point light over the stroke. There is not shadows support and use its own internal lamp point. Only ambient and diffuse.

The use of this VFX is to get special effects. In the future, a real lighting system can be implemented using normal Blender lamps, but this is different of this modifier.
2017-12-06 17:41:56 +01:00
b2f32605d2 Merge branch 'blender2.8' into greasepencil-object 2017-12-05 19:05:04 +01:00
4420dc9d71 Merge branch 'blender2.8' into greasepencil-object 2017-12-05 17:05:06 +01:00
0daa869514 Change Drawing brushes default radio 2017-12-05 17:03:31 +01:00
6b4a7cd104 Make Noise position factor less sensitive 2017-12-05 15:53:58 +01:00
ac8e2772dc Change default Drawing brushes 2017-12-05 12:39:11 +01:00
2bb3c94b54 Increase again the maximum value for sculpt brushes
For some operations the old value was too small.
2017-12-05 11:14:46 +01:00
1739e1d6eb Change default edit line color
The alpha was too low
2017-12-05 11:09:35 +01:00
0dfa3436d8 UI: Add show edit line button to bottom bar 2017-12-05 11:05:56 +01:00
859eefde45 Change default Sculpt brush to PUSH
This default only works for new files, but it doesn't change old files.
2017-12-05 10:55:55 +01:00
a0c2f41d12 Set Ink brush as default 2017-12-05 10:45:22 +01:00
055bbc43e6 Increase maximum sculpt brush size 2017-12-05 10:42:53 +01:00
10228e6a3b UI: Move brush settings to bottom 2017-12-05 10:33:13 +01:00
2b50ea8eaf Increase maximum thickness 2017-12-05 10:32:46 +01:00
0891946c24 Change default pixfactor to 1000 2017-12-05 10:28:04 +01:00
bb217e42ca UI: Set panels closed by default 2017-12-05 10:21:21 +01:00
f635700d3d Merge branch 'blender2.8' into greasepencil-object 2017-12-04 16:56:09 +01:00
40cc91e630 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/readfile.c
2017-12-04 15:57:10 +01:00
1ddd023be1 Merge branch 'blender2.8' into greasepencil-object 2017-12-04 08:29:08 +01:00
4775b84ad9 Merge branch 'blender2.8' into greasepencil-object 2017-12-03 08:47:31 +01:00
a5ea509f38 Revert "Temp fix to compile"
This reverts commit 06950efb94.
2017-12-03 08:46:23 +01:00
06950efb94 Temp fix to compile
I change this lines waiting for Sergey final fix in Blender2.8 branch
2017-12-02 12:25:08 +01:00
1dce29a10f Cleanup previous fix code 2017-12-02 11:41:06 +01:00
3fb13ea5ff WIP: Fix some merge errors
Still some more errors pending
2017-12-02 11:39:28 +01:00
6f213c32e8 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2017-12-02 11:28:07 +01:00
05b82b21cc Increase default sise of batch slots 2017-12-02 11:17:10 +01:00
f6c77e51dc Cleanup: Remove unused parameter 2017-12-02 11:04:08 +01:00
dedeee51ac Replace hardcode value with define 2017-12-02 10:46:30 +01:00
ddec812c5b Fix crashes after selecting GP keyframes with onion skinning enabled
The code here was still using the old approach of just tagging all
GP datablocks for recalculation, instead of the newer depsgraph
tagging approach.
2017-12-02 11:37:11 +13:00
3f8be67811 Minor tweak to the "bell" curve for Multiframe Falloff for smoother curve
While this may not be "technically" correct for a Gaussian curve,
visually (judging from the curve) this seems to be a lot smoother.
2017-12-02 11:11:50 +13:00
809fc4807a Make falloff function external to reuse
Move the calculation of falloff factor to a separated function to be reused in transformations.
2017-12-01 17:27:51 +01:00
c78e8b0563 Merge branch 'blender2.8' into greasepencil-object 2017-12-01 15:58:09 +01:00
fbd80673c8 Fix falloff error when layer has no active frame 2017-12-01 15:56:33 +01:00
a960060ef2 UI: Minor changes to enable/disable multiframe options 2017-12-01 10:53:48 +01:00
4e3fb10dc4 Merge branch 'blender2.8' into greasepencil-object 2017-12-01 10:35:28 +01:00
36188466da UI: Show falloff only in sculpt mode
Changed the icon and other minor changes.
2017-12-01 10:32:49 +01:00
d6ec57055f Redo Hero initialization curve hack code
There was a problem aving files. The curve was reset for each reload.
2017-12-01 10:09:43 +01:00
1b5561cf03 GP Modifiers: Split into multiple columns
The modifiers list was starting to get a bit long to just have all of
them in the same column.

Also fixed various typos and tweaked some tool tips.
2017-12-01 16:19:11 +13:00
4324242557 UI Tweak: Move the multiedit toggle to the panel header (instead of being a separate button inside) 2017-12-01 15:30:11 +13:00
4af8f8574a Added comment noting why the GreasePencilStrokeSculptPanel has an empty label 2017-12-01 15:27:16 +13:00
e13875ec17 Cleanup: Fix comment 2017-11-30 23:09:52 +01:00
e7dea06ba5 Temp Hack: Fix initialization code for Hero open movie files
The initialization code must be moved to next version to manage Hero files.

This section of code must be merged to the previous version as described in the comments.
2017-11-30 22:06:53 +01:00
042298f6a3 Adjust UI to use new properties for falloff 2017-11-30 20:11:10 +01:00
6979cc61e9 WIP: Calculate falloff factor 2017-11-30 20:03:59 +01:00
cee80b3317 New function to get frame range selected 2017-11-30 19:11:45 +01:00
4cbd5933f7 WIP: New Gauss bell curve preset 2017-11-30 18:55:05 +01:00
c787419600 WIP: Implement new cuve for multiframe falloff
Still need to define curve with bell shape and apply the falloff to multiedit.
2017-11-30 17:34:48 +01:00
ee7e4d25d5 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/object/object_relations.c
2017-11-30 15:34:21 +01:00
f86f826f19 GP Build Modifier - Layer Masking support 2017-11-30 17:17:16 +13:00
52aa4a8af5 Fix: Menu with various extra operators for active palette color was missing 2017-11-30 16:34:58 +13:00
00c18441bf Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc
	source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
2017-11-29 18:58:08 +01:00
ca348646a3 Fix merge errors 2017-11-29 16:59:23 +01:00
c89d24ccbd Merge branch 'blender2.8' into greasepencil-object 2017-11-29 16:49:39 +01:00
0ecbe2171a New Grease Pencil Offset modifier 2017-11-29 16:47:25 +01:00
645b146395 Avoid some operators in multiframe edit mode
As initial idea is better to keep limited to single edit mode, but maybe in the future we can enable it.

The reason to limit them is because in some situations the artist can get confused with the edition he did if multiframe is activated and could consider the operation as a bug when really was working as expected.
2017-11-29 12:22:28 +01:00
e425cbb99f Fix multiframe delete
The stroke delete was not working with multiframe because it was checking only active frame and not the whole selected frames range.
2017-11-29 12:06:40 +01:00
849337bd78 Move Paper settings to View
Now the paper can be enabled by view and not by scene as before because this is a view settings.

Thank Pablo Vazquez for his UI feedback.
2017-11-29 11:45:43 +01:00
7c9f41f98f Merge branch 'blender2.8' into greasepencil-object 2017-11-29 10:38:03 +01:00
2392dc8246 New VFX Flip modifier
This modifier flip horiz. or vertically the current gp object image. The flip works in screen space
2017-11-29 09:36:43 +01:00
47898a5777 Fix rename fields after merge 2017-11-28 16:27:36 +01:00
61f9310bda Merge branch 'blender2.8' into greasepencil-object 2017-11-28 16:16:46 +01:00
7b8e127902 Reuse show_keys_from_selected_only for jump frames
It's better to reuse this option that is already defined by scene.
2017-11-28 14:11:11 +01:00
94efac4297 Add edit point custom shader
The previous shader was not working in some Intel cards, and these commit is to replace with a new shader that works in all card types.
2017-11-28 13:45:05 +01:00
aef88cd76a Fix chnaged lines by error in previous commit 2017-11-28 11:17:29 +01:00
ee157def31 Merge branch 'blender2.8' into greasepencil-object 2017-11-27 17:26:10 +01:00
dde37368ed UI: Change to only selected icon 2017-11-27 17:22:47 +01:00
c29174eedf Dopesheet jump frame in active layer
This new function allows to enable the frame jump only in active layer and not in all visible layer.

This was a request of Hero open movie artist team.
2017-11-27 17:07:45 +01:00
bb72601d89 Merge branch 'blender2.8' into greasepencil-object 2017-11-27 10:12:28 +01:00
3a686cdf24 Merge branch 'blender2.8' into greasepencil-object 2017-11-26 09:22:12 +01:00
fe04bf0800 Use weight in Hook modifier 2017-11-25 16:10:22 +01:00
70e87a7ac1 Change Hook modifier default parameters 2017-11-25 13:53:24 +01:00
9ea7fb3982 WIP: Fix write hook data 2017-11-25 13:47:30 +01:00
9215e2a097 WIP: Hook modifier initial basic stage 2017-11-25 13:36:57 +01:00
fe82a8257a Merge branch 'blender2.8' into greasepencil-object 2017-11-25 11:18:26 +01:00
e37b251d7a Merge branch 'blender2.8' into greasepencil-object 2017-11-24 16:45:14 +01:00
b1035ae3ac Cleanup code 2017-11-24 16:43:57 +01:00
d41095f308 Use theme default grid color 2017-11-24 11:04:15 +01:00
19624c8dd7 UI: Redo paper panel 2017-11-24 10:41:58 +01:00
6f8ee14340 Change color for grid lines 2017-11-24 10:38:53 +01:00
5517049481 Add grid option to grease pencil paper
Default values added too.
2017-11-23 22:37:13 +01:00
e2adbc9bca WIP: New paper function
This function allows to cover full viewport with a predefined color. This allows to hide the geometry in complex scenes and make the drawing area cleaner.

This function was requested by artist after working in Hero open movie using complex scenes with a lot of geometry "behind" of the grease pencil drawings.
2017-11-23 19:54:56 +01:00
8102646a9f WIP: New smooth thickness parameter
These parameters are part of the smooth test and can be removed in the future.
2017-11-23 18:23:27 +01:00
acad042fdf Remove Brush test parameters
After doing some test, remove several parameters added to verify smooth stroke.
2017-11-23 18:23:27 +01:00
Dalai Felinto
3ac2577e86 Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object 2017-11-23 15:05:23 -02:00
5e37797caf Cleanup debug prints 2017-11-24 03:29:55 +13:00
260b747d33 GP Build Modifier: Fix "Concurrent" Mode
The last segment of shorter strokes was always suddenly appearing.
it turns out the at the formulations for those factors was off.
2017-11-24 03:29:55 +13:00
5edb6d437a GP Build Modifier: Rename direction -> transition, and rearrange UI panel 2017-11-24 03:29:54 +13:00
3b4afd5ca1 GP Build Mod Fixes
* Sequential mode now works - Accidentally removed the important tallying
  step when cleaning up the code earlier

* Typo - Was looking for "direction" values in the wrong field
2017-11-24 03:29:53 +13:00
57344862d9 Fix crashes
* Forgot to remove strokes from frame before deleting their data
* Typo - Used old "gps" pointer not "cell->gps"
2017-11-24 03:29:52 +13:00
f43aecba88 GP Build Modifier - RNA + UI 2017-11-24 03:29:52 +13:00
bb090d1acd Show an error message if a GP modifier cannot be applied instead of failing silently 2017-11-24 03:29:51 +13:00
47c9dda076 GP Build Modifier: Initial WIP implementation of this modifier
It's likely that there are still many bugs here, so caution is advised.
2017-11-24 03:29:50 +13:00
05f5dc14a0 Partially revert rBc038bbbce2b 2017-11-24 03:28:11 +13:00
Dalai Felinto
7c7ab48dec Remaining warning in grease pencil 2017-11-23 10:50:45 -02:00
Dalai Felinto
9f47ddeb8a Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object 2017-11-23 10:49:58 -02:00
Dalai Felinto
a6d584fc46 Merge commit '3abe8b3292cf7a50a9200b95401993384df24d9a' into greasepencil-object
Note: Since grease pencil had its own subversion, and this merge brings 2.80
subversion 2 as well, the files should be saved BEFORE this commit, to be sure
that all the doversion happened.
2017-11-23 10:44:51 -02:00
Dalai Felinto
fd9407ada5 Merge commit '3abe8b3292cf7a50a9200b95401993384df24d9a^' into greasepencil-object 2017-11-23 10:20:44 -02:00
Dalai Felinto
c038bbbce2 Silence warnings
Please keep the code warnings-free as much as possible.
2017-11-23 10:17:22 -02:00
2a47ede614 UI: Add buttons at bottom bar
Add Only Render and Lock Camera View options to bottom toolbar because use the options in panels break the drawing workflow and use a lot of space in the drawing area.
2017-11-22 19:11:51 +01:00
c9c8bfdba1 Fix error after merge 2017-11-22 19:00:24 +01:00
b24034544c Merge branch 'blender2.8' into greasepencil-object 2017-11-22 18:50:53 +01:00
7fee462be0 Merge branch 'blender2.8' into greasepencil-object 2017-11-22 16:31:49 +01:00
59f1f76151 Merge branch 'blender2.8' into greasepencil-object 2017-11-21 10:22:19 +01:00
a5995d8161 Move BKE_gpencil_batch_cache_alldirty()'s debug value to 66
This Makes it possible to set this without seeing all the stats in the way
2017-11-21 12:17:08 +13:00
6c7bd14ac3 Cleanup - This code shouldn't be needed anymore 2017-11-21 12:17:07 +13:00
a666a5d016 UI: Rename MultiEdit to MultiFrame 2017-11-20 19:12:52 +01:00
df9b547323 Merge branch 'blender2.8' into greasepencil-object 2017-11-20 10:42:27 +01:00
48bb9e1697 Merge branch 'blender2.8' into greasepencil-object 2017-11-19 15:53:39 +01:00
23d820c240 Cleanup include files 2017-11-17 16:38:33 +01:00
9a6be73429 Fix merge error
VS2017 crash in the midle of the merge process and created wrong git tag lines
2017-11-17 16:29:01 +01:00
b3a0b423a6 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/draw/intern/draw_cache_impl.h
2017-11-17 16:27:55 +01:00
ff6e2e82ea Fix: Crash when moving GP frame so that it replaces the one before it
This crash only occurred in a particular file, when onion skinning was
enabled. For some reason, the fact that this function was clearing the
layer's actframe (when the frame being deleted wasn't currently active)
was causing problems. I'm guessing that the GP draw engine code currently
assumes that gpl->actframe will always be set/valid?
2017-11-18 02:46:29 +13:00
a9482038ed Merge branch 'blender2.8' into greasepencil-object 2017-11-16 18:48:29 +01:00
d9d5166953 Merge branch 'blender2.8' into greasepencil-object 2017-11-16 14:35:15 +01:00
d772b1d934 Fix crashes when loading old GP files from 2.79
Moved all the datablock-twiddling version patching magic to the
"after_liblink" version patching function. Apparently the problem
was that many of the old pointers had not been fixed up at that point,
causing problems if relying on accessing their contents.
2017-11-17 01:16:40 +13:00
d482857965 Merge branch 'blender2.8' into greasepencil-object 2017-11-15 19:31:48 +01:00
815c00270c WIP: Create SceneLayer if missing 2017-11-15 17:24:53 +01:00
b4f08d135b Change texture format
Due draw manager changes, the texture must be DRW_TEX_DEPTH_24_STENCIL_8 instead of DRW_TEX_DEPTH_24
2017-11-15 09:47:45 +01:00
b7efe91893 Merge branch 'blender2.8' into greasepencil-object 2017-11-15 14:33:01 +13:00
e6a0b442c7 Enable antialiasing while drawing
The antialiasing was not activated for previous strokes, only for current.
2017-11-14 16:04:41 +01:00
8c5bff94d1 Fix: Temporary fix for crashes when moving GP keyframes when toggling Onion Skinning
ANIM_list_elem_update() was not doing anything as ale->id was null,
and we were filtering the channels by "animdata" blocks (i.e. the GP
datablocks). While technically what we're doing here isn't totally
correct (I'll need to come up with a better fix tomorrow), this will
be a good quick-fix for the crashes they animators are currently getting.
2017-11-15 02:57:01 +13:00
8c07cf1385 Fix compile errors after merge 2017-11-14 23:49:55 +13:00
8119b65b86 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2017-11-14 23:49:51 +13:00
715c58d6bf Cleanup: Remove unused code 2017-11-14 09:53:38 +01:00
28142f5fa5 WIP: More work in smooth process 2017-11-13 19:31:40 +01:00
0dc9be1ef9 Fix merge errors 2017-11-13 19:13:12 +01:00
c03361474b Merge branch 'blender2.8' into greasepencil-object 2017-11-13 19:02:50 +01:00
0b7c2ef28b Smooth Strength and Thickness too 2017-11-13 18:12:52 +01:00
aaed57792f Improve subdivide stroke while drawing
Now instead of create a point half way, a smooth process is applicated.
2017-11-13 17:58:58 +01:00
5819ab66fa WIP: Check minimum tablet pressure
In some tablets when the user ends the stroke the tablet send several events with a pressure of 0 or with very low values. These low pressure values produce weird lines at the end of the stroke.
2017-11-13 16:45:33 +01:00
330febba5a Cleanup UI and unused fields 2017-11-13 14:35:14 +01:00
8b97a539aa New Smooth modifer
Allow to apply smooth to the stroke after drawing.

This is not related to the smooth of the stroke while drawing.
2017-11-13 11:01:44 +01:00
98cf19c7ed Cleanup extra space 2017-11-11 19:12:14 +01:00
541d7415bf WIP: Remove smooth lower limit
These lines were for debug only and must be removed
2017-11-11 18:55:11 +01:00
4126de5114 Fix merge errors
The ruler was using old grease pencil structure and palettes.

This need more attention in the future.
2017-11-11 16:35:17 +01:00
1d8b9681fe Merge branch 'blender2.8' into greasepencil-object 2017-11-11 16:16:41 +01:00
333e32e0e1 WIP: Smooth Thickness and Strength
This mooth the thickness of the strokes using points before and after. The same for strength (alpha)

Some cleanup too.
2017-11-11 16:13:55 +01:00
42b43925fb Fix error in previous commits 2017-11-10 20:12:11 +01:00
4cb437d42f WIP: Readjust smooth thickness weights 2017-11-10 20:10:21 +01:00
c5131c95e7 WIP: Readjust weight for stabilize 2017-11-10 20:09:36 +01:00
fce610eeed WIP: First test for smooth thickness 2017-11-10 20:08:51 +01:00
cbd15d1452 WIP: More work to get better drawing feeling
Thre was some problems in previous commits
2017-11-10 19:14:58 +01:00
6d272e612e Remap pixel scale parameter
The value for control point density was strange.
2017-11-10 09:00:06 +01:00
7bf104abd7 Compile fixes after merge 2017-11-10 12:39:28 +13:00
5354c80037 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
	source/blender/draw/modes/object_mode.c
	source/blender/editors/include/ED_gpencil.h
	source/blender/editors/space_view3d/view3d_draw_legacy.c
2017-11-10 11:43:38 +13:00
464eb5b042 Cleanup: Fix compiler warnings 2017-11-09 19:29:57 +01:00
ff13b291b0 Cleanup: Supress compiler warning 2017-11-09 19:23:58 +01:00
526e2291ff WIP: New parameters for brushes
More parameters to define how the stroke is stabilized.

This parameters maybe are not necessary on UI, but we need them now for testing different values.
2017-11-09 16:41:10 +01:00
712c3a86ed WIP: Fix error in smooth lines
Need to check the distance of previous points, not new with previous.
2017-11-09 12:46:22 +01:00
a73f098668 WIP: Reduce points when stroke is slow
Initial work to reduce the noise when the stroke is done very slow removing points not relevant.
2017-11-09 11:50:51 +01:00
6484646103 Merge branch 'blender2.8' into greasepencil-object 2017-11-09 19:34:42 +13:00
e7a016d368 Fix compiler error 2017-11-08 08:52:52 +01:00
f1b0d3f349 Merge branch 'blender2.8' into greasepencil-object 2017-11-08 08:37:32 +01:00
23981fad45 WIP: As a temporary measure for fixing GP cache invalidation crashes,
re-enable BKE_gpencil_batch_cache_alldirty_main() when debug_value = 660
2017-11-08 14:15:53 +13:00
ab83695711 Updating the hacky eval_ctx construction to use more official functions 2017-11-08 13:22:54 +13:00
7b9595d366 Fix: Added some more tags/relations in depsgraph to fix crashes when Onion Skinning is enabled
* id_tag_update_object_data() - Added a case for the GP datablock type
  so that depsgraph tagging via the GPencil datablock's RNA properties
  works. Previously, only the object.data case (i.e. modifiers) was handled.
  This fixes a crash when enabling onion skinning, and a ghost can be shown
  on the neighbouring frames.

* DepsgraphRelationBuilder::build_obdata_geom() - Added a relation between
  timesource and GP geometry (i.e. where cache rebuild occurs). This fixes
  a crash after scrubbing the timeline when onion skinning is enabled
  (I'm guessing due to onion skinning suddenly getting re-shown, but the cache
  not doesn't contain this info due to the previously being updated for animation)
2017-11-08 13:22:25 +13:00
fa3c3438a2 Apply stabilization in segments with a minimum size
If the points are too near, the stabilization must be disabled.

This modification is still WIP, needs more artist feedback to verify if works.
2017-11-07 18:34:40 +01:00
94a3f0f089 Merge branch 'blender2.8' into greasepencil-object 2017-11-07 16:15:44 +01:00
98556dc965 Improve stabilization function
Now the previous point is smoothed too to get a better transition.
2017-11-07 16:12:35 +01:00
2a86495125 Improve thickness fix when no locked axis
There was some problems with the thickness when the axis was not locked that were not fixed in previous commit.
2017-11-07 13:46:09 +01:00
82eaf7a13d Merge branch 'blender2.8' into greasepencil-object 2017-11-07 12:30:25 +01:00
53822bd1d7 Fix error when axis not locked
The size of the stroke was not correct when the axis was not locked.

It needs a vector to the view to calculate the real size of the stroke.
2017-11-07 11:58:22 +01:00
9fc8ec1817 Redo Fix in previous commit and add missing lines 2017-11-07 11:30:21 +01:00
30cfbec6e2 UI: Remove deprecated property
The OBJECT mode was removed as property.
2017-11-07 11:08:30 +01:00
e19e686edb Merge branch 'blender2.8' into greasepencil-object 2017-11-07 10:44:43 +01:00
a051c2e870 New parameter to adjust stabilization
Parameter to control the stabilization amount of the brush.

This stabilization works as a dynamic smooth using the previous points to calculate the estimated position and average the position to get smoother strokes.

This is not a replace of smooth factor that works after finish stroke. This new parameter is applyed while drawing before ending the stroke.
2017-11-07 10:43:55 +01:00
e176d66cbe Fix: Depsgraph was complaining in debug mode about the "geometry_eval" opnode for GPencil not having any function attached
In future, maybe we should move the derived_gpf calculations
(and by extension, the modifier-evaluation loops) into the
BKE_gpencil_eval_geometry() callback added in this commit.
2017-11-07 20:51:54 +13:00
806aa232fe WIP 2017-11-07 19:41:53 +13:00
03235ea672 GP drawing: Try to init the eval_ctx from draw_ctx, if C isn't provided 2017-11-07 19:41:52 +13:00
866c4a881d Fix merge errors 2017-11-06 18:56:55 +01:00
fdf0191d78 Merge branch 'blender2.8' into greasepencil-object 2017-11-06 18:44:25 +01:00
92a3028e92 Merge branch 'blender2.8' into greasepencil-object 2017-11-06 17:47:18 +01:00
51ca8f81ed Fix problem after merge
One BKE function used changed
2017-11-06 17:17:19 +01:00
a66cae8737 Merge branch 'blender2.8' into greasepencil-object 2017-11-06 16:56:51 +01:00
e2a18af69d Smooth new points while drawing
A new smooth algorithm is used for each new buffer point using the last two points to calculate the estimated position and average this point with the current mouse position.

This smooth reduce the jitter of the stroke and allows to use lower post smooth values to reduce stroke change after finish stroke.

Now the factor is hardcoded, but after some more testing maybe we need add a parameter by brush.
2017-11-06 16:55:50 +01:00
e45633335a Merge branch 'blender2.8' into greasepencil-object 2017-11-05 16:37:06 +01:00
204db92965 Merge branch 'blender2.8' into greasepencil-object 2017-11-04 16:33:08 +01:00
67b74e5352 Fix delay cleaning previous frame when drawing
The fast drawing was not cleaning the previous frame when the artist create a new one and only was redraw after release mouse.
2017-11-04 16:31:56 +01:00
8432097669 Fix crash on trying to save files with GP objects
Quick fix for context being NULL when the thumbnail renderer gets triggered
while trying to save files.

TODO: We need a better solution here for passing eval_ctx down to GP modifiers
2017-11-05 00:23:02 +13:00
2290a4e8ed Fix: Pass a usable EvaluationContext to GP Modifiers
This is needed for some modifiers (e.g. Build), which rely on time
2017-11-04 21:55:39 +13:00
12074daebc Fix: Alt-Shift-SelectMouse wasn't working to add an entire stroke to the current selection 2017-11-04 18:23:31 +13:00
53238de132 GP Object: Added missing support for the "Apply Transforms" operators 2017-11-04 17:43:48 +13:00
cde66cdfc5 Cleanup: Style fixes 2017-11-04 17:43:48 +13:00
1559771cb6 Pre-emptive fixes for crashes occurring when GP strokes have no palette/color info assigned 2017-11-04 17:43:47 +13:00
02e3eb1ee7 Fix: Crash when unhiding a GP layer in the dopesheet if the frame has changed in the meantime 2017-11-04 17:43:47 +13:00
c355869cb1 Cleanup: Remove a whole bunch of manual GP cache tagging (marked for review) 2017-11-04 17:43:46 +13:00
4c542f6c37 Fix: Added "missing link" preventing depsgraph id_tag getting to GPencil updates
This was causing problems like making the modifier show/hide button not
work for Grease Pencil objects
2017-11-04 17:43:45 +13:00
c706a78683 GP Modifiers: Finish porting over last modifier (Simplify) and Cleanup Code 2017-11-04 17:43:45 +13:00
f5852bedde Cleanup: Use vec2f instead of defining our own 2d point type 2017-11-04 17:43:44 +13:00
583b871ec7 Cleanup: Ported Lattice Modifier code over to new callbacks 2017-11-04 17:43:44 +13:00
7db53c109e Outliner: Indicate which GP layer is active
Active layers get the colored pencil, while inactive ones get the dot
2017-11-04 17:43:43 +13:00
4b4bb0c838 Outliner now displays icons for GP Modifiers 2017-11-04 17:43:42 +13:00
df289455c7 GP Modifiers: Replace defunct "Duplication" modifier with "Build" modifier
It doesn't actually do anything now, and most of its properties are
undefined as well, but we don't want to break any existing files now
(as renumbering the other modifiers would cause issues)

Note: BKE_gpencil_reset_modifiers() has been removed. If the array modifier
needs this, we will have to find another solution to this.
2017-11-04 17:43:42 +13:00
a88cdce5db Fixes to various GP Modifiers
* Array modifier can be shown in editmode
  (TODO: When "Make Objects" is enabled, this breaks)

* Color (hue/sat) modifier was still using G.main
  -> Updated to use palette slots instead
2017-11-04 17:43:38 +13:00
bac4029926 Fix: Inconsistent behaviour between different GP array modifier cases
The main culprits here were:
1) Wrong order of matrix multiplication (resulting in inverted grid layout)

2) Directly reading off diagonals from matrix as scale, which failed when
   objects were rotated
2017-11-04 17:43:38 +13:00
cbe0626e8e Cleanup: Remove a bunch of redundant/bad old code 2017-11-04 17:43:37 +13:00
442d3f2697 GP Array Modifier: Bring back draw-engine hack for array modifier drawing
This time, it only runs when "Make Objects" is enabled on a modifier,
giving users a workaround for the z-ordering problems.
2017-11-04 17:43:36 +13:00
4311de9d86 Fix UI breakage (GP Modifiers / 3D View header) after ob->gpd --> ob->data refactor 2017-11-04 17:43:36 +13:00
1d27ca9be3 Fix: GP Modifiers UI was broken during the ob->gpd --> ob->data refactor 2017-11-04 17:43:35 +13:00
bb1475053e Fix: GP array modifier's "count" property should have a lower "sane" limit
Previously, the upper bound for dragging in the UI was effectively unlimited.
This has the unfortunate consequence of causing hard resets (out of bounds/memory)
as I found out last night while testing this.
2017-11-04 17:43:35 +13:00
b7ad3ea653 GP Modifiers - Merge Array and Duplication modifiers
Array and Duplication modifiers basically implemented the same functionality,
except that:
1) Array was slightly more powerful (i.e. it could make a 3D grid instead of
   just putting everything in a single line), and
2) Array created new objects when "Applying", while Duplication added to the
   current datablock

This commit basically merges the functionality of both into the Array modifier.
I ended up recoding this modifier to hopefully work a lot faster.
* The resulting modifier more closely resembles the behaviour of the normal
  Blender Array modifier.
* Performance should be better now with over 25 objects (previous array modifier
  implementation lagged badly with more than 25-30 instances). The previous approach
  of manually creating objects didn't work too well.

TODO:
* The functionality to disable the instance creation when the simplify options
  are enabled is currently lost. Still need to figure out how to restore it
* The stubs/shell for the old Duplication modifier are still around. To be removed!
2017-11-04 17:43:34 +13:00
cc9eb7b26c Restored manual gpencil_batch_cache_dirty() call when adding modifiers
There are too many problems leaving it out, even if in theory the depsgraph
calls should be taking care of it.
2017-11-04 17:43:33 +13:00
52edc1a9c6 Port Subdiv GP Modifier 2017-11-04 17:43:33 +13:00
b19021ecfa Temporary (?) fix so that Hero project files get version patched correctly 2017-11-04 17:43:32 +13:00
32e49c732b Porting more GP Modifiers
* Opacity modifier
* Color modifier
* Thickness modifier
* Tint modifier
2017-11-04 17:43:31 +13:00
abf0f70296 Cleanup: Remove unused function 2017-11-04 17:43:31 +13:00
0fdfff51d9 Fix: GP modifiers not updating when properties changed
Added back an explicit call to BKE_gpencil_batch_cache_dirty()
in the rna update callback for GPencil modifier properties.

However, instead of polluting the general rna_Modifier_update(),
this time we do this in a special wrapper/update callback for
dedicated GP modifier usage.

I'm unsure why the depsgraph isn't properly updating this case
- there's probably a missing relation between modifier properties
and GP ubereval (which calls the tagging), but where?!
2017-11-04 17:43:30 +13:00
30780a4238 GP Modifier: Set up stubs for geometry modifiers too 2017-11-04 17:43:29 +13:00
b05b0900d3 GP Modifiers: Fully ported Noise modifier over to new system 2017-11-04 17:43:29 +13:00
0ca86c6ab5 Fix: "deformStrokes(..., bGPDframe *)" callback should really have been "deformStroke(..., bGPDstroke *)" instead 2017-11-04 17:43:28 +13:00
88972d1698 Cleanup - Various cleanups for GP modifier files
* Remove redundant checks
* Use M_PI_2 instead of hardcoding a magic number
* Fix license text year info
* Properly handle new palette creation in Tint modifier
2017-11-04 17:43:27 +13:00
9e1685cb13 Cleanup: De-duplicate mode checking macros for GPencil 2017-11-04 17:43:27 +13:00
8b18d7a51e Cleanup - Use existing vertex groups function instead of defining out own 2017-11-04 17:43:26 +13:00
217c58917c Cleanup - Move helper functions for GP modifiers into the modifiers module 2017-11-04 17:43:26 +13:00
68e00c852f Fix compiler warning about const vs non-const 2017-11-04 17:43:25 +13:00
1d9a8be513 Fix "Apply Modifier" operator to use the new callbacks 2017-11-04 17:43:24 +13:00
26efbf16b6 GP Modifiers - Change all applyModifier callbacks to bakeModifierGP callbacks 2017-11-04 17:43:24 +13:00
7163e8c190 ModifierTypeInfo - Add 3 dedicated callbacks to support GP modifier evaluation and operations
* deformStrokes - Handles the "stroke" modifiers currently evaluated in
                  BKE_gpencil_stroke_modifiers() - e.g. Thickness, Noise

* generateStrokes - Handles the "geometry" modifiers currently evaluated
                    in BKE_gpencil_geometry_modifiers() - e.g. Array

* bakeModifierGP - Dedicated callback for hosting the code currently
                   wrongly-placed in applyModifier. This gets called
                   when pressing the "Apply" button on a GP modifier.
2017-11-04 17:43:23 +13:00
a16f60ad44 Compile fix: Missed a reference in previous commit
TODO: Calls to BKE_gpencil_layer_delframe() need to trigger a refresh
2017-11-04 17:43:22 +13:00
96e607f017 Cleanup: Eliminate BKE_gpencil_batch_cache_alldirty()
This accessed the global G.main directly, which we're trying to remove
2017-11-04 17:43:21 +13:00
61c129b57e Cleanup - Remove direct BKE_gpencil_batch_cache_dirty() code in favor of depsgraph tagging 2017-11-04 17:43:21 +13:00
49b8f73715 Fix: Version patching code was creating extra GP datablocks and throwing them away
After modifying the BKE_object_add() function to create a new GP datablock
by default, this change in behaviour would cause problems for the version
patching code fixing the old scene->gpd.
2017-11-04 17:43:20 +13:00
b3a4b8ec47 Cleanup - Style 2017-11-04 17:43:19 +13:00
346699bc9f Cleanup - Remove unused var 2017-11-04 17:43:19 +13:00
99d13d1c65 Cleanup: Remove the redundant GP_TOOL_SOURCE_OBJECT stuff
Since we only have GP objects in the 3D view now, this is the only
setting that should be used. Therefore, there's no need to set this
setting or check if for any reasons anymore.
2017-11-04 17:43:18 +13:00
1346ab8d98 Cleanup: Use standard logic for duplicating OB_GPENCIL objects and their data 2017-11-04 17:43:17 +13:00
b95b48f149 Fix: GP objects should get created with GP datablocks initialised already
(just like all other object types)

Previously, because the GP datablock was stored in a different place,
this had to be handled differently from other datablocks. But that
doesn't hold anymore, so it's time to fix that.
2017-11-04 17:43:17 +13:00
2aa87cdf67 Make BKE_gpencil_data_addnew() accept Main as an argument instead of using G.main 2017-11-04 17:43:16 +13:00
c109b5e59d Fix: Remove temporary debugging prints 2017-11-04 17:43:16 +13:00
66df7d9b74 Fix: Remove most of the code for treating GP as a special case in the vertex group poll functions
These were causing crashes on GP datablocks with ob->data not set
when clicking on the Vertex Groups panel (i.e. as the operator lookups
would cause problems)
2017-11-04 17:43:15 +13:00
e56a139e02 Fix typo causing crashes when trying to draw GP objects 2017-11-04 17:43:14 +13:00
f834845de0 Fix: Properties Editor was still showing the datablock selector for the old Object.grease_pencil 2017-11-04 17:43:14 +13:00
de2cafef29 Fix: Some more sanity checks for cases not handled 2017-11-04 17:43:13 +13:00
e1023560df Fix crashes on startup 2017-11-04 17:43:12 +13:00
faf93e0cc6 Fix some missed ob->gpd references 2017-11-04 17:43:12 +13:00
70380ef188 Fix typos and crash on startup 2017-11-04 17:43:11 +13:00
6c75e0c33b WIP Temporarily knock out some of the bad modifier/update hacks being used
These will hopefully be removed after some more testing, but in the meantime,
just commenting them out to test if things work still.
2017-11-04 17:43:10 +13:00
04e439513b GP Branch: Use ob->data instead of ob->gpd for storing GP object's GPencil datablock
WARNING: Old files created in the GP branch may break after this commit!

* There won't be data loss, but it will be necessary to manually fix this
  per-file as needed. The old ob->gpd pointer remains for now to ease the
  transition.

* The code will attempt to version patch old files that store data in this
  pointer. However, right now, this only works for GP Objects and for Empties.
2017-11-04 17:43:10 +13:00
7ca4c512a7 Hacky WIP code to verify that GPencil-Dopesheet Integration (for modifiers) is working
This code should be replaced, as it currently just duplicates the
modifier-looping logic (bad!). However, this is just a temporary placeholder
needed to get the updateDepsgraph() calls to run at all.

In any case, this would've been easier if I'd done the ob->gpd ==> ob->data
fixes first, since this hack wouldn't be needed.
2017-11-04 17:43:09 +13:00
b5c994cd72 Make GP cache tagging happen in the BKE_object_eval_uber_data callback 2017-11-04 17:43:08 +13:00
8b4d22db99 GP Lattice Modifier - Define updateDepsgraph() callback to add needed relations
and remove manula updates
2017-11-04 17:43:08 +13:00
ed612d9ed5 Knock out old "tag all" functions so that we can check if everything is working properly 2017-11-04 17:43:07 +13:00
e42adf6fc3 Merge branch 'blender2.8' into greasepencil-object 2017-11-03 17:44:44 +01:00
abaab202f9 Merge branch 'blender2.8' into greasepencil-object 2017-11-02 15:44:28 +01:00
af421a45e6 Merge branch 'blender2.8' into greasepencil-object 2017-11-01 09:33:31 +01:00
b381e84ec3 Merge branch 'blender2.8' into greasepencil-object 2017-10-30 09:25:35 +01:00
eb1d7a9ba7 Merge branch 'blender2.8' into greasepencil-object 2017-10-28 10:54:28 +02:00
b229e65eb7 Merge branch 'blender2.8' into greasepencil-object 2017-10-26 13:11:43 +13:00
37168c76fe Merge branch 'blender2.8' into greasepencil-object 2017-10-25 23:52:10 +13:00
55b4f89539 Merge branch 'blender2.8' into greasepencil-object 2017-10-25 12:37:41 +13:00
e4369b6663 Merge branch 'blender2.8' into greasepencil-object 2017-10-24 19:35:12 +02:00
3083a9c05e Fix memory leak in GPU
The problem was the flag was not checked and in some situations this avoided the batch clear.
2017-10-24 19:26:59 +02:00
41025e1550 Fix: GP-related menus were only available in "Edit Mode" but not any of the other modes
Instead, the Object Mode menus were being shown, which could be quite confusing
and useless in general.
2017-10-25 00:56:11 +13:00
2c71b7ec6c Code Cleanup - Fix name of helper function to be less misleading 2017-10-25 00:56:11 +13:00
007b43dcb3 Fix more issues raised in code review 2017-10-25 00:56:10 +13:00
06fb27296a Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2017-10-24 13:45:54 +02:00
5cb7cc4939 Fix after merge error 2017-10-24 13:45:31 +02:00
c541a58928 Merge branch 'blender2.8' into greasepencil-object 2017-10-24 13:35:51 +02:00
bf390d5748 Code Cleanup - Style, indentation 2017-10-24 21:25:00 +13:00
bc283c2e4f Code Cleanup - Simplify code here based on issues raised in code review 2017-10-24 21:07:38 +13:00
Dalai Felinto
76772f29f4 Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object 2017-10-23 18:42:55 -02:00
Dalai Felinto
17c92b96af Merge remote-tracking branch 'origin/blender2.8' into greasepencil-object 2017-10-23 18:06:40 -02:00
746380bbc5 Replace loop index to post addition 2017-10-23 20:44:57 +02:00
51e3735653 Fix wrong allocation
The allocation was allocating batches, but must be an array of pointers to batches.
2017-10-23 20:09:53 +02:00
6f7eecc47b Remove uses of BKE_gpencil_batch_cache_alldirty() 2017-10-23 15:58:24 +02:00
b61e158d90 Remove more G.main uses 2017-10-23 12:14:43 +02:00
2ebe4da826 Remove G.Main from RNA code
Remove the use of global main in RNA functions
2017-10-23 12:09:55 +02:00
15a84215da Merge branch 'blender2.8' into greasepencil-object 2017-10-23 10:45:10 +02:00
991bb5b567 Fix Thickness curve intialization error
When reload file, the curve was not initializated and produces segment fault.
2017-10-22 10:56:03 +02:00
20da47b003 Cleanup: use relative imports in bl_ui
More changes missing in previous merge
2017-10-21 17:50:43 +02:00
a0673038ab Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/properties_scene.py
        release/scripts/startup/bl_ui/space_clip.py
	release/scripts/startup/bl_ui/space_image.py
	release/scripts/startup/bl_ui/space_node.py
	release/scripts/startup/bl_ui/space_view3d.py
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
2017-10-21 17:36:18 +02:00
f64c881f58 Fix merge error
In a previous merge, this file was wrong.
2017-10-21 09:26:11 +02:00
b1d6f6e3c3 Cleanup: Remove unused code 2017-10-20 19:39:35 +02:00
0fa2873c5d Pass bmain explicitly rather than via bContext
Passing main makes function easier for re-use.
2017-10-20 19:33:52 +02:00
c8a9df6a2c Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/gpencil/drawgpencil.c
2017-10-20 19:21:02 +02:00
72babc41b0 Cleanup style 2017-10-20 19:17:47 +02:00
52cb675171 Cleanup style and variable names 2017-10-20 19:09:39 +02:00
dec99c6b68 Cleanup style 2017-10-20 19:03:35 +02:00
6528b0b169 Cleanup style 2017-10-20 19:00:54 +02:00
227ddeb435 Cleanup: Replace duplicated poll lines by function 2017-10-20 18:53:22 +02:00
082b32c53a Rename texture_shift to texture_offset 2017-10-20 18:32:58 +02:00
ff756fb902 CMake: Fix order of libraries to address linking errors on Linux 2017-10-20 15:26:27 +02:00
6e203baa54 Cleanup: Use modifier scene 2017-10-20 10:07:27 +02:00
68efeb2066 Merge branch 'greasepencil-object' of git.blender.org:blender into greasepencil-object 2017-10-20 10:03:20 +02:00
dc43067cae Cleanup: Rename passindex to pass_index 2017-10-20 10:03:00 +02:00
5b40247dda Cleanup: redundant casts 2017-10-20 13:31:47 +11:00
0ff23fd671 Merge branch 'blender2.8' into greasepencil-object 2017-10-20 12:48:58 +11:00
6aeb92ac95 Fix draw on parented object
When the gp object was parented, the location was not using obmatrix and the position was wrong.
2017-10-19 17:09:38 +02:00
699a88c06e Cleanup: Add end line 2017-10-19 16:29:16 +02:00
631a267fa8 Reorganize shgroups creation
Improve the creation of shading groups and fix some memory leaks when the shading group was created but not used in any pass.
2017-10-19 15:58:43 +02:00
ac3ce46e1e Merge branch 'blender2.8' into greasepencil-object 2017-10-20 02:11:35 +13:00
cddbe11bee Minor RNA tweaks for MultiEdit
* Rename RNA properties to bring them more in line with standard naming
* Make it clearer in the tooltip for MultiEdit that only selected keyframes
  will be edited
2017-10-20 02:05:53 +13:00
8d9c1f03da Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	release/scripts/startup/bl_ui/space_view3d.py
2017-10-19 19:15:15 +13:00
ac521fc0bf Refresh gp cache while transform
The geometry cache must be recalculated when move keyframes in action editors.
2017-10-18 17:38:44 +02:00
e6dc574f9a Merge branch 'blender2.8' into greasepencil-object 2017-10-18 16:45:51 +02:00
36e5d42d1d Version bump to 2.80.2 and initialization code
As Grease Pencil branch is developed using 2.80 as base, it's necessary to bump the version and move all initialization code to keep running all Hero open movie files that were created with GP branch.
2017-10-18 16:38:48 +02:00
3057a6d6cf Fix after merge errors 2017-10-18 10:47:36 +02:00
a038fa5d40 Merge branch 'blender2.8' into greasepencil-object 2017-10-18 10:19:42 +02:00
1eafff4bf1 Merge branch 'blender2.8' into greasepencil-object 2017-10-18 19:06:15 +13:00
44c7411220 Remove unused code
Turns out this chunk of code won't get run at all (since GP objects
store the GP datablock on the ob->gpd pointer and not ob->data like
every other object type).
2017-10-18 13:28:54 +13:00
6a7bf3b058 Set cache as dirty in Dopesheet
After a transformation, the cache must be set as dirty.
2017-10-17 17:29:54 +02:00
c8071080e9 Redo previous commit for Join
If the weight memory is not duplicated, when the initial stroke is released the memory can get corrupted.
2017-10-17 16:19:48 +02:00
08e3f32bb0 Fix segment fault when join
The join strokes operator did not copied the weights and this resulted in segment fault.
2017-10-17 12:49:51 +02:00
01e77ef532 Cleanup: warnings 2017-10-17 16:26:07 +11:00
7031f9672a Merge branch 'blender2.8' into greasepencil-object 2017-10-17 16:19:48 +11:00
833a2855fe Merge branch 'blender2.8' into greasepencil-object 2017-10-17 16:17:46 +11:00
4e33a12185 Merge branch 'blender2.8' into greasepencil-object 2017-10-17 16:07:48 +11:00
8c10596c19 Restore part of comment for xray_mode, left out during earlier fix 2017-10-17 14:56:59 +13:00
b2a3df653e Remove last_palette_name field
This isn't used for anything anymore. Removing it (and the padding) doesn't
seem to cause any new glitches, so this should be ok.
2017-10-17 14:56:28 +13:00
cfc11c5e4a Code Cleanup - Remove all uses of gpd->last_palette_name
The reason for this has been superseeded by the Palette Slots system
2017-10-17 01:03:37 +13:00
feadd7651c Merge branch 'blender2.8' into greasepencil-object 2017-10-16 12:47:29 +02:00
bf2287a036 Fix typo error 2017-10-16 12:37:39 +02:00
5c3dcad7f3 New Select Alternate operator
This operator allows to select alternative points in a selected stroke. This can be useful to disolve or modify.
2017-10-16 12:33:51 +02:00
07ec03d4f8 Rename Panel Primitives to Shapes
The "Primitive" name can be confusing. It's better to use "Shapes" because these options are to add new strokes with a predefined shape, not a new GP object with this shape.
2017-10-16 09:33:23 +02:00
2803d7c06f Update cyclic logic in old draw methods
The first adjacency point must be equal to last one if cyclic enabled.
2017-10-16 08:43:21 +02:00
f7a7a89039 Improve cyclic join
The join of the first point was not perfect.
2017-10-15 19:27:35 +02:00
a99411a1aa Fix cyclic wrong opacity
When enable stroke cyclic, the opacity of the final segment of the stroke was darker.

The problem was related to the adjacency points used.
2017-10-15 18:33:41 +02:00
1363002b57 Rectangle and Circle primitives
Completed the work to create rectangles and circles.
2017-10-15 17:51:28 +02:00
9dddefcbae WIP: Basic rectangle primitive
Still pending to show the feedback ghost image while create the primitive.
2017-10-15 13:31:38 +02:00
d27fa507d5 Cleanup: Remove unused code 2017-10-14 11:54:28 +02:00
5c939d58ef Merge branch 'blender2.8' into greasepencil-object 2017-10-14 11:28:14 +02:00
d62dde9a73 Cleanup: Change debug code
No functional changes.
2017-10-14 11:25:47 +02:00
d55b5603f5 Fix casting to bool before checking the flag 2017-10-14 04:35:54 +11:00
d07f2b12c3 Cleanup: style 2017-10-14 04:32:32 +11:00
df2e134d33 Merge branch 'blender2.8' into greasepencil-object 2017-10-12 17:13:39 +02:00
37b04f1aa5 Fix error selecting camera
The edit shgroup creation must check active object to verify if it's a OB_GPENCIL
2017-10-12 17:10:43 +02:00
7cb871a380 Check object type 2017-10-12 13:09:18 +02:00
c803ed9b80 Fix zdepth order with 3D objects
When draw a new stroke, the stroke must be visible over all 3D objects and not in back of them.

A new mix pass has been created to make a mix with default framebuffer using a gl_FragDepth = 0.0 to force to be in front .
2017-10-12 12:33:35 +02:00
8cae0736fe Check drawing mode flag 2017-10-12 11:55:46 +02:00
d76b27e766 Fix bug of memory corruption
The strokes were transparent and zdepth was doing weird things when using 2 GP objects. This error was introduced by commit: 27/09/2017 08:34 5c8e1dfc28

The problem was the field xray_mode. If move below in the struct, the value is corrupted and draw manager does not work fine..
2017-10-12 11:28:18 +02:00
32322044a0 Fix PaletteSlot memory leak 2017-10-11 20:41:43 +02:00
c82ddb7549 Merge branch 'blender2.8' into greasepencil-object 2017-10-11 10:26:08 +02:00
895ec88857 Set default framebuffer
After detach textures must set the default buffer again.

Also checked the number of samples, not only framebuffer.
2017-10-11 09:58:10 +02:00
1e250b1b83 Fix opacity change when drawing
When draw a stroke with a color with opacity < 1.0, there was a opacity change when finish stroke.

This was related to the blend pass that was used, so the drawing in fast mode must pass through the temp framebuffer to get same alpha values in blend.
2017-10-10 18:49:53 +02:00
f3d3579751 New MSAA macros
Define macros for cleanup code.
2017-10-10 18:41:06 +02:00
7efb8f5477 Cleanup: Remove redundant code 2017-10-10 12:32:42 +02:00
b8161bd9af Fix error introduced in previous commit
The macro used was wrong
2017-10-10 11:19:51 +02:00
4cec3f3ccd Merge branch 'blender2.8' into greasepencil-object 2017-10-10 11:14:00 +02:00
89105e2556 Initialize selection alpha
There is a problem with this value for old 2.7x files, so the value is set to 1.0 when the file is from previous versions.

The initialization is done in weighttype section because this is a safe checking for old files and it is a related parameter.
2017-10-10 11:10:50 +02:00
5c2ee58c7c Cleanup: Define macros for GP modes
Define new macros for checking grease pencil object mode to cleanup code.
2017-10-09 23:47:01 +02:00
089835469a Fix error in default gp object after delete
If delete the gp object and it is assigned as default scene gp object, must be cleared.
2017-10-09 19:19:58 +02:00
049eb49f9a Enable MSAA for strokes
This AA is activated with Multisample parameter of user preferences screen.
2017-10-09 16:19:17 +02:00
2af1a0b628 Merge branch 'blender2.8' into greasepencil-object 2017-10-09 10:21:21 +02:00
465ca2659d Merge branch 'blender2.8' into greasepencil-object 2017-10-07 13:14:50 +02:00
a99f812902 Merge branch 'blender2.8' into greasepencil-object 2017-10-06 23:56:56 +02:00
c09fe51f9d GP Branch Version Patching - Use palette slots instead of creating palettes directly 2017-10-06 19:24:36 +13:00
d911287d91 Revert whitespace edits in interface_utils.c
These appear to be accidental, and are unrelated to the purpose of this branch.
2017-10-06 16:55:36 +13:00
d225202f05 Merge branch 'blender2.8' into greasepencil-object 2017-10-05 18:54:11 +02:00
32c0a98c27 Merge branch 'blender2.8' into greasepencil-object 2017-10-05 10:06:12 +13:00
31efc624dc Fix: Palettes were getting freed before GPencil datablocks on exit 2017-10-05 10:01:21 +13:00
cf87d5759b First test to implement FXAA 2017-10-04 15:12:03 +02:00
c3d6b5ebcf Merge branch 'blender2.8' into greasepencil-object 2017-10-05 01:52:27 +13:00
432bd31276 Fix compile error after merge
(Also added convenience API to make it easier to add new palettes to GP
datablock without having to worry about manually fixing usercount)
2017-10-05 01:16:24 +13:00
59310a9259 Fix: When adding 2D Monkey, the Palette got too many users assigned 2017-10-05 00:52:57 +13:00
b83d72242b Added missing support for duplicating Palette Slots when copying GP data
For now, it will only increment the usercount of the referenced palettes.
2017-10-05 00:52:57 +13:00
ebe0113ba3 Code Cleanup / TODO Notes (re- reuse of palettes when validating) 2017-10-05 00:52:56 +13:00
df62778a55 Tweak behaviour of adding a new GP Palette (to match other parts of Blender)
When creating a new Palette with an existing Palette assigned to a slot,
a copy of the old Palette will be created (i.e. the new copy will have all
the same colours), instead of creating a blank palette.

This makes it easier to create different versions of the same palette.
2017-10-05 00:52:55 +13:00
bacca732cc Code Cleanup / Compile Fix
Further cleanups for the 2D monkey primitive - this time, to move
all the data arrays out of the single massive function, and out to file level.

Hopefully this solves the compile problems with GCC.

If nothing else, the file now compiles much faster here on MSVC
(i.e. previously, it was taking ~10-20 seconds to compile)
2017-10-05 00:52:55 +13:00
490a3bb944 Palette Slots - Temporary verison-patching code to add slots for early 2.8 files saved without these 2017-10-05 00:52:54 +13:00
1369e9d298 Palette Slots - Add operators to Add/Remove Palette Slots
* Add will create a new (empty) slot by default

* Remove will shown an error if the slot is currently still used by
  any strokes. Perhaps in future, it should remap the strokes instead?

* Added icon for Palette Slots (it uses the same icon as Palettes now)
2017-10-05 00:52:53 +13:00
5dbb81a638 Fix: Missing undo flags for various GP operators 2017-10-05 00:52:53 +13:00
8c8c80701b Code Cleanup - Remove old/non-existent operator defines 2017-10-05 00:52:52 +13:00
cc1a0fc314 Fix: Newly created palettes for palette slots got an extra/unneeded user 2017-10-05 00:52:52 +13:00
49f394946e Various fixes to get GP Palettes UI working
* Switched the UI to using the "active_gpencil_palette" (and palette color) context
  vars (in favor of the "active_palette"/color) ones for retrieving the active
  palette. For some unknown reason, context.active_object returns null when
  trying to use it in the Properties Editor when drawing UI layouts, but it works
  perfectly fine when operators calling operator.poll() or running operators.

* Sanitise many of the hacks added to the Palette operators to make them usable
  for Grease Pencil-linked palettes (e.g. remove special hacky args)

* Add RNA support for getting the active GP palette slot
2017-10-05 00:52:51 +13:00
0f83cba7d2 BKE_palette_get_active_from_context(C) now retrieves GP palettes from the active palette slot
if the active object is a GP object

This makes it possible to reuse all the Palette operators as-is,
without having to add a lot of GP-specific duplicates, and also
simplifies much of the context polling stuff.
2017-10-05 00:52:50 +13:00
7c9467ae1f Palette Slots - Add UI panel for Palette slots 2017-10-05 00:52:50 +13:00
aed1892c24 Code Cleanup: Move panel definitions for Palette-based colors to the Material panels file
Annotations (GP in 2D editors) will not be using this stuff,
as they will not have most of the fancy drawing options (as
they are based on the traditional 2D api instead).
2017-10-05 00:52:49 +13:00
6d6e06d39b Palette Slots - Changing assigned palette via RNA calls relevant API func to set things correctly 2017-10-05 00:52:48 +13:00
3dced61b1d Fix: Don't create redundant palette for Monkey 2017-10-05 00:52:48 +13:00
ac68a69294 Fix: Add 2D monkey adds palette link 2017-10-05 00:52:47 +13:00
c3b9b7b8e4 Fix: Strokes weren't visible while drawing
Missed this usage of palettes in previous commit
2017-10-05 00:52:46 +13:00
8cbc7334f0 Palette Slots - Replace all places initialising GP palettes 2017-10-05 00:52:46 +13:00
924112241b GP: Modify existing operators to use new palette api's 2017-10-05 00:52:45 +13:00
d01d7d053e Code Cleanup - Group all palette initialisation stuff together in same function 2017-10-05 00:52:44 +13:00
8f34d5cdb3 Cleanup - Change naming of Palette Slot vars to be easier to type 2017-10-05 00:52:44 +13:00
5d69c71adf Palette Slots: Internal API's for managing Palettes 2017-10-05 00:52:43 +13:00
ec6f392bc9 Merge branch 'blender2.8' into greasepencil-object 2017-10-03 18:28:51 +02:00
0e99d51a38 Remove antialiasing code
These functions are not working here. Need a new approach using FXAA.
2017-10-03 18:27:03 +02:00
ba077b368c Add function to fix palette bug
Added a function to fix old files with palette set to NULL by program error.

This fix will be removed in the future, but now it's required to work in open movie files.
2017-10-03 17:58:34 +02:00
61d6c4f8b9 Merge branch 'blender2.8' into greasepencil-object 2017-10-02 20:12:46 +02:00
7c3588c603 Cleanup comment 2017-10-02 11:13:09 +02:00
90152f6bcb Add Antialiasing to Grease Pencil 2017-10-02 11:07:46 +02:00
53ca11ad13 Merge branch 'blender2.8' into greasepencil-object 2017-10-01 19:16:03 +02:00
ef4c69a715 Add curve options to Thick modifier
New options to adjust the thickness of the stroke using a curve to get more artistics effects.
2017-10-01 18:54:30 +02:00
dbf2a0c54f Fix merge error 2017-09-30 16:53:38 +02:00
606679fd75 Merge branch 'blender2.8' into greasepencil-object 2017-09-30 16:06:19 +02:00
2473eb2b67 Optimize Fast Drawing memory management 2017-09-28 16:16:04 +02:00
18576dff30 Various RNA fixes (noticed while adding palette slot support)
* Added missing define for GP Object datatype in rna_Object_data_typef
* Improved a few descriptions/comments
2017-09-29 02:47:17 +13:00
c751391082 Fixes for various problems with the linked-datablock handling code for GP features
* The new "Scene->gp_object" field was not being relinked in various places

* The "bGPDstroke->palette" relinking calls were missing the standard "id.lib" args

* "bGPDlayer->parent" should be handled in lib_link_gpencil() not direct_link_gpencil(),
  It was also not handled in the expand_doit()
2017-09-29 02:47:17 +13:00
d1c33f87cc Code Cleanup - Some leftover cruft/reshuffling/formatting 2017-09-29 02:47:16 +13:00
a0acc64d35 Palette Slots - File IO and Basic RNA support 2017-09-29 02:47:15 +13:00
b77cfd7bf8 Palettes Slots - Fix incomplete DNA changes from previous commit 2017-09-29 02:47:15 +13:00
1b7b2a9a9f Merge branch 'blender2.8' into greasepencil-object 2017-09-28 13:02:52 +02:00
3c2186cbbf GP Palette Slots - Initial DNA structures
Start of support for GP "Palette Slots". These act like "Material Slots"
in that they allow a single GP datablock to refer to multiple Palette
datablocks, making it easier for the user to manage the set of available
palettes.
2017-09-27 19:41:59 +13:00
5c8e1dfc28 Code Cleanup - Clarifying names, comments, and shuffling fields for clarity 2017-09-27 19:34:01 +13:00
5a52a54c0e Code Cleanup - Move all old/deprecated bGPDpalette stuff together to be easier to remove/disable in future 2017-09-27 17:05:17 +13:00
f4eeb87fa2 Code Cleanup 2017-09-27 17:04:23 +13:00
a38d43d461 Build fixes after merge
iroundf -> round_fl_to_int
2017-09-27 14:31:48 +13:00
c6e4456778 Merge branch 'blender2.8' into greasepencil-object
Conflicts:
	source/blender/editors/transform/transform_manipulator.c
2017-09-27 14:27:17 +13:00
adda09c418 Code Cleanup: Move 2D Monkey code to its own file in editors/gpencil 2017-09-27 14:01:22 +13:00
5dfe46b985 Fix: The code to reset GP Objects to Object Mode on load wasn't working 2017-09-27 14:01:21 +13:00
009faf1cb3 UI: Remove Palette Panel header 2017-09-26 12:42:30 +02:00
eca2d5f405 Merge branch 'blender2.8' into greasepencil-object 2017-09-26 10:57:13 +02:00
04fcd84794 Code Cleanup: Replaced inlined layer-copying code with a call to the copy_ex() method 2017-09-26 15:40:46 +13:00
2cb0e188e2 Fix: Make Single User wasn't supported for GP Objects 2017-09-26 15:13:22 +13:00
5b45258fff Fix: Doing a Scene "full-copy" wouldn't relink the gp_object 2017-09-26 15:12:50 +13:00
e7395c75d5 Fix: When transforming GP strokes in "Local" mode, the strokes would get obscured by
the transform constraint lines
2017-09-26 12:50:37 +13:00
f25541be38 Fix: If the active object is not a GP object, starting to draw
with D-LMB would create a new GP object

This was behaviour was bad if you were trying to use GPencil for
anything other than 2D-3D art (e.g. for creating freehand input
for addons/Pose Sketching, annotating your work in EditMode, etc.)
as you could easily end up with all your annotations/sketches in heaps
of separate GP objects.

This commit improves the sitation slightly, by introducing an
"GPencil Object" property to Scene (similar to the existing "Active Camera"
and "Active Clip" settings).
* The idea is that the first GP object added to the scene as the "default
  GPencil Object".
* Everytime you start sketching with GPencil AND the active object isn't
  a GPencil Object, this "default GPencil Object" will become the active object,
  and any strokes you draw will be added to this object (instead of a new
  GP object being created)

TODO:
* Investigate if we can do this without losing whatever mode the user was
  in previously. This new workflow makes GPencil a lot less useful for a
  bunch of different annotation/addon workflows it could be used for in 2.7
2017-09-26 01:15:25 +13:00
04f25532ed Code Cleanup 2017-09-26 01:15:24 +13:00
7d08bf4a66 Rename "Copy" color operator to "Rename" 2017-09-25 11:14:05 +02:00
38dd6a75c0 Merge branch 'blender2.8' into greasepencil-object 2017-09-25 10:29:35 +02:00
d7a7bb8753 Merge branch 'blender2.8' into greasepencil-object 2017-09-22 16:33:25 +02:00
1cf6eaa154 Merge branch 'blender2.8' into greasepencil-object 2017-09-21 22:56:08 +02:00
7fb657c854 Merge branch 'blender2.8' into greasepencil-object 2017-09-21 19:29:22 +02:00
49e9738d6e Change replace palette UI text
Some minor changes to make it clearer.
2017-09-21 18:01:07 +02:00
7ff31e0270 New Enable/Disable editing lines option
Allows to disable the new editing lines. Now the option is in Display panel, but maybe need to be moved to new panel or reorganize.
2017-09-20 12:04:49 +02:00
329d3fe59b Fix typo error in Onion Panel 2017-09-20 11:32:49 +02:00
404f547683 Fi T51923: Crashes on selecting bone in edit mode
Need to verify FBO state before initialize framebuffer
2017-09-20 10:27:48 +02:00
a155734fac GP Properties: Tidy up Onion Skinning and Display panels
Initial attempts to tidy these panels up, according to points identified
in last night's review.
2017-09-20 13:07:38 +12:00
b1f871d031 Code Cleanup: PEP-8 2017-09-20 12:45:17 +12:00
2e77290873 GP Mode Menu Tweaks
* Rename "Stroke Paint" mode to "Draw", and make it the last item
* Use standard EditMode icon
2017-09-20 10:54:52 +12:00
0099e867bf Arrange strokes in several layers
It's more convenient to arrange strokes in all layers, and not only in active one.
2017-09-19 16:38:24 +02:00
c9654e6e88 Set Onion frame range to 1 as default 2017-09-19 10:44:07 +02:00
8ca7a46086 Merge branch 'blender2.8' of git@git.blender.org:blender.git into greasepencil-object 2017-09-19 16:49:33 +12:00
036f60d300 Cleanup: Remove unused code 2017-09-18 12:22:58 +02:00
6a1d59c188 Cleanup: quiet warnings for GCC 2017-09-18 19:50:50 +10:00
4adb6cac66 Fix bad range checks 2017-09-18 19:10:14 +10:00
d8fdae6132 Merge branch 'blender2.8' into greasepencil-object 2017-09-17 17:14:27 +02:00
773f9f19d8 UI: Disable Onion filter at Layer level
If main switch is disabled, thios column must be disabled too.
2017-09-16 19:39:03 +02:00
2527c2c3e7 Solve some minor issues in onion panel 2017-09-16 16:01:28 +02:00
6ce8857dba Fix problem with onion override
There were some conflicts in the override with main options.
2017-09-16 10:19:58 +02:00
9d31574dd1 Merge branch 'blender2.8' into greasepencil-object 2017-09-15 17:26:32 +02:00
0c3a83a8be UI: Change label text 2017-09-15 17:24:43 +02:00
8955328719 Add override options for onion skinning
This commit add options to modify at layer level the default onion skinning parameters defined at object level.
2017-09-15 17:19:56 +02:00
9fee39af71 Move onion skin settings to GP datablock
Now that we have GP object, it's better to move onion skining settings at object level and keeep only a flag to enable disable at layer level.
2017-09-15 10:34:59 +02:00
d1ac3fd077 Fix error in onion skinning
The shgroup id was not updated in the loop.
2017-09-14 18:42:34 +02:00
54c7ac2c7a Fix opacity problem with fast drawing.
The pass was doing double blending.

Thanks to Clement Foucault for his help solving this issue.
2017-09-14 16:54:47 +02:00
2f8d9d1cc8 Fix Blur problem wit opacity.
There was a double blending that reduced opacity
2017-09-14 16:36:51 +02:00
9291c0e3d7 Fix functions renamed by merged commit 6d359e 2017-09-14 12:50:05 +02:00
684ca04786 Merge branch 'blender2.8' into greasepencil-object 2017-09-14 12:32:43 +02:00
5f9b2ae2f0 Add option to disable fast drawing
This option has been added to compare viewport speed while drawing, but maybe can be good to keep it.
2017-09-13 20:32:57 +02:00
afdbad9924 Fix missing line of previous commit 2017-09-13 09:28:15 +02:00
ffda00ee71 Rework in Fast Drawing to avoid lags
Try to avoid any lag for very short and fast strokes
2017-09-13 08:17:17 +02:00
f7d40ced53 Merge branch 'blender2.8' into greasepencil-object 2017-09-12 17:09:55 +02:00
ed9b98c63f New Viewport Fast Drawing
Now a temp texture is used while the user is drawing to get an instant feedback.
2017-09-12 14:54:50 +02:00
2801dbffe3 Merge branch 'blender2.8' into greasepencil-object 2017-09-11 16:43:15 +02:00
11dc55f3c6 Fix segment Fault in Onion Skin after play
Sometimes, after run animation or change the frame , the drawing cache was not set as invalid and produced a segment fault.
2017-09-11 16:16:55 +02:00
65081e17f7 Add new Fade and Opacity to Onion
New parameters to define the opacity and a parameter to enable/disable fade effect.
2017-09-11 12:43:49 +02:00
69aea4c596 Make paint cursor size fix
After some testing, display the real size of the brush is not practical because is too disruptive and the size of cursor does not change with zoom factor. The decision was to use a fix size, instead of  paintbrush->thickness value.
2017-09-11 10:34:28 +02:00
11d2b76aa4 UI: Change simplify options order 2017-09-10 19:38:53 +02:00
5bc000a901 Fix error in simplify
The simplify was pplied with master check disabled
2017-09-10 19:18:16 +02:00
0421076179 Simplify: new option to remove fill lines
For filling areas, sometimes is good to have a way to hide the external line of the stroke that makes the fill when select simplify.

Fixed the error of render flag because the storage field was too small, so a new field has been added for simplify only.
2017-09-10 16:55:48 +02:00
890b9249d4 New Information Panel
This panel shows information about number of layers, frames, strokes, points and palettes used.

Notes: The number of frames in the internal data, not the number of different keyframes number.

The panel is not updated automatically to avoid performace issues. Close and reopen panel to refresh. Maybe, this could be changed, but need to be checked before.
2017-09-10 12:16:04 +02:00
63ea7124e1 Merge branch 'blender2.8' into greasepencil-object 2017-09-10 10:04:28 +02:00
4a89c0cd58 New Simplify panel
These options allow to speed up the viewport similar to mesh simplify.

Note: The render options are disabled while the render workflow is defined.
2017-09-10 10:02:40 +02:00
d1768b616d Apply lattice modifer in each frame
The lattice must be evaluated in each frame, not in the location of the first frame only.
2017-09-09 16:17:06 +02:00
95636294f1 Merge branch 'blender2.8' into greasepencil-object 2017-09-07 12:19:42 +02:00
76474b09d0 Merge branch 'blender2.8' into greasepencil-object 2017-09-06 16:09:05 +02:00
ebd72c93a5 Enable MultiEdit keys in Sculpt/Weight Paint modes
The Q and Shift+Q keys can be used in Sculpt and Weight Paint modes too, and not only in Edit mode.
2017-09-04 11:45:53 +02:00
19764a20c4 Enable Multiedit in Weight Paint mode 2017-09-04 11:42:45 +02:00
1f5bf340c5 Cleanup: Replace int text to double quotes 2017-09-03 11:07:14 +02:00
47dcf365f7 Merge branch 'blender2.8' into greasepencil-object 2017-09-03 11:03:20 +02:00
99420e96a8 Merge branch 'blender2.8' into greasepencil-object 2017-09-01 09:59:17 +02:00
291d253326 Fix drawing error when object has been scaled
If the object was scaled, the thickness of the stroke must be scaled while drawing.
2017-08-31 17:33:14 +02:00
de4dfd664f Change default values for Pencil Brush 2017-08-31 17:05:41 +02:00
ac521ef853 Set Pencil brush as default
This is only valid if the brush list was not created before
2017-08-31 17:02:13 +02:00
0c9ef211c9 Change default PixSize to 500
Thios value is better to keep default Blender size: 1 bu = 1 mts
2017-08-31 16:57:31 +02:00
9a1ba7b122 UI: Move Eraser radius to Option tab as new panel 2017-08-31 16:43:00 +02:00
a6a84a5ab6 UI: Rename Panel Brush Options to Strokes 2017-08-31 16:33:39 +02:00
0d2fdedb57 Merge branch 'blender2.8' into greasepencil-object 2017-08-31 12:23:01 +02:00
cd3f0eea03 Fix screen update after select keyframes
This problem was related to Onion Skinning and Multi Edit when selected a keyframe in dopesheet.
2017-08-31 12:19:33 +02:00
92eb3572c5 Add Shift+Q to enable only multiedit lines 2017-08-31 11:11:05 +02:00
7e5fe13205 Enable Onion Skinning in Edit and Sculpt mode
Only disabled in weight paint mode
2017-08-30 17:03:48 +02:00
63e651d9db Merge branch 'blender2.8' into greasepencil-object 2017-08-30 16:42:35 +02:00
c248778601 Show only lines for MultiEdit strokes 2017-08-30 16:41:28 +02:00
abea4e7c9b New option to define color of edit line
A new field for MultiEdit was added too
2017-08-30 16:15:03 +02:00
db08a30cd9 New toggle MultiEdit operator with Key Q
This allows to switch very fast between edit modes
2017-08-30 11:26:30 +02:00
b0d6cbfeec Speed up multiedit loop
If not multiedit, avoid the loop in select
2017-08-30 10:52:29 +02:00
130d522064 MultiEdit in Sculpt Mode
Allow to use Multi Edit in Sculpt mode. Now the brushes can be applied to several frames.
2017-08-29 16:10:08 +02:00
81feb43461 UI: Move multiedit to 3Dview bar
Remove from panel and add to the bottom 3D View options bar
2017-08-29 15:41:59 +02:00
4033f05c30 Add transformation data for multiedit 2017-08-29 12:59:49 +02:00
d42feef6f8 Change define to select mulñtiple strokes
This define is used in selection of points
2017-08-29 12:32:37 +02:00
d3f5314716 Change editable_gpencil_stroke context for multiedit 2017-08-29 12:17:12 +02:00
27f90459b7 Merge branch 'greasepencil-object' into GP-MultiEdit 2017-08-29 11:48:04 +02:00
a9256f2e92 Merge branch 'blender2.8' into greasepencil-object 2017-08-29 11:47:38 +02:00
c1518938d8 Draw several frames when multiedit is enabled 2017-08-29 11:46:05 +02:00
3879c96e6b Add new flag for MultiEdit
Note: The new UI options now appears in display panel but it will be moved out in future changes.
2017-08-28 13:28:43 +02:00
63039cf442 UI: Fix onion options error when no layers 2017-08-28 12:28:34 +02:00
7e93fcca80 Merge branch 'blender2.8' into greasepencil-object 2017-08-28 12:06:10 +02:00
9ebf679a0b Merge branch 'blender2.8' into greasepencil-object 2017-08-27 18:57:05 +02:00
1774a7b290 Merge branch 'blender2.8' into greasepencil-object 2017-08-25 16:48:45 +02:00
26dbbef14c Fix Lock icons
This icons were removed by error in an old merge commit
2017-08-25 09:51:45 +02:00
c1bc167f98 Change maximum range for pixel size 2017-08-24 19:38:17 +02:00
07b191ef5a Remove previous commit
This is not required because the widget manage the transformation
2017-08-24 18:47:29 +02:00
63ba22713c Fix problem with axis in Local transformations 2017-08-24 18:33:20 +02:00
e20c0e3615 Merge branch 'blender2.8' into greasepencil-object 2017-08-24 16:24:50 +02:00
13e72721f9 Rotate manipulator for Grease Pencil
Before only global orientation was supported
2017-08-24 16:04:11 +02:00
05f7b06d70 Merge branch 'blender2.8' into greasepencil-object 2017-08-24 11:48:06 +02:00
ae1cce7831 WIP: Move points in local space
Still  a problem with manipulator and axis feedback lines that are not rotated to local space
2017-08-24 11:23:45 +02:00
38b6e10780 Disable onion skinning in edit modes 2017-08-23 16:46:27 +02:00
aca714c18f Fix merge error 2017-08-23 13:28:41 +02:00
3e972fb582 Merge branch 'blender2.8' into greasepencil-object 2017-08-23 12:58:46 +02:00
c0d0aba8b6 Reorganize Onion drawing and hide on Play
Hide on play the onion skinning and refactor drawing functions for onion skining
2017-08-23 12:55:06 +02:00
bd62abc592 Set cache as dirty when remove frame 2017-08-22 20:13:13 +02:00
0eb7227e3c Remove Previous/Next mode in Onion Skinning 2017-08-22 20:08:31 +02:00
7e4ce1e804 Make Vertex Group operator available in Sculpt mode
As vertex group tools are used to manage vertices is good to have these tools available in Sculpt mode too.
2017-08-22 19:11:25 +02:00
a0439804a6 UI: Create a new panel for Brush options 2017-08-22 18:58:25 +02:00
b8afabf0f1 Fix memory leak in VBOs
After the last change in GWN_BATCH_DISCARD_SAFE(), is necessary to create the Batch using GWN_BATCH_OWNS_VBO to free the memory.
2017-08-22 17:19:51 +02:00
46ea09ef3c Check if modifiers before calling function 2017-08-22 13:33:27 +02:00
6692bb03a6 Merge branch 'blender2.8' into greasepencil-object 2017-08-22 11:30:41 +02:00
1e1eac9836 Cleanup: Rename Onion modes 2017-08-21 11:33:11 +02:00
92cb02bb4e Merge branch 'blender2.8' into greasepencil-object 2017-08-21 11:12:20 +02:00
7a3cf91a01 New Onion modes
Add options to set the range of frames in absolute or relative mode. Reorganized UI panel too.
2017-08-21 11:09:10 +02:00
678b02436a Merge branch 'blender2.8' into greasepencil-object 2017-08-20 18:33:17 +02:00
bceec2c62a Merge branch 'blender2.8' into greasepencil-object 2017-08-20 15:32:02 +02:00
01360899c2 Merge branch 'blender2.8' into greasepencil-object 2017-08-20 11:53:06 +02:00
d31de4f490 New Onion skinning for select frames only
Add an option to display only the frames selected in dopesheet.
2017-08-19 22:55:54 +02:00
0d80a85816 Cleanup code and comments 2017-08-19 16:48:38 +02:00
26e796c04f Chnage angle limits to allow negative values 2017-08-19 13:39:37 +02:00
f69944d046 Change UI panel 2017-08-19 13:28:01 +02:00
aa9cf8e1f9 Merge branch 'blender2.8' into greasepencil-object 2017-08-19 12:23:42 +02:00
d2a34bc4ce Use object location as center for swirl 2017-08-19 12:22:57 +02:00
faee6037bb Merge branch 'blender2.8' into greasepencil-object 2017-08-19 10:51:57 +02:00
9d55e5f5ed First try to apply Lattice GP modifier in all frames
Still not working but define the initial steps to do it.
2017-08-18 16:21:51 +02:00
6cb1d3c8f1 New VFX Swirl modifier 2017-08-18 13:10:16 +02:00
e9230845ec Merge branch 'blender2.8' into greasepencil-object 2017-08-18 10:37:02 +02:00
41f06ff9b2 Fix error checking edit mode button in VFX 2017-08-17 19:35:55 +02:00
08842f1171 Merge branch 'blender2.8' into greasepencil-object 2017-08-17 18:58:10 +02:00
48f985d080 New VFX pixelate modifier 2017-08-17 17:37:18 +02:00
9bb932a842 Support MSVSC 2017 15.3.0 (compiler 19.11)
The compiler version has changed in the last VS2017 update to 1911 and the old 1910 version is not working anymore.
2017-08-16 15:58:09 +02:00
89667fa0d3 Rename function 2017-08-16 14:11:56 +02:00
c6a66b1966 Merge branch 'blender2.8' into greasepencil-object 2017-08-16 13:21:33 +02:00
80631317a7 Change const type
Add const modifier to eval_ctx defiition to follow merged code rules.
2017-08-16 13:03:06 +02:00
93a0cc9c46 Merge branch 'blender2.8' into greasepencil-object 2017-08-16 10:33:55 +02:00
470851aeba Fix error in Onion skinning
THe onion was not working because when create derived_gpf, the next and prev frames were set to NULL by error.
2017-08-16 10:28:32 +02:00
87c7d4d2a3 New options to copy colors attenuated 2017-08-15 19:06:08 +02:00
c23526ac73 Fix segment fault when draw polygons 2017-08-15 12:16:07 +02:00
23d224101a Cleanup typo error 2017-08-14 16:52:10 +02:00
e6d82c9873 Cleanup comments 2017-08-14 16:33:21 +02:00
96b41a2c7f Change Blur algorithm 2017-08-14 16:19:18 +02:00
ffbe876fdd New buffer use in Blur modifier
The previous version created a loop with the framebuffer. Now a ping pong framebuffer is used.
2017-08-14 15:49:41 +02:00
ccb6a043bf Fix error in change Palette
Must change all frames not only active
2017-08-13 17:56:15 +02:00
490971b3e6 Change default values 2017-08-13 13:02:40 +02:00
1f7e171575 Merge branch 'blender2.8' into greasepencil-object 2017-08-12 10:48:29 +02:00
cc220781aa Reorganize VFX modifiers code 2017-08-11 17:30:58 +02:00
4545b30dd8 Second step to include Pixel Factor
This add the final changes to use pixfactor in shaders
2017-08-11 17:16:36 +02:00
0feed8bb23 First step to include Pixel Factor
This is equal to old commit but step by step to avoid z-depth error. Doing the commit more granulate allow to debug better the code.
2017-08-11 17:08:32 +02:00
54eb034c08 Revert "Add new factor to define pixel scale due z-depth error"
Produce unexpected errors in z-depth and need more review before apply.

This reverts commit 62677a73e1.
2017-08-11 16:35:18 +02:00
b793e07d0c Change strengthin Tint modifier 2017-08-11 15:39:57 +02:00
5225f43235 Change Opacify modifier again
The fill color only must be changed if was defined with an opacity factor.
2017-08-11 13:25:50 +02:00
625f799514 Remove Opacity factor soft limit
Now the range is free from 0 to 2
2017-08-11 10:24:13 +02:00
1eadb4e8e1 Fix Opacity modifier do not change fill opacity
The fill opacity cannot be set to 1
2017-08-11 10:14:06 +02:00
3749310734 Fix error setting origin to 3D cursor 2017-08-10 20:23:45 +02:00
af1587ecd0 Cleanup space line 2017-08-10 17:53:01 +02:00
e078a42e4e Merge branch 'blender2.8' into greasepencil-object 2017-08-10 17:42:27 +02:00
1a00c6ae36 Fix errors after merge 2017-08-10 17:40:38 +02:00
b5a116dad4 Merge branch 'blender2.8' into greasepencil-object 2017-08-10 17:37:26 +02:00
a6f5adb836 Fix Lattice memory leak
The loop need to free memory to avoid memory leak
2017-08-10 17:11:58 +02:00
be36035058 Tint modifier change alpha if value > 1
The alpha only change if the value of the factor is greater than 1. Whith a value of 2, get a full tint with full opacity.
2017-08-10 16:39:18 +02:00
62677a73e1 Add new factor to define pixel scale
This new parameter allows to define the factor to convert stroke thickness to pixel scale.

By default the factor was set to 40 that gets a good result.
2017-08-10 16:27:28 +02:00
beb2ec2bb4 Cleanup: Remove compiler warning 2017-08-10 12:28:05 +02:00
448241cf96 Fix Tint error when factor is 1
When factor is 1, must override the alpha of the original color
2017-08-10 11:42:24 +02:00
23b37b7c2f Fix opacity modifier error with values greater than 1.0
If the opacity is set to >1 values, the alpha must be overrided.
2017-08-10 11:19:25 +02:00
288c2c4999 New Dissolve modes
Now is possible dissolve between selected points or unselected points.

This is used to simplify a stroke.
2017-08-10 10:40:50 +02:00
9d99c9f379 Include Eraser radius on UI and add keymap
The eraser radius must be available on Paint mode
2017-08-09 17:03:20 +02:00
77291e0305 Fix error with tablet eraser pen
Detect if the eraser pen is enabled without pressing any key.
2017-08-09 16:52:51 +02:00
1829f693bb Add samples option to VFX Blur modifier 2017-08-09 16:09:16 +02:00
eafc840faf Cleanup compiler warning 2017-08-09 10:26:29 +02:00
44479daa2f UI: Reorganize Stroke style panel 2017-08-08 20:29:04 +02:00
cd3ff68df3 Fix opacity modifier problem with 2.0 value
When the value is set to 2.0, the stroke opacity must be set to 1.0 to force a complete solid drawing.
2017-08-08 16:40:38 +02:00
34afceb924 New Simplify stroke operator
Internally runs the same function used in Simplify modifier, but as operator.
2017-08-07 16:58:13 +02:00
dfadb0a9b6 Cleanup: Fix typo error 2017-08-07 16:51:20 +02:00
d9890fdb7a Cleanup: Remove unused variable 2017-08-07 16:46:50 +02:00
fe393bd2a9 Keep color selected when move
When move up or down in the color list, the color must keep selected.

The code has been cleanup too.
2017-08-07 16:21:16 +02:00
cbb019718c UI: Move options to side menu button 2017-08-07 16:03:28 +02:00
1cc673ebcc UI: Move buttons in panel 2017-08-07 16:00:42 +02:00
9acbf720a0 UI: Add space between fill type and color 2017-08-07 15:52:51 +02:00
a42c59d27c UI: Set some panels closed by default 2017-08-07 15:50:11 +02:00
9f7f310e25 Fix z-depth problems in wave modifier 2017-08-07 13:14:51 +02:00
91407293bf Fix segment fault with Dupli modifier
This error was introduced after adding support for modifiers in edit mode
2017-08-07 12:13:02 +02:00
b85916efdd Merge branch 'blender2.8' into greasepencil-object 2017-08-07 11:28:42 +02:00
be12ccff4a VFX Wave modifier uses PI range
The sinusoidal curve uses a loop between 0 and PI to get better and smooth result
2017-08-07 11:04:41 +02:00
a9a37ac46c Fix problem of VFX double drawing
The vfx pass needs a separate framebuffer to avoid double drawing of the strokes.

If necessary, a full copy of the initial texture is done to be used by all vfx modifiers.
2017-08-07 10:52:00 +02:00
6abd28097d New VFX Wave modifier
Distorsion using sinusoidal wave
2017-08-06 17:07:53 +02:00
e1a798c375 Cleanup: Reorganize code 2017-08-06 15:55:52 +02:00
0c6ddc2a7b New VFX Gaussian Blur modifier
This modifier works only at viewport level and cannot be applied.
2017-08-06 13:20:50 +02:00
72b709c4a4 Cleanup: Reorganize code 2017-08-05 18:20:14 +02:00
b57d6e920e WIP: Basic structure of VFX Gaussian Blur
This is the first step to implement a system for adding VFX modifiers that are applied to viewport and not to strokes
2017-08-05 17:52:45 +02:00
4e0cd81d25 Hide Apply and Copy button for GP
The VFX modifiers cannot be copied or applied
2017-08-05 17:51:40 +02:00
24ceb20f54 WIP: Basic shader for gaussian blur 2017-08-05 17:04:57 +02:00
bf869459bb Merge branch 'blender2.8' into greasepencil-object 2017-08-05 11:19:06 +02:00
890f9d315c Minor changes to simplify modifier 2017-08-05 11:05:24 +02:00
4ab7104a97 Cleanup: Rename function 2017-08-05 10:39:38 +02:00
0e1933512c Cleanup: Remove unnecessary struct 2017-08-04 21:02:56 +02:00
61d6eb84c3 Fix mistake in previous commit 2017-08-04 21:00:20 +02:00
8f46b719da WIP: New simplify modifier
The modifier uses Ramer Douglas Peucker algorith to simplify lines.

New more work to get more control.
2017-08-04 17:49:53 +02:00
5b54c66334 Make default object display size smaller 2017-08-04 10:36:14 +02:00
a583c5ed91 Make edit lines more transparent 2017-08-04 10:35:05 +02:00
5abe6b0f3c Fix select error with Suzanne 2D
The strokes must be created with 3D space flag enabled.
2017-08-04 10:26:44 +02:00
cf19500907 UI: Cleanup error when context object is none 2017-08-03 23:21:28 +02:00
37acc75871 Cleanup: Fix some minor issues in Suzanne 2D 2017-08-03 23:09:33 +02:00
8f0e5be8aa Add a primitive for 2D Suzanne 2017-08-03 20:42:19 +02:00
f7726a09f0 Add a line when edit strokes
This thin line helps to determine the stroke shape
2017-08-03 14:10:43 +02:00
d83774c003 WIP: Basic support to display modif in edit mode
Still more work needed, but this commit add basic support to display the modifiers in edit , sculpt and paint mode.
2017-08-03 13:02:32 +02:00
173ba2e6f3 Merge branch 'blender2.8' into greasepencil-object 2017-08-03 11:13:04 +02:00
19f6e3b72a Rename file to avoid compiler error 2017-08-02 10:31:09 +02:00
3e63990dd3 UI: Hide options in weight paint mode 2017-08-01 17:39:50 +02:00
d62acd434c Cleanup: Change some definitions 2017-08-01 14:02:56 +02:00
aab881520d Merge branch 'blender2.8' into greasepencil-object 2017-08-01 13:21:04 +02:00
c618a6cf92 WIP: New weight painting mode
New mode to define the weights by stroke point.
2017-08-01 12:49:16 +02:00
6551b09f41 WIP: Weight paint mode
Initial work to implement new weight paint mode.

Now only the new weight paint brush in sculpt mode is available, but not the mode itself.

New brush paint icon design by Matias Mendiola.
2017-07-31 20:55:45 +02:00
9a413c47a4 Merge branch 'blender2.8' into greasepencil-object 2017-07-31 13:05:44 +02:00
f4abac2d78 Add bContext to Lattice modifier data for future uses 2017-07-31 12:14:23 +02:00
bdafec8488 Cleanup: Review modifier stack for lattice 2017-07-31 11:56:20 +02:00
1aeeb0bd69 Remove and move weight when remove vertex group
When remove a vertex group, moves the index of other weights
2017-07-31 11:34:51 +02:00
c3f0a0477b Cleanup: Reorganize and rename
New gpencil_modider.c module for modifiers and rename functions to keep naming convention
2017-07-31 10:42:42 +02:00
bf83610263 WIP: More work for vertexgroups
Apply vertexgroups to modifiers
2017-07-31 10:15:50 +02:00
8bab103f42 WIP: Fisrt step to implement Vertex Groups
Still more work is required to use the vertex groups, but this commit add the data to bGPDspoint struct and basic functionalities.
2017-07-30 19:08:41 +02:00
abb4147391 Move update of lattice outside
The update of the GPD cache  is moved to the corresponding update functions
2017-07-29 10:31:41 +02:00
5e03de11b7 Merge branch 'blender2.8' into greasepencil-object 2017-07-28 15:47:33 +02:00
c5a2c5699f Cleanup: Remove duplicate header definition 2017-07-28 15:40:37 +02:00
2bad140c09 Fix missing object after reload
When reload a file the lattice object assigned to the modifier was missing.

The object neede a relink inside the modifier
2017-07-28 15:35:54 +02:00
6d1a991d9a WIP: Basic Lattice modifier
Still problems loading a previous file and other issues
2017-07-27 21:07:32 +02:00
fd4a629b4d Move LatticeDeformData struct definition to header
This struct is used outside of the lattice module now and the definition now can be shared in other modules.
2017-07-27 12:13:46 +02:00
02543bf7a1 Fix segment fault when free GHash
If the GHash is null, don't free again
2017-07-26 16:51:56 +02:00
c34bcd5edf Fix rotate 3D view segment fault
The context was wrong for new modes
2017-07-26 16:28:15 +02:00
15919f4039 WIP: more work in cache 2017-07-26 16:11:42 +02:00
6016d3b539 Cleanup: Remove redundant parameter 2017-07-26 14:03:50 +02:00
3f26e92d0f Remove CACHE_REUSE
If we use a different area by object, the cache never can be reused
2017-07-26 13:55:13 +02:00
d78bf6ef99 Fix memory leak 2017-07-26 13:48:36 +02:00
53cb7be722 WIP: Basic new batch_cache by object
Need more work and review memory leaks
2017-07-26 13:29:56 +02:00
76ffc76b40 WIP: Add hash for derived frame
This is the first step to allow multi-user datablock
2017-07-26 12:02:29 +02:00
92e343258a Merge branch 'blender2.8' into greasepencil-object 2017-07-26 10:09:01 +02:00
553373be96 Fix error when rotate using 3D cursor
The rotation of the strokes must use cursor in local space.
2017-07-25 20:52:16 +02:00
030990fe45 Merge branch 'blender2.8' into greasepencil-object 2017-07-25 15:47:26 +02:00
e0bd578742 Fix error when make single user 2017-07-25 12:51:20 +02:00
da56864439 Fix memory leak 2017-07-25 12:01:15 +02:00
6622673b3f Fix error with user number
When apply array modifier the gpd is not reused, so the us must remain equal.
2017-07-25 11:14:18 +02:00
02800b747d Fix error when apply Array with more modifiers
When apply an array modiifer is necessary to create new GP datablocks and remove in the duplicate object the array modifier to avoid double effect.
2017-07-25 10:21:26 +02:00
7f444d8b34 Fix error if apply modifier with multi-user GP
The modifier cannot be applied if the GP datablock is used for more than 1 objects.
2017-07-25 10:04:49 +02:00
739960a0e1 Set all default HSV range to 1 2017-07-24 20:24:49 +02:00
1566beb4b2 Fix error when apply color related modifiers
The effect was duplicated for each stroke and the result was wrong
2017-07-24 16:46:03 +02:00
63971f4c63 New Hue/Saturation modifier 2017-07-24 13:49:19 +02:00
6bc0375d22 Opacity modifer affect strength
If the factor is > 1, the strength of the stroke is affected by modifier
2017-07-24 12:42:10 +02:00
b7d4ad7d7f Clamp to valid range 2017-07-24 12:15:17 +02:00
ff39754a95 Remove object control for Opacity
There was several problems to use an object to control opacity and how change fill opacity, so it's better to remove this and find an alternative (maybe using  shaders)
2017-07-24 11:27:36 +02:00
b9e90d53f5 Cleanup: Remove double initialization
The minmax function does this initialization.
2017-07-24 10:47:45 +02:00
f620f73b5f Filter index pass only if > 0 in modifiers
If the pass index is equal to 0, the filter is disabled. This is a handy way of reset the filter without adding new flags.
2017-07-24 10:46:24 +02:00
040d763042 WIP: Basic implementation of Opacity modifier
Still pending the target functionality.
2017-07-24 10:44:38 +02:00
3f64a0df1d Add Set Origin to Geometry
New option to set origin at the center of the strokes of the current frame.
2017-07-23 20:09:54 +02:00
54c4712888 Cleanup: Remove unused variables 2017-07-23 20:08:50 +02:00
509d1328ef Fix error duplicating object with modiifers 2017-07-23 17:50:26 +02:00
0dec2be679 More work on create objects when apply array modifier 2017-07-23 17:22:33 +02:00
f7597d1be7 Cleanup: Use standard function 2017-07-23 16:43:00 +02:00
137fdb1a66 Move define to share 2017-07-23 16:25:11 +02:00
be9d97bbe3 Cleanup code 2017-07-23 16:20:39 +02:00
03c2b29a12 Array modifier is not visible in edit mode 2017-07-23 12:40:24 +02:00
a6fd5d7c4c Fix context parameter to eval_context
The context is eval_context not bContext
2017-07-23 12:34:35 +02:00
4bba60dedc Fix error to apply modifier in wrong modes
The modifier only can be applied in object mode
2017-07-23 12:33:45 +02:00
5e1259f7da Cleanup compiler warning 2017-07-23 12:12:54 +02:00
7d25a2eb34 Merge branch 'blender2.8' into greasepencil-object 2017-07-23 11:48:09 +02:00
27b1129d57 Rename of modifiers completed
Now the old Dupli modifier is named Array and Array named Dupli
2017-07-23 11:19:30 +02:00
20e94d7f92 Before to swap array and dupli names
It's more logic to name Array the modifier called Dupli, so I'm going to swap the names
2017-07-23 10:14:20 +02:00
b2a829ea78 Cleanup: Fix typo error 2017-07-22 12:05:20 +02:00
b2d5a0b722 WIP: New Duplication modifier
This modifer works similar to use dupliobjects for the current GP object.

Still pending apply button.
2017-07-22 11:48:39 +02:00
63066150b3 Tint modifier: Create colors in new palette 2017-07-21 20:57:33 +02:00
4e50a1eb3a Cleanup: Change calculation using only matrix 2017-07-21 20:40:39 +02:00
3626088926 Cleanup: Remove some uses of G.main 2017-07-21 17:24:47 +02:00
fb299a9eed Merge branch 'blender2.8' into greasepencil-object 2017-07-21 16:40:50 +02:00
f2fe6d28f6 Fix parameter list after 2.8 merge 2017-07-21 16:34:31 +02:00
67c2eab6a1 Merge branch 'blender2.8' into greasepencil-object 2017-07-21 16:10:48 +02:00
6c05a3a99a Set cache as dirty after apply modifier 2017-07-21 15:52:33 +02:00
2b1056183c WIP: More work on modifiers
Reorganize the system to create new strokes in array modifier
2017-07-21 09:29:04 +02:00
188b1c9b29 Basic support for rotation/scale in array modifier 2017-07-20 17:26:27 +02:00
87ff38cd9e More work on modifiers
Complete rework, now the modifier data is saved in a cache and is not recalculated for each redrawing. The previous version had the problem the array strokes suffered of effect acumulation.

The array modifier is pending to add the rotation and scale parameters. Now only appear in UI panel but don't work.
2017-07-20 17:21:11 +02:00
188412246c New field to save derived data from modifiers 2017-07-20 12:03:15 +02:00
1b40b4ba30 Prepare data for new options in array modifier 2017-07-20 11:16:19 +02:00
20b1ca6cdf Fix problem when tint array strokes
The new strokes had different color because the tint was done two times
2017-07-19 16:57:40 +02:00
23c42898a1 Add inverse filter options for modifiers 2017-07-19 14:03:57 +02:00
fdd24be794 Merge branch 'blender2.8' into greasepencil-object 2017-07-19 13:18:08 +02:00
9cc10c5154 Enbale Random by default in Noise modifier 2017-07-19 13:15:21 +02:00
cb312e3a3e WIP: Initial implementation of array modifier 2017-07-19 12:23:34 +02:00
334b5e8707 Fix missing definition 2017-07-18 17:18:42 +02:00
148898479b Fix T52111: Buffer stroke obscured by buffer fill 2017-07-18 17:08:08 +02:00
92d7c9b71e More work on Noise modifier 2017-07-18 16:56:05 +02:00
6f55b2c2a5 Verify scene pointer before moving frame 2017-07-18 14:25:26 +02:00
1db1e9f816 Noise modifier move full stroke
Now it's possible to move points or full stroke
2017-07-18 14:16:53 +02:00
abfa37f715 Add step parameter to Noise modifier
Now it is possible to define a number of frames between recalculate random noise. This allows to reduce the speed of change because before, sometimes  was too fast.
2017-07-18 12:06:54 +02:00
e2a26260b5 Support several palettes in Tint modifier
When create a new set of color, support to have several colors with the same name in different palettes
2017-07-18 10:50:50 +02:00
05058ab443 Fix T52100: Buffer stroke is not visible if paint over fill
If paint  a stroke over a fill area, the drawing stroke was not visible while drawing and only when finish the stroke.

The drawing pass was mixing the with mix pass and now reuse the stroke mix. This solve the problem and increase the drawing speed because only one mix pass is necessary
2017-07-18 10:20:26 +02:00
8abb684546 Change Name of new modifiers
If use the prefix GP_, the name is not visible if the panel is narrow
2017-07-18 09:45:08 +02:00
0b2c081943 New Tint modifier
This modifier allows to tint with a color all strokes and create a new set of colors when apply the modifier
2017-07-17 20:40:42 +02:00
792ed2babc Cleanup: Fix comment 2017-07-17 16:04:10 +02:00
6ece5080cd Merge branch 'blender2.8' into greasepencil-object 2017-07-17 13:45:02 +02:00
9b293649ed Fix line removed by error
The cache must be checked
2017-07-17 13:38:51 +02:00
0c034ade43 Fix problem when check spacetype 2017-07-17 13:20:44 +02:00
2245dc80da Fix error with fill and modifiers
The modifiers must be evaluated before to affect stroke and fill
2017-07-17 13:08:15 +02:00
2f22054670 Apply smooth to subdivision modifier 2017-07-17 12:26:56 +02:00
c569634b72 WIP: More work on modifiers
Add new modifier for thickness and reorganize code
2017-07-17 12:05:44 +02:00
cd27283fde Fix modifier update when change mode 2017-07-16 18:54:06 +02:00
b424845bb5 New subdivide stroke modifier
This modifier add intermediary points to stroke to get more control points for other modifiers as Noise.

This is not a subsurf modifier. This will be a different one.
2017-07-16 17:40:29 +02:00
3c6f2af764 Refresh cache when modifiers are changed
The draw cache must be set as dirty after move up/down or remove modifier
2017-07-16 17:27:09 +02:00
4ce5b85fe1 Cleanup: Replace by standard function 2017-07-16 15:48:29 +02:00
171f6b9ab0 Cleanup: Remove unused define 2017-07-16 15:32:54 +02:00
da957a2678 More changes to noise modifier
Apply more changes and add support functions for apply, remove, etc.
2017-07-16 13:24:55 +02:00
3474115e73 WIP: First modifier for grease pencil 2017-07-15 19:46:06 +02:00
677aa38b0f Proof of concept to duplicate stroke 2017-07-15 11:29:13 +02:00
348c240924 Merge branch 'blender2.8' into greasepencil-object 2017-07-14 20:41:54 +02:00
be708092ac Merge branch 'blender2.8' into greasepencil-object 2017-07-13 18:06:38 +02:00
f1088f32f5 Merge branch 'blender2.8' into greasepencil-object 2017-07-13 18:03:31 +02:00
5e31d6ca40 Merge branch 'blender2.8' into greasepencil-object 2017-07-13 17:25:51 +02:00
01acf2e3cf Merge branch 'blender2.8' into greasepencil-object 2017-07-13 16:46:39 +02:00
b9c2800249 Merge branch 'blender2.8' into greasepencil-object 2017-07-13 11:34:52 +02:00
5b2b5d177e Remember last Palette used
When select a GP Object, the last palette used for drawing is selected. The palette only is selected if one stroke was drawn with this palette.
2017-07-13 11:33:12 +02:00
f0a7567154 Cleanup: Replace by generic function
Call generic default creation code
2017-07-13 10:59:37 +02:00
ef71351961 UI: Rename panel caption 2017-07-12 20:35:14 +02:00
a1f00219ce UI: Move frame lock and opacity to layer panel 2017-07-12 20:33:57 +02:00
125e2092ca Create default brushes and colors
Create a set of colors and drawing brushes when add a new GP object.
2017-07-12 20:31:03 +02:00
119ee390e7 UI: New Options panel by layer 2017-07-12 16:53:52 +02:00
b611d03952 UI: New parent layer panel
Move these options to new panel and reorganize layer options
2017-07-12 16:19:42 +02:00
34822e1c72 UI: New panel for onion skinning 2017-07-12 16:05:10 +02:00
227ae3021f Fix error if use several GP objects
The flag was set wrong
2017-07-12 14:17:57 +02:00
541e81ac96 Fix color distorsion while drawing
Need to use the mix_pass in order to get the same color while drawing. If the pass is not mixed with the same pass than strokes, there is a change in the color between drawing stroke and final stroke due the process to mix.

This is slower, but needed and while drawing the time delay is negligible
2017-07-12 14:12:14 +02:00
32a244caa1 Merge branch 'blender2.8' into greasepencil-object 2017-07-12 13:04:42 +02:00
6b0814af9f UI: Reorganize Palette Colors panels (WIP)
Create new panels for stroke and fill parameters
2017-07-12 13:02:56 +02:00
535ae9e1b1 Rename volumetric stroke type 2017-07-12 11:42:03 +02:00
9b1b46951c UI: Change ruler panel header
Now the panel is empty in some modes because we will add primitives in the future, but we want to keep the panel as reference.
2017-07-11 17:16:01 +02:00
738fd20839 UI: Move show direction to data panel 2017-07-11 17:03:18 +02:00
f3384e79da Fix error when undo
The drawing cache must set to dirty to avoid segment fault
2017-07-11 16:46:59 +02:00
f82f9738c5 UI: Keep tab order consistency
The tabs must be on the same order when change mode
2017-07-11 15:56:02 +02:00
4a3b7b12b5 Merge branch 'blender2.8' into greasepencil-object 2017-07-11 13:47:37 +02:00
13c60e2a52 Change Cursor management
Change how the cursor is displayed on screen and mimic standard look and feel for grease pencil
2017-07-11 13:45:33 +02:00
573074eb22 UI: move convert to geometry and ruler
Move the convert to geometry to new panel and hide rler if enable gp modes
2017-07-09 20:26:09 +02:00
ba026ff848 UI: Hide Relations and Physics panel
Hide these panel if enter in special GP modes
2017-07-09 17:36:41 +02:00
fc2e1c3a5e Fix error drawing polyline
Drawing polyline to old files produced segment fault because the cache was not marked as dirty.
2017-07-09 16:23:36 +02:00
628946ac66 Use cache_dirty instead of cache_free 2017-07-09 15:51:27 +02:00
7f29c49f89 Fix error setting origin
The calculation was not right if the object had rotations
2017-07-09 13:33:11 +02:00
adb8104c7d Finish polyline session releasing Shift
For artist is better cancel polyline drawing session releasing the shift key instead to press Esc or Enter.

Now, to draw polylines keep shift pressed and finish releasing this key.
2017-07-09 11:41:37 +02:00
24ea750659 WIP: Boundbox for GP object
This is the first implementation but cannot test because Eevee not support bounding box yet.
2017-07-08 21:22:12 +02:00
5636c5e486 UI: Enable set origin for GPENCIL type 2017-07-08 19:24:41 +02:00
a122bb8f1c Merge branch 'blender2.8' into greasepencil-object 2017-07-08 18:58:27 +02:00
612dc1008d Cleanup: remove unused line 2017-07-08 18:17:52 +02:00
2d85ed0547 Add warning if mode is not supported
Warning user if try to use a non supported set origin option
2017-07-08 18:00:05 +02:00
a21c36a272 Remove custom set origin operator
This change has been integrated in standard set origin operator
2017-07-08 17:38:56 +02:00
79f55f9544 Include set origin in standard origin operator
Instead to use a dedicated operator use standard
2017-07-08 17:33:37 +02:00
679d46ff02 Add menu to set origin operator
In order to keep the UI consistency I have added a menu.

This menu has only one option, but the UI panel looks more consistent
2017-07-08 17:10:06 +02:00
dc2e2704ad New Set Origin operator
This operator allows to change the pivot point origin for strokes.

Only valid in Edit Mode

Keymap: Ctrl+Alt+Shift+C
2017-07-08 16:24:07 +02:00
41b1687bb9 Merge branch 'blender2.8' into greasepencil-object 2017-07-07 17:00:40 +02:00
2c3ba5ef64 Cleanup: Rename icon identifier 2017-07-07 16:59:41 +02:00
80df0932bc Use new object origin icon 2017-07-07 16:52:31 +02:00
e427056b2c New Object Origin Icon
This icon is used to define stroke placement

Designed by Matias Mendiola
2017-07-07 16:52:06 +02:00
4486e89de7 Add stroke placement 3D Cursor
Add the option for 3D cursor in list of placement options and not as separated option to make UI more consistent.
2017-07-07 13:35:15 +02:00
31732af410 UI: reorganize animation panel
Create a grease pencil animation panel and separate again interpolate panel.

The default animation panel is hidden when GP Object is selected and enable some GP mode
2017-07-07 12:37:24 +02:00
f6079d5019 Merge branch 'blender2.8' into greasepencil-object 2017-07-06 12:04:00 +02:00
01738f7ad9 Change range limit for line_width 2017-07-06 12:01:01 +02:00
90a6621b25 Fix error loading old files
After a previous commit to relink palettes old files did not work
2017-07-05 20:44:00 +02:00
2381e70541 UI: Hide draw buttons
Remove these buttons from panel to keep  UI consistency
2017-07-05 16:20:00 +02:00
e5f5913625 Add new keymaps for straight and poly strokes
Line: Ctrl+LMB
Poly: Shift+LMB
2017-07-05 16:16:05 +02:00
95a7dfe4ca Merge branch 'blender2.8' into greasepencil-object 2017-07-04 17:42:59 +02:00
24c35bbf41 UI: Change interpolate panel header
Rename the header and add some options to make UI cleaner
2017-07-04 17:27:51 +02:00
c494f6cc8d Set GP modes from outliner
Set special gp modes if the object is selected in outliner
2017-07-04 17:19:37 +02:00
233d03934a UI: Make interpolate panel open by default 2017-07-04 16:55:34 +02:00
e4465f7f96 Increase paint brush size range 2017-07-04 16:48:40 +02:00
68bca5c640 Keymap F to change paint brush size 2017-07-04 16:43:11 +02:00
e4692002a0 Remove Stroke placement option 2017-07-04 16:01:21 +02:00
0b5d287b83 Reorganize stroke materials panel
The stroke style now has only solid or volumetric type and the texture and pattern have been moved as options shared by both styles.
2017-07-04 12:41:44 +02:00
c922172ca9 Cleanup: Remove unused variables 2017-07-03 20:27:55 +02:00
fb5f9763fa WIP: Add volumetric while drawing 2017-07-03 20:14:12 +02:00
d3c486fcc3 Cleanup: Remove unused line 2017-07-03 19:37:04 +02:00
35dccf35f1 WIP: Add geometry shader for volumetrics 2017-07-03 19:36:06 +02:00
9d2fce6479 UI: Hide stroke color if stroke style is texture 2017-07-03 09:10:46 +02:00
f9d625a1a1 UI: Move additive drawing to animation tab 2017-07-02 18:49:50 +02:00
dda3c11b4d UI: Move Insert/Delete frames to animation tab 2017-07-02 18:46:58 +02:00
4de700a8a6 UI: Move Draw on back to brush panel 2017-07-02 18:39:41 +02:00
3d7e5f2578 UI: Hide continuous drawing option in 3D view 2017-07-02 18:37:00 +02:00
a2e079918f UI: Move interpolate panel to animation 2017-07-02 18:35:05 +02:00
cbad88435c WIP: Basic stroke volumetric support
This need more work to expand volumetric features. Commit these changes to put in place all the pieces of the system.

We keep as is today while we decide the final design.
2017-07-02 18:10:08 +02:00
065013a957 Fix error when play animation
If the same datablock was used, there was a crash. The frame change must be evaluated before other checks.
2017-07-02 16:49:27 +02:00
2317f8c14a New stroke styles: Texture and Pattern 2017-07-01 17:06:46 +02:00
927694fd13 Changes in previous fix for T51942
The previous commit broken the stroke color update
2017-06-30 20:49:07 +02:00
8d4072f434 Merge branch 'blender2.8' into greasepencil-object 2017-06-30 20:14:29 +02:00
d0c17ef893 Fix T51942: Color not updated in UI panel
When update the color in the panel, the color box was not updated after release control.
2017-06-30 20:02:44 +02:00
d958084187 Merge branch 'blender2.8' into greasepencil-object 2017-06-30 15:39:06 +02:00
073ef79840 Fix T51936: Show draw strokes since first stroke
The drawing stroke must not be related to cache drawing because only one stroke is done at time.
2017-06-30 15:34:34 +02:00
1af42b70d1 Minimize Alpha stroke issue
Here we need is OIT (Order Independant Transparency) which is still an open issue in the realtime field (and also for Eevee). The best OIT method I know of is somewhat complex and not very precise (still not 1:1 with the ordered version). It involves more framebuffers and performance cost.

I may need to implement that in the draw manager in the future so that all engines can use it.

Thanks to Clement Foucault for the support provided.
2017-06-30 14:41:59 +02:00
4e17d1086a Merge branch 'blender2.8' into greasepencil-object 2017-06-29 16:44:33 +02:00
b8df9f6531 Merge branch 'blender2.8' into greasepencil-object 2017-06-28 13:15:04 +02:00
401086a012 Show edit points only for active object
The GP edit points are only visible for the active object, as defined in 2.8 for mesh editing, to keep UI consistency.

Before 2.8 version the edit points were visible for all objects sharing same datablock.
2017-06-28 13:12:38 +02:00
1ea4ca5faf Fix error when edit datablock used in several objects
When edit the datablock got segment fault.

Now a new hash is used to determine if the object was duplicated. This hash speed up drawing process too.
2017-06-28 10:40:05 +02:00
230d089a30 Cleanup: Improve debug messages 2017-06-27 17:43:21 +02:00
f0ada8377b Cleanup: Remove unused uniform 2017-06-27 16:52:51 +02:00
95c2c1c06f Initialize index fields for shgroups 2017-06-27 13:02:30 +02:00
9343e9cde3 Merge branch 'blender2.8' into greasepencil-object 2017-06-27 12:43:31 +02:00
b3693fa30e Fix error in GP modes for undo
When undo the special gp modes did not work.
2017-06-27 12:39:36 +02:00
76498ed570 Avoid load files with gp modes enabled
The new files must be loaded in Object mode and not in special grease pencil modes.
2017-06-27 12:05:17 +02:00
6fe488e849 WIP: Draw only the shading groups of the object 2017-06-26 21:23:40 +02:00
fe2b895a65 Merge branch 'blender2.8' into greasepencil-object 2017-06-26 20:43:52 +02:00
bdd32dce69 WIP: Use new DRW_draw_pass_subset
This commit is not complete yet
2017-06-26 20:23:56 +02:00
dd2372f187 Merge branch 'blender2.8' into greasepencil-object 2017-06-26 12:23:51 +02:00
c810e0b059 Merge branch 'blender2.8' into greasepencil-object 2017-06-24 12:27:05 +02:00
a0d88989b9 Cleanup: Add double cursor check inside function 2017-06-24 12:10:10 +02:00
a841490a2b Move again some passes inside loop
This will be necessary when the clear shgroups is on the loop
2017-06-24 12:02:44 +02:00
71fa7dbda9 Cleanup: Rename field 2017-06-24 11:28:07 +02:00
5e4be98317 Set texture to RGBA_16
It looks the RGBA_32 is not necessary
2017-06-23 20:31:43 +02:00
d8991b23e3 Enable point selection in sculpt mode
To use selection mask during sculpt need to use point selection operators.
2017-06-23 16:39:15 +02:00
bf30180654 Display edit point in sculpt mode
To use the sculpt mask option is necessary to see the selected points

Maybe need to include the select/unselect operators in sculpt too
2017-06-23 16:26:25 +02:00
54a3466f1c Merge branch 'blender2.8' into greasepencil-object 2017-06-23 15:56:07 +02:00
f4a4e394ff Change temp texture to DRW_TEX_RGBA_32 2017-06-23 09:30:22 +02:00
f7c57c5cd6 Fix problem with sculpt cursor
The cursor was not set when switch between object in different modes.
2017-06-23 09:22:03 +02:00
8d12ac0f31 Add DRW_STATE_DEPTH_ALWAYS to stroke pass
This option is required to use the zwrite option
2017-06-22 19:33:55 +02:00
fe6d4fd911 Merge branch 'blender2.8' into greasepencil-object 2017-06-22 19:11:15 +02:00
13ac2a49b0 WIP: First step to fix z-depth problem
Need a change in draw manager to allow writting zdepth without checking adding DRW_STATE_DEPTH_ALWAYS

Thanks to Clement Foucault for all the help fixing this bug.
2017-06-22 19:08:34 +02:00
4d0f0360a6 Cleanup: Rewrite if/else to make more compact 2017-06-22 17:13:28 +02:00
8e1bc5a4d2 Cleanup: Move edit and current pass out of loop
These passes don't need to be repited.
2017-06-22 13:16:39 +02:00
e8e714cc01 Cleanup: Remove unused function 2017-06-22 13:12:35 +02:00
90d7dcfe2f Fix drawing segment fault when hide colors
The batch cache must be set to dirty for all GP Objects and not only current one.
2017-06-22 12:55:38 +02:00
2103296faa Cleanup compiler warnings 2017-06-22 12:25:33 +02:00
71b4834adf Merge branch 'blender2.8' into greasepencil-object 2017-06-22 11:19:00 +02:00
cd813bae2b Rename functions and structs to new Gawain naming
As this branch is not the current blender2.8, these renaming was missing in grease pencil new code.
2017-06-21 21:00:07 +02:00
c0811b73b9 Fix merge error 2017-06-21 20:56:45 +02:00
7e66f8b140 Merge branch 'blender2.8' into greasepencil-object 2017-06-21 17:17:43 +02:00
2b0ad19dc3 WIP: Add a temp framebuffer to control z-depth
The stroke is rendered to temporary framebuffer and then render again using fullscreenquad to add the z-depth.

This cannot be done in one step because the strokes must keep the internal layers order without using z-depth values.

Still some problems with z-depth texture.
2017-06-21 16:53:09 +02:00
1e47f3368b Undo z-depth manipulation method
This method is not enough precise to get clean drawings, so we need to find an alternative solution.
2017-06-19 17:07:42 +02:00
8c310227d2 Cleaun: Add clamp to keep zdepth in valid range 2017-06-19 10:12:17 +02:00
bc348f274a Cleanup and move constant to defines 2017-06-19 10:09:44 +02:00
7eb1d77a3d Fix keep thicknees by object
This option must be by object, not by scene.

Cleanup some code too and rename to use better naming for variables.
2017-06-19 09:55:35 +02:00
453e6b7e74 Add mid range for zfight 2017-06-18 21:01:00 +02:00
693dfda035 WIP: adjust the shift factor with distance 2017-06-18 19:46:08 +02:00
501f22db81 Cleanup: Remove unused code 2017-06-18 18:49:56 +02:00
5fc2055c15 WIP: zfighting al most fixed.
Need a way to fix the problem of zdepth  and precision
2017-06-18 17:24:01 +02:00
c6ceb23aa9 Merge branch 'blender2.8' into greasepencil-object 2017-06-17 21:01:56 +02:00
556fe186e8 Merge branch 'blender2.8' into greasepencil-object 2017-06-17 16:42:28 +02:00
1623bdd948 Merge branch 'blender2.8' into greasepencil-object 2017-06-16 09:50:03 +02:00
c623fccfc2 Remove upper limit of stroke thickness 2017-06-16 08:32:13 +02:00
767f4f4587 Fix error in Cameraview when zoom
The problem was related to object scale
2017-06-15 20:12:14 +02:00
6fc5f241ca Fix segment fault if palette is missing
In some weird situations the palette can be removed.

We could consider to remove all strokes in this situation, but need further analysis. We keep the pointer checking as initial solution.
2017-06-15 16:57:37 +02:00
ebb8628e1a Implement a hash to relink palettes
Add a hash system when relink the colors to strokes to avoid the loop of all colors for each stroke.

Could use a hash for palettes, but as usually the number of palettes is very low, the speed up using hash doesn't worth the code complexity.
2017-06-15 16:55:57 +02:00
845c32540f New icon for Outliner and changes in Stroke Paint icon
The outliner icon for grease pencil must be gray to keep UI consistency.

Changed the stroke paint icon to make more visible.

Icon design credits go to Matias Mendiola
2017-06-15 13:10:15 +02:00
9e79b41397 Fix error with object scale and stroke thickness
With new calculation of previous commit for stroke thickness the scale of the object was not used and need to be used.

Now the scale is included and an average value is used because the axis change is not directly related to the stroke thickness.
2017-06-15 10:24:15 +02:00
7df3b33d93 Fix problem of stroke thickness when zoom
The stroke thickness was not working fine in Camera view.

The credits for this fix go to Clemnt Foucault and Luca Rood, thanks for the help!
2017-06-14 20:52:19 +02:00
9fceef3895 UI: Change icons for lock axis 2017-06-14 17:05:12 +02:00
1f42989cb9 New Stroke Paint icon
Designed by Matias Mendiola
2017-06-14 17:03:13 +02:00
5a4630c6f3 UI: Change GP Object icon
Replace the icon for a better and clean. Thanks to Matias Mendiola
2017-06-13 23:17:43 +02:00
9f88059d55 Fix compiler error
THe workspace definition was missing
2017-06-13 18:11:09 +02:00
01b929345b Move OB_GPENCIL icon to new position
The new icon used a postion used by new icons in master, so need to be moved.
2017-06-13 18:02:29 +02:00
c0bb7ba144 Merge branch 'blender2.8' into greasepencil-object 2017-06-13 17:00:26 +02:00
a2d053085b Cleaunp: Remove more unused variables 2017-06-13 16:51:56 +02:00
99c595499f Cleanup: More unused variables
Remove gpd from gp_copybuf_validate_colormap
2017-06-13 16:46:50 +02:00
c3fa0adcbe Cleanup: Remove unused variable
Remove mode for cache_dirty
2017-06-13 16:41:08 +02:00
a432511724 Mark old palettes as deprecated 2017-06-13 16:20:41 +02:00
44aad48ea0 Fix warnings for copy paste
The merge code from master used the old BGPDpalette and the code must use the new Palette
2017-06-13 16:09:36 +02:00
Dalai Felinto
8d3e2af877 Grease Pencil: Fix problems linking object with Pallete
This should at the very least use a hash system. But it could even do a
local pointer lookup. (Way) More often than not multiple strokes will
point to the same pallete color.
2017-06-13 15:58:51 +02:00
fb688a838f Cleanup: Remove duplicate definition
Added in other commit already
2017-06-13 13:36:31 +02:00
030c1d4aea Cleanup compiler warnings 2017-06-13 13:27:49 +02:00
Dalai Felinto
e534fc8a87 Silence tons of warnings 2017-06-13 12:57:56 +02:00
9d3e2d640e UI: back randomize button
This button was removed in a previous commit by error
2017-06-12 20:29:02 +02:00
546a59053e Include lock axis option to all GP sculpt brushes
Al brushes that move points use the lock
2017-06-12 20:05:32 +02:00
2d6dee880d New sculpt lock axis implementation
This solution works better and it is faster
2017-06-12 19:49:50 +02:00
20573fbdc0 Cleanup: Define camera view type for pixel size
New define to make more clear and separate the perspective and camera view modes for pixel size calculation
2017-06-12 16:56:11 +02:00
e9634349f6 Set sculpt cursor when enter in sculpt mode 2017-06-12 13:48:17 +02:00
b4ece07eef Hide VIEW option for stroke placement
This option is not logic in the new environment. Keep line for future uses
2017-06-12 12:27:11 +02:00
d1d369672b Set Xray mode to 3D space by default 2017-06-12 12:20:04 +02:00
0a76dbba5b UI: Move show points to display panel
This option is not used all the time and moving we keep layer panel cleaner
2017-06-12 12:13:22 +02:00
76a6b1a17a UI: Add missing pressure button
This button was removed in a previous commit.
2017-06-12 12:05:12 +02:00
ce09bb4330 UI: Rename Drawing Brush Thickness to Radius 2017-06-12 12:02:56 +02:00
033f1871b6 Fix error with select sculpt brush with keys
When press 3, the brush 4 was selected. Fixed the error and reorganized brushes.
2017-06-12 12:00:06 +02:00
3d186481ec Merge branch 'blender2.8' into greasepencil-object 2017-06-12 11:13:00 +02:00
bec911a9bf Fix problem with Ctrl + Tab for GP objects 2017-06-12 11:11:48 +02:00
14c252b73b Fix problem with Tab key
The Tab key must enable Edit mode and back to previous mode
2017-06-11 20:16:01 +02:00
dd27e30c01 Fix error render only when GP object is not selected
When the GP object was not selected the stroke must be drawn
2017-06-11 19:01:21 +02:00
7bd3db6f9f Change UI modes text
It is more clear to use standard nomemclature for the modes
2017-06-11 17:37:45 +02:00
6178014eaf Implement Ctrl+Tab key to swith modes
The Tab key switch between GP mode and object mode or edit if it was in object mode.

Ctrl+Tab switch between last mode
2017-06-11 17:32:28 +02:00
020d99fe92 Implement restore mode for Tab key
Now when you press Tab key the mode back to previous GP mode and not to Object mode always.
2017-06-11 17:01:11 +02:00
a653420aa9 Remove brush sensivity from UI panel 2017-06-11 16:00:52 +02:00
7bbcf05428 Change UI layers panel header text 2017-06-11 15:56:17 +02:00
33da82855a Hide panel header for datablock 2017-06-11 15:51:11 +02:00
c2c802f505 Replace UI list by icon preview for brushes 2017-06-11 15:43:29 +02:00
8a64370364 Merge branch 'blender2.8' into greasepencil-object 2017-06-11 13:36:04 +02:00
34020882c3 New enum property for drawing brushes
This property is necessary to include a icon view in the UI panel
2017-06-11 13:33:03 +02:00
a4f98bef1c New Display UI panel
Options moved to new panel to organize UI
2017-06-11 10:44:10 +02:00
ac33c2fc46 Move Grease Pencil selector to top panel
In order to keep UI consistency, the datablock must be in the top panel, not in layers
2017-06-10 20:39:07 +02:00
19deb16965 New operator and keymaps to select sculpt brushes
Now it's possible to select the sculpt brush sing a key between 1 and 9.
2017-06-10 20:02:11 +02:00
f0865ef298 Fix error in add GP object operator
The invoke callback is not necessary.
2017-06-10 19:14:41 +02:00
35bf5da436 Change UI panel registration order
This change is to keep the Tools tab on top because if the grease pencil panel are register at the end, the Tools tab change to end.
2017-06-10 16:01:47 +02:00
0e1613d303 New icons for Grease Pencil sculpt brushes
In order to keep consistency, we have added icons to GP sculpt brushes similar to object sculpt
2017-06-10 13:32:50 +02:00
b647f8653d Implement lock axis in Sculpt grab brush
This is the first implementation to lock the axis while sculpt. In some extreme angles the result is not perfect, so maybe need a review.

We keep in this way while we found a better approach, maybe using the reprojection of the point as it is done when draw new strokes could work better.
2017-06-09 13:13:38 +02:00
1f4b9356f9 Add missing UI options for sculpt and paint mode
The onion and mask buttons can be used in sculpt mode also.
2017-06-09 10:53:13 +02:00
861f0370c8 Fix only_render for GP object
For GP objects, the strokes must be drawn in all cases. When only render is enabled, only the pivot point is hidden, but not the strokes.
2017-06-08 16:38:22 +02:00
56e2f990e9 Merge branch 'blender2.8' into greasepencil-object 2017-06-08 15:47:39 +02:00
eef92d418e Remove ALT key for straight lines
There was a conflict with new Eraser keymap. Keep only CTRL.
2017-06-08 15:44:27 +02:00
2c9401b73d Eraser only available in Paint mode
During sculpt and edit this operator is not available
2017-06-08 13:42:17 +02:00
adf05b0181 Implement object change while in GP modes
Now the user can select other objects for paint or sculpt.

In edit mode is not possible in order to keep UI coherence
2017-06-08 13:39:02 +02:00
7b6c7f07d5 Fix cursor error when using eraser
The cursor did not return to paint after using eraser
2017-06-08 12:15:20 +02:00
2758319abe Hide material panel in BI render for GP Objects
When a GP object is selected, this panel must be hidden
2017-06-08 12:04:49 +02:00
9e028f5feb Hide material panel in Cycles for GP Objects
When a GP object is selected, this panel must be hidden
2017-06-08 12:04:22 +02:00
65d470291c Fix error when no object selected 2017-06-08 11:57:00 +02:00
d29ea70283 Hide material panel in Eevee for GP objects
When a GP object is selected this panel must be hidden
2017-06-08 11:49:01 +02:00
05b9a677c6 Replace Erase Keymap to LeftMouse + Alt
In order to keep consistency with Blender, the right mouse is used to select objects, so the eraser must use a different key.

This can be changed after more workflow tests
2017-06-08 11:48:29 +02:00
b0d322c603 Change how continuous drawing works in 3D view
In 3D view is not ggod for wrokflow to enable continuous mode with the new paint GP mode.
2017-06-08 11:37:27 +02:00
987b4a51ff Edit strokes panel must be expanded by default 2017-06-08 11:17:02 +02:00
399c654042 Hide transform panel in GP modes
This panel only add noise to the panel while drawing
2017-06-08 11:15:48 +02:00
d94954c19b Change assigned icons for lock axis 2017-06-08 10:59:30 +02:00
ae23f56658 WIP: More UI changes and continuous drawing
More changes in the panels and enable continuous drawing mode by
default.
2017-06-07 16:40:15 +02:00
9ed07cf461 Set sculpt cursor when enter in sculpt mode
Include some cursor reset for other modes
2017-06-07 16:35:39 +02:00
40dc9b0f04 Set the default cursor
Sometimes when restore previous cursor, the value is not the default, so it's better to set manually.
2017-06-07 16:07:05 +02:00
f7a6d72c83 WIP: More UI panel reorganization 2017-06-07 14:02:01 +02:00
63639b9ed1 Reset cursor if mode change 2017-06-07 13:53:48 +02:00
3b675b1aa3 Enbale paint window cursor when enable paint mode 2017-06-07 13:27:51 +02:00
c1bededd1c WIP: UI panels reorganization
Moved the stroke placement to bottom of the viewport instead of Tools panel.
2017-06-07 13:11:07 +02:00
99b17b64ee Merge branch 'blender2.8' into greasepencil-object 2017-06-07 12:05:33 +02:00
014325fdd2 Move PaletteColors to Materials tab
Although the grease pencil colors aren't real materials, in order to keep UI consistency, we have moved to this tab the palette control.
2017-06-07 12:01:13 +02:00
18a8aac3c9 Fix bug for filling while drawing
If the opacity was set to 0, the filling area must not be showed during drawing
2017-06-07 10:28:20 +02:00
e709239530 Change toggle Paint and Sculpt mode keymaps 2017-06-06 20:42:16 +02:00
8d13fe340b Color Palette must be visible always 2017-06-06 20:38:29 +02:00
7480b2381d New fill style using patterns
Now it is possible to use a texture to define the fill color pattern, similar to the use of noncolor textures.
2017-06-06 17:19:48 +02:00
13b283504f Create new option to keep stroke thickness
In some situations is good to be able to keep the stroke thickness when viewport zoom factor change.

This option is disabled by default.
2017-06-06 13:18:13 +02:00
69c9163baf Cleanup: Fix merge error 2017-06-06 11:57:05 +02:00
afe41ab869 Merge branch 'blender2.8' into greasepencil-object 2017-06-06 11:34:41 +02:00
79660741ae WIP: Adapt UI panels to new GP modes 2017-06-06 11:22:44 +02:00
4c216cb982 Fix problem when back from paint and sculpt modes 2017-06-06 11:22:44 +02:00
4447eff930 Change keymaps for new modes 2017-06-06 11:22:43 +02:00
941a854674 Check mode status before change 2017-06-06 11:22:43 +02:00
1a47860969 Cleanup compiler warnings 2017-06-06 11:22:43 +02:00
a57f4ca240 Define keys to switch grease pencil modes 2017-06-06 11:22:43 +02:00
dd6b008fb4 WIP: Initial implementation for paint mode
The paint mode need more work, but it start to work.
2017-06-06 11:22:43 +02:00
5db3d17c8c WM: add WM_manipulatorgrouptype_append_ptr
Needed for PyAPI registration.
2017-06-06 11:22:43 +02:00
7a02efb716 WM: de-duplicate operator append code
WM_operatortype_append(_ptr) functions had diverged.
2017-06-06 11:22:43 +02:00
9365b6ed8e PyAPI: is_staticmethod used for classmethods's too
Add note to investigate this, don't change so close to release.
2017-06-06 11:22:43 +02:00
7942057abb PyAPI: correct exception, expect 'staticmethod' 2017-06-06 11:22:42 +02:00
c5b85c9879 DwM: skip background-set objects w/ selection 2017-06-06 11:22:42 +02:00
b010a804f2 Fix alembic tests not running with debug build on windows 2017-06-06 11:22:42 +02:00
359058f4b2 Clay Engine: Improve sampling of SSAO
Replace completly random noise by Blue noisen, giving a better aspect.
Also randomize the distance in the sample direction to cover the whole distance even with 1 sample. Using another blue noise for this.
Replace spiral samples (that had tendency to align if the number of samples was near the chosen constant) with Hammersley samples that have good coverage even for low number of samples.
Use a UBO instead of Texture (a bit less latency) making things a tiny bit faster.
Move the noise data to the SceneLayerData, because each render layer can have a different sample count.
2017-06-06 11:22:42 +02:00
e4591d3576 Eevee: Modify Blue Noise. 2017-06-06 11:22:42 +02:00
a02365ae5a Eevee: Move Spherical Harmonics to a new Probe UBO.
Keep data packing tight to prevent use of padding floats
2017-06-06 11:22:42 +02:00
9e2b85e171 Cleanup: Remove unused code to set mode
This code is not used anymore in viewport with new modes
2017-06-06 11:22:42 +02:00
b56339e528 WIP: Basic structure for new object modes
Now there are 3 modes: Edit, Paint and Sculpt strokes.

These modes are only for new GP object.

Notice: Now the paint and sculpt modes can be activated but don't work.
2017-06-06 11:22:41 +02:00
9022025fca Eevee: Material code refactor.
Separate material handling inside another file.
Make use of enums to identify shader variations.
Group all 64*64 LUTs into one array texture.
Only update world probe if world changes.
2017-06-06 11:22:41 +02:00
1550fa3db6 World: Add temporary update flag. 2017-06-06 11:22:41 +02:00
da99c6aca9 Remove Edit Strokes mode for scene
This mode is not necessary because the mode is added at object level and the scene level is not available anymore.
2017-06-06 11:22:41 +02:00
e073a0aa07 Fix T51587: Blender fails to interpret a specific layer in OpenEXR multilayer file 2017-06-06 11:22:41 +02:00
nBurn
fd3d9bf9f7 PyAPI: Cleanup "Python API Overview" doc
Reword to clean up some odd grammar (mostly dangling modifiers) and
improve readability.

Differential Revision: https://developer.blender.org/D2699
2017-06-06 11:22:41 +02:00
0d749dbc77 Fix T51691: Shear cursor input scales w/ zoom
Use relative value from cursor movement.
2017-06-06 11:22:40 +02:00
060b5672ca Merge branch 'blender2.8' into greasepencil-object 2017-06-03 20:05:58 +02:00
6c0d8edbb3 Disable datablock at scene level
Now to paint in 3D view is necessary to add a GPencil object
2017-06-03 20:00:25 +02:00
743eb1df51 Set Object mode as default for new strokes 2017-06-02 18:53:22 +02:00
d8839ac928 Convert always scene GP datablock to new GPencil object 2017-06-02 17:26:08 +02:00
04974c145d Cleanup: rewrite some lines for tab key 2017-06-02 16:07:20 +02:00
ed9fb4201a Fix tab key for Edit Strokes after Workspaces merge
The tab key for enter in edit mode for GPencil objects was not working with new workspaces.

Still there is a problem with datablocks at Scene level (TBD)
2017-06-02 13:26:36 +02:00
8066729f6d Fix missing edit strokes mode after merge Workspaces
After the merge, the mode was not working because the SPACE_INFO was not included.

Some minor changes too.
2017-06-02 12:29:34 +02:00
4cf8676705 Fix merge error due VS2017 crash
During merge, VS2017 crash and abort merge for this file.
2017-06-02 10:12:09 +02:00
b628990ae8 Merge branch 'blender2.8' into greasepencil-object 2017-06-02 10:08:27 +02:00
747bd3c369 Rename identifier OB_MODE_GPENCIL
Rename to prepare for new modes
2017-06-01 20:42:25 +02:00
2ee74e94aa Fix error for ghost icon in palette
THe ghost icon was not working with new draw manager because the check was not migrated.
2017-06-01 15:46:40 +02:00
81786c91e4 Cleanup comment 2017-06-01 11:12:19 +02:00
c0c0483244 Merge branch 'blender2.8' into greasepencil-object 2017-06-01 10:42:41 +02:00
7edf993ba6 Try to use dynamic memory for shading groups
The reallocation of the memory produce weird things, so we keep allocation maximum number while we found better solution.
2017-06-01 10:35:24 +02:00
e4ef59a6a3 Fix error when drawing in an empty frame
If drawing new stroke in an empty frame, but the layer had previous frames, the cache must be set as dirty to avoid segment fault.
2017-06-01 10:20:29 +02:00
ed338ba9d0 Cleanup: Remove unused field 2017-05-31 19:18:39 +02:00
844e8fbcd0 Cleanup: Remove unused code 2017-05-31 19:16:58 +02:00
ab53b68745 Merge branch 'blender2.8' into greasepencil-object 2017-05-26 20:02:21 +02:00
02c0bd9a4c Merge branch 'blender2.8' into greasepencil-object 2017-05-24 20:14:47 +02:00
c828780ec8 Merge branch 'blender2.8' into greasepencil-object 2017-05-24 19:34:18 +02:00
2d448dfee8 Fix error when duplicate GP object
When duplicate an object, the cache must be recalculated and is not copied.
2017-05-23 20:22:49 +02:00
789b53d8bd Create a separated struct to hold shading groups 2017-05-23 17:44:41 +02:00
62ec40e4e5 Merge branch 'blender2.8' into greasepencil-object 2017-05-23 15:58:32 +02:00
b7c8f44e79 Reproject the point while drawing
If the point is not reprojected and the axis is locked, the thickness of the drawing stroke is different when the stroke is completed.

Reprojecting the stroke drawing buffer simulate the stroke thickness when it will be reprojected in 3D space and get better drawing feedback.
2017-05-22 21:03:56 +02:00
5b33f88e9a New function to reproject a point
This function will be used while drawing in draw manager gpencil engine
2017-05-22 20:30:06 +02:00
b28e35dd02 Cleanup: Rename function 2017-05-22 20:24:44 +02:00
2ab792dcfd Cleanup: extract reproject functions 2017-05-22 20:18:30 +02:00
ed24e39b54 Merge branch 'blender2.8' into greasepencil-object 2017-05-22 14:59:29 +02:00
e545a50e2a Fix segment fault when using eraser
The cache must be marked as dirty after any change operation, and the eraser change the strokes
2017-05-21 19:40:08 +02:00
cad9f2fd17 Fix UI panel problem in properties tab 2017-05-21 17:44:29 +02:00
32a8f3551f Cleanup: More unused include files, reorganization and name changes 2017-05-21 17:29:58 +02:00
7af2a45a38 Cleanup: Remove unused include files 2017-05-21 17:19:55 +02:00
ecd4984278 Merge branch 'blender2.8' into greasepencil-object 2017-05-21 16:32:28 +02:00
82e3302f44 Create a cache to drawing objects
Due speciall requirements for 2D drawing, the GP objects must be drawn after be sorteed by zdepth value.

We cannot use a simple GPU zdepth because this override the current layer/strokes order and the artists need to keep these controls as primary sorting method instead of GPU zdepth.
2017-05-21 16:28:56 +02:00
62a8d9fb12 Create a shading group by stroke
As the drawing order is very important in 2D, each stroke must use its own shading group and don't share with others or the drawing order is missing and the layer system does not work.
2017-05-21 13:20:28 +02:00
cccd0cfc12 Disable zdepth write for strokes
After some analysis, the strokes must work without affect the zdepth buffer or the layer system will not work.

The 2D artist agree that layer system must be the main zdepth order and not the GPU checking.
2017-05-21 13:10:50 +02:00
8c0f4aa557 Cleanup: Create several separated functions 2017-05-20 20:27:40 +02:00
5bd0a6d25b Enable again write depth pass for strokes only 2017-05-20 19:40:35 +02:00
f384e83475 Remove write zdepth to avoid z-fighting
The strokes don't need to write the depth buffer
2017-05-20 16:50:32 +02:00
8ea8bf4dc6 Merge branch 'blender2.8' into greasepencil-object 2017-05-20 13:04:25 +02:00
b439a9a83f Cleanup: Change some xray strings and parameter names 2017-05-20 12:58:17 +02:00
73d3f283e1 Cleanup: Remove unused code
THis code has been ported to new shaders
2017-05-20 09:43:34 +02:00
4192c8214f Implement Xray mode for strokes
Now support 3 modes: Front, 3D space and Back.

Still some problems with zfighting with layers that need to be fixed
2017-05-19 20:28:57 +02:00
382b5f9d59 Use zdepth of the position in geometry shader 2017-05-19 16:48:37 +02:00
db8e8bafe5 Merge branch 'blender2.8' into greasepencil-object 2017-05-19 16:03:01 +02:00
d2d9244230 Add more control for debug lines
Now the debug lines are only visible when code is 668
2017-05-19 15:47:19 +02:00
c96cfbb196 Merge branch 'blender2.8' into greasepencil-object 2017-05-18 20:06:37 +02:00
875bbabc1e Separate zdepth to function to use in future
Now, the value is fixed but need to be calculated.
2017-05-18 10:11:52 +02:00
4bc2308959 Cleanup unused code 2017-05-17 16:51:38 +02:00
cd9ec95130 Add debug information 2017-05-17 16:50:25 +02:00
47c1fbdc85 Add set cache to dirty when Gpencil is update in several places 2017-05-17 16:42:42 +02:00
8651d02051 Remove old opengl code 2017-05-17 13:56:28 +02:00
8451c159e9 Remove zdepth check for Drawing buffer
The drawing buffer and edit point must be always visible
2017-05-17 11:47:35 +02:00
ab9f5c23ef Enable zdepth for passes.
Actually only works for filling
2017-05-17 11:34:14 +02:00
d7fc6198ea Merge branch 'blender2.8' into greasepencil-object 2017-05-17 10:44:33 +02:00
b47e10c4c7 Remove old opengl code in shaders 2017-05-17 10:25:12 +02:00
d05e145c46 Remove check on back of camera
This check is getting weird result and create a segfault in the cache due changes in the index of the stroke depending of point of view.

Need to have a better implementation. We keep disabled while we found a better solution that not change the index of the strokes (maybe separate this check and add to cache_idx anyway)
2017-05-16 20:33:05 +02:00
d607688f96 Fix segfault error when drawing several strokes in same drawing session
The clean of the cache must be done by stroke and not at the final of the drawing session.
2017-05-16 19:25:07 +02:00
9d01058d43 Migrate scale pixel code to vertex shader 2017-05-16 18:37:41 +02:00
da11a819eb Cleanup: Rename functions 2017-05-16 13:29:43 +02:00
c6e8202816 Fix problem with UI panel for convert to GP object button 2017-05-16 13:17:13 +02:00
f1c2f8ab83 Cleanup: Add EOL at end of file 2017-05-16 12:55:39 +02:00
30fe33fba6 Merge branch 'blender2.8' into greasepencil-object 2017-05-16 12:27:20 +02:00
9fea542986 Remove separated batch cache for points
The stroke batch cache can be used for points and strokes, because both are equal and we don't need to define separated variables and use more memory.
2017-05-16 12:25:13 +02:00
239e8f3ae4 Remove flag fields to control buffer stroke creation
These fields are not necessary now.
2017-05-16 12:22:02 +02:00
48b2e05ffd Update draw manager cache when change any RNA property 2017-05-15 20:12:18 +02:00
029f8292c0 Fix merge errors 2017-05-15 11:21:15 +02:00
d91d88c810 Merge branch 'blender2.8' into greasepencil-object 2017-05-15 10:56:00 +02:00
d8a37d3e7c WIP: Add a cache system for strokes
The new cache is allocated to save the strokes and is only recalculated when there are changes.

Need more testing to be sure all situations are working fine.
2017-05-15 10:42:04 +02:00
Dalai Felinto
4195e4cc7e Fix for edit modes (sculpt, weight paint) menus not showing in header
But introduced on 2b0f02057f
2017-05-15 10:42:04 +02:00
Dalai Felinto
e58b4d228b Startup.blend: set EEVEE as the default engine
The original idea was to use Clay as the default. But since clay may not
even be in the final release, we can't afford to have a startup.blend
that doesn't deliver a reliable result regardless of build options.
2017-05-15 10:42:04 +02:00
c873fc094f Use static assert in Clay engine to ensure struct alignment 2017-05-15 10:42:04 +02:00
a38a9751bf Some minor cleanup. 2017-05-15 10:42:04 +02:00
c7c5bf8a35 Fix again DwM bbones drawing.
Stupid mistake in rB6824ee0595c9dd7d1c18864f2 fix, again reported by
@campbellbarton, thanks.
2017-05-15 10:42:03 +02:00
8ce7b1376e Mesh Center: improved center-of-mass calculation
Previous method was based on face-area, giving un-even results
based on topology and gave issues with zero area faces.

This method gives matching results for concave ngons and the same geometry triangulated.
2017-05-15 10:42:03 +02:00
Julian Eisel
fd78016ecd UI: Add template_search (version of template_ID for non-IDs)
Adds a version of template_ID that can be used for non-ID properties.
The property to search for and the collection to search in has to be
passed to it.
Like template_ID it also takes arguments to define a 'new' and 'unlink'
operator. They will be displayed as icon-only buttons then.
Also added a version that can display preview thumbnails.

Had to do some additional changes to make text-buttons support
displaying/modifying empty RNA properties.

This will be needed for workspaces, see D2451.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D2666
2017-05-15 10:42:03 +02:00
59aa170c0f Fix T51449: empty node editor continuously redrawing and using CPU. 2017-05-15 10:42:03 +02:00
2ade6b29a9 Cleanup: Rename field 2017-05-11 19:51:05 +02:00
88028209a9 Merge branch 'blender2.8' into greasepencil-object 2017-05-11 19:11:48 +02:00
9aa62c1da5 Cleanup: Extract pixel scale function 2017-05-11 11:38:06 +02:00
8da8cdff41 Merge branch 'blender2.8' into greasepencil-object 2017-05-10 16:19:31 +02:00
4d3aaaaa79 Merge branch 'blender2.8' into greasepencil-object 2017-05-09 21:56:36 +02:00
a895e8e512 Use different points for stroke ends calculation
With old method the end of the stroke sometimes looked weird
2017-05-09 21:54:05 +02:00
495f1d7a6d Increase thickness limit range 2017-05-09 15:04:52 +02:00
319362dfbe Remove static matrix definition 2017-05-09 13:02:16 +02:00
16b24358fa Fix UI panel error 2017-05-09 12:47:26 +02:00
6d640fe48c Cleanup: Remove more unused vars 2017-05-09 11:08:16 +02:00
3a3a89704c Cleanup: Remove unused variables 2017-05-08 21:05:37 +02:00
a28bbb3fdb Merge branch 'blender2.8' into greasepencil-object 2017-05-08 20:45:13 +02:00
0925574c2c Add clamp support for textures
The texture is clamp using clamp of the UVs, because if we clamp the texture using GPU_texture_wrap_mode, any place where this texture is used would be affected.
2017-05-08 20:41:16 +02:00
7c4f6e8eae Fix missing textures when reload
The texture is not saved in texturelist and is passed directly to shader
2017-05-08 20:41:16 +02:00
Dalai Felinto
0d7fd2a08f More warnings cleanup 2017-05-08 14:55:22 +02:00
Dalai Felinto
cba86fbd77 Fixing gpencil screen drawing after warning cleanup
I find strange that this needs to be static, and can see this being an issue
for simultaneous drawing in the future. That said, better leave it
working as before.
2017-05-08 14:54:35 +02:00
Dalai Felinto
e93279dc06 Fix blenderplayer build 2017-05-08 14:46:38 +02:00
Dalai Felinto
7ec7f324a3 Fix build warnings
* gcc complain if you have a "main" variable
* Missing header include in gpencil_draw.w
* A few shadowed variables (we should avoid common names in (#define) macros)
* Clear ambiguity in (!flag & VALUE) -> ((flag & VALUE) == 0)
2017-05-08 14:37:09 +02:00
3135507683 Cleaunp code 2017-05-08 12:57:37 +02:00
8a74671466 Fix memory leak and access violation
The builtin shaders are free in blender close, so the engine must not free them. The memory leak was relatred to recreate the shaders again and again, so the free only use the last copy.
2017-05-08 12:53:36 +02:00
7b8b23d1ef Merge branch 'blender2.8' into greasepencil-object 2017-05-08 12:03:47 +02:00
525b869ba6 Some missing free memory for shaders 2017-05-06 20:27:17 +02:00
501da3a717 Merge branch 'blender2.8' into greasepencil-object 2017-05-06 18:34:56 +02:00
c468922eae Merge branch 'blender2.8' into greasepencil-object 2017-05-05 20:15:30 +02:00
5d8ef4ecba Check zdepth to avoid strokes in back of camera
Do not draw if the stroke ison  back of the point of view.
2017-05-05 16:29:33 +02:00
561668d590 Cleanup: Remove unused variables 2017-05-05 13:20:05 +02:00
7bfc1b7dbd Merge branch 'blender2.8' into greasepencil-object 2017-05-05 12:15:24 +02:00
291f49b0b2 Merge branch 'blender2.8' into greasepencil-object 2017-05-04 20:23:02 +02:00
71366b9f2a Cleanup: make code more compact 2017-05-03 16:45:48 +02:00
6ad29aaeec Increase thickness limit parameter 2017-05-03 16:41:33 +02:00
f5f93bc576 WIP: new method to calculate scale of the stroke thickness
The previous scale method was not valid because only was affected by viewport, but not by GP object or Stroke location. Now, the pixel size is calculated depending of zdepth and used to scale the stroke thickness.

Maybe there are other ways to do it, but this approach works, so we keep it before finding better methods
2017-05-03 16:31:23 +02:00
f6b2b2cf38 Merge branch 'blender2.8' into greasepencil-object 2017-05-02 22:25:23 +02:00
d906c6c056 Cleanup: Move scale code to function 2017-05-02 22:09:58 +02:00
9c65a99959 WIP: Apply scale to strokes thickness 2017-05-02 20:37:35 +02:00
ded0f9604e Merge branch 'blender2.8' into greasepencil-object 2017-05-01 16:20:05 +02:00
bafd64cbd9 Draw solid area while drawing for non solid colors
For these styles, the fill is simulated with a solid color that will be replaced when the stroke is completed
2017-04-27 19:04:03 +02:00
1632446deb Rename files to align with naming conventions for drawing engines 2017-04-27 12:29:52 +02:00
f49c960ce6 Merge branch 'blender2.8' into greasepencil-object 2017-04-27 11:45:19 +02:00
c5faa0b8eb Draw scene datablock using draw manager
The scene is drawn in the populate callback, and a flag is added to do it only once per drawing cycle.
2017-04-27 11:36:00 +02:00
28edc3f46f Remove duplicate character on previous commit 2017-04-25 23:10:36 +02:00
d80b3430a0 Cleanup: remove evil context for toolsettings 2017-04-25 23:09:44 +02:00
b568227c6a Cleanup: create function with all drawing steps
This separate the drawing function in order to prepare for drawing scene datablock
2017-04-25 23:07:28 +02:00
8cd8be2929 Reduce the use of context functions and use DRWContextState members 2017-04-25 23:00:27 +02:00
28b7848069 Adapt code to new context methods 2017-04-25 21:21:58 +02:00
546b73334f Merge branch 'blender2.8' into greasepencil-object 2017-04-25 20:49:16 +02:00
0367e13089 Merge branch 'blender2.8' into greasepencil-object 2017-04-24 22:16:07 +02:00
c9b0113c13 Fix problem with layer drawing order
The fill and stroke must be in the same pass to keep layer drawing order
2017-04-23 18:32:44 +02:00
2209f6e23a Add functions to draw strokes with one point only 2017-04-23 11:24:23 +02:00
c658e4ce1b WIP: Basic texture filling support
Pending to add more options
2017-04-22 20:13:34 +02:00
1397ff2a32 Fix problems after merge 2017-04-22 19:04:20 +02:00
f29c828b6d Cleanup: Remove unused shader definition 2017-04-22 19:03:53 +02:00
2165c0ce8f Merge branch 'blender2.8' into greasepencil-object 2017-04-22 18:28:42 +02:00
886d213a14 Draw buffer if stroke shaders are not loaded yet
This fix the problem for the first stroke in the frame
2017-04-22 18:18:19 +02:00
b2c97c978c Cleanup: Replace duplicate lines by helper function 2017-04-22 18:15:46 +02:00
a2dff88140 WIP: Add current stroke buffer to drawing manager
Pending to solve the error for first stroke before frame is created
2017-04-22 12:48:07 +02:00
637ce11895 Merge branch 'blender2.8' into greasepencil-object 2017-04-19 10:50:20 +02:00
dbf89fdd7a Merge branch 'blender2.8' into greasepencil-object 2017-04-18 19:22:00 +02:00
db97503540 Merge branch 'blender2.8' into greasepencil-object 2017-04-16 15:56:06 +02:00
b2c28127e2 Fix some errors in onion skins 2017-04-15 15:14:24 +02:00
834730e123 Separate in different passes 2017-04-14 19:47:27 +02:00
5049726be2 Prepare shaders for animation onion skin data 2017-04-14 19:07:32 +02:00
f9d0b63960 Reorganize strokes drawing code 2017-04-14 16:16:49 +02:00
780d62e774 Save parent matrix in bGPDlayer
It's faster a more efficient to save this drawing matrix by layer instead to allocate memory on the fly.
2017-04-14 12:54:34 +02:00
6008e08187 Merge branch 'blender2.8' into greasepencil-object 2017-04-14 12:15:54 +02:00
3dd7267d5a Remove duplicate function
Initially, the function to calculate the matrix was different, but now both are equal, so new function can be deleted.
2017-04-14 12:13:46 +02:00
371eaac9ee Merge branch 'blender2.8' into greasepencil-object 2017-04-13 19:43:17 +02:00
30a558bce5 When remove layer parent reset stroke position
With new design when a layer parent is removed, the stroke revert to original position without parenting.
2017-04-13 19:40:27 +02:00
a831b86bfe WIP: Add layer parenting
There are some memory  leaks
2017-04-13 18:32:53 +02:00
e3cefe5ed0 Add TODO for xray functionality 2017-04-13 17:52:06 +02:00
41afab8258 Cleanup: Use macro to free shaders 2017-04-13 15:31:08 +02:00
1348caa1ab Merge branch 'blender2.8' into greasepencil-object 2017-04-13 12:29:26 +02:00
4388bbf9d6 Remove inverse matrix in drawing
With new shaders, it is better to use a object global matrix and do not calculate for each point the position.
2017-04-13 12:20:34 +02:00
c810fdd5df WIP: Add basic editing points to strokes 2017-04-13 12:08:50 +02:00
3f00d9b8b8 Add new data_size new parameter and avoid error with null gp 2017-04-12 20:15:34 +02:00
c50bbd3ac4 Merge branch 'blender2.8' into greasepencil-object 2017-04-12 19:49:28 +02:00
80acd72bab Cleanup: Remove unused include and options 2017-04-12 12:52:06 +02:00
a6e89c5151 Fix problem with fill_style
The different memory size of the variable corrupted mix_factor
2017-04-12 12:36:45 +02:00
03df48a28a WIP: add basic support for stroke filling using draw_manager 2017-04-12 12:11:34 +02:00
16e9cf2bb3 Merge branch 'blender2.8' into greasepencil-object 2017-04-12 10:14:18 +02:00
3800421d6b Fix merge error
Due error during mergetool command, the merge was wrong in previous commit.
2017-04-11 21:33:32 +02:00
980205b539 Merge branch 'blender2.8' into greasepencil-object 2017-04-11 20:03:43 +02:00
14057b670d WIP: Add basic stroke drawing using new draw manager
The position is not correct and fill is still missing
2017-04-11 19:43:53 +02:00
6eecbca309 Disable again drawing
The functions aren't ready yet
2017-04-11 11:49:02 +02:00
8500772d77 Check layer and frame before drawing 2017-04-11 11:34:31 +02:00
a4afeeadea Add volumetric shader 2017-04-11 11:23:51 +02:00
33e88a51b6 Call gpencil engine from draw_manager 2017-04-10 21:59:27 +02:00
fb1559043a Create storage and small fixes 2017-04-10 21:59:09 +02:00
33078609df Merge branch 'blender2.8' into greasepencil-object 2017-04-10 19:36:45 +02:00
9219dd9137 Register gpencil engine in draw manager 2017-04-10 19:22:06 +02:00
935b954685 Fix typo error
When build shaders the linker fails due an error in glsl datatoc name
2017-04-10 19:21:41 +02:00
a1a7e3a10c Only draw strokes if active object is grease pencil 2017-04-10 13:34:40 +02:00
870568a0ef Replace GL_FLOAT 2017-04-10 13:33:09 +02:00
fca84238f6 Merge branch 'blender2.8' into greasepencil-object 2017-04-10 11:24:34 +02:00
ffd0c3e42a Replace VertexFormat_add_attrib types to new values 2017-04-09 18:20:18 +02:00
524abadae7 Merge branch 'blender2.8' into greasepencil-object 2017-04-09 16:56:52 +02:00
ef18c6080b First steps to create new drawing mode for gpencil
Created basic structure of the drawing mode, but pending of adding all functionality and link to draw manager.
2017-04-09 16:52:36 +02:00
100f5052d4 Change function name after rename of Gawain function 2017-04-06 16:36:32 +02:00
d14258fd3f Merge branch 'blender2.8' into greasepencil-object 2017-04-06 16:01:39 +02:00
0cc77b5492 Free new symbol memory
I forget include the memory free in previous commit
2017-04-05 19:12:11 +02:00
0d668cdf79 Merge branch 'blender2.8' into greasepencil-object 2017-04-05 17:39:22 +02:00
277d0891ff Add new draw manager symbol for new ob_gpencil object type 2017-04-05 16:50:12 +02:00
9f16b6606e Include class registration for scene GP panel
After the last changes in the classes registration, need add the class to the the list.
2017-04-04 13:27:34 +02:00
a29c0a5f81 Include ModelViewProjection matrix to use in the future
This will be used to calculate the stroke thickness
2017-04-04 12:44:59 +02:00
bf4c804309 Cleanup code 2017-04-01 11:35:18 +02:00
3a0c2a7555 Remove unused ARegion parameter
This parameter was added for new shaders, but finally is not used.
2017-04-01 11:27:59 +02:00
61fe9afd29 Remove scale factor for thickness
With the new draw manager, calculate the scale in the drawing is not a solution because the batch drawing need to include the scale calculation in the shader.

TODO: Add scale calculation to shader itself.
2017-04-01 11:16:29 +02:00
77f4152124 Move initialization code to new versioning file 2017-04-01 11:13:03 +02:00
c642a697e1 Merge branch 'blender2.8' into gpencil_2.8 2017-04-01 10:42:02 +02:00
e329f01c94 Cleanup: Remove variables for cyclic and use pointers 2017-03-31 12:33:37 +02:00
de2f450347 Cleanup: Reduce variable declaration 2017-03-31 12:26:41 +02:00
d97a79cfed Cleanup: Make code more compact 2017-03-31 12:19:14 +02:00
50f6683fc8 Cleanup: Remove extra space lines 2017-03-31 12:16:18 +02:00
9891e42411 Merge branch 'blender2.8' into gpencil_2.8 2017-03-31 11:37:40 +02:00
60fca1783c Add support for cyclic stroke 2017-03-30 17:47:29 +02:00
6886e79303 Cleanup: Rename screen var and change culling factor 2017-03-30 17:47:15 +02:00
f0ea3736df Add stroke culling to avoid weird lines 2017-03-30 17:00:54 +02:00
e987e81dd4 Change stroke scale 2017-03-30 17:00:27 +02:00
8ead0c13aa Merge branch 'blender2.8' into gpencil_2.8 2017-03-30 16:20:59 +02:00
e82b18dd61 Merge branch 'blender2.8' into gpencil_2.8 2017-03-29 16:58:23 +02:00
eecc29ec67 Add offset parameters 2017-03-29 13:30:23 +02:00
70dc128de5 Replace windows size by parameters 2017-03-29 11:16:29 +02:00
0aa9cf75ed Use RegionView3D matrix instead of general Opengl matrix 2017-03-29 10:56:57 +02:00
d15e3aaa62 Shader almost working 2017-03-28 20:29:50 +02:00
4bb7f4825b Merge branch 'blender2.8' into gpencil_2.8 2017-03-28 13:07:46 +02:00
a352c887e1 Basic geometry for strokes working
Pending to remove rotation of the matrix
2017-03-28 12:50:21 +02:00
c85c3ffa67 Remove culling 2017-03-28 12:17:56 +02:00
06577d60c0 Use Opengl constant 2017-03-28 11:29:05 +02:00
7875ab1b80 Merge branch 'blender2.8' into gpencil_2.8 2017-03-28 10:24:17 +02:00
c20e292121 Change primitive types and cleanup code 2017-03-27 16:50:09 +02:00
fc2a85bbe7 Add new shaders for strokes and prepare parameters.
Note: The shader is not used yet.
2017-03-25 18:35:48 +01:00
ec775eb02d Merge branch 'blender2.8' into gpencil_2.8 2017-03-25 10:57:36 +01:00
fce04156a3 Merge branch 'blender2.8' into gpencil_2.8 2017-03-24 11:19:41 +01:00
e6ce57af84 Adapt python modules to new registration method 2017-03-23 18:55:23 +01:00
808294212e Merge branch 'blender2.8' into gpencil_2.8 2017-03-23 16:21:59 +01:00
bbe6c25c39 Merge branch 'blender2.8' into gpencil_2.8 2017-03-21 18:43:31 +01:00
4b5ce6b0c5 Merge branch 'blender2.8' into gpencil_2.8 2017-03-18 15:27:59 +01:00
b2b0de5d89 Merge branch 'blender2.8' into gpencil_2.8 2017-03-15 18:23:48 +01:00
a556bf6f64 Merge branch 'blender2.8' into gpencil_2.8 2017-03-13 13:15:49 +01:00
fc0e5d56b8 New draw at last stroke location
This option at layer level allows to draw the new strokes using as origin the last layer stroke location. This is very useful in some drawings with layers at different zdepths.
2017-03-13 12:30:06 +01:00
82b387cc47 Merge branch 'blender2.8' into gpencil_2.8 2017-03-11 18:34:13 +01:00
352e62c9ef Fix identation error 2017-03-10 17:53:12 +01:00
c067661b58 Merge branch 'blender2.8' into gpencil_2.8 2017-03-10 17:13:35 +01:00
411021d320 New operator to convert scene gp datablock to gp object 2017-03-10 17:09:09 +01:00
9eaca59968 Improve poll method for Layers UI panel 2017-03-10 17:08:12 +01:00
7b048beb5b Update properties UI panel when change 2017-03-10 17:06:28 +01:00
51395e01c3 Merge branch 'blender2.8' into gpencil_2.8 2017-03-10 11:10:13 +01:00
8bfd2a83ff Draw strokes using sorting by zdepth
Now this implemented in legacy code. When final draw will be ready, this drawing must be moved.
2017-03-10 10:45:38 +01:00
754c7792c8 Merge branch 'blender2.8' into gpencil_2.8 2017-03-09 12:36:00 +01:00
e50d19592f Merge branch 'blender2.8' into gpencil_2.8 2017-03-09 12:07:47 +01:00
8c7ca30f83 Cleanup: make function static 2017-03-09 11:08:52 +01:00
d302de0f87 Avoid error in data panel if object is not GPencil 2017-03-08 20:26:06 +01:00
e1db32d95d Cleanup: Use correct function to multiply matrix rotation only 2017-03-08 16:39:51 +01:00
5cf91943bf Merge branch 'blender2.8' into gpencil_2.8 2017-03-08 15:41:54 +01:00
9be5a7db06 Change text for Cursor mode when using GP objects 2017-03-08 13:30:58 +01:00
aad28de5f9 Reproject stroke to axis using object location and rotation 2017-03-08 12:59:13 +01:00
c032946d9e Add new property to set origin as object location or 3d cursor 2017-03-08 12:03:49 +01:00
c0aec751ba Cleanup style 2017-03-08 11:01:13 +01:00
f02ba9ef46 Change symbol of GP object in viewport to make different of Empty 2017-03-08 10:45:51 +01:00
86b0d41122 Duplicate GP datablock for OB_GPENCIL objects 2017-03-07 11:41:08 +01:00
b541ff0ed3 Do not copy old palettes when duplicate GP data 2017-03-07 11:28:47 +01:00
43dcdcab8b Change default OB_GPENCIL size
Maybe, this could be a userprefs parameter
2017-03-07 10:53:37 +01:00
c40e5e0ff4 Merge branch 'blender2.8' into gpencil_2.8 2017-03-07 10:24:20 +01:00
94c63b977d Reorganize UI panels in other space types (not 3D view) 2017-03-06 19:23:00 +01:00
31120137dd Remove GP layers from properties panel in 3D view.
All the layer info has been moved to Properties Scene or Object
2017-03-06 19:03:26 +01:00
5bee75f9f6 Change Panel to use scene in properties if context is scene 2017-03-06 18:57:35 +01:00
4e16e0e53b Change panel class name to avoid conflicts 2017-03-06 13:09:16 +01:00
475d510bb3 Add GPencil Layer to Scene UI panel 2017-03-06 12:47:32 +01:00
40df4a2ea9 Remove unused parameters in UI panel for GP Object
The type of display is not used in GPencil object.
2017-03-06 12:34:20 +01:00
08a1fdbf01 Merge branch 'blender2.8' into gpencil_2.8 2017-03-06 11:45:09 +01:00
a5d09d8667 Add a call to draw gpencil object for 2D
As the current drawing action is 2D, we need to call the function for drawing.

All previous strokes are drawn in 3D because they are converted after finish each stroke from 2d to 3d.
2017-03-04 17:42:37 +01:00
75f931d4fa Fix error in transformation when object is rotated 2017-03-04 11:56:19 +01:00
00b6810b74 Initialize rotation of GPencil Objects 2017-03-04 11:39:24 +01:00
bcbf776a88 Return datablock for GPencil 2017-03-04 11:38:37 +01:00
ed183567c0 Cleanup code doing more compact if groups 2017-03-03 22:15:41 +01:00
5719f5fe38 Create an OB_GPENCIL object automatically if not selected a previous one 2017-03-03 22:15:20 +01:00
559a4b846f Modify creation of the object to remove unused RNA and define size in header file 2017-03-03 22:14:54 +01:00
968ce60270 Remove redundant lines 2017-03-03 22:14:41 +01:00
c089f2eecd Avoid wrong activation of edit mode 2017-03-03 22:14:36 +01:00
e2f258c1da Fix error to toggle to scene. Need more work to avoid conflicts among modes. 2017-03-03 22:14:29 +01:00
f7569a8eb8 Fix error in parameter list 2017-03-03 22:12:27 +01:00
0067d283ad Apply diff_mat to transformations 2017-03-03 21:55:02 +01:00
ba00f508fb Fix parameter list for interpolate functions 2017-03-03 21:54:35 +01:00
a9dcf0f158 Apply diff_mat always and not only when layer parented. If the matrix is not necessary, a unit matrix is generated. This keeps the code cleaner and can handle scene and OB_GPENCIL objects 2017-03-03 21:54:19 +01:00
3783c0ba54 Show parent in properties panel 2017-03-03 21:54:14 +01:00
7784028569 Basic parent to object modificaction. There are errors like double drawing and editing 2017-03-03 21:54:08 +01:00
9a1c977e09 Fix error in brackets 2017-03-03 21:53:32 +01:00
119417417d Basic drawing for all gp objects strokes in the scene 2017-03-03 21:53:25 +01:00
1a672025cf First step to move GP object info to properties panel. Some decision must be taken for scene strokes because this is not visible in properties. 2017-03-03 21:53:19 +01:00
f876c51b30 Cleanup brackets style 2017-03-03 21:40:28 +01:00
6a8ae2d61f Open new section for Gpencil in properties panel. The previous change for use empty panel for both has been undone 2017-03-03 21:40:04 +01:00
1d8cdec1ba Change icon for data when using OB_GPENCIL 2017-03-03 21:39:53 +01:00
b2769b4485 Enable TAB key for enter in edit mode for OB_GPENCIL objects 2017-03-03 21:39:47 +01:00
036dbc19b4 Enable Object mode by default when create a new OB_GPENCIL object 2017-03-03 21:39:39 +01:00
d88edf6284 Change lines due update in function paramaters 2017-03-03 21:37:14 +01:00
6da453a8d7 Set object mode before call operator from outliner 2017-03-03 21:36:53 +01:00
9ee464cab5 Call edit strokes from Outliner doing click over GP datablock of GPencil object 2017-03-03 21:36:44 +01:00
79ef8d57a0 Use new outliner icon for menus 2017-03-03 21:36:39 +01:00
77d66c4c5b First steps to create OB_GPENCIL object 2017-03-03 21:33:21 +01:00
8a30cb4c13 Fix error in vertex shader to make equal to fragment shader 2017-03-03 13:22:14 +01:00
178308a52e Fix error in shader to avoid deformations when rotate viewport 2017-03-03 13:17:00 +01:00
f1ae4af473 Use perfect squares as bounding box to get square UVs 2017-03-03 13:17:00 +01:00
ac415636eb Add new fields when copy palette color 2017-03-03 13:17:00 +01:00
d9d38e5698 Disable parameters not used by some types of filling 2017-03-03 13:17:00 +01:00
ff2cdfb1e5 Change radial gradient to use inner radius 2017-03-03 13:16:59 +01:00
9814c1df67 Fix radial center shader when apply scale 2017-03-03 13:16:59 +01:00
013503dfb5 Working filling shaders with flip and scale.
Need a better gradient algorithm
2017-03-03 13:16:59 +01:00
f23137f7b6 Include new parameter for texture opacity 2017-03-03 13:16:59 +01:00
21cdccf145 Mix texture with linear gradient 2017-03-03 13:16:59 +01:00
004979f7b0 Mix texture with solid fill 2017-03-03 13:16:59 +01:00
a646859a25 Cleanup UI panel to make more intuitive and remove unused params 2017-03-03 13:16:59 +01:00
ce3cdd66d8 New property to mix texture with fill color 2017-03-03 13:16:59 +01:00
bfa228dde2 Fix rotation for gradients and replace texture center variable 2017-03-03 13:16:59 +01:00
57e36df031 Rotate texture around center and not pivot point 2017-03-03 13:16:58 +01:00
2f9f0093d4 Fix radial gradient values 2017-03-03 13:16:58 +01:00
994c019b0d Make linear gradient full color when mix in extrem values.
This is very useful for artistic animations because is more easy to change mix factor than switch to solid color.
2017-03-03 13:16:58 +01:00
9abfa2245e Change UI panel to group options 2017-03-03 13:16:58 +01:00
cdfb7e6ee2 Enable fake_user for image texture used in filling 2017-03-03 13:16:58 +01:00
74dce7aa82 Relink texture images when load file 2017-03-03 13:16:58 +01:00
86d28f9dca Basic filling options working after a complete UI rework 2017-03-03 13:16:58 +01:00
40322007f1 Basic texture support 2017-03-03 13:16:58 +01:00
73a5b137df Add shift factor to radial filling 2017-03-03 13:16:58 +01:00
111a7b7214 Add new parameters for shift.
This modification is not compilable, need a change in Gawain.
2017-03-03 13:16:57 +01:00
3b2d16619c Make fill visible if style is not solid 2017-03-03 13:16:57 +01:00
4955e5e0ee New shift properties to move filling pattern 2017-03-03 13:16:57 +01:00
0661d620c9 First steps to create new radial gradient filling 2017-03-03 13:16:57 +01:00
e48a184506 Cleanup fragment shader code 2017-03-03 13:16:57 +01:00
2824a513be Add chessboard support 2017-03-03 13:16:57 +01:00
426341a3ea Add new functions to filling shader as angle and factor 2017-03-03 13:16:56 +01:00
690bce3c51 Add defines to more clear shader code 2017-03-03 13:16:55 +01:00
8fd58139ba View mix color only if gradient mode 2017-03-03 13:16:55 +01:00
2456e1ce35 New parameters to control gradient or solid fill 2017-03-03 13:16:55 +01:00
4f100f98e5 Cleanup spaces and comments 2017-03-03 13:16:54 +01:00
d72720f7d1 Cleanup comments 2017-03-03 13:16:54 +01:00
d77de3b25a Cleanup unused variables 2017-03-03 13:16:54 +01:00
2567b8f074 Fill shader working with basic gradient support.
The shaders now are for testing only to verify workflow, no real calculation.
2017-03-03 13:16:54 +01:00
0b491e5cda Make new functions static 2017-03-03 13:16:54 +01:00
c665a0bcfa Add a basic shader for filling strokes
The shader code is very basic for testing purpose only.
2017-03-03 13:16:53 +01:00
1e56ce1d9e Add new functions to calculate texture coordinates 2017-03-03 13:16:53 +01:00
c9e9783ba7 Define new fields for saving UV data for triangles 2017-03-03 13:16:53 +01:00
5e7959f964 Add better poll method
Change poll method to check if there is a gpd datablock
2017-03-03 13:16:53 +01:00
0b870bcccd Rename animation palette conversion function 2017-03-03 13:16:53 +01:00
e16eb9b875 Fix comment typo error 2017-03-03 13:16:53 +01:00
c28dca20b7 Depsgraph: Remove unused owner argument for palette builder 2017-03-03 13:16:53 +01:00
39a45edb0d Cleanup: Fix merge error 2017-03-03 13:16:53 +01:00
df223b6c5d Move the palette versioning code outside 2.78.4 area.
This code must be included in next version area.
2017-03-03 13:16:53 +01:00
c9ede7b02f Cleanup code a remove unused driver conversion.
The old GP does not support drivers.
2017-03-03 13:16:53 +01:00
ee5c40137b Remove drivers conversion 2017-03-03 13:16:52 +01:00
3cb7c4f47a Fix merge error 2017-03-03 13:16:52 +01:00
6ca9ca7ce2 Functon to convert animation for Palettes.
Used by operator
2017-03-03 13:16:52 +01:00
b01e763c93 Operator to run palette animation conversion 2017-03-03 13:16:52 +01:00
592748176f New functions to look color by RGB and RGBA 2017-03-03 13:16:52 +01:00
8a8c2e9ebe Free animation memory when free Palettes 2017-03-03 13:16:52 +01:00
e7eee9f36e Include palettes evaluation in new desgraph system 2017-03-03 13:16:52 +01:00
3db6a3a069 Fix animation after renaming color. 2017-03-03 13:16:52 +01:00
dfa81bbdde Remove previous fix for particles animation type 2017-03-03 13:16:52 +01:00
07e219ecde Add new include file due changes in libraries 2017-03-03 13:16:52 +01:00
8f182f6571 Fix previous commit. This definition is required to compile, but it is not used and must be moved or removed when particles back. 2017-03-03 13:16:51 +01:00
a737ee4e82 Some changes to try to include in dopesheet 2017-03-03 13:16:51 +01:00
5e13609a8f Create new channel definition for Palette 2017-03-03 13:16:51 +01:00
3d2766bf08 Include palette keyframes in timeline keyframe_jump operator 2017-03-03 13:16:51 +01:00
08ded0dc73 Initial Timeline editor working without crash. Need more work 2017-03-03 13:16:51 +01:00
e5a50ffffa Add flag to use in action editors 2017-03-03 13:16:51 +01:00
8296f4a13d Include filter for palettes in Dopesheet 2017-03-03 13:16:51 +01:00
248228a716 Include palette keyframes in Timeline Editor 2017-03-03 13:16:50 +01:00
372c92e6c6 Changes to make Palettes animatable. Pending link to new desgraph.
I have only created the methods build_palette for deg_builder_relations.cc and deg_builder_nodes.cc
2017-03-03 13:16:50 +01:00
d4dda54de8 Fix error when create a non GP color after the creation of GP color.
The flag remained true, so the operator worked iqual for color for vertex paint, etc.
2017-03-03 13:16:50 +01:00
8e65fd271c Copy pass index when copy a color 2017-03-03 13:16:50 +01:00
102adeaa0b Use full row for pass_index property 2017-03-03 13:16:50 +01:00
2ad7e98c6a Change style text to avoid duplicate stroke and fill word 2017-03-03 13:16:50 +01:00
624c801a26 Replace use_volumetric as a stroke style and not as independent option 2017-03-03 13:16:50 +01:00
23d27375cd Include temporary styles for drawing buffer 2017-03-03 13:16:50 +01:00
92f59b8473 Copy new style flags when change palette 2017-03-03 13:16:49 +01:00
8c344bbf23 Copy styles when copy color 2017-03-03 13:16:49 +01:00
0822e5a3ed Include new fields for styles. These fields are not used today, but they will be used in the future with new styles like gradient, dotted, etc. 2017-03-03 13:16:49 +01:00
1424079029 Include Index Pass for future uses 2017-03-03 13:16:49 +01:00
fe46c4d1e9 Fix error checking if color list is empty 2017-03-03 13:16:49 +01:00
c5a76620f8 Remove all RNA data about bGPDpalettes and bGPDpalettecolors 2017-03-03 13:16:49 +01:00
a1bc723468 New context functions for palettes and colors 2017-03-03 13:16:49 +01:00
30179bfc01 Fix problem with rna_path function 2017-03-03 13:16:49 +01:00
638b32bc76 Remove bGPDpalettes from RNA 2017-03-03 13:16:48 +01:00
a19df1ddfd Cleanup sentences order 2017-03-03 13:16:48 +01:00
e6388a2823 Set first color as active after palette conversion 2017-03-03 13:16:48 +01:00
8509211f6b Conver old bGPDpalettes to new BelnderPalettes 2017-03-03 13:16:48 +01:00
e56e3e7204 Create a dummy palette if the datablock is missing 2017-03-03 13:16:48 +01:00
ad1cb2156f Replace operator options description 2017-03-03 13:16:48 +01:00
79387b1e64 Add new palette change operator to UI panel and fix paint error 2017-03-03 13:16:47 +01:00
269adbb9f9 Create a new operator to change the palette 2017-03-03 13:16:45 +01:00
0ce48cc056 Do not save old bGPDpalette and bGPDpalettecolor data. These structs have been replaced by Blender Palettes and colors 2017-03-03 13:16:44 +01:00
b4e2a57d39 Fix problem to save and restore colors. Now the palettes pointer is included in the stroke in order to be able to reset the color pointer.
I have fixed the problem with some RNA that were connected to bGPDpalettecolor and not to PaletteColor
2017-03-03 13:16:44 +01:00
b0553d2134 Save and relink animation data for Palettes 2017-03-03 13:16:44 +01:00
f447c8115a When join, do not force a color recalc 2017-03-03 13:16:44 +01:00
12e7449d1d Fix error in previous commit 2017-03-03 13:16:44 +01:00
5575a235b7 Remove Color name from RNA properties 2017-03-03 13:16:44 +01:00
47643aef33 Remove special context for Grease Pencil and use a more general context 2017-03-03 13:16:43 +01:00
d658407ca2 Remove parameter ToolSettings not used anymore 2017-03-03 13:16:43 +01:00
b1e1aa5318 Remove get color by name and use the gps->palcolor pointer 2017-03-03 13:16:43 +01:00
88623c0cfa Use more general paint and palette context instead of gpencil context 2017-03-03 13:16:43 +01:00
d7a7061b72 Use PaletteColor and not colorname to determine the colors to delete or change. This is necessary because now we can use several palettes at the same time and the color name can be equal in two or more palettes. 2017-03-03 13:16:43 +01:00
98e9d54874 Make palettes visibles without GPD datablock 2017-03-03 13:16:43 +01:00
25aa0d8ca0 Enable basic support for PaletteColor animation 2017-03-03 13:16:43 +01:00
0e2a707f0d Fix error when remove colors and draw again 2017-03-03 13:16:42 +01:00
82ad438c9a Remove HQ_FILL. Now always is high quality fill 2017-03-03 13:16:42 +01:00
a59b0960ec Cleanup: Changes in parameter list and function names to fix several compiler warnings 2017-03-03 13:16:42 +01:00
fc9169eb7f Cleanup: Remove unused functions 2017-03-03 13:16:42 +01:00
53bdcad097 Cleanup: Remove unused definitions 2017-03-03 13:16:42 +01:00
252e5afe4c Remove creation options for old palette system to avoid future errors 2017-03-03 13:16:42 +01:00
bbb7ae617e Remove last bGPDpalette and bGPDpalettecolor operators 2017-03-03 13:16:42 +01:00
2e93bf8432 Python modified to apply new BlenderPalettes in Tools panel 2017-03-03 13:16:41 +01:00
2b1edb4728 Rename operator 2017-03-03 13:16:41 +01:00
15ae52e90f Change operator name 2017-03-03 13:16:41 +01:00
51c85f7445 Publish active index property 2017-03-03 13:16:41 +01:00
4a4276871d New operators moved from grease pencil to Palette and PaletteColor 2017-03-03 13:16:41 +01:00
da051bc210 Remove bGPdpalette and bGPdpalettecolor operators 2017-03-03 13:16:41 +01:00
3308a96e3b Change function name to keep name consistency 2017-03-03 13:16:41 +01:00
935217e48c Basic change of bGPDpalette and bGPDpalettecolor to Palette and PaletteColor 2017-03-03 13:16:40 +01:00
28117030f1 New fucntion to retrieve color using toolsettings 2017-03-03 13:16:40 +01:00
85ef68aec4 Include palette in temporary area for painting and interpolate operators 2017-03-03 13:16:40 +01:00
e8cc2b74f1 New operator to create grease pencil palette. This operator is used in template_ID in python to create the palette in imapaint and not relative to context 2017-03-03 13:16:39 +01:00
5350475214 Several changes in context functions to make it more reliable 2017-03-03 13:16:39 +01:00
99fb0f90ff Create new operator for new palettes for grease pencil 2017-03-03 13:16:39 +01:00
4374aa531e Create palette in temp data while drawing 2017-03-03 13:16:39 +01:00
e665042bc9 Wrapper function to create a new palette in context 2017-03-03 13:16:38 +01:00
3f36cdad4d Wrapper function to get color from context in one step 2017-03-03 13:16:38 +01:00
3a52e3c2ac Delete stroke if remove the color from palette 2017-03-03 13:16:38 +01:00
bfe90e00bb Cleanup active functions and rename to keep consistency with previous code 2017-03-03 13:16:38 +01:00
e12a0f2148 Create new BKE functions to get active palette and palettecolor. Update CTX_ functions to use new kernel functions 2017-03-03 13:16:38 +01:00
fd28c06260 Add Animation struct to palettes 2017-03-03 13:16:38 +01:00
ad83162ed7 Create new context functions for Palette and PaletteColor to expose values 2017-03-03 13:16:38 +01:00
968772303f Rename color for all GPD datablocks 2017-03-03 13:16:37 +01:00
ad0d83b518 Get color by name 2017-03-03 13:16:37 +01:00
71b71a0b92 Basic changes to include new grease pencil fields in palette colors 2017-03-03 13:16:37 +01:00
8229 changed files with 871526 additions and 1172710 deletions

View File

@@ -1,7 +1,6 @@
{
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"phabricator.uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "master"

View File

@@ -2,7 +2,7 @@
# Configuration of clang-format
# =============================
#
# Tested to work with versions: 8 to 11.
# Tested to work with versions: 6 to 8.
# This causes parameters on continuations to align to the opening brace.
#
@@ -132,7 +132,9 @@ PenaltyBreakAssignment: 100
AllowShortFunctionsOnASingleLine: None
SortIncludes: true
# Disable for now since it complicates initial migration tests,
# TODO: look into enabling this in the future.
SortIncludes: false
# Don't right align escaped newlines to the right because we have a wide default
AlignEscapedNewlines: DontAlign
@@ -161,7 +163,6 @@ PenaltyBreakString: 1000000
# "^\s+[A-Z][A-Z0-9_]+\s*\([^\n]*\)\n\s*\{"
ForEachMacros:
- BEGIN_ANIMFILTER_SUBCHANNELS
- BKE_pbvh_vertex_iter_begin
- BLI_FOREACH_SPARSE_RANGE
- BLI_SMALLSTACK_ITER_BEGIN
- BMO_ITER
@@ -192,7 +193,6 @@ ForEachMacros:
- FOREACH_MAIN_ID_BEGIN
- FOREACH_MAIN_LISTBASE_BEGIN
- FOREACH_MAIN_LISTBASE_ID_BEGIN
- FOREACH_MESH_BUFFER_CACHE
- FOREACH_NODETREE_BEGIN
- FOREACH_OBJECT_BEGIN
- FOREACH_OBJECT_FLAG_BEGIN
@@ -215,7 +215,6 @@ ForEachMacros:
- GHASH_ITER_INDEX
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
- GP_EDITABLE_STROKES_BEGIN
- GP_EVALUATED_STROKES_BEGIN
- GSET_FOREACH_BEGIN
- GSET_ITER
- GSET_ITER_INDEX
@@ -239,7 +238,7 @@ ForEachMacros:
- LISTBASE_FOREACH_BACKWARD
- LISTBASE_FOREACH_MUTABLE
- LISTBASE_FOREACH_BACKWARD_MUTABLE
- LISTBASE_FOREACH_INDEX
- MAN2D_ITER_AXES_BEGIN
- MAN_ITER_AXES_BEGIN
- NODE_INSTANCE_HASH_ITER
- NODE_SOCKET_TYPES_BEGIN
@@ -247,21 +246,16 @@ ForEachMacros:
- NODE_TYPES_BEGIN
- PIXEL_LOOPER_BEGIN
- PIXEL_LOOPER_BEGIN_CHANNELS
- RENDER_PASS_ITER_BEGIN
- RNA_BEGIN
- RNA_PROP_BEGIN
- RNA_STRUCT_BEGIN
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN
- SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN
- SEQ_ALL_BEGIN
- SURFACE_QUAD_ITER_BEGIN
- SEQP_BEGIN
- SEQ_BEGIN
- foreach
- ED_screen_areas_iter
- SLOT_PROBING_BEGIN
- SET_SLOT_PROBING_BEGIN
- MAP_SLOT_PROBING_BEGIN
- VECTOR_SET_SLOT_PROBING_BEGIN
StatementMacros:
- PyObject_VAR_HEAD
# Use once we bump the minimum version to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
# StatementMacros:
# - PyObject_VAR_HEAD
# - STRINGIFY

View File

@@ -1,47 +0,0 @@
# The warnings below are disabled because they are too pedantic and not worth fixing.
# Some of them will be enabled as part of the Clang-Tidy task, see T78535.
Checks: >
-*,
readability-*,
-readability-uppercase-literal-suffix,
-readability-magic-numbers,
-readability-isolate-declaration,
-readability-convert-member-functions-to-static,
-readability-implicit-bool-conversion,
-readability-avoid-const-params-in-decls,
-readability-simplify-boolean-expr,
-readability-make-member-function-const,
-readability-misleading-indentation,
-readability-use-anyofallof,
-readability-function-cognitive-complexity,
bugprone-*,
-bugprone-narrowing-conversions,
-bugprone-unhandled-self-assignment,
-bugprone-branch-clone,
-bugprone-macro-parentheses,
-bugprone-reserved-identifier,
-bugprone-sizeof-expression,
-bugprone-integer-division,
-bugprone-redundant-branch-condition,
modernize-*,
-modernize-use-auto,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-modernize-use-nodiscard,
-modernize-loop-convert,
-modernize-pass-by-value,
# Cannot be enabled yet, because using raw string literals in tests breaks
# the windows compiler currently.
-modernize-raw-string-literal
CheckOptions:
- key: modernize-use-default-member-init.UseAssignment
value: 1

View File

@@ -1,104 +0,0 @@
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# After running the above, commits listed in this file will be
# ignored by git blame. The blame will be shifted to the person
# who edited the line(s) before the ignored commit.
#
# To disable this ignorance for a command, run as follows
# git blame --ignore-revs-file="" <other options>
#
# Changes that belong here:
# - Massive comment, doxy-sections, or spelling corrections.
# - Clang-format, PEP8 or other automated changes which are *strictly* "no functional change".
# - Several commits should be added to this list at once, because adding
# one extra commit (to edit this file) after every cleanup is noisy.
# - No clang-tidy changes.
#
# Note:
# - The comment above the SHA should be the first line of the commit.
# - It is fine to pack together similar commits if they have the same explanatory comment.
# - Use only 40 character git SHAs; not smaller ones, not prefixed with rB.
#
# https://git-scm.com/docs/git-blame/2.23.0
# white space commit. (2 spaces -> tab).
0a3694cd6ebec710da7110e9f168a72d47c71ee0
# Cycles: Cleanup, spacing after preprocessor
cb4b5e12abf1fc6cf9ffc0944e0a1bc406286c63
# ClangFormat: apply to source, most of intern
e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1
# Code Style: use "#pragma once" in source directory
91694b9b58ab953f3b313be9389cc1303e472fc2
# Code Style: use "#pragma once" in some newer headers
8198dbb888856b8c11757586df02aca15f132f90
# Code Style: use "#pragma once" in intern/ghost
1b1129f82a9cf316b54fbc025f8cfcc1a74b8589
# Cleanup: mostly comments, use doxy syntax & typos
e0cb02587012b4b2f4b18363dc7d0a7da2c02093
# Cleanup: use C comments for descriptive text
2abfcebb0eb7989e3d1e7d03f37ecf5c088210af
# use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed.
afacd184982e58a9c830a3d5366e25983939a7ba
# Spelling: It's Versus Its
3a7fd309fce89213b0224b3c6807adb2d1fe7ca8
# Spelling: Then Versus Than
d1eefc421544e2ea632fb35cb6bcaade4c39ce6b
# Spelling: Miscellaneous
84ef3b80de4915a24a9fd2fd214d0fa44e59b854
# Spelling: Loose Versus Lose
c0a6bc19794c69843c38451c762e91bc10136e0f
# Spelling: Apart Versus A Part
3d26cd01b9ba6381eb165e11536345ae652dfb41
# Cleanup: use 2 space indentation for CMake
3076d95ba441cd32706a27d18922a30f8fd28b8a
# Cleanup: use over-line for doxy comments
4b188bb08cf5aaae3c68ab57bbcfa037eef1ac10
# Cleanup: General comment style clean up of graph_edit.c and fcurve.c
0105f146bb40bd609ccbda3d3f6aeb8e14ad3f9e
# Cleanup: pep8 (indentation, spacing, long lines)
41d2d6da0c96d351b47acb64d3e0decdba16cb16
# Cleanup: pep8, blank lines
bab9de2a52929fe2b45ecddb1eb09da3378e303b
# Cleanup: PEP8 for python changes
1e7e94588daa66483190f45a9de5e98228f80e05
# GPencil: Cleanup pep8
a09cc3ee1a99f2cd5040bbf30c8ab8c588bb2bb1
# Cleanup: trailing space, remove tabs, pep8
c42a6b77b52560d257279de2cb624b4ef2c0d24c
# Cleanup: use C style doxygen comments
8c1726918374e1d2d2123e17bae8db5aadde3433
# Cleanup: use doxy sections for imbuf
c207f7c22e1439e0b285fba5d2c072bdae23f981
# Cleanup: clang-format
c4d8f6a4a8ddc29ed27311ed7578b3c8c31399d2
b5d310b569e07a937798a2d38539cfd290149f1c
8c846cccd6bdfd3e90a695fabbf05f53e5466a57
4eac03d821fa17546f562485f7d073813a5e5943
1166110a9d66af9c5a47cee2be591f50fdc445e8
# Cleanup: clang-format.
40d4a4cb1a6b4c3c2a486e8f2868f547530e0811

3
.gitignore vendored
View File

@@ -46,6 +46,3 @@ Desktop.ini
# smoke simulation noise tile (generated)
waveletNoiseTile.bin
# testing environment
/Testing

File diff suppressed because it is too large Load Diff

View File

@@ -26,31 +26,24 @@
define HELP_TEXT
Blender Convenience Targets
Convenience Targets
Provided for building Blender, (multiple at once can be used).
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* release: Complete build with all options enabled including CUDA and Optix, matching the releases on blender.org
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
* deps: Build library dependencies (intended only for platform maintainers).
* developer: Enable faster builds, error checking and tests, recommended for developers.
* config: Run cmake configuration tool to set build options.
* ninja: Use ninja build tool for faster builds.
* ccache: Use ccache for faster rebuilds.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
Other Convenience Targets
Provided for other building operations.
* config: Run cmake configuration tool to set build options.
* deps: Build library dependencies (intended only for platform maintainers).
The existance of locally build dependancies overrides the pre-built dependencies from subversion.
These must be manually removed from '../lib/' to go back to using the pre-compiled libraries.
Project Files
Generate project files for development environments.
@@ -78,6 +71,17 @@ Testing Targets
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
* test_style_c:
Checks C/C++ conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_c_qtc:
Same as test_style but outputs QtCreator tasks format
* test_style_osl:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_osl_qtc:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
Static Source Code Checking
Not associated with building Blender.
@@ -87,22 +91,11 @@ Static Source Code Checking
* check_splint: Run blenders source through splint (C only).
* check_sparse: Run blenders source through sparse (C only).
* check_smatch: Run blenders source through smatch (C only).
* check_descriptions: Check for duplicate/invalid descriptions.
Spell Checkers
This runs the spell checker from the developer tools repositor.
* check_spelling_c: Check for spelling errors (C/C++ only),
* check_spelling_c: Check for spelling errors (C/C++ only).
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
* check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only).
Note: an additional word-list is maintained at: 'source/tools/check_source/check_spelling_c_config.py'
Note: that spell checkers can take a 'CHECK_SPELLING_CACHE' filepath argument,
so re-running does not need to re-check unchanged files.
Example:
make check_spelling_c CHECK_SPELLING_CACHE=../spelling_cache.data
* check_descriptions: Check for duplicate/invalid descriptions.
Utilities
Not associated with building Blender.
@@ -128,16 +121,10 @@ Utilities
* source_archive:
Create a compressed archive of the source code.
* source_archive_complete:
Create a compressed archive of the source code and all the libraries of dependencies.
* update:
Updates git and all submodules and svn.
updates git and all submodules
* update_code:
Updates git and all submodules but not svn.
* format:
* format
Format source code using clang (uses PATHS if passed in). For example::
make format PATHS="source/blender/blenlib source/blender/blenkernel"
@@ -165,10 +152,6 @@ Information
endef
# HELP_TEXT (end)
# This makefile is not meant for Windows
ifeq ($(OS),Windows_NT)
$(error On Windows, use "cmd //c make.bat" instead of "make")
endif
# System Vars
OS:=$(shell uname -s)
@@ -197,13 +180,8 @@ endif
ifndef DEPS_INSTALL_DIR
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
# Add processor type to directory name, except for darwin x86_64
# which by convention does not have it.
ifeq ($(OS_NCASE),darwin)
ifneq ($(CPU),x86_64)
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
else
ifneq ($(OS_NCASE),darwin)
# Add processor type to directory name
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
endif
@@ -217,7 +195,7 @@ endif
# in libraries, or python 2 for running make update to get it.
ifeq ($(OS_NCASE),darwin)
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=$(DEPS_INSTALL_DIR)/python/bin/python3.7m
PYTHON:=../lib/darwin/python/bin/python3.7m
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=python
endif
@@ -240,10 +218,6 @@ ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_lite
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring release, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_release
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_release.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_cycles
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake" $(CMAKE_CONFIG_ARGS)
@@ -261,10 +235,6 @@ ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring ccache, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-DWITH_COMPILER_CCACHE=YES $(CMAKE_CONFIG_ARGS)
endif
# -----------------------------------------------------------------------------
# build tool
@@ -358,13 +328,11 @@ all: .FORCE
debug: all
full: all
lite: all
release: all
cycles: all
headless: all
bpy: all
developer: all
ninja: all
ccache: all
# -----------------------------------------------------------------------------
# Build dependencies
@@ -434,6 +402,45 @@ test_cmake: .FORCE
test_deprecated: .FORCE
$(PYTHON) tests/check_deprecated.py
test_style_c: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
test_style_osl: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
# -----------------------------------------------------------------------------
# Project Files
@@ -480,9 +487,6 @@ check_smatch: .FORCE
cd "$(BUILD_DIR)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
check_mypy: .FORCE
$(PYTHON) "$(BLENDER_DIR)/source/tools/check_source/check_mypy.py"
check_spelling_py: .FORCE
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
@@ -493,17 +497,26 @@ check_spelling_c: .FORCE
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
check_spelling_c_qtc: .FORCE
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
check_spelling_osl: .FORCE
cd "$(BUILD_DIR)" ;\
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions: .FORCE
@@ -515,14 +528,7 @@ check_descriptions: .FORCE
#
source_archive: .FORCE
python3 ./build_files/utils/make_source_archive.py
source_archive_complete: .FORCE
cmake -S "$(BLENDER_DIR)/build_files/build_environment" -B"$(BUILD_DIR)/source_archive" \
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE) -DPACKAGE_USE_UPSTREAM_SOURCES=OFF
# This assumes CMake is still using a default `PACKAGE_DIR` variable:
python3 ./build_files/utils/make_source_archive.py --include-packages "$(BUILD_DIR)/source_archive/packages"
./build_files/utils/make_source_archive.sh
INKSCAPE_BIN?="inkscape"
icons: .FORCE
@@ -538,11 +544,8 @@ icons_geom: .FORCE
update: .FORCE
$(PYTHON) ./build_files/utils/make_update.py
update_code: .FORCE
$(PYTHON) ./build_files/utils/make_update.py --no-libraries
format: .FORCE
PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
@@ -552,10 +555,10 @@ format: .FORCE
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py: .FORCE
ASAN_OPTIONS=halt_on_error=0:${ASAN_OPTIONS} \
ASAN_OPTIONS=halt_on_error=0 \
$(BLENDER_BIN) --background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py
sphinx-build -b html -j $(NPROCS) doc/python_api/sphinx-in doc/python_api/sphinx-out
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
doc_doxy: .FORCE

View File

@@ -30,12 +30,11 @@
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake bison cmake libtool pkg-config yasm
# Additional requirements for macOS arm64: brew install flex
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
# Install compiler cmake autoconf automake libtool yasm tcl
# Install compiler cmake autoconf automake libtool yasm nasm tcl
# Run "make deps" from main Blender directory
#
####################################################################################################
@@ -47,10 +46,13 @@ include(ExternalProject)
include(cmake/check_software.cmake)
include(cmake/options.cmake)
include(cmake/versions.cmake)
include(cmake/download.cmake)
if(ENABLE_MINGW64)
include(cmake/setup_mingw64.cmake)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
else()
set(mingw_LIBDIR ${LIBDIR})
endif()
@@ -59,6 +61,7 @@ include(cmake/zlib.cmake)
include(cmake/openal.cmake)
include(cmake/png.cmake)
include(cmake/jpeg.cmake)
include(cmake/boost.cmake)
include(cmake/blosc.cmake)
include(cmake/pthreads.cmake)
include(cmake/openexr.cmake)
@@ -72,57 +75,50 @@ include(cmake/cuew.cmake)
include(cmake/opensubdiv.cmake)
include(cmake/sdl.cmake)
include(cmake/opencollada.cmake)
include(cmake/opencolorio.cmake)
include(cmake/llvm.cmake)
include(cmake/clang.cmake)
if(APPLE)
include(cmake/openmp.cmake)
endif()
if(UNIX)
include(cmake/nasm.cmake)
endif()
include(cmake/openimageio.cmake)
include(cmake/tiff.cmake)
include(cmake/flexbison.cmake)
include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/nanovdb.cmake)
include(cmake/python.cmake)
option(USE_PIP_NUMPY "Install NumPy using pip wheel instead of building from source" OFF)
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
set(USE_PIP_NUMPY ON)
else()
include(cmake/numpy.cmake)
endif()
include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake)
include(cmake/numpy.cmake)
include(cmake/usd.cmake)
include(cmake/potrace.cmake)
include(cmake/haru.cmake)
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
include(cmake/pugixml.cmake)
include(cmake/ispc.cmake)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
include(cmake/openimagedenoise.cmake)
include(cmake/embree.cmake)
if(NOT APPLE)
include(cmake/xr_openxr.cmake)
endif()
# OpenColorIO and dependencies.
include(cmake/expat.cmake)
include(cmake/yamlcpp.cmake)
include(cmake/opencolorio.cmake)
if(BLENDER_PLATFORM_ARM)
include(cmake/sse2neon.cmake)
endif()
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(WITH_EMBREE)
include(cmake/embree.cmake)
endif()
if(WIN32)
# HMD branch deps
include(cmake/hidapi.cmake)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
# include(cmake/lcms.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/gmp.cmake)
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
@@ -136,6 +132,7 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)

View File

@@ -16,9 +16,28 @@
#
# ***** END GPL LICENSE BLOCK *****
if(ALEMBIC_HDF5)
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DALEMBIC_LIB_USES_BOOST=ON
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${LIBDIR}/openexr
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/openexr/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
@@ -33,6 +52,7 @@ set(ALEMBIC_EXTRA_ARGS
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
@@ -41,12 +61,13 @@ set(ALEMBIC_EXTRA_ARGS
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
)
ExternalProject_Add(external_alembic
URL file://${PACKAGE_DIR}/${ALEMBIC_FILE}
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ALEMBIC_HASH_TYPE}=${ALEMBIC_HASH}
URL_HASH MD5=${ALEMBIC_MD5}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
@@ -71,6 +92,7 @@ endif()
add_dependencies(
external_alembic
external_boost
external_zlib
external_openexr
)

View File

@@ -36,9 +36,9 @@ set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
)
ExternalProject_Add(external_blosc
URL file://${PACKAGE_DIR}/${BLOSC_FILE}
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BLOSC_HASH_TYPE}=${BLOSC_HASH}
URL_HASH MD5=${BLOSC_HASH}
PREFIX ${BUILD_DIR}/blosc
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}

View File

@@ -18,27 +18,33 @@
set(BOOST_ADDRESS_MODEL 64)
if(BLENDER_PLATFORM_ARM)
set(BOOST_ARCHITECTURE arm)
else()
set(BOOST_ARCHITECTURE x86)
endif()
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
set(BOOST_ADDRESS_MODEL 32)
endif()
set(BOOST_TOOLSET toolset=msvc-14.1)
set(BOOST_COMPILER_STRING -vc141)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND b2)
set(BOOST_BUILD_COMMAND bjam)
set(BOOST_BUILD_OPTIONS runtime-link=shared )
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-${BOOST_VERSION_NODOTS_SHORT}/ ${HARVEST_TARGET}/boost/include/)
endif()
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=clang-darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
@@ -54,21 +60,6 @@ else()
endif()
endif()
if(WITH_BOOST_PYTHON)
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
set(BOOST_PYTHON_OPTIONS
--with-python
--user-config=${JAM_FILE}
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(BOOST_PYTHON_OPTIONS
${BOOST_PYTHON_OPTIONS}
define=BOOST_DEBUG_PYTHON
)
endif()
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
@@ -85,28 +76,19 @@ set(BOOST_OPTIONS
-sNO_LZMA=1
-sNO_ZSTD=1
${BOOST_TOOLSET}
${BOOST_PYTHON_OPTIONS}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL file://${PACKAGE_DIR}/${BOOST_FILE}
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BOOST_HASH_TYPE}=${BOOST_HASH}
URL_HASH MD5=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=${BOOST_ARCHITECTURE} address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WITH_BOOST_PYTHON)
add_dependencies(
external_boost
external_python
external_numpy
)
endif()

View File

@@ -25,14 +25,12 @@ if(UNIX AND NOT APPLE)
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
else()
set(BZIP2_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_bzip2
URL file://${PACKAGE_DIR}/${BZIP2_FILE}
URL ${BZIP2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BZIP2_HASH_TYPE}=${BZIP2_HASH}
URL_HASH SHA256=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}

View File

@@ -26,23 +26,12 @@ if(UNIX)
set(_required_software
autoconf
automake
bison
${_libtoolize_name}
pkg-config
tclsh
nasm
yasm
tclsh
)
if(NOT APPLE)
set(_required_software
${_required_software}
# Needed for Mesa.
meson
ninja
)
endif()
foreach(_software ${_required_software})
find_program(_software_find NAMES ${_software})
if(NOT _software_find)
@@ -51,18 +40,6 @@ if(UNIX)
unset(_software_find CACHE)
endforeach()
if(APPLE)
# Homebrew has different default locations for ARM and Intel macOS.
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(HOMEBREW_LOCATION "/opt/homebrew")
else()
set(HOMEBREW_LOCATION "/usr/local")
endif()
if(NOT EXISTS "${HOMEBREW_LOCATION}/opt/bison/bin/bison")
string(APPEND _software_missing " bison")
endif()
endif()
if(_software_missing)
message(
"\n"
@@ -70,13 +47,10 @@ if(UNIX)
" ${_software_missing}\n"
"\n"
"On Debian and Ubuntu:\n"
" apt install autoconf automake libtool yasm tcl ninja-build meson python3-mako\n"
" apt install autoconf automake libtool yasm nasm tcl\n"
"\n"
"On macOS Intel (with homebrew):\n"
" brew install autoconf automake bison libtool pkg-config yasm\n"
"\n"
"On macOS ARM (with homebrew):\n"
" brew install autoconf automake bison flex libtool pkg-config yasm\n"
"On macOS (with homebrew):\n"
" brew install cmake autoconf automake libtool yasm nasm\n"
"\n"
"Other platforms:\n"
" Install equivalent packages.\n")

View File

@@ -0,0 +1,61 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CLANG_EXTRA_ARGS
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MD
-DLLVM_USE_CRT_DEBUG=MDd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
)
if(WIN32)
set(CLANG_GENERATOR "Ninja")
else()
set(CLANG_GENERATOR "Unix Makefiles")
endif()
ExternalProject_Add(external_clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PREFIX ${BUILD_DIR}/clang
CMAKE_GENERATOR ${CLANG_GENERATOR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
else()
set(CLANG_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/
)
endif()
ExternalProject_Add_Step(external_clang after_install
COMMAND ${CLANG_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()
add_dependencies(
external_clang
ll
)

View File

@@ -19,9 +19,9 @@
set(CLEW_EXTRA_ARGS)
ExternalProject_Add(external_clew
URL file://${PACKAGE_DIR}/${CLEW_FILE}
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${CLEW_HASH_TYPE}=${CLEW_HASH}
URL_HASH MD5=${CLEW_HASH}
PREFIX ${BUILD_DIR}/clew
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clew

View File

@@ -19,9 +19,9 @@
set(CUEW_EXTRA_ARGS)
ExternalProject_Add(external_cuew
URL file://${PACKAGE_DIR}/${CUEW_FILE}
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${CUEW_HASH_TYPE}=${CUEW_HASH}
URL_HASH MD5=${CUEW_HASH}
PREFIX ${BUILD_DIR}/cuew
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}

View File

@@ -1,93 +0,0 @@
function(download_source dep)
set(TARGET_FILE ${${dep}_FILE})
set(TARGET_HASH_TYPE ${${dep}_HASH_TYPE})
set(TARGET_HASH ${${dep}_HASH})
if(PACKAGE_USE_UPSTREAM_SOURCES)
set(TARGET_URI ${${dep}_URI})
else()
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/${TARGET_FILE})
endif()
set(TARGET_FILE ${PACKAGE_DIR}/${TARGET_FILE})
message("Checking source : ${dep} (${TARGET_FILE})")
if(NOT EXISTS ${TARGET_FILE})
message("Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
file(DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
TIMEOUT 1800 # seconds
EXPECTED_HASH ${TARGET_HASH_TYPE}=${TARGET_HASH}
TLS_VERIFY ON
SHOW_PROGRESS
)
endif()
endfunction(download_source)
download_source(ZLIB)
download_source(OPENAL)
download_source(PNG)
download_source(JPEG)
download_source(BOOST)
download_source(BLOSC)
download_source(PTHREADS)
download_source(OPENEXR)
download_source(FREETYPE)
download_source(GLEW)
download_source(FREEGLUT)
download_source(ALEMBIC)
download_source(GLFW)
download_source(CLEW)
download_source(GLFW)
download_source(CUEW)
download_source(OPENSUBDIV)
download_source(SDL)
download_source(OPENCOLLADA)
download_source(OPENCOLORIO)
download_source(LLVM)
download_source(OPENMP)
download_source(OPENIMAGEIO)
download_source(TIFF)
download_source(OSL)
download_source(PYTHON)
download_source(TBB)
download_source(OPENVDB)
download_source(NANOVDB)
download_source(NUMPY)
download_source(LAME)
download_source(OGG)
download_source(VORBIS)
download_source(THEORA)
download_source(FLAC)
download_source(VPX)
download_source(OPUS)
download_source(X264)
download_source(XVIDCORE)
download_source(OPENJPEG)
download_source(FFMPEG)
download_source(FFTW)
download_source(ICONV)
download_source(SNDFILE)
if(WITH_WEBP)
download_source(WEBP)
endif()
download_source(SPNAV)
download_source(JEMALLOC)
download_source(XML2)
download_source(TINYXML)
download_source(YAMLCPP)
download_source(EXPAT)
download_source(PUGIXML)
download_source(FLEXBISON)
download_source(BZIP2)
download_source(FFI)
download_source(LZMA)
download_source(SSL)
download_source(SQLITE)
download_source(EMBREE)
download_source(USD)
download_source(OIDN)
download_source(LIBGLU)
download_source(MESA)
download_source(NASM)
download_source(XR_OPENXR_SDK)
download_source(ISPC)
download_source(GMP)
download_source(POTRACE)
download_source(HARU)

View File

@@ -26,53 +26,24 @@ set(EMBREE_EXTRA_ARGS
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
-DEMBREE_TASKING_SYSTEM=TBB
-DEMBREE_TBB_ROOT=${LIBDIR}/tbb
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
)
if(TBB_STATIC_LIBRARY)
set(EMBREE_EXTRA_ARGS
${EMBREE_EXTRA_ARGS}
-DEMBREE_TBB_LIBRARY_NAME=tbb_static
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_static
)
endif()
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
else()
set(EMBREE_BUILD_DIR)
endif()
if(BLENDER_PLATFORM_ARM)
ExternalProject_Add(external_embree
GIT_REPOSITORY ${EMBREE_ARM_GIT}
GIT_TAG "blender-arm"
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
else()
ExternalProject_Add(external_embree
URL file://${PACKAGE_DIR}/${EMBREE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${EMBREE_HASH_TYPE}=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
endif()
add_dependencies(
external_embree
external_tbb
ExternalProject_Add(external_embree
URL ${EMBREE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)

View File

@@ -1,35 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(EXPAT_EXTRA_ARGS
-DEXPAT_BUILD_DOCS=OFF
-DEXPAT_BUILD_EXAMPLES=OFF
-DEXPAT_BUILD_TESTS=OFF
-DEXPAT_BUILD_TOOLS=OFF
-DEXPAT_SHARED_LIBS=OFF
)
ExternalProject_Add(external_expat
URL file://${PACKAGE_DIR}/${EXPAT_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${EXPAT_HASH_TYPE}=${EXPAT_HASH}
PREFIX ${BUILD_DIR}/expat
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/expat ${DEFAULT_CMAKE_FLAGS} ${EXPAT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/expat
SOURCE_SUBDIR expat
)

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FAAD_EXTRA_ARGS)
if(WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
else()
set(FAAD_EXTRA_CONFIGURE echo .)
endif()
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
)
if(MSVC)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
endif()

View File

@@ -17,8 +17,8 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ffi
URL file://${PACKAGE_DIR}/${FFI_FILE}
URL_HASH ${FFI_HASH_TYPE}=${FFI_HASH}
URL ${FFI_URI}
URL_HASH SHA256=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi

View File

@@ -50,19 +50,13 @@ if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
--x86asmexe=${LIBDIR}/nasm/bin/nasm
)
elseif(UNIX)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=${LIBDIR}/nasm/bin/nasm
)
)
endif()
ExternalProject_Add(external_ffmpeg
URL file://${PACKAGE_DIR}/${FFMPEG_FILE}
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FFMPEG_HASH_TYPE}=${FFMPEG_HASH}
URL_HASH MD5=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
@@ -100,6 +94,8 @@ ExternalProject_Add(external_ffmpeg
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
@@ -131,6 +127,7 @@ endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
@@ -147,12 +144,6 @@ if(WIN32)
external_zlib_mingw
)
endif()
if(UNIX)
add_dependencies(
external_ffmpeg
external_nasm
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install

View File

@@ -19,23 +19,19 @@
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
set(FFTW_EXTRA_ARGS --disable-static --enable-shared)
set(FFTW_INSTALL install-strip)
else()
set(FFTW_EXTRA_ARGS --enable-static)
set(FFTW_INSTALL install)
endif()
ExternalProject_Add(external_fftw3
URL file://${PACKAGE_DIR}/${FFTW_FILE}
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FFTW_HASH_TYPE}=${FFTW_HASH}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} --prefix=${mingw_LIBDIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make ${FFTW_INSTALL}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
)
@@ -43,8 +39,7 @@ if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_flac
URL file://${PACKAGE_DIR}/${FLAC_FILE}
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FLAC_HASH_TYPE}=${FLAC_HASH}
URL_HASH SHA256=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}

View File

@@ -19,9 +19,9 @@
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL file://${PACKAGE_DIR}/${FLEXBISON_FILE}
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FLEXBISON_HASH_TYPE}=${FLEXBISON_HASH}
URL_HASH MD5=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .

View File

@@ -24,9 +24,9 @@ if(WIN32)
)
ExternalProject_Add(external_freeglut
URL file://${PACKAGE_DIR}/${FREEGLUT_FILE}
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FREEGLUT_HASH_TYPE}=${FREEGLUT_HASH}
URL_HASH MD5=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut

View File

@@ -24,13 +24,12 @@ set(FREETYPE_EXTRA_ARGS
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE)
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
ExternalProject_Add(external_freetype
URL file://${PACKAGE_DIR}/${FREETYPE_FILE}
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FREETYPE_HASH_TYPE}=${FREETYPE_HASH}
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freetype

View File

@@ -22,9 +22,9 @@ set(GLEW_EXTRA_ARGS
)
ExternalProject_Add(external_glew
URL file://${PACKAGE_DIR}/${GLEW_FILE}
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GLEW_HASH_TYPE}=${GLEW_HASH}
URL_HASH MD5=${GLEW_HASH}
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
PREFIX ${BUILD_DIR}/glew
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}

View File

@@ -19,9 +19,9 @@
set(GLFW_EXTRA_ARGS)
ExternalProject_Add(external_glfw
URL file://${PACKAGE_DIR}/${GLFW_FILE}
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GLFW_HASH_TYPE}=${GLFW_HASH}
URL_HASH MD5=${GLFW_HASH}
PREFIX ${BUILD_DIR}/glfw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glfw

View File

@@ -1,108 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GMP_EXTRA_ARGS -enable-cxx)
if(WIN32)
# Shared for windows because static libs will drag in a libgcc dependency.
set(GMP_OPTIONS --disable-static --enable-shared --enable-fat --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
else()
set(GMP_OPTIONS --enable-static --disable-shared )
endif()
if(APPLE AND NOT BLENDER_PLATFORM_ARM)
set(GMP_OPTIONS
${GMP_OPTIONS}
--with-pic
)
elseif(UNIX AND NOT APPLE)
set(GMP_OPTIONS
${GMP_OPTIONS}
--with-pic
--enable-fat
)
endif()
if(BLENDER_PLATFORM_ARM)
set(GMP_OPTIONS
${GMP_OPTIONS}
--disable-assembly
)
endif()
ExternalProject_Add(external_gmp
URL file://${PACKAGE_DIR}/${GMP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GMP_HASH_TYPE}=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmp
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make install
INSTALL_DIR ${LIBDIR}/gmp
)
if(MSVC)
set_target_properties(external_gmp PROPERTIES FOLDER Mingw)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
DEPENDEES install
)
endif()
if(WIN32)
# gmpxx is somewhat special, it builds on top of the C style gmp library but exposes C++ bindings
# given the C++ ABI between MSVC and mingw is not compatible, we need to build the bindings
# with MSVC, while GMP can only be build with mingw.
ExternalProject_Add(external_gmpxx
URL file://${PACKAGE_DIR}/${GMP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GMP_HASH_TYPE}=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmpxx
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_gmpxx.txt ${BUILD_DIR}/gmpxx/src/external_gmpxx/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/config_gmpxx.h ${BUILD_DIR}/gmpxx/src/external_gmpxx/config.h
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmpxx ${DEFAULT_CMAKE_FLAGS} -DGMP_LIBRARY=${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib -DGMP_INCLUDE_DIR=${BUILD_DIR}/gmp/src/external_gmp -DCMAKE_DEBUG_POSTFIX=_d
INSTALL_DIR ${LIBDIR}/gmpxx
)
set_target_properties(external_gmpxx PROPERTIES FOLDER Mingw)
add_dependencies(
external_gmpxx
external_gmp
)
ExternalProject_Add_Step(external_gmpxx after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmpxx/ ${HARVEST_TARGET}/gmp
DEPENDEES install
)
endif()

View File

@@ -1,46 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HARU_EXTRA_ARGS
-DLIBHPDF_SHARED=OFF
-DLIBHPDF_STATIC=ON
-DLIBHPDF_EXAMPLES=OFF
-DLIBHPDF_ENABLE_EXCEPTIONS=ON
)
ExternalProject_Add(external_haru
URL file://${PACKAGE_DIR}/${HARU_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${HARU_HASH_TYPE}=${HARU_HASH}
PREFIX ${BUILD_DIR}/haru
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/haru/src/external_haru < ${PATCH_DIR}/haru.diff
CMAKE_ARGS
-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/haru
${DEFAULT_CMAKE_FLAGS} ${HARU_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/haru
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_haru after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/haru/include ${HARVEST_TARGET}/haru/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/haru/lib/libhpdfs.lib ${HARVEST_TARGET}/haru/lib/libhpdfs.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -26,12 +26,15 @@ endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
@@ -41,13 +44,30 @@ if(BUILD_MODE STREQUAL Release)
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/
DEPENDS
)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
DEPENDS Package_Python
)
endif()
else(WIN32)
function(harvest from to)
@@ -90,29 +110,20 @@ harvest(freetype/include freetype/include "*.h")
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
harvest(glew/include glew/include "*.h")
harvest(glew/lib glew/lib "*.a")
harvest(gmp/include gmp/include "*.h")
harvest(gmp/lib gmp/lib "*.a")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
harvest(llvm/bin llvm/bin "clang-format")
if(BUILD_CLANG_TOOLS)
harvest(llvm/bin llvm/bin "clang-tidy")
harvest(llvm/share/clang llvm/share "run-clang-tidy.py")
endif()
harvest(clang/bin llvm/bin "clang-format")
harvest(clang/include llvm/include "*")
harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
harvest(llvm/lib llvm/lib "libclang*.a")
if(APPLE)
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
endif()
if(BLENDER_PLATFORM_ARM)
harvest(sse2neon sse2neon "*.h")
endif()
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
@@ -144,26 +155,19 @@ harvest(openimageio/include openimageio/include "*")
harvest(openimageio/lib openimageio/lib "*.a")
harvest(openimagedenoise/include openimagedenoise/include "*")
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
harvest(openjpeg/include/openjpeg-2.3 openjpeg/include "*.h")
harvest(openjpeg/lib openjpeg/lib "*.a")
harvest(opensubdiv/include opensubdiv/include "*.h")
harvest(opensubdiv/lib opensubdiv/lib "*.a")
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(nanovdb/nanovdb nanovdb/include/nanovdb "*.h")
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
harvest(osl/shaders osl/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(pugixml/include pugixml/include "*.hpp")
harvest(pugixml/lib pugixml/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(sdl/include/SDL2 sdl/include "*.h")
@@ -183,17 +187,15 @@ harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
harvest(usd/include usd/include "*.h")
harvest(usd/lib/usd usd/lib/usd "*")
harvest(usd/plugin usd/plugin "*")
harvest(potrace/include potrace/include "*.h")
harvest(potrace/lib potrace/lib "*.a")
harvest(haru/include haru/include "*.h")
harvest(haru/lib haru/lib "*.a")
if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*")
harvest(mesa/lib64 mesa/lib "*.so*")
harvest(mesa/lib mesa/lib "*.so*")
endif()
endif()

View File

@@ -0,0 +1,42 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HDF5_EXTRA_ARGS
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
)
if(WIN32)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
endif()
ExternalProject_Add(external_hdf5
URL ${HDF5_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HDF5_HASH}
PREFIX ${BUILD_DIR}/hdf5
PATCH_COMMAND ${HDF5_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hdf5
)

View File

@@ -0,0 +1,29 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HIDAPI_EXTRA_ARGS)
ExternalProject_Add(external_hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
)

View File

@@ -19,9 +19,9 @@
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL file://${PACKAGE_DIR}/${ICONV_FILE}
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ICONV_HASH_TYPE}=${ICONV_HASH}
URL_HASH MD5=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}

View File

@@ -1,85 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(ISPC_EXTRA_ARGS_WIN
-DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe
-DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe
-DARM_ENABLED=Off
)
elseif(APPLE)
# Use bison and flex installed via Homebrew.
# The ones that come with Xcode toolset are too old.
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison
-DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex
-DARM_ENABLED=On
)
else()
set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
-DARM_ENABLED=Off
)
endif()
elseif(UNIX)
set(ISPC_EXTRA_ARGS_UNIX
-DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang
-DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang++
-DARM_ENABLED=Off
)
endif()
set(ISPC_EXTRA_ARGS
-DISPC_NO_DUMPS=On
-DISPC_INCLUDE_EXAMPLES=Off
-DISPC_INCLUDE_TESTS=Off
-DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm
-DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_EXECUTABLE=${LIBDIR}/llvm/bin/clang
-DCLANGPP_EXECUTABLE=${LIBDIR}/llvm/bin/clang++
-DISPC_INCLUDE_TESTS=Off
-DCLANG_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_INCLUDE_DIRS=${LIBDIR}/llvm/include
${ISPC_EXTRA_ARGS_WIN}
${ISPC_EXTRA_ARGS_APPLE}
${ISPC_EXTRA_ARGS_UNIX}
)
ExternalProject_Add(external_ispc
URL file://${PACKAGE_DIR}/${ISPC_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ISPC_HASH_TYPE}=${ISPC_HASH}
PREFIX ${BUILD_DIR}/ispc
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ispc/src/external_ispc < ${PATCH_DIR}/ispc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ispc -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ISPC_EXTRA_ARGS} ${BUILD_DIR}/ispc/src/external_ispc
INSTALL_DIR ${LIBDIR}/ispc
)
add_dependencies(
external_ispc
ll
)
if(WIN32)
add_dependencies(
external_ispc
external_flexbison
)
endif()

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_jemalloc
URL file://${PACKAGE_DIR}/${JEMALLOC_FILE}
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JEMALLOC_HASH_TYPE}=${JEMALLOC_HASH}
URL_HASH MD5=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}

View File

@@ -18,12 +18,12 @@
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
ExternalProject_Add(external_jpeg
URL file://${PACKAGE_DIR}/${JPEG_FILE}
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JPEG_HASH_TYPE}=${JPEG_HASH}
URL_HASH MD5=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
@@ -42,21 +42,24 @@ if(WIN32)
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# cmake for unix
set(JPEG_EXTRA_ARGS
-DWITH_JPEG8=ON
-DENABLE_STATIC=ON
-DENABLE_SHARED=OFF
-DCMAKE_INSTALL_LIBDIR=${LIBDIR}/jpg/lib)
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
ExternalProject_Add(external_jpeg
URL file://${PACKAGE_DIR}/${JPEG_FILE}
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JPEG_HASH_TYPE}=${JPEG_HASH}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif()
endif(WIN32)

View File

@@ -24,9 +24,9 @@ if(MSVC)
endif()
ExternalProject_Add(external_lame
URL file://${PACKAGE_DIR}/${LAME_FILE}
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LAME_HASH_TYPE}=${LAME_HASH}
URL_HASH MD5=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full

View File

@@ -0,0 +1,31 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LCMS_EXTRA_ARGS
)
ExternalProject_Add(external_lcms
URL ${LCMS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
# Patch taken from ocio.
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms
)

View File

@@ -27,9 +27,9 @@ set(LIBGLU_EXTRA_FLAGS
)
ExternalProject_Add(external_libglu
URL file://${PACKAGE_DIR}/${LIBGLU_FILE}
URL ${LIBGLU_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LIBGLU_HASH_TYPE}=${LIBGLU_HASH}
URL_HASH MD5=${LIBGLU_HASH}
PREFIX ${BUILD_DIR}/libglu
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/libglu/src/external_libglu/ &&

View File

@@ -16,32 +16,15 @@
#
# ***** END GPL LICENSE BLOCK *****
if(BLENDER_PLATFORM_ARM)
set(LLVM_TARGETS AArch64$<SEMICOLON>ARM)
else()
set(LLVM_TARGETS X86)
endif()
if(APPLE)
set(LLVM_XML2_ARGS
-DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a
)
set(LLVM_BUILD_CLANG_TOOLS_EXTRA ^^clang-tools-extra)
set(BUILD_CLANG_TOOLS ON)
endif()
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MD
-DLLVM_USE_CRT_DEBUG=MDd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS}
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_BUILD_LLVM_C_DYLIB=OFF
-DLLVM_ENABLE_UNWIND_TABLES=OFF
-DLLVM_ENABLE_PROJECTS=clang${LLVM_BUILD_CLANG_TOOLS_EXTRA}
${LLVM_XML2_ARGS}
)
if(WIN32)
@@ -52,14 +35,11 @@ endif()
# short project name due to long filename issues on windows
ExternalProject_Add(ll
URL file://${PACKAGE_DIR}/${LLVM_FILE}
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LLVM_HASH_TYPE}=${LLVM_HASH}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
LIST_SEPARATOR ^^
PREFIX ${BUILD_DIR}/ll
SOURCE_SUBDIR llvm
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
@@ -78,11 +58,3 @@ if(MSVC)
DEPENDEES mkdir update patch download configure build install
)
endif()
# We currently do not build libxml2 on Windows.
if(APPLE)
add_dependencies(
ll
external_xml2
)
endif()

View File

@@ -19,9 +19,9 @@
set(LZMA_PATCH_CMD echo .)
ExternalProject_Add(external_lzma
URL file://${PACKAGE_DIR}/${LZMA_FILE}
URL ${LZMA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LZMA_HASH_TYPE}=${LZMA_HASH}
URL_HASH SHA256=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma

View File

@@ -20,48 +20,31 @@ set(MESA_CFLAGS "-static-libgcc")
set(MESA_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(MESA_LDFLAGS "-L${LIBDIR}/zlib/lib -pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a -l:libz_pic.a")
# The 'native-file', used for overrides with the meson build system.
# meson does not provide a way to do this using command line arguments.
#
# Note that we can't output to "${BUILD_DIR}/mesa/src/external_mesa" as
# it doesn't exist when CMake first executes.
file(WRITE ${BUILD_DIR}/mesa/tmp/native-file.ini "\
[binaries]
llvm-config = '${LIBDIR}/llvm/bin/llvm-config'"
)
set(MESA_EXTRA_FLAGS
-Dbuildtype=release
-Dc_args=${MESA_CFLAGS}
-Dcpp_args=${MESA_CXXFLAGS}
-Dc_link_args=${MESA_LDFLAGS}
-Dcpp_link_args=${MESA_LDFLAGS}
-Dglx=gallium-xlib
-Dgallium-drivers=swrast
-Ddri-drivers=
-Dvulkan-drivers=
-Dgbm=disabled
-Degl=disabled
-Dgles1=disabled
-Dgles2=disabled
-Dshared-llvm=disabled
# Without this, the build fails when: `wayland-scanner` is not found.
# At some point we will likely want to support Wayland.
# Disable for now since it's not officially supported.
-Dplatforms=x11
--native-file ${BUILD_DIR}/mesa/tmp/native-file.ini
CFLAGS=${MESA_CFLAGS}
CXXFLAGS=${MESA_CXXFLAGS}
LDFLAGS=${MESA_LDFLAGS}
--enable-glx=gallium-xlib
--with-gallium-drivers=swrast
--disable-dri
--disable-gbm
--disable-egl
--disable-gles1
--disable-gles2
--disable-llvm-shared-libs
--with-llvm-prefix=${LIBDIR}/llvm
)
ExternalProject_Add(external_mesa
URL file://${PACKAGE_DIR}/${MESA_FILE}
URL ${MESA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${MESA_HASH_TYPE}=${MESA_HASH}
URL_HASH MD5=${MESA_HASH}
PREFIX ${BUILD_DIR}/mesa
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/mesa/src/external_mesa/ &&
meson ${BUILD_DIR}/mesa/src/external_mesa-build --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa-build && ninja -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa-build && ninja install
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make install
INSTALL_DIR ${LIBDIR}/mesa
)

View File

@@ -1,54 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(NANOVDB_EXTRA_ARGS
# NanoVDB is header-only, so only need the install target
-DNANOVDB_BUILD_UNITTESTS=OFF
-DNANOVDB_BUILD_EXAMPLES=OFF
-DNANOVDB_BUILD_BENCHMARK=OFF
-DNANOVDB_BUILD_DOCS=OFF
-DNANOVDB_BUILD_TOOLS=OFF
-DNANOVDB_CUDA_KEEP_PTX=OFF
# Do not need to include any of the dependencies because of this
-DNANOVDB_USE_OPENVDB=OFF
-DNANOVDB_USE_OPENGL=OFF
-DNANOVDB_USE_OPENCL=OFF
-DNANOVDB_USE_CUDA=OFF
-DNANOVDB_USE_TBB=OFF
-DNANOVDB_USE_BLOSC=OFF
-DNANOVDB_USE_ZLIB=OFF
-DNANOVDB_USE_OPTIX=OFF
-DNANOVDB_ALLOW_FETCHCONTENT=OFF
)
ExternalProject_Add(nanovdb
URL file://${PACKAGE_DIR}/${NANOVDB_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NANOVDB_HASH_TYPE}=${NANOVDB_HASH}
PREFIX ${BUILD_DIR}/nanovdb
SOURCE_SUBDIR nanovdb
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/nanovdb ${DEFAULT_CMAKE_FLAGS} ${NANOVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/nanovdb
)
if(WIN32)
ExternalProject_Add_Step(nanovdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/nanovdb/nanovdb ${HARVEST_TARGET}/nanovdb/include/nanovdb
DEPENDEES install
)
endif()

View File

@@ -1,38 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_nasm
URL file://${PACKAGE_DIR}/${NASM_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NASM_HASH_TYPE}=${NASM_HASH}
PREFIX ${BUILD_DIR}/nasm
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/nasm/src/external_nasm < ${PATCH_DIR}/nasm.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && ./autogen.sh && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/nasm
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make -j${MAKE_THREADS} && make manpages
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make install
INSTALL_DIR ${LIBDIR}/nasm
)
if(UNIX)
# `touch nasm.1 ndisasm.1` helps to create the manual pages files, even when
# local `asciidoc` and `xmlto` packages are not installed.
ExternalProject_Add_Step(external_nasm after_configure
COMMAND ${CMAKE_COMMAND} -E touch ${BUILD_DIR}/nasm/src/external_nasm/nasm.1 ${BUILD_DIR}/nasm/src/external_nasm/ndisasm.1
DEPENDEES configure
)
endif()

View File

@@ -32,13 +32,12 @@ endif()
set(NUMPY_POSTFIX)
ExternalProject_Add(external_numpy
URL file://${PACKAGE_DIR}/${NUMPY_FILE}
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NUMPY_HASH_TYPE}=${NUMPY_HASH}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ""
@@ -47,5 +46,4 @@ ExternalProject_Add(external_numpy
add_dependencies(
external_numpy
external_python
external_python_site_packages
)

View File

@@ -17,11 +17,10 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ogg
URL file://${PACKAGE_DIR}/${OGG_FILE}
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OGG_HASH_TYPE}=${OGG_HASH}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ogg/src/external_ogg < ${PATCH_DIR}/ogg.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install

View File

@@ -46,12 +46,13 @@ if(BUILD_MODE STREQUAL Release)
endif()
ExternalProject_Add(external_openal
URL file://${PACKAGE_DIR}/${OPENAL_FILE}
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENAL_HASH_TYPE}=${OPENAL_HASH}
URL_HASH MD5=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(WIN32)

View File

@@ -23,9 +23,9 @@ if(UNIX)
endif()
ExternalProject_Add(external_opencollada
URL file://${PACKAGE_DIR}/${OPENCOLLADA_FILE}
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENCOLLADA_HASH_TYPE}=${OPENCOLLADA_HASH}
URL_HASH MD5=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}

View File

@@ -18,84 +18,95 @@
set(OPENCOLORIO_EXTRA_ARGS
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYTHON=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_BUILD_JAVA=OFF
-DBUILD_SHARED_LIBS=OFF
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
-DOCIO_BUILD_TRUELIGHT=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_TESTS=OFF
-DOCIO_BUILD_GPU_TESTS=OFF
-DOCIO_USE_SSE=ON
# Manually build ext packages except for pystring, which does not have
# a CMake or autotools build system that we can easily use.
-DOCIO_INSTALL_EXT_PACKAGES=MISSING
-DHalf_ROOT=${LIBDIR}/openexr
-DHalf_STATIC_LIBRARY=ON
-Dexpat_ROOT=${LIBDIR}/expat
-Dyaml-cpp_ROOT=${LIBDIR}/yamlcpp
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_JNIGLUE=OFF
-DOCIO_STATIC_JNIGLUE=OFF
)
if(BLENDER_PLATFORM_ARM)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_SSE=OFF
)
endif()
if(WIN32)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_BUILD_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INLINES_HIDDEN=OFF
-DOCIO_PYGLUE_LINK=OFF
-DOCIO_PYGLUE_RESPECT_ABI=OFF
-DOCIO_PYGLUE_SONAME=OFF
-DOCIO_PYGLUE_LIB_PREFIX=OFF
-DUSE_EXTERNAL_TINYXML=ON
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-DUSE_EXTERNAL_YAML=ON
-DYAML_CPP_FOUND=ON
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
# Lie because ocio cmake is demanding boost even though it is not needed.
-DYAML_CPP_VERSION=0.5.0
)
else()
set(OCIO_PATCH opencolorio.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
)
endif()
ExternalProject_Add(external_opencolorio
URL file://${PACKAGE_DIR}/${OPENCOLORIO_FILE}
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENCOLORIO_HASH_TYPE}=${OPENCOLORIO_HASH}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
)
if(NOT WIN32)
add_custom_command(
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
endif()
add_dependencies(
external_opencolorio
external_yamlcpp
external_expat
external_openexr
external_boost
)
if(WIN32)
add_dependencies(
external_opencolorio
external_tinyxml
external_yamlcpp
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/expat/lib/libexpatMD.lib ${HARVEST_TARGET}/opencolorio/lib/libexpatMD.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmdd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/expat/lib/libexpatdMD.lib ${HARVEST_TARGET}/opencolorio/lib/libexpatdMD.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)
endif()
else()
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND cp ${LIBDIR}/yamlcpp/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/
COMMAND cp ${LIBDIR}/expat/lib/libexpat.a ${LIBDIR}/opencolorio/lib/
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libpystring.a ${LIBDIR}/opencolorio/lib/
DEPENDEES install
)
endif()

View File

@@ -42,9 +42,9 @@ set(OPENEXR_EXTRA_ARGS
)
ExternalProject_Add(external_openexr
URL file://${PACKAGE_DIR}/${OPENEXR_FILE}
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENEXR_HASH_TYPE}=${OPENEXR_HASH}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr

View File

@@ -18,42 +18,26 @@
set(OIDN_EXTRA_ARGS
-DOIDN_APPS=OFF
-DWITH_EXAMPLE=OFF
-DWITH_TEST=OFF
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
-DTBB_STATIC_LIB=ON
-DOIDN_STATIC_LIB=ON
-DOIDN_STATIC_RUNTIME=OFF
-DISPC_EXECUTABLE=${LIBDIR}/ispc/bin/ispc
)
if(WIN32)
set(OIDN_EXTRA_ARGS
${OIDN_EXTRA_ARGS}
-DTBB_DEBUG_LIBRARY=${LIBDIR}/tbb/lib/tbb.lib
-DTBB_DEBUG_LIBRARY_MALLOC=${LIBDIR}/tbb/lib/tbbmalloc.lib
)
else()
set(OIDN_EXTRA_ARGS
${OIDN_EXTRA_ARGS}
-Dtbb_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/tbb_static.a
-Dtbbmalloc_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/tbbmalloc_static.a
)
endif()
ExternalProject_Add(external_openimagedenoise
URL file://${PACKAGE_DIR}/${OIDN_FILE}
URL ${OIDN_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OIDN_HASH_TYPE}=${OIDN_HASH}
URL_HASH MD5=${OIDN_HASH}
PREFIX ${BUILD_DIR}/openimagedenoise
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise < ${PATCH_DIR}/oidn.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise < ${PATCH_DIR}/openimagedenoise.diff
INSTALL_DIR ${LIBDIR}/openimagedenoise
)
add_dependencies(
external_openimagedenoise
external_tbb
external_ispc
)
if(WIN32)
@@ -62,7 +46,7 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openimagedenoise/include ${HARVEST_TARGET}/openimagedenoise/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/dnnl.lib ${HARVEST_TARGET}/openimagedenoise/lib/dnnl.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn.lib
DEPENDEES install
)
endif()
@@ -70,7 +54,7 @@ if(WIN32)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/dnnl.lib ${HARVEST_TARGET}/openimagedenoise/lib/dnnl_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn_d.lib
DEPENDEES install
)
endif()

View File

@@ -32,7 +32,7 @@ endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
@@ -49,17 +49,23 @@ endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
)
else()
set(OPENJPEG_FLAGS
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
@@ -67,15 +73,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DUSE_LIBSQUISH=OFF
-DUSE_QT5=OFF
-DUSE_NUKE=OFF
-DUSE_OPENVDB=OFF
-DUSE_BZIP2=OFF
-DUSE_FREETYPE=OFF
-DUSE_DCMTK=OFF
-DUSE_LIBHEIF=OFF
-OIIO_BUILD_CPP11=ON
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
@@ -83,12 +81,15 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_OPENCOLORIO=OFF
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
@@ -102,60 +103,49 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/openexr/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
-DUSE_EXTERNAL_PUGIXML=ON
-DPUGIXML_LIBRARY=${LIBDIR}/pugixml/lib/${LIBPREFIX}pugixml${LIBEXT}
-DPUGIXML_INCLUDE_DIR=${LIBDIR}/pugixml/include/
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
ExternalProject_Add(external_openimageio
URL file://${PACKAGE_DIR}/${OPENIMAGEIO_FILE}
URL ${OPENIMAGEIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENIMAGEIO_HASH_TYPE}=${OPENIMAGEIO_HASH}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio.diff
PATCH_COMMAND
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
add_dependencies(
external_openimageio
external_png
external_zlib
external_png external_zlib
external_openexr
external_jpeg
external_boost
external_tiff
external_pugixml
external_opencolorio
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimageio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimageio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib
DEPENDEES install
)
endif()
if(NOT WIN32)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
endif()

View File

@@ -28,9 +28,9 @@ else()
endif()
ExternalProject_Add(external_openjpeg
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENJPEG_HASH_TYPE}=${OPENJPEG_HASH}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
@@ -42,9 +42,9 @@ ExternalProject_Add(external_openjpeg
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENJPEG_HASH_TYPE}=${OPENJPEG_HASH}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc

View File

@@ -18,11 +18,10 @@
ExternalProject_Add(external_openmp
URL file://${PACKAGE_DIR}/${OPENMP_FILE}
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENMP_HASH_TYPE}=${OPENMP_HASH}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openmp/src/external_openmp < ${PATCH_DIR}/openmp.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
@@ -30,5 +29,5 @@ ExternalProject_Add(external_openmp
add_dependencies(
external_openmp
ll
external_clang
)

View File

@@ -36,7 +36,7 @@ if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.lib
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
@@ -65,9 +65,9 @@ else()
endif()
ExternalProject_Add(external_opensubdiv
URL file://${PACKAGE_DIR}/${OPENSUBDIV_FILE}
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENSUBDIV_HASH_TYPE}=${OPENSUBDIV_HASH}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv

View File

@@ -20,14 +20,6 @@ if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
if(WIN32)
set(OPENVDB_SHARED ON)
set(OPENVDB_STATIC OFF)
else()
set(OPENVDB_SHARED OFF)
set(OPENVDB_STATIC ON)
endif()
set(OPENVDB_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
@@ -35,7 +27,6 @@ set(OPENVDB_EXTRA_ARGS
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBlosc_INCLUDE_DIR=${LIBDIR}/blosc/include/
@@ -50,12 +41,8 @@ set(OPENVDB_EXTRA_ARGS
-DOPENEXR_LIBRARYDIR=${LIBDIR}/openexr/lib
# All libs live in openexr, even the ilmbase ones
-DILMBASE_LIBRARYDIR=${LIBDIR}/openexr/lib
-DOPENVDB_CORE_SHARED=${OPENVDB_SHARED}
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
-DOPENVDB_CORE_SHARED=Off
-DOPENVDB_BUILD_BINARIES=Off
-DCMAKE_DEBUG_POSTFIX=_d
-DILMBASE_USE_STATIC_LIBS=On
-DOPENEXR_USE_STATIC_LIBS=On
)
if(WIN32)
@@ -77,9 +64,9 @@ else()
endif()
ExternalProject_Add(openvdb
URL file://${PACKAGE_DIR}/${OPENVDB_FILE}
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENVDB_HASH_TYPE}=${OPENVDB_HASH}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
@@ -98,16 +85,14 @@ add_dependencies(
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include/openvdb ${HARVEST_TARGET}/openvdb/include/openvdb
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb.dll ${HARVEST_TARGET}/openvdb/bin/openvdb.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb_d.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb_d.dll ${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
DEPENDEES install
)
endif()

View File

@@ -17,12 +17,11 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
cmake_host_system_information(RESULT NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
set(MAKE_THREADS ${NUM_CORES} CACHE STRING "Number of threads to run make with")
option(WITH_EMBREE "Enable building of Embree" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
@@ -36,24 +35,22 @@ else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
endif()
set(DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/downloads" CACHE STRING "Path for downloaded files")
# This path must be hard-coded like this, so that the GNUmakefile knows where it is and can pass it to make_source_archive.py:
set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages")
option(PACKAGE_USE_UPSTREAM_SOURCES "Use soures upstream to download the package sources, when OFF the blender mirror will be used" ON)
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
file(TO_CMAKE_PATH ${PACKAGE_DIR} PACKAGE_DIR)
set(PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
message("LIBDIR = ${LIBDIR}")
message("DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
message("PACKAGE_DIR = ${PACKAGE_DIR}")
message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(LIBEXT ".lib")
set(LIBPREFIX "")
@@ -63,7 +60,7 @@ if(WIN32)
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
string(APPEND COMMON_MSVC_FLAGS " /bigobj")
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
@@ -86,10 +83,17 @@ if(WIN32)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
@@ -121,44 +125,20 @@ else()
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND xcodebuild -version -sdk macosx SDKVersion
OUTPUT_VARIABLE MACOSX_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT CMAKE_OSX_ARCHITECTURES)
execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Detected native architecture ${ARCHITECTURE}.")
set(CMAKE_OSX_ARCHITECTURES "${ARCHITECTURE}")
endif()
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(OSX_DEPLOYMENT_TARGET 10.13)
else()
set(OSX_DEPLOYMENT_TARGET 11.00)
endif()
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.11)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(BLENDER_PLATFORM_ARM ON)
endif()
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++ -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin17.0.0) # OS X 10.13
else()
set(PLATFORM_BUILD_TARGET --build=aarch64-apple-darwin20.0.0) # macOS 11.00
endif()
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin15.0.0) # OS X 10.11
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
set(BLENDER_PLATFORM_ARM ON)
endif()
set(PLATFORM_CFLAGS "-fPIC")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
@@ -187,7 +167,6 @@ else()
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export MACOSX_SDK_VERSION=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
@@ -210,6 +189,18 @@ set(DEFAULT_CMAKE_FLAGS
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
# We need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_opus
URL file://${PACKAGE_DIR}/${OPUS_FILE}
URL ${OPUS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPUS_HASH_TYPE}=${OPUS_HASH}
URL_HASH SHA256=${OPUS_HASH}
PREFIX ${BUILD_DIR}/opus
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/opus
--disable-shared

View File

@@ -19,7 +19,12 @@
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
else()
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
@@ -29,6 +34,7 @@ else()
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/openexr/lib/Imath${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Half{OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/IlmThread${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Iex${OPENEXR_VERSION_POSTFIX}.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}")
set(OSL_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
@@ -38,9 +44,13 @@ set(OSL_EXTRA_ARGS
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DOpenEXR_ROOT=${LIBDIR}/openexr/
-DIlmBase_ROOT=${LIBDIR}/openexr/
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
@@ -48,39 +58,44 @@ set(OSL_EXTRA_ARGS
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOpenImageIO_ROOT=${LIBDIR}/openimageio/
-DOSL_BUILD_TESTS=OFF
-DOSL_BUILD_MATERIALX=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_INCLUDE_DIR=${LIBDIR}/openimageio/include
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILD_SHARED_LIBS=OFF
-DBUILDSTATIC=ON
${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=OFF
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DLLVM_ROOT=${LIBDIR}/llvm/
-DLLVM_DIRECTORY=${LIBDIR}/llvm/
-DUSE_PARTIO=OFF
-DUSE_QT=OFF
-DUSE_Qt5=OFF
-DINSTALL_DOCS=OFF
${OSL_SIMD_FLAGS}
-Dpugixml_ROOT=${LIBDIR}/pugixml
-DUSE_PYTHON=OFF
-DPARTIO_LIBRARIES=
)
# Apple arm64 uses LLVM 11, LLVM 10+ requires C++14
if (APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
list(APPEND OSL_EXTRA_ARGS -DCMAKE_CXX_STANDARD=14)
if(WIN32)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
)
endif()
ExternalProject_Add(external_osl
URL file://${PACKAGE_DIR}/${OSL_FILE}
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH ${OSL_HASH_TYPE}=${OSL_HASH}
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
@@ -91,13 +106,22 @@ add_dependencies(
external_osl
external_boost
ll
external_clang
external_openexr
external_zlib
external_flexbison
external_openimageio
external_pugixml
)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
add_dependencies(
external_osl
external_pugixml
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install

View File

@@ -22,14 +22,10 @@ set(PNG_EXTRA_ARGS
-DPNG_STATIC=ON
)
if(BLENDER_PLATFORM_ARM)
set(PNG_EXTRA_ARGS ${PNG_EXTRA_ARGS} -DPNG_HARDWARE_OPTIMIZATIONS=ON -DPNG_ARM_NEON=ON -DCMAKE_SYSTEM_PROCESSOR="aarch64")
endif()
ExternalProject_Add(external_png
URL file://${PACKAGE_DIR}/${PNG_FILE}
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PNG_HASH_TYPE}=${PNG_HASH}
URL_HASH MD5=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png

View File

@@ -1,38 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(POTRACE_EXTRA_ARGS
)
if((WIN32 AND BUILD_MODE STREQUAL Release) OR UNIX)
ExternalProject_Add(external_potrace
URL file://${PACKAGE_DIR}/${POTRACE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${POTRACE_HASH_TYPE}=${POTRACE_HASH}
PREFIX ${BUILD_DIR}/potrace
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_potrace.txt ${BUILD_DIR}/potrace/src/external_potrace/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/potrace ${DEFAULT_CMAKE_FLAGS} ${POTRACE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/potrace
)
if(WIN32)
ExternalProject_Add_Step(external_potrace after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/potrace ${HARVEST_TARGET}/potrace
DEPENDEES install
)
endif()
endif()

View File

@@ -24,15 +24,14 @@ if(WIN32)
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
ExternalProject_Add(external_pthreads
URL file://${PACKAGE_DIR}/${PTHREADS_FILE}
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PTHREADS_HASH_TYPE}=${PTHREADS_HASH}
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&

View File

@@ -20,9 +20,9 @@ set(PUGIXML_EXTRA_ARGS
)
ExternalProject_Add(external_pugixml
URL file://${PACKAGE_DIR}/${PUGIXML_FILE}
URL ${PUGIXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PUGIXML_HASH_TYPE}=${PUGIXML_HASH}
URL_HASH MD5=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
@@ -30,14 +30,14 @@ ExternalProject_Add(external_pugixml
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pugixml ${HARVEST_TARGET}/pugixml
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/pugixml/lib/pugixml_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install
)
endif()
endif()
endif()
endif()

View File

@@ -37,23 +37,18 @@ if(WIN32)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
ExternalProject_Add(external_python
URL file://${PACKAGE_DIR}/${PYTHON_FILE}
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PYTHON_HASH_TYPE}=${PYTHON_HASH}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p x64 -c ${BUILD_MODE}
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-stable --include-pip --include-dev --include-launchers --include-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-underpth --include-stable --include-pip --include-dev --include-launchers --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)
else()
if(APPLE)
# Disable functions that can be in 10.13 sdk but aren't available on 10.9 target.
#
# Disable libintl (gettext library) as it might come from Homebrew, which makes
# it so test program compiles, but the Python does not. This is because for Python
# we use isysroot, which seems to forbid using libintl.h.
# The gettext functionality seems to come from CoreFoundation, so should be all fine.
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
@@ -65,34 +60,28 @@ else()
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no &&
export ac_cv_header_libintl_h=no &&
export ac_cv_lib_intl_textdomain=no
)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(PYTHON_FUNC_CONFIGS ${PYTHON_FUNC_CONFIGS} && export PYTHON_DECIMAL_WITH_MACHINE=ansi64)
endif()
export ac_cv_func_timingsafe_bcmp=no)
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
# Link against zlib statically (Unix). Avoid rpath issues (macOS).
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_unix.diff)
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include ${PLATFORM_CFLAGS}")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib ${PLATFORM_LDFLAGS}")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
ExternalProject_Add(external_python
URL file://${PACKAGE_DIR}/${PYTHON_FILE}
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PYTHON_HASH_TYPE}=${PYTHON_HASH}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}

View File

@@ -16,27 +16,14 @@
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(SITE_PACKAGES_EXTRA --global-option build --global-option --debug)
endif()
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
)
if(USE_PIP_NUMPY)
# Use only wheel (and not build from source) to stop NumPy from linking against buggy
# Accelerate framework backend on macOS. Official wheels are built with OpenBLAS.
ExternalProject_Add_Step(external_python_site_packages after_install
COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir numpy==${NUMPY_VERSION} --only-binary :all:
DEPENDEES install
)
endif()
add_dependencies(
external_python_site_packages
external_python

View File

@@ -30,9 +30,9 @@ else()
endif()
ExternalProject_Add(external_sdl
URL file://${PACKAGE_DIR}/${SDL_FILE}
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SDL_HASH_TYPE}=${SDL_HASH}
URL_HASH MD5=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}

View File

@@ -0,0 +1,227 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################################
# Mingw32 Builds
####################################################################################################################
# This installs mingw32+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw32")
# download mingw32
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://astuteinternet.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.4/threads-win32/sjlj/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw32
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z"))
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win32/nasm-2.13.02-win32.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd")
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl32/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
endif()
message("checking i686-w64-mingw32-strings")
# copy strings.exe to i686-w64-mingw32-strings for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe")
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
endif()
message("checking i686-w64-mingw32-ar.exe")
# copy ar.exe to i686-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe")
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
endif()
message("checking i686-w64-mingw32-strip.exe")
# copy strip.exe to i686-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe")
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
endif()
message("checking i686-w64-mingw32-ranlib.exe")
# copy ranlib.exe to i686-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -19,7 +19,7 @@
####################################################################################################################
# Mingw64 Builds
####################################################################################################################
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/fftw3
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
@@ -128,14 +128,6 @@ if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "$
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe"))
message("Installing m4")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-m4
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")

View File

@@ -34,9 +34,9 @@ else()
endif()
ExternalProject_Add(external_sndfile
URL file://${PACKAGE_DIR}/${SNDFILE_FILE}
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SNDFILE_HASH_TYPE}=${SNDFILE_HASH}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
@@ -60,14 +60,3 @@ if(UNIX)
external_flac
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sndfile after_install
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
DEPENDEES install
)
endif()

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_spnav
URL file://${PACKAGE_DIR}/${SPNAV_FILE}
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SPNAV_HASH_TYPE}=${SPNAV_HASH}
URL_HASH MD5=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}

View File

@@ -42,29 +42,16 @@ if(UNIX)
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS
${SQLITE_CONFIGURATION_ARGS}
--enable-threadsafe
--enable-load-extension
--enable-json1
--enable-fts4
--enable-fts5
# While building `tcl` is harmless, it causes problems when the install step
# tries to copy the files into the system path.
# Since this isn't required by Python or Blender this can be disabled.
# Note that Debian (for example), splits this off into a separate package,
# so it's safe to turn off.
--disable-tcl
--enable-shared=no
)
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
--enable-shared=no)
endif()
ExternalProject_Add(external_sqlite
URL file://${PACKAGE_DIR}/${SQLITE_FILE}
URL ${SQLITE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SQLITE_HASH_TYPE}=${SQLITE_HASH}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/sqlite/src/external_sqlite < ${PATCH_DIR}/sqlite.diff
PATCH_COMMAND ${SQLITE_PATCH_CMD}
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install

View File

@@ -1,28 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_sse2neon
GIT_REPOSITORY ${SSE2NEON_GIT}
GIT_TAG ${SSE2NEON_GIT_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/sse2neon
CONFIGURE_COMMAND echo sse2neon - Nothing to configure
BUILD_COMMAND echo sse2neon - nothing to build
INSTALL_COMMAND mkdir -p ${LIBDIR}/sse2neon && cp ${BUILD_DIR}/sse2neon/src/external_sse2neon/sse2neon.h ${LIBDIR}/sse2neon
INSTALL_DIR ${LIBDIR}/sse2neon
)

View File

@@ -20,11 +20,9 @@ set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-${CMAKE_OSX_ARCHITECTURES}")
set(SSL_OS_COMPILER "blender-darwin-x86_64")
else()
if(BLENDER_PLATFORM_ARM)
set(SSL_OS_COMPILER "blender-linux-aarch64")
elseif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
@@ -33,9 +31,9 @@ else()
endif()
ExternalProject_Add(external_ssl
URL file://${PACKAGE_DIR}/${SSL_FILE}
URL ${SSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SSL_HASH_TYPE}=${SSL_HASH}
URL_HASH SHA256=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl

View File

@@ -1,4 +1,4 @@
my %targets = (
%targets = (
"blender-linux-x86" => {
inherit_from => [ "linux-x86" ],
@@ -8,18 +8,8 @@ my %targets = (
inherit_from => [ "linux-x86_64" ],
cflags => add("-fPIC"),
},
"blender-linux-aarch64" => {
inherit_from => [ "linux-aarch64" ],
cxxflags => add("-fPIC"),
cflags => add("-fPIC"),
},
"blender-darwin-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc" ],
cflags => add("-fPIC"),
},
"blender-darwin-arm64" => {
inherit_from => [ "darwin-common" ],
cxxflags => add("-fPIC -arch arm64"),
cflags => add("-fPIC -arch arm64"),
},
);

View File

@@ -20,32 +20,25 @@ if(WIN32)
-DTBB_BUILD_SHARED=On
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=On
-DTBB_BUILD_STATIC=Off
-DTBB_BUILD_TESTS=Off
)
set(TBB_LIBRARY tbb)
set(TBB_STATIC_LIBRARY Off)
-DTBB_BUILD_STATIC=On
)
else()
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
-DTBB_BUILD_TESTS=Off
)
set(TBB_LIBRARY tbb_static)
set(TBB_STATIC_LIBRARY On)
endif()
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL file://${PACKAGE_DIR}/${TBB_FILE}
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${TBB_HASH_TYPE}=${TBB_HASH}
URL_HASH MD5=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/build/version_string.ver.in &&
${PATCH_CMD} -p 1 -d ${BUILD_DIR}/tbb/src/external_tbb < ${PATCH_DIR}/tbb.diff
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)
@@ -53,15 +46,7 @@ ExternalProject_Add(external_tbb
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
# findtbb.cmake in some deps *NEEDS* to find tbb_debug.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.dll
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
@@ -72,12 +57,7 @@ if(WIN32)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
# findtbb.cmake in some deps *NEEDS* to find tbb.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.dll ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll

View File

@@ -23,11 +23,10 @@ else()
endif()
ExternalProject_Add(external_theora
URL file://${PACKAGE_DIR}/${THEORA_FILE}
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${THEORA_HASH_TYPE}=${THEORA_HASH}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/theora/src/external_theora < ${PATCH_DIR}/theora.diff
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static

View File

@@ -16,12 +16,6 @@
#
# ***** END GPL LICENSE BLOCK *****
if(WITH_WEBP)
set(WITH_TIFF_WEBP ON)
else()
set(WITH_TIFF_WEBP OFF)
endif()
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
@@ -29,14 +23,12 @@ set(TIFF_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
-Dzstd=OFF
-Dwebp=${WITH_TIFF_WEBP}
)
ExternalProject_Add(external_tiff
URL file://${PACKAGE_DIR}/${TIFF_FILE}
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${TIFF_HASH_TYPE}=${TIFF_HASH}
URL_HASH MD5=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff

View File

@@ -0,0 +1,31 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TINYXML_EXTRA_ARGS
)
ExternalProject_Add(external_tinyxml
URL ${TINYXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
# patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml
)

View File

@@ -22,14 +22,9 @@ set(USD_EXTRA_ARGS
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
# USD wants the tbb debug lib set even when you are doing a release build
# Otherwise it will error out during the cmake configure phase.
-DTBB_LIBRARIES_DEBUG=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
# This is a preventative measure that avoids possible conflicts when add-ons
# try to load another USD library into the same process space.
@@ -53,9 +48,9 @@ set(USD_EXTRA_ARGS
)
ExternalProject_Add(external_usd
URL file://${PACKAGE_DIR}/${USD_FILE}
URL ${USD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${USD_HASH_TYPE}=${USD_HASH}
URL_HASH MD5=${USD_HASH}
PREFIX ${BUILD_DIR}/usd
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/usd/src/external_usd < ${PATCH_DIR}/usd.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/usd -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${USD_EXTRA_ARGS}
@@ -81,14 +76,14 @@ if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/ ${HARVEST_TARGET}/usd
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Release/usd_m.lib ${HARVEST_TARGET}/usd/lib/libusd_m.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Release/libusd_m.lib ${HARVEST_TARGET}/usd/lib/libusd_m.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/lib ${HARVEST_TARGET}/usd/lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Debug/usd_m_d.lib ${HARVEST_TARGET}/usd/lib/libusd_m_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Debug/libusd_m_d.lib ${HARVEST_TARGET}/usd/lib/libusd_m_d.lib
DEPENDEES install
)
endif()

View File

@@ -19,54 +19,37 @@
set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(ZLIB_HASH_TYPE MD5)
set(ZLIB_FILE zlib-${ZLIB_VERSION}.tar.gz)
set(OPENAL_VERSION 1.20.1)
set(OPENAL_VERSION 1.18.2)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH 556695068ce8375b89986083d810fd35)
set(OPENAL_HASH_TYPE MD5)
set(OPENAL_FILE openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH d4eeb0889812e2fdeaa1843523d76190)
set(PNG_VERSION 1.6.37)
set(PNG_VERSION 1.6.35)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
set(PNG_HASH 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca)
set(PNG_HASH_TYPE SHA256)
set(PNG_FILE libpng-${PNG_VERSION}.tar.xz)
set(PNG_HASH 678b7e696a62a193ed3503b04bf449d6)
set(JPEG_VERSION 2.0.4)
set(JPEG_VERSION 1.5.3)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 44c43e4a9fb352f47090804529317c88)
set(JPEG_HASH_TYPE MD5)
set(JPEG_FILE libjpeg-turbo-${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 5b7549d440b86c98a517355c102d155e)
set(BOOST_VERSION 1.73.0)
set(BOOST_VERSION_NODOTS 1_73_0)
set(BOOST_VERSION_NODOTS_SHORT 1_73)
set(BOOST_VERSION 1.70.0)
set(BOOST_VERSION_NODOTS 1_70_0)
set(BOOST_VERSION_NODOTS_SHORT 1_70)
set(BOOST_URI https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH 4036cd27ef7548b8d29c30ea10956196)
set(BOOST_HASH_TYPE MD5)
set(BOOST_FILE boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH fea771fe8176828fabf9c09242ee8c26)
# Using old version as recommended by OpenVDB build documentation.
set(BLOSC_VERSION 1.5.0)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
set(BLOSC_HASH 6e4a49c8c06f05aa543f3312cfce3d55)
set(BLOSC_HASH_TYPE MD5)
set(BLOSC_FILE blosc-${BLOSC_VERSION}.tar.gz)
set(PTHREADS_VERSION 3.0.0)
set(PTHREADS_URI http://prdownloads.sourceforge.net/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(PTHREADS_HASH_TYPE MD5)
set(PTHREADS_FILE pthreads4w-code-${PTHREADS_VERSION}.zip)
set(OPENEXR_VERSION 2.5.5)
set(OPENEXR_VERSION 2.4.0)
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH 85e8a979092c9055d10ed103062d31a0)
set(OPENEXR_HASH_TYPE MD5)
set(OPENEXR_FILE openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH 9e4d69cf2a12c6fb19b98af7c5e0eaee)
if(WIN32)
# Openexr started appending _d on its own so now
# we need to tell the build the postfix is _s while
@@ -83,416 +66,255 @@ else()
set(OPENEXR_VERSION_POSTFIX)
endif()
set(FREETYPE_VERSION 2.10.2)
set(FREETYPE_VERSION 2.10.1)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH b1cb620e4c875cd4d1bfa04945400945)
set(FREETYPE_HASH_TYPE MD5)
set(FREETYPE_FILE freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH c50a3c9e5e62bdc938a6e1598a782947)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066)
set(GLEW_HASH_TYPE MD5)
set(GLEW_FILE glew-${GLEW_VERSION}.tgz)
set(FREEGLUT_VERSION 3.0.0)
set(FREEGLUT_URI http://prdownloads.sourceforge.net/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_URI http://pilotfiber.dl.sourceforge.net/project/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(FREEGLUT_HASH_TYPE MD5)
set(FREEGLUT_FILE freeglut-${FREEGLUT_VERSION}.tar.gz)
set(ALEMBIC_VERSION 1.7.16)
set(HDF5_VERSION 1.8.17)
set(HDF5_URI https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz)
set(HDF5_HASH 7d572f8f3b798a628b8245af0391a0ca)
set(ALEMBIC_VERSION 1.7.12)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_HASH effcc86e42fe6605588e3de57bde6677)
set(ALEMBIC_HASH_TYPE MD5)
set(ALEMBIC_FILE alembic-${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_MD5 e2b3777f23c5c09481a008cc6f0f8a40)
# hash is for 3.1.2
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
set(GLFW_HASH_TYPE MD5)
set(GLFW_FILE glfw-${GLFW_GIT_UID}.zip)
# latest uid in git as of 2016-04-01
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
set(CLEW_HASH_TYPE MD5)
set(CLEW_FILE clew-${CLEW_GIT_UID}.zip)
# latest uid in git as of 2016-04-01
set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(CUEW_HASH_TYPE MD5)
set(CUEW_FILE cuew-${CUEW_GIT_UID}.zip)
set(OPENSUBDIV_VERSION v3_4_3)
set(OPENSUBDIV_VERSION v3_4_0_RC2)
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(OPENSUBDIV_HASH 7bbfa275d021fb829e521df749160edb)
set(OPENSUBDIV_HASH_TYPE MD5)
set(OPENSUBDIV_FILE opensubdiv-${OPENSUBDIV_VERSION}.tar.gz)
set(SDL_VERSION 2.0.12)
set(SDL_VERSION 2.0.8)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 783b6f2df8ff02b19bb5ce492b99c8ff)
set(SDL_HASH_TYPE MD5)
set(SDL_FILE SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 3800d705cef742c6a634f202c37f263f)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
set(OPENCOLLADA_HASH_TYPE MD5)
set(OPENCOLLADA_FILE opencollada-${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLORIO_VERSION 2.0.0)
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 1a2e3478b6cd9a1549f24e1b2205e3f0)
set(OPENCOLORIO_HASH_TYPE MD5)
set(OPENCOLORIO_FILE OpenColorIO-${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_VERSION 1.1.0)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 802d8f5b1d1fe316ec5f76511aa611b8)
if(BLENDER_PLATFORM_ARM)
# Newer version required by ISPC with arm support.
set(LLVM_VERSION 11.0.1)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH e700af40ab83463e4e9ab0ba3708312e)
set(LLVM_HASH_TYPE MD5)
set(LLVM_FILE llvm-project-${LLVM_VERSION}.src.tar.xz)
set(LLVM_VERSION 9.0.1)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH 31eb9ce73dd2a0f8dcab8319fb03f8fc)
set(OPENMP_VERSION 9.0.1)
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${OPENMP_VERSION}/openmp-${OPENMP_VERSION}.src.tar.xz)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
set(OPENMP_HASH_TYPE MD5)
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
else()
set(LLVM_VERSION 9.0.1)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.tar.xz)
set(LLVM_HASH b4268e733dfe352960140dc07ef2efcb)
set(LLVM_HASH_TYPE MD5)
set(LLVM_FILE llvm-project-${LLVM_VERSION}.tar.xz)
set(CLANG_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz)
set(CLANG_HASH 13468e4a44940efef1b75e8641752f90)
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
set(OPENMP_HASH_TYPE MD5)
set(OPENMP_FILE openmp-${LLVM_VERSION}.src.tar.xz)
endif()
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
set(OPENIMAGEIO_VERSION 2.1.15.0)
set(OPENIMAGEIO_VERSION 1.8.13)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH f03aa5e3ac4795af04771ee4146e9832)
set(OPENIMAGEIO_HASH_TYPE MD5)
set(OPENIMAGEIO_FILE OpenImageIO-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH f5526c3c9878029ee900d84856683f93)
set(TIFF_VERSION 4.1.0)
set(TIFF_VERSION 4.0.9)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424)
set(TIFF_HASH_TYPE MD5)
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 54bad211279cc93eb4fca31ba9bfdc79)
set(OSL_VERSION 1.11.10.0)
set(OSL_VERSION 1.10.9)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH dfdc23597aeef083832cbada62211756)
set(OSL_HASH_TYPE MD5)
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
set(OSL_HASH a94f1e8506f7e8f5e993653de5c5fa00)
set(PYTHON_VERSION 3.9.2)
set(PYTHON_SHORT_VERSION 3.9)
set(PYTHON_SHORT_VERSION_NO_DOTS 39)
set(PYTHON_VERSION 3.7.4)
set(PYTHON_SHORT_VERSION 3.7)
set(PYTHON_SHORT_VERSION_NO_DOTS 37)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH f0dc9000312abeb16de4eccce9a870ab)
set(PYTHON_HASH_TYPE MD5)
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
set(TBB_VERSION 2020_U2)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 1b711ae956524855088df3bbf5ec65dc)
set(TBB_HASH_TYPE MD5)
set(TBB_FILE oneTBB-${TBB_VERSION}.tar.gz)
set(TBB_VERSION 2019_U9)
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 584edbec127c508f2cd5b6e79ad200fc)
set(OPENVDB_VERSION 8.0.1)
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 01b490be16cc0e15c690f9a153c21461)
set(OPENVDB_HASH_TYPE MD5)
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_VERSION 7.0.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH fd6c4f168282f7e0e494d290cd531fa8)
set(NANOVDB_GIT_UID e62f7a0bf1e27397223c61ddeaaf57edf111b77f)
set(NANOVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_GIT_UID}.tar.gz)
set(NANOVDB_HASH 90919510bc6ccd630fedc56f748cb199)
set(NANOVDB_HASH_TYPE MD5)
set(NANOVDB_FILE nano-vdb-${NANOVDB_GIT_UID}.tar.gz)
set(IDNA_VERSION 2.8)
set(CHARDET_VERSION 3.0.4)
set(URLLIB3_VERSION 1.25.3)
set(CERTIFI_VERSION 2019.6.16)
set(REQUESTS_VERSION 2.22.0)
set(IDNA_VERSION 2.10)
set(CHARDET_VERSION 4.0.0)
set(URLLIB3_VERSION 1.26.3)
set(CERTIFI_VERSION 2020.12.5)
set(REQUESTS_VERSION 2.25.1)
set(CYTHON_VERSION 0.29.21)
set(NUMPY_VERSION 1.19.5)
set(NUMPY_SHORT_VERSION 1.19)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
set(NUMPY_HASH f6a1b48717c552bbc18f1adc3cc1fe0e)
set(NUMPY_HASH_TYPE MD5)
set(NUMPY_FILE numpy-${NUMPY_VERSION}.zip)
set(NUMPY_VERSION v1.17.0)
set(NUMPY_SHORT_VERSION 1.17)
set(NUMPY_URI https://files.pythonhosted.org/packages/da/32/1b8f2bb5fb50e4db68543eb85ce37b9fa6660cd05b58bddfafafa7ed62da/numpy-1.17.0.zip)
set(NUMPY_HASH aed49b31bcb44ec73b8155be78566135)
set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
set(LAME_HASH_TYPE MD5)
set(LAME_FILE lame-${LAME_VERSION}.tar.gz)
set(OGG_VERSION 1.3.4)
set(OGG_VERSION 1.3.3)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e)
set(OGG_HASH_TYPE SHA256)
set(OGG_FILE libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_HASH 6ed40e0241089a42c48604dc00e362beee00036af2d8b3f46338031c9e0351cb)
set(VORBIS_HASH_TYPE SHA256)
set(VORBIS_FILE libvorbis-${VORBIS_VERSION}.tar.gz)
set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(THEORA_HASH_TYPE SHA256)
set(THEORA_FILE libtheora-${THEORA_VERSION}.tar.bz2)
set(FLAC_VERSION 1.3.3)
set(FLAC_VERSION 1.3.2)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748)
set(FLAC_HASH_TYPE SHA256)
set(FLAC_FILE flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f)
set(VPX_VERSION 1.8.2)
set(VPX_VERSION 1.7.0)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac)
set(VPX_HASH_TYPE SHA256)
set(VPX_FILE libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 1fec931eb5c94279ad219a5b6e0202358e94a93a90cfb1603578c326abfc1238)
set(OPUS_VERSION 1.3.1)
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(OPUS_HASH_TYPE SHA256)
set(OPUS_FILE opus-${OPUS_VERSION}.tar.gz)
set(X264_VERSION 33f9e1474613f59392be5ab6a7e7abf60fa63622)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/${X264_VERSION}/x264-${X264_VERSION}.tar.gz)
set(X264_HASH 5456450ee1ae02cd2328be3157367a232a0ab73315e8c8f80dab80469524f525)
set(X264_HASH_TYPE SHA256)
set(X264_FILE x264-${X264_VERSION}.tar.gz)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180811-2245-stable.tar.bz2)
set(X264_HASH ae8a868a0e236a348b35d79f3ee80294b169d1195408b689f9851383661ed7aa)
set(XVIDCORE_VERSION 1.3.7)
set(XVIDCORE_URI https://downloads.xvid.com/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d)
set(XVIDCORE_HASH_TYPE SHA256)
set(XVIDCORE_FILE xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_VERSION 1.3.5)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0)
set(OPENJPEG_VERSION 2.3.1)
# This has to be in sync with the version in blenders /extern folder.
set(OPENJPEG_VERSION 2.3.0)
set(OPENJPEG_SHORT_VERSION 2.3)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9)
set(OPENJPEG_HASH_TYPE SHA256)
set(OPENJPEG_FILE openjpeg-v${OPENJPEG_VERSION}.tar.gz)
# Use slightly newer commit after release which includes a cmake fix
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/66297f07a43.zip)
set(OPENJPEG_HASH 8242b18d908c7c42174e4231a741cfa7ce7c26b6ed5c9644feb9df7b3054310b)
set(FFMPEG_VERSION 4.2.3)
set(FAAD_VERSION 2-2.8.8)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.gz)
set(FAAD_HASH 28f6116efdbe9378269f8a6221767d1f)
set(FFMPEG_VERSION 4.0.2)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 695fad11f3baf27784e24cb0e977b65a)
set(FFMPEG_HASH_TYPE MD5)
set(FFMPEG_FILE ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 5576e8a22f80b6a336db39808f427cfb)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
set(FFTW_HASH_TYPE MD5)
set(FFTW_FILE fftw-${FFTW_VERSION}.tar.gz)
set(ICONV_VERSION 1.16)
set(ICONV_VERSION 1.15)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
set(ICONV_HASH_TYPE MD5)
set(ICONV_FILE libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH ace8b5f2db42f7b3b3057585e80d9808)
set(LAPACK_VERSION 3.6.0)
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
set(LAPACK_HASH f2f6c67134e851fe189bb3ca1fbb5101)
set(SNDFILE_VERSION 1.0.28)
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
set(SNDFILE_HASH_TYPE MD5)
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.gz)
# set(HIDAPI_VERSION 0.8.0-rc1)
# set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
# set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
set(HIDAPI_HASH b6e22f6b514f8bcf594989f20ffc46fb)
set(WEBP_VERSION 0.6.1)
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_HASH b49ce9c3e3e9acae4d91bca44bb85a72)
set(WEBP_HASH_TYPE MD5)
set(WEBP_FILE libwebp-${WEBP_VERSION}.tar.gz)
set(SPNAV_VERSION 0.2.3)
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
set(SPNAV_HASH_TYPE MD5)
set(SPNAV_FILE libspnav-${SPNAV_VERSION}.tar.gz)
set(JEMALLOC_VERSION 5.2.1)
set(JEMALLOC_VERSION 5.0.1)
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(JEMALLOC_HASH 3d41fbf006e6ebffd489bdb304d009ae)
set(JEMALLOC_HASH_TYPE MD5)
set(JEMALLOC_FILE jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
set(XML2_VERSION 2.9.10)
set(XML2_VERSION 2.9.4)
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH 10942a1dc23137a8aa07f0639cbfece5)
set(XML2_HASH_TYPE MD5)
set(XML2_FILE libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
set(TINYXML_VERSION 2_6_2)
set(TINYXML_VERSION_DOTS 2.6.2)
set(TINYXML_URI https://nchc.dl.sourceforge.net/project/tinyxml/tinyxml/${TINYXML_VERSION_DOTS}/tinyxml_${TINYXML_VERSION}.tar.gz)
set(TINYXML_HASH c1b864c96804a10526540c664ade67f0)
set(TINYXML_HASH_TYPE MD5)
set(TINYXML_FILE tinyxml_${TINYXML_VERSION}.tar.gz)
set(YAMLCPP_VERSION 0.6.3)
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
set(YAMLCPP_HASH b45bf1089a382e81f6b661062c10d0c2)
set(YAMLCPP_HASH_TYPE MD5)
set(YAMLCPP_FILE yaml-cpp-${YAMLCPP_VERSION}.tar.gz)
set(EXPAT_VERSION 2_2_10)
set(EXPAT_URI https://github.com/libexpat/libexpat/archive/R_${EXPAT_VERSION}.tar.gz)
set(EXPAT_HASH 7ca5f09959fcb9a57618368deb627b9f)
set(EXPAT_HASH_TYPE MD5)
set(EXPAT_FILE libexpat-${EXPAT_VERSION}.tar.gz)
set(LCMS_VERSION 2.9)
set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
set(LCMS_HASH 8de1b7724f578d2995c8fdfa35c3ad0e)
set(PUGIXML_VERSION 1.10)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v${PUGIXML_VERSION}.tar.gz)
set(PUGIXML_HASH 0c208b0664c7fb822bf1b49ad035e8fd)
set(PUGIXML_HASH_TYPE MD5)
set(PUGIXML_FILE pugixml-${PUGIXML_VERSION}.tar.gz)
set(PUGIXML_VERSION 1.9)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v1.9.tar.gz)
set(PUGIXML_HASH 9346ca1dce2c48f1748c12fdac41a714)
set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison/win_flex_bison-${FLEXBISON_VERSION}.zip)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
set(FLEXBISON_HASH_TYPE MD5)
set(FLEXBISON_FILE win_flex_bison-${FLEXBISON_VERSION}.zip)
# Libraries to keep Python modules static on Linux.
# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download
# sources from Debian packaging.
set(BZIP2_VERSION 1.0.8)
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.gz)
set(BZIP2_HASH ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269)
set(BZIP2_HASH_TYPE SHA256)
set(BZIP2_FILE bzip2_${BZIP2_VERSION}.orig.tar.gz)
set(BZIP2_VERSION 1.0.6)
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.bz2)
set(BZIP2_HASH d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7)
set(FFI_VERSION 3.3)
set(FFI_VERSION 3.2.1)
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056)
set(FFI_HASH_TYPE SHA256)
set(FFI_FILE libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37)
set(LZMA_VERSION 5.2.5)
set(LZMA_VERSION 5.2.4)
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
set(LZMA_HASH_TYPE SHA256)
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HASH 3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf)
if(BLENDER_PLATFORM_ARM)
# Need at least 1.1.1i for aarch64 support (https://github.com/openssl/openssl/pull/13218)
set(SSL_VERSION 1.1.1i)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242)
set(SSL_HASH_TYPE SHA256)
set(SSL_FILE openssl-${SSL_VERSION}.tar.gz)
else()
set(SSL_VERSION 1.1.1g)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46)
set(SSL_HASH_TYPE SHA256)
set(SSL_FILE openssl-${SSL_VERSION}.tar.gz)
endif()
set(SSL_VERSION 1.1.0i)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99)
set(SQLITE_VERSION 3.31.1)
set(SQLITE_VERSION 3.24.0)
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
set(SQLITE_HASH_TYPE SHA1)
set(SQLITE_FILE sqlite-src-3240000.zip)
set(EMBREE_VERSION 3.10.0)
set(EMBREE_VERSION 3.2.4)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH 4bbe29e7eaa46417efc75fc5f1e8eb87)
set(EMBREE_HASH_TYPE MD5)
set(EMBREE_FILE embree-v${EMBREE_VERSION}.zip)
set(EMBREE_ARM_GIT https://github.com/brechtvl/embree.git)
set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)
set(USD_VERSION 21.02)
set(USD_VERSION 19.11)
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
set(USD_HASH 1dd1e2092d085ed393c1f7c450a4155a)
set(USD_HASH_TYPE MD5)
set(USD_FILE usd-v${USD_VERSION}.tar.gz)
set(USD_HASH 79ff176167b3fe85f4953abd6cc5e0cc)
set(OIDN_VERSION 1.3.0)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
set(OIDN_HASH 301a5a0958d375a942014df0679b9270)
set(OIDN_HASH_TYPE MD5)
set(OIDN_FILE oidn-${OIDN_VERSION}.src.tar.gz)
set(OIDN_VERSION 1.0.0)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.zip)
set(OIDN_HASH 19fe67b0164e8f020ac8a4f520defe60)
set(LIBGLU_VERSION 9.0.1)
set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.xz)
set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
set(LIBGLU_HASH_TYPE MD5)
set(LIBGLU_FILE glu-${LIBGLU_VERSION}.tar.xz)
set(MESA_VERSION 20.3.4)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa/mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH 556338446aef8ae947a789b3e0b5e056)
set(MESA_HASH_TYPE MD5)
set(MESA_FILE mesa-${MESA_VERSION}.tar.xz)
set(NASM_VERSION 2.15.02)
set(NASM_URI https://github.com/netwide-assembler/nasm/archive/nasm-${NASM_VERSION}.tar.gz)
set(NASM_HASH aded8b796c996a486a56e0515c83e414116decc3b184d88043480b32eb0a8589)
set(NASM_HASH_TYPE SHA256)
set(NASM_FILE nasm-${NASM_VERSION}.tar.gz)
set(XR_OPENXR_SDK_VERSION 1.0.14)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH 0df6b2fd6045423451a77ff6bc3e1a75)
set(XR_OPENXR_SDK_HASH_TYPE MD5)
set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz)
if(BLENDER_PLATFORM_ARM)
# Unreleased version with macOS arm support.
set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip)
set(ISPC_HASH d382fea18d01dbd0cd05d9e1ede36d7d)
set(ISPC_HASH_TYPE MD5)
set(ISPC_FILE f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip)
else()
set(ISPC_VERSION v1.14.1)
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
set(ISPC_HASH 968fbc8dfd16a60ba4e32d2e0e03ea7a)
set(ISPC_HASH_TYPE MD5)
set(ISPC_FILE ispc-${ISPC_VERSION}.tar.gz)
endif()
set(GMP_VERSION 6.2.0)
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
set(GMP_HASH a325e3f09e6d91e62101e59f9bda3ec1)
set(GMP_HASH_TYPE MD5)
set(GMP_FILE gmp-${GMP_VERSION}.tar.xz)
set(POTRACE_VERSION 1.16)
set(POTRACE_URI http://potrace.sourceforge.net/download/${POTRACE_VERSION}/potrace-${POTRACE_VERSION}.tar.gz)
set(POTRACE_HASH 5f0bd87ddd9a620b0c4e65652ef93d69)
set(POTRACE_HASH_TYPE MD5)
set(POTRACE_FILE potrace-${POTRACE_VERSION}.tar.gz)
set(HARU_VERSION 2_3_0)
set(HARU_URI https://github.com/libharu/libharu/archive/RELEASE_${HARU_VERSION}.tar.gz)
set(HARU_HASH 4f916aa49c3069b3a10850013c507460)
set(HARU_HASH_TYPE MD5)
set(HARU_FILE libharu-${HARU_VERSION}.tar.gz)
set(SSE2NEON_GIT https://github.com/DLTcollab/sse2neon.git)
set(SSE2NEON_GIT_HASH fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)
set(MESA_VERSION 18.3.1)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa//mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH d60828056d77bfdbae0970f9b15fb1be)

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_vorbis
URL file://${PACKAGE_DIR}/${VORBIS_FILE}
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${VORBIS_HASH_TYPE}=${VORBIS_HASH}
URL_HASH SHA256=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared

View File

@@ -24,20 +24,16 @@ if(WIN32)
endif()
else()
if(APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(VPX_EXTRA_FLAGS --target=generic-gnu)
else()
set(VPX_EXTRA_FLAGS --target=x86_64-darwin17-gcc)
endif()
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
endif()
ExternalProject_Add(external_vpx
URL file://${PACKAGE_DIR}/${VPX_FILE}
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${VPX_HASH_TYPE}=${VPX_HASH}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&

View File

@@ -32,9 +32,9 @@ else()
endif()
ExternalProject_Add(external_webp
URL file://${PACKAGE_DIR}/${WEBP_FILE}
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${WEBP_HASH_TYPE}=${WEBP_HASH}
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/webp

View File

@@ -18,27 +18,19 @@
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
endif()
if(BLENDER_PLATFORM_ARM)
set(X264_EXTRA_ARGS ${X264_EXTRA_ARGS} "--disable-asm")
endif()
if((APPLE AND NOT BLENDER_PLATFORM_ARM) OR (UNIX AND NOT APPLE))
set(X264_CONFIGURE_ENV
export AS=${LIBDIR}/nasm/bin/nasm
)
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
else()
set(X264_CONFIGURE_ENV echo .)
set(X264_PATCH_CMD echo .)
endif()
ExternalProject_Add(external_x264
URL file://${PACKAGE_DIR}/${X264_FILE}
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${X264_HASH_TYPE}=${X264_HASH}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ &&
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
@@ -51,10 +43,3 @@ ExternalProject_Add(external_x264
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()
if(UNIX)
add_dependencies(
external_x264
external_nasm
)
endif()

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_xml2
URL file://${PACKAGE_DIR}/${XML2_FILE}
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XML2_HASH_TYPE}=${XML2_HASH}
URL_HASH MD5=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2

View File

@@ -1,60 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Keep flags in sync with install_deps.sh ones in compile_XR_OpenXR_SDK()
set(XR_OPENXR_SDK_EXTRA_ARGS
-DBUILD_FORCE_GENERATION=OFF
-DBUILD_LOADER=ON
-DDYNAMIC_LOADER=OFF
)
if(UNIX AND NOT APPLE)
list(APPEND XR_OPENXR_SDK_EXTRA_ARGS
-DBUILD_WITH_WAYLAND_HEADERS=OFF
-DBUILD_WITH_XCB_HEADERS=OFF
-DBUILD_WITH_XLIB_HEADERS=ON
-DBUILD_WITH_SYSTEM_JSONCPP=OFF
-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1
)
endif()
ExternalProject_Add(external_xr_openxr_sdk
URL file://${PACKAGE_DIR}/${XR_OPENXR_SDK_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XR_OPENXR_SDK_HASH_TYPE}=${XR_OPENXR_SDK_HASH}
PREFIX ${BUILD_DIR}/xr_openxr_sdk
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/xr_openxr_sdk ${DEFAULT_CMAKE_FLAGS} ${XR_OPENXR_SDK_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/xr_openxr_sdk
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/include/openxr ${HARVEST_TARGET}/xr_openxr_sdk/include/openxr
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/lib ${HARVEST_TARGET}/xr_openxr_sdk/lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/xr_openxr_sdk/lib/openxr_loaderd.lib ${HARVEST_TARGET}/xr_openxr_sdk/lib/openxr_loaderd.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -21,9 +21,9 @@ if(WIN32)
endif()
ExternalProject_Add(external_xvidcore
URL file://${PACKAGE_DIR}/${XVIDCORE_FILE}
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XVIDCORE_HASH_TYPE}=${XVIDCORE_HASH}
URL_HASH SHA256=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}

View File

@@ -17,22 +17,17 @@
# ***** END GPL LICENSE BLOCK *****
set(YAMLCPP_EXTRA_ARGS
-DBUILD_GMOCK=OFF
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DYAML_MSVC_SHARED_RT=ON
)
if(WIN32)
set(YAMLCPP_EXTRA_ARGS
${YAMLCPP_EXTRA_ARGS}
-DBUILD_GMOCK=OFF
-DYAML_MSVC_SHARED_RT=ON)
endif()
ExternalProject_Add(external_yamlcpp
URL file://${PACKAGE_DIR}/${YAMLCPP_FILE}
URL ${YAMLCPP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${YAMLCPP_HASH_TYPE}=${YAMLCPP_HASH}
URL_HASH MD5=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp

View File

@@ -17,8 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib
URL file://${PACKAGE_DIR}/${ZLIB_FILE}
URL_HASH ${ZLIB_HASH_TYPE}=${ZLIB_HASH}
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib

View File

@@ -17,8 +17,8 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib_mingw
URL file://${PACKAGE_DIR}/${ZLIB_FILE}
URL_HASH ${ZLIB_HASH_TYPE}=${ZLIB_HASH}
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
# Files contains mixed line endings, patch needs to preserve them to apply.
opencollada.diff binary

View File

@@ -91,41 +91,3 @@ diff -Naur external_blosc.orig/blosc/blosc.c external_blosc/blosc/blosc.c
/* Some useful units */
diff --git a/blosc/shuffle.c b/blosc/shuffle.c
index 84b5095..23053b4 100644
--- a/blosc/shuffle.c
+++ b/blosc/shuffle.c
@@ -490,12 +490,12 @@ void unshuffle(size_t bytesoftype, size_t blocksize,
#else /* no __SSE2__ available */
void shuffle(size_t bytesoftype, size_t blocksize,
- uint8_t* _src, uint8_t* _dest) {
+ const uint8_t* _src, uint8_t* _dest) {
_shuffle(bytesoftype, blocksize, _src, _dest);
}
void unshuffle(size_t bytesoftype, size_t blocksize,
- uint8_t* _src, uint8_t* _dest) {
+ const uint8_t* _src, uint8_t* _dest) {
_unshuffle(bytesoftype, blocksize, _src, _dest);
}
--- a/cmake/FindSSE.cmake
+++ b/cmake/FindSSE.cmake
@@ -49,6 +49,17 @@
set(AVX_FOUND false CACHE BOOL "AVX available on host")
ENDIF (AVX_TRUE)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+ execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Detected architecture ${ARCHITECTURE}")
+ IF("${ARCHITECTURE}" STREQUAL "arm64")
+ set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
+ set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
+ set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
+ set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
+ set(AVX_FOUND false CACHE BOOL "AVX available on host")
+ return()
+ ENDIF()
+
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
CPUINFO)

View File

@@ -1,4 +0,0 @@
using python : @PYTHON_SHORT_VERSION@ : @PYTHON_BINARY@
: @LIBDIR@/python/include @LIBDIR@/python/include/python@PYTHON_SHORT_VERSION@m/
: @LIBDIR@/python/libs
;

View File

@@ -26,8 +26,8 @@ include(FindPackageMessage)
include(SelectLibraryConfigurations)
if(ILMBASE_USE_STATIC_LIBS)
set(_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if( ILMBASE_USE_STATIC_LIBS )
set( _ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
@@ -247,7 +247,7 @@ if(ILMBASE_FOUND)
endif()
# Restore the original find library ordering
if(ILMBASE_USE_STATIC_LIBS )
if( ILMBASE_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()

View File

@@ -230,7 +230,7 @@ if(OPENEXR_FOUND)
endif()
# Restore the original find library ordering
if(OPENEXR_USE_STATIC_LIBS )
if( OPENEXR_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()

View File

@@ -1,22 +0,0 @@
cmake_minimum_required(VERSION 3.1)
project(libgmpxx)
include_directories(. cxx ${GMP_INCLUDE_DIR})
add_definitions(-D__GMP_WITHIN_GMPXX)
add_library(libgmpxx SHARED
cxx/dummy.cc
cxx/isfuns.cc
cxx/ismpf.cc
cxx/ismpq.cc
cxx/ismpz.cc
cxx/ismpznw.cc
cxx/limits.cc
cxx/osdoprnti.cc
cxx/osfuns.cc
cxx/osmpf.cc
cxx/osmpq.cc
cxx/osmpz.cc
)
target_link_libraries(libgmpxx ${GMP_LIBRARY})
install(TARGETS libgmpxx DESTINATION lib)

View File

@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 2.8)
project(hidapi)
set(SRC_FILES
windows/hid.c
)
set(HEADER_FILES
hidapi/hidapi.h
)
include_directories(hidapi)
add_definitions(-DHID_API_STATIC)
add_library(hidapi STATIC ${SRC_FILES} ${HEADER_FILES})
install(TARGETS hidapi DESTINATION lib)
INSTALL(FILES hidapi/hidapi.h
DESTINATION "include"
)

Some files were not shown because too many files have changed in this diff Show More