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
2829c040
Commit
2829c040
authored
3 years ago
by
Clemens Barth
Browse files
Options
Downloads
Patches
Plain Diff
T94008, T94292
Check before, if the user is in the 'EDIT_MESH' mode. If so, change to 'OBJECT' mode.
parent
8372ef96
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
io_mesh_atomic/pdb_gui.py
+3
-2
3 additions, 2 deletions
io_mesh_atomic/pdb_gui.py
io_mesh_atomic/xyz_gui.py
+3
-2
3 additions, 2 deletions
io_mesh_atomic/xyz_gui.py
with
6 additions
and
4 deletions
io_mesh_atomic/pdb_gui.py
+
3
−
2
View file @
2829c040
...
...
@@ -203,8 +203,9 @@ class IMPORT_OT_pdb(Operator, ImportHelper):
def
execute
(
self
,
context
):
# To be on the safe side, we switch to the 'OBJECT' mode.
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
,
toggle
=
False
)
# Switch to 'OBJECT' mode when in 'EDIT' mode.
if
bpy
.
context
.
mode
==
'
EDIT_MESH
'
:
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
,
toggle
=
False
)
# This is in order to solve this strange 'relative path' thing.
filepath_pdb
=
bpy
.
path
.
abspath
(
self
.
filepath
)
...
...
This diff is collapsed.
Click to expand it.
io_mesh_atomic/xyz_gui.py
+
3
−
2
View file @
2829c040
...
...
@@ -153,8 +153,9 @@ class IMPORT_OT_xyz(Operator, ImportHelper):
col
.
prop
(
self
,
"
images_per_key
"
)
def
execute
(
self
,
context
):
# To be on the safe side, we switch to the 'OBJECT' mode.
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
,
toggle
=
False
)
# Switch to 'OBJECT' mode when in 'EDIT' mode.
if
bpy
.
context
.
mode
==
'
EDIT_MESH
'
:
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
,
toggle
=
False
)
del
ALL_FRAMES
[:]
del
ELEMENTS
[:]
...
...
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