48 const Mesh *mesh_eval;
49 bool mesh_eval_needs_free;
54 mesh_eval_needs_free =
false;
59 mesh_eval_needs_free =
true;
66 ListBaseT<Nurb> nurbslist = {
nullptr,
nullptr};
74 if (nurbslist.first_) {
75 for (
Nurb &nu : nurbslist) {
82 for (bp = nu.bp, a = 0; a < nu.pntsu; a++, bp++) {
89 polys.append(std::move(mval));
96 if (mesh_eval_needs_free) {
120 "No other selected objects have wire or boundary edges to use for projection");
131 for (
Object *obedit : objects) {
152 ot->
name =
"Knife Project";
153 ot->
idname =
"MESH_OT_knife_project";
154 ot->
description =
"Use other objects outlines and boundaries to project knife cuts";
168 "Cut through all faces, not just visible ones");
#define CTX_DATA_BEGIN(C, Type, instance, member)
General operations, lookup, etc. for blender objects.
Object is a sort of wrapper for general info.
void BKE_mesh_to_curve_nurblist(const Mesh *mesh, ListBaseT< Nurb > *nurblist, int edge_users_test)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
float4x4 ED_view3d_ob_project_mat_get(const RegionView3D *rv3d, const Object *ob)
bool EDBM_selectmode_disable(Scene *scene, BMEditMesh *em, BMesh *bm, short selectmode_disable, short selectmode_fallback)
void BKE_nurbList_free(ListBaseT< Nurb > *lb)
float2 ED_view3d_project_float_v2_m4(const ARegion *region, const float co[3], const float4x4 &mat)
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
MatBase< float, 4, 4 > float4x4
void BM_mesh_select_mode_flush(BMesh *bm)
void ED_view3d_viewcontext_init_object(ViewContext *vc, Object *obact)
void EDBM_mesh_knife(ViewContext *vc, const Span< Object * > objects, const Span< Array< float2 > > polys, bool use_tag, bool cut_through)
void MESH_OT_knife_project(wmOperatorType *ot)
Mesh * BKE_mesh_new_nomain_from_curve(const Object *ob)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BM_mesh_elem_hflag_enable_test(BMesh *bm, const char htype, const char hflag, const bool respecthide, const bool overwrite, const char hflag_test)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void BKE_id_free(Main *bmain, void *idv)
static wmOperatorStatus knifeproject_exec(bContext *C, wmOperator *op)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
bool BKE_object_is_in_editmode(const Object *ob)
ViewContext em_setup_viewcontext(bContext *C)
Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
bool ED_operator_editmesh_region_view3d(bContext *C)
Scene * CTX_data_scene(const bContext *C)
static void knifeproject_poly_from_object(const bContext *C, Object *ob, Vector< Array< float2 > > &polys)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
ARegion * CTX_wm_region(const bContext *C)
Mesh * BKE_object_get_evaluated_mesh(const Object *object_eval)
bke::ObjectRuntime * runtime
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports