Page MenuHome

Multi-Object-Editing: Inset (MESH_OT_inset)
AbandonedPublic

Authored by Nick Milios (semaphore) on May 8 2018, 5:42 PM.

Details

Summary

Althow it is worrking, i have no idea if it is in the blender way...

I changed the op->customdata from type InsetData * to InsetData **
with use of MEM_mallocN / MEM_allocN_len / MEM_freeN
so we have an InsetData * foreach object.

The problem is tha the InsetData has an BMEditMesh * em for active object and an other BMEditMesh * mesh_backup as deep copy for cancellation.

Diff Detail

Repository
rB Blender

Event Timeline

Dalai Felinto (dfelinto) requested changes to this revision.May 9 2018, 12:20 PM
Dalai Felinto (dfelinto) added inline comments.
source/blender/editors/mesh/editmesh_inset.c
135

If you use MEM_callocN you don't need to initialize those as NULL.

140

RNA_.*_get/set should always be outside the for loop.

196

See comment above about splitting the InsetData in array and shared data.

This revision now requires changes to proceed.May 9 2018, 12:20 PM
  • create a struct InsetDataMesh that have a mesh its mesh_backup as copy
  • change structure InsetData to have an array of InsetDataMesh (one for each selected object)
Nick Milios (semaphore) marked 2 inline comments as done.May 9 2018, 7:25 PM
Nick Milios (semaphore) added inline comments.
source/blender/editors/mesh/editmesh_inset.c
135

if i don't set it to null i have an segmentation fault with 0xd instead of 0x0

Nick Milios (semaphore) retitled this revision from Multi-Object-Editing: Inset (MESH_OT_inset) to Multi-Object-Editing: Inset boolean (MESH_OT_intersect_boolean).May 9 2018, 9:02 PM
Nick Milios (semaphore) retitled this revision from Multi-Object-Editing: Inset boolean (MESH_OT_intersect_boolean) to Multi-Object-Editing: Inset (MESH_OT_inset) .
Dalai Felinto (dfelinto) requested changes to this revision.May 11 2018, 11:31 AM

The patch is failing to apply. Can you rebase it to latest 2.8 and re-submit it with arcanist? https://wiki.blender.org/index.php/Dev:Doc/Tools/Code_Review#Use_Arcanist

source/blender/editors/mesh/editmesh_inset.c
141

Instead of MEM_mallocN use MEM_callocN, this initialize the memory to NULL.

147

See comment above about MEM_callocN.

This revision now requires changes to proceed.May 11 2018, 11:31 AM
  • Instead of MEM_mallocN use MEM_callocN
Nick Milios (semaphore) marked 4 inline comments as done.May 11 2018, 3:43 PM