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
c7749734
Commit
c7749734
authored
12 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
impliment source limit a bit differently
parent
da274eb0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
object_fracture_cell/__init__.py
+5
-6
5 additions, 6 deletions
object_fracture_cell/__init__.py
with
5 additions
and
6 deletions
object_fracture_cell/__init__.py
+
5
−
6
View file @
c7749734
...
@@ -61,6 +61,9 @@ def main_object(scene, obj, level, **kw):
...
@@ -61,6 +61,9 @@ def main_object(scene, obj, level, **kw):
use_debug_bool
=
kw_copy
.
pop
(
"
use_debug_bool
"
)
use_debug_bool
=
kw_copy
.
pop
(
"
use_debug_bool
"
)
use_interior_vgroup
=
kw_copy
.
pop
(
"
use_interior_vgroup
"
)
use_interior_vgroup
=
kw_copy
.
pop
(
"
use_interior_vgroup
"
)
if
level
!=
0
:
kw_copy
[
"
source_limit
"
]
=
recursion_source_limit
from
.
import
fracture_cell_setup
from
.
import
fracture_cell_setup
# not essential but selection is visual distraction.
# not essential but selection is visual distraction.
...
@@ -88,7 +91,7 @@ def main_object(scene, obj, level, **kw):
...
@@ -88,7 +91,7 @@ def main_object(scene, obj, level, **kw):
objects_recurse_input
=
[(
i
,
o
)
for
i
,
o
in
enumerate
(
objects
)]
objects_recurse_input
=
[(
i
,
o
)
for
i
,
o
in
enumerate
(
objects
)]
if
recursion_chance
!=
1.0
or
recursion_source_limit
!=
0
:
if
recursion_chance
!=
1.0
:
if
0
:
if
0
:
random
.
shuffle
(
objects_recurse_input
)
random
.
shuffle
(
objects_recurse_input
)
...
@@ -110,11 +113,7 @@ def main_object(scene, obj, level, **kw):
...
@@ -110,11 +113,7 @@ def main_object(scene, obj, level, **kw):
if
recursion_chance_select
==
'
CURSOR_MAX
'
:
if
recursion_chance_select
==
'
CURSOR_MAX
'
:
objects_recurse_input
.
reverse
()
objects_recurse_input
.
reverse
()
recursion_tot
=
int
(
recursion_chance
*
len
(
objects_recurse_input
))
objects_recurse_input
[
int
(
recursion_chance
*
len
(
objects_recurse_input
)):]
=
[]
if
recursion_source_limit
!=
0
and
recursion_tot
>
recursion_source_limit
:
recursion_tot
=
recursion_source_limit
objects_recurse_input
[
recursion_tot
:]
=
[]
objects_recurse_input
.
sort
()
objects_recurse_input
.
sort
()
# reverse index values so we can remove from original list.
# reverse index values so we can remove from original list.
...
...
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