new Bmesh boolean is deleting some of edges data, (Creases and Bweigh) #47129

Closed
opened 2016-01-06 20:43:15 +01:00 by Adrian Rutkowski · 32 comments

linux 64

Blender Version
7e6d096

new Bmesh boolean is deleting some of edges data, (Creases and BWeight), even though it keeps others. Its especially problematic for Bevel Weight since it's often set before applying boolean.

Old(left) vs new(right) behavior
Screenshot from 2016-01-06 20-29-04.png

linux 64 **Blender Version** 7e6d096 new Bmesh boolean is deleting some of edges data, (Creases and BWeight), even though it keeps others. Its especially problematic for Bevel Weight since it's often set before applying boolean. Old(left) vs new(right) behavior ![Screenshot from 2016-01-06 20-29-04.png](https://archive.blender.org/developer/F271708/Screenshot_from_2016-01-06_20-29-04.png)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @niewinny

Added subscriber: @niewinny

#64497 was marked as duplicate of this issue

#64497 was marked as duplicate of this issue
Campbell Barton was assigned by Sergey Sharybin 2016-01-07 10:08:27 +01:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Could you attach an example file? - I just tested this and it worked.

Note that this may not be considered a bug - if mesh that the boolean modifier is on doesn't have the custom-data to begin with (booleans also wont add vertex colors, UV's etc if the mesh doesn't already have them).

Could you attach an example file? - I just tested this and it worked. Note that this may not be considered a bug - if mesh that the boolean modifier is on doesn't have the custom-data to begin with (booleans also wont add vertex colors, UV's etc if the mesh doesn't already have them).

Hey Campbell,

It looks like I provided a little missliding info. It do not work only if applied from below other modifier(this is important, bevel modifier for me).

so here are the screencast showing it,so You can replicate it.
first the new one.

bug1.webm
(or link https://photos.google.com/album/AF1QipPnGwacsMNP7Vdor44b4b2DgHUJaMGhVcjgFZK6/photo/AF1QipNk-JS3NNqrSLRGV6t4Oq3RreuXosMWQHGuVhql)

and the old one

bug2.webm

(or link https://photos.google.com/album/AF1QipPnGwacsMNP7Vdor44b4b2DgHUJaMGhVcjgFZK6/photo/AF1QipPywQWz5C1l8elQYKCQhylAohViyj-6EEkQFHfK)

as You can see the bevel weight(but not only) is not preserved anymore. It would be nice to have it but keep it mind that I have no idea how new bmesh mod works, it is still superior to old one though even with no edge layers save))

I used new buildbot cd6c6ee aswell, same thing linux 64

Hey Campbell, It looks like I provided a little missliding info. It do not work only if applied from below other modifier(this is important, bevel modifier for me). so here are the screencast showing it,so You can replicate it. first the new one. [bug1.webm](https://archive.blender.org/developer/F272052/bug1.webm) (or link https://photos.google.com/album/AF1QipPnGwacsMNP7Vdor44b4b2DgHUJaMGhVcjgFZK6/photo/AF1QipNk-JS3NNqrSLRGV6t4Oq3RreuXosMWQHGuVhql) and the old one [bug2.webm](https://archive.blender.org/developer/F272053/bug2.webm) (or link https://photos.google.com/album/AF1QipPnGwacsMNP7Vdor44b4b2DgHUJaMGhVcjgFZK6/photo/AF1QipPywQWz5C1l8elQYKCQhylAohViyj-6EEkQFHfK) as You can see the bevel weight(but not only) is not preserved anymore. It would be nice to have it but keep it mind that I have no idea how new bmesh mod works, it is still superior to old one though even with no edge layers save)) I used new buildbot cd6c6ee aswell, same thing linux 64

Added subscriber: @mont29

Added subscriber: @mont29
Campbell Barton removed their assignment 2016-08-03 06:35:14 +02:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Added subscriber: @Lambdadelta

Added subscriber: @Lambdadelta

Bevel weight still not preserved after bmesh boolean. This is especially annoying after removing carve solver, which previously can be used instead

Bevel weight still not preserved after bmesh boolean. This is especially annoying after removing carve solver, which previously can be used instead
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

please attach a sample file (.blend file, not a video) showing the issue

marking as incomplete until additional information is supplied.

please attach a sample file (.blend file, not a video) showing the issue marking as incomplete until additional information is supplied.

Bmesh boolean bug.blend

If you apply boolean then bevel weight disappear. I tested it on blender-2.79-737a5ef-win64-vc14

[Bmesh boolean bug.blend](https://archive.blender.org/developer/F2430400/Bmesh_boolean_bug.blend) If you apply boolean then bevel weight disappear. I tested it on blender-2.79-737a5ef-win64-vc14
Member

can confirm the weights disappear

can confirm the weights disappear

since that was not mentioned,
creases disappear as well

since that was not mentioned, creases disappear as well

Added subscriber: @WitoldJaworski

Added subscriber: @WitoldJaworski

since there is something happening here

that was fixed at some point
as long as all models (active one and the one we boolean with ) got edge data enabled
blender_2019-08-28_16-03-36.png
it will no longer clear edges

since there is something happening here that was fixed at some point as long as all models (active one and the one we boolean with ) got edge data enabled ![blender_2019-08-28_16-03-36.png](https://archive.blender.org/developer/F7707801/blender_2019-08-28_16-03-36.png) it will no longer clear edges
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Not sure if we can close this?
(confirmed to work with storing the data on all participating meshes...)

Not sure if we can close this? (confirmed to work with storing the data on all participating meshes...)

Added subscriber: @AnthonyEdlin

Added subscriber: @AnthonyEdlin

Although it works as long as you check store data on the boolean mesh target, it seems like the system should be able to handle combining smartly.

I look into it a little bit and notice boolean code uses BM_mesh_bm_from_me first on boolean target mesh and then second on it's own mesh. This is used to merge the two meshes into one bm before intersecting. But if you look in BM_mesh_bm_from_me you can see that the function BM_mesh_cd_flag_apply that adds the crease and weight layers is only called if it is the first mesh used. This means that those layers only exist if the first mesh (in this case the boolean target) has those layers. I added code to ensure those layers exist also if the second mesh has those layers. Here is patch: #47129.diff

It seemed to fix the issue for me in my limited testing. I am totally new to bmesh code though, so don't really know what I'm doing.

Although it works as long as you check store data on the boolean mesh target, it seems like the system should be able to handle combining smartly. I look into it a little bit and notice boolean code uses BM_mesh_bm_from_me first on boolean target mesh and then second on it's own mesh. This is used to merge the two meshes into one bm before intersecting. But if you look in BM_mesh_bm_from_me you can see that the function BM_mesh_cd_flag_apply that adds the crease and weight layers is only called if it is the first mesh used. This means that those layers only exist if the first mesh (in this case the boolean target) has those layers. I added code to ensure those layers exist also if the second mesh has those layers. Here is patch: [#47129.diff](https://archive.blender.org/developer/F8181715/T47129.diff) It seemed to fix the issue for me in my limited testing. I am totally new to bmesh code though, so don't really know what I'm doing.
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

Patch available but needs testing.

Patch available but needs testing.

Added subscriber: @MichaelWeisheim

Added subscriber: @MichaelWeisheim
Member

Added subscriber: @howardt

Added subscriber: @howardt
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Howard Trickey self-assigned this 2020-09-01 02:12:28 +02:00
Member

I believe this is fixed if one uses the Exact mode of new boolean. 9e09b5c418

I believe this is fixed if one uses the Exact mode of new boolean. 9e09b5c418

this was fixed back in 2.81 for old solver as well (option in geometry data tab needs to be enabled)

It can be closed

this was fixed back in 2.81 for old solver as well (option in geometry data tab needs to be enabled) It can be closed

As said previously, it always worked if you checked store data on the boolean target. It's been that way since, well I just tested 2.79 bmesh boolean and it's the same. So it always worked if you remember to check it on the boolean target even if you don't have any need to have it checked on the boolean target.

I just tried on a build from f2d26409e8 with the new Exact method and it also seems to NOT preserve the data if you don't have it checked on BOTH the original mesh AND the boolean target.

It seemed like it wouldn't be a bad idea for it to preserve the data in the applied mesh if EITHER the original mesh OR the boolean target had store data checked, which is what the diff I proposed tried to do.

As said previously, it always worked if you checked store data on the boolean target. It's been that way since, well I just tested 2.79 bmesh boolean and it's the same. So it always worked if you remember to check it on the boolean target even if you don't have any need to have it checked on the boolean target. I just tried on a build from f2d26409e8 with the new Exact method and it also seems to NOT preserve the data if you don't have it checked on BOTH the original mesh AND the boolean target. It seemed like it wouldn't be a bad idea for it to preserve the data in the applied mesh if EITHER the original mesh OR the boolean target had store data checked, which is what the diff I proposed tried to do.

Since I tested in 2.79 I also notice that the Carve solver does preserve the data even if the boolean target does NOT have store data checked. So it's not like it was always this way, just the bmesh boolean has always been this way.

Since I tested in 2.79 I also notice that the Carve solver does preserve the data even if the boolean target does NOT have store data checked. So it's not like it was always this way, just the bmesh boolean has always been this way.
Member

In #47129#1006153, @howardt wrote:
I believe this is fixed if one uses the Exact mode of new boolean. 9e09b5c418

like @AnthonyEdlin said, this is still not "fixed" in the way many users expect this [we just had #83932 reported], but yes, 'old' way of storing the data works.

> In #47129#1006153, @howardt wrote: > I believe this is fixed if one uses the Exact mode of new boolean. 9e09b5c418 like @AnthonyEdlin said, this is still not "fixed" in the way many users expect this [we just had #83932 reported], but yes, 'old' way of storing the data works.

Note that now that the new "Exact" mode doesn't go through bmesh it preserves the data. Updated patch to compile on recent version in case anyone still wants bmesh boolean to also work.boolean_customdata_save.diff

Note that now that the new "Exact" mode doesn't go through bmesh it preserves the data. Updated patch to compile on recent version in case anyone still wants bmesh boolean to also work.[boolean_customdata_save.diff](https://archive.blender.org/developer/F9869058/boolean_customdata_save.diff)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
13 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#47129
No description provided.