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
ff76aab7
Commit
ff76aab7
authored
11 years ago
by
Brecht Van Lommel
Browse files
Options
Downloads
Patches
Plain Diff
Fix #35360: F2 addon not working in some cases on a mesh with no faces.
parent
c2f763d3
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mesh_f2.py
+5
-4
5 additions, 4 deletions
mesh_f2.py
with
5 additions
and
4 deletions
mesh_f2.py
+
5
−
4
View file @
ff76aab7
...
@@ -249,9 +249,10 @@ class MeshF2(bpy.types.Operator):
...
@@ -249,9 +249,10 @@ class MeshF2(bpy.types.Operator):
bm
=
bmesh
.
from_edit_mesh
(
context
.
active_object
.
data
)
bm
=
bmesh
.
from_edit_mesh
(
context
.
active_object
.
data
)
sel
=
[
v
for
v
in
bm
.
verts
if
v
.
select
]
sel
=
[
v
for
v
in
bm
.
verts
if
v
.
select
]
if
len
(
sel
)
>
2
:
if
len
(
sel
)
>
2
:
if
len
([
True
for
f
in
bm
.
faces
if
f
.
select
])
==
len
(
bm
.
faces
):
if
len
(
bm
.
faces
)
>
0
:
# all faces selected, can't create new one
if
len
([
True
for
f
in
bm
.
faces
if
f
.
select
])
==
len
(
bm
.
faces
):
return
{
'
CANCELLED
'
}
# all faces selected, can't create new one
return
{
'
CANCELLED
'
}
# original 'Make Edge/Face' behaviour
# original 'Make Edge/Face' behaviour
try
:
try
:
bpy
.
ops
.
mesh
.
edge_face_add
(
'
INVOKE_DEFAULT
'
)
bpy
.
ops
.
mesh
.
edge_face_add
(
'
INVOKE_DEFAULT
'
)
...
@@ -301,4 +302,4 @@ def unregister():
...
@@ -301,4 +302,4 @@ def unregister():
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
register
()
register
()
\ No newline at end of file
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