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
ae3f3f88
Commit
ae3f3f88
authored
5 years ago
by
meta-androcto
Browse files
Options
Downloads
Patches
Plain Diff
render_to_print: update to 2.8: T68590
parent
003f117c
No related branches found
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
render_to_print.py
+36
-21
36 additions, 21 deletions
render_to_print.py
with
36 additions
and
21 deletions
render_to_print.py
+
36
−
21
View file @
ae3f3f88
...
@@ -20,13 +20,13 @@
...
@@ -20,13 +20,13 @@
bl_info
=
{
bl_info
=
{
"
name
"
:
"
Render to Print
"
,
"
name
"
:
"
Render to Print
"
,
"
author
"
:
"
Marco Crippa <thekrypt77@tiscali.it>, Dealga McArdle
"
,
"
author
"
:
"
Marco Crippa <thekrypt77@tiscali.it>, Dealga McArdle
, zebus3d
"
,
"
version
"
:
(
0
,
2
),
"
version
"
:
(
0
,
3
,
0
),
"
blender
"
:
(
2
,
5
8
,
0
),
"
blender
"
:
(
2
,
8
0
,
0
),
"
location
"
:
"
Render
> Render to Print
"
,
"
location
"
:
"
Output
> Render to Print
"
,
"
description
"
:
"
Set the size of the render for a print
"
,
"
description
"
:
"
Set the size of the render for a print
"
,
"
wiki_url
"
:
"
http://wiki.blender.org/index.php/Extensions:2.6/
Py/
"
"
wiki_url
"
:
"
http://wiki.blender.org/index.php/Extensions:2.6/
\
"
Scripts/Render/Render to Print
"
,
Py/
Scripts/Render/Render to Print
"
,
"
tracker_url
"
:
"
https://developer.blender.org/maniphest/task/edit/form/2/
"
,
"
tracker_url
"
:
"
https://developer.blender.org/maniphest/task/edit/form/2/
"
,
"
category
"
:
"
Render
"
}
"
category
"
:
"
Render
"
}
...
@@ -34,12 +34,13 @@ bl_info = {
...
@@ -34,12 +34,13 @@ bl_info = {
import
math
import
math
import
bpy
import
bpy
from
bpy.types
import
Panel
,
Operator
,
Scene
,
PropertyGroup
from
bpy.types
import
Panel
,
Operator
,
Scene
,
PropertyGroup
from
bpy.props
import
(
IntProperty
,
from
bpy.props
import
(
FloatProperty
,
IntProperty
,
StringProperty
,
FloatProperty
,
EnumProperty
,
StringProperty
,
PointerProperty
,
EnumProperty
,
)
PointerProperty
,
)
paper_presets
=
(
paper_presets
=
(
...
@@ -106,8 +107,10 @@ def paper_enum_parse(idname):
...
@@ -106,8 +107,10 @@ def paper_enum_parse(idname):
return
tipo
,
float
(
dim_w
),
float
(
dim_h
)
return
tipo
,
float
(
dim_w
),
float
(
dim_h
)
paper_presets_data
=
{
idname
:
paper_enum_parse
(
idname
)
paper_presets_data
=
{
for
idname
,
name
,
descr
in
paper_presets
}
idname
:
paper_enum_parse
(
idname
)
for
idname
,
name
,
descr
in
paper_presets
}
def
update_settings_cb
(
self
,
context
):
def
update_settings_cb
(
self
,
context
):
...
@@ -220,9 +223,12 @@ def pixels_from_print(ps):
...
@@ -220,9 +223,12 @@ def pixels_from_print(ps):
class
RENDER_PT_print
(
Panel
):
class
RENDER_PT_print
(
Panel
):
bl_label
=
"
Render to Print
"
bl_label
=
"
Render to Print
"
# bl_space_type = 'PROPERTIES'
# bl_region_type = 'WINDOW'
# bl_context = 'render'
bl_space_type
=
'
PROPERTIES
'
bl_space_type
=
'
PROPERTIES
'
bl_region_type
=
'
WINDOW
'
bl_region_type
=
'
WINDOW
'
bl_context
=
'
render
'
bl_context
=
"
output
"
def
draw
(
self
,
context
):
def
draw
(
self
,
context
):
...
@@ -326,18 +332,27 @@ class RENDER_OT_apply_size(Operator):
...
@@ -326,18 +332,27 @@ class RENDER_OT_apply_size(Operator):
return
{
'
FINISHED
'
}
return
{
'
FINISHED
'
}
classes
=
(
RENDER_OT_apply_size
,
RENDER_PT_print
,
RenderPrintSertings
)
def
register
():
def
register
():
bpy
.
utils
.
register_class
(
RENDER_OT_apply_size
)
from
bpy.utils
import
register_class
bpy
.
utils
.
register_class
(
RENDER_PT_print
)
bpy
.
utils
.
register_class
(
RenderPrintSertings
)
for
cls
in
classes
:
register_class
(
cls
)
Scene
.
print_settings
=
PointerProperty
(
type
=
RenderPrintSertings
)
Scene
.
print_settings
=
PointerProperty
(
type
=
RenderPrintSertings
)
def
unregister
():
def
unregister
():
bpy
.
utils
.
unregister_class
(
RENDER_OT_apply_size
)
from
bpy.utils
import
unregister_class
bpy
.
utils
.
unregister_class
(
RENDER_PT_print
)
bpy
.
utils
.
unregister_class
(
RenderPrintSertings
)
for
cls
in
classes
:
unregister_class
(
cls
)
del
Scene
.
print_settings
del
Scene
.
print_settings
...
...
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