Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
a5a2b36b
Commit
a5a2b36b
authored
5 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
Fix T66820: Cell fracture not working properly
This failed to properly calculate booleans from the fractured cells.
parent
376d6096
Branches
Branches containing commit
Tags
0.0.8
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
object_fracture_cell/fracture_cell_setup.py
+8
-2
8 additions, 2 deletions
object_fracture_cell/fracture_cell_setup.py
with
8 additions
and
2 deletions
object_fracture_cell/fracture_cell_setup.py
+
8
−
2
View file @
a5a2b36b
...
@@ -321,7 +321,6 @@ def cell_fracture_boolean(context, obj, objects,
...
@@ -321,7 +321,6 @@ def cell_fracture_boolean(context, obj, objects,
collection
=
context
.
collection
collection
=
context
.
collection
scene
=
context
.
scene
scene
=
context
.
scene
view_layer
=
context
.
view_layer
view_layer
=
context
.
view_layer
depsgraph
=
context
.
evaluated_depsgraph_get
()
if
use_interior_hide
and
level
==
0
:
if
use_interior_hide
and
level
==
0
:
# only set for level 0
# only set for level 0
...
@@ -337,11 +336,18 @@ def cell_fracture_boolean(context, obj, objects,
...
@@ -337,11 +336,18 @@ def cell_fracture_boolean(context, obj, objects,
if
use_interior_hide
:
if
use_interior_hide
:
obj_cell
.
data
.
polygons
.
foreach_set
(
"
hide
"
,
[
True
]
*
len
(
obj_cell
.
data
.
polygons
))
obj_cell
.
data
.
polygons
.
foreach_set
(
"
hide
"
,
[
True
]
*
len
(
obj_cell
.
data
.
polygons
))
# Calculates all booleans at once (faster).
depsgraph
=
context
.
evaluated_depsgraph_get
()
for
obj_cell
in
objects
:
if
not
use_debug_bool
:
obj_cell_eval
=
obj_cell
.
evaluated_get
(
depsgraph
)
obj_cell_eval
=
obj_cell
.
evaluated_get
(
depsgraph
)
mesh_new
=
bpy
.
data
.
meshes
.
new_from_object
(
obj_cell_eval
)
mesh_new
=
bpy
.
data
.
meshes
.
new_from_object
(
obj_cell_eval
)
mesh_old
=
obj_cell
.
data
mesh_old
=
obj_cell
.
data
obj_cell
.
data
=
mesh_new
obj_cell
.
data
=
mesh_new
obj_cell
.
modifiers
.
remove
(
mod
)
obj_cell
.
modifiers
.
remove
(
obj_cell
.
modifiers
[
-
1
]
)
# remove if not valid
# remove if not valid
if
not
mesh_old
.
users
:
if
not
mesh_old
.
users
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment