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
0066b32f
Commit
0066b32f
authored
14 years ago
by
Jonathan Smith
Browse files
Options
Downloads
Patches
Plain Diff
Applied patch by filiciss to add mesh solids and changed a default value which messed up the script
parent
c01d4a1b
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
add_mesh_solid.py
+10
-10
10 additions, 10 deletions
add_mesh_solid.py
with
10 additions
and
10 deletions
add_mesh_solid.py
+
10
−
10
View file @
0066b32f
...
...
@@ -508,7 +508,7 @@ def createSolid(plato,vtrunc,etrunc,dual,snub):
direction
=
0
# no diagonal, face is planar (somewhat)
if
etrunc
:
# for every vertex
for
i
in
v
:
# add the face, consisting of the vert,edge,next
for
i
in
v
0
:
# add the face, consisting of the vert,edge,next
# edge and face between those edges
for
j
in
range
(
len
(
i
[
1
])):
f
=
[
i
[
0
],
eStart
+
i
[
5
][
j
-
1
],
fStart
+
i
[
3
][
j
],
eStart
+
i
[
5
][
j
]]
...
...
@@ -564,7 +564,7 @@ class Solids(bpy.types.Operator):
default
=
1.0
)
vTrunc
=
FloatProperty
(
name
=
"
Vertex Truncation
"
,
description
=
"
Ammount of vertex truncation
"
,
min
=
0.0
,
min
=
0.0
01
,
soft_min
=
0.0
,
max
=
2.0
,
soft_max
=
2.0
,
...
...
@@ -691,7 +691,7 @@ class Solids(bpy.types.Operator):
# vertices will be on top of each other in some cases,
# so remove doubles then
if
((
self
.
vTrunc
==
1
)
and
(
self
.
eTrunc
==
0
))
or
(
self
.
eTrunc
==
1
):
current_mode
=
obj
.
mode
current_mode
=
context
.
active_object
.
mode
if
current_mode
==
'
OBJECT
'
:
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
EDIT
'
)
bpy
.
ops
.
mesh
.
select_all
(
action
=
'
SELECT
'
)
...
...
@@ -699,13 +699,13 @@ class Solids(bpy.types.Operator):
bpy
.
ops
.
object
.
mode_set
(
mode
=
current_mode
)
# snub duals suck, so make all normals point outwards
if
self
.
dual
and
(
self
.
snub
!=
"
0
"
):
current_mode
=
obj
.
mode
if
current_mode
==
'
OBJECT
'
:
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
EDIT
'
)
bpy
.
ops
.
mesh
.
select_all
(
action
=
'
SELECT
'
)
bpy
.
ops
.
mesh
.
normals_make_consistent
()
bpy
.
ops
.
object
.
mode_set
(
mode
=
current_mode
)
#
if self.dual and (self.snub != "0"):
current_mode
=
context
.
active_object
.
mode
if
current_mode
==
'
OBJECT
'
:
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
EDIT
'
)
bpy
.
ops
.
mesh
.
select_all
(
action
=
'
SELECT
'
)
bpy
.
ops
.
mesh
.
normals_make_consistent
()
bpy
.
ops
.
object
.
mode_set
(
mode
=
current_mode
)
# turn undo back on
bpy
.
context
.
user_preferences
.
edit
.
use_global_undo
=
True
...
...
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