Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons-contrib
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-contrib
Commits
c9175b41
Commit
c9175b41
authored
4 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup: autopep8 3DS i/o
parent
dff14c58
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
io_scene_3ds/__init__.py
+42
-43
42 additions, 43 deletions
io_scene_3ds/__init__.py
io_scene_3ds/export_3ds.py
+75
-65
75 additions, 65 deletions
io_scene_3ds/export_3ds.py
io_scene_3ds/import_3ds.py
+88
-77
88 additions, 77 deletions
io_scene_3ds/import_3ds.py
with
205 additions
and
185 deletions
io_scene_3ds/__init__.py
+
42
−
43
View file @
c9175b41
...
@@ -18,6 +18,19 @@
...
@@ -18,6 +18,19 @@
# <pep8-80 compliant>
# <pep8-80 compliant>
from
bpy_extras.io_utils
import
(
ImportHelper
,
ExportHelper
,
orientation_helper
,
axis_conversion
,
)
from
bpy.props
import
(
BoolProperty
,
EnumProperty
,
FloatProperty
,
StringProperty
,
)
import
bpy
bl_info
=
{
bl_info
=
{
"
name
"
:
"
Autodesk 3DS format
"
,
"
name
"
:
"
Autodesk 3DS format
"
,
"
author
"
:
"
Bob Holcomb, Campbell Barton, Andreas Atteneder, Sebastian Schrand
"
,
"
author
"
:
"
Bob Holcomb, Campbell Barton, Andreas Atteneder, Sebastian Schrand
"
,
...
@@ -40,21 +53,6 @@ if "bpy" in locals():
...
@@ -40,21 +53,6 @@ if "bpy" in locals():
importlib
.
reload
(
export_3ds
)
importlib
.
reload
(
export_3ds
)
import
bpy
from
bpy.props
import
(
BoolProperty
,
EnumProperty
,
FloatProperty
,
StringProperty
,
)
from
bpy_extras.io_utils
import
(
ImportHelper
,
ExportHelper
,
orientation_helper
,
axis_conversion
,
)
@orientation_helper
(
axis_forward
=
'
Y
'
,
axis_up
=
'
Z
'
)
@orientation_helper
(
axis_forward
=
'
Y
'
,
axis_up
=
'
Z
'
)
class
Import3DS
(
bpy
.
types
.
Operator
,
ImportHelper
):
class
Import3DS
(
bpy
.
types
.
Operator
,
ImportHelper
):
"""
Import from 3DS file format (.3ds)
"""
"""
Import from 3DS file format (.3ds)
"""
...
@@ -66,31 +64,31 @@ class Import3DS(bpy.types.Operator, ImportHelper):
...
@@ -66,31 +64,31 @@ class Import3DS(bpy.types.Operator, ImportHelper):
filter_glob
:
StringProperty
(
default
=
"
*.3ds
"
,
options
=
{
'
HIDDEN
'
})
filter_glob
:
StringProperty
(
default
=
"
*.3ds
"
,
options
=
{
'
HIDDEN
'
})
constrain_size
:
FloatProperty
(
constrain_size
:
FloatProperty
(
name
=
"
Size Constraint
"
,
name
=
"
Size Constraint
"
,
description
=
"
Scale the model by 10 until it reaches the
"
description
=
"
Scale the model by 10 until it reaches the
"
"
size constraint (0 to disable)
"
,
"
size constraint (0 to disable)
"
,
min
=
0.0
,
max
=
1000.0
,
min
=
0.0
,
max
=
1000.0
,
soft_min
=
0.0
,
soft_max
=
1000.0
,
soft_min
=
0.0
,
soft_max
=
1000.0
,
default
=
10.0
,
default
=
10.0
,
)
)
use_image_search
:
BoolProperty
(
use_image_search
:
BoolProperty
(
name
=
"
Image Search
"
,
name
=
"
Image Search
"
,
description
=
"
Search subdirectories for any associated images
"
description
=
"
Search subdirectories for any associated images
"
"
(Warning, may be slow)
"
,
"
(Warning, may be slow)
"
,
default
=
True
,
default
=
True
,
)
)
use_apply_transform
:
BoolProperty
(
use_apply_transform
:
BoolProperty
(
name
=
"
Apply Transform
"
,
name
=
"
Apply Transform
"
,
description
=
"
Workaround for object transformations
"
description
=
"
Workaround for object transformations
"
"
importing incorrectly
"
,
"
importing incorrectly
"
,
default
=
True
,
default
=
True
,
)
)
read_keyframe
:
bpy
.
props
.
BoolProperty
(
read_keyframe
:
bpy
.
props
.
BoolProperty
(
name
=
"
Read Keyframe
"
,
name
=
"
Read Keyframe
"
,
description
=
"
Read the keyframe data
"
,
description
=
"
Read the keyframe data
"
,
default
=
True
,
default
=
True
,
)
)
def
execute
(
self
,
context
):
def
execute
(
self
,
context
):
from
.
import
import_3ds
from
.
import
import_3ds
...
@@ -116,15 +114,15 @@ class Export3DS(bpy.types.Operator, ExportHelper):
...
@@ -116,15 +114,15 @@ class Export3DS(bpy.types.Operator, ExportHelper):
filename_ext
=
"
.3ds
"
filename_ext
=
"
.3ds
"
filter_glob
:
StringProperty
(
filter_glob
:
StringProperty
(
default
=
"
*.3ds
"
,
default
=
"
*.3ds
"
,
options
=
{
'
HIDDEN
'
},
options
=
{
'
HIDDEN
'
},
)
)
use_selection
:
BoolProperty
(
use_selection
:
BoolProperty
(
name
=
"
Selection Only
"
,
name
=
"
Selection Only
"
,
description
=
"
Export selected objects only
"
,
description
=
"
Export selected objects only
"
,
default
=
False
,
default
=
False
,
)
)
def
execute
(
self
,
context
):
def
execute
(
self
,
context
):
from
.
import
export_3ds
from
.
import
export_3ds
...
@@ -174,5 +172,6 @@ def unregister():
...
@@ -174,5 +172,6 @@ def unregister():
# disabled scaling to size, this requires exposing bb (easy) and understanding
# disabled scaling to size, this requires exposing bb (easy) and understanding
# how it works (needs some time)
# how it works (needs some time)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
register
()
register
()
This diff is collapsed.
Click to expand it.
io_scene_3ds/export_3ds.py
+
75
−
65
View file @
c9175b41
This diff is collapsed.
Click to expand it.
io_scene_3ds/import_3ds.py
+
88
−
77
View file @
c9175b41
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