mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Let user control section plane colour
This commit is contained in:
@@ -1877,7 +1877,7 @@ class AddSectionPlane(bpy.types.Operator):
|
||||
backfacing = group.nodes.new(type='ShaderNodeNewGeometry')
|
||||
backfacing_mix = group.nodes.new(type='ShaderNodeMixShader')
|
||||
emission = group.nodes.new(type='ShaderNodeEmission')
|
||||
emission.inputs['Color'].default_value = (1, 0, 0, 1)
|
||||
emission.inputs['Color'].default_value = list(bpy.context.scene.BIMProperties.section_plane_colour) + [1]
|
||||
|
||||
group.links.new(backfacing.outputs['Backfacing'], backfacing_mix.inputs['Fac'])
|
||||
group.links.new(group_input.outputs[''], backfacing_mix.inputs[1])
|
||||
|
||||
@@ -17,6 +17,7 @@ from bpy.props import (
|
||||
BoolProperty,
|
||||
IntProperty,
|
||||
FloatProperty,
|
||||
FloatVectorProperty,
|
||||
CollectionProperty
|
||||
)
|
||||
|
||||
@@ -851,6 +852,7 @@ class BIMProperties(PropertyGroup):
|
||||
active_property_set_template: PointerProperty(type=PropertySetTemplate)
|
||||
property_templates: CollectionProperty(name='Property Templates', type=PropertyTemplate)
|
||||
should_section_selected_objects: BoolProperty(name="Section Selected Objects", default=False)
|
||||
section_plane_colour: FloatVectorProperty(name='Section Plane Colour', subtype='COLOR', default=(1, 0, 0), min=0.0, max=1.0)
|
||||
ifc_selector: StringProperty(default='', name='IFC Selector')
|
||||
csv_attributes: CollectionProperty(name='CSV Attributes', type=StrProperty)
|
||||
|
||||
|
||||
@@ -454,6 +454,9 @@ class BIM_PT_section_plane(Panel):
|
||||
row = layout.row()
|
||||
row.prop(props, 'should_section_selected_objects')
|
||||
|
||||
row = layout.row()
|
||||
row.prop(props, 'section_plane_colour')
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator('bim.add_section_plane')
|
||||
row.operator('bim.remove_section_plane')
|
||||
|
||||
Reference in New Issue
Block a user