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
a27aea01
Commit
a27aea01
authored
14 years ago
by
Constantin Rahn
Browse files
Options
Downloads
Patches
Plain Diff
Comments for METAS (Blobs) only if METAS are in the scene
parent
b33047a3
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
render_povray/render.py
+10
-9
10 additions, 9 deletions
render_povray/render.py
with
10 additions
and
9 deletions
render_povray/render.py
+
10
−
9
View file @
a27aea01
...
@@ -179,7 +179,7 @@ def write_pov(filename, scene=None, info_callback=None):
...
@@ -179,7 +179,7 @@ def write_pov(filename, scene=None, info_callback=None):
return
TabStr
return
TabStr
Tab
=
setTab
(
scene
.
pov_indentation_character
,
scene
.
pov_indentation_spaces
)
Tab
=
setTab
(
scene
.
pov_indentation_character
,
scene
.
pov_indentation_spaces
)
def
tabWrite
(
str_o
):
def
tabWrite
(
str_o
):
global
TabLevel
global
TabLevel
brackets
=
str_o
.
count
(
'
{
'
)
-
str_o
.
count
(
'
}
'
)
brackets
=
str_o
.
count
(
'
{
'
)
-
str_o
.
count
(
'
}
'
)
...
@@ -580,7 +580,9 @@ def write_pov(filename, scene=None, info_callback=None):
...
@@ -580,7 +580,9 @@ def write_pov(filename, scene=None, info_callback=None):
def
exportMeta
(
metas
):
def
exportMeta
(
metas
):
# TODO - blenders 'motherball' naming is not supported.
# TODO - blenders 'motherball' naming is not supported.
if
scene
.
pov_comments_enable
and
len
(
metas
)
>=
1
:
file
.
write
(
'
//--Blob objects--
\n\n
'
)
for
ob
in
metas
:
for
ob
in
metas
:
meta
=
ob
.
data
meta
=
ob
.
data
importance
=
ob
.
pov_importance_value
importance
=
ob
.
pov_importance_value
...
@@ -645,7 +647,7 @@ def write_pov(filename, scene=None, info_callback=None):
...
@@ -645,7 +647,7 @@ def write_pov(filename, scene=None, info_callback=None):
tabWrite
(
'
}
\n
'
)
#End of Metaball block
tabWrite
(
'
}
\n
'
)
#End of Metaball block
# tabW
rite('
}
\n')
if
scene
.
pov_comments_enable
and
len
(
metas
)
>=
1
:
file
.
w
rite
(
'
\n
'
)
objectNames
=
{}
objectNames
=
{}
DEF_OBJ_NAME
=
'
Default
'
DEF_OBJ_NAME
=
'
Default
'
...
@@ -1346,13 +1348,12 @@ def write_pov(filename, scene=None, info_callback=None):
...
@@ -1346,13 +1348,12 @@ def write_pov(filename, scene=None, info_callback=None):
for
material
in
bpy
.
data
.
materials
:
for
material
in
bpy
.
data
.
materials
:
if
material
.
users
>
0
:
if
material
.
users
>
0
:
writeMaterial
(
material
)
writeMaterial
(
material
)
if
comments
:
file
.
write
(
'
\n
'
)
if
comments
:
file
.
write
(
'
\n
'
)
if
comments
:
file
.
write
(
'
//--Meta objects--
\n\n
'
)
# <- How can this be written only if the scene contains META?
# if comments: file.write('//--Blob objects--\n\n')
exportMeta
([
l
for
l
in
sel
if
l
.
type
==
'
META
'
])
exportMeta
([
l
for
l
in
sel
if
l
.
type
==
'
META
'
])
# if comments: file.write('\n')
if
comments
:
file
.
write
(
'
\n
'
)
# <- How can this be written only if the scene contains META?
if
comments
:
file
.
write
(
'
//--Mesh objecs--
\n
'
)
if
comments
:
file
.
write
(
'
//--Mesh objecs--
\n
'
)
exportMeshs
(
scene
,
sel
)
exportMeshs
(
scene
,
sel
)
...
@@ -1419,7 +1420,7 @@ def write_pov_ini(filename_ini, filename_pov, filename_image):
...
@@ -1419,7 +1420,7 @@ def write_pov_ini(filename_ini, filename_pov, filename_image):
class
PovrayRender
(
bpy
.
types
.
RenderEngine
):
class
PovrayRender
(
bpy
.
types
.
RenderEngine
):
bl_idname
=
'
POVRAY_RENDER
'
bl_idname
=
'
POVRAY_RENDER
'
bl_label
=
'
POV-Ray 3.7
'
bl_label
=
'
POV-Ray 3.7
'
DELAY
=
0.
05
DELAY
=
0.
1
def
_export
(
self
,
scene
):
def
_export
(
self
,
scene
):
import
tempfile
import
tempfile
...
...
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