Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-12-13 11:03:13 +0300
committerJoshua Leung <aligorith@gmail.com>2015-12-13 11:03:13 +0300
commita1f87064c4c0cd9e8eafc19c599c4ad4ccdba49f (patch)
treed016e95050f10eda7bc44e1bdfa2f7c4fc0fc024 /source/blender/blenloader
parentd9ee88d126ddb59b68d2561694b522a99e4923b6 (diff)
Grease Pencil: Merge GPencil_Editing_Stage3 branch into master
This commit merges all the work done in the GPencil_Editing_Stage3 branch as of ef2aecf2db981b5344e0d14e7f074f1742b0b2f7 into master. For more details about the changes that this brings, see the WIP release notes: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.77/GPencil
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c1
-rw-r--r--source/blender/blenloader/intern/versioning_270.c79
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c45
3 files changed, 124 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9bc0e241722..177055e7206 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5822,6 +5822,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
sce->toolsettings->particle.paintcursor = NULL;
sce->toolsettings->particle.scene = NULL;
sce->toolsettings->particle.object = NULL;
+ sce->toolsettings->gp_sculpt.paintcursor = NULL;
/* in rare cases this is needed, see [#33806] */
if (sce->toolsettings->vpaint) {
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index a0248d5a97c..8a2045ddacf 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -38,6 +38,7 @@
#include "DNA_camera_types.h"
#include "DNA_cloth_types.h"
#include "DNA_constraint_types.h"
+#include "DNA_gpencil_types.h"
#include "DNA_sdna_types.h"
#include "DNA_sequence_types.h"
#include "DNA_space_types.h"
@@ -935,5 +936,81 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
-
+ {
+ Scene *scene;
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ ToolSettings *ts = scene->toolsettings;
+
+ if (ts->gp_sculpt.brush[0].size == 0) {
+ GP_BrushEdit_Settings *gset = &ts->gp_sculpt;
+ GP_EditBrush_Data *brush;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_SMOOTH];
+ brush->size = 25;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF | GP_EDITBRUSH_FLAG_SMOOTH_PRESSURE;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_THICKNESS];
+ brush->size = 25;
+ brush->strength = 0.5f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_GRAB];
+ brush->size = 50;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_PUSH];
+ brush->size = 25;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_TWIST];
+ brush->size = 50;
+ brush->strength = 0.3f; // XXX?
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_PINCH];
+ brush->size = 50;
+ brush->strength = 0.5f; // XXX?
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_RANDOMISE];
+ brush->size = 25;
+ brush->strength = 0.5f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_CLONE];
+ brush->size = 50;
+ brush->strength = 1.0f;
+ }
+
+ if (!DNA_struct_elem_find(fd->filesdna, "ToolSettings", "char", "gpencil_v3d_align")) {
+#if 0 /* XXX: Cannot do this, as we get random crashes... */
+ if (scene->gpd) {
+ bGPdata *gpd = scene->gpd;
+
+ /* Copy over the settings stored in the GP datablock linked to the scene, for minimal disruption */
+ ts->gpencil_v3d_align = 0;
+
+ if (gpd->flag & GP_DATA_VIEWALIGN) ts->gpencil_v3d_align |= GP_PROJECT_VIEWSPACE;
+ if (gpd->flag & GP_DATA_DEPTH_VIEW) ts->gpencil_v3d_align |= GP_PROJECT_DEPTH_VIEW;
+ if (gpd->flag & GP_DATA_DEPTH_STROKE) ts->gpencil_v3d_align |= GP_PROJECT_DEPTH_STROKE;
+
+ if (gpd->flag & GP_DATA_DEPTH_STROKE_ENDPOINTS)
+ ts->gpencil_v3d_align |= GP_PROJECT_DEPTH_STROKE_ENDPOINTS;
+ }
+ else {
+ /* Default to cursor for all standard 3D views */
+ ts->gpencil_v3d_align = GP_PROJECT_VIEWSPACE;
+ }
+#endif
+
+ ts->gpencil_v3d_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_v2d_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_seq_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_ima_align = GP_PROJECT_VIEWSPACE;
+ }
+ }
+ }
}
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 01af11e78d1..eb0d392aa92 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -91,6 +91,51 @@ void BLO_update_defaults_startup_blend(Main *bmain)
sculpt->flags |= SCULPT_DYNTOPO_COLLAPSE;
sculpt->detail_size = 12;
}
+
+ if (ts->gp_sculpt.brush[0].size == 0) {
+ GP_BrushEdit_Settings *gset = &ts->gp_sculpt;
+ GP_EditBrush_Data *brush;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_SMOOTH];
+ brush->size = 25;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF | GP_EDITBRUSH_FLAG_SMOOTH_PRESSURE;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_THICKNESS];
+ brush->size = 25;
+ brush->strength = 0.5f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_GRAB];
+ brush->size = 50;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_PUSH];
+ brush->size = 25;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_TWIST];
+ brush->size = 50;
+ brush->strength = 0.3f; // XXX?
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_PINCH];
+ brush->size = 50;
+ brush->strength = 0.5f; // XXX?
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_RANDOMISE];
+ brush->size = 25;
+ brush->strength = 0.5f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+ }
+
+ ts->gpencil_v3d_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_v2d_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_seq_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_ima_align = GP_PROJECT_VIEWSPACE;
}
scene->gm.lodflag |= SCE_LOD_USE_HYST;