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
a2324bd4
Commit
a2324bd4
authored
12 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
split islands boolean option.
parent
8a56a608
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
object_fracture_voroni/__init__.py
+4
-2
4 additions, 2 deletions
object_fracture_voroni/__init__.py
object_fracture_voroni/fracture_cell_setup.py
+29
-2
29 additions, 2 deletions
object_fracture_voroni/fracture_cell_setup.py
with
33 additions
and
4 deletions
object_fracture_voroni/__init__.py
+
4
−
2
View file @
a2324bd4
...
...
@@ -56,12 +56,13 @@ def main_object(scene, obj, level, **kw):
recursion_chance_select
=
kw_copy
.
pop
(
"
recursion_chance_select
"
)
use_layer_next
=
kw_copy
.
pop
(
"
use_layer_next
"
)
group_name
=
kw_copy
.
pop
(
"
group_name
"
)
use_island_split
=
kw_copy
.
pop
(
"
use_island_split
"
)
from
.
import
fracture_cell_setup
objects
=
fracture_cell_setup
.
cell_fracture_objects
(
scene
,
obj
,
**
kw_copy
)
objects
=
fracture_cell_setup
.
cell_fracture_boolean
(
scene
,
obj
,
objects
)
objects
=
fracture_cell_setup
.
cell_fracture_boolean
(
scene
,
obj
,
objects
,
use_island_split
=
use_island_split
)
# todo, split islands.
...
...
@@ -327,6 +328,7 @@ class FractureCell(Operator):
rowsub
.
prop
(
self
,
"
use_smooth_faces
"
)
rowsub
.
prop
(
self
,
"
use_smooth_edges
"
)
rowsub
.
prop
(
self
,
"
use_data_match
"
)
rowsub
.
prop
(
self
,
"
use_island_split
"
)
rowsub
.
prop
(
self
,
"
margin
"
)
# rowsub.prop(self, "use_island_split") # TODO
...
...
This diff is collapsed.
Click to expand it.
object_fracture_voroni/fracture_cell_setup.py
+
29
−
2
View file @
a2324bd4
...
...
@@ -122,7 +122,6 @@ def cell_fracture_objects(scene, obj,
use_smooth_faces
=
False
,
use_smooth_edges
=
True
,
use_data_match
=
False
,
use_island_split
=
False
,
use_debug_points
=
False
,
margin
=
0.0
,
):
...
...
@@ -279,7 +278,11 @@ def cell_fracture_objects(scene, obj,
return
objects
def
cell_fracture_boolean
(
scene
,
obj
,
objects
,
apply
=
True
,
clean
=
True
):
def
cell_fracture_boolean
(
scene
,
obj
,
objects
,
apply
=
True
,
clean
=
True
,
use_island_split
=
False
,
):
objects_boolean
=
[]
...
...
@@ -326,4 +329,28 @@ def cell_fracture_boolean(scene, obj, objects, apply=True, clean=True):
if
obj_cell
is
not
None
:
objects_boolean
.
append
(
obj_cell
)
if
use_island_split
:
# this is ugly and Im not proud of this - campbell
objects_islands
=
[]
for
obj_cell
in
objects_boolean
:
scene
.
objects
.
active
=
obj_cell
group_island
=
bpy
.
data
.
groups
.
new
(
name
=
"
Islands
"
)
group_island
.
objects
.
link
(
obj_cell
)
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
EDIT
'
)
bpy
.
ops
.
mesh
.
select_all
(
action
=
'
SELECT
'
)
bpy
.
ops
.
mesh
.
separate
(
type
=
'
LOOSE
'
)
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
)
objects_islands
.
extend
(
group_island
.
objects
[:])
bpy
.
data
.
groups
.
remove
(
group_island
)
scene
.
objects
.
active
=
None
objects_boolean
=
objects_islands
return
objects_boolean
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