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
be0ad559
Commit
be0ad559
authored
13 years ago
by
Florian Meyer
Browse files
Options
Downloads
Patches
Plain Diff
added per user request: receive transparent material option
parent
b6d1cb0a
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
+10
-2
10 additions, 2 deletions
io_import_images_as_planes.py
with
10 additions
and
2 deletions
io_import_images_as_planes.py
+
10
−
2
View file @
be0ad559
...
@@ -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)
"
,
"
author
"
:
"
Florian Meyer (tstscr)
"
,
"
version
"
:
(
1
,
0
),
"
version
"
:
(
1
,
1
),
"
blender
"
:
(
2
,
6
,
1
),
"
blender
"
:
(
2
,
6
,
3
),
"
location
"
:
"
File > Import > Images as Planes
"
,
"
location
"
:
"
File > Import > Images as Planes
"
,
"
description
"
:
"
Imports images and creates planes with the appropriate
"
"
description
"
:
"
Imports images and creates planes with the appropriate
"
"
aspect ratio. The images are mapped to the planes.
"
,
"
aspect ratio. The images are mapped to the planes.
"
,
...
@@ -126,6 +126,7 @@ def create_material_for_texture(self, texture):
...
@@ -126,6 +126,7 @@ def create_material_for_texture(self, texture):
material
.
use_transparency
=
self
.
use_transparency
material
.
use_transparency
=
self
.
use_transparency
material
.
transparency_method
=
self
.
transparency_method
material
.
transparency_method
=
self
.
transparency_method
material
.
use_shadeless
=
self
.
use_shadeless
material
.
use_shadeless
=
self
.
use_shadeless
material
.
use_transparent_shadows
=
self
.
use_transparent_shadows
return
material
return
material
# if no material found: create one
# if no material found: create one
...
@@ -145,6 +146,7 @@ def create_material_for_texture(self, texture):
...
@@ -145,6 +146,7 @@ def create_material_for_texture(self, texture):
material
.
use_transparency
=
self
.
use_transparency
material
.
use_transparency
=
self
.
use_transparency
material
.
transparency_method
=
self
.
transparency_method
material
.
transparency_method
=
self
.
transparency_method
material
.
use_shadeless
=
self
.
use_shadeless
material
.
use_shadeless
=
self
.
use_shadeless
material
.
use_transparent_shadows
=
self
.
use_transparent_shadows
return
material
return
material
...
@@ -347,6 +349,11 @@ class IMPORT_OT_image_to_plane(Operator, ImportHelper, AddObjectHelper):
...
@@ -347,6 +349,11 @@ class IMPORT_OT_image_to_plane(Operator, ImportHelper, AddObjectHelper):
'
Raytrace
'
,
'
Raytrace
'
,
'
Use raytracing for transparent refraction rendering.
'
)),
'
Use raytracing for transparent refraction rendering.
'
)),
)
)
use_transparent_shadows
=
BoolProperty
(
name
=
"
Receive Transparent
"
,
description
=
"
Set material to receive transparent shadows
"
,
default
=
False
,
)
# -------------
# -------------
# Image Options
# Image Options
...
@@ -380,6 +387,7 @@ class IMPORT_OT_image_to_plane(Operator, ImportHelper, AddObjectHelper):
...
@@ -380,6 +387,7 @@ class IMPORT_OT_image_to_plane(Operator, ImportHelper, AddObjectHelper):
box
.
prop
(
self
,
"
use_transparency
"
)
box
.
prop
(
self
,
"
use_transparency
"
)
box
.
prop
(
self
,
"
use_premultiply
"
)
box
.
prop
(
self
,
"
use_premultiply
"
)
box
.
prop
(
self
,
"
transparency_method
"
,
expand
=
True
)
box
.
prop
(
self
,
"
transparency_method
"
,
expand
=
True
)
box
.
prop
(
self
,
"
use_transparent_shadows
"
)
box
=
layout
.
box
()
box
=
layout
.
box
()
box
.
label
(
"
Plane dimensions:
"
,
icon
=
'
ARROW_LEFTRIGHT
'
)
box
.
label
(
"
Plane dimensions:
"
,
icon
=
'
ARROW_LEFTRIGHT
'
)
...
...
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