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
cb3f170d
Commit
cb3f170d
authored
11 years ago
by
Bastien Montagne
Browse files
Options
Downloads
Patches
Plain Diff
Name added planes from the image name (like already done for textures and materials).
parent
fc3ce74d
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
io_import_images_as_planes.py
+4
-3
4 additions, 3 deletions
io_import_images_as_planes.py
with
4 additions
and
3 deletions
io_import_images_as_planes.py
+
4
−
3
View file @
cb3f170d
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
bl_info
=
{
bl_info
=
{
"
name
"
:
"
Import Images as Planes
"
,
"
name
"
:
"
Import Images as Planes
"
,
"
author
"
:
"
Florian Meyer (tstscr), mont29, matali
"
,
"
author
"
:
"
Florian Meyer (tstscr), mont29, matali
"
,
"
version
"
:
(
1
,
9
),
"
version
"
:
(
1
,
9
,
1
),
"
blender
"
:
(
2
,
6
6
,
4
),
"
blender
"
:
(
2
,
6
9
,
0
),
"
location
"
:
"
File > Import > Images as Planes or Add > Mesh > Images as Planes
"
,
"
location
"
:
"
File > Import > Images as Planes or Add > Mesh > Images as Planes
"
,
"
description
"
:
"
Imports images and creates planes with the appropriate aspect ratio.
"
"
description
"
:
"
Imports images and creates planes with the appropriate aspect ratio.
"
"
The images are mapped to the planes.
"
,
"
The images are mapped to the planes.
"
,
...
@@ -52,7 +52,7 @@ from bpy_extras.image_utils import load_image
...
@@ -52,7 +52,7 @@ from bpy_extras.image_utils import load_image
DEFAULT_EXT
=
"
*
"
DEFAULT_EXT
=
"
*
"
EXT_FILTER
=
getattr
(
collections
,
"
OrderedDict
"
,
dict
)((
EXT_FILTER
=
getattr
(
collections
,
"
OrderedDict
"
,
dict
)((
(
DEFAULT_EXT
,
((),
"
All image formats
"
,
"
Import all know image (or movie) formats.
"
)),
(
DEFAULT_EXT
,
((),
"
All image formats
"
,
"
Import all know
n
image (or movie) formats.
"
)),
(
"
jpeg
"
,
((
"
jpeg
"
,
"
jpg
"
,
"
jpe
"
),
"
JPEG ({})
"
,
"
Joint Photographic Experts Group
"
)),
(
"
jpeg
"
,
((
"
jpeg
"
,
"
jpg
"
,
"
jpe
"
),
"
JPEG ({})
"
,
"
Joint Photographic Experts Group
"
)),
(
"
png
"
,
((
"
png
"
,
),
"
PNG ({})
"
,
"
Portable Network Graphics
"
)),
(
"
png
"
,
((
"
png
"
,
),
"
PNG ({})
"
,
"
Portable Network Graphics
"
)),
(
"
tga
"
,
((
"
tga
"
,
"
tpic
"
),
"
Truevision TGA ({})
"
,
""
)),
(
"
tga
"
,
((
"
tga
"
,
"
tpic
"
),
"
Truevision TGA ({})
"
,
""
)),
...
@@ -386,6 +386,7 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
...
@@ -386,6 +386,7 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
if
plane
.
mode
is
not
'
OBJECT
'
:
if
plane
.
mode
is
not
'
OBJECT
'
:
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
)
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
)
plane
.
dimensions
=
x
,
y
,
0.0
plane
.
dimensions
=
x
,
y
,
0.0
plane
.
name
=
material
.
name
bpy
.
ops
.
object
.
transform_apply
(
scale
=
True
)
bpy
.
ops
.
object
.
transform_apply
(
scale
=
True
)
plane
.
data
.
uv_textures
.
new
()
plane
.
data
.
uv_textures
.
new
()
plane
.
data
.
materials
.
append
(
material
)
plane
.
data
.
materials
.
append
(
material
)
...
...
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