49 const struct Mesh *me_eval;
50 bool me_eval_needs_free;
55 if (me_eval ==
NULL) {
59 me_eval_needs_free =
false;
64 me_eval_needs_free =
true;
79 if (nurbslist.
first) {
81 for (nu = nurbslist.
first; nu; nu = nu->
next) {
88 for (bp = nu->
bp,
a = 0; a < nu->pntsu;
a++, bp++) {
102 if (me_eval_needs_free) {
128 "No other selected objects have wire or boundary edges to use for projection");
141 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
142 Object *obedit = objects[ob_index];
165 ot->
name =
"Knife Project";
166 ot->
idname =
"MESH_OT_knife_project";
167 ot->
description =
"Use other objects outlines and boundaries to project knife cuts";
181 "Cut through all faces, not just visible ones");
typedef float(TangentPoint)[2]
struct Scene * CTX_data_scene(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
void BKE_nurbList_free(struct ListBase *lb)
CustomData interface, see also DNA_customdata_types.h.
const CustomData_MeshMasks CD_MASK_BAREMESH
BMEditMesh * BKE_editmesh_from_object(struct Object *ob)
Return the BMEditMesh for a given object.
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len)
void BKE_id_free(struct Main *bmain, void *idv)
struct Mesh * BKE_mesh_new_nomain_from_curve(const struct Object *ob)
void BKE_mesh_to_curve_nurblist(const struct Mesh *me, struct ListBase *nurblist, int edge_users_test)
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
General operations, lookup, etc. for blender objects.
struct Mesh * BKE_object_get_evaluated_mesh(const struct Object *object)
bool BKE_object_is_in_editmode(const struct Object *ob)
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)
MINLINE void copy_v2_v2(float r[2], const float a[2])
struct Depsgraph Depsgraph
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
Object is a sort of wrapper for general info.
#define SCE_SELECT_VERTEX
void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc)
bool EDBM_selectmode_disable(struct Scene *scene, struct BMEditMesh *em, short selectmode_disable, short selectmode_fallback)
bool ED_operator_editmesh_region_view3d(struct bContext *C)
void ED_view3d_viewcontext_init_object(struct ViewContext *vc, struct Object *obact)
void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, const struct Object *ob, float r_pmat[4][4])
void ED_view3d_project_float_v2_m4(const struct ARegion *region, const float co[3], float r_co[2], const float mat[4][4])
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, Object **objects, const int objects_len, LinkNode *polys, bool use_tag, bool cut_through)
void MESH_OT_knife_project(wmOperatorType *ot)
static int knifeproject_exec(bContext *C, wmOperator *op)
static LinkNode * knifeproject_poly_from_object(const bContext *C, Scene *scene, Object *ob, LinkNode *polys)
void(* MEM_freeN)(void *vmemh)
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, bool default_value, const char *ui_name, const char *ui_description)
struct ViewLayer * view_layer
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports