diff --git a/src/blenderbim/blenderbim/bim/module/cost/prop.py b/src/blenderbim/blenderbim/bim/module/cost/prop.py index c230b3cf40..94520e1146 100644 --- a/src/blenderbim/blenderbim/bim/module/cost/prop.py +++ b/src/blenderbim/blenderbim/bim/module/cost/prop.py @@ -175,6 +175,7 @@ class BIMCostProperties(PropertyGroup): name="Cost Types", ) cost_category: StringProperty(name="Cost Category") + fixed_cost_value: FloatProperty(name="Fixed Cost Value") active_cost_value_id: IntProperty(name="Active Cost Item Value Id") cost_value_editing_type: StringProperty(name="Cost Value Editing Type") cost_value_attributes: CollectionProperty(name="Cost Value Attributes", type=Attribute) diff --git a/src/blenderbim/blenderbim/bim/module/cost/ui.py b/src/blenderbim/blenderbim/bim/module/cost/ui.py index 478005a834..19ef2fb75f 100644 --- a/src/blenderbim/blenderbim/bim/module/cost/ui.py +++ b/src/blenderbim/blenderbim/bim/module/cost/ui.py @@ -176,6 +176,8 @@ class BIM_PT_cost_schedules(Panel): def draw_editable_cost_item_values_ui(self): row = self.layout.row(align=True) row.prop(self.props, "cost_types", text="") + if self.props.cost_types == "FIXED": + row.prop(self.props, "fixed_cost_value", text="") if self.props.cost_types == "CATEGORY": row.prop(self.props, "cost_category", text="") op = row.operator("bim.add_cost_value", text="Add Value", icon="ADD") diff --git a/src/blenderbim/blenderbim/tool/cost.py b/src/blenderbim/blenderbim/tool/cost.py index 0b33aaa0a2..02c5c3bdcf 100644 --- a/src/blenderbim/blenderbim/tool/cost.py +++ b/src/blenderbim/blenderbim/tool/cost.py @@ -267,7 +267,7 @@ class Cost(blenderbim.core.tool.Cost): def get_attributes_for_cost_value(cls, cost_type, cost_category): if cost_type == "FIXED": category = None - attributes = {"AppliedValue": 0.0} + attributes = {"AppliedValue": bpy.context.scene.BIMCostProperties.fixed_cost_value} elif cost_type == "SUM": category = "*" attributes = {"Category": category}