New operator to quickly set diagram render options

This commit is contained in:
Dion Moult
2020-02-01 22:49:35 +11:00
parent 9571d4a67b
commit 691cc8759a
3 changed files with 20 additions and 0 deletions
@@ -94,6 +94,7 @@ if bpy is not None:
operator.ActivateView,
operator.ExecuteIfcDiff,
operator.AssignContext,
operator.SetViewPreset1,
prop.Subcontext,
prop.BIMProperties,
prop.DocProperties,
@@ -1134,3 +1134,19 @@ class AssignContext(bpy.types.Operator):
name[0:6] == 'Model/' \
or name[0:5] == 'Plan/' \
)
class SetViewPreset1(bpy.types.Operator):
bl_idname = 'bim.set_view_preset_1'
bl_label = 'Set View Preset 1'
def execute(self, context):
bpy.data.worlds[0].color = (1, 1, 1)
bpy.context.scene.render.engine = 'BLENDER_WORKBENCH'
bpy.context.scene.display.shading.show_object_outline = True
bpy.context.scene.display.shading.show_cavity = True
bpy.context.scene.display.shading.cavity_type = 'BOTH'
bpy.context.scene.display.shading.curvature_ridge_factor = 1
bpy.context.scene.display.shading.curvature_valley_factor = 1
bpy.context.scene.view_settings.view_transform = 'Standard'
return {'FINISHED'}
+3
View File
@@ -286,6 +286,9 @@ class BIM_PT_documentation(Panel):
row.prop(props, 'available_views')
row.operator('bim.activate_view', icon='SCENE', text='')
row = layout.row()
row.operator('bim.set_view_preset_1')
row = layout.row()
row.operator('bim.create_sheets')