[Bf-blender-cvs] [218fa0a23c7] greasepencil-edit-curve: Merge branch 'master' into greasepencil-edit-curve
Antonio Vazquez
noreply at git.blender.org
Sat Oct 3 11:00:28 CEST 2020
Commit: 218fa0a23c7fed9c8455fa8f438f607476dbe495
Author: Antonio Vazquez
Date: Sat Oct 3 11:00:19 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rB218fa0a23c7fed9c8455fa8f438f607476dbe495
Merge branch 'master' into greasepencil-edit-curve
Conflicts:
source/blender/blenloader/intern/versioning_290.c
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_290.c
index cbf3277f63f,b9153307d70..dc81e650d22
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@@ -773,19 -780,31 +780,45 @@@ void blo_do_versions_290(FileData *fd,
*/
{
/* Keep this block, even when empty. */
+ if (!DNA_struct_elem_find(fd->filesdna, "WorkSpaceDataRelation", "int", "parentid")) {
+ LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) {
+ LISTBASE_FOREACH_MUTABLE (
+ WorkSpaceDataRelation *, relation, &workspace->hook_layout_relations) {
+ relation->parent = blo_read_get_new_globaldata_address(fd, relation->parent);
+ BLI_assert(relation->parentid == 0);
+ if (relation->parent != NULL) {
+ LISTBASE_FOREACH (wmWindowManager *, wm, &bmain->wm) {
+ wmWindow *win = BLI_findptr(
+ &wm->windows, relation->parent, offsetof(wmWindow, workspace_hook));
+ if (win != NULL) {
+ relation->parentid = win->winid;
+ break;
+ }
+ }
+ if (relation->parentid == 0) {
+ BLI_assert(
+ !"Found a valid parent for workspace data relation, but no valid parent id.");
+ }
+ }
+ if (relation->parentid == 0) {
+ BLI_freelinkN(&workspace->hook_layout_relations, relation);
+ }
+ }
+ }
+ }
+ /* Init grease pencil default curve resolution. */
+ if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "int", "curve_edit_resolution")) {
+ LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) {
+ gpd->curve_edit_resolution = GP_DEFAULT_CURVE_RESOLUTION;
+ gpd->flag |= GP_DATA_CURVE_ADAPTIVE_RESOLUTION;
+ }
+ }
+ /* Init grease pencil curve editing error threshold. */
+ if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "float", "curve_edit_threshold")) {
+ LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) {
+ gpd->curve_edit_threshold = GP_DEFAULT_CURVE_ERROR;
+ gpd->curve_edit_corner_angle = GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE;
+ }
+ }
}
}
More information about the Bf-blender-cvs
mailing list