Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/geometry_component_curves.cc
| Show First 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | |||||
| static void tag_component_topology_changed(GeometryComponent &component) | static void tag_component_topology_changed(GeometryComponent &component) | ||||
| { | { | ||||
| Curves *curves = get_curves_from_component_for_write(component); | Curves *curves = get_curves_from_component_for_write(component); | ||||
| if (curves) { | if (curves) { | ||||
| blender::bke::CurvesGeometry::wrap(curves->geometry).tag_topology_changed(); | blender::bke::CurvesGeometry::wrap(curves->geometry).tag_topology_changed(); | ||||
| } | } | ||||
| } | } | ||||
| static void tag_component_curve_types_changed(GeometryComponent &component) | |||||
| { | |||||
| Curves *curves = get_curves_from_component_for_write(component); | |||||
| if (curves) { | |||||
| blender::bke::CurvesGeometry::wrap(curves->geometry).update_curve_types(); | |||||
JacquesLucke: Might still need to tag topology as changed. | |||||
| blender::bke::CurvesGeometry::wrap(curves->geometry).tag_topology_changed(); | |||||
| } | |||||
| } | |||||
| static void tag_component_positions_changed(GeometryComponent &component) | static void tag_component_positions_changed(GeometryComponent &component) | ||||
| { | { | ||||
| Curves *curves = get_curves_from_component_for_write(component); | Curves *curves = get_curves_from_component_for_write(component); | ||||
| if (curves) { | if (curves) { | ||||
| blender::bke::CurvesGeometry::wrap(curves->geometry).tag_positions_changed(); | blender::bke::CurvesGeometry::wrap(curves->geometry).tag_positions_changed(); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | static BuiltinCustomDataLayerProvider curve_type("curve_type", | ||||
| CD_PROP_INT8, | CD_PROP_INT8, | ||||
| CD_PROP_INT8, | CD_PROP_INT8, | ||||
| BuiltinAttributeProvider::Creatable, | BuiltinAttributeProvider::Creatable, | ||||
| BuiltinAttributeProvider::Writable, | BuiltinAttributeProvider::Writable, | ||||
| BuiltinAttributeProvider::Deletable, | BuiltinAttributeProvider::Deletable, | ||||
| curve_access, | curve_access, | ||||
| make_array_read_attribute<int8_t>, | make_array_read_attribute<int8_t>, | ||||
| make_array_write_attribute<int8_t>, | make_array_write_attribute<int8_t>, | ||||
| tag_component_topology_changed); | tag_component_curve_types_changed); | ||||
| static BuiltinCustomDataLayerProvider resolution("resolution", | static BuiltinCustomDataLayerProvider resolution("resolution", | ||||
| ATTR_DOMAIN_CURVE, | ATTR_DOMAIN_CURVE, | ||||
| CD_PROP_INT32, | CD_PROP_INT32, | ||||
| CD_PROP_INT32, | CD_PROP_INT32, | ||||
| BuiltinAttributeProvider::Creatable, | BuiltinAttributeProvider::Creatable, | ||||
| BuiltinAttributeProvider::Writable, | BuiltinAttributeProvider::Writable, | ||||
| BuiltinAttributeProvider::Deletable, | BuiltinAttributeProvider::Deletable, | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||
Might still need to tag topology as changed.