moisesjpelaez - Physics Improvements

This commit is contained in:
2025-06-02 07:24:53 +00:00
parent 85bbc10d06
commit d0b3dc2ff8

View File

@ -242,6 +242,7 @@ class LNX_PT_PhysicsPropsPanel(bpy.types.Panel):
layout.prop(obj, 'lnx_rb_angular_friction') layout.prop(obj, 'lnx_rb_angular_friction')
layout.prop(obj, 'lnx_rb_trigger') layout.prop(obj, 'lnx_rb_trigger')
layout.prop(obj, 'lnx_rb_ccd') layout.prop(obj, 'lnx_rb_ccd')
layout.prop(obj, 'lnx_rb_interpolate')
if obj.soft_body is not None: if obj.soft_body is not None:
layout.prop(obj, 'lnx_soft_body_margin') layout.prop(obj, 'lnx_soft_body_margin')
@ -2732,8 +2733,33 @@ class LeenkxUpdateListInstalledVSButton(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
class LNX_PT_PhysicsProps(bpy.types.Panel):
bl_label = "Leenkx Props"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_options = {'DEFAULT_CLOSED'}
bl_parent_id = "SCENE_PT_rigid_body_world"
class LNX_PT_BulletDebugDrawingPanel(bpy.types.Panel): @classmethod
def poll(cls, context):
return context.scene.rigidbody_world is not None
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
wrd = bpy.data.worlds['Lnx']
if wrd.lnx_physics_engine != 'Bullet' and wrd.lnx_physics_engine != 'Oimo':
row = layout.row()
row.alert = True
row.label(text="Physics debug drawing is only supported for the Bullet and Oimo physics engines")
col = layout.column(align=False)
col.prop(wrd, "lnx_physics_fixed_step")
class LNX_PT_PhysicsDebugDrawingPanel(bpy.types.Panel):
bl_label = "Leenkx Debug Drawing" bl_label = "Leenkx Debug Drawing"
bl_space_type = "PROPERTIES" bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW" bl_region_type = "WINDOW"
@ -2899,7 +2925,8 @@ __REG_CLASSES = (
LeenkxUpdateListAndroidEmulatorButton, LeenkxUpdateListAndroidEmulatorButton,
LeenkxUpdateListAndroidEmulatorRunButton, LeenkxUpdateListAndroidEmulatorRunButton,
LeenkxUpdateListInstalledVSButton, LeenkxUpdateListInstalledVSButton,
LNX_PT_BulletDebugDrawingPanel, LNX_PT_PhysicsProps,
LNX_PT_PhysicsDebugDrawingPanel,
LNX_OT_AddArmatureRootMotion, LNX_OT_AddArmatureRootMotion,
scene.TLM_PT_Settings, scene.TLM_PT_Settings,
scene.TLM_PT_Denoise, scene.TLM_PT_Denoise,