Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/readfile.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 7,221 Lines • ▼ Show 20 Lines | static void direct_link_gpencil(FileData *fd, bGPdata *gpd) | ||||
| if (gpd == NULL) { | if (gpd == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| /* relink animdata */ | /* relink animdata */ | ||||
| gpd->adt = newdataadr(fd, gpd->adt); | gpd->adt = newdataadr(fd, gpd->adt); | ||||
| direct_link_animdata(fd, gpd->adt); | direct_link_animdata(fd, gpd->adt); | ||||
| /* If linking from a library ensure full objectmode. */ | |||||
mont29: `Ensure full objectmode for linked grease pencil.` | |||||
| if (gpd->id.lib != NULL) { | |||||
| gpd->flag &= ~GP_DATA_STROKE_PAINTMODE; | |||||
| gpd->flag &= ~GP_DATA_STROKE_EDITMODE; | |||||
| gpd->flag &= ~GP_DATA_STROKE_SCULPTMODE; | |||||
| gpd->flag &= ~GP_DATA_STROKE_WEIGHTMODE; | |||||
| } | |||||
| /* init stroke buffer */ | /* init stroke buffer */ | ||||
| gpd->runtime.sbuffer = NULL; | gpd->runtime.sbuffer = NULL; | ||||
| gpd->runtime.sbuffer_used = 0; | gpd->runtime.sbuffer_used = 0; | ||||
| gpd->runtime.sbuffer_size = 0; | gpd->runtime.sbuffer_size = 0; | ||||
| gpd->runtime.tot_cp_points = 0; | gpd->runtime.tot_cp_points = 0; | ||||
| /* relink palettes (old palettes deprecated, only to convert old files) */ | /* relink palettes (old palettes deprecated, only to convert old files) */ | ||||
| link_list(fd, &gpd->palettes); | link_list(fd, &gpd->palettes); | ||||
| ▲ Show 20 Lines • Show All 4,619 Lines • ▼ Show 20 Lines | static void library_link_end(Main *mainl, | ||||
| /* Make all relative paths, relative to the open blend file. */ | /* Make all relative paths, relative to the open blend file. */ | ||||
| fix_relpaths_library(BKE_main_blendfile_path(mainvar), mainvar); | fix_relpaths_library(BKE_main_blendfile_path(mainvar), mainvar); | ||||
| /* Give a base to loose objects and collections. | /* Give a base to loose objects and collections. | ||||
| * Only directly linked objects & collections are instantiated by | * Only directly linked objects & collections are instantiated by | ||||
| * `BLO_library_link_named_part_ex()` & co, | * `BLO_library_link_named_part_ex()` & co, | ||||
| * here we handle indirect ones and other possible edge-cases. */ | * here we handle indirect ones and other possible edge-cases. */ | ||||
| if (scene) { | if (scene) { | ||||
| add_collections_to_scene(mainvar, bmain, scene, view_layer, v3d, curlib, flag); | add_collections_to_scene(mainvar, bmain, scene, view_layer, v3d, curlib, flag); | ||||
Not Done Inline Actionsneed too: GP_DATA_STROKE_PAINTMODE GP_DATA_STROKE_SCULPTMODE GP_DATA_STROKE_WEIGHTMODE antoniov: need too: GP_DATA_STROKE_PAINTMODE GP_DATA_STROKE_SCULPTMODE GP_DATA_STROKE_WEIGHTMODE | |||||
| add_loose_objects_to_scene(mainvar, bmain, scene, view_layer, v3d, curlib, flag); | add_loose_objects_to_scene(mainvar, bmain, scene, view_layer, v3d, curlib, flag); | ||||
| } | } | ||||
| else { | else { | ||||
| /* printf("library_append_end, scene is NULL (objects wont get bases)\n"); */ | /* printf("library_append_end, scene is NULL (objects wont get bases)\n"); */ | ||||
| } | } | ||||
| /* Clear objects and collections instantiating tag. */ | /* Clear objects and collections instantiating tag. */ | ||||
| BKE_main_id_tag_listbase(&(mainvar->objects), LIB_TAG_DOIT, false); | BKE_main_id_tag_listbase(&(mainvar->objects), LIB_TAG_DOIT, false); | ||||
| ▲ Show 20 Lines • Show All 347 Lines • Show Last 20 Lines | |||||
Ensure full objectmode for linked grease pencil.