49 const Mesh *mesh_eval;
50 bool mesh_eval_needs_free;
55 mesh_eval_needs_free =
false;
60 mesh_eval_needs_free =
true;
67 ListBase nurbslist = {
nullptr,
nullptr};
75 if (nurbslist.
first) {
81 float(*mval)[2] =
static_cast<float(*)[2]
>(
84 for (bp = nu->bp, a = 0; a < nu->pntsu; a++, bp++) {
98 if (mesh_eval_needs_free) {
121 if (polys ==
nullptr) {
124 "No other selected objects have wire or boundary edges to use for projection");
135 for (
Object *obedit : objects) {
157 ot->
name =
"Knife Project";
158 ot->
idname =
"MESH_OT_knife_project";
159 ot->
description =
"Use other objects outlines and boundaries to project knife cuts";
173 "Cut through all faces, not just visible ones");
#define CTX_DATA_BEGIN(C, Type, instance, member)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
void BKE_nurbList_free(ListBase *lb)
CustomData interface, see also DNA_customdata_types.h.
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
void BKE_id_free(Main *bmain, void *idv)
Mesh * BKE_mesh_new_nomain_from_curve(const Object *ob)
void BKE_mesh_to_curve_nurblist(const Mesh *mesh, ListBase *nurblist, int edge_users_test)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_in_editmode(const Object *ob)
Mesh * BKE_object_get_evaluated_mesh(const Object *object_eval)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BLI_linklist_freeN(LinkNode *list)
void void BLI_linklist_prepend(LinkNode **listp, void *ptr) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
MINLINE void copy_v2_v2(float r[2], const float a[2])
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
Object is a sort of wrapper for general info.
bool EDBM_selectmode_disable(Scene *scene, BMEditMesh *em, short selectmode_disable, short selectmode_fallback)
ViewContext em_setup_viewcontext(bContext *C)
bool ED_operator_editmesh_region_view3d(bContext *C)
blender::float2 ED_view3d_project_float_v2_m4(const ARegion *region, const float co[3], const blender::float4x4 &mat)
blender::float4x4 ED_view3d_ob_project_mat_get(const RegionView3D *rv3d, const Object *ob)
void ED_view3d_viewcontext_init_object(ViewContext *vc, Object *obact)
Read Guarded memory(de)allocation.
void BM_mesh_select_mode_flush(BMesh *bm)
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
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)
const Depsgraph * depsgraph
static bool is_cyclic(const Nurb *nu)
void EDBM_mesh_knife(ViewContext *vc, const Span< Object * > objects, LinkNode *polys, bool use_tag, bool cut_through)
static LinkNode * knifeproject_poly_from_object(const bContext *C, Object *ob, LinkNode *polys)
void MESH_OT_knife_project(wmOperatorType *ot)
static int knifeproject_exec(bContext *C, wmOperator *op)
draw_view in_light_buf[] float
void *(* MEM_mallocN)(size_t len, const char *str)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
ObjectRuntimeHandle * runtime
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports