[Bf-blender-cvs] [8cd6f60695e] greasepencil-object: Merge branch 'blender2.8' into greasepencil-object
Antonio Vazquez
noreply at git.blender.org
Sun Apr 22 16:54:40 CEST 2018
Commit: 8cd6f60695e4a490aa3a55b3818a10561991f566
Author: Antonio Vazquez
Date: Sun Apr 22 16:54:08 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB8cd6f60695e4a490aa3a55b3818a10561991f566
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
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/properties_scene.py
index e3caf5a6845,094f2a9dc31..09552d2b5fb
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@@ -430,41 -427,8 +430,38 @@@ class SCENE_PT_simplify(SceneButtonsPan
col.label(text="Render:")
col.prop(rd, "simplify_subdivision_render", text="Subdivision")
col.prop(rd, "simplify_child_particles_render", text="Child Particles")
- col.prop(rd, "simplify_shadow_samples", text="Shadow Samples")
- col.prop(rd, "simplify_ao_sss", text="AO and SSS")
- col.prop(rd, "use_simplify_triangulate")
+class SCENE_PT_gp_simplify(SceneButtonsPanel, Panel):
+ bl_label = "Simplify Grease Pencil"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
+
+ def draw_header(self, context):
+ ts = context.tool_settings
+ self.layout.prop(ts, "gpencil_simplify", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ ts = context.tool_settings
+
+ layout.active = ts.gpencil_simplify
+
+ row = layout.row()
+ row.prop(ts, "gpencil_simplify_onplay", text="Only on Play")
+
+ split = layout.split()
+
+ col = split.column()
+ col.prop(ts, "gpencil_simplify_view_fill", text="Fill")
+ col.prop(ts, "gpencil_simplify_remove_lines", text="Remove Fill Lines")
+ col.prop(ts, "gpencil_simplify_view_modifier", text="Modifiers")
+ col.prop(ts, "gpencil_simplify_view_vfx", text="VFX")
+
+ row = layout.row()
+ row.prop(ts, "gpencil_disable_fast_drawing")
+
+
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
_context_path = "scene"
diff --cc source/blender/blenkernel/CMakeLists.txt
index e010731347a,91915bf679a..92561caddf6
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@@ -114,9 -114,9 +114,10 @@@ set(SR
intern/font.c
intern/freestyle.c
intern/gpencil.c
+ intern/gpencil_modifier.c
intern/group.c
intern/icons.c
+ intern/icons_rasterize.c
intern/idcode.c
intern/idprop.c
intern/image.c
diff --cc source/blender/blenloader/intern/versioning_280.c
index 11bffec6629,ff4a0351a7b..43295a34c95
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -29,9 -29,9 +29,10 @@@
#define DNA_DEPRECATED_ALLOW
#include <string.h>
+ #include <float.h>
#include "BLI_listbase.h"
+#include "BLI_math.h"
#include "BLI_mempool.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
@@@ -68,10 -66,8 +69,11 @@@
#include "BKE_node.h"
#include "BKE_report.h"
#include "BKE_scene.h"
+ #include "BKE_screen.h"
#include "BKE_workspace.h"
+#include "BKE_gpencil.h"
+#include "BKE_paint.h"
+#include "BKE_object.h"
#include "BLO_readfile.h"
#include "readfile.h"
diff --cc source/blender/depsgraph/intern/builder/deg_builder_relations.h
index e68c3412e9b,ed2d4b1162f..1fd3d81857a
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@@ -244,10 -243,8 +244,9 @@@ struct DepsgraphRelationBuilde
void build_nodetree(bNodeTree *ntree);
void build_material(Material *ma);
void build_texture(Tex *tex);
- void build_texture_stack(MTex **texture_stack);
void build_compositor(Scene *scene);
void build_gpencil(bGPdata *gpd);
+ void build_palette(Palette *palette);
void build_cachefile(CacheFile *cache_file);
void build_mask(Mask *mask);
void build_movieclip(MovieClip *clip);
diff --cc source/blender/draw/intern/draw_manager.c
index 8d100306572,38094404db7..e7a2fe40ca9
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@@ -983,10 -982,14 +982,16 @@@ static void drw_engines_enable_from_mod
BLI_assert(!"Draw mode invalid");
break;
}
+ /* grease pencil */
+ use_drw_engine(&draw_engine_gpencil_type);
}
+ static void drw_engines_enable_from_overlays(int draw_overlays)
+ {
+ if (draw_overlays) {
+ use_drw_engine(&draw_engine_overlay_type);
+ }
+ }
/**
* Use for select and depth-drawing.
*/
diff --cc source/blender/draw/modes/draw_mode_engines.h
index ecf56c76e08,9522e3cddc6..3dfb0757c50
--- a/source/blender/draw/modes/draw_mode_engines.h
+++ b/source/blender/draw/modes/draw_mode_engines.h
@@@ -40,6 -40,6 +40,7 @@@ extern DrawEngineType draw_engine_paint
extern DrawEngineType draw_engine_particle_type;
extern DrawEngineType draw_engine_pose_type;
extern DrawEngineType draw_engine_sculpt_type;
+ extern DrawEngineType draw_engine_overlay_type;
+extern DrawEngineType draw_engine_gpencil_type;
- #endif /* __DRAW_MODE_ENGINES_H__ */
+ #endif /* __DRAW_MODE_ENGINES_H__ */
diff --cc source/blender/editors/space_buttons/buttons_context.c
index c8668ee3694,b7ba8b5e065..e65a89126f7
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@@ -680,13 -572,7 +573,13 @@@ static int buttons_context_path(const b
found = buttons_context_path_particle(path);
break;
case BCONTEXT_MATERIAL:
+ /* the colors of grease pencil are not real materials, but to keep UI consistency, we
+ simulate and generate a path */
+ if (ob && ob->type == OB_GPENCIL) {
+ found = buttons_context_path_data(path, -1);
+ break;
+ }
- found = buttons_context_path_material(path, false, (sbuts->texuser != NULL));
+ found = buttons_context_path_material(path);
break;
case BCONTEXT_TEXTURE:
found = buttons_context_path_texture(C, path, sbuts->texuser);
diff --cc source/blender/editors/space_view3d/space_view3d.c
index 3bad6328373,e8de9b80fb3..5307c53fcf1
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@@ -346,15 -355,9 +356,13 @@@ static SpaceLink *view3d_new(const ScrA
v3d->near = 0.01f;
v3d->far = 1000.0f;
+ v3d->gpencil_grid_size[0] = GP_DEFAULT_GRID_SIZE;
+ v3d->gpencil_grid_size[1] = GP_DEFAULT_GRID_SIZE;
+ ARRAY_SET_ITEMS(v3d->gpencil_paper_color, 1.0f, 1.0f, 1.0f, 0.7f);
+
v3d->twflag |= U.manipulator_flag & V3D_MANIPULATOR_DRAW;
- v3d->twtype = V3D_MANIP_TRANSLATE;
v3d->around = V3D_AROUND_CENTER_MEAN;
- scene->orientation_index_custom = -1;
-
+
v3d->bundle_size = 0.2f;
v3d->bundle_drawtype = OB_PLAINAXES;
diff --cc source/blender/makesrna/intern/rna_sculpt_paint.c
index 301bad231ee,03a728120eb..f1fabd14756
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@@ -116,13 -111,10 +116,11 @@@ const EnumPropertyItem rna_enum_symmetr
#include "DEG_depsgraph.h"
- #include "GPU_buffers.h"
-
#include "ED_particle.h"
-static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
+static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
{
+ DEG_id_type_tag(bmain, ID_GD);
WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
}
More information about the Bf-blender-cvs
mailing list