mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
New operator to quickly set diagram render options
This commit is contained in:
@@ -94,6 +94,7 @@ if bpy is not None:
|
|||||||
operator.ActivateView,
|
operator.ActivateView,
|
||||||
operator.ExecuteIfcDiff,
|
operator.ExecuteIfcDiff,
|
||||||
operator.AssignContext,
|
operator.AssignContext,
|
||||||
|
operator.SetViewPreset1,
|
||||||
prop.Subcontext,
|
prop.Subcontext,
|
||||||
prop.BIMProperties,
|
prop.BIMProperties,
|
||||||
prop.DocProperties,
|
prop.DocProperties,
|
||||||
|
|||||||
@@ -1134,3 +1134,19 @@ class AssignContext(bpy.types.Operator):
|
|||||||
name[0:6] == 'Model/' \
|
name[0:6] == 'Model/' \
|
||||||
or name[0:5] == 'Plan/' \
|
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'}
|
||||||
|
|||||||
@@ -286,6 +286,9 @@ class BIM_PT_documentation(Panel):
|
|||||||
row.prop(props, 'available_views')
|
row.prop(props, 'available_views')
|
||||||
row.operator('bim.activate_view', icon='SCENE', text='')
|
row.operator('bim.activate_view', icon='SCENE', text='')
|
||||||
|
|
||||||
|
row = layout.row()
|
||||||
|
row.operator('bim.set_view_preset_1')
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator('bim.create_sheets')
|
row.operator('bim.create_sheets')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user