Compile Time Changes

UnitLoad changes

Moved a method Transform loadDirectionXForm() down from UnitLoadPallet to UnitLoad.

public class UnitLoad extends CoreObject {

    /**
     * Transform for load direction.
     */
    extend public Transform loadDirectionXForm() {
        return null;
    }
}

Updated interface of method bool eq. Added a new optional argument str->Object args=null.

public class UnitLoad extends CoreObject {
    Old: extend public bool eq(UnitLoad m) {
    New: extend public bool eq(UnitLoad m, str->Object args=null) {
}

At the moment, only one value in args is used in this method, "propsToIgnore"->str[] which can be used to ignore specific props in specific equality checks. It serves as an alternative to overriding str[] propsIgnoreEqCheck() which will ignore the props for all equality checks of that UnitLoad.

public class UnitLoad extends CoreObject {

    /**
     * Equal?
     */
    extend public bool eq(UnitLoad m, str->Object args=null) {
        ...
        ?str[] propsToIgnore = args.?get("propsToIgnore");
        if (propsToIgnore) propsToIgnore += propsIgnoreEqCheck();
        else propsToIgnore = propsIgnoreEqCheck();
        for (k in propDefs.order) {
            if (k in propsToIgnore) continue;
            ...
        }
    }
}

As a result of this change, we have also removed the function bool unitLoadEq(UnitLoad unitLoad, UnitLoad l). Previous calls to this function have been replaced by directly calling the eq(UnitLoad m, str->Object args=null) method.

Removed:
public bool unitLoadEq(UnitLoad unitLoad, UnitLoad l) {
    return unitLoad.eq(l);
}

Example usage:
unitLoad.eq(l);

Added a new method MhPalletLoadSide getLoadDirection() so that UnitLoad can return a direction value. This value was previously only used in UnitLoadPallet but now there is an interface so that other unit load classes can return a direction as well.

public class UnitLoad extends CoreObject {

    /**
     * Get load direction.
     */
    extend public MhPalletLoadSide getLoadDirection() {
        return null;
    }
}

UnitLoadPreviewSnapper changes

Updated the interface of method Primitive3D loadDir3D. The argument UnitLoadPallet pallet has been widened to UnitLoad ul.

public class UnitLoadPreviewSnapper extends UnitLoadSnapper {
    Old: extend public Primitive3D loadDir3D(UnitLoadPallet pallet) {
    New: extend public Primitive3D loadDir3D(UnitLoad ul) {
}

Previous implementations of loadDir3D(UnitLoadPallet ul) would often access a direction value mhPalletLoadSide that was previously only available to UnitLoadPallet. You can switch those calls over to UnitLoad.getLoadDirection() instead without needing to cast to UnitLoadPallet.

Example:
public class UnitLoadPreviewSnapper extends UnitLoadSnapper {

    /**
     * Load Direction Arrow 3D.
     */
    extend public Primitive3D loadDir3D(UnitLoad ul) {
        MhPalletLoadSide dir = ul.getLoadDirection();
        if (!dir) return null;
        ...
    }
}

UnitLoadDialog changes

Updated the interface of method void zoomToPreview. The argument Snapper s has been removed. The reason for this is we have switched the previous implementation of zooming in to a specific snapper's bound to a zoomExtents of the view.

public class UnitLoadDialog extends DialogWindow {

    Old:
    extend public void zoomToPreview(Snapper s) {
        if (!preview3D or !preview3D.space) return;
        if (!s) {
            for (ns in preview3D.space.snappers) {
                s = ns;
            }
        }

        if (!s) return;

        disableUndo {
            preview3D.zoomBound(s.bound);
        }
    }


    New:
    extend public void zoomToPreview() {
        if (!preview3D or !preview3D.space) return;
        if (preview3D.space.snappers.empty) return;
        preview3D.zoomExtents(undoable=false);
    }
}

UnitLoadTemplateSelectorDialog changes

Updated the interface of method void zoomToPreview. The argument Snapper s has been removed. The reason for this is we have switched the previous implementation of zooming in to a specific snapper's bound to a zoomExtents of the view.

public class UnitLoadTemplateSelectorDialog extends DialogWindow {

    Old:
    extend public void zoomToPreview(Snapper s) {
        if (!preview3D or !preview3D.space) return;
        if (!s) {
            for (ns in preview3D.space.snappers) {
                s = ns;
            }
        }

        if (!s) return;

        disableUndo {
            preview3D.zoomBound(s.bound);
        }
    }


    New:
    extend public void zoomToPreview() {
        if (!preview3D or !preview3D.space) return;
        if (preview3D.space.snappers.empty) return;
        preview3D.zoomExtents(undoable=false);
    }
}

Renamed class MhUserSettings to UnitLoadUserSettings

The class MhUserSettings has been renamed to UnitLoadUserSettings.

The global function MhUserSettings mhUserSettings() has been replaced by UnitLoadUserSettings ulUserSettings().

Old: public class MhUserSettings extends UserSettings {
New: public class UnitLoadUserSettings extends UserSettings {

Old: public MhUserSettings mhUserSettings() {
New: public UnitLoadUserSettings ulUserSettings() {