mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +00:00
You can now render OpenGL for drawings - allowing much better wireframe views
This commit is contained in:
@@ -2108,8 +2108,10 @@ class CutSection(bpy.types.Operator):
|
|||||||
'diagrams',
|
'diagrams',
|
||||||
'{}.png'.format(self.diagram_name)
|
'{}.png'.format(self.diagram_name)
|
||||||
)
|
)
|
||||||
if bpy.context.scene.DocProperties.should_render:
|
if bpy.context.scene.DocProperties.should_render == 'DEFAULT':
|
||||||
bpy.ops.render.render(write_still=True)
|
bpy.ops.render.render(write_still=True)
|
||||||
|
elif bpy.context.scene.DocProperties.should_render == 'VIEWPORT':
|
||||||
|
bpy.ops.render.opengl(write_still=True)
|
||||||
location = camera.location
|
location = camera.location
|
||||||
render = bpy.context.scene.render
|
render = bpy.context.scene.render
|
||||||
if self.is_landscape():
|
if self.is_landscape():
|
||||||
|
|||||||
@@ -526,7 +526,11 @@ class DrawingStyle(PropertyGroup):
|
|||||||
class DocProperties(PropertyGroup):
|
class DocProperties(PropertyGroup):
|
||||||
should_recut: BoolProperty(name="Should Recut", default=True)
|
should_recut: BoolProperty(name="Should Recut", default=True)
|
||||||
should_recut_selected: BoolProperty(name="Should Recut Selected Only", default=False)
|
should_recut_selected: BoolProperty(name="Should Recut Selected Only", default=False)
|
||||||
should_render: BoolProperty(name="Should Render", default=True)
|
should_render: EnumProperty(items=[
|
||||||
|
('NONE', 'None', ''),
|
||||||
|
('DEFAULT', 'Default', ''),
|
||||||
|
('VIEWPORT', 'Viewport', ''),
|
||||||
|
], name='Should Render', default='DEFAULT')
|
||||||
should_extract: BoolProperty(name="Should Extract", default=True)
|
should_extract: BoolProperty(name="Should Extract", default=True)
|
||||||
drawings: CollectionProperty(name='Drawings', type=Drawing)
|
drawings: CollectionProperty(name='Drawings', type=Drawing)
|
||||||
active_drawing_index: IntProperty(name='Active Drawing Index')
|
active_drawing_index: IntProperty(name='Active Drawing Index')
|
||||||
|
|||||||
Reference in New Issue
Block a user