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
0c1a15d4
Commit
0c1a15d4
authored
15 years ago
by
Martin Buerbaum
Browse files
Options
Downloads
Patches
Plain Diff
* Renamed "Object: Planes from Images" script to "Import: Images as Planes"
* New category: 'Import/Export'
parent
00c5c022
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
import_images_as_planes.py
+14
-14
14 additions, 14 deletions
import_images_as_planes.py
with
14 additions
and
14 deletions
object_planes_from_imag
es.py
→
import_images_as_plan
es.py
+
14
−
14
View file @
0c1a15d4
...
...
@@ -48,16 +48,17 @@ It also has an option to translate pixeldimensions into Blenderunits.
"""
bl_addon_info
=
{
'
name
'
:
'
Object: Planes from Imag
es
'
,
'
name
'
:
'
Import: Images as Plan
es
'
,
'
author
'
:
'
Florian Meyer (testscreenings)
'
,
'
version
'
:
'
0.7
'
,
'
blender
'
:
(
2
,
5
,
2
),
'
location
'
:
'
View3D > Add Mesh > Planes from Imag
es
'
,
'
location
'
:
'
File > Import > Images as Plan
es
'
,
'
url
'
:
'
http://wiki.blender.org/index.php/Extensions:2.5/Py/
'
\
'
Scripts/Add_Mesh/Planes_from_Images
'
,
'
description
'
:
'
Imports images and creates planes
'
\
'
with the appropiate aspect ratio.
'
,
'
category
'
:
'
Object
'
}
'
with the appropiate aspect ratio.
'
\
'
The images are mapped to the planes.
'
,
'
category
'
:
'
Import/Export
'
}
import
bpy
from
bpy.props
import
*
...
...
@@ -260,7 +261,7 @@ def getTexture(path, img):
# Custom material property - get
def
mapget
(
self
):
"""
Custom property of the
planes_from_imag
es addon.
"""
"""
Custom property of the
images_as_plan
es addon.
"""
mapping
=
[]
mapping
.
append
(
self
.
shadeless
)
mapping
.
append
(
self
.
transparency
)
...
...
@@ -366,9 +367,9 @@ def main(filePath, options, mapping, dimension):
# Operator
class
planes_from_imag
es
(
bpy
.
types
.
Operator
):
class
ImportImagesAsPlan
es
(
bpy
.
types
.
Operator
):
''''''
bl_idname
=
"
mesh.planes_from_imag
es
"
bl_idname
=
"
import.images_as_plan
es
"
bl_label
=
"
Import Images as Planes
"
bl_description
=
"
Create mesh plane(s) from image files
"
\
"
with the appropiate aspect ratio.
"
...
...
@@ -484,21 +485,20 @@ class planes_from_images(bpy.types.Operator):
# Registering / Unregister
menu_func
=
(
lambda
self
,
context
:
self
.
layout
.
operator
(
planes_from_imag
es
.
bl_idname
,
text
=
"
Planes from Imag
es
"
,
ImportImagesAsPlan
es
.
bl_idname
,
text
=
"
Images as Plan
es
"
,
icon
=
'
PLUGIN
'
))
def
register
():
bpy
.
types
.
register
(
planes_from_imag
es
)
bpy
.
types
.
INFO_MT_
mesh_add
.
append
(
menu_func
)
bpy
.
types
.
register
(
ImportImagesAsPlan
es
)
bpy
.
types
.
INFO_MT_
file_import
.
append
(
menu_func
)
def
unregister
():
bpy
.
types
.
unregister
(
planes_from_imag
es
)
bpy
.
types
.
INFO_MT_
mesh_add
.
remove
(
menu_func
)
bpy
.
types
.
unregister
(
ImportImagesAsPlan
es
)
bpy
.
types
.
INFO_MT_
file_import
.
remove
(
menu_func
)
if
__name__
==
"
__main__
"
:
...
...
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