47 const Mesh *mesh_eval;
48 bool mesh_eval_needs_free;
53 mesh_eval_needs_free =
false;
58 mesh_eval_needs_free =
true;
65 ListBase nurbslist = {
nullptr,
nullptr};
73 if (nurbslist.
first) {
79 float (*mval)[2] =
static_cast<float (*)[2]
>(
82 for (bp = nu->bp, a = 0; a < nu->pntsu; a++, bp++) {
83 copy_v2_v2(mval[a], ED_view3d_project_float_v2_m4(region, bp->vec, projmat));
96 if (mesh_eval_needs_free) {
119 if (polys ==
nullptr) {
122 "No other selected objects have wire or boundary edges to use for projection");
133 for (
Object *obedit : objects) {
155 ot->name =
"Knife Project";
156 ot->idname =
"MESH_OT_knife_project";
157 ot->description =
"Use other objects outlines and boundaries to project knife cuts";
171 "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)
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])
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
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::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)
BPy_StructRNA * 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 wmOperatorStatus knifeproject_exec(bContext *C, wmOperator *op)
static LinkNode * knifeproject_poly_from_object(const bContext *C, Object *ob, LinkNode *polys)
void MESH_OT_knife_project(wmOperatorType *ot)
void * MEM_mallocN(size_t len, const char *str)
MatBase< float, 4, 4 > float4x4
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
struct ReportList * reports