diff --git a/leenkx/blender/lnx/props_ui.py b/leenkx/blender/lnx/props_ui.py index 7624fe8..6811a92 100644 --- a/leenkx/blender/lnx/props_ui.py +++ b/leenkx/blender/lnx/props_ui.py @@ -242,6 +242,7 @@ class LNX_PT_PhysicsPropsPanel(bpy.types.Panel): layout.prop(obj, 'lnx_rb_angular_friction') layout.prop(obj, 'lnx_rb_trigger') layout.prop(obj, 'lnx_rb_ccd') + layout.prop(obj, 'lnx_rb_interpolate') if obj.soft_body is not None: layout.prop(obj, 'lnx_soft_body_margin') @@ -2732,8 +2733,33 @@ class LeenkxUpdateListInstalledVSButton(bpy.types.Operator): 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_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -2899,7 +2925,8 @@ __REG_CLASSES = ( LeenkxUpdateListAndroidEmulatorButton, LeenkxUpdateListAndroidEmulatorRunButton, LeenkxUpdateListInstalledVSButton, - LNX_PT_BulletDebugDrawingPanel, + LNX_PT_PhysicsProps, + LNX_PT_PhysicsDebugDrawingPanel, LNX_OT_AddArmatureRootMotion, scene.TLM_PT_Settings, scene.TLM_PT_Denoise,