Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_convert.c
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_depsgraph.h" | #include "BKE_depsgraph.h" | ||||
| #include "BKE_fcurve.h" | #include "BKE_fcurve.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_gpencil.h" | #include "BKE_gpencil.h" | ||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_localview.h" | |||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "BKE_tracking.h" | #include "BKE_tracking.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| ▲ Show 20 Lines • Show All 1,139 Lines • ▼ Show 20 Lines | if (mode == GP_STROKECONVERT_POLY) { | ||||
| for (nu = cu->nurb.first; nu; nu = nu->next) { | for (nu = cu->nurb.first; nu; nu = nu->next) { | ||||
| BKE_nurb_type_convert(nu, CU_POLY, false); | BKE_nurb_type_convert(nu, CU_POLY, false); | ||||
| } | } | ||||
| } | } | ||||
| /* set the layer and select */ | /* set the layer and select */ | ||||
| base_new->lay = ob->lay = base_orig ? base_orig->lay : BKE_screen_view3d_layer_active(v3d, scene); | base_new->lay = ob->lay = base_orig ? base_orig->lay : BKE_screen_view3d_layer_active(v3d, scene); | ||||
| base_new->flag = ob->flag = base_new->flag | SELECT; | base_new->flag = ob->flag = base_new->flag | SELECT; | ||||
| if (v3d) { | |||||
| /* Add to localview (function checks if v3d is in local view) */ | |||||
| BKE_localview_object_assign(v3d, ob); | |||||
| } | |||||
| } | } | ||||
| /* --- */ | /* --- */ | ||||
| /* Check a GP layer has valid timing data! Else, most timing options are hidden in the operator. | /* Check a GP layer has valid timing data! Else, most timing options are hidden in the operator. | ||||
| * op may be NULL. | * op may be NULL. | ||||
| */ | */ | ||||
| static bool gp_convert_check_has_valid_timing(bContext *C, bGPDlayer *gpl, wmOperator *op) | static bool gp_convert_check_has_valid_timing(bContext *C, bGPDlayer *gpl, wmOperator *op) | ||||
| ▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines | |||||