BGE patch: [#26223] Some RigidBody joints fixes (ui angles, conetwist/hinge limits etc) by Juha Mäki-Kanto + ui changes pour moi
From the tracker::: Issues fixed: - ConeTwist-constraint's params weren't making it to the CcdPhysicsEnvironment, also added Hinge's params. - UI wasn't using angles where applicable. - btHingeConstraint's constructor can create frame-matrices which don't align so the hinge doesn's start at 0 degree tilt. This is an issue when setting limits. Changes: - UI: Hinge limits can be set (and disabled). - UI: ConeTwist only has max-limits and only the twistX can be disabled - PyApi via rna_constraint.c: added the functions limit_xyz_min, limit_xyz_max (for 6dof), limit_angle_xyz_min, limit_angle_xyz_max (for 6dof), limit_angle_x_min, limit_angle_x_max (for hinge). - PyApi: dropped python-function limit_cone_min. .:. Extra: UI Changes: - renamed "RigidBody Joint" to "Rigid Boidy Joint" - reorganized UI to conform with other parameters (e.g. Limit Rot) - added dis/active all over the place :)
This commit is contained in:
@@ -535,32 +535,86 @@ class ConstraintButtonsPanel():
|
||||
layout.label(text="Limits:")
|
||||
split = layout.split()
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_angular_limit_x", text="Angular X")
|
||||
col.prop(con, "use_angular_limit_y", text="Angular Y")
|
||||
col.prop(con, "use_angular_limit_z", text="Angular Z")
|
||||
col = split.column()
|
||||
col.prop(con, "use_angular_limit_x", text="Angle X")
|
||||
subcol = col.column()
|
||||
subcol.active =con.use_angular_limit_x
|
||||
subcol.prop(con, "limit_angle_max_x", text="")
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "limit_cone_min", text="")
|
||||
col.prop(con, "use_angular_limit_y", text="Angle Y")
|
||||
subcol = col.column()
|
||||
subcol.active =con.use_angular_limit_y
|
||||
subcol.prop(con, "limit_angle_max_y", text="")
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "limit_cone_max", text="")
|
||||
col.prop(con, "use_angular_limit_z", text="Angle Z")
|
||||
subcol = col.column()
|
||||
subcol.active =con.use_angular_limit_z
|
||||
subcol.prop(con, "limit_angle_max_z", text="")
|
||||
|
||||
elif con.pivot_type == 'GENERIC_6_DOF':
|
||||
layout.label(text="Limits:")
|
||||
split = layout.split()
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_limit_x", text="X")
|
||||
sub = col.column()
|
||||
sub.active = con.use_limit_x
|
||||
sub.prop(con, "limit_min_x", text="Min")
|
||||
sub.prop(con, "limit_max_x", text="Max")
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_limit_y", text="Y")
|
||||
sub = col.column()
|
||||
sub.active = con.use_limit_y
|
||||
sub.prop(con, "limit_min_y", text="Min")
|
||||
sub.prop(con, "limit_max_y", text="Max")
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_limit_z", text="Z")
|
||||
col.prop(con, "use_angular_limit_x", text="Angular X")
|
||||
col.prop(con, "use_angular_limit_y", text="Angular Y")
|
||||
col.prop(con, "use_angular_limit_z", text="Angular Z")
|
||||
sub = col.column()
|
||||
sub.active = con.use_limit_z
|
||||
sub.prop(con, "limit_min_z", text="Min")
|
||||
sub.prop(con, "limit_max_z", text="Max")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_angular_limit_x", text="Angle X")
|
||||
sub = col.column()
|
||||
sub.active = con.use_angular_limit_x
|
||||
sub.prop(con, "limit_angle_min_x", text="Min")
|
||||
sub.prop(con, "limit_angle_max_x", text="Max")
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_angular_limit_y", text="Angle Y")
|
||||
sub = col.column()
|
||||
sub.active = con.use_angular_limit_y
|
||||
sub.prop(con, "limit_angle_min_y", text="Min")
|
||||
sub.prop(con, "limit_angle_max_y", text="Max")
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_angular_limit_z", text="Angle Z")
|
||||
sub = col.column()
|
||||
sub.active = con.use_angular_limit_z
|
||||
sub.prop(con, "limit_angle_min_z", text="Min")
|
||||
sub.prop(con, "limit_angle_max_z", text="Max")
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "limit_generic_min", text="")
|
||||
col = split.column()
|
||||
col.prop(con, "limit_generic_max", text="")
|
||||
elif con.pivot_type == 'HINGE':
|
||||
layout.label(text="Limits:")
|
||||
split = layout.split()
|
||||
|
||||
row = split.row(align=True)
|
||||
col = row.column()
|
||||
col.prop(con, "use_angular_limit_x", text="Angle X")
|
||||
|
||||
col = row.column()
|
||||
col.active = con.use_angular_limit_x
|
||||
col.prop(con, "limit_angle_min_x", text="Min")
|
||||
col = row.column()
|
||||
col.active = con.use_angular_limit_x
|
||||
col.prop(con, "limit_angle_max_x", text="Max")
|
||||
|
||||
def CLAMP_TO(self, context, layout, con):
|
||||
self.target_template(layout, con)
|
||||
@@ -736,4 +790,4 @@ def unregister():
|
||||
bpy.utils.unregister_module(__name__)
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
register()
|
||||
Reference in New Issue
Block a user