Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/library.c
| Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_library_query.h" | #include "BKE_library_query.h" | ||||
| #include "BKE_library_remap.h" | #include "BKE_library_remap.h" | ||||
| #include "BKE_linestyle.h" | #include "BKE_linestyle.h" | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_material.h" | #include "BKE_material.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_mball.h" | #include "BKE_mball.h" | ||||
| #include "BKE_mask.h" | #include "BKE_mask.h" | ||||
| #include "BKE_movieclip.h" | |||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| #include "BKE_particle.h" | #include "BKE_particle.h" | ||||
| #include "BKE_packedFile.h" | #include "BKE_packedFile.h" | ||||
| #include "BKE_sound.h" | #include "BKE_sound.h" | ||||
| #include "BKE_speaker.h" | #include "BKE_speaker.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| ▲ Show 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | case ID_BR: | ||||
| if (!test) BKE_brush_make_local(bmain, (Brush *)id, lib_local); | if (!test) BKE_brush_make_local(bmain, (Brush *)id, lib_local); | ||||
| return true; | return true; | ||||
| case ID_PA: | case ID_PA: | ||||
| if (!test) BKE_particlesettings_make_local(bmain, (ParticleSettings *)id, lib_local); | if (!test) BKE_particlesettings_make_local(bmain, (ParticleSettings *)id, lib_local); | ||||
| return true; | return true; | ||||
| case ID_GD: | case ID_GD: | ||||
| if (!test) BKE_gpencil_make_local(bmain, (bGPdata *)id, lib_local); | if (!test) BKE_gpencil_make_local(bmain, (bGPdata *)id, lib_local); | ||||
| return true; | return true; | ||||
| case ID_MC: | |||||
| if (!test) BKE_movieclip_make_local(bmain, (MovieClip *)id, lib_local); | |||||
| return true; | |||||
| case ID_MSK: | case ID_MSK: | ||||
| if (!test) BKE_mask_make_local(bmain, (Mask *)id, lib_local); | if (!test) BKE_mask_make_local(bmain, (Mask *)id, lib_local); | ||||
| return true; | return true; | ||||
| case ID_LS: | case ID_LS: | ||||
| if (!test) BKE_linestyle_make_local(bmain, (FreestyleLineStyle *)id, lib_local); | if (!test) BKE_linestyle_make_local(bmain, (FreestyleLineStyle *)id, lib_local); | ||||
| return true; | return true; | ||||
| case ID_PAL: | case ID_PAL: | ||||
| if (!test) BKE_palette_make_local(bmain, (Palette *)id, lib_local); | if (!test) BKE_palette_make_local(bmain, (Palette *)id, lib_local); | ||||
| return true; | return true; | ||||
| case ID_PC: | case ID_PC: | ||||
| if (!test) BKE_paint_curve_make_local(bmain, (PaintCurve *)id, lib_local); | if (!test) BKE_paint_curve_make_local(bmain, (PaintCurve *)id, lib_local); | ||||
| return true; | return true; | ||||
| case ID_MC: | |||||
| return false; /* TODO missing implementation */ | |||||
| case ID_SCR: | case ID_SCR: | ||||
| case ID_LI: | case ID_LI: | ||||
| case ID_KE: | case ID_KE: | ||||
| case ID_WM: | case ID_WM: | ||||
| return false; /* can't be linked */ | return false; /* can't be linked */ | ||||
| case ID_IP: | case ID_IP: | ||||
| return false; /* deprecated */ | return false; /* deprecated */ | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | case ID_BR: | ||||
| if (!test) *newid = (ID *)BKE_brush_copy(bmain, (Brush *)id); | if (!test) *newid = (ID *)BKE_brush_copy(bmain, (Brush *)id); | ||||
| return true; | return true; | ||||
| case ID_PA: | case ID_PA: | ||||
| if (!test) *newid = (ID *)BKE_particlesettings_copy(bmain, (ParticleSettings *)id); | if (!test) *newid = (ID *)BKE_particlesettings_copy(bmain, (ParticleSettings *)id); | ||||
| return true; | return true; | ||||
| case ID_GD: | case ID_GD: | ||||
| if (!test) *newid = (ID *)gpencil_data_duplicate(bmain, (bGPdata *)id, false); | if (!test) *newid = (ID *)gpencil_data_duplicate(bmain, (bGPdata *)id, false); | ||||
| return true; | return true; | ||||
| case ID_MC: | |||||
| if (!test) *newid = (ID *)BKE_movieclip_copy(bmain, (MovieClip *)id); | |||||
| return true; | |||||
| case ID_MSK: | case ID_MSK: | ||||
| if (!test) *newid = (ID *)BKE_mask_copy(bmain, (Mask *)id); | if (!test) *newid = (ID *)BKE_mask_copy(bmain, (Mask *)id); | ||||
| return true; | return true; | ||||
| case ID_LS: | case ID_LS: | ||||
| if (!test) *newid = (ID *)BKE_linestyle_copy(bmain, (FreestyleLineStyle *)id); | if (!test) *newid = (ID *)BKE_linestyle_copy(bmain, (FreestyleLineStyle *)id); | ||||
| return true; | return true; | ||||
| case ID_PAL: | case ID_PAL: | ||||
| if (!test) *newid = (ID *)BKE_palette_copy(bmain, (Palette *)id); | if (!test) *newid = (ID *)BKE_palette_copy(bmain, (Palette *)id); | ||||
| return true; | return true; | ||||
| case ID_PC: | case ID_PC: | ||||
| if (!test) *newid = (ID *)BKE_paint_curve_copy(bmain, (PaintCurve *)id); | if (!test) *newid = (ID *)BKE_paint_curve_copy(bmain, (PaintCurve *)id); | ||||
| return true; | return true; | ||||
| case ID_SCE: | case ID_SCE: | ||||
| case ID_LI: | case ID_LI: | ||||
| case ID_SCR: | case ID_SCR: | ||||
| case ID_WM: | case ID_WM: | ||||
| return false; /* can't be copied from here */ | return false; /* can't be copied from here */ | ||||
| case ID_VF: | case ID_VF: | ||||
| case ID_SO: | case ID_SO: | ||||
| case ID_MC: | |||||
| return false; /* not implemented */ | return false; /* not implemented */ | ||||
| case ID_IP: | case ID_IP: | ||||
| return false; /* deprecated */ | return false; /* deprecated */ | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,233 Lines • Show Last 20 Lines | |||||