Blender Git Loki

Blender Git "soc-2021-adaptive-cloth" branch commits.

Page: 11 / 13

July 2, 2021, 15:05 (GMT)
adaptive_cloth: tests: MeshIO: read DNA Mesh loose edges
July 2, 2021, 15:02 (GMT)
adaptive_cloth: tests: MeshIO: write OBJ loose edges
July 2, 2021, 15:01 (GMT)
adaptive_cloth: tests: MeshIO: read OBJ loose edges
July 2, 2021, 14:59 (GMT)
adaptive_cloth: MeshIO: support line indices for read DNA Mesh and write OBJ
July 2, 2021, 10:16 (GMT)
cloth: cloth_to_object: create copy only if needed
July 2, 2021, 08:03 (GMT)
cloth: create copy of mesh only when needed
July 2, 2021, 07:19 (GMT)
adaptive_cloth: MeshIO: write DNA Mesh
July 1, 2021, 14:14 (GMT)
adaptive_cloth: MeshIO: test: ReadDNAMesh: finish up
July 1, 2021, 13:25 (GMT)
adaptive_cloth: fix: MeshIO: write obj normals started with 'v ' instead of 'vn '
July 1, 2021, 13:04 (GMT)
adaptive_cloth: MeshIO: read DNA Mesh

The conversion was easy enough but the test case for this is extremely difficult.

Creating `Mesh` is not possible without initializing `idtype` using `BKE_idtype_init()` (there should actually be a check for this, at least in debug mode).

Converting this `Mesh` to `BMesh` is simple without any hassles.

Using the `BMesh`, create a cube. Now turns out that is also simple if `BMO_op_callf()` is known about. The previous approach was to create a copy of the code in `bmo_primitive.c` and use that. This also leads to problems because without the `BMOperator` functions pre-applied on the `BMesh`, `BMO_face_flag_enable()` crashes without any proper indication of what could have caused the error. Simplest way to fix is to just remove that flag check. Then found out about `BMO_op_callf()`, this really needs documentation since it has variadic arguments and is magically calling the required operator (printf style).

Now that we have the cube in the `BMesh`, converting it back to `Mesh` is another massive problem. There are many functions that can do this `BM_mesh_bm_to_me()` and `BKE_mesh_from_bmesh_eval_nomain()` are most appropriate. These functions write the CustomData blocks to `Mesh` but before doing do, set the `mvert->co` and such. For some reason, `BMesh` has not updated the blocks so `mvert->co` just has (0.0, 0.0, 0.0). After spending multiple hours on this, found one way to fix this, copy the `BMesh` which then initializes the blocks in the new `BMesh` and this can be used in `BM_mesh_bm_to_me()` to get the `Mesh` that is needed.
July 1, 2021, 05:14 (GMT)
adaptive_cloth: tests: create separate executable for faster compilation
June 30, 2021, 12:55 (GMT)
adaptive_cloth: MeshIO: FileType to IOType
June 30, 2021, 05:00 (GMT)
adaptive_cloth: update references
June 30, 2021, 05:00 (GMT)
bli: generational_arena: add references
June 24, 2021, 14:49 (GMT)
adaptive_cloth: Mesh: write()

Creates a MeshIO object. There are limitations for this as of right
now, check inline comments for details (is a todo), the basic problem
is if the arena has `EntryNoExist` in between elements. This will
cause major problems.
June 24, 2021, 12:44 (GMT)
adaptive_cloth: MeshIO: write obj
June 24, 2021, 11:20 (GMT)
adaptive_cloth: MeshReader to MeshIO
June 24, 2021, 08:05 (GMT)
adaptive_cloth: mesh: fix failing test Mesh_Read

Turns out auto doesn't automatically use references even if the function is returning a reference, need to do `auto &`.
June 24, 2021, 07:58 (GMT)
adaptive_cloth: better debug print
June 24, 2021, 06:35 (GMT)
adaptive_cloth: operator << overload for debug printing
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021