diff --git a/source/main/resources/rig_def_fileformat/RigDef_File.h b/source/main/resources/rig_def_fileformat/RigDef_File.h index 6de0ea44b5..b5daace720 100644 --- a/source/main/resources/rig_def_fileformat/RigDef_File.h +++ b/source/main/resources/rig_def_fileformat/RigDef_File.h @@ -1826,14 +1826,14 @@ struct Screwprop struct SlideNode { - BITMASK_PROPERTY( constraint_flags, 1, CONSTRAINT_ATTACH_ALL , HasConstraint_a_AttachAll , SetConstraint_a_AttachAll ) - BITMASK_PROPERTY( constraint_flags, 2, CONSTRAINT_ATTACH_FOREIGN , HasConstraint_f_AttachForeign , SetConstraint_f_AttachForeign ) - BITMASK_PROPERTY( constraint_flags, 3, CONSTRAINT_ATTACH_SELF , HasConstraint_s_AttachSelf , SetConstraint_s_AttachSelf ) - BITMASK_PROPERTY( constraint_flags, 4, CONSTRAINT_ATTACH_NONE , HasConstraint_n_AttachNone , SetConstraint_n_AttachNone ) + static const BitMask_t CONSTRAINT_ATTACH_ALL = BITMASK(1); + static const BitMask_t CONSTRAINT_ATTACH_FOREIGN = BITMASK(2); + static const BitMask_t CONSTRAINT_ATTACH_SELF = BITMASK(3); + static const BitMask_t CONSTRAINT_ATTACH_NONE = BITMASK(4); Node::Ref slide_node; std::vector rail_node_ranges; - unsigned int constraint_flags; + BitMask_t constraint_flags = 0; // Optional args float spring_rate=0.f; bool _spring_rate_set=false; diff --git a/source/main/resources/rig_def_fileformat/RigDef_Serializer.cpp b/source/main/resources/rig_def_fileformat/RigDef_Serializer.cpp index 9c3b71ec0f..c740241354 100644 --- a/source/main/resources/rig_def_fileformat/RigDef_Serializer.cpp +++ b/source/main/resources/rig_def_fileformat/RigDef_Serializer.cpp @@ -1123,10 +1123,10 @@ void Serializer::ProcessSlideNodes(File::Module* module) if (def._max_attach_dist_set) { m_stream << ", d" << def.max_attach_dist; } // Constraint flags (cX) - if (def.HasConstraint_a_AttachAll()) { m_stream << ", ca"; } - else if (def.HasConstraint_f_AttachForeign()) { m_stream << ", cf"; } - else if (def.HasConstraint_s_AttachSelf()) { m_stream << ", cs"; } - else if (def.HasConstraint_n_AttachNone()) { m_stream << ", cn"; } + if (BITMASK_IS_1(def.constraint_flags, SlideNode::CONSTRAINT_ATTACH_ALL )) { m_stream << ", ca"; } + else if (BITMASK_IS_1(def.constraint_flags, SlideNode::CONSTRAINT_ATTACH_FOREIGN)) { m_stream << ", cf"; } + else if (BITMASK_IS_1(def.constraint_flags, SlideNode::CONSTRAINT_ATTACH_SELF )) { m_stream << ", cs"; } + else if (BITMASK_IS_1(def.constraint_flags, SlideNode::CONSTRAINT_ATTACH_NONE )) { m_stream << ", cn"; } } m_stream << endl << endl; // Empty line }