diff --git a/.github/actions/0_setup/action.yml b/.github/actions/0_setup/action.yml
new file mode 100644
index 000000000..24bcf9db8
--- /dev/null
+++ b/.github/actions/0_setup/action.yml
@@ -0,0 +1,23 @@
+name: 'Setup Environment'
+description: 'Setup Environment'
+
+inputs:
+ qt-version:
+ description: 'Qt Version'
+ required: false
+ default: '5.15.2'
+
+runs:
+ using: "composite"
+ steps:
+ - name: Setup MSVC
+ uses: ilammy/msvc-dev-cmd@v1
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v3
+ with:
+ cache: true
+ version: ${{ inputs.qt-version }}
+ - name: Install dependencies
+ shell: bash
+ run: |
+ bash scripts/${{ runner.os }}/0_setup_env.sh --dont_install_qt
\ No newline at end of file
diff --git a/.github/actions/1_build/action.yml b/.github/actions/1_build/action.yml
new file mode 100644
index 000000000..e0d0f7b0a
--- /dev/null
+++ b/.github/actions/1_build/action.yml
@@ -0,0 +1,56 @@
+name: 'Build'
+description: 'Build'
+
+inputs:
+ cache-path:
+ description: 'Directory to cache after build'
+ required: false
+ default: ''
+ cache-key:
+ description: 'Cache key'
+ required: false
+ default: ''
+ build-option:
+ description: 'Build option'
+ required: false
+ default: ''
+ nightly:
+ description: 'Nightly build'
+ required: false
+ type: boolean
+ default: false
+
+runs:
+ using: "composite"
+ steps:
+ - name: Setup env variables
+ id: envs
+ shell: bash
+ run: |
+ if [ "${{ inputs.build-option }}" != "" ]; then
+ echo "build_option=--${{ inputs.build-option }}" >> $GITHUB_OUTPUT
+ echo "artifact_suffix=_${{ inputs.build-option }}" >> $GITHUB_OUTPUT
+ else
+ echo "build_option=" >> $GITHUB_OUTPUT
+ echo "artifact_suffix=" >> $GITHUB_OUTPUT
+ fi
+ if [ "${{ inputs.nightly }}" = "true" ]; then
+ echo "nightly=--nightly" >> $GITHUB_OUTPUT
+ else
+ echo "nightly=" >> $GITHUB_OUTPUT
+ fi
+ - name: Cache external libraries sources
+ id: cache-ext-libs
+ if: ${{ inputs.cache-path != '' }}
+ uses: actions/cache@v3
+ with:
+ path: ${{ inputs.cache-path }}
+ key: ${{ runner.os }}-${{ inputs.cache-key }}
+ - name: Ccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ key: ${{ runner.os }}-${{ github.ref }}-${{ inputs.build-option }}
+ - name: Configure and Build
+ shell: bash
+ run: |
+ bash scripts/${{ runner.os }}/1_build.sh ${{ steps.envs.outputs.build_option }} ${{ steps.envs.outputs.nightly }} --ccache
\ No newline at end of file
diff --git a/.github/actions/2_deploy/action.yml b/.github/actions/2_deploy/action.yml
new file mode 100644
index 000000000..69b582081
--- /dev/null
+++ b/.github/actions/2_deploy/action.yml
@@ -0,0 +1,65 @@
+name: 'Deploy'
+description: 'Deploy'
+
+inputs:
+ mac-certificate:
+ description: 'MacOS Certificate'
+ required: false
+ default: ''
+ mac-certificate-id:
+ description: 'MacOS Certificate ID'
+ required: false
+ default: ''
+ mac-certificate-pssw:
+ description: 'MacOS Certificate Password'
+ required: false
+ mac-notarization-user:
+ description: 'MacOS Notarization User'
+ required: false
+ default: ''
+ mac-notarization-team:
+ description: 'MacOS Notarization Team'
+ required: false
+ default: ''
+ mac-notarization-pssw:
+ description: 'MacOS Notarization Password'
+ required: false
+ default: ''
+ win-certificate:
+ description: 'Windows Certificate'
+ required: false
+ default: ''
+ win-certificate-pssw:
+ description: 'Windows Certificate Password'
+ required: false
+ default: ''
+
+runs:
+ using: "composite"
+ steps:
+ - name: Set Notarization settings
+ id: notarization
+ shell: bash
+ run: |
+ if [ "${{ inputs.mac-notarization-user }}" != "" ]; then
+ echo "not_setting=--notarization_user='${{ inputs.mac-notarization-user }}' --notarization_team='${{ inputs.mac-notarization-team }}' --notarization_pssw='${{ inputs.mac-notarization-pssw }}'" >> $GITHUB_OUTPUT
+ else
+ echo "not_setting=" >> $GITHUB_OUTPUT
+ fi
+ - name: Set CodeSign Certificate macOS
+ if: ${{ runner.os == 'macOS' && inputs.mac-certificate != ''}}
+ uses: apple-actions/import-codesign-certs@v2
+ with:
+ p12-file-base64: ${{ inputs.mac-certificate }}
+ p12-password: ${{ inputs.mac-certificate-pssw }}
+ - name: Set CodeSign Certificate Windows
+ shell: powershell
+ if: ${{ runner.os == 'Windows' && inputs.win-certificate != '' }}
+ run: |
+ New-Item -ItemType directory -Path certificate
+ Set-Content -Path certificate\certificate.txt -Value '${{ inputs.win-certificate }}'
+ certutil -decode certificate\certificate.txt certificate\certificate.pfx
+ - name: Deploy
+ shell: bash
+ run: |
+ bash scripts/${{ runner.os }}/2_deploy.sh --cert_pssw='${{ inputs.win-certificate-pssw }}' --cert_id='${{ inputs.mac-certificate-id }}' ${{ steps.notarization.outputs.not_setting }}
\ No newline at end of file
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000..7f7a2f929
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,10 @@
+## Thank you for sending a Pull Request to MeshLab!
+
+On this repository, we keep two relevant branches:
+
+- `main`: we keep here the **last release version of MeshLab**, with just bugfixes. In case of serious bugs caught after a release, this branch is used to publish "post-releases".
+- `devel`: we add here new features and functionalities of the software that are going to appear in the next release of MeshLab. Bugfixes pushed in `main` are automatically merged on the `devel` branch.
+
+Before submitting a PR, please check which branch suits better for your contribution!
+
+**PLEASE REMOVE THIS BEFORE SUBMITTING**
diff --git a/.github/stale.yml b/.github/stale.yml
index 2c77dc1c0..a985a99e7 100644
--- a/.github/stale.yml
+++ b/.github/stale.yml
@@ -34,9 +34,10 @@ staleLabel: wontfix
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
+ This issue has been automatically marked as stale because it has not had recent activity. The resources of the VCLab team are limited, and so we are asking for your help.
+ If this is a bug and you can still reproduce this error on the last release of MeshLab, please reply with all of the information you have about it in order to keep the issue open.
+ If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
+ This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
@@ -50,7 +51,7 @@ markComment: >
limitPerRun: 10
# Limit to only `issues` or `pulls`
-# only: issues
+only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
diff --git a/.github/workflows/AutoMergeMainOnDevel.yml b/.github/workflows/AutoMergeMainOnDevel.yml
new file mode 100644
index 000000000..1800f780e
--- /dev/null
+++ b/.github/workflows/AutoMergeMainOnDevel.yml
@@ -0,0 +1,22 @@
+name: AutoMergeMainOnDevel
+
+on:
+ push:
+ branches:
+ - 'main'
+
+jobs:
+ auto_merge:
+ if: github.repository == 'cnr-isti-vclab/meshlab'
+ name: Automatic Merge Main On Devel
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Merge main -> devel
+ uses: devmasx/merge-branch@master
+ with:
+ type: now
+ target_branch: devel
+ message: "Automatic merge branch 'main' into 'devel'"
+ github_token: ${{ github.token }}
diff --git a/.github/workflows/BuildMeshLab.yml b/.github/workflows/BuildMeshLab.yml
new file mode 100644
index 000000000..97333163c
--- /dev/null
+++ b/.github/workflows/BuildMeshLab.yml
@@ -0,0 +1,60 @@
+name: BuildMeshLab
+
+on:
+ [push, pull_request]
+
+env:
+ QT_VERSION: 5.15.2
+ MAC_CERT: ${{secrets.MACOS_CERT_ID}}
+ MAC_CERT_PSSW: ${{secrets.MACOS_CERTIFICATE_PSSW}}
+ WIN_CERT: ${{secrets.WIN_CERTIFICATE}}
+
+jobs:
+ meshlab_build:
+ name: Build MeshLab
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: ['ubuntu-20.04', 'macos-latest', 'windows-latest']
+ precision: [single_precision, double_precision]
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: recursive
+ - name: Setup Environment
+ uses: ./.github/actions/0_setup
+ - name: Setup env variables
+ id: envs
+ shell: bash
+ run: |
+ if [ "${{matrix.precision}}" == "double_precision" ]; then
+ echo "artifact_suffix=_double" >> $GITHUB_OUTPUT
+ else
+ echo "artifact_suffix=" >> $GITHUB_OUTPUT
+ fi
+ - name: Build
+ uses: ./.github/actions/1_build
+ with:
+ cache-path: src/external/downloads/*
+ cache-key: external-libraries
+ build-option: ${{matrix.precision}}
+ nightly: true
+ - name: Deploy
+ uses: ./.github/actions/2_deploy
+ with:
+ mac-certificate: ${{ secrets.MACOS_CERTIFICATE }}
+ mac-certificate-id: ${{ secrets.MACOS_CERT_ID }}
+ mac-certificate-pssw: ${{ secrets.MACOS_CERTIFICATE_PSSW }}
+ win-certificate: ${{ secrets.WIN_CERTIFICATE }}
+ win-certificate-pssw: ${{ secrets.WIN_CERTIFICATE_PSSW }}
+ - name: Upload MeshLab Portable
+ uses: actions/upload-artifact@v3
+ with:
+ name: MeshLab_${{ runner.os }}_portable${{steps.envs.outputs.artifact_suffix}}
+ path: install/
+ - name: Upload MeshLab Packages
+ uses: actions/upload-artifact@v3
+ with:
+ name: MeshLab_${{ runner.os }}_packages${{steps.envs.outputs.artifact_suffix}}
+ path: packages/MeshLab*
\ No newline at end of file
diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml
index 9890bc663..ea091dc19 100644
--- a/.github/workflows/CreateRelease.yml
+++ b/.github/workflows/CreateRelease.yml
@@ -9,413 +9,213 @@ on:
required: true
default: 'YYYY.MM'
+env:
+ QT_VERSION: 5.15.2
jobs:
update_ml_version:
- name: Update ML_VERSION, snapcraft.yaml and Info.plist
- runs-on: macos-latest
+ name: Update ML_VERSION
+ runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
submodules: true
- name: Update MeshLab version
run : |
echo ${{ github.event.inputs.version }} | tr -d '\n'> ML_VERSION
- - name: Update Info.plist
- run: |
- /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString ${{ github.event.inputs.version }}" src/meshlab/Info.plist
- /usr/libexec/PlistBuddy -c "Set CFBundleVersion ${{ github.event.inputs.version }}" src/meshlab/Info.plist
- - name: Update Snap file
- run: |
- sed "s%MESHLAB_VERSION%$(cat ML_VERSION)%g" scripts/Linux/resources/snap/snap_noversion.yaml > snapcraft.yaml
- - name: commit ML_VERSION, snapcraft.yaml and Info.plist change
- uses: stefanzweifel/git-auto-commit-action@v4.1.1
+ - name: commit ML_VERSION change
+ uses: stefanzweifel/git-auto-commit-action@v4
with:
- commit_message: Apply automatic ML_VERSION, snapcraft.yaml and Info.plist change
+ commit_message: Set MeshLab version to ${{ github.event.inputs.version }}
- linux_build:
+ meshlab_build:
needs: [update_ml_version]
- name: Build MeshLab (Linux)
- runs-on: ubuntu-16.04 #in order to deploy, need to use oldest supported version
+ name: Build MeshLab
+ runs-on: ${{ matrix.os }}
strategy:
matrix:
+ os: ['ubuntu-20.04', 'macos-latest', 'windows-latest']
precision: [single_precision, double_precision]
-
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
- ref: master
- submodules: true
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Install dependencies
- run: |
- sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libgmp-dev
- #needed by qt 5.15 on linux
- sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev
+ submodules: recursive
+ ref: main
+ - name: Setup Environment
+ uses: ./.github/actions/0_setup
- name: Setup env variables
id: envs
shell: bash
run: |
if [ "${{matrix.precision}}" == "double_precision" ]; then
- echo ::set-output name=version::"$(cat ML_VERSION)d"
- echo ::set-output name=artifact_suffix::"_double"
+ echo "artifact_suffix=_double" >> $GITHUB_OUTPUT
else
- echo ::set-output name=version::"$(cat ML_VERSION)"
- echo ::set-output name=artifact_suffix::""
+ echo "artifact_suffix=" >> $GITHUB_OUTPUT
fi
- - name: Configure and Build
- run: |
- sh scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
+ - name: Build
+ uses: ./.github/actions/1_build
+ with:
+ cache-path: src/external/downloads/*
+ cache-key: external-libraries
+ build-option: ${{matrix.precision}}
- name: Deploy
- run: |
- sh scripts/${{ runner.os }}/2_deploy.sh
- - name: Build MeshLab AppImage
- run : |
- sh scripts/${{ runner.os }}/3_appimage.sh --${{ matrix.precision }}
- - name: Upload Meshlab Portable
- uses: actions/upload-artifact@v1
+ uses: ./.github/actions/2_deploy
with:
- name: meshlab_linux_portable${{steps.envs.outputs.artifact_suffix}}
- path: src/install/
- - name: Upload Meshlab AppImage
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_linux_appimage${{steps.envs.outputs.artifact_suffix}}
- path: src/MeshLab${{steps.envs.outputs.version}}-linux.AppImage
-
- macos_build:
- needs: [update_ml_version]
- name: Build MeshLab (MacOS)
- runs-on: macos-latest
- strategy:
- matrix:
- precision: [single_precision, double_precision]
-
- steps:
- - uses: actions/checkout@v2
- with:
- ref: master
- submodules: true
- - name: Install dependencies
- run: |
- brew install libomp
- npm install -g appdmg
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Setup env variables
- id: envs
- shell: bash
- run: |
- if [ "${{matrix.precision}}" == "double_precision" ]; then
- echo ::set-output name=version::"$(cat ML_VERSION)d"
- echo ::set-output name=artifact_suffix::"_double"
- else
- echo ::set-output name=version::"$(cat ML_VERSION)"
- echo ::set-output name=artifact_suffix::""
- fi
- - name: Configure and Build
- run: |
- sh scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
- - name: Deploy
- run: |
- sh scripts/${{ runner.os }}/2_deploy.sh
- - name: Create MeshLab DMG
- run: |
- sh scripts/${{ runner.os }}/3_dmg.sh --${{ matrix.precision }}
- mv src/install/MeshLab${{steps.envs.outputs.version}}.dmg src/install/MeshLab${{steps.envs.outputs.version}}-macos.dmg
+ mac-certificate: ${{ secrets.MACOS_CERTIFICATE }}
+ mac-certificate-id: ${{ secrets.MACOS_CERT_ID }}
+ mac-certificate-pssw: ${{ secrets.MACOS_CERTIFICATE_PSSW }}
+ mac-notarization-user: ${{ secrets.MACOS_NOTARIZATION_USER }}
+ mac-notarization-team: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}
+ mac-notarization-pssw: ${{ secrets.MACOS_NOTARIZATION_PSSW }}
+ win-certificate: ${{ secrets.WIN_CERTIFICATE }}
+ win-certificate-pssw: ${{ secrets.WIN_CERTIFICATE_PSSW }}
- name: Upload MeshLab Portable
- uses: actions/upload-artifact@v1
+ uses: actions/upload-artifact@v3
with:
- name: meshlab_macos_portable${{steps.envs.outputs.artifact_suffix}}
- path: src/install/meshlab.app
- - name: Upload DMG
- uses: actions/upload-artifact@v1
+ name: MeshLab_${{ runner.os }}_portable${{steps.envs.outputs.artifact_suffix}}
+ path: install/
+ - name: Upload MeshLab Packages
+ uses: actions/upload-artifact@v3
with:
- name: meshlab_macos_dmg${{steps.envs.outputs.artifact_suffix}}
- path: src/install/MeshLab${{steps.envs.outputs.version}}-macos.dmg
-
- windows_build:
- needs: [update_ml_version]
- name: Build MeshLab (Windows)
- runs-on: windows-latest
- strategy:
- matrix:
- precision: [single_precision, double_precision]
-
- steps:
- - uses: actions/checkout@v2
- with:
- ref: master
- submodules: true
- - name: Download Jom
- run: |
- Invoke-WebRequest -Uri "http://download.qt.io/official_releases/jom/jom_1_1_3.zip" -OutFile "jom_1_1_3.zip"
- New-Item -Name "jom" -ItemType "directory"
- Expand-Archive -Path jom_1_1_3.zip -DestinationPath .\jom
- echo "$(Get-Location)\jom" >> GITHUB_PATH
- - name: Setup MSVC
- uses: ilammy/msvc-dev-cmd@v1
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Setup env variables
- shell: bash
- id: envs
- run: |
- if [ "${{matrix.precision}}" == "double_precision" ]; then
- echo ::set-output name=version::"$(cat ML_VERSION)d"
- echo ::set-output name=artifact_suffix::"_double"
- else
- echo ::set-output name=version::"$(cat ML_VERSION)"
- echo ::set-output name=artifact_suffix::""
- fi
- echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $GITHUB_ENV
- - name: Configure and Build
- shell: bash
- run: |
- sh scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
- - name: Deploy
- shell: bash
- run: |
- sh scripts/${{ runner.os }}/2_deploy.sh
- - name: NSIS script
- shell: bash
- run: |
- sh scripts/${{ runner.os }}/resources/nsis_script.sh --${{ matrix.precision }}
- - name: Create Installer
- uses: joncloud/makensis-action@v1
- with:
- script-file: "src/install/meshlab_final.nsi"
- - name: Rename Installer
- shell: bash
- run: |
- mv src/install/MeshLab${{steps.envs.outputs.version}}.exe src/MeshLab${{steps.envs.outputs.version}}-windows.exe
- - name: Uploading MeshLab Portable
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_windows_portable${{steps.envs.outputs.artifact_suffix}}
- path: src/install
- - name: Upload Meshlab Installer
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_windows_installer${{steps.envs.outputs.artifact_suffix}}
- path: src/MeshLab${{steps.envs.outputs.version}}-windows.exe
+ name: MeshLab_${{ runner.os }}_packages${{steps.envs.outputs.artifact_suffix}}
+ path: packages/MeshLab*
#after building MeshLab for the three platforms, we create a release in github
create_release:
name: Create Release
- needs: [linux_build, macos_build, windows_build]
+ needs: [meshlab_build]
runs-on: ubuntu-latest
steps:
#Download Linux Packages
- name: Download Linux ZIP
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_linux_portable
+ name: MeshLab_Linux_portable
+ path: meshlab_linux_portable
- name: Download Linux ZIP-d
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_linux_portable_double
+ name: MeshLab_Linux_portable_double
+ path: meshlab_linux_portable_double
- name: Download Linux AppImage
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_linux_appimage
+ name: MeshLab_Linux_packages
+ path: meshlab_linux_appimage
- name: Download Linux AppImage-d
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_linux_appimage_double
+ name: MeshLab_Linux_packages_double
+ path: meshlab_linux_appimage_double
- name: Change Permissions
run: |
chmod +x meshlab_linux_portable/usr/bin/meshlab
chmod +x meshlab_linux_portable/AppRun
chmod +x meshlab_linux_portable_double/usr/bin/meshlab
chmod +x meshlab_linux_portable_double/AppRun
+ - name: Setup env variables
+ id: envs
+ shell: bash
+ run: |
+ #get version of meshlab
+ IFS=' ' #space delimiter
+ STR_VERSION=$(meshlab_linux_portable/usr/bin/meshlab --version)
+ read -a strarr <<< "$STR_VERSION"
+ ML_VERSION=${strarr[1]} #get the meshlab version from the string
+ echo "ml_version=$ML_VERSION" >> $GITHUB_OUTPUT
+ STR_VERSION=$(meshlab_linux_portable_double/usr/bin/meshlab --version)
+ read -a strarrd <<< "$STR_VERSION"
+ ML_VERSION_D=${strarrd[1]} #get the meshlab version from the string
+ echo "ml_version_d=$ML_VERSION_D" >> $GITHUB_OUTPUT
+ #access to this variable using ${{steps.envs.outputs.ml_version}} or ${{steps.envs.outputs.ml_version_d}}
- name: Create MeshLab Portable Linux Archive
run: |
- tar -cvzf MeshLab${{ github.event.inputs.version }}-linux.tar.gz meshlab_linux_portable/
- tar -cvzf MeshLab${{ github.event.inputs.version }}d-linux.tar.gz meshlab_linux_portable_double/
-
+ cd meshlab_linux_portable
+ tar -cvzf ../MeshLab${{steps.envs.outputs.ml_version}}-linux.tar.gz *
+ cd ../meshlab_linux_portable_double
+ tar -cvzf ../MeshLab${{steps.envs.outputs.ml_version_d}}-linux.tar.gz *
+ cd ..
#Download MacOS Package
- name: Download MacOS DMG
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_macos_dmg
+ name: MeshLab_macOS_packages
+ path: meshlab_macos_dmg
- name: Download MacOS DMG-d
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_macos_dmg_double
+ name: MeshLab_macOS_packages_double
+ path: meshlab_macos_dmg_double
- name: Download MacOS Portable
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_macos_portable
+ name: MeshLab_macOS_portable
+ path: meshlab_macos_portable
- name: Download MacOS Portable-d
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_macos_portable_double
+ name: MeshLab_macOS_portable_double
+ path: meshlab_macos_portable_double
+ - name: Change Permissions
+ run: |
+ chmod +x meshlab_macos_portable/MeshLab*.app/Contents/MacOS/meshlab
+ chmod +x meshlab_macos_portable_double/MeshLab*.app/Contents/MacOS/meshlab
- name: Create MeshLab Portable MacOS
run: |
- mv meshlab_macos_portable meshlab.app
- zip -r MeshLab${{ github.event.inputs.version }}-macos.zip meshlab.app/
- rm -r meshlab.app
- mv meshlab_macos_portable_double meshlab.app
- zip -r MeshLab${{ github.event.inputs.version }}d-macos.zip meshlab.app/
+ cd meshlab_macos_portable
+ tar -cvzf ../MeshLab${{steps.envs.outputs.ml_version}}-macos.tar.gz *
+ cd ../meshlab_macos_portable_double
+ tar -cvzf ../MeshLab${{steps.envs.outputs.ml_version_d}}-macos.tar.gz *
+ cd ..
#Download Windows Packages
- name: Download Windows ZIP
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_windows_portable
+ name: MeshLab_Windows_portable
+ path: meshlab_windows_portable
- name: Download Windows ZIP-d
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_windows_portable_double
+ name: MeshLab_Windows_portable_double
+ path: meshlab_windows_portable_double
- name: Download Windows Installer
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_windows_installer
+ name: MeshLab_Windows_packages
+ path: meshlab_windows_installer
- name: Download Windows Installer-d
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v3
with:
- name: meshlab_windows_installer_double
+ name: MeshLab_Windows_packages_double
+ path: meshlab_windows_installer_double
- name: Create MeshLab Portable Windows Archive
run: |
- zip -r MeshLab${{ github.event.inputs.version }}-windows.zip meshlab_windows_portable/
- zip -r MeshLab${{ github.event.inputs.version }}d-windows.zip meshlab_windows_portable_double/
-
+ cd meshlab_windows_portable
+ zip -r ../MeshLab${{steps.envs.outputs.ml_version}}-windows.zip *
+ cd ../meshlab_windows_portable_double
+ zip -r ../MeshLab${{steps.envs.outputs.ml_version_d}}-windows.zip *
+ cd ..
#Create release and upload
- - name: Publish Release
- id: create_release
- uses: actions/create-release@v1.0.0
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303"
with:
- tag_name: Meshlab-${{ github.event.inputs.version }}
- release_name: MeshLab-${{ github.event.inputs.version }}
- draft: false
- prerelease: false
- #Linux
- - name: Upload ReleaseLinuxPortable
- id: upload-release-linux-portable
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: MeshLab${{ github.event.inputs.version }}-linux.tar.gz
- asset_name: MeshLab${{ github.event.inputs.version }}-linux.tar.gz
- asset_content_type: MeshLab Portable for Linux
- - name: Upload ReleaseLinuxPortable-d
- id: upload-release-linux-portable-d
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: MeshLab${{ github.event.inputs.version }}d-linux.tar.gz
- asset_name: MeshLab${{ github.event.inputs.version }}d-linux.tar.gz
- asset_content_type: MeshLab Portable for Linux
- - name: Upload ReleaseLinuxAppImage
- id: upload-release-linux-appimage
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: meshlab_linux_appimage/MeshLab${{ github.event.inputs.version }}-linux.AppImage
- asset_name: MeshLab${{ github.event.inputs.version }}-linux.AppImage
- asset_content_type: MeshLab AppImage for Linux
- - name: Upload ReleaseLinuxAppImage-d
- id: upload-release-linux-appimage-d
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: meshlab_linux_appimage_double/MeshLab${{ github.event.inputs.version }}d-linux.AppImage
- asset_name: MeshLab${{ github.event.inputs.version }}d-linux.AppImage
- asset_content_type: MeshLab AppImage for Linux
- #MacOS
- - name: Upload ReleaseMacOSDMG
- id: upload-release-macos
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: meshlab_macos_dmg/MeshLab${{ github.event.inputs.version }}-macos.dmg
- asset_name: MeshLab${{ github.event.inputs.version }}-macos.dmg
- asset_content_type: MeshLab DMG for MacOS
- - name: Upload ReleaseMacOSDMG-d
- id: upload-release-macos-d
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: meshlab_macos_dmg_double/MeshLab${{ github.event.inputs.version }}d-macos.dmg
- asset_name: MeshLab${{ github.event.inputs.version }}d-macos.dmg
- asset_content_type: MeshLab DMG for MacOS
- - name: Upload ReleaseMacOSPortable
- id: upload-release-macos-portable
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: MeshLab${{ github.event.inputs.version }}-macos.zip
- asset_name: MeshLab${{ github.event.inputs.version }}-macos.zip
- asset_content_type: MeshLab Portable for MacOS
- - name: Upload ReleaseMacOSPortable-d
- id: upload-release-macos-portable-d
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: MeshLab${{ github.event.inputs.version }}d-macos.zip
- asset_name: MeshLab${{ github.event.inputs.version }}d-macos.zip
- asset_content_type: MeshLab Portable for MacOS
- #Windows
- - name: Upload ReleaseWindowsPortable
- id: upload-release-windows-portable
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: MeshLab${{ github.event.inputs.version }}-windows.zip
- asset_name: MeshLab${{ github.event.inputs.version }}-windows.zip
- asset_content_type: MeshLab Portable for Windows
- - name: Upload ReleaseWindowsPortable-d
- id: upload-release-windows-portable-d
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: MeshLab${{ github.event.inputs.version }}d-windows.zip
- asset_name: MeshLab${{ github.event.inputs.version }}d-windows.zip
- asset_content_type: MeshLab Portable for Windows
- - name: Upload ReleaseWindowsInstaller
- id: upload-release-windows-installer
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: meshlab_windows_installer/MeshLab${{ github.event.inputs.version }}-windows.exe
- asset_name: MeshLab${{ github.event.inputs.version }}-windows.exe
- asset_content_type: MeshLab Portable for Windows
- - name: Upload ReleaseWindowsInstaller-d
- id: upload-release-windows-installer-d
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: meshlab_windows_installer_double/MeshLab${{ github.event.inputs.version }}d-windows.exe
- asset_name: MeshLab${{ github.event.inputs.version }}d-windows.exe
- asset_content_type: MeshLab Portable for Windows
+ repo_token: "${{ secrets.GITHUB_TOKEN }}"
+ automatic_release_tag: "MeshLab-${{steps.envs.outputs.ml_version}}"
+ prerelease: false #${{ github.event.inputs.release_candidate }}
+ title: "MeshLab-${{steps.envs.outputs.ml_version}}"
+ files: |
+ MeshLab${{steps.envs.outputs.ml_version}}-linux.tar.gz
+ MeshLab${{steps.envs.outputs.ml_version_d}}-linux.tar.gz
+ meshlab_linux_appimage/MeshLab${{steps.envs.outputs.ml_version}}-linux.AppImage
+ meshlab_linux_appimage_double/MeshLab${{steps.envs.outputs.ml_version_d}}-linux.AppImage
+ MeshLab${{steps.envs.outputs.ml_version}}-macos.tar.gz
+ MeshLab${{steps.envs.outputs.ml_version_d}}-macos.tar.gz
+ meshlab_macos_dmg/MeshLab${{steps.envs.outputs.ml_version}}-macos.dmg
+ meshlab_macos_dmg_double/MeshLab${{steps.envs.outputs.ml_version_d}}-macos.dmg
+ MeshLab${{steps.envs.outputs.ml_version}}-windows.zip
+ MeshLab${{steps.envs.outputs.ml_version_d}}-windows.zip
+ meshlab_windows_installer/MeshLab${{steps.envs.outputs.ml_version}}-windows.exe
+ meshlab_windows_installer_double/MeshLab${{steps.envs.outputs.ml_version_d}}-windows.exe
diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml
deleted file mode 100644
index bba54dbc3..000000000
--- a/.github/workflows/Linux.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-name: Linux
-
-on:
- [push, pull_request]
-
-jobs:
- linux_build:
- name: Build MeshLab (Linux)
- runs-on: ubuntu-16.04 #in order to deploy, need to use oldest supported version
- strategy:
- matrix:
- precision: [single_precision, double_precision]
-
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Install dependencies
- run: |
- sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libgmp-dev
- #needed by qt 5.15 on linux
- sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev
- - name: Setup env variables
- id: envs
- shell: bash
- run: |
- if [ "${{matrix.precision}}" == "double_precision" ]; then
- echo ::set-output name=version::"$(cat ML_VERSION)d"
- echo ::set-output name=artifact_suffix::"_double"
- else
- echo ::set-output name=version::"$(cat ML_VERSION)"
- echo ::set-output name=artifact_suffix::""
- fi
- - name: Configure and Build
- run: |
- sh scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
- - name: Deploy
- run: |
- sh scripts/${{ runner.os }}/2_deploy.sh
- - name: Build MeshLab AppImage
- run : |
- sh scripts/${{ runner.os }}/3_appimage.sh --${{ matrix.precision }}
- - name: Upload Meshlab Portable
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_linux_portable${{steps.envs.outputs.artifact_suffix}}
- path: src/install/
- - name: Upload Meshlab AppImage
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_linux_appimage${{steps.envs.outputs.artifact_suffix}}
- path: src/MeshLab${{steps.envs.outputs.version}}-linux.AppImage
diff --git a/.github/workflows/LinuxSnap.yml b/.github/workflows/LinuxSnap.yml
deleted file mode 100644
index c03a08c80..000000000
--- a/.github/workflows/LinuxSnap.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: LinuxSnap
-
-on:
- workflow_dispatch
-
-jobs:
- linux_build_snap:
- name: Build MeshLab (Linux - Snap)
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- - name: Install dependencies
- run: |
- #needed for some reason...
- curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
- sudo apt update
- sudo apt-get install -y snapcraft
- - name: Setup env variables
- id: envs
- run: |
- echo ::set-output name=date::"$(cat ML_VERSION)"
- - name: Build MeshLab Snap
- run: |
- snapcraft
- - name: Rename Snap
- run: |
- mv ./meshlab*.snap ./MeshLab${{steps.envs.outputs.date}}-linux.snap
- - name: Upload Meshlab Snap
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_linux_snap
- path: MeshLab${{steps.envs.outputs.date}}-linux.snap
diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml
deleted file mode 100644
index 10aaf5ebe..000000000
--- a/.github/workflows/MacOS.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-name: MacOS
-
-on:
- [push, pull_request]
-
-jobs:
- macos_build:
- name: Build MeshLab (MacOS)
- runs-on: macos-latest
- strategy:
- matrix:
- precision: [single_precision, double_precision]
-
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- - name: Install dependencies
- run: |
- brew install libomp
- npm install -g appdmg
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Setup env variables
- id: envs
- shell: bash
- run: |
- if [ "${{matrix.precision}}" == "double_precision" ]; then
- echo ::set-output name=version::"$(cat ML_VERSION)d"
- echo ::set-output name=artifact_suffix::"_double"
- else
- echo ::set-output name=version::"$(cat ML_VERSION)"
- echo ::set-output name=artifact_suffix::""
- fi
- - name: Configure and Build
- run: |
- sh scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
- - name: Deploy
- run: |
- sh scripts/${{ runner.os }}/2_deploy.sh
- - name: Create DMG
- run: |
- sh scripts/${{ runner.os }}/3_dmg.sh --${{ matrix.precision }}
- mv src/install/MeshLab${{steps.envs.outputs.version}}.dmg src/install/MeshLab${{steps.envs.outputs.version}}-macos.dmg
- - name: Upload MeshLab Portable
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_macos_portable${{steps.envs.outputs.artifact_suffix}}
- path: src/install/meshlab.app
- - name: Upload DMG
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_macos_dmg${{steps.envs.outputs.artifact_suffix}}
- path: src/install/MeshLab${{steps.envs.outputs.version}}-macos.dmg
diff --git a/.github/workflows/QmakeBuilds.yml b/.github/workflows/QmakeBuilds.yml
deleted file mode 100644
index 4fad13b4b..000000000
--- a/.github/workflows/QmakeBuilds.yml
+++ /dev/null
@@ -1,139 +0,0 @@
-name: Qmake builds
-
-on: [push, pull_request]
-
-jobs:
- ubuntu_build:
- name: Build MeshLab (Ubuntu - QMake)
- runs-on: ubuntu-16.04 #in order to deploy, need to use oldest supported version
-
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Install dependencies
- run: |
- sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libglew-dev libeigen3-dev libgmp-dev
- sudo apt-get install -y libxkbcommon-x11-0 patchelf
- #needed by qt 5.15 on linux
- sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev
- - name: Setup env variables
- id: envs
- run: |
- echo ::set-output name=date::"$(cat ML_VERSION)"
- - name: Build MeshLab
- run: |
- sh scripts/${{ runner.os }}/qmake/linux_build.sh
- - name: Make MeshLab Bundle
- run: |
- sh scripts/${{ runner.os }}/qmake/linux_make_bundle.sh
- - name: Deploy MeshLab and MeshLabServer
- run : |
- sh scripts/${{ runner.os }}/qmake/linux_deploy.sh
- - name: Build MeshLab and MeshLabServer AppImages
- run : |
- sh scripts/${{ runner.os }}/qmake/linux_appimages.sh
- - name: Upload Meshlab Portable
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_linux_portable
- path: distrib/
- - name: Upload MeshlabServer AppImage
- uses: actions/upload-artifact@v1
- with:
- name: meshlabserver_linux_appimage
- path: MeshLabServer${{steps.envs.outputs.date}}-linux.AppImage
- - name: Upload Meshlab AppImage
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_linux_appimage
- path: MeshLab${{steps.envs.outputs.date}}-linux.AppImage
-
- macos_build_qmake:
- name: Build MeshLab (MacOS - QMake)
- runs-on: macos-latest
-
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- - name: Install dependencies
- run: |
- brew install libomp
- npm install -g appdmg
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Setup env variables
- id: envs
- shell: bash
- run: |
- echo ::set-output name=date::"$(cat ML_VERSION)"
- - name: Build MeshLab
- run: |
- sh scripts/${{ runner.os }}/qmake/macos_build.sh
- - name: Deploy MeshLab
- run: |
- sh scripts/${{ runner.os }}/qmake/macos_deploy.sh
- - name: Create DMG
- run: |
- sh scripts/${{ runner.os }}/qmake/macos_dmg.sh
- mv distrib/MeshLab${{steps.envs.outputs.date}}.dmg distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
- - name: Upload DMG
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_macos_dmg
- path: distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
-
- windows_build_qmake:
- name: Build MeshLab (Windows - QMake)
- runs-on: windows-latest
-
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- - name: Download Jom
- run: |
- Invoke-WebRequest -Uri "http://download.qt.io/official_releases/jom/jom_1_1_3.zip" -OutFile "jom_1_1_3.zip"
- New-Item -Name "jom" -ItemType "directory"
- Expand-Archive -Path jom_1_1_3.zip -DestinationPath .\jom
- echo "$(Get-Location)\jom" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- #echo "$(Get-Location)\jom" >> GITHUB_PATH
- - name: Setup env variables
- id: envs
- run: |
- echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $GITHUB_ENV
- #echo '::set-env name=VCINSTALLDIR::C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
- echo "::set-output name=date::$(type ML_VERSION)"
- - name: Setup MSVC
- uses: ilammy/msvc-dev-cmd@v1
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Build MeshLab
- run: |
- .\scripts\${{ runner.os }}\qmake\windows_build.ps1
- - name: Deploy MeshLab
- run: |
- .\scripts\${{ runner.os }}\qmake\windows_deploy.ps1
- - name: NSIS script
- run: |
- .\scripts\${{ runner.os }}\resources\windows_nsis_script.ps1
- - name: Create Installer
- uses: joncloud/makensis-action@v1
- with:
- script-file: "scripts/windows/resources/meshlab_final.nsi"
- - name: Rename Installer
- run: |
- Rename-Item -Path scripts\windows\resources\MeshLab${{steps.envs.outputs.date}}.exe -NewName MeshLab${{steps.envs.outputs.date}}-windows.exe
- - name: Upload Meshlab Portable
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_windows_portable
- path: distrib
- - name: Upload Meshlab Installer
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_windows_installer
- path: scripts/windows/resources/MeshLab${{steps.envs.outputs.date}}-windows.exe
diff --git a/.github/workflows/Windows.yml b/.github/workflows/Windows.yml
deleted file mode 100644
index c95a262a2..000000000
--- a/.github/workflows/Windows.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-name: Windows
-
-on: [push, pull_request]
-
-jobs:
- windows_build:
- name: Build MeshLab (Windows)
- runs-on: windows-latest
- strategy:
- matrix:
- precision: [single_precision, double_precision]
-
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- - name: Download Jom
- run: |
- Invoke-WebRequest -Uri "http://download.qt.io/official_releases/jom/jom_1_1_3.zip" -OutFile "jom_1_1_3.zip"
- New-Item -Name "jom" -ItemType "directory"
- Expand-Archive -Path jom_1_1_3.zip -DestinationPath .\jom
- echo "$(Get-Location)\jom" >> GITHUB_PATH
- - name: Setup MSVC
- uses: ilammy/msvc-dev-cmd@v1
- - name: Install Qt
- uses: jurplel/install-qt-action@v2
- - name: Setup env variables
- shell: bash
- id: envs
- run: |
- if [ "${{matrix.precision}}" == "double_precision" ]; then
- echo ::set-output name=version::"$(cat ML_VERSION)d"
- echo ::set-output name=artifact_suffix::"_double"
- else
- echo ::set-output name=version::"$(cat ML_VERSION)"
- echo ::set-output name=artifact_suffix::""
- fi
- echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $GITHUB_ENV
- - name: Configure and Build
- shell: bash
- run: |
- sh scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
- - name: Deploy
- shell: bash
- run: |
- sh scripts/${{ runner.os }}/2_deploy.sh
- - name: NSIS script
- shell: bash
- run: |
- sh scripts/${{ runner.os }}/resources/nsis_script.sh --${{ matrix.precision }}
- - name: Create Installer
- uses: joncloud/makensis-action@v1
- with:
- script-file: "src/install/meshlab_final.nsi"
- - name: Rename Installer
- shell: bash
- run: |
- mv src/install/MeshLab${{steps.envs.outputs.version}}.exe src/MeshLab${{steps.envs.outputs.version}}-windows.exe
- - name: Uploading MeshLab Portable
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_windows_portable${{steps.envs.outputs.artifact_suffix}}
- path: src/install
- - name: Upload Meshlab Installer
- uses: actions/upload-artifact@v1
- with:
- name: meshlab_windows_installer${{steps.envs.outputs.artifact_suffix}}
- path: src/MeshLab${{steps.envs.outputs.version}}-windows.exe
diff --git a/.gitignore b/.gitignore
index 47f65c5ce..fb5625a04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,16 +17,24 @@
*.db-wal
*.AppImage
.DS_Store
-distrib*
-src/install/*
+
+# build and install directories
+build/*
+install/*
+
+# external libraries automatically downloaded by cmake
+src/external/easyexif*/test-images/*
+src/external/glew*/auto/*
+src/external/glew*/build/*
+src/external/glew*/config/*
+src/external/glew*/doc/*
+src/external/downloads/*
+src/external/tmp.zip
+
+# files created/modified during deploy stage
install/macos/resources/meshlab_dmg_final.json
install/windows/resources/meshlab_final.nsi
install/windows/resources/MeshLab*.exe
-#install/snap20????/prime
-#install/snap20????/parts
-#install/snap20????/stage
-#install/snap20????/*.snap
-src/common/generated_version_header.h
##Standard cmake gitignore##
CMakeLists.txt.user
@@ -95,7 +103,7 @@ target_wrapper.*
# QtCreator CMake
CMakeLists.txt.user*
-# QtCreator 4.8< compilation database
+# QtCreator 4.8< compilation database
compile_commands.json
# QtCreator local machine specific files for imported projects
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..83f0e0fb4
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Copyright 2019, 2020, Collabora, Ltd.
+# Copyright 2019, 2021, Visual Computing Lab, ISTI - Italian National Research Council
+# SPDX-License-Identifier: BSL-1.0
+
+cmake_minimum_required(VERSION 3.18)
+project(MeshLab)
+
+### Build options
+option(MESHLAB_BUILD_MINI "Build only common and meshlab - other plugin targets must be set manually" OFF)
+option(MESHLAB_BUILD_STRICT "Strictly enforce resolution of all symbols" ON)
+option(MESHLAB_BUILD_WITH_DOUBLE_SCALAR "Use double type instead of float type for scalars" OFF)
+option(MESHLAB_ENABLE_DEBUG_LOG_FILE "If enabled, all the logs of MeshLab will be also saved into a log file" OFF)
+
+option(MESHLAB_BUILD_ONLY_LIBRARIES "Build only meshlab-common and plugins, excluding executables" OFF)
+option(MESHLAB_USE_DEFAULT_BUILD_AND_INSTALL_DIRS "If set to OFF, it expects that you set manually the binary and install directories" ON)
+
+option(MESHLAB_IS_NIGHTLY_VERSION "Nightly version of meshlab will be used instead of ML_VERSION" OFF)
+
+add_subdirectory(src)
\ No newline at end of file
diff --git a/ML_VERSION b/ML_VERSION
index ee102115d..19b29e818 100644
--- a/ML_VERSION
+++ b/ML_VERSION
@@ -1 +1 @@
-2020.12
\ No newline at end of file
+2022.02
\ No newline at end of file
diff --git a/README.md b/README.md
index abc325d41..30deb5677 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,48 @@
#  MeshLab
-
-
-
+[](https://github.com/cnr-isti-vclab/meshlab/actions/workflows/BuildMeshLab.yml)
+
+[](https://doi.org/10.5281/zenodo.5114037)
This is the official repository for the source and the binaries of [MeshLab](https://www.MeshLab.net).
-MeshLab is an open source, portable, and extensible system for the processing and editing of unstructured large 3D triangular meshes. It is aimed to help the processing of the typical not-so-small unstructured models arising in 3D scanning, providing a set of tools for editing, cleaning, healing, inspecting, rendering and converting this kind of meshes. These tools include MeshLab proper, a versatile program with a graphical user interface, and [meshlabserver](https://github.com/cnr-isti-vclab/meshlab/blob/master/src/meshlabserver/README.md), a program that can perform mesh processing tasks in batch mode, without a GUI.
+MeshLab is an open source, portable, and extensible system for the processing and editing of unstructured large 3D triangular meshes. It is aimed to help the processing of the typical not-so-small unstructured models arising in 3D scanning, providing a set of tools for editing, cleaning, healing, inspecting, rendering and converting this kind of meshes.
MeshLab is mostly based on the open source C++ mesh processing library [VCGlib](http://www.vcglib.net) developed at the [Visual Computing Lab](http://vcg.isti.cnr.it) of [ISTI - CNR](http://www.isti.cnr.it). VCG can be used as a stand-alone large-scale automated mesh processing pipeline, while MeshLab makes it easy to experiment with its algorithms interactively.
-MeshLab is available for Windows, MacOS, and Linux.
+MeshLab is available for Windows, macOS, and Linux.
# Releases
You can find the last MeshLab release in the [Releases Tab](https://github.com/cnr-isti-vclab/meshlab/releases) for your favourite platform.
-You can also test a built version of MeshLab generated by the last commit pushed in this repository, by downloading the artifacts of the last [Github Actions](https://github.com/cnr-isti-vclab/meshlab/actions) workflow.
+You can also test the last nightly version of MeshLab, by downloading the artifacts of the last [Github Actions](https://github.com/cnr-isti-vclab/meshlab/actions) workflow. You can find a guide on how to download it [here](https://github.com/cnr-isti-vclab/meshlab/wiki/How-to-install-the-last-nightly-version).
# Build instructions
-We provide a set of scripts that build and deploy MeshLab automatically. All the scripts can be found in the [scripts](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts) folder.
-For specific build instructions see the [src](https://github.com/cnr-isti-vclab/meshlab/blob/master/src/README.md) folder.
+We provide a set of scripts that build and deploy MeshLab automatically. All the scripts can be found in the [scripts](https://github.com/cnr-isti-vclab/meshlab/tree/main/scripts) folder.
+For specific build instructions see the [src](https://github.com/cnr-isti-vclab/meshlab/blob/main/src/README.md) folder.
+
+# Branches and Pull Requests
+
+On this repository, we keep two relevant branches:
+
+- `main`: we keep here the **last release version of MeshLab**, with just bugfixes, optimizations and changes that do not affect the last released MeshLab binary. In case of bugs caught after a release, this branch is used to publish "post-releases".
+- `devel`: we add here new features and functionalities of the software that are going to appear in the next release of MeshLab. Bugfixes pushed in `main` are automatically merged into the `devel` branch.
+
+Before committing a new change, or sending a pull request, please choose the branch that better suits for your change.
+If it is just a bugfix, or an edit that does not modify the software (e.g. documentation typos, changes to the deploy system, ...), use the `main` branch.
+If it is a new feature that will change the behaviour or the usage of the software, use the `devel` branch.
# Structure of the Repository
The MeshLab repository is organized as follows:
-* `distrib`: this folder contains a set of prebuilt libraries and shaders that will be used by MeshLab once it is compiled. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/tree/master/distrib/README.md);
* `docs`: doxygen scripts for generating MeshLab documentation. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/tree/master/docs);
* `sample` and `textures`: a set of files (meshes, images) used for tests;
+* `resources`: contains a set of files used by the software and by the deploy system to produce the final MeshLab binary;
* `scripts`: in this folder there is a set of platform-dependent scripts to build and deploy MeshLab. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts/README.md);
-* `src`: this folder contains all the source code of MeshLab, its plugins and the external libraries that it requires. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/blob/master/src/README.md);
+* `src`: this folder contains all the source code of MeshLab and its plugins. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/blob/master/src/README.md);
* `unsupported`: this folder contains a set of old and unsupported MeshLab plugins that are no longer included and built under MeshLab.
# License
@@ -51,28 +62,33 @@ The MeshLab repository is organized as follows:
Paolo Cignoni \/)\/
Visual Computing Lab http://vcg.isti.cnr.it /\/|
ISTI - Italian National Research Council |
- Copyright(C) 2005-2018 \
+ Copyright(C) 2005-2021 \
```
# References
+[](https://doi.org/10.5281/zenodo.5114037)
+
+
Please, when using this tool, cite the references listed in the official web page https://www.meshlab.net/#references according to you needs, or if you are lazy just cite:
-Meshlab: an open-source mesh processing tool. P. Cignoni, M. Callieri, M. Corsini, M. Dellepiane, F. Ganovelli, G. Ranzuglia
-Proceedings of the 2008 Eurographics Italian Chapter Conference, ISBN: 978-3-905673-68-5, pp. 129-136, DOI: 10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136
-
-BibTeX format:
-
```
+@software{meshlab,
+ author = {Paolo Cignoni, Alessandro Muntoni, Guido Ranzuglia, Marco Callieri},
+ title = {{MeshLab}},
+ publisher = {Zenodo},
+ doi = {10.5281/zenodo.5114037}
+}
+
@inproceedings {LocalChapterEvents:ItalChap:ItalianChapConf2008:129-136,
-booktitle = {Eurographics Italian Chapter Conference},
-editor = {Vittorio Scarano and Rosario De Chiara and Ugo Erra},
-title = {{MeshLab: an Open-Source Mesh Processing Tool}},
-author = {Cignoni, Paolo and Callieri, Marco and Corsini, Massimiliano and Dellepiane, Matteo and Ganovelli, Fabio and Ranzuglia, Guido},
-year = {2008},
-publisher = {The Eurographics Association},
-ISBN = {978-3-905673-68-5},
-DOI = {10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136}
+ booktitle = {Eurographics Italian Chapter Conference},
+ editor = {Vittorio Scarano and Rosario De Chiara and Ugo Erra},
+ title = {{MeshLab: an Open-Source Mesh Processing Tool}},
+ author = {Cignoni, Paolo and Callieri, Marco and Corsini, Massimiliano and Dellepiane, Matteo and Ganovelli, Fabio and Ranzuglia, Guido},
+ year = {2008},
+ publisher = {The Eurographics Association},
+ ISBN = {978-3-905673-68-5},
+ DOI = {10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136}
}
```
@@ -86,6 +102,3 @@ DOI = {10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136}
For documented and repeatable bugs, feature requests, etc., please use the [GitHub issues](https://github.com/cnr-isti-vclab/meshlab/issues).
For general questions use [StackOverflow](http://stackoverflow.com/questions/tagged/meshlab).
-
-
-
diff --git a/distrib/README.md b/distrib/README.md
deleted file mode 100644
index def256882..000000000
--- a/distrib/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# distrib folder
-
-The distrib folder contains a set of pre-built libraries and shaders that MeshLab needs to properly run, plus some other txt files and icons.
\ No newline at end of file
diff --git a/distrib/meshlab.png b/distrib/meshlab.png
deleted file mode 100644
index 2f787916d..000000000
Binary files a/distrib/meshlab.png and /dev/null differ
diff --git a/distrib/readme.txt b/distrib/readme.txt
deleted file mode 100644
index 75a236787..000000000
--- a/distrib/readme.txt
+++ /dev/null
@@ -1,56 +0,0 @@
- MeshLab
- http://www.meshlab.net
- All rights reserved.
-
- VCGLib http://www.vcglib.net o o
- Visual and Computer Graphics Library o o
- _ O _
- Paolo Cignoni \/)\/
- Visual Computing Lab http://vcg.isti.cnr.it /\/|
- ISTI - Italian National Research Council |
- Copyright(C) 2005-2018 \
-
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License V 3.0 as published by the Free
-Software Foundation.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-(http://www.gnu.org/licenses/gpl.txt) for more details.
-
---- Windows Note ---
-
-If you are running MeshLab portable and you are getting the error “MSVCP140.dll not found”
-or related, please install Visual C++ Redist by executing the vc_redist.exe file contained
-in the meshlab portable archive.
-
---- References ----
-
-Please, when using this tool, cite the following reference:
-
-Meshlab: an open-source mesh processing tool.
-P. Cignoni, M. Callieri, M. Corsini, M. Dellepiane, F. Ganovelli, G. Ranzuglia
-Proceedings of the 2008 Eurographics Italian Chapter Conference,
-ISBN: 978-3-905673-68-5, pp. 129-136, DOI: 10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136
-
-@inproceedings {LocalChapterEvents:ItalChap:ItalianChapConf2008:129-136,
-booktitle = {Eurographics Italian Chapter Conference},
-editor = {Vittorio Scarano and Rosario De Chiara and Ugo Erra},
-title = {{MeshLab: an Open-Source Mesh Processing Tool}},
-author = {Cignoni, Paolo and Callieri, Marco and Corsini, Massimiliano and Dellepiane, Matteo and Ganovelli, Fabio and Ranzuglia, Guido},
-year = {2008},
-publisher = {The Eurographics Association},
-ISBN = {978-3-905673-68-5},
-DOI = {10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136}
-}
-
-Paolo Cignoni (p.cignoni (at) isti.cnr.it)
-Guido Ranzuglia (g.ranzuglia (at) isti.cnr.it)
-
-For documented and repeatable bugs, reasonable feature requests and grounded issues, please use the GitHub services
-https://github.com/cnr-isti-vclab/meshlab/issues
-
-For general questions use StackOverflow
-http://stackoverflow.com/questions/tagged/meshlab
diff --git a/docs/dox/filter.dox b/docs/dox/filter.dox
index cd70bfab9..e9629f972 100644
--- a/docs/dox/filter.dox
+++ b/docs/dox/filter.dox
@@ -13,9 +13,9 @@ Simulates the aging effects due to small collisions or various chipping events
| \c Int | Fractal Octaves | The number of octaves that are used in the generation of the fractal noise using Perlin noise; reasonalble values are in the 1..8 range. Setting it to 1 means using a simple Perlin Noise. -- |
| \c AbsPerc | Noise frequency scale | Changes the noise frequency scale: this affects chip dimensions and the distance between chips. The value denotes the average values between two dents. Smaller number means small and frequent chips. -- |
| \c Float | Noise clamp threshold [0..1] | All the noise values smaller than this parameter will be considered as 0. -- |
-| \c Float | Displacement steps | The whole displacement process is performed as a sequence of small offsets applyed on each vertex. This parameter represents the number of steps into which the displacement process will be splitted. Useful to avoid the introduction of self intersections. Bigger number means better accuracy. -- |
+| \c Float | Displacement steps | The whole displacement process is performed as a sequence of small offsets applied on each vertex. This parameter represents the number of steps into which the displacement process will be split. Useful to avoid the introduction of self intersections. Bigger number means better accuracy. -- |
| \c Bool | Affect only selected faces | The aging procedure will be applied to the selected faces only. -- |
-| \c Bool | Store erosion informations | Select this option if you want to store the erosion informations over the mesh. A new attribute will be added to each vertex to contain the displacement offset applied to that vertex. -- |
+| \c Bool | Store erosion information | Select this option if you want to store the erosion information over the mesh. A new attribute will be added to each vertex to contain the displacement offset applied to that vertex. -- |
\section f1 Ambient Occlusion - Per Vertex
@@ -46,12 +46,12 @@ Generates environment occlusions values for the loaded mesh
| \c Int | Depth texture size(should be 2^n) | Defines the depth texture size used to compute occlusion from each point of view. Higher values means better accuracy usually with low impact on performance -- |
-\section f3 Automatic pair Alignement
+\section f3 Automatic pair Alignment
Automatic Rough Alignment of two meshes. Based on the paper 4-Points Congruent Sets for Robust Pairwise Surface Registration, by Aiger,Mitra, Cohen-Or. Siggraph 2008
Parameters
-| \c Mesh | First Mesh | The mesh were the coplanar bases are sampled (it will contain the trasformation) -- |
+| \c Mesh | First Mesh | The mesh were the coplanar bases are sampled (it will contain the transformation) -- |
| \c Mesh | Second Mesh | The mesh were similar coplanar based are searched. -- |
| \c Float | Estimated fraction of the
first mesh overlapped by the second | -- |
@@ -66,7 +66,7 @@ Reconstruct a surface using the Ball Pivoting Algorithm (Bernardini et al
| \c AbsPerc | Pivoting Ball radius (0 autoguess) | The radius of the ball pivoting (rolling) over the set of points. Gaps that are larger than the ball radius will not be filled; similarly the small pits that are smaller than the ball radius will be filled. -- |
| \c Float | Clustering radius (% of ball radius) | To avoid the creation of too small triangles, if a vertex is found too close to a previous one, it is clustered/merged with it. -- |
| \c Float | Angle Threshold (degrees) | If we encounter a crease angle that is too large we should stop the ball rolling -- |
-| \c Bool | Delete intial set of faces | if true all the initial faces of the mesh are deleted and the whole surface is rebuilt from scratch, other wise the current faces are used as a starting point. Useful if you run multiple times the algorithm with an incrasing ball radius. -- |
+| \c Bool | Delete initial set of faces | if true all the initial faces of the mesh are deleted and the whole surface is rebuilt from scratch, other wise the current faces are used as a starting point. Useful if you run multiple times the algorithm with an incrasing ball radius. -- |
\section f5 Remove vertices wrt quality
@@ -102,9 +102,9 @@ Align this mesh with another that has corresponding picked points.
| \c Float | Minimal Starting Distance | For all the chosen sample on one mesh we consider for ICP only the samples nearer than this value.If MSD is too large outliers could be included, if it is too small convergence will be very slow. A good guess is needed here, suggested values are in the range of 10-100 times of the device scanning error.This value is also dynamically changed by the 'Reduce Distance Factor' -- |
| \c Float | Target Distance | When 50% of the chosen samples are below this distance we consider the two mesh aligned. Usually it should be a value lower than the error of the scanning device. -- |
| \c Int | Max Iteration Num | The maximum number of iteration that the ICP is allowed to perform. -- |
-| \c Bool | Normal Equalized Sampling | if true (default) the sample points of icp are choosen with a distribution uniform with respect to the normals of the surface. Otherwise they are distributed in a spatially uniform way. -- |
+| \c Bool | Normal Equalized Sampling | if true (default) the sample points of icp are chosen with a distribution uniform with respect to the normals of the surface. Otherwise they are distributed in a spatially uniform way. -- |
| \c Float | MSD Reduce Factor | At each ICP iteration the Minimal Starting Distance is reduced to be 5 times the percentile of the sample distances (e.g. if RF is 0.9 the new Minimal Starting Distance is 5 times the value such that 90% of the sample lies at a distance lower than . -- |
-| \c Bool | Rigid matching | If true the ICP is cosntrained to perform matching only throug roto-translations (no scaling allowed). If false a more relaxed transformation matrix is allowed (scaling and shearing can appear). -- |
+| \c Bool | Rigid matching | If true the ICP is constrained to perform matching only through roto-translations (no scaling allowed). If false a more relaxed transformation matrix is allowed (scaling and shearing can appear). -- |
| \c Bool | Use Markers for Alignment | if true (default), then use the user picked markers to do an alignment (or pre alignment if you also use ICP). -- |
| \c Bool | Scale the mesh | if true (false by default), in addition to the alignment, scale the mesh based on the points picked -- |
| \c Bool | Use ICP for Alignment | if true (default), then use the ICP to align the two meshes. -- |
@@ -143,7 +143,7 @@ Removes t-vertices from the mesh by collapsing the shortest of the incident edge
\section f12 Remove Duplicate Faces
-Remove all the duplicate faces. Two faces are considered equal if they are composed by the same set of verticies, regardless of the order of the vertices.
+Remove all the duplicate faces. Two faces are considered equal if they are composed by the same set of vertices, regardless of the order of the vertices.
Parameters
No parameters.
\section f13 Remove Isolated folded face by edge flip
@@ -153,10 +153,10 @@ Remove all the single folded faces. A face is considered folded if its normal is
No parameters.
\section f14 Merge Close Vertices
-Merge togheter all the vertices that are nearer than the speicified threshold. Like a unify duplicated vertices but with some tolerance.
+Merge together all the vertices that are nearer than the specified threshold. Like a unify duplicated vertices but with some tolerance.
Parameters
-| \c AbsPerc | Merging distance | All the vertices that closer than this threshold are merged toghether. Use very small values, default values is 1/10000 of bounding box diagonal. -- |
+| \c AbsPerc | Merging distance | All the vertices that closer than this threshold are merged together. Use very small values, default values is 1/10000 of bounding box diagonal. -- |
\section f15 Clamp Vertex Quality
@@ -167,7 +167,7 @@ Clamp vertex quality values to a given range according to specific values or to
| \c Float | Min | The value that will be mapped with the lower end of the scale (blue) -- |
| \c Float | Max | The value that will be mapped with the upper end of the scale (red) -- |
| \c DynamicFloat | Percentile Crop [0..100] | If not zero this value will be used for a percentile cropping of the quality values. If this parameter is set to P the value V for which P% of the vertices have a quality lower(greater) than V is used as min (max) value.
The automated percentile cropping is very useful for automatically discarding outliers. -- |
-| \c Bool | Zero Simmetric | If true the min max range will be enlarged to be symmertic (so that green is always Zero) -- |
+| \c Bool | Zero Symmetric | If true the min max range will be enlarged to be symmertic (so that green is always Zero) -- |
\section f16 Saturate Vertex Quality
@@ -176,7 +176,7 @@ Saturate vertex quality, so that for each vertex the gradient of the quality is
The saturation is done in a conservative way (quality is always decreased and never increased)
Parameters
-| \c Float | Gradient Threshold | The maximum value admitted for the quality gradient (in absolute valu) -- |
+| \c Float | Gradient Threshold | The maximum value admitted for the quality gradient (in absolute value) -- |
| \c Bool | Update ColorMap | if true the color ramp is computed again -- |
@@ -188,7 +188,7 @@ Color vertices depending on their quality field (manually equalized).
| \c Float | Min | The value that will be mapped with the lower end of the scale (blue) -- |
| \c Float | Max | The value that will be mapped with the upper end of the scale (red) -- |
| \c DynamicFloat | Percentile Crop [0..100] | If not zero this value will be used for a percentile cropping of the quality values. If this parameter is set to P the value V for which P% of the vertices have a quality lower(greater) than V is used as min (max) value.
The automated percentile cropping is very useful for automatically discarding outliers. -- |
-| \c Bool | Zero Simmetric | If true the min max range will be enlarged to be symmertic (so that green is always Zero) -- |
+| \c Bool | Zero Symmetric | If true the min max range will be enlarged to be symmertic (so that green is always Zero) -- |
\section f18 Colorize by face Quality
@@ -199,7 +199,7 @@ Color faces depending on their quality field (manually equalized).
| \c Float | Min | The value that will be mapped with the lower end of the scale (blue) -- |
| \c Float | Max | The value that will be mapped with the upper end of the scale (red) -- |
| \c DynamicFloat | Percentile Crop [0..100] | If not zero this value will be used for a percentile cropping of the quality values. If this parameter is set to P the value V for which P% of the vertices have a quality lower(greater) than V is used as min (max) value.
The automated percentile cropping is very useful for automatically discarding outliers. -- |
-| \c Bool | Zero Simmetric | If true the min max range will be enlarged to be symmertic (so that green is always Zero) -- |
+| \c Bool | Zero Symmetric | If true the min max range will be enlarged to be symmertic (so that green is always Zero) -- |
\section f19 Discrete Curvatures
@@ -256,7 +256,7 @@ Colorize Faces randomly. If internal edges are present they are used
No parameters.
\section f27 Vertex Color Filling
-Fills the color of the vertexes of the mesh with a color choosed by the user.
+Fills the color of the vertexes of the mesh with a color chosen by the user.
Parameters
| \c DynamicFloat | Red: | Sets the red component of the color. -- |
@@ -416,71 +416,71 @@ Create a Cone
\section f47 Fractal Terrain
-Generates a fractal terrain perturbation with five different algorithms.
-Some good parameter values to start with are:
-
-
- |
- Seed |
- Octaves |
- Lacunarity |
- Fractal increment |
- Offset |
- Gain |
-
-
- | fBM |
- 1 |
- 10 |
- 2 |
- 1.2 |
- - |
- - |
-
-
- | Standard multifractal |
- 1 |
- 8 |
- 2 |
- 0.9 |
- 0.9 |
- - |
-
-
- | Heterogeneous multifractal |
- 1 |
- 8 |
- 3 |
- 0.9 |
- 0.4 |
- - |
-
-
- | Hybrid multifractal |
- 1 |
- 8 |
- 4 |
- 0.1 |
- 0.3 |
- - |
-
-
- | Ridged multifractal |
- 2 |
- 8 |
- 4 |
- 0.5 |
- 0.9 |
- 2 |
-
-
-
-Detailed algorithms descriptions can be found in:
-Ebert, D.S., Musgrave, F.K., Peachey, D., Perlin, K., and Worley, S.
-Texturing and Modeling: A Procedural Approach.
-Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2002.
-
-
+Generates a fractal terrain perturbation with five different algorithms.
+Some good parameter values to start with are:
+
+
+ |
+ Seed |
+ Octaves |
+ Lacunarity |
+ Fractal increment |
+ Offset |
+ Gain |
+
+
+ | fBM |
+ 1 |
+ 10 |
+ 2 |
+ 1.2 |
+ - |
+ - |
+
+
+ | Standard multifractal |
+ 1 |
+ 8 |
+ 2 |
+ 0.9 |
+ 0.9 |
+ - |
+
+
+ | Heterogeneous multifractal |
+ 1 |
+ 8 |
+ 3 |
+ 0.9 |
+ 0.4 |
+ - |
+
+
+ | Hybrid multifractal |
+ 1 |
+ 8 |
+ 4 |
+ 0.1 |
+ 0.3 |
+ - |
+
+
+ | Ridged multifractal |
+ 2 |
+ 8 |
+ 4 |
+ 0.5 |
+ 0.9 |
+ 2 |
+
+
+
+Detailed algorithms descriptions can be found in:
+Ebert, D.S., Musgrave, F.K., Peachey, D., Perlin, K., and Worley, S.
+Texturing and Modeling: A Procedural Approach.
+Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2002.
+
+
Parameters
@@ -500,71 +500,71 @@ Don't change the seed if you want to refine the current terrain morphology by ch
\section f48 Fractal Displacement
-Generates a fractal terrain perturbation with five different algorithms.
-Some good parameter values to start with are:
-
-
- |
- Seed |
- Octaves |
- Lacunarity |
- Fractal increment |
- Offset |
- Gain |
-
-
- | fBM |
- 1 |
- 10 |
- 2 |
- 1.2 |
- - |
- - |
-
-
- | Standard multifractal |
- 1 |
- 8 |
- 2 |
- 0.9 |
- 0.9 |
- - |
-
-
- | Heterogeneous multifractal |
- 1 |
- 8 |
- 3 |
- 0.9 |
- 0.4 |
- - |
-
-
- | Hybrid multifractal |
- 1 |
- 8 |
- 4 |
- 0.1 |
- 0.3 |
- - |
-
-
- | Ridged multifractal |
- 2 |
- 8 |
- 4 |
- 0.5 |
- 0.9 |
- 2 |
-
-
-
-Detailed algorithms descriptions can be found in:
-Ebert, D.S., Musgrave, F.K., Peachey, D., Perlin, K., and Worley, S.
-Texturing and Modeling: A Procedural Approach.
-Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2002.
-
-
+Generates a fractal terrain perturbation with five different algorithms.
+Some good parameter values to start with are:
+
+
+ |
+ Seed |
+ Octaves |
+ Lacunarity |
+ Fractal increment |
+ Offset |
+ Gain |
+
+
+ | fBM |
+ 1 |
+ 10 |
+ 2 |
+ 1.2 |
+ - |
+ - |
+
+
+ | Standard multifractal |
+ 1 |
+ 8 |
+ 2 |
+ 0.9 |
+ 0.9 |
+ - |
+
+
+ | Heterogeneous multifractal |
+ 1 |
+ 8 |
+ 3 |
+ 0.9 |
+ 0.4 |
+ - |
+
+
+ | Hybrid multifractal |
+ 1 |
+ 8 |
+ 4 |
+ 0.1 |
+ 0.3 |
+ - |
+
+
+ | Ridged multifractal |
+ 2 |
+ 8 |
+ 4 |
+ 0.5 |
+ 0.9 |
+ 2 |
+
+
+
+Detailed algorithms descriptions can be found in:
+Ebert, D.S., Musgrave, F.K., Peachey, D., Perlin, K., and Worley, S.
+Texturing and Modeling: A Procedural Approach.
+Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2002.
+
+
Hint: search a good compromise between offset and height factor parameter.
Parameters
@@ -584,18 +584,18 @@ Don't change the seed if you want to refine the current terrain morphology by ch
\section f49 Craters Generation
-Generates craters onto a mesh using radial functions.
-There must be at least two layers to apply this filter:
-
- - the layer that contains the target mesh; we assume that this mesh is sufficiently refined;
- - the layer that contains the samples which represent the central points of craters.
-
-
-There are three radial functions available to generate craters, two of which are Gaussian and Multiquadric,
-and the third is a variant of multiquadric. Blending functions are also provided to blend
-the crater elevation towards the mesh surface.
-If you want the preview to work, be sure to select the target mesh layer before launching the
-filter. You can select this layer by clicking on it in the layer dialog.
+Generates craters onto a mesh using radial functions.
+There must be at least two layers to apply this filter:
+
+ - the layer that contains the target mesh; we assume that this mesh is sufficiently refined;
+ - the layer that contains the samples which represent the central points of craters.
+
+
+There are three radial functions available to generate craters, two of which are Gaussian and Multiquadric,
+and the third is a variant of multiquadric. Blending functions are also provided to blend
+the crater elevation towards the mesh surface.
+If you want the preview to work, be sure to select the target mesh layer before launching the
+filter. You can select this layer by clicking on it in the layer dialog.
Parameters
@@ -619,7 +619,7 @@ filter. You can select this layer by clicking on it in the layer dialog.
\section f50 Conditional Vertex Selection
-Boolean function using muparser lib to perform vertex selection over current mesh.
It's possibile to use parenthesis, per-vertex variables and boolean operator:
(,),and,or,<>,=
It's possibile to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
+Boolean function using muparser lib to perform vertex selection over current mesh.
It's possible to use parenthesis, per-vertex variables and boolean operator:
(,),and,or,<>,=
It's possible to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
Parameters
| \c String | boolean function | type a boolean function that will be evaluated in order to select a subset of vertices example: (y > 0) and (ny > 0) -- |
@@ -628,7 +628,7 @@ Boolean function using muparser lib to perform vertex selection over current mes
\section f51 Conditional Face Selection
-Boolean function using muparser lib to perform faces selection over current mesh.
It's possibile to use parenthesis, per-vertex variables and boolean operator:
(,),and,or,<>,=
It's possibile to use per-face variables like attributes associated to the three vertex of every face.
x0,y0,z0 for first vertex; x1,y1,z1 for second vertex; x2,y2,z2 for third vertex.
and also nx0,ny0,nz0 nx1,ny1,nz1 etc. for normals and r0,g0,b0 for color,q0,q1,q2 for quality.
+Boolean function using muparser lib to perform faces selection over current mesh.
It's possible to use parenthesis, per-vertex variables and boolean operator:
(,),and,or,<>,=
It's possible to use per-face variables like attributes associated to the three vertex of every face.
x0,y0,z0 for first vertex; x1,y1,z1 for second vertex; x2,y2,z2 for third vertex.
and also nx0,ny0,nz0 nx1,ny1,nz1 etc. for normals and r0,g0,b0 for color,q0,q1,q2 for quality.
Parameters
| \c String | boolean function | type a boolean function that will be evaluated in order to select a subset of faces -- |
@@ -636,7 +636,7 @@ Boolean function using muparser lib to perform faces selection over current mesh
\section f52 Geometric Function
-Geometric function using muparser lib to generate new Coord
You can change x,y,z for every vertex according to the function specified.
It's possibile to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
+Geometric function using muparser lib to generate new Coord
You can change x,y,z for every vertex according to the function specified.
It's possible to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
Parameters
| \c String | func x = | insert function to generate new coord for x -- |
@@ -646,7 +646,7 @@ Geometric function using muparser lib to generate new Coord
You can change x,
\section f53 Per Face Color Function
-Color function using muparser lib to generate new RGB color for every face
Insert three function each one for red, green and blue channel respectively.
It's possibile to use per-face variables like attributes associated to the three vertex of every face.
x0,y0,z0 for first vertex; x1,y1,z1 for second vertex; x2,y2,z2 for third vertex.
and also nx0,ny0,nz0 nx1,ny1,nz1 etc. for normals and r0,g0,b0 for color,q0,q1,q2 for quality.
+Color function using muparser lib to generate new RGB color for every face
Insert three function each one for red, green and blue channel respectively.
It's possible to use per-face variables like attributes associated to the three vertex of every face.
x0,y0,z0 for first vertex; x1,y1,z1 for second vertex; x2,y2,z2 for third vertex.
and also nx0,ny0,nz0 nx1,ny1,nz1 etc. for normals and r0,g0,b0 for color,q0,q1,q2 for quality.
Parameters
| \c String | func r = | function to generate Red component. Expected Range 0-255 -- |
@@ -656,7 +656,7 @@ Color function using muparser lib to generate new RGB color for every face
In
\section f54 Per Vertex Color Function
-Color function using muparser lib to generate new RGB color for every vertex
Insert three function each one for red, green and blue channel respectively.
It's possibile to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
+Color function using muparser lib to generate new RGB color for every vertex
Insert three function each one for red, green and blue channel respectively.
It's possible to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
Parameters
| \c String | func r = | function to generate Red component. Expected Range 0-255 -- |
@@ -666,7 +666,7 @@ Color function using muparser lib to generate new RGB color for every vertex
\section f55 Per Vertex Quality Function
-Quality function using muparser to generate new Quality for every vertex
It's possibile to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
+Quality function using muparser to generate new Quality for every vertex
It's possible to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
Parameters
| \c String | func q = | function to generate new Quality for every vertex -- |
@@ -676,7 +676,7 @@ Quality function using muparser to generate new Quality for every vertex
It's
\section f56 Per Face Quality Function
-Quality function using muparser to generate new Quality for every face
Insert three function each one for quality of the three vertex of a face
It's possibile to use per-face variables like attributes associated to the three vertex of every face.
x0,y0,z0 for first vertex; x1,y1,z1 for second vertex; x2,y2,z2 for third vertex.
and also nx0,ny0,nz0 nx1,ny1,nz1 etc. for normals and r0,g0,b0 for color,q0,q1,q2 for quality.
+Quality function using muparser to generate new Quality for every face
Insert three function each one for quality of the three vertex of a face
It's possible to use per-face variables like attributes associated to the three vertex of every face.
x0,y0,z0 for first vertex; x1,y1,z1 for second vertex; x2,y2,z2 for third vertex.
and also nx0,ny0,nz0 nx1,ny1,nz1 etc. for normals and r0,g0,b0 for color,q0,q1,q2 for quality.
Parameters
| \c String | func q0 = | function to generate new Quality foreach face -- |
@@ -686,7 +686,7 @@ Quality function using muparser to generate new Quality for every face
Insert
\section f57 Define New Per Vertex Attribute
-Add a new Per-Vertex scalar attribute to current mesh and fill it with the defined function.
The name specified below can be used in other filter functionIt's possibile to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
+Add a new Per-Vertex scalar attribute to current mesh and fill it with the defined function.
The name specified below can be used in other filter functionIt's possible to use the following per-vertex variables in the expression:
x, y, z, nx, ny, nz (normal), r, g, b (color), q (quality), rad, vi,
and all custom vertex attributes already defined by user.
Parameters
| \c String | Name | the name of new attribute. you can access attribute in other filters through this name -- |
@@ -748,7 +748,7 @@ The filter build the abstract Isoparameterization of a two-manifold triangular m
| \c Int | Abstract Min Mesh Size | This number and the following one indicate the range face number of the abstract mesh that is used for the parametrization process. The algorithm will choose the best abstract mesh with the number of triangles within the specified interval. If the mesh has a very simple structure this range can be very low and strict;for a roughly spherical object if you can specify a range of [8,8] faces you get a octahedral abstract mesh, e.g. a geometry image. Large numbers (greater than 400) are usually not of practical use. -- |
| \c Int | Abstract Max Mesh Size | See above. -- |
| \c Enum | Optimization Criteria | Choose a metric to stop the parametrization within the interval 1: Best Heuristic : stop considering both isometry and number of faces of base domain 2: Area + Angle : stop at minimum area and angle distorsion 3: Regularity : stop at minimum number of irregular vertices 4: L2 : stop at minimum OneWay L2 Stretch Eff -- |
-| \c Int | Convergence Precision | This parameter controls the convergence speed/precision of the optimization of the texture coordinates. Larger the number slower the processing and ,eventually, slighly better results -- |
+| \c Int | Convergence Precision | This parameter controls the convergence speed/precision of the optimization of the texture coordinates. Larger the number slower the processing and, eventually, slightly better results -- |
| \c Bool | Double Step | Use this bool to divide the parameterization in 2 steps. Double step makes the overall process faster and robust, but it may increase the distorsion -- |
@@ -765,7 +765,7 @@ Remeshing based on an Abstract Isoparameterization, each triangle of the domain
The filter build a new mesh with a standard atlased per wedge texture. The atlas is simply done by splitting each triangle of the abstract domain
For more details see:
Pietroni, Tarini and Cignoni, 'Almost isometric mesh parameterization through abstract domains'
IEEE Transaction of Visualization and Computer Graphics 2010
Parameters
-| \c DynamicFloat | BorderSize ratio | This parameter controls the amount of space that must be left between each diamond when building the atlas.It directly affects how many triangle are splitted during this conversion. In abstract parametrization mesh triangles can naturally cross the triangles of the abstract domain, so when converting to a standard parametrization we must cut all the triangles that protrudes outside each diamond more than the specified threshold.The unit of the threshold is in percentage of the size of the diamond,The bigger the threshold the less triangles are splitted, but the more UV space is used (wasted). -- |
+| \c DynamicFloat | BorderSize ratio | This parameter controls the amount of space that must be left between each diamond when building the atlas.It directly affects how many triangle are split during this conversion. In abstract parametrization mesh triangles can naturally cross the triangles of the abstract domain, so when converting to a standard parametrization we must cut all the triangles that protrudes outside each diamond more than the specified threshold.The unit of the threshold is in percentage of the size of the diamond,The bigger the threshold the less triangles are split, but the more UV space is used (wasted). -- |
\section f65 Iso Parametrization Load Abstract Domain
@@ -881,7 +881,7 @@ Removes null faces (the one with area equal to zero)
No parameters.
\section f81 Select Faces with edges longer than...
-Select all triangles having an edge with lenght greater or equal than a given threshold
+Select all triangles having an edge with length greater or equal than a given threshold
Parameters
| \c DynamicFloat | Edge Threshold | All the faces with an edge longer than this threshold will be deleted. Useful for removing long skinny faces obtained by bad triangulation of range maps. -- |
@@ -944,7 +944,7 @@ If disabled edges are collapsed onto one of the two original vertices and the fi
\section f85 Subdivision Surfaces: Midpoint
-Apply a plain subdivision scheme where every edge is splitted on its midpoint
+Apply a plain subdivision scheme where every edge is split on its midpoint
Parameters
| \c Int | Iterations | Number of time the model is subdivided. -- |
@@ -978,8 +978,8 @@ Generate a matrix transformation that rotates the mesh. The mesh can be rotated
| \c Enum | Rotation on: | Choose a method -- |
| \c Enum | Center of rotation: | Choose a method -- |
-| \c DynamicFloat | Rotation Angle | Angle of rotation (in degree). If snapping is enable this vaule is rounded according to the snap value -- |
-| \c Bool | Snap angle | If selected, before starting the filter will remove anyy unreference vertex (for which curvature values are not defined) -- |
+| \c DynamicFloat | Rotation Angle | Angle of rotation (in degree). If snapping is enable this value is rounded according to the snap value -- |
+| \c Bool | Snap angle | If selected, before starting the filter will remove any unreference vertex (for which curvature values are not defined) -- |
| \c Point3f | Custom axis | This rotation axis is used only if the 'custom axis' option is chosen. -- |
| \c Point3f | Custom center | This rotation center is used only if the 'custom point' option is chosen. -- |
| \c Float | Snapping Value | This value is used to snap the rotation angle. -- |
@@ -1010,7 +1010,7 @@ Generate a matrix transformation that scale the mesh. The mesh can be also autom
| \c Bool | Uniform Scaling | If selected an uniform scaling (the same for all the three axis) is applied (the X axis value is used) -- |
| \c Enum | Center of rotation: | Choose a method -- |
| \c Point3f | Custom center | This rotation center is used only if the 'custom point' option is chosen. -- |
-| \c Bool | Scale to Unit bbox | If selected, the object is scaled to a box whose sides are at most 1 unit lenght -- |
+| \c Bool | Scale to Unit bbox | If selected, the object is scaled to a box whose sides are at most 1 unit length -- |
| \c Bool | Freeze Matrix | The transformation is explicitly applied and the vertex coords are actually changed -- |
@@ -1022,7 +1022,7 @@ Generate a matrix transformation that translate the mesh. The mesh can be transl
| \c DynamicFloat | X Axis | Absolute translation amount along the X axis -- |
| \c DynamicFloat | Y Axis | Absolute translation amount along the Y axis -- |
| \c DynamicFloat | Z Axis | Absolute translation amount along the Z axis -- |
-| \c Bool | translate center of bbox to the origin | If selected, the object is scaled to a box whose sides are at most 1 unit lenght -- |
+| \c Bool | translate center of bbox to the origin | If selected, the object is scaled to a box whose sides are at most 1 unit length -- |
| \c Bool | Freeze Matrix | The transformation is explicitly applied and the vertex coords are actually changed -- |
@@ -1036,7 +1036,7 @@ No parameters.
Compute the normals of the vertices of a mesh without exploiting the triangle connectivity, useful for dataset with no faces
Parameters
-| \c Int | Number of neigbors | The number of neighbors used to estimate and propagate normals. -- |
+| \c Int | Number of neighbors | The number of neighbors used to estimate and propagate normals. -- |
\section f95 Compute curvature principal directions
@@ -1045,7 +1045,7 @@ Compute the principal directions of curvature with several algorithms
Parameters
| \c Enum | Method: | Choose a method -- |
-| \c Bool | Remove Unreferenced Vertices | If selected, before starting the filter will remove anyy unreference vertex (for which curvature values are not defined) -- |
+| \c Bool | Remove Unreferenced Vertices | If selected, before starting the filter will remove any unreference vertex (for which curvature values are not defined) -- |
\section f96 Close Holes
@@ -1158,7 +1158,7 @@ It is relative to the radius (local point spacing) of the vertices. --
| \c Float | Projection - Accuracy (adv) | Threshold value used to stop the projections.
This value is scaled by the mean point spacing to get the actual threshold. -- |
| \c Int | Projection - Max iterations (adv) | Max number of iterations for the projection. -- |
-| \c Float | MLS - Spherical parameter | Control the curvature of the fitted spheres: 0 is equivalent to a pure plane fit,1 to a pure spherical fit, values between 0 and 1 gives intermediate results,while others real values might give interresting results, but take care with extremesettings ! -- |
+| \c Float | MLS - Spherical parameter | Control the curvature of the fitted spheres: 0 is equivalent to a pure plane fit,1 to a pure spherical fit, values between 0 and 1 gives intermediate results,while others real values might give interesting results, but take care with extremesettings ! -- |
| \c Bool | Accurate normals | If checked, use the accurate MLS gradient instead of the local approximationto compute the normals. -- |
| \c Int | Refinement - Max subdivisions | Max number of subdivisions. -- |
| \c Float | Refinement - Crease angle (degree) | Threshold angle between two faces controlling the refinement. -- |
@@ -1189,7 +1189,7 @@ It is relative to the radius (local point spacing) of the vertices. --
| \c Float | Projection - Accuracy (adv) | Threshold value used to stop the projections.
This value is scaled by the mean point spacing to get the actual threshold. -- |
| \c Int | Projection - Max iterations (adv) | Max number of iterations for the projection. -- |
-| \c Float | MLS - Spherical parameter | Control the curvature of the fitted spheres: 0 is equivalent to a pure plane fit,1 to a pure spherical fit, values between 0 and 1 gives intermediate results,while others real values might give interresting results, but take care with extremesettings ! -- |
+| \c Float | MLS - Spherical parameter | Control the curvature of the fitted spheres: 0 is equivalent to a pure plane fit,1 to a pure spherical fit, values between 0 and 1 gives intermediate results,while others real values might give interesting results, but take care with extremesettings ! -- |
| \c Bool | Accurate normals | If checked, use the accurate MLS gradient instead of the local approximationto compute the normals. -- |
| \c Int | Grid Resolution | The resolution of the grid on which we run the marching cubes.This marching cube is memory friendly, so you can safely set large values up to 1000 or even more. -- |
@@ -1221,7 +1221,7 @@ It is relative to the radius (local point spacing) of the vertices. --
| \c Float | Projection - Accuracy (adv) | Threshold value used to stop the projections.
This value is scaled by the mean point spacing to get the actual threshold. -- |
| \c Int | Projection - Max iterations (adv) | Max number of iterations for the projection. -- |
-| \c Float | MLS - Spherical parameter | Control the curvature of the fitted spheres: 0 is equivalent to a pure plane fit,1 to a pure spherical fit, values between 0 and 1 gives intermediate results,while others real values might give interresting results, but take care with extremesettings ! -- |
+| \c Float | MLS - Spherical parameter | Control the curvature of the fitted spheres: 0 is equivalent to a pure plane fit,1 to a pure spherical fit, values between 0 and 1 gives intermediate results,while others real values might give interesting results, but take care with extremesettings ! -- |
| \c Enum | Curvature type | The type of the curvature to plot. ApproxMean uses the radius of the fitted sphere as an approximation of the mean curvature. -- |
@@ -1259,7 +1259,7 @@ The surface reconstrction algorithm that have been used for a long time inside t
\section f115 Simplfication: MC Edge Collapse
-A simplification/cleaning algoritm tailored for meshes generated by Marching Cubes algorithm.
+A simplification/cleaning algorithm tailored for meshes generated by Marching Cubes algorithm.
Parameters
No parameters.
\section f116 Surface Reconstruction: Poisson
@@ -1315,7 +1315,7 @@ Calculate the Alpha Shape of the mesh(Edelsbrunner and P.Mucke 1994) with
\section f121 Select Visible Points
-Select the visible points in a point cloud, as viewed from a given viewpoint.
It uses the Qhull library (http://www.qhull.org/
The algorithm used (Katz, Tal and Basri 2007) determines visibility without reconstructing a surface or estimating normals.A point is considered visible if its transformed point lies on the convex hull of a trasformed points cloud from the original mesh points.
+Select the visible points in a point cloud, as viewed from a given viewpoint.
It uses the Qhull library (http://www.qhull.org/
The algorithm used (Katz, Tal and Basri 2007) determines visibility without reconstructing a surface or estimating normals.A point is considered visible if its transformed point lies on the convex hull of a transformed points cloud from the original mesh points.
Parameters
| \c DynamicFloat | radius threshold | Bounds the radius of the sphere used to select visible points.It is used to adjust the radius of the sphere (calculated as distance between the center and the farthest point from it) according to the following equation: radius = radius * pow(10,threshold); As the radius increases more points are marked as visible.Use a big threshold for dense point clouds, a small one for sparse clouds. -- |
@@ -1332,8 +1332,8 @@ Select the visible points in a point cloud, as viewed from a given viewpo
The filter maps quality levels into colors using a colorband built from a transfer function (may be loaded from an external file) and colorizes the mesh vertexes. The minimum, medium and maximum quality values can be set by user to obtain a custom quality range for mapping
Parameters
-| \c Float | Minimum mesh quality | The specified quality value is mapped in the lower end of the choosen color scale. Default value: the minumum quality value found on the mesh. -- |
-| \c Float | Maximum mesh quality | The specified quality value is mapped in the upper end of the choosen color scale. Default value: the maximum quality value found on the mesh. -- |
+| \c Float | Minimum mesh quality | The specified quality value is mapped in the lower end of the chosen color scale. Default value: the minimum quality value found on the mesh. -- |
+| \c Float | Maximum mesh quality | The specified quality value is mapped in the upper end of the chosen color scale. Default value: the maximum quality value found on the mesh. -- |
| \c Float | Gamma biasing (0..100) | Defines a gamma compression of the quality values, by setting the position of the middle of the color scale. Value is defined as a percentage (0..100). Default value is 50, that corresponds to a linear mapping. -- |
| \c Float | Mesh brightness | must be between 0 and 2. 0 represents a completely dark mesh, 1 represents a mesh colorized with original colors, 2 represents a completely bright mesh -- |
| \c Enum | Transfer Function type to apply to filter | Choose the Transfer Function to apply to the filter -- |
@@ -1342,7 +1342,7 @@ The filter maps quality levels into colors using a colorband built from a transf
\section f123 Mesh Element Subsampling
-Create a new layer populated with a point sampling of the current mesh, At most one sample for each element of the mesh is created. Samples are taking in a uniform way, one for each element (vertex/edge/face); all the elements have the same probabilty of being choosen.
+Create a new layer populated with a point sampling of the current mesh, At most one sample for each element of the mesh is created. Samples are taking in a uniform way, one for each element (vertex/edge/face); all the elements have the same probability of being chosen.
Parameters
| \c Enum | Element to sample: | Choose what mesh element has to be used for the subsampling. At most one point sample will be added for each one of the chosen elements -- |
@@ -1354,7 +1354,7 @@ Create a new layer populated with a point sampling of the current mesh, At most
Create a new layer populated with a point sampling of the current mesh; samples are generated in a randomly uniform way, or with a distribution biased by the per-vertex quality values of the mesh.
Parameters
-| \c Int | Number of samples | The desired number of samples. It can be smaller or larger than the mesh size, and according to the choosed sampling strategy it will try to adapt. -- |
+| \c Int | Number of samples | The desired number of samples. It can be smaller or larger than the mesh size, and according to the chosen sampling strategy it will try to adapt. -- |
| \c Bool | Quality Weighted Sampling | Use per vertex quality to drive the vertex sampling. The number of samples falling in each face is proportional to the face area multiplied by the average quality of the face vertices. -- |
| \c Bool | Exact Sample Num | If the required total number of samples is not a strict exact requirement we can exploit a different algorithmbased on the choice of the number of samples inside each triangle by a random Poisson-distributed number with mean equal to the expected number of samples times the area of the triangle over the surface of the whole mesh. -- |
@@ -1364,7 +1364,7 @@ Create a new layer populated with a point sampling of the current mesh; samples
Create a new layer populated with a point sampling of the current mesh; to generate multiple samples inside a triangle each triangle is subdivided according to various stratified strategies. Distribution is often biased by triangle shape.
Parameters
-| \c Int | Number of samples | The desired number of samples. It can be smaller or larger than the mesh size, and according to the choosed sampling strategy it will try to adapt. -- |
+| \c Int | Number of samples | The desired number of samples. It can be smaller or larger than the mesh size, and according to the chosen sampling strategy it will try to adapt. -- |
| \c Enum | Element to sample: | Similar Triangle: each triangle is subdivided into similar triangles and the internal vertices of these triangles are considered. This sampling leave space around edges and vertices for separate sampling of these entities. Dual Similar Triangle: each triangle is subdivided into similar triangles and the internal vertices of these triangles are considered. Long Edge Subdiv each triangle is recursively subdivided along the longest edge. Sample Edges Only the edges of the mesh are uniformly sampled. Sample NonFaux Edges Only the non-faux edges of the mesh are uniformly sampled. -- |
| \c Bool | Random Sampling | if true, for each (virtual) face we draw a random point, otherwise we pick the face midpoint. -- |
@@ -1375,7 +1375,7 @@ Create a new layer populated with a subsampling of the vertexes of the current
Parameters
| \c AbsPerc | Cell Size | The size of the cell of the clustering grid. Smaller the cell finer the resulting mesh. For obtaining a very coarse mesh use larger values. -- |
-| \c Enum | Representative Strataegy: | Average: for each cell we take the average of the sample falling into. The resulting point is a new point. Closes to center: for each cell we take the sample that is closest to the center of the cell. Choosen vertices are a subset of the original ones. -- |
+| \c Enum | Representative Strataegy: | Average: for each cell we take the average of the sample falling into. The resulting point is a new point. Closes to center: for each cell we take the sample that is closest to the center of the cell. Chosen vertices are a subset of the original ones. -- |
| \c Bool | Selected | If true only for the filter is applied only on the selected subset of the mesh. -- |
@@ -1386,7 +1386,7 @@ Create a new layer populated with a point sampling of the current mesh; samples
| \c Int | Number of samples | The desired number of samples. The ray of the disk is calculated according to the sampling density. -- |
| \c AbsPerc | Explicit Radius | If not zero this parameter override the previous parameter to allow exact radius specification -- |
-| \c Int | MonterCarlo OverSampling | The over-sampling rate that is used to generate the intial Montecarlo samples (e.g. if this parameter is K means thatK x poisson sample points will be used). The generated Poisson-disk samples are a subset of these initial Montecarlo samples. Larger this number slows the process but make it a bit more accurate. -- |
+| \c Int | MonterCarlo OverSampling | The over-sampling rate that is used to generate the initial Montecarlo samples (e.g. if this parameter is K means thatK x poisson sample points will be used). The generated Poisson-disk samples are a subset of these initial Montecarlo samples. Larger this number slows the process but make it a bit more accurate. -- |
| \c Bool | Base Mesh Subsampling | If true the original vertices of the base mesh are used as base set of points. In this case the SampleNum should be obviously much smaller than the original vertex number. Note that this option is very useful in the case you want to subsample a dense point cloud. -- |
| \c Bool | Refine Existing Samples | If true the vertices of the below mesh are used as starting vertices, and they will utterly refined by adding more and more points until possible. -- |
| \c Mesh | Samples to be refined | Used only if the above option is checked. -- |
@@ -1400,7 +1400,7 @@ Create a new layer populated with a point sampling of the current mesh; samples
| \c Int | Number of samples | The desired number of samples. The ray of the disk is calculated according to the sampling density. -- |
| \c AbsPerc | Explicit Radius | If not zero this parameter override the previous parameter to allow exact radius specification -- |
| \c Float | Radius Variance | The radius of the disk is allowed to vary between r/var and r*var. If this parameter is 1 the sampling is the same of the Poisson Disk Sampling -- |
-| \c Int | MonterCarlo OverSampling | The over-sampling rate that is used to generate the intial Montecarlo samples (e.g. if this parameter is x means that x * poisson sample points will be used). The generated Poisson-disk samples are a subset of these initial Montecarlo samples. Larger this number slows the process but make it a bit more accurate. -- |
+| \c Int | MonterCarlo OverSampling | The over-sampling rate that is used to generate the initial Montecarlo samples (e.g. if this parameter is x means that x * poisson sample points will be used). The generated Poisson-disk samples are a subset of these initial Montecarlo samples. Larger this number slows the process but make it a bit more accurate. -- |
| \c Bool | Base Mesh Subsampling | If true the original vertices of the base mesh are used as base set of points. In this case the SampleNum should be obviously much smaller than the original vertex number. -- |
@@ -1416,8 +1416,8 @@ Compute the Hausdorff Distance between two meshes, sampling one of the two and f
| \c Bool | Sample Edges | See the above comment. -- |
| \c Bool | Sample FauxEdge | See the above comment. -- |
| \c Bool | Sample Faces | See the above comment. -- |
-| \c Int | Number of samples | The desired number of samples. It can be smaller or larger than the mesh size, and according to the choosed sampling strategy it will try to adapt. -- |
-| \c AbsPerc | Max Distance | Sample points for which we do not find anything whithin this distance are rejected and not considered neither for averaging nor for max. -- |
+| \c Int | Number of samples | The desired number of samples. It can be smaller or larger than the mesh size, and according to the chosen sampling strategy it will try to adapt. -- |
+| \c AbsPerc | Max Distance | Sample points for which we do not find anything within this distance are rejected and not considered neither for averaging nor for max. -- |
\section f130 Texel Sampling
@@ -1426,7 +1426,7 @@ Create a new layer with a point sampling of the current mesh, a sample for each
Parameters
| \c Int | Texture Width | A sample for each texel is generated, so the desired texture size is need, only samples for the texels falling inside some faces are generated.
- Setting this param to 256 means that you get at most 256x256 = 65536 samples). If this parameter is 0 the size of the current texture is choosen. -- |
+ Setting this param to 256 means that you get at most 256x256 = 65536 samples).
If this parameter is 0 the size of the current texture is chosen. --
| \c Int | Texture Height | A sample for each texel is generated, so the desired texture size is need, only samples for the texels falling inside some faces are generated.
Setting this param to 256 means that you get at most 256x256 = 65536 samples) -- |
| \c Bool | UV Space Sampling | The generated texel samples have their UV coords as point positions. The resulting point set is has a square domain, the texels/points, even if on a flat domain retain the original vertex normal to help a better perception of the original provenience. -- |
@@ -1435,7 +1435,7 @@ Create a new layer with a point sampling of the current mesh, a sample for each
\section f131 Vertex Attribute Transfer
-Transfer the choosen per-vertex attributes from one mesh to another. Useful to transfer attributes to different representations of a same object.
For each vertex of the target mesh the closest point (not vertex!) on the source mesh is computed, and the requested interpolated attributes from that source point are copied into the target vertex.
The algorithm assumes that the two meshes are reasonably similar and aligned.
+Transfer the chosen per-vertex attributes from one mesh to another. Useful to transfer attributes to different representations of a same object.
For each vertex of the target mesh the closest point (not vertex!) on the source mesh is computed, and the requested interpolated attributes from that source point are copied into the target vertex.
The algorithm assumes that the two meshes are reasonably similar and aligned.
Parameters
| \c Mesh | Source Mesh | The mesh that contains the source data that we want to transfer. -- |
@@ -1445,7 +1445,7 @@ Transfer the choosen per-vertex attributes from one mesh to another. Useful to t
| \c Bool | Transfer Color | if enabled, the color of each vertex of the target mesh will become the color of the corresponding closest point on the source mesh -- |
| \c Bool | Transfer quality | if enabled, the quality of each vertex of the target mesh will become the quality of the corresponding closest point on the source mesh -- |
| \c Bool | Store dist. as quality | if enabled, we store the distance of the transferred value as in the vertex quality -- |
-| \c AbsPerc | Max Dist Search | Sample points for which we do not find anything whithin this distance are rejected and not considered for recovering attributes. -- |
+| \c AbsPerc | Max Dist Search | Sample points for which we do not find anything within this distance are rejected and not considered for recovering attributes. -- |
\section f132 Uniform Mesh Resampling
@@ -1458,7 +1458,7 @@ Create a new mesh that is a resampled version of the current one.
The resampl
| \c Bool | Clean Vertices | If true the mesh generated by MC will be cleaned by unifying vertices that are almost coincident -- |
| \c Bool | Discretize | If true the position of the intersected edge of the marching cube grid is not computed by linear interpolation, but it is placed in fixed middle position. As a consequence the resampled object will look severely aliased by a stairstep appearance. Useful only for simulating the output of 3D printing devices. -- |
| \c Bool | Multisample | If true the distance field is more accurately compute by multisampling the volume (7 sample for each voxel). Much slower but less artifacts. -- |
-| \c Bool | Absolute Distance | If true a not signed distance field is computed. In this case you have to choose a not zero Offset and a double surface is built around the original surface, inside and outside. Is useful to convrt thin floating surfaces into solid, thick meshes.. t -- |
+| \c Bool | Absolute Distance | If true a not signed distance field is computed. In this case you have to choose a not zero Offset and a double surface is built around the original surface, inside and outside. Is useful to convert thin floating surfaces into solid, thick meshes.. t -- |
\section f133 Voronoi Vertex Clustering
@@ -1494,7 +1494,7 @@ Given a Mesh M and a Pointset P, The filter project each vertex of
\section f136 Regular Recursive Sampling
-The bbox is recrusively partitioned in a octree style, center of bbox are considered, when the center is nearer to the surface than a given thr it is projected on it. It works also for building ofsetted samples.
+The bbox is recursively partitioned in a octree style, center of bbox are considered, when the center is nearer to the surface than a given thr it is projected on it. It works also for building offsetted samples.
Parameters
| \c AbsPerc | Precision | Size of the cell, the default is 1/50 of the box diag. Smaller cells give better precision at a higher computational cost. Remember that halving the cell size means that you build a volume 8 times larger. -- |
@@ -1672,7 +1672,7 @@ Structure Synth mesh creation based on Eisen Script.
| \c String | Eisen Script grammar | Write a grammar according to Eisen Script specification and using the primitives box, sphere, mesh, dot and triangle -- |
| \c Int | seed for random construction | Seed needed to build the mesh -- |
-| \c Int | set maximum resolution of sphere primitves, it must be included between 1 and 4 | increasing the resolution of the spheres will improve the quality of the mesh -- |
+| \c Int | set maximum resolution of sphere primitives, it must be included between 1 and 4 | increasing the resolution of the spheres will improve the quality of the mesh -- |
\section f160 UV to Color
@@ -1729,7 +1729,7 @@ Transfer texture/vertex color from one mesh to another's texture.
| \c Mesh | Source Mesh | The mesh that contains the source data that we want to transfer -- |
| \c Mesh | Target Mesh | The mesh whose texture will be filled according to source mesh texture or vertex color -- |
| \c Enum | Color Data Source | Choose to transfer color information from source mesh texture or vertex color -- |
-| \c AbsPerc | Max Dist Search | Sample points for which we do not find anything whithin this distance are rejected and not considered for recovering data -- |
+| \c AbsPerc | Max Dist Search | Sample points for which we do not find anything within this distance are rejected and not considered for recovering data -- |
| \c String | Texture file | The texture file to be created -- |
| \c Int | Texture width (px) | The texture width -- |
| \c Int | Texture height (px) | The texture height -- |
@@ -1744,7 +1744,7 @@ Generates Vertex Color values picking color from another mesh texture.
| \c Mesh | Source Mesh | The mesh with associated texture that we want to sample from -- |
| \c Mesh | Target Mesh | The mesh whose vertex color will be filled according to source mesh texture -- |
-| \c AbsPerc | Max Dist Search | Sample points for which we do not find anything whithin this distance are rejected and not considered for recovering color -- |
+| \c AbsPerc | Max Dist Search | Sample points for which we do not find anything within this distance are rejected and not considered for recovering color -- |
\section f167 Planar flipping optimization
@@ -1813,7 +1813,7 @@ Scale Dependent Laplacian Smoothing, extended version of Laplacian Smoothing, ba
\section f174 TwoStep Smooth
-Two Step Smoothing, a feature preserving/enhancing fairing filter. It is based on a Normal Smoothing step where similar normals are averaged toghether and a step where the vertexes are fitted on the new normals
+Two Step Smoothing, a feature preserving/enhancing fairing filter. It is based on a Normal Smoothing step where similar normals are averaged together and a step where the vertexes are fitted on the new normals
Parameters
| \c Int | Smoothing steps | The number of times that the whole algorithm (normal smoothing + vertex fitting) is iterated. -- |
@@ -1932,12 +1932,12 @@ Recompute face normals as the normal of the average of the normals of the triang
No parameters.
\section f189 Normalize Face Normals
-Normalize Face Normal Lenghts
+Normalize Face Normal Lengths
Parameters
No parameters.
\section f190 Normalize Vertex Normals
-Normalize Vertex Normal Lenghts
+Normalize Vertex Normal Lengths
Parameters
No parameters.
\section f191 Vertex Linear Morphing
diff --git a/distrib/LICENSE.txt b/resources/LICENSE.txt
similarity index 100%
rename from distrib/LICENSE.txt
rename to resources/LICENSE.txt
diff --git a/resources/README.md b/resources/README.md
new file mode 100644
index 000000000..8b30715fe
--- /dev/null
+++ b/resources/README.md
@@ -0,0 +1,10 @@
+# MeshLab resources
+
+The `resources` folder contains a set of files, binaries and shaders that MeshLab needs to be correctly built, deployed and packaged.
+
+Examples of contained files:
+ - icons;
+ - deployment software binaries;
+ - configuration files for packaging;
+ - shaders;
+ - license, privacy and readme files that are bundled in the final MeshLab packages.
\ No newline at end of file
diff --git a/resources/icons/eye_cropped.png b/resources/icons/eye_cropped.png
new file mode 100644
index 000000000..86c32af84
Binary files /dev/null and b/resources/icons/eye_cropped.png differ
diff --git a/resources/icons/meshlab.icns b/resources/icons/meshlab.icns
new file mode 100644
index 000000000..395517331
Binary files /dev/null and b/resources/icons/meshlab.icns differ
diff --git a/resources/icons/meshlab.ico b/resources/icons/meshlab.ico
new file mode 100644
index 000000000..5f6e6866e
Binary files /dev/null and b/resources/icons/meshlab.ico differ
diff --git a/resources/icons/meshlab.png b/resources/icons/meshlab.png
new file mode 100644
index 000000000..717a4e670
Binary files /dev/null and b/resources/icons/meshlab.png differ
diff --git a/resources/icons/meshlab100.png b/resources/icons/meshlab100.png
new file mode 100644
index 000000000..f3d692466
Binary files /dev/null and b/resources/icons/meshlab100.png differ
diff --git a/resources/icons/meshlab16.png b/resources/icons/meshlab16.png
new file mode 100644
index 000000000..7a063f194
Binary files /dev/null and b/resources/icons/meshlab16.png differ
diff --git a/resources/icons/meshlab200.png b/resources/icons/meshlab200.png
new file mode 100644
index 000000000..411f27cd7
Binary files /dev/null and b/resources/icons/meshlab200.png differ
diff --git a/resources/icons/meshlab22.png b/resources/icons/meshlab22.png
new file mode 100644
index 000000000..055fcbbda
Binary files /dev/null and b/resources/icons/meshlab22.png differ
diff --git a/resources/icons/meshlab24.png b/resources/icons/meshlab24.png
new file mode 100644
index 000000000..6bc65bb05
Binary files /dev/null and b/resources/icons/meshlab24.png differ
diff --git a/resources/icons/meshlab256.png b/resources/icons/meshlab256.png
new file mode 100644
index 000000000..76b593fb1
Binary files /dev/null and b/resources/icons/meshlab256.png differ
diff --git a/resources/icons/meshlab32.png b/resources/icons/meshlab32.png
new file mode 100644
index 000000000..c60e0d2c0
Binary files /dev/null and b/resources/icons/meshlab32.png differ
diff --git a/resources/icons/meshlab44.png b/resources/icons/meshlab44.png
new file mode 100644
index 000000000..575560b58
Binary files /dev/null and b/resources/icons/meshlab44.png differ
diff --git a/resources/icons/meshlab48.png b/resources/icons/meshlab48.png
new file mode 100644
index 000000000..2dea6465c
Binary files /dev/null and b/resources/icons/meshlab48.png differ
diff --git a/resources/icons/meshlab50.png b/resources/icons/meshlab50.png
new file mode 100644
index 000000000..9f3a13a47
Binary files /dev/null and b/resources/icons/meshlab50.png differ
diff --git a/resources/icons/meshlab512.png b/resources/icons/meshlab512.png
new file mode 100644
index 000000000..d6b23b44e
Binary files /dev/null and b/resources/icons/meshlab512.png differ
diff --git a/resources/icons/meshlab63.png b/resources/icons/meshlab63.png
new file mode 100644
index 000000000..759bc78f5
Binary files /dev/null and b/resources/icons/meshlab63.png differ
diff --git a/resources/icons/meshlab64.png b/resources/icons/meshlab64.png
new file mode 100644
index 000000000..f3f2ac07c
Binary files /dev/null and b/resources/icons/meshlab64.png differ
diff --git a/resources/icons/meshlab75.png b/resources/icons/meshlab75.png
new file mode 100644
index 000000000..272e379a6
Binary files /dev/null and b/resources/icons/meshlab75.png differ
diff --git a/resources/icons/meshlab8.png b/resources/icons/meshlab8.png
new file mode 100644
index 000000000..c2bc18d24
Binary files /dev/null and b/resources/icons/meshlab8.png differ
diff --git a/resources/icons/meshlab96.png b/resources/icons/meshlab96.png
new file mode 100644
index 000000000..9e74dee0e
Binary files /dev/null and b/resources/icons/meshlab96.png differ
diff --git a/resources/linux/linuxdeploy b/resources/linux/linuxdeploy
new file mode 100755
index 000000000..718019250
Binary files /dev/null and b/resources/linux/linuxdeploy differ
diff --git a/resources/linux/linuxdeploy-plugin-appimage b/resources/linux/linuxdeploy-plugin-appimage
new file mode 100755
index 000000000..3ff825d6a
Binary files /dev/null and b/resources/linux/linuxdeploy-plugin-appimage differ
diff --git a/scripts/Linux/resources/linuxdeployqt b/resources/linux/linuxdeploy-plugin-qt
similarity index 59%
rename from scripts/Linux/resources/linuxdeployqt
rename to resources/linux/linuxdeploy-plugin-qt
index 917645b94..e66624fc0 100755
Binary files a/scripts/Linux/resources/linuxdeployqt and b/resources/linux/linuxdeploy-plugin-qt differ
diff --git a/scripts/Linux/resources/meshlab.desktop b/resources/linux/meshlab.desktop
similarity index 86%
rename from scripts/Linux/resources/meshlab.desktop
rename to resources/linux/meshlab.desktop
index 44b5a09d7..426e820b8 100644
--- a/scripts/Linux/resources/meshlab.desktop
+++ b/resources/linux/meshlab.desktop
@@ -1,13 +1,12 @@
[Desktop Entry]
Version=1.0
-Name=MeshLab
-Name[en_GB]=MeshLab
-GenericName=Mesh processing
-GenericName[en_GB]=Mesh processing
-Comment=View and process meshes
Type=Application
+Name=MeshLab
+GenericName=Mesh processing
+Comment=View and process meshes
Exec=meshlab %F
-Icon=/usr/share/pixmaps/meshlab.png
+Icon=meshlab
Terminal=false
MimeType=model/mesh;application/x-3ds;image/x-3ds;model/x-ply;application/sla;model/x-quad-object;model/x-geomview-off;application/x-cyclone-ptx;application/x-vmi;application/x-bre;model/vnd.collada+xml;model/openctm;application/x-expe-binary;application/x-expe-ascii;application/x-xyz;application/x-gts;chemical/x-pdb;application/x-tri;application/x-asc;model/x3d+xml;model/x3d+vrml;model/vrml;model/u3d;model/idtf;
Categories=Graphics;3DGraphics;Viewer;Qt;
+Name[en_US]=MeshLab
diff --git a/scripts/macOS/resources/dmg-background.svg b/resources/macos/dmg-background.svg
similarity index 100%
rename from scripts/macOS/resources/dmg-background.svg
rename to resources/macos/dmg-background.svg
diff --git a/scripts/macOS/resources/meshlab_dmg_background.png b/resources/macos/meshlab_dmg_background.png
similarity index 100%
rename from scripts/macOS/resources/meshlab_dmg_background.png
rename to resources/macos/meshlab_dmg_background.png
diff --git a/scripts/macOS/resources/meshlab_dmg_background@2x.png b/resources/macos/meshlab_dmg_background@2x.png
similarity index 100%
rename from scripts/macOS/resources/meshlab_dmg_background@2x.png
rename to resources/macos/meshlab_dmg_background@2x.png
diff --git a/scripts/macOS/resources/meshlab_dmg_latest.json b/resources/macos/meshlab_dmg_latest.json
similarity index 54%
rename from scripts/macOS/resources/meshlab_dmg_latest.json
rename to resources/macos/meshlab_dmg_latest.json
index bf15e06a2..996163d97 100644
--- a/scripts/macOS/resources/meshlab_dmg_latest.json
+++ b/resources/macos/meshlab_dmg_latest.json
@@ -1,12 +1,12 @@
{
"title": "MeshLab",
- "icon": "SOURCE_PATH/meshlab/images/meshlab.icns",
+ "icon": "RESOURCES_PATH/icons/meshlab.icns",
"background": "meshlab_dmg_background.png",
"window" : { "size" : { "width" : 500, "height" : 400 } },
"contents": [
- { "x": 112, "y": 100, "type": "file", "path": "DISTRIB_PATH/meshlab.app" },
+ { "x": 112, "y": 100, "type": "file", "path": "DISTRIB_PATH/MeshLabML_VERSION.app" },
{ "x": 385, "y": 100, "type": "link", "path": "/Applications" },
- { "x": 250, "y": 280, "type": "file", "path": "LICENSE.txt" },
- { "x": 385, "y": 280, "type": "file", "path": "readme.txt" }
+ { "x": 250, "y": 280, "type": "file", "path": "RESOURCES_PATH/LICENSE.txt" },
+ { "x": 385, "y": 280, "type": "file", "path": "RESOURCES_PATH/readme.txt" }
]
}
diff --git a/distrib/privacy.txt b/resources/privacy.txt
similarity index 56%
rename from distrib/privacy.txt
rename to resources/privacy.txt
index 57b1204d9..5c76e07f2 100644
--- a/distrib/privacy.txt
+++ b/resources/privacy.txt
@@ -2,8 +2,8 @@
Privacy Disclaimer
Please read it carefully.
-MeshLab will automatically check for the availability of updated versions and will notify the need of upgrading the software to the users. For this reason, from time to time, MeshLab will issue a http network connection. If you prefer that MeshLab does not communicate in any way with its developers, simply use a plain firewall and prevent any MeshLab access to the network. This will not limit in any way the normal behaviour of MeshLab. When using MeshLab some aggregated statistical data about only the specific usage of MeshLab are collected: the number and size of the opened/saved meshes; nothing more. Periodically this information is sent back to the developers. This data will be used for statistical analysis only.
-Paranoids can also look at the sources for seeing what is transmitted.
+MeshLab will automatically check for the availability of updated versions and will notify the need of upgrading the software to the users. For this reason, from time to time, MeshLab will issue a http network connection. If you prefer that MeshLab does not communicate in any way with its developers, simply use a plain firewall and prevent any MeshLab access to the network, or disable the update check in the system preferences. This will not limit in any way the normal behaviour of MeshLab apart from getting notified when new releases are distributed.
+Important: when using MeshLab the following aggregated statistical data are collected: the number of opened meshes, the number of saved meshes, and the total sum of the number of vertices opened by the user. This statistically aggregated information (three integers) is sent back to the developer when checking for updates. Disabling the check for updates also disable this data collection.
We would like to remark that the kind of aggregated information collected by MeshLab is probably by far less sensitive than the information that is silently collected by most web sites when you surf them: ip address, visited pages, frequency of return. We would also like to stress that we really need this information in order to assess how diffusely MeshLab is used and what is its impact on the 3D community.
diff --git a/scripts/macOS/resources/readme.txt b/resources/readme.txt
similarity index 87%
rename from scripts/macOS/resources/readme.txt
rename to resources/readme.txt
index 75a236787..2bc4b75d7 100644
--- a/scripts/macOS/resources/readme.txt
+++ b/resources/readme.txt
@@ -2,13 +2,13 @@
http://www.meshlab.net
All rights reserved.
- VCGLib http://www.vcglib.net o o
+ VCGLib http://www.vcglib.net o o
Visual and Computer Graphics Library o o
_ O _
Paolo Cignoni \/)\/
Visual Computing Lab http://vcg.isti.cnr.it /\/|
ISTI - Italian National Research Council |
- Copyright(C) 2005-2018 \
+ Copyright(C) 2005-2022 \
This program is free software; you can redistribute it and/or modify it
@@ -22,9 +22,9 @@ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
--- Windows Note ---
-If you are running MeshLab portable and you are getting the error “MSVCP140.dll not found”
-or related, please install Visual C++ Redist by executing the vc_redist.exe file contained
-in the meshlab portable archive.
+If you are running MeshLab portable and you are getting the error “MSVCP140.dll not found”
+or related, please install Visual C++ Redist by executing the vc_redist.exe file contained
+in the meshlab portable archive.
--- References ----
@@ -32,7 +32,7 @@ Please, when using this tool, cite the following reference:
Meshlab: an open-source mesh processing tool.
P. Cignoni, M. Callieri, M. Corsini, M. Dellepiane, F. Ganovelli, G. Ranzuglia
-Proceedings of the 2008 Eurographics Italian Chapter Conference,
+Proceedings of the 2008 Eurographics Italian Chapter Conference,
ISBN: 978-3-905673-68-5, pp. 129-136, DOI: 10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136
@inproceedings {LocalChapterEvents:ItalChap:ItalianChapConf2008:129-136,
@@ -46,11 +46,11 @@ ISBN = {978-3-905673-68-5},
DOI = {10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136}
}
-Paolo Cignoni (p.cignoni (at) isti.cnr.it)
-Guido Ranzuglia (g.ranzuglia (at) isti.cnr.it)
+Paolo Cignoni (paolo.cignoni (at) isti.cnr.it)
+Alessandro Muntoni (alessandro.muntoni (at) isti.cnr.it)
For documented and repeatable bugs, reasonable feature requests and grounded issues, please use the GitHub services
https://github.com/cnr-isti-vclab/meshlab/issues
-For general questions use StackOverflow
+For general questions use StackOverflow
http://stackoverflow.com/questions/tagged/meshlab
diff --git a/distrib/shaders/3Dlabs-license.txt b/resources/shaders/3Dlabs-license.txt
similarity index 100%
rename from distrib/shaders/3Dlabs-license.txt
rename to resources/shaders/3Dlabs-license.txt
diff --git a/distrib/shaders/Cook-Torrance.frag b/resources/shaders/Cook-Torrance.frag
similarity index 97%
rename from distrib/shaders/Cook-Torrance.frag
rename to resources/shaders/Cook-Torrance.frag
index 82c5a42da..2c0fbd929 100644
--- a/distrib/shaders/Cook-Torrance.frag
+++ b/resources/shaders/Cook-Torrance.frag
@@ -40,7 +40,7 @@ uniform float ni;
void main()
{
- // the material propertise are embedded in the shader (for now)
+ // the material properties are embedded in the shader (for now)
vec4 mat_ambient = vec4(1.0, 1.0, 1.0, 1.0);
vec4 mat_diffuse = gl_Color;//vec4(1.0, 1.0, 1.0, 1.0);
vec4 mat_specular= vec4(1.0, 1.0, 1.0, 1.0);
diff --git a/distrib/shaders/Cook-Torrance.gdp b/resources/shaders/Cook-Torrance.gdp
similarity index 100%
rename from distrib/shaders/Cook-Torrance.gdp
rename to resources/shaders/Cook-Torrance.gdp
diff --git a/distrib/shaders/Cook-Torrance.vert b/resources/shaders/Cook-Torrance.vert
similarity index 100%
rename from distrib/shaders/Cook-Torrance.vert
rename to resources/shaders/Cook-Torrance.vert
diff --git a/distrib/shaders/Hatch.frag b/resources/shaders/Hatch.frag
similarity index 100%
rename from distrib/shaders/Hatch.frag
rename to resources/shaders/Hatch.frag
diff --git a/distrib/shaders/Hatch.gdp b/resources/shaders/Hatch.gdp
similarity index 100%
rename from distrib/shaders/Hatch.gdp
rename to resources/shaders/Hatch.gdp
diff --git a/distrib/shaders/Hatch.vert b/resources/shaders/Hatch.vert
similarity index 100%
rename from distrib/shaders/Hatch.vert
rename to resources/shaders/Hatch.vert
diff --git a/distrib/shaders/LightworkDesign-license.txt b/resources/shaders/LightworkDesign-license.txt
similarity index 100%
rename from distrib/shaders/LightworkDesign-license.txt
rename to resources/shaders/LightworkDesign-license.txt
diff --git a/distrib/shaders/Oren-Nayar.frag b/resources/shaders/Oren-Nayar.frag
similarity index 100%
rename from distrib/shaders/Oren-Nayar.frag
rename to resources/shaders/Oren-Nayar.frag
diff --git a/distrib/shaders/Oren-Nayar.gdp b/resources/shaders/Oren-Nayar.gdp
similarity index 100%
rename from distrib/shaders/Oren-Nayar.gdp
rename to resources/shaders/Oren-Nayar.gdp
diff --git a/distrib/shaders/Oren-Nayar.vert b/resources/shaders/Oren-Nayar.vert
similarity index 100%
rename from distrib/shaders/Oren-Nayar.vert
rename to resources/shaders/Oren-Nayar.vert
diff --git a/distrib/shaders/SEM.frag b/resources/shaders/SEM.frag
similarity index 100%
rename from distrib/shaders/SEM.frag
rename to resources/shaders/SEM.frag
diff --git a/distrib/shaders/SEM.vert b/resources/shaders/SEM.vert
similarity index 100%
rename from distrib/shaders/SEM.vert
rename to resources/shaders/SEM.vert
diff --git a/distrib/shaders/ambient_occlusion.vert b/resources/shaders/ambient_occlusion.vert
similarity index 100%
rename from distrib/shaders/ambient_occlusion.vert
rename to resources/shaders/ambient_occlusion.vert
diff --git a/distrib/shaders/ambient_occlusion4.frag b/resources/shaders/ambient_occlusion4.frag
similarity index 100%
rename from distrib/shaders/ambient_occlusion4.frag
rename to resources/shaders/ambient_occlusion4.frag
diff --git a/distrib/shaders/ambient_occlusion8.frag b/resources/shaders/ambient_occlusion8.frag
similarity index 100%
rename from distrib/shaders/ambient_occlusion8.frag
rename to resources/shaders/ambient_occlusion8.frag
diff --git a/distrib/shaders/decorate_shadow/sm/depth.frag b/resources/shaders/decorate_shadow/sm/depth.frag
similarity index 100%
rename from distrib/shaders/decorate_shadow/sm/depth.frag
rename to resources/shaders/decorate_shadow/sm/depth.frag
diff --git a/distrib/shaders/decorate_shadow/sm/depth.vert b/resources/shaders/decorate_shadow/sm/depth.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/sm/depth.vert
rename to resources/shaders/decorate_shadow/sm/depth.vert
diff --git a/distrib/shaders/decorate_shadow/sm/object.frag b/resources/shaders/decorate_shadow/sm/object.frag
similarity index 100%
rename from distrib/shaders/decorate_shadow/sm/object.frag
rename to resources/shaders/decorate_shadow/sm/object.frag
diff --git a/distrib/shaders/decorate_shadow/sm/object.vert b/resources/shaders/decorate_shadow/sm/object.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/sm/object.vert
rename to resources/shaders/decorate_shadow/sm/object.vert
diff --git a/distrib/shaders/decorate_shadow/ssao/blur.frag b/resources/shaders/decorate_shadow/ssao/blur.frag
similarity index 100%
rename from distrib/shaders/decorate_shadow/ssao/blur.frag
rename to resources/shaders/decorate_shadow/ssao/blur.frag
diff --git a/distrib/shaders/decorate_shadow/ssao/blur.vert b/resources/shaders/decorate_shadow/ssao/blur.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/ssao/blur.vert
rename to resources/shaders/decorate_shadow/ssao/blur.vert
diff --git a/distrib/shaders/decorate_shadow/ssao/normalMap.frag b/resources/shaders/decorate_shadow/ssao/normalMap.frag
similarity index 100%
rename from distrib/shaders/decorate_shadow/ssao/normalMap.frag
rename to resources/shaders/decorate_shadow/ssao/normalMap.frag
diff --git a/distrib/shaders/decorate_shadow/ssao/normalMap.vert b/resources/shaders/decorate_shadow/ssao/normalMap.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/ssao/normalMap.vert
rename to resources/shaders/decorate_shadow/ssao/normalMap.vert
diff --git a/distrib/shaders/decorate_shadow/ssao/ssao.frag b/resources/shaders/decorate_shadow/ssao/ssao.frag
similarity index 100%
rename from distrib/shaders/decorate_shadow/ssao/ssao.frag
rename to resources/shaders/decorate_shadow/ssao/ssao.frag
diff --git a/distrib/shaders/decorate_shadow/ssao/ssao.vert b/resources/shaders/decorate_shadow/ssao/ssao.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/ssao/ssao.vert
rename to resources/shaders/decorate_shadow/ssao/ssao.vert
diff --git a/distrib/shaders/decorate_shadow/vsm/depthVSM.frag b/resources/shaders/decorate_shadow/vsm/depthVSM.frag
similarity index 100%
rename from distrib/shaders/decorate_shadow/vsm/depthVSM.frag
rename to resources/shaders/decorate_shadow/vsm/depthVSM.frag
diff --git a/distrib/shaders/decorate_shadow/vsm/depthVSM.vert b/resources/shaders/decorate_shadow/vsm/depthVSM.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/vsm/depthVSM.vert
rename to resources/shaders/decorate_shadow/vsm/depthVSM.vert
diff --git a/distrib/shaders/decorate_shadow/vsm/objectVSM.frag b/resources/shaders/decorate_shadow/vsm/objectVSM.frag
similarity index 93%
rename from distrib/shaders/decorate_shadow/vsm/objectVSM.frag
rename to resources/shaders/decorate_shadow/vsm/objectVSM.frag
index 452481f3b..d1c8513b6 100644
--- a/distrib/shaders/decorate_shadow/vsm/objectVSM.frag
+++ b/resources/shaders/decorate_shadow/vsm/objectVSM.frag
@@ -6,7 +6,7 @@ uniform float shadowIntensity; // 1.0 black, 0, transparent
vec4 shadowCoordPostW;
float chebyshevUpperBound( float distance) {
- // We retrive the two moments previously stored (depth and depth*depth)
+ // We retrieve the two moments previously stored (depth and depth*depth)
vec2 moments = texture2D(shadowMap,shadowCoordPostW.xy).rb;
// Surface is fully lit. as the current fragment is before the light occluder
if (distance <= moments.x)
diff --git a/distrib/shaders/decorate_shadow/vsm/objectVSM.vert b/resources/shaders/decorate_shadow/vsm/objectVSM.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/vsm/objectVSM.vert
rename to resources/shaders/decorate_shadow/vsm/objectVSM.vert
diff --git a/distrib/shaders/decorate_shadow/vsmb/blurVSM.frag b/resources/shaders/decorate_shadow/vsmb/blurVSM.frag
similarity index 100%
rename from distrib/shaders/decorate_shadow/vsmb/blurVSM.frag
rename to resources/shaders/decorate_shadow/vsmb/blurVSM.frag
diff --git a/distrib/shaders/decorate_shadow/vsmb/blurVSM.vert b/resources/shaders/decorate_shadow/vsmb/blurVSM.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/vsmb/blurVSM.vert
rename to resources/shaders/decorate_shadow/vsmb/blurVSM.vert
diff --git a/distrib/shaders/decorate_shadow/vsmb/depthVSM.frag b/resources/shaders/decorate_shadow/vsmb/depthVSM.frag
similarity index 100%
rename from distrib/shaders/decorate_shadow/vsmb/depthVSM.frag
rename to resources/shaders/decorate_shadow/vsmb/depthVSM.frag
diff --git a/distrib/shaders/decorate_shadow/vsmb/depthVSM.vert b/resources/shaders/decorate_shadow/vsmb/depthVSM.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/vsmb/depthVSM.vert
rename to resources/shaders/decorate_shadow/vsmb/depthVSM.vert
diff --git a/distrib/shaders/decorate_shadow/vsmb/objectVSM.frag b/resources/shaders/decorate_shadow/vsmb/objectVSM.frag
similarity index 94%
rename from distrib/shaders/decorate_shadow/vsmb/objectVSM.frag
rename to resources/shaders/decorate_shadow/vsmb/objectVSM.frag
index 264f142a3..e021c958e 100644
--- a/distrib/shaders/decorate_shadow/vsmb/objectVSM.frag
+++ b/resources/shaders/decorate_shadow/vsmb/objectVSM.frag
@@ -7,7 +7,7 @@ uniform float shadowIntensity; // 1.0 black, 0, transparent
vec4 shadowCoordPostW;
float chebyshevUpperBound( float distance) {
- // We retrive the two moments previously stored (depth and depth*depth)
+ // We retrieve the two moments previously stored (depth and depth*depth)
vec2 moments = texture2D(shadowMap,shadowCoordPostW.xy).rb;
// Surface is fully lit. as the current fragment is before the light occluder
if (distance <= moments.x)
diff --git a/distrib/shaders/decorate_shadow/vsmb/objectVSM.vert b/resources/shaders/decorate_shadow/vsmb/objectVSM.vert
similarity index 100%
rename from distrib/shaders/decorate_shadow/vsmb/objectVSM.vert
rename to resources/shaders/decorate_shadow/vsmb/objectVSM.vert
diff --git a/distrib/shaders/depthmap.frag b/resources/shaders/depthmap.frag
similarity index 100%
rename from distrib/shaders/depthmap.frag
rename to resources/shaders/depthmap.frag
diff --git a/distrib/shaders/depthmap.gdp b/resources/shaders/depthmap.gdp
similarity index 100%
rename from distrib/shaders/depthmap.gdp
rename to resources/shaders/depthmap.gdp
diff --git a/distrib/shaders/depthmap.vert b/resources/shaders/depthmap.vert
similarity index 100%
rename from distrib/shaders/depthmap.vert
rename to resources/shaders/depthmap.vert
diff --git a/distrib/shaders/dimple.frag b/resources/shaders/dimple.frag
similarity index 100%
rename from distrib/shaders/dimple.frag
rename to resources/shaders/dimple.frag
diff --git a/distrib/shaders/dimple.gdp b/resources/shaders/dimple.gdp
similarity index 100%
rename from distrib/shaders/dimple.gdp
rename to resources/shaders/dimple.gdp
diff --git a/distrib/shaders/dimple.vert b/resources/shaders/dimple.vert
similarity index 100%
rename from distrib/shaders/dimple.vert
rename to resources/shaders/dimple.vert
diff --git a/distrib/shaders/electronic microscope.gdp b/resources/shaders/electronic microscope.gdp
similarity index 100%
rename from distrib/shaders/electronic microscope.gdp
rename to resources/shaders/electronic microscope.gdp
diff --git a/distrib/shaders/envmap.frag b/resources/shaders/envmap.frag
similarity index 100%
rename from distrib/shaders/envmap.frag
rename to resources/shaders/envmap.frag
diff --git a/distrib/shaders/envmap.gdp b/resources/shaders/envmap.gdp
similarity index 100%
rename from distrib/shaders/envmap.gdp
rename to resources/shaders/envmap.gdp
diff --git a/distrib/shaders/envmap.vert b/resources/shaders/envmap.vert
similarity index 100%
rename from distrib/shaders/envmap.vert
rename to resources/shaders/envmap.vert
diff --git a/distrib/shaders/glass.frag b/resources/shaders/glass.frag
similarity index 100%
rename from distrib/shaders/glass.frag
rename to resources/shaders/glass.frag
diff --git a/distrib/shaders/glass.gdp b/resources/shaders/glass.gdp
similarity index 100%
rename from distrib/shaders/glass.gdp
rename to resources/shaders/glass.gdp
diff --git a/distrib/shaders/glass.vert b/resources/shaders/glass.vert
similarity index 100%
rename from distrib/shaders/glass.vert
rename to resources/shaders/glass.vert
diff --git a/distrib/shaders/gooch.frag b/resources/shaders/gooch.frag
similarity index 100%
rename from distrib/shaders/gooch.frag
rename to resources/shaders/gooch.frag
diff --git a/distrib/shaders/gooch.gdp b/resources/shaders/gooch.gdp
similarity index 100%
rename from distrib/shaders/gooch.gdp
rename to resources/shaders/gooch.gdp
diff --git a/distrib/shaders/gooch.vert b/resources/shaders/gooch.vert
similarity index 100%
rename from distrib/shaders/gooch.vert
rename to resources/shaders/gooch.vert
diff --git a/distrib/shaders/lattice.frag b/resources/shaders/lattice.frag
similarity index 100%
rename from distrib/shaders/lattice.frag
rename to resources/shaders/lattice.frag
diff --git a/distrib/shaders/lattice.gdp b/resources/shaders/lattice.gdp
similarity index 100%
rename from distrib/shaders/lattice.gdp
rename to resources/shaders/lattice.gdp
diff --git a/distrib/shaders/lattice.vert b/resources/shaders/lattice.vert
similarity index 100%
rename from distrib/shaders/lattice.vert
rename to resources/shaders/lattice.vert
diff --git a/distrib/shaders/minnaert.frag b/resources/shaders/minnaert.frag
similarity index 100%
rename from distrib/shaders/minnaert.frag
rename to resources/shaders/minnaert.frag
diff --git a/distrib/shaders/minnaert.gdp b/resources/shaders/minnaert.gdp
similarity index 100%
rename from distrib/shaders/minnaert.gdp
rename to resources/shaders/minnaert.gdp
diff --git a/distrib/shaders/minnaert.vert b/resources/shaders/minnaert.vert
similarity index 100%
rename from distrib/shaders/minnaert.vert
rename to resources/shaders/minnaert.vert
diff --git a/distrib/shaders/normalmap.frag b/resources/shaders/normalmap.frag
similarity index 100%
rename from distrib/shaders/normalmap.frag
rename to resources/shaders/normalmap.frag
diff --git a/distrib/shaders/normalmap.gdp b/resources/shaders/normalmap.gdp
similarity index 100%
rename from distrib/shaders/normalmap.gdp
rename to resources/shaders/normalmap.gdp
diff --git a/distrib/shaders/normalmap.vert b/resources/shaders/normalmap.vert
similarity index 100%
rename from distrib/shaders/normalmap.vert
rename to resources/shaders/normalmap.vert
diff --git a/distrib/shaders/phong.frag b/resources/shaders/phong.frag
similarity index 100%
rename from distrib/shaders/phong.frag
rename to resources/shaders/phong.frag
diff --git a/distrib/shaders/phong.gdp b/resources/shaders/phong.gdp
similarity index 100%
rename from distrib/shaders/phong.gdp
rename to resources/shaders/phong.gdp
diff --git a/distrib/shaders/phong.vert b/resources/shaders/phong.vert
similarity index 100%
rename from distrib/shaders/phong.vert
rename to resources/shaders/phong.vert
diff --git a/distrib/shaders/polkadot3d.frag b/resources/shaders/polkadot3d.frag
similarity index 100%
rename from distrib/shaders/polkadot3d.frag
rename to resources/shaders/polkadot3d.frag
diff --git a/distrib/shaders/polkadot3d.gdp b/resources/shaders/polkadot3d.gdp
similarity index 100%
rename from distrib/shaders/polkadot3d.gdp
rename to resources/shaders/polkadot3d.gdp
diff --git a/distrib/shaders/polkadot3d.vert b/resources/shaders/polkadot3d.vert
similarity index 100%
rename from distrib/shaders/polkadot3d.vert
rename to resources/shaders/polkadot3d.vert
diff --git a/distrib/shaders/reflexion_lines.frag b/resources/shaders/reflexion_lines.frag
similarity index 100%
rename from distrib/shaders/reflexion_lines.frag
rename to resources/shaders/reflexion_lines.frag
diff --git a/distrib/shaders/reflexion_lines.gdp b/resources/shaders/reflexion_lines.gdp
similarity index 100%
rename from distrib/shaders/reflexion_lines.gdp
rename to resources/shaders/reflexion_lines.gdp
diff --git a/distrib/shaders/reflexion_lines.vert b/resources/shaders/reflexion_lines.vert
similarity index 100%
rename from distrib/shaders/reflexion_lines.vert
rename to resources/shaders/reflexion_lines.vert
diff --git a/distrib/shaders/shadersrm/NormalMapping.rfx b/resources/shaders/shadersrm/NormalMapping.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/NormalMapping.rfx
rename to resources/shaders/shadersrm/NormalMapping.rfx
diff --git a/distrib/shaders/shadersrm/PhongUntextured.rfx b/resources/shaders/shadersrm/PhongUntextured.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/PhongUntextured.rfx
rename to resources/shaders/shadersrm/PhongUntextured.rfx
diff --git a/distrib/shaders/shadersrm/QualityContour.rfx b/resources/shaders/shadersrm/QualityContour.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/QualityContour.rfx
rename to resources/shaders/shadersrm/QualityContour.rfx
diff --git a/distrib/shaders/shadersrm/ZBrush.rfx b/resources/shaders/shadersrm/ZBrush.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/ZBrush.rfx
rename to resources/shaders/shadersrm/ZBrush.rfx
diff --git a/distrib/shaders/shadersrm/cartoon.rfx b/resources/shaders/shadersrm/cartoon.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/cartoon.rfx
rename to resources/shaders/shadersrm/cartoon.rfx
diff --git a/distrib/shaders/shadersrm/old/Depth of Field.rfx b/resources/shaders/shadersrm/old/Depth of Field.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/old/Depth of Field.rfx
rename to resources/shaders/shadersrm/old/Depth of Field.rfx
diff --git a/distrib/shaders/shadersrm/old/GlyphBomb.rfx b/resources/shaders/shadersrm/old/GlyphBomb.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/old/GlyphBomb.rfx
rename to resources/shaders/shadersrm/old/GlyphBomb.rfx
diff --git a/distrib/shaders/shadersrm/old/ImageBasedLighting.rfx b/resources/shaders/shadersrm/old/ImageBasedLighting.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/old/ImageBasedLighting.rfx
rename to resources/shaders/shadersrm/old/ImageBasedLighting.rfx
diff --git a/distrib/shaders/shadersrm/old/Plastic.rfx b/resources/shaders/shadersrm/old/Plastic.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/old/Plastic.rfx
rename to resources/shaders/shadersrm/old/Plastic.rfx
diff --git a/distrib/shaders/shadersrm/old/RenderToTexture.rfx b/resources/shaders/shadersrm/old/RenderToTexture.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/old/RenderToTexture.rfx
rename to resources/shaders/shadersrm/old/RenderToTexture.rfx
diff --git a/distrib/shaders/shadersrm/old/cubeenvmap.rfx b/resources/shaders/shadersrm/old/cubeenvmap.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/old/cubeenvmap.rfx
rename to resources/shaders/shadersrm/old/cubeenvmap.rfx
diff --git a/distrib/shaders/shadersrm/old/fur.rfx b/resources/shaders/shadersrm/old/fur.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/old/fur.rfx
rename to resources/shaders/shadersrm/old/fur.rfx
diff --git a/distrib/shaders/shadersrm/old/hatching.rfx b/resources/shaders/shadersrm/old/hatching.rfx
similarity index 100%
rename from distrib/shaders/shadersrm/old/hatching.rfx
rename to resources/shaders/shadersrm/old/hatching.rfx
diff --git a/distrib/shaders/slicingplane.frag b/resources/shaders/slicingplane.frag
similarity index 100%
rename from distrib/shaders/slicingplane.frag
rename to resources/shaders/slicingplane.frag
diff --git a/distrib/shaders/slicingplane.gdp b/resources/shaders/slicingplane.gdp
similarity index 100%
rename from distrib/shaders/slicingplane.gdp
rename to resources/shaders/slicingplane.gdp
diff --git a/distrib/shaders/slicingplane.vert b/resources/shaders/slicingplane.vert
similarity index 100%
rename from distrib/shaders/slicingplane.vert
rename to resources/shaders/slicingplane.vert
diff --git a/distrib/shaders/splatpyramid/shader_analysis.frag b/resources/shaders/splatpyramid/shader_analysis.frag
similarity index 98%
rename from distrib/shaders/splatpyramid/shader_analysis.frag
rename to resources/shaders/splatpyramid/shader_analysis.frag
index 21480aba7..75341c433 100644
--- a/distrib/shaders/splatpyramid/shader_analysis.frag
+++ b/resources/shaders/splatpyramid/shader_analysis.frag
@@ -143,7 +143,7 @@ void main (void) {
}
// average values if there are any valid ellipses
- // otherwise the pixel will be writen as unspecified
+ // otherwise the pixel will be written as unspecified
if (valid_pixels > 0.0)
{
diff --git a/distrib/shaders/splatpyramid/shader_analysis.vert b/resources/shaders/splatpyramid/shader_analysis.vert
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_analysis.vert
rename to resources/shaders/splatpyramid/shader_analysis.vert
diff --git a/distrib/shaders/splatpyramid/shader_analysis_color.frag b/resources/shaders/splatpyramid/shader_analysis_color.frag
similarity index 98%
rename from distrib/shaders/splatpyramid/shader_analysis_color.frag
rename to resources/shaders/splatpyramid/shader_analysis_color.frag
index 76be6a1bf..34bc40cbe 100644
--- a/distrib/shaders/splatpyramid/shader_analysis_color.frag
+++ b/resources/shaders/splatpyramid/shader_analysis_color.frag
@@ -143,7 +143,7 @@ void main (void) {
}
// average values if there are any valid ellipses
- // otherwise the pixel will be writen as unspecified
+ // otherwise the pixel will be written as unspecified
if (valid_pixels > 0.0)
{
bufferA /= valid_pixels;
diff --git a/distrib/shaders/splatpyramid/shader_analysis_color.vert b/resources/shaders/splatpyramid/shader_analysis_color.vert
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_analysis_color.vert
rename to resources/shaders/splatpyramid/shader_analysis_color.vert
diff --git a/distrib/shaders/splatpyramid/shader_copy.frag b/resources/shaders/splatpyramid/shader_copy.frag
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_copy.frag
rename to resources/shaders/splatpyramid/shader_copy.frag
diff --git a/distrib/shaders/splatpyramid/shader_copy.vert b/resources/shaders/splatpyramid/shader_copy.vert
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_copy.vert
rename to resources/shaders/splatpyramid/shader_copy.vert
diff --git a/distrib/shaders/splatpyramid/shader_copy_color.frag b/resources/shaders/splatpyramid/shader_copy_color.frag
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_copy_color.frag
rename to resources/shaders/splatpyramid/shader_copy_color.frag
diff --git a/distrib/shaders/splatpyramid/shader_copy_color.vert b/resources/shaders/splatpyramid/shader_copy_color.vert
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_copy_color.vert
rename to resources/shaders/splatpyramid/shader_copy_color.vert
diff --git a/distrib/shaders/splatpyramid/shader_phong.frag b/resources/shaders/splatpyramid/shader_phong.frag
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_phong.frag
rename to resources/shaders/splatpyramid/shader_phong.frag
diff --git a/distrib/shaders/splatpyramid/shader_phong.vert b/resources/shaders/splatpyramid/shader_phong.vert
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_phong.vert
rename to resources/shaders/splatpyramid/shader_phong.vert
diff --git a/distrib/shaders/splatpyramid/shader_phong_color.frag b/resources/shaders/splatpyramid/shader_phong_color.frag
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_phong_color.frag
rename to resources/shaders/splatpyramid/shader_phong_color.frag
diff --git a/distrib/shaders/splatpyramid/shader_phong_color.vert b/resources/shaders/splatpyramid/shader_phong_color.vert
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_phong_color.vert
rename to resources/shaders/splatpyramid/shader_phong_color.vert
diff --git a/distrib/shaders/splatpyramid/shader_point_projection.frag b/resources/shaders/splatpyramid/shader_point_projection.frag
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_point_projection.frag
rename to resources/shaders/splatpyramid/shader_point_projection.frag
diff --git a/distrib/shaders/splatpyramid/shader_point_projection.vert b/resources/shaders/splatpyramid/shader_point_projection.vert
similarity index 94%
rename from distrib/shaders/splatpyramid/shader_point_projection.vert
rename to resources/shaders/splatpyramid/shader_point_projection.vert
index deb54cc0d..e75391e09 100644
--- a/distrib/shaders/splatpyramid/shader_point_projection.vert
+++ b/resources/shaders/splatpyramid/shader_point_projection.vert
@@ -23,7 +23,7 @@ void main(void)
radius_depth_w.x = 0.0;
- // for some reason seting the vector to vec4(0.0) drops
+ // for some reason setting the vector to vec4(0.0) drops
// the performance significantly, at least on the GeForce8800 -- RM 2007-10-19
gl_Position = vec4(1.0);
}
diff --git a/distrib/shaders/splatpyramid/shader_point_projection_color.frag b/resources/shaders/splatpyramid/shader_point_projection_color.frag
similarity index 92%
rename from distrib/shaders/splatpyramid/shader_point_projection_color.frag
rename to resources/shaders/splatpyramid/shader_point_projection_color.frag
index d4d3f4c19..8ebdc9e25 100644
--- a/distrib/shaders/splatpyramid/shader_point_projection_color.frag
+++ b/resources/shaders/splatpyramid/shader_point_projection_color.frag
@@ -31,7 +31,7 @@ void main(void)
gl_FragData[1] = vec4 (radius_depth_w.y, 2.0*depth_interval, screen_pos);
gl_FragData[2] = gl_Color;
- // avoids point with low quality overwritting point with high quality
+ // avoids point with low quality overwriting point with high quality
// during depth test
//gl_FragDepth = gl_FragCoord.z - gl_Color.a*0.05;
}
diff --git a/distrib/shaders/splatpyramid/shader_point_projection_color.vert b/resources/shaders/splatpyramid/shader_point_projection_color.vert
similarity index 94%
rename from distrib/shaders/splatpyramid/shader_point_projection_color.vert
rename to resources/shaders/splatpyramid/shader_point_projection_color.vert
index 52146ddc1..710d5dc56 100644
--- a/distrib/shaders/splatpyramid/shader_point_projection_color.vert
+++ b/resources/shaders/splatpyramid/shader_point_projection_color.vert
@@ -22,7 +22,7 @@ void main(void)
if ( (back_face_culling == 1) && ((dot < -0.0 ))) {
radius_depth_w.x = 0.0;
- // for some reason seting the vector to vec4(0.0) drops
+ // for some reason setting the vector to vec4(0.0) drops
// the performance significantly, at least on the GeForce8800 -- RM 2007-10-19
gl_Position = vec4(1.0);
}
diff --git a/distrib/shaders/splatpyramid/shader_synthesis.frag b/resources/shaders/splatpyramid/shader_synthesis.frag
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_synthesis.frag
rename to resources/shaders/splatpyramid/shader_synthesis.frag
diff --git a/distrib/shaders/splatpyramid/shader_synthesis.vert b/resources/shaders/splatpyramid/shader_synthesis.vert
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_synthesis.vert
rename to resources/shaders/splatpyramid/shader_synthesis.vert
diff --git a/distrib/shaders/splatpyramid/shader_synthesis_color.frag b/resources/shaders/splatpyramid/shader_synthesis_color.frag
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_synthesis_color.frag
rename to resources/shaders/splatpyramid/shader_synthesis_color.frag
diff --git a/distrib/shaders/splatpyramid/shader_synthesis_color.vert b/resources/shaders/splatpyramid/shader_synthesis_color.vert
similarity index 100%
rename from distrib/shaders/splatpyramid/shader_synthesis_color.vert
rename to resources/shaders/splatpyramid/shader_synthesis_color.vert
diff --git a/distrib/shaders/stripes2.frag b/resources/shaders/stripes2.frag
similarity index 100%
rename from distrib/shaders/stripes2.frag
rename to resources/shaders/stripes2.frag
diff --git a/distrib/shaders/stripes2.gdp b/resources/shaders/stripes2.gdp
similarity index 100%
rename from distrib/shaders/stripes2.gdp
rename to resources/shaders/stripes2.gdp
diff --git a/distrib/shaders/stripes2.vert b/resources/shaders/stripes2.vert
similarity index 100%
rename from distrib/shaders/stripes2.vert
rename to resources/shaders/stripes2.vert
diff --git a/distrib/shaders/toon.frag b/resources/shaders/toon.frag
similarity index 100%
rename from distrib/shaders/toon.frag
rename to resources/shaders/toon.frag
diff --git a/distrib/shaders/toon.gdp b/resources/shaders/toon.gdp
similarity index 100%
rename from distrib/shaders/toon.gdp
rename to resources/shaders/toon.gdp
diff --git a/distrib/shaders/toon.vert b/resources/shaders/toon.vert
similarity index 100%
rename from distrib/shaders/toon.vert
rename to resources/shaders/toon.vert
diff --git a/distrib/shaders/xray.frag b/resources/shaders/xray.frag
similarity index 100%
rename from distrib/shaders/xray.frag
rename to resources/shaders/xray.frag
diff --git a/distrib/shaders/xray.gdp b/resources/shaders/xray.gdp
similarity index 100%
rename from distrib/shaders/xray.gdp
rename to resources/shaders/xray.gdp
diff --git a/distrib/shaders/xray.vert b/resources/shaders/xray.vert
similarity index 100%
rename from distrib/shaders/xray.vert
rename to resources/shaders/xray.vert
diff --git a/scripts/Windows/resources/ExecWaitJob.nsh b/resources/windows/ExecWaitJob.nsh
similarity index 100%
rename from scripts/Windows/resources/ExecWaitJob.nsh
rename to resources/windows/ExecWaitJob.nsh
diff --git a/scripts/Windows/resources/FileAssociation.nsh b/resources/windows/FileAssociation.nsh
similarity index 100%
rename from scripts/Windows/resources/FileAssociation.nsh
rename to resources/windows/FileAssociation.nsh
diff --git a/scripts/Windows/resources/meshlab.nsi b/resources/windows/meshlab.nsi
similarity index 95%
rename from scripts/Windows/resources/meshlab.nsi
rename to resources/windows/meshlab.nsi
index 3f13d9b7c..f50256ed4 100644
--- a/scripts/Windows/resources/meshlab.nsi
+++ b/resources/windows/meshlab.nsi
@@ -8,7 +8,6 @@
!define PRODUCT_PUBLISHER "Paolo Cignoni - VCG - ISTI - CNR"
!define PRODUCT_WEB_SITE "http://www.meshlab.net"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\meshlab.exe"
-;!define PRODUCT_DIR_REGKEY_S "Software\Microsoft\Windows\CurrentVersion\App Paths\meshlabserver.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define DISTRIB_FOLDER "DISTRIB_PATH"
@@ -47,7 +46,7 @@
!define /date NOW "%Y_%m_%d"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
-OutFile "MeshLab${PRODUCT_VERSION}.exe"
+OutFile "MeshLab${PRODUCT_VERSION}-windows.exe"
InstallDir "${MAINDIR}\VCG\MeshLab"
ShowInstDetails show
ShowUnInstDetails show
diff --git a/sample/TextureSingle.ply b/sample/TextureSingle.ply
new file mode 100644
index 000000000..a5ecc7cd5
--- /dev/null
+++ b/sample/TextureSingle.ply
@@ -0,0 +1,19 @@
+ply
+format ascii 1.0
+comment VCGLIB generated
+comment TextureFile TextureDouble_A.png
+element vertex 4
+property float x
+property float y
+property float z
+element face 2
+property list uchar int vertex_indices
+property list uchar float texcoord
+property int texnumber
+end_header
+0 0 0
+1 0 0
+1 1 0
+0 1 0
+3 0 1 2 6 0 0 2 0 2 2 0
+3 0 2 3 6 0 0 2 2 0 2 0
diff --git a/sample/furniture.3ds b/sample/furniture.3ds
new file mode 100644
index 000000000..ea39757e0
Binary files /dev/null and b/sample/furniture.3ds differ
diff --git a/sample/gltf/CesiumMan/CesiumMan.gltf b/sample/gltf/CesiumMan/CesiumMan.gltf
new file mode 100644
index 000000000..f474e54a7
--- /dev/null
+++ b/sample/gltf/CesiumMan/CesiumMan.gltf
@@ -0,0 +1,2715 @@
+{
+ "asset": {
+ "generator": "COLLADA2GLTF",
+ "version": "2.0"
+ },
+ "scenes": [
+ {
+ "nodes": [
+ 0
+ ]
+ }
+ ],
+ "scene": 0,
+ "nodes": [
+ {
+ "children": [
+ 1
+ ],
+ "matrix": [
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ -1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ],
+ "name": "Z_UP"
+ },
+ {
+ "children": [
+ 3,
+ 2
+ ],
+ "matrix": [
+ -4.371139894487897e-8,
+ -1,
+ 0,
+ 0,
+ 1,
+ -4.371139894487897e-8,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ],
+ "name": "Armature"
+ },
+ {
+ "mesh": 0,
+ "skin": 0,
+ "name": "Cesium_Man"
+ },
+ {
+ "children": [
+ 12,
+ 8,
+ 4
+ ],
+ "translation": [
+ 1.57554005397742e-8,
+ 0.004999836906790733,
+ 0.6789999008178711
+ ],
+ "rotation": [
+ 0,
+ -0.0378035344183445,
+ 0,
+ -0.9992852210998536
+ ],
+ "name": "Skeleton_torso_joint_1",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 5
+ ],
+ "translation": [
+ 0.02855719067156315,
+ -0.06803914159536362,
+ -0.06295864284038544
+ ],
+ "rotation": [
+ 0,
+ -0.6898291707038879,
+ 0,
+ -0.7239722013473511
+ ],
+ "name": "leg_joint_R_1",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 6
+ ],
+ "translation": [
+ 0.26089081168174744,
+ -0.009026050567626951,
+ 0.05167089030146599
+ ],
+ "rotation": [
+ 0,
+ -0.0941137745976448,
+ 0,
+ -0.9955614805221558
+ ],
+ "scale": [
+ 1.0000001192092896,
+ 1,
+ 1.0000001192092896
+ ],
+ "name": "leg_joint_R_2"
+ },
+ {
+ "children": [
+ 7
+ ],
+ "translation": [
+ 0.27546030282974243,
+ -0.0014317259192466736,
+ -0.014104830101132391
+ ],
+ "rotation": [
+ 0,
+ 0.8666408061981201,
+ 0,
+ 0.4989325702190399
+ ],
+ "name": "leg_joint_R_3",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "translation": [
+ -0.06681963056325912,
+ -0.001072264974936843,
+ 0.026351310312747955
+ ],
+ "rotation": [
+ 0,
+ 0.3269147574901581,
+ 0,
+ -0.9450538158416748
+ ],
+ "name": "leg_joint_R_5",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 9
+ ],
+ "translation": [
+ 0.028519999235868457,
+ 0.06803944706916809,
+ -0.06295935809612274
+ ],
+ "rotation": [
+ 0,
+ -0.32463353872299194,
+ 0,
+ -0.9458398818969728
+ ],
+ "name": "leg_joint_L_1",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 10
+ ],
+ "translation": [
+ 0.20916390419006348,
+ 0.009055502712726591,
+ -0.16426950693130493
+ ],
+ "rotation": [
+ 0,
+ -0.5294369459152222,
+ 0,
+ -0.8483493328094482
+ ],
+ "scale": [
+ 1.0000001192092896,
+ 1,
+ 1.0000001192092896
+ ],
+ "name": "leg_joint_L_2"
+ },
+ {
+ "children": [
+ 11
+ ],
+ "translation": [
+ 0.27579009532928467,
+ 0.0013972519664093852,
+ 0.004122479818761349
+ ],
+ "rotation": [
+ 0,
+ -0.8377647399902344,
+ 0,
+ -0.5460314750671387
+ ],
+ "scale": [
+ 1,
+ 0.9999999403953552,
+ 1
+ ],
+ "name": "leg_joint_L_3"
+ },
+ {
+ "translation": [
+ -0.06558381021022797,
+ 0.001090653007850051,
+ 0.02929146029055119
+ ],
+ "rotation": [
+ 0,
+ 0.3130458891391754,
+ 0,
+ -0.9497380256652832
+ ],
+ "name": "leg_joint_L_5",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 13
+ ],
+ "translation": [
+ 0.0000133617004394182,
+ -0.000013373800356930587,
+ 0.14541690051555634
+ ],
+ "rotation": [
+ 0,
+ -0.6573964357376099,
+ 0,
+ -0.7535448670387268
+ ],
+ "name": "Skeleton_torso_joint_2",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 20,
+ 17,
+ 14
+ ],
+ "translation": [
+ -0.2505168914794922,
+ 6.072219775887788e-7,
+ -0.00007290810026461259
+ ],
+ "rotation": [
+ 0,
+ 0.6227028965950012,
+ 0,
+ -0.7824583649635315
+ ],
+ "name": "torso_joint_3",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 15
+ ],
+ "translation": [
+ -0.00003830249988823198,
+ -0.09098774939775468,
+ -0.000062032304413151
+ ],
+ "rotation": [
+ 0,
+ 0.9909319281578064,
+ 0,
+ -0.13436488807201385
+ ],
+ "name": "Skeleton_arm_joint_R",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 16
+ ],
+ "translation": [
+ -0.03554634004831314,
+ -0.2154989987611771,
+ 0.10423289984464645
+ ],
+ "rotation": [
+ 0,
+ 0.8961479663848877,
+ 0,
+ 0.4437553286552429
+ ],
+ "scale": [
+ 0.9999999403953552,
+ 1,
+ 0.9999999403953552
+ ],
+ "name": "Skeleton_arm_joint_R__2_"
+ },
+ {
+ "translation": [
+ 0.03137021884322167,
+ -0.1430010050535202,
+ -0.11761169880628586
+ ],
+ "rotation": [
+ 0,
+ 0.3792171180248261,
+ 0,
+ -0.9253078103065492
+ ],
+ "scale": [
+ 1.0000001192092896,
+ 1,
+ 1.0000001192092896
+ ],
+ "name": "Skeleton_arm_joint_R__3_"
+ },
+ {
+ "children": [
+ 18
+ ],
+ "translation": [
+ -0.00003837469921563752,
+ 0.091013602912426,
+ -0.00006143339851405472
+ ],
+ "rotation": [
+ 0,
+ 0.9959768652915956,
+ 0,
+ 0.08961082249879837
+ ],
+ "name": "Skeleton_arm_joint_L__4_",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 19
+ ],
+ "translation": [
+ 0.01322161965072155,
+ 0.21549950540065768,
+ 0.10933209955692293
+ ],
+ "rotation": [
+ 0,
+ -0.0711694285273552,
+ 0,
+ -0.9974642395973206
+ ],
+ "name": "Skeleton_arm_joint_L__3_",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "translation": [
+ -0.09332461655139924,
+ 0.1430000960826874,
+ 0.07814791053533554
+ ],
+ "rotation": [
+ 0,
+ -0.02254222705960274,
+ 0,
+ -0.9997459053993224
+ ],
+ "name": "Skeleton_arm_joint_L__2_",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "children": [
+ 21
+ ],
+ "translation": [
+ -0.000002366030003031483,
+ 0.000002413989932392724,
+ 0.06483621150255203
+ ],
+ "rotation": [
+ 0,
+ -0.660634458065033,
+ 0,
+ -0.750707745552063
+ ],
+ "name": "Skeleton_neck_joint_1",
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "translation": [
+ -0.05204017087817192,
+ -3.3993298842460724e-8,
+ -0.0000026607899599184748
+ ],
+ "rotation": [
+ 0,
+ 0.9996904730796814,
+ 0,
+ 0.024879230186343193
+ ],
+ "scale": [
+ 1.0000001192092896,
+ 1,
+ 1.0000001192092896
+ ],
+ "name": "Skeleton_neck_joint_2"
+ }
+ ],
+ "meshes": [
+ {
+ "primitives": [
+ {
+ "attributes": {
+ "JOINTS_0": 1,
+ "NORMAL": 2,
+ "POSITION": 3,
+ "TEXCOORD_0": 4,
+ "WEIGHTS_0": 5
+ },
+ "indices": 0,
+ "mode": 4,
+ "material": 0
+ }
+ ],
+ "name": "Cesium_Man"
+ }
+ ],
+ "animations": [
+ {
+ "channels": [
+ {
+ "sampler": 0,
+ "target": {
+ "node": 3,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 1,
+ "target": {
+ "node": 3,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 2,
+ "target": {
+ "node": 3,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 3,
+ "target": {
+ "node": 12,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 4,
+ "target": {
+ "node": 12,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 5,
+ "target": {
+ "node": 12,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 6,
+ "target": {
+ "node": 13,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 7,
+ "target": {
+ "node": 13,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 8,
+ "target": {
+ "node": 13,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 9,
+ "target": {
+ "node": 20,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 10,
+ "target": {
+ "node": 20,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 11,
+ "target": {
+ "node": 20,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 12,
+ "target": {
+ "node": 21,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 13,
+ "target": {
+ "node": 21,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 14,
+ "target": {
+ "node": 21,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 15,
+ "target": {
+ "node": 17,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 16,
+ "target": {
+ "node": 17,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 17,
+ "target": {
+ "node": 17,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 18,
+ "target": {
+ "node": 18,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 19,
+ "target": {
+ "node": 18,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 20,
+ "target": {
+ "node": 18,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 21,
+ "target": {
+ "node": 19,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 22,
+ "target": {
+ "node": 19,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 23,
+ "target": {
+ "node": 19,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 24,
+ "target": {
+ "node": 14,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 25,
+ "target": {
+ "node": 14,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 26,
+ "target": {
+ "node": 14,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 27,
+ "target": {
+ "node": 15,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 28,
+ "target": {
+ "node": 15,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 29,
+ "target": {
+ "node": 15,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 30,
+ "target": {
+ "node": 16,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 31,
+ "target": {
+ "node": 16,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 32,
+ "target": {
+ "node": 16,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 33,
+ "target": {
+ "node": 8,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 34,
+ "target": {
+ "node": 8,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 35,
+ "target": {
+ "node": 8,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 36,
+ "target": {
+ "node": 9,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 37,
+ "target": {
+ "node": 9,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 38,
+ "target": {
+ "node": 9,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 39,
+ "target": {
+ "node": 10,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 40,
+ "target": {
+ "node": 10,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 41,
+ "target": {
+ "node": 10,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 42,
+ "target": {
+ "node": 11,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 43,
+ "target": {
+ "node": 11,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 44,
+ "target": {
+ "node": 11,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 45,
+ "target": {
+ "node": 4,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 46,
+ "target": {
+ "node": 4,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 47,
+ "target": {
+ "node": 4,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 48,
+ "target": {
+ "node": 5,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 49,
+ "target": {
+ "node": 5,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 50,
+ "target": {
+ "node": 5,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 51,
+ "target": {
+ "node": 6,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 52,
+ "target": {
+ "node": 6,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 53,
+ "target": {
+ "node": 6,
+ "path": "scale"
+ }
+ },
+ {
+ "sampler": 54,
+ "target": {
+ "node": 7,
+ "path": "translation"
+ }
+ },
+ {
+ "sampler": 55,
+ "target": {
+ "node": 7,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 56,
+ "target": {
+ "node": 7,
+ "path": "scale"
+ }
+ }
+ ],
+ "samplers": [
+ {
+ "input": 6,
+ "interpolation": "LINEAR",
+ "output": 7
+ },
+ {
+ "input": 6,
+ "interpolation": "LINEAR",
+ "output": 8
+ },
+ {
+ "input": 6,
+ "interpolation": "LINEAR",
+ "output": 9
+ },
+ {
+ "input": 10,
+ "interpolation": "LINEAR",
+ "output": 11
+ },
+ {
+ "input": 10,
+ "interpolation": "LINEAR",
+ "output": 12
+ },
+ {
+ "input": 10,
+ "interpolation": "LINEAR",
+ "output": 13
+ },
+ {
+ "input": 14,
+ "interpolation": "LINEAR",
+ "output": 15
+ },
+ {
+ "input": 14,
+ "interpolation": "LINEAR",
+ "output": 16
+ },
+ {
+ "input": 14,
+ "interpolation": "LINEAR",
+ "output": 17
+ },
+ {
+ "input": 18,
+ "interpolation": "LINEAR",
+ "output": 19
+ },
+ {
+ "input": 18,
+ "interpolation": "LINEAR",
+ "output": 20
+ },
+ {
+ "input": 18,
+ "interpolation": "LINEAR",
+ "output": 21
+ },
+ {
+ "input": 22,
+ "interpolation": "LINEAR",
+ "output": 23
+ },
+ {
+ "input": 22,
+ "interpolation": "LINEAR",
+ "output": 24
+ },
+ {
+ "input": 22,
+ "interpolation": "LINEAR",
+ "output": 25
+ },
+ {
+ "input": 26,
+ "interpolation": "LINEAR",
+ "output": 27
+ },
+ {
+ "input": 26,
+ "interpolation": "LINEAR",
+ "output": 28
+ },
+ {
+ "input": 26,
+ "interpolation": "LINEAR",
+ "output": 29
+ },
+ {
+ "input": 30,
+ "interpolation": "LINEAR",
+ "output": 31
+ },
+ {
+ "input": 30,
+ "interpolation": "LINEAR",
+ "output": 32
+ },
+ {
+ "input": 30,
+ "interpolation": "LINEAR",
+ "output": 33
+ },
+ {
+ "input": 34,
+ "interpolation": "LINEAR",
+ "output": 35
+ },
+ {
+ "input": 34,
+ "interpolation": "LINEAR",
+ "output": 36
+ },
+ {
+ "input": 34,
+ "interpolation": "LINEAR",
+ "output": 37
+ },
+ {
+ "input": 38,
+ "interpolation": "LINEAR",
+ "output": 39
+ },
+ {
+ "input": 38,
+ "interpolation": "LINEAR",
+ "output": 40
+ },
+ {
+ "input": 38,
+ "interpolation": "LINEAR",
+ "output": 41
+ },
+ {
+ "input": 42,
+ "interpolation": "LINEAR",
+ "output": 43
+ },
+ {
+ "input": 42,
+ "interpolation": "LINEAR",
+ "output": 44
+ },
+ {
+ "input": 42,
+ "interpolation": "LINEAR",
+ "output": 45
+ },
+ {
+ "input": 46,
+ "interpolation": "LINEAR",
+ "output": 47
+ },
+ {
+ "input": 46,
+ "interpolation": "LINEAR",
+ "output": 48
+ },
+ {
+ "input": 46,
+ "interpolation": "LINEAR",
+ "output": 49
+ },
+ {
+ "input": 50,
+ "interpolation": "LINEAR",
+ "output": 51
+ },
+ {
+ "input": 50,
+ "interpolation": "LINEAR",
+ "output": 52
+ },
+ {
+ "input": 50,
+ "interpolation": "LINEAR",
+ "output": 53
+ },
+ {
+ "input": 54,
+ "interpolation": "LINEAR",
+ "output": 55
+ },
+ {
+ "input": 54,
+ "interpolation": "LINEAR",
+ "output": 56
+ },
+ {
+ "input": 54,
+ "interpolation": "LINEAR",
+ "output": 57
+ },
+ {
+ "input": 58,
+ "interpolation": "LINEAR",
+ "output": 59
+ },
+ {
+ "input": 58,
+ "interpolation": "LINEAR",
+ "output": 60
+ },
+ {
+ "input": 58,
+ "interpolation": "LINEAR",
+ "output": 61
+ },
+ {
+ "input": 62,
+ "interpolation": "LINEAR",
+ "output": 63
+ },
+ {
+ "input": 62,
+ "interpolation": "LINEAR",
+ "output": 64
+ },
+ {
+ "input": 62,
+ "interpolation": "LINEAR",
+ "output": 65
+ },
+ {
+ "input": 66,
+ "interpolation": "LINEAR",
+ "output": 67
+ },
+ {
+ "input": 66,
+ "interpolation": "LINEAR",
+ "output": 68
+ },
+ {
+ "input": 66,
+ "interpolation": "LINEAR",
+ "output": 69
+ },
+ {
+ "input": 70,
+ "interpolation": "LINEAR",
+ "output": 71
+ },
+ {
+ "input": 70,
+ "interpolation": "LINEAR",
+ "output": 72
+ },
+ {
+ "input": 70,
+ "interpolation": "LINEAR",
+ "output": 73
+ },
+ {
+ "input": 74,
+ "interpolation": "LINEAR",
+ "output": 75
+ },
+ {
+ "input": 74,
+ "interpolation": "LINEAR",
+ "output": 76
+ },
+ {
+ "input": 74,
+ "interpolation": "LINEAR",
+ "output": 77
+ },
+ {
+ "input": 78,
+ "interpolation": "LINEAR",
+ "output": 79
+ },
+ {
+ "input": 78,
+ "interpolation": "LINEAR",
+ "output": 80
+ },
+ {
+ "input": 78,
+ "interpolation": "LINEAR",
+ "output": 81
+ }
+ ]
+ }
+ ],
+ "skins": [
+ {
+ "inverseBindMatrices": 82,
+ "skeleton": 3,
+ "joints": [
+ 3,
+ 12,
+ 13,
+ 20,
+ 21,
+ 17,
+ 14,
+ 18,
+ 15,
+ 19,
+ 16,
+ 8,
+ 4,
+ 9,
+ 5,
+ 10,
+ 6,
+ 11,
+ 7
+ ],
+ "name": "Armature"
+ }
+ ],
+ "accessors": [
+ {
+ "bufferView": 0,
+ "byteOffset": 0,
+ "componentType": 5123,
+ "count": 14016,
+ "max": [
+ 3272
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 0,
+ "componentType": 5123,
+ "count": 3273,
+ "max": [
+ 18,
+ 18,
+ 18,
+ 18
+ ],
+ "min": [
+ 0,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 3273,
+ "max": [
+ 1,
+ 0.9999808073043824,
+ 0.9944415092468262
+ ],
+ "min": [
+ -1,
+ -0.9999808073043824,
+ -1
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 39276,
+ "componentType": 5126,
+ "count": 3273,
+ "max": [
+ 0.1809539943933487,
+ 0.569136917591095,
+ 1.5065499544143677
+ ],
+ "min": [
+ -0.13100001215934753,
+ -0.5691370964050293,
+ 0
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 26184,
+ "componentType": 5126,
+ "count": 3273,
+ "max": [
+ 0.990805983543396,
+ 0.9880298972129822
+ ],
+ "min": [
+ 0.014079390093684196,
+ 0.008445978164672852
+ ],
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 3,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 3273,
+ "max": [
+ 1,
+ 0.989919900894165,
+ 0.9510763883590698,
+ 0.9196179509162904
+ ],
+ "min": [
+ 0.010080089792609217,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 3.880559873437051e-8,
+ -0.02000010944902897,
+ 0.7110069990158081
+ ],
+ "min": [
+ 2.716890046272624e-9,
+ -0.030000129714608192,
+ 0.6399999856948853
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.0001435002632206306,
+ -0.02146764844655991,
+ -0.000009948204024112783,
+ -0.9980905055999756
+ ],
+ "min": [
+ -0.012384946458041668,
+ -0.06042621284723282,
+ -0.0041049933061003685,
+ -0.9997026920318604
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 576,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000004768371584,
+ 1.0000001192092896,
+ 1.000000238418579
+ ],
+ "min": [
+ 0.9999999403953552,
+ 0.9999998211860656,
+ 0.9999997615814208
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 192,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 1152,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.000013520900211005937,
+ 0.0009866129839792848,
+ 0.1454171985387802
+ ],
+ "min": [
+ 0.000013436199878924528,
+ 0.0009865909814834597,
+ 0.145416796207428
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 768,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.011148878373205662,
+ -0.7106494903564453,
+ 0.0006393495132215321,
+ -0.6787928938865662
+ ],
+ "min": [
+ -0.008564536459743977,
+ -0.7339289784431458,
+ -0.025856714695692062,
+ -0.7034341096878052
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 1728,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000004768371584,
+ 1.000000238418579,
+ 0.9999998211860656
+ ],
+ "min": [
+ 0.9999999403953552,
+ 0.9999998807907104,
+ 0.9999989867210388
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 384,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 2304,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.25051650404930115,
+ 5.923209869251878e-7,
+ -0.00007277730037458241
+ ],
+ "min": [
+ -0.25051701068878174,
+ 5.58793999516638e-7,
+ -0.00007287789776455611
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 1536,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.13804565370082855,
+ 0.6359269618988037,
+ -0.003375347936525941,
+ -0.7641801238059998
+ ],
+ "min": [
+ -0.06163197010755539,
+ 0.6225405335426331,
+ -0.0653248131275177,
+ -0.7825579643249512
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 2880,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.000001072883606,
+ 1.0000003576278689,
+ 1
+ ],
+ "min": [
+ 1.0000004768371584,
+ 0.9999999403953552,
+ 0.999999463558197
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 576,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 3456,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.000002384189883741783,
+ 0.000002458690005369135,
+ 0.06483876705169678
+ ],
+ "min": [
+ -0.000002536919964768458,
+ 0.000002384189883741783,
+ 0.06483828276395798
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 2304,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.0364987850189209,
+ -0.6325404644012451,
+ 0.04193282127380371,
+ -0.749859094619751
+ ],
+ "min": [
+ -0.02474863827228546,
+ -0.6592763066291809,
+ -0.03008362464606762,
+ -0.7735469341278076
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 4032,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1,
+ 1.000000238418579,
+ 1.000000238418579
+ ],
+ "min": [
+ 0.9999996423721313,
+ 0.9999995231628418,
+ 0.9999995827674866
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 768,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 4608,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.0520395003259182,
+ 7.450579708745408e-9,
+ -0.000002585350102890516
+ ],
+ "min": [
+ -0.05204005911946297,
+ -5.96045985901128e-8,
+ -0.0000026747600259113824
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 3072,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.04680187255144119,
+ 0.999507486820221,
+ 0.002036086050793529,
+ 0.09058715403079988
+ ],
+ "min": [
+ -0.093629889190197,
+ 0.9950671792030336,
+ -0.00258980062790215,
+ 0.0184526015073061
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 5184,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000003576278689,
+ 1.000000238418579,
+ 1.0000009536743164
+ ],
+ "min": [
+ 0.9999998807907104,
+ 0.9999996423721313,
+ 1.000000238418579
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 960,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 5760,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.00003742050103028305,
+ 0.08800023794174194,
+ -0.00005880460230400786
+ ],
+ "min": [
+ -0.000037621699448209256,
+ 0.08799994736909866,
+ -0.000059304802562110126
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 3840,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.2951536476612091,
+ 0.9301012754440308,
+ -0.2815393805503845,
+ 0.3835828900337219
+ ],
+ "min": [
+ -0.13552021980285645,
+ 0.8065234422683716,
+ -0.4443180561065674,
+ -0.17752912640571597
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 6336,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000005960464478,
+ 1.0000001192092896,
+ 1.0000003576278689
+ ],
+ "min": [
+ 0.9999999403953552,
+ 0.9999996423721313,
+ 0.9999998211860656
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 1152,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 6912,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.013221889734268188,
+ 0.215499609708786,
+ 0.10933230072259904
+ ],
+ "min": [
+ 0.01322161965072155,
+ 0.2154994010925293,
+ 0.10933209955692293
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 4608,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.023567700758576393,
+ 0.02101488783955574,
+ 0.176296666264534,
+ -0.971515953540802
+ ],
+ "min": [
+ -0.0574759915471077,
+ -0.18002526462078097,
+ -0.15063291788101196,
+ -0.998132348060608
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 7488,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.9999998211860656,
+ 0.9999998211860656,
+ 0.9999999403953552
+ ],
+ "min": [
+ 0.9999991059303284,
+ 0.9999993443489076,
+ 0.9999994039535524
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 1344,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 8064,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.09332455694675446,
+ 0.1430000960826874,
+ 0.07814794778823853
+ ],
+ "min": [
+ -0.09332473576068878,
+ 0.14299990236759189,
+ 0.07814773917198181
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 5376,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.03372078761458397,
+ 0.0026474546175450087,
+ 0.207317128777504,
+ -0.9705979824066162
+ ],
+ "min": [
+ 0.006105833686888218,
+ -0.12215615808963776,
+ 0.003784916130825877,
+ -0.9994208216667176
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 8640,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000007152557373,
+ 1.0000003576278689,
+ 1.0000008344650269
+ ],
+ "min": [
+ 1.0000001192092896,
+ 0.9999998211860656,
+ 1.000000238418579
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 1536,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 9216,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.00003894419933203608,
+ -0.0879998430609703,
+ -0.00005919210161664523
+ ],
+ "min": [
+ -0.0000392795009247493,
+ -0.08800008893013,
+ -0.00005960090129519813
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 6144,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.2377220243215561,
+ 0.942186713218689,
+ 0.37760788202285767,
+ 0.2007839232683182
+ ],
+ "min": [
+ -0.2700891792774201,
+ 0.8732703924179077,
+ 0.2710656225681305,
+ -0.2673804461956024
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 9792,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.000000238418579,
+ 1.0000003576278689,
+ 1.0000001192092896
+ ],
+ "min": [
+ 0.999999701976776,
+ 0.9999997615814208,
+ 0.9999997615814208
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 1728,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 10368,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.035546209663152695,
+ -0.21549880504608157,
+ 0.10423330217599867
+ ],
+ "min": [
+ -0.03554638102650643,
+ -0.21549910306930545,
+ 0.10423299670219421
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 6912,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.00792065542191267,
+ 0.9315358996391296,
+ 0.0024673622101545334,
+ 0.41479358077049255
+ ],
+ "min": [
+ -0.15234939754009247,
+ 0.9063802361488342,
+ -0.08167753368616104,
+ 0.3280625641345978
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 10944,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000005960464478,
+ 1.0000001192092896,
+ 1.000000238418579
+ ],
+ "min": [
+ 1,
+ 0.9999996423721313,
+ 0.9999996423721313
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 1920,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 11520,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.03137049078941345,
+ -0.1430007964372635,
+ -0.11761150509119034
+ ],
+ "min": [
+ 0.03137030825018883,
+ -0.1430010050535202,
+ -0.11761169880628586
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 7680,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.22148266434669495,
+ 0.3926030695438385,
+ 0.08952529728412628,
+ -0.9178923964500428
+ ],
+ "min": [
+ 0.055695075541734695,
+ 0.277910977602005,
+ -0.015314305201172829,
+ -0.9438881278038024
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 12096,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000004768371584,
+ 1.0000004768371584,
+ 1.0000004768371584
+ ],
+ "min": [
+ 0.9999997615814208,
+ 0.9999997615814208,
+ 0.9999998807907104
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 2112,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 12672,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.028520189225673676,
+ 0.06762184202671051,
+ -0.06295985728502274
+ ],
+ "min": [
+ 0.028520019724965096,
+ 0.06762173771858215,
+ -0.06296010315418243
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 8448,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.013129070401191711,
+ 0.10440785437822342,
+ 0.004284336231648922,
+ -0.7728573679924011
+ ],
+ "min": [
+ -0.013805897906422617,
+ -0.6344362497329712,
+ -0.03212129324674606,
+ -0.9994977116584778
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 13248,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000001192092896,
+ 1.0000004768371584,
+ 1.000000238418579
+ ],
+ "min": [
+ 0.9999995231628418,
+ 1,
+ 0.9999995827674866
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 2304,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 13824,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.209164097905159,
+ 0.009055494330823421,
+ -0.16426970064640045
+ ],
+ "min": [
+ 0.20916390419006348,
+ 0.009055464528501034,
+ -0.1642698049545288
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 9216,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.009955321438610554,
+ -0.2965533435344696,
+ 0.003957682754844427,
+ -0.1911347657442093
+ ],
+ "min": [
+ -0.00983923487365246,
+ -0.9813112020492554,
+ -0.02193812094628811,
+ -0.9549583792686462
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 14400,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.000000238418579,
+ 0.999999463558197,
+ 1.0000001192092896
+ ],
+ "min": [
+ 0.999999463558197,
+ 0.999998927116394,
+ 0.9999993443489076
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 2496,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 14976,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.2757900059223175,
+ 0.0013972820015624166,
+ 0.004122554790228605
+ ],
+ "min": [
+ 0.27578991651535034,
+ 0.0013972449814900756,
+ 0.004122436046600342
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 9984,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.01264618057757616,
+ -0.8448027968406677,
+ 0.03285584971308708,
+ -0.15347692370414737
+ ],
+ "min": [
+ -0.045710742473602295,
+ -0.9879721403121948,
+ 0.007757793180644512,
+ -0.5345877408981323
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 15552,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000008344650269,
+ 1.0000009536743164,
+ 1.0000004768371584
+ ],
+ "min": [
+ 1.000000238418579,
+ 1.0000003576278689,
+ 0.9999997615814208
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 2688,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 16128,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.06558377295732498,
+ 0.00109061598777771,
+ 0.029291389510035515
+ ],
+ "min": [
+ -0.06558384746313095,
+ 0.001090570935048163,
+ 0.029291240498423576
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 10752,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.022798636928200725,
+ 0.5332140922546387,
+ -0.003377946326509118,
+ -0.844382643699646
+ ],
+ "min": [
+ 0.007516560610383749,
+ 0.22626954317092896,
+ -0.04913739487528801,
+ -0.972984254360199
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 16704,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000008344650269,
+ 1.0000003576278689,
+ 1.0000003576278689
+ ],
+ "min": [
+ 0.9999998211860656,
+ 0.999999701976776,
+ 0.9999995231628418
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 2880,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 17280,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.028557300567626953,
+ -0.0684543326497078,
+ -0.06295845657587051
+ ],
+ "min": [
+ 0.028557060286402702,
+ -0.06845436990261078,
+ -0.0629587471485138
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 11520,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.04037770628929138,
+ -0.2803998589515686,
+ 0.02151232957839966,
+ -0.32386553287506104
+ ],
+ "min": [
+ -0.009615562856197357,
+ -0.9458208084106444,
+ -0.006491139996796846,
+ -0.9590301513671876
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 17856,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.000000238418579,
+ 1.0000005960464478,
+ 1.0000005960464478
+ ],
+ "min": [
+ 0.9999994039535524,
+ 0.9999999403953552,
+ 0.9999998211860656
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 3072,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 18432,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.2608909010887146,
+ -0.00902603566646576,
+ 0.05167100951075554
+ ],
+ "min": [
+ 0.2608906924724579,
+ -0.009026064537465572,
+ 0.05167080089449883
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 12288,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.02468797937035561,
+ 0.19154119491577148,
+ 0.017835097387433052,
+ -0.6250466108322144
+ ],
+ "min": [
+ -0.013421673327684404,
+ -0.7804162502288818,
+ -0.031287722289562225,
+ -0.9999792575836182
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 19008,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000003576278689,
+ 1.0000007152557373,
+ 1.000001072883606
+ ],
+ "min": [
+ 0.999999463558197,
+ 1,
+ 0.999999701976776
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 3264,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 19584,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.2754603922367096,
+ -0.0014316890155896544,
+ -0.014104750007390976
+ ],
+ "min": [
+ 0.27546021342277527,
+ -0.0014317409368231893,
+ -0.014104840345680714
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 13056,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.022092316299676895,
+ 0.9990847110748292,
+ 0.04779285565018654,
+ 0.4428757429122925
+ ],
+ "min": [
+ -0.001671039150096476,
+ 0.8965795040130615,
+ 0.002310338197275996,
+ 0.0384783074259758
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 20160,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.9999999403953552,
+ 0.9999996423721313,
+ 1.000000238418579
+ ],
+ "min": [
+ 0.9999994039535524,
+ 0.9999991655349731,
+ 0.9999996423721313
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 4,
+ "byteOffset": 3456,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 2
+ ],
+ "min": [
+ 0.04166661947965622
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 20736,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ -0.06681966781616211,
+ -0.0010721459984779358,
+ 0.026351390406489372
+ ],
+ "min": [
+ -0.06681978702545166,
+ -0.001072190934792161,
+ 0.02635126002132893
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "byteOffset": 13824,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 0.003402489935979247,
+ 0.4966025054454804,
+ 0.1101396307349205,
+ -0.8675833940505981
+ ],
+ "min": [
+ -0.027623889967799187,
+ 0.26874634623527527,
+ -0.02591408602893353,
+ -0.9565747380256652
+ ],
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 5,
+ "byteOffset": 21312,
+ "componentType": 5126,
+ "count": 48,
+ "max": [
+ 1.0000004768371584,
+ 0.9999998211860656,
+ 0.9999994039535524
+ ],
+ "min": [
+ 0.9999995231628418,
+ 0.999999225139618,
+ 0.9999986886978148
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 7,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 19,
+ "max": [
+ 0.9971418380737304,
+ -4.371139894487897e-8,
+ 0.9996265172958374,
+ 0,
+ 4.3586464215650273e-8,
+ 1,
+ 4.3695074225524884e-8,
+ 0,
+ 0.9999366402626038,
+ 0,
+ 0.9971418380737304,
+ 0,
+ 1.1374080181121828,
+ 0.44450080394744873,
+ 1.0739599466323853,
+ 1
+ ],
+ "min": [
+ -0.9999089241027832,
+ -4.371139894487897e-8,
+ -0.9999366402626038,
+ 0,
+ -4.3707416352845037e-8,
+ 1,
+ -4.37086278282095e-8,
+ 0,
+ -0.9996265172958374,
+ 0,
+ -0.9999089241027832,
+ 0,
+ -1.189831018447876,
+ -0.45450031757354736,
+ -1.058603048324585,
+ 1
+ ],
+ "type": "MAT4"
+ }
+ ],
+ "materials": [
+ {
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0,
+ "texCoord": 0
+ },
+ "metallicFactor": 0,
+ "baseColorFactor": [
+ 1,
+ 1,
+ 1,
+ 1
+ ],
+ "roughnessFactor": 1
+ },
+ "emissiveFactor": [
+ 0,
+ 0,
+ 0
+ ],
+ "name": "Cesium_Man-effect",
+ "alphaMode": "OPAQUE",
+ "doubleSided": false
+ }
+ ],
+ "textures": [
+ {
+ "sampler": 0,
+ "source": 0
+ }
+ ],
+ "images": [
+ {
+ "uri": "CesiumMan_img0.jpg"
+ }
+ ],
+ "samplers": [
+ {
+ "magFilter": 9729,
+ "minFilter": 9986,
+ "wrapS": 10497,
+ "wrapT": 10497
+ }
+ ],
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteOffset": 0,
+ "byteLength": 28032,
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 28032,
+ "byteLength": 52368,
+ "byteStride": 8,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 80400,
+ "byteLength": 78552,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 158952,
+ "byteLength": 52368,
+ "byteStride": 16,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 211320,
+ "byteLength": 3648
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 214968,
+ "byteLength": 21888
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 236856,
+ "byteLength": 14592
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 251448,
+ "byteLength": 1216
+ }
+ ],
+ "buffers": [
+ {
+ "uri": "CesiumMan_data.bin",
+ "byteLength": 252664
+ }
+ ]
+}
\ No newline at end of file
diff --git a/sample/gltf/CesiumMan/CesiumMan_data.bin b/sample/gltf/CesiumMan/CesiumMan_data.bin
new file mode 100644
index 000000000..d78b75cfb
Binary files /dev/null and b/sample/gltf/CesiumMan/CesiumMan_data.bin differ
diff --git a/sample/gltf/CesiumMan/CesiumMan_img0.jpg b/sample/gltf/CesiumMan/CesiumMan_img0.jpg
new file mode 100644
index 000000000..ab1b72445
Binary files /dev/null and b/sample/gltf/CesiumMan/CesiumMan_img0.jpg differ
diff --git a/sample/gltf/CesiumMan/README.md b/sample/gltf/CesiumMan/README.md
new file mode 100644
index 000000000..20bd6ed63
--- /dev/null
+++ b/sample/gltf/CesiumMan/README.md
@@ -0,0 +1,10 @@
+# Cesium Man
+## Screenshot
+
+
+
+## License Information
+
+Donated by Cesium for glTF testing. Please follow the [Cesium Trademark Terms and Conditions](https://github.com/AnalyticalGraphicsInc/cesium/wiki/CesiumTrademark.pdf).
+
+This model is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
diff --git a/sample/gltf/CesiumMilkTruck/CesiumMilkTruck.gltf b/sample/gltf/CesiumMilkTruck/CesiumMilkTruck.gltf
new file mode 100644
index 000000000..0b46a38c7
--- /dev/null
+++ b/sample/gltf/CesiumMilkTruck/CesiumMilkTruck.gltf
@@ -0,0 +1,489 @@
+{
+ "asset": {
+ "generator": "Khronos glTF Blender I/O v1.0.5",
+ "version": "2.0"
+ },
+ "scene": 0,
+ "scenes": [
+ {
+ "name": "Scene",
+ "nodes": [
+ 5
+ ]
+ }
+ ],
+ "nodes": [
+ {
+ "mesh": 0,
+ "name": "Wheels",
+ "rotation": [
+ 0,
+ 0.08848588913679123,
+ 0,
+ -0.9960774183273315
+ ]
+ },
+ {
+ "children": [
+ 0
+ ],
+ "name": "Node",
+ "translation": [
+ 1.432669997215271,
+ 0,
+ -0.4277220070362091
+ ]
+ },
+ {
+ "mesh": 0,
+ "name": "Wheels.001",
+ "rotation": [
+ 0,
+ 0.08848588913679123,
+ 0,
+ -0.9960774183273315
+ ]
+ },
+ {
+ "children": [
+ 2
+ ],
+ "name": "Node.001",
+ "translation": [
+ -1.352329969406128,
+ 0,
+ -0.4277220070362091
+ ]
+ },
+ {
+ "children": [
+ 1,
+ 3
+ ],
+ "mesh": 1,
+ "name": "Cesium_Milk_Truck"
+ },
+ {
+ "children": [
+ 4
+ ],
+ "name": "Yup2Zup",
+ "rotation": [
+ 0.4999999701976776,
+ -0.5,
+ 0.5,
+ 0.4999999701976776
+ ]
+ }
+ ],
+ "animations": [
+ {
+ "channels": [
+ {
+ "sampler": 0,
+ "target": {
+ "node": 0,
+ "path": "rotation"
+ }
+ },
+ {
+ "sampler": 1,
+ "target": {
+ "node": 2,
+ "path": "rotation"
+ }
+ }
+ ],
+ "name": "Wheels",
+ "samplers": [
+ {
+ "input": 16,
+ "interpolation": "LINEAR",
+ "output": 17
+ },
+ {
+ "input": 16,
+ "interpolation": "LINEAR",
+ "output": 18
+ }
+ ]
+ }
+ ],
+ "materials": [
+ {
+ "name": "wheels",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0,
+ "texCoord": 0
+ },
+ "metallicFactor": 0,
+ "roughnessFactor": 1
+ }
+ },
+ {
+ "name": "truck",
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 1,
+ "texCoord": 0
+ },
+ "metallicFactor": 0,
+ "roughnessFactor": 1
+ }
+ },
+ {
+ "name": "glass",
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0,
+ 0.04050629958510399,
+ 0.021240700036287308,
+ 1
+ ],
+ "metallicFactor": 0,
+ "roughnessFactor": 1
+ }
+ },
+ {
+ "name": "window_trim",
+ "pbrMetallicRoughness": {
+ "baseColorFactor": [
+ 0.06400000303983688,
+ 0.06400000303983688,
+ 0.06400000303983688,
+ 1
+ ],
+ "metallicFactor": 0,
+ "roughnessFactor": 1
+ }
+ }
+ ],
+ "meshes": [
+ {
+ "name": "Wheels",
+ "primitives": [
+ {
+ "attributes": {
+ "POSITION": 0,
+ "NORMAL": 1,
+ "TEXCOORD_0": 2
+ },
+ "indices": 3,
+ "material": 0
+ }
+ ]
+ },
+ {
+ "name": "Cesium_Milk_Truck",
+ "primitives": [
+ {
+ "attributes": {
+ "POSITION": 4,
+ "NORMAL": 5,
+ "TEXCOORD_0": 6
+ },
+ "indices": 7,
+ "material": 1
+ },
+ {
+ "attributes": {
+ "POSITION": 8,
+ "NORMAL": 9,
+ "TEXCOORD_0": 10
+ },
+ "indices": 11,
+ "material": 2
+ },
+ {
+ "attributes": {
+ "POSITION": 12,
+ "NORMAL": 13,
+ "TEXCOORD_0": 14
+ },
+ "indices": 15,
+ "material": 3
+ }
+ ]
+ }
+ ],
+ "textures": [
+ {
+ "source": 0
+ },
+ {
+ "source": 0
+ }
+ ],
+ "images": [
+ {
+ "name": "CesiumMilkTruck.jpg",
+ "uri": "CesiumMilkTruck.jpg"
+ }
+ ],
+ "accessors": [
+ {
+ "bufferView": 0,
+ "componentType": 5126,
+ "count": 828,
+ "max": [
+ 0.4277999997138977,
+ 1.0579999685287476,
+ 0.4277999997138977
+ ],
+ "min": [
+ -0.4277999997138977,
+ -1.0579999685287476,
+ -0.4277999997138977
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "componentType": 5126,
+ "count": 828,
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "componentType": 5126,
+ "count": 828,
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 3,
+ "componentType": 5123,
+ "count": 2304,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 4,
+ "componentType": 5126,
+ "count": 2366,
+ "max": [
+ 2.437999963760376,
+ 1.3960000276565552,
+ -0.2667999863624573
+ ],
+ "min": [
+ -2.430910110473633,
+ -1.3960000276565552,
+ -2.5843698978424072
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 5,
+ "componentType": 5126,
+ "count": 2366,
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 6,
+ "componentType": 5126,
+ "count": 2366,
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 7,
+ "componentType": 5123,
+ "count": 5232,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 8,
+ "componentType": 5126,
+ "count": 151,
+ "max": [
+ 1.6011799573898315,
+ 1.3960000276565552,
+ -1.631850004196167
+ ],
+ "min": [
+ 0.22885000705718994,
+ -1.3960000276565552,
+ -2.3545401096343994
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 9,
+ "componentType": 5126,
+ "count": 151,
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 10,
+ "componentType": 5126,
+ "count": 151,
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 11,
+ "componentType": 5123,
+ "count": 168,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 12,
+ "componentType": 5126,
+ "count": 650,
+ "max": [
+ 1.62267005443573,
+ 1.100000023841858,
+ -1.5961999893188477
+ ],
+ "min": [
+ 0.1932000070810318,
+ -1.1100000143051147,
+ -2.3919999599456787
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 13,
+ "componentType": 5126,
+ "count": 650,
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 14,
+ "componentType": 5126,
+ "count": 650,
+ "type": "VEC2"
+ },
+ {
+ "bufferView": 15,
+ "componentType": 5123,
+ "count": 864,
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 16,
+ "componentType": 5126,
+ "count": 31,
+ "max": [
+ 1.25
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 17,
+ "componentType": 5126,
+ "count": 31,
+ "type": "VEC4"
+ },
+ {
+ "bufferView": 18,
+ "componentType": 5126,
+ "count": 31,
+ "type": "VEC4"
+ }
+ ],
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteLength": 9936,
+ "byteOffset": 0
+ },
+ {
+ "buffer": 0,
+ "byteLength": 9936,
+ "byteOffset": 9936
+ },
+ {
+ "buffer": 0,
+ "byteLength": 6624,
+ "byteOffset": 19872
+ },
+ {
+ "buffer": 0,
+ "byteLength": 4608,
+ "byteOffset": 26496
+ },
+ {
+ "buffer": 0,
+ "byteLength": 28392,
+ "byteOffset": 31104
+ },
+ {
+ "buffer": 0,
+ "byteLength": 28392,
+ "byteOffset": 59496
+ },
+ {
+ "buffer": 0,
+ "byteLength": 18928,
+ "byteOffset": 87888
+ },
+ {
+ "buffer": 0,
+ "byteLength": 10464,
+ "byteOffset": 106816
+ },
+ {
+ "buffer": 0,
+ "byteLength": 1812,
+ "byteOffset": 117280
+ },
+ {
+ "buffer": 0,
+ "byteLength": 1812,
+ "byteOffset": 119092
+ },
+ {
+ "buffer": 0,
+ "byteLength": 1208,
+ "byteOffset": 120904
+ },
+ {
+ "buffer": 0,
+ "byteLength": 336,
+ "byteOffset": 122112
+ },
+ {
+ "buffer": 0,
+ "byteLength": 7800,
+ "byteOffset": 122448
+ },
+ {
+ "buffer": 0,
+ "byteLength": 7800,
+ "byteOffset": 130248
+ },
+ {
+ "buffer": 0,
+ "byteLength": 5200,
+ "byteOffset": 138048
+ },
+ {
+ "buffer": 0,
+ "byteLength": 1728,
+ "byteOffset": 143248
+ },
+ {
+ "buffer": 0,
+ "byteLength": 124,
+ "byteOffset": 144976
+ },
+ {
+ "buffer": 0,
+ "byteLength": 496,
+ "byteOffset": 145100
+ },
+ {
+ "buffer": 0,
+ "byteLength": 496,
+ "byteOffset": 145596
+ }
+ ],
+ "buffers": [
+ {
+ "uri": "CesiumMilkTruck_data.bin",
+ "byteLength": 146092
+ }
+ ]
+}
diff --git a/sample/gltf/CesiumMilkTruck/CesiumMilkTruck.jpg b/sample/gltf/CesiumMilkTruck/CesiumMilkTruck.jpg
new file mode 100644
index 000000000..0bebaadc1
Binary files /dev/null and b/sample/gltf/CesiumMilkTruck/CesiumMilkTruck.jpg differ
diff --git a/sample/gltf/CesiumMilkTruck/CesiumMilkTruck_data.bin b/sample/gltf/CesiumMilkTruck/CesiumMilkTruck_data.bin
new file mode 100644
index 000000000..51e364673
Binary files /dev/null and b/sample/gltf/CesiumMilkTruck/CesiumMilkTruck_data.bin differ
diff --git a/sample/gltf/CesiumMilkTruck/README.md b/sample/gltf/CesiumMilkTruck/README.md
new file mode 100644
index 000000000..0c6bafdda
--- /dev/null
+++ b/sample/gltf/CesiumMilkTruck/README.md
@@ -0,0 +1,10 @@
+# Cesium Milk Truck
+## Screenshot
+
+
+
+## License Information
+
+Donated by Cesium for glTF testing. Please follow the [Cesium Trademark Terms and Conditions](https://github.com/AnalyticalGraphicsInc/cesium/wiki/CesiumTrademark.pdf).
+
+This model is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
diff --git a/sample/gltf/DamagedHelmet/DamagedHelmet.bin b/sample/gltf/DamagedHelmet/DamagedHelmet.bin
new file mode 100644
index 000000000..662eacc1d
Binary files /dev/null and b/sample/gltf/DamagedHelmet/DamagedHelmet.bin differ
diff --git a/sample/gltf/DamagedHelmet/DamagedHelmet.gltf b/sample/gltf/DamagedHelmet/DamagedHelmet.gltf
new file mode 100644
index 000000000..c61145a01
--- /dev/null
+++ b/sample/gltf/DamagedHelmet/DamagedHelmet.gltf
@@ -0,0 +1,204 @@
+{
+ "accessors" : [
+ {
+ "bufferView" : 0,
+ "componentType" : 5123,
+ "count" : 46356,
+ "max" : [
+ 14555
+ ],
+ "min" : [
+ 0
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 1,
+ "componentType" : 5126,
+ "count" : 14556,
+ "max" : [
+ 0.9424954056739807,
+ 0.8128451108932495,
+ 0.900973916053772
+ ],
+ "min" : [
+ -0.9474585652351379,
+ -1.18715500831604,
+ -0.9009949564933777
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 2,
+ "componentType" : 5126,
+ "count" : 14556,
+ "max" : [
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "min" : [
+ -1.0,
+ -1.0,
+ -1.0
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 3,
+ "componentType" : 5126,
+ "count" : 14556,
+ "max" : [
+ 0.9999759793281555,
+ 1.998665988445282
+ ],
+ "min" : [
+ 0.002448640065267682,
+ 1.0005531199858524
+ ],
+ "type" : "VEC2"
+ }
+ ],
+ "asset" : {
+ "generator" : "Khronos Blender glTF 2.0 exporter",
+ "version" : "2.0"
+ },
+ "bufferViews" : [
+ {
+ "buffer" : 0,
+ "byteLength" : 92712,
+ "byteOffset" : 0,
+ "target" : 34963
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 174672,
+ "byteOffset" : 92712,
+ "target" : 34962
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 174672,
+ "byteOffset" : 267384,
+ "target" : 34962
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 116448,
+ "byteOffset" : 442056,
+ "target" : 34962
+ }
+ ],
+ "buffers" : [
+ {
+ "byteLength" : 558504,
+ "uri" : "DamagedHelmet.bin"
+ }
+ ],
+ "images" : [
+ {
+ "uri" : "Default_albedo.jpg"
+ },
+ {
+ "uri" : "Default_metalRoughness.jpg"
+ },
+ {
+ "uri" : "Default_emissive.jpg"
+ },
+ {
+ "uri" : "Default_AO.jpg"
+ },
+ {
+ "uri" : "Default_normal.jpg"
+ }
+ ],
+ "materials" : [
+ {
+ "emissiveFactor" : [
+ 1.0,
+ 1.0,
+ 1.0
+ ],
+ "emissiveTexture" : {
+ "index" : 2
+ },
+ "name" : "Material_MR",
+ "normalTexture" : {
+ "index" : 4
+ },
+ "occlusionTexture" : {
+ "index" : 3
+ },
+ "pbrMetallicRoughness" : {
+ "baseColorTexture" : {
+ "index" : 0
+ },
+ "metallicRoughnessTexture" : {
+ "index" : 1
+ }
+ }
+ }
+ ],
+ "meshes" : [
+ {
+ "name" : "mesh_helmet_LP_13930damagedHelmet",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 2,
+ "POSITION" : 1,
+ "TEXCOORD_0" : 3
+ },
+ "indices" : 0,
+ "material" : 0
+ }
+ ]
+ }
+ ],
+ "nodes" : [
+ {
+ "mesh" : 0,
+ "name" : "node_damagedHelmet_-6514",
+ "rotation" : [
+ 0.7071068286895752,
+ 0.0,
+ -0.0,
+ 0.7071068286895752
+ ]
+ }
+ ],
+ "samplers" : [
+ {}
+ ],
+ "scene" : 0,
+ "scenes" : [
+ {
+ "name" : "Scene",
+ "nodes" : [
+ 0
+ ]
+ }
+ ],
+ "textures" : [
+ {
+ "sampler" : 0,
+ "source" : 0
+ },
+ {
+ "sampler" : 0,
+ "source" : 1
+ },
+ {
+ "sampler" : 0,
+ "source" : 2
+ },
+ {
+ "sampler" : 0,
+ "source" : 3
+ },
+ {
+ "sampler" : 0,
+ "source" : 4
+ }
+ ]
+}
diff --git a/sample/gltf/DamagedHelmet/Default_AO.jpg b/sample/gltf/DamagedHelmet/Default_AO.jpg
new file mode 100644
index 000000000..419f62840
Binary files /dev/null and b/sample/gltf/DamagedHelmet/Default_AO.jpg differ
diff --git a/sample/gltf/DamagedHelmet/Default_albedo.jpg b/sample/gltf/DamagedHelmet/Default_albedo.jpg
new file mode 100644
index 000000000..15d64855c
Binary files /dev/null and b/sample/gltf/DamagedHelmet/Default_albedo.jpg differ
diff --git a/sample/gltf/DamagedHelmet/Default_emissive.jpg b/sample/gltf/DamagedHelmet/Default_emissive.jpg
new file mode 100644
index 000000000..2de59e897
Binary files /dev/null and b/sample/gltf/DamagedHelmet/Default_emissive.jpg differ
diff --git a/sample/gltf/DamagedHelmet/Default_metalRoughness.jpg b/sample/gltf/DamagedHelmet/Default_metalRoughness.jpg
new file mode 100644
index 000000000..04874cb6e
Binary files /dev/null and b/sample/gltf/DamagedHelmet/Default_metalRoughness.jpg differ
diff --git a/sample/gltf/DamagedHelmet/Default_normal.jpg b/sample/gltf/DamagedHelmet/Default_normal.jpg
new file mode 100644
index 000000000..94ca20a2d
Binary files /dev/null and b/sample/gltf/DamagedHelmet/Default_normal.jpg differ
diff --git a/sample/gltf/DamagedHelmet/README.md b/sample/gltf/DamagedHelmet/README.md
new file mode 100644
index 000000000..7c75445de
--- /dev/null
+++ b/sample/gltf/DamagedHelmet/README.md
@@ -0,0 +1,15 @@
+# Damaged Helmet
+
+## Screenshot
+
+
+
+## License Information
+
+Battle Damaged Sci-fi Helmet - PBR by [theblueturtle_](https://sketchfab.com/theblueturtle_), published under a Creative Commons Attribution-NonCommercial license
+
+https://sketchfab.com/models/b81008d513954189a063ff901f7abfe4
+
+## Modifications
+
+The original model was built on an early draft of glTF 2.0 that did not become final. This new model has been imported and re-exported from Blender to bring it into alignment with the final release glTF 2.0 specification.
diff --git a/sample/gltf/Duck/Duck.gltf b/sample/gltf/Duck/Duck.gltf
new file mode 100644
index 000000000..b80c842ce
--- /dev/null
+++ b/sample/gltf/Duck/Duck.gltf
@@ -0,0 +1,219 @@
+{
+ "asset": {
+ "generator": "COLLADA2GLTF",
+ "version": "2.0"
+ },
+ "scene": 0,
+ "scenes": [
+ {
+ "nodes": [
+ 0
+ ]
+ }
+ ],
+ "nodes": [
+ {
+ "children": [
+ 2,
+ 1
+ ],
+ "matrix": [
+ 0.009999999776482582,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.009999999776482582,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.009999999776482582,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0
+ ]
+ },
+ {
+ "matrix": [
+ -0.7289686799049377,
+ 0.0,
+ -0.6845470666885376,
+ 0.0,
+ -0.4252049028873444,
+ 0.7836934328079224,
+ 0.4527972936630249,
+ 0.0,
+ 0.5364750623703003,
+ 0.6211478114128113,
+ -0.571287989616394,
+ 0.0,
+ 400.1130065917969,
+ 463.2640075683594,
+ -431.0780334472656,
+ 1.0
+ ],
+ "camera": 0
+ },
+ {
+ "mesh": 0
+ }
+ ],
+ "cameras": [
+ {
+ "perspective": {
+ "aspectRatio": 1.5,
+ "yfov": 0.6605925559997559,
+ "zfar": 10000.0,
+ "znear": 1.0
+ },
+ "type": "perspective"
+ }
+ ],
+ "meshes": [
+ {
+ "primitives": [
+ {
+ "attributes": {
+ "NORMAL": 1,
+ "POSITION": 2,
+ "TEXCOORD_0": 3
+ },
+ "indices": 0,
+ "mode": 4,
+ "material": 0
+ }
+ ],
+ "name": "LOD3spShape"
+ }
+ ],
+ "accessors": [
+ {
+ "bufferView": 0,
+ "byteOffset": 0,
+ "componentType": 5123,
+ "count": 12636,
+ "max": [
+ 2398
+ ],
+ "min": [
+ 0
+ ],
+ "type": "SCALAR"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 2399,
+ "max": [
+ 0.9995989799499512,
+ 0.999580979347229,
+ 0.9984359741210938
+ ],
+ "min": [
+ -0.9990839958190918,
+ -1.0,
+ -0.9998319745063782
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 1,
+ "byteOffset": 28788,
+ "componentType": 5126,
+ "count": 2399,
+ "max": [
+ 96.17990112304688,
+ 163.97000122070313,
+ 53.92519760131836
+ ],
+ "min": [
+ -69.29850006103516,
+ 9.929369926452637,
+ -61.32819747924805
+ ],
+ "type": "VEC3"
+ },
+ {
+ "bufferView": 2,
+ "byteOffset": 0,
+ "componentType": 5126,
+ "count": 2399,
+ "max": [
+ 0.9833459854125976,
+ 0.9800369739532472
+ ],
+ "min": [
+ 0.026409000158309938,
+ 0.01996302604675293
+ ],
+ "type": "VEC2"
+ }
+ ],
+ "materials": [
+ {
+ "pbrMetallicRoughness": {
+ "baseColorTexture": {
+ "index": 0
+ },
+ "metallicFactor": 0.0
+ },
+ "emissiveFactor": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "name": "blinn3-fx"
+ }
+ ],
+ "textures": [
+ {
+ "sampler": 0,
+ "source": 0
+ }
+ ],
+ "images": [
+ {
+ "uri": "DuckCM.png"
+ }
+ ],
+ "samplers": [
+ {
+ "magFilter": 9729,
+ "minFilter": 9986,
+ "wrapS": 10497,
+ "wrapT": 10497
+ }
+ ],
+ "bufferViews": [
+ {
+ "buffer": 0,
+ "byteOffset": 76768,
+ "byteLength": 25272,
+ "target": 34963
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 0,
+ "byteLength": 57576,
+ "byteStride": 12,
+ "target": 34962
+ },
+ {
+ "buffer": 0,
+ "byteOffset": 57576,
+ "byteLength": 19192,
+ "byteStride": 8,
+ "target": 34962
+ }
+ ],
+ "buffers": [
+ {
+ "byteLength": 102040,
+ "uri": "Duck0.bin"
+ }
+ ]
+}
diff --git a/sample/gltf/Duck/Duck0.bin b/sample/gltf/Duck/Duck0.bin
new file mode 100644
index 000000000..5f01f88ac
Binary files /dev/null and b/sample/gltf/Duck/Duck0.bin differ
diff --git a/sample/gltf/Duck/DuckCM.png b/sample/gltf/Duck/DuckCM.png
new file mode 100644
index 000000000..9fa2dd4cc
Binary files /dev/null and b/sample/gltf/Duck/DuckCM.png differ
diff --git a/sample/gltf/Duck/README.md b/sample/gltf/Duck/README.md
new file mode 100644
index 000000000..9cbe72301
--- /dev/null
+++ b/sample/gltf/Duck/README.md
@@ -0,0 +1,14 @@
+# Duck
+## Screenshot
+
+
+
+## License Information
+
+Copyright 2006 Sony Computer Entertainment Inc.
+
+Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
+
+https://web.archive.org/web/20160320123355/http://research.scea.com/scea_shared_source_license.html
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
diff --git a/scripts/Linux/0_setup_env.sh b/scripts/Linux/0_setup_env.sh
new file mode 100644
index 000000000..f61a4bb0d
--- /dev/null
+++ b/scripts/Linux/0_setup_env.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+# this is a script shell sets up an ubuntu (18.04, 20.04 and 22.04) environment where
+# MeshLab can be compiled.
+#
+# Run this script if you never installed any of the MeshLab dependencies.
+
+DONT_INSTALL_QT=false
+DONT_INSTALL_CGAL_BOOST=false
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ --dont_install_qt)
+ DONT_INSTALL_QT=true
+ shift # past argument=value
+ ;;
+ --dont_install_cgal_and_boost)
+ DONT_INSTALL_CGAL_BOOST=true
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+sudo apt-get update
+echo "=== installing mesa packages..."
+sudo apt-get install -y mesa-common-dev libglu1-mesa-dev
+
+echo "=== installing cmake, patchelf, gmp, mpfr and xcerces-c..."
+sudo apt-get install -y cmake ninja-build patchelf libgmp-dev libmpfr-dev libxerces-c-dev
+
+if [ "$DONT_INSTALL_QT" = false ] ; then
+ echo "=== installing qt packages..."
+ sudo apt-get install -y qt5-default qttools5-dev-tools qtdeclarative5-dev
+else
+ echo "=== jumping installation of qt packages..."
+fi
+
+# libraries that qt requires in any case
+echo "=== intalling libraries required for qt deployment..."
+sudo apt-get install -y libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev
+
+# possibility to use always system libraries starting from ubuntu 20.04, since cgal is header only
+if [ "$DONT_INSTALL_CGAL_BOOST" = false ] ; then
+ echo "=== installing cgal and boost..."
+ sudo apt-get install -y libcgal-dev libboost-all-dev
+else
+ echo "=== jumping installation of cgal and boost packages..."
+fi
diff --git a/scripts/Linux/0_setup_env_ubuntu.sh b/scripts/Linux/0_setup_env_ubuntu.sh
deleted file mode 100644
index 080a136ae..000000000
--- a/scripts/Linux/0_setup_env_ubuntu.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-# this is a script shell sets up an ubuntu (16.04, 18.04, 20.04) environment where
-# MeshLab can be compiled.
-#
-# Run this script if you never installed any of the MeshLab dependencies.
-
-sudo apt-get update
-sudo apt-get install -y qt5-default qttools5-dev-tools qtdeclarative5-dev
-sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libglew-dev lib3ds-dev libeigen3-dev
-sudo apt-get install -y libopenctm-dev libgmp-dev libqhull-dev patchelf cmake
diff --git a/scripts/Linux/1_build.sh b/scripts/Linux/1_build.sh
index 3c3e685f2..d85b751fb 100644
--- a/scripts/Linux/1_build.sh
+++ b/scripts/Linux/1_build.sh
@@ -1,47 +1,50 @@
#!/bin/bash
-# this is a script shell for compiling meshlab in a Linux environment.
-# Requires a Qt environment which is set-up properly, and an accessible
-# cmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src/build
-# directory, and installed in $BUILD_PATH/../install.
-#
-# You can give as argument the BUILD_PATH and the INSTALL_PATH in the
-# following way:
-# sh linux_build.sh --build_path=/path/to/build --install_path=/path/to/install
-# -b and -i arguments are also supported.
#default paths wrt the script folder
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-SOURCE_PATH=$SCRIPTS_PATH/../../src
+SOURCE_PATH=$SCRIPTS_PATH/../..
BUILD_PATH=$SOURCE_PATH/build
INSTALL_PATH=$SOURCE_PATH/install/usr/
-CORES="-j4"
DOUBLE_PRECISION_OPTION=""
+NIGHTLY_OPTION=""
+QT_DIR=""
+CCACHE=""
#check parameters
for i in "$@"
do
case $i in
+ -s=*|--source_path=*)
+ SOURCE_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-b=*|--build_path=*)
- BUILD_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ BUILD_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"/usr/
- shift # past argument=value
- ;;
- -j*)
- CORES=$i
- shift # past argument=value
- ;;
- --double_precision)
- DOUBLE_PRECISION_OPTION="-DBUILD_WITH_DOUBLE_SCALAR=ON"
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"/usr/
+ shift # past argument=value
+ ;;
+ -d|--double_precision)
+ DOUBLE_PRECISION_OPTION="-DMESHLAB_BUILD_WITH_DOUBLE_SCALAR=ON"
+ shift # past argument=value
+ ;;
+ -n|--nightly)
+ NIGHTLY_OPTION="-DMESHLAB_IS_NIGHTLY_VERSION=ON"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR=${i#*=}
+ shift # past argument=value
+ ;;
+ --ccache)
+ CCACHE="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
@@ -60,7 +63,13 @@ fi
BUILD_PATH=$(realpath $BUILD_PATH)
INSTALL_PATH=$(realpath $INSTALL_PATH)
+if [ ! -z "$QT_DIR" ]
+then
+ export Qt5_DIR=$QT_DIR
+fi
+
cd $BUILD_PATH
-cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $SOURCE_PATH
-make $CORES
-make install
+export NINJA_STATUS="[%p (%f/%t) ] "
+cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $CCACHE $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $SOURCE_PATH
+ninja
+ninja install
diff --git a/scripts/Linux/2_deploy.sh b/scripts/Linux/2_deploy.sh
index aa89e5100..56e788482 100644
--- a/scripts/Linux/2_deploy.sh
+++ b/scripts/Linux/2_deploy.sh
@@ -1,48 +1,47 @@
#!/bin/bash
-# This is a script shell for deploying a meshlab-portable folder.
-# Requires a properly built MeshLab (see 1_build.sh).
-#
-# This script can be run only in the oldest supported linux distro
-# due to linuxdeployqt tool choice (see https://github.com/probonopd/linuxdeployqt/issues/340).
-#
-# Without given arguments, the folder that will be deployed is meshlab/src/install, which
-# should be the path where MeshLab has been installed (default output of 1_build.sh).
-#
-# You can give as argument the path where you installed MeshLab.
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-INSTALL_PATH=$SCRIPTS_PATH/../../src/install
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+QT_DIR_OPTION=""
+PACKAGES_PATH=$SCRIPTS_PATH/../../packages
#checking for parameters
for i in "$@"
do
case $i in
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR_OPTION=-qt=${i#*=}
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
-bash $SCRIPTS_PATH/resources/make_bundle.sh $INSTALL_PATH
+# The script will terminate after the first line that fails
+set -e
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_PATH/usr/lib/meshlab
-$SCRIPTS_PATH/resources/linuxdeployqt $INSTALL_PATH/usr/share/applications/meshlab.desktop \
- -bundle-non-qt-libs \
- -executable=$INSTALL_PATH/usr/lib/meshlab/plugins/libfilter_sketchfab.so \
- -executable=$INSTALL_PATH/usr/lib/meshlab/plugins/libio_3ds.so \
- -executable=$INSTALL_PATH/usr/lib/meshlab/plugins/libio_ctm.so
+bash $SCRIPTS_PATH/internal/2a_make_bundle.sh -i=$INSTALL_PATH
+echo "======= Bundle created ======="
-chmod +x $INSTALL_PATH/usr/bin/meshlab
-rm $INSTALL_PATH/AppRun
+bash $SCRIPTS_PATH/internal/2b_deb.sh -i=$INSTALL_PATH -p=$PACKAGES_PATH
-cp $SCRIPTS_PATH/resources/AppRunMeshLab $INSTALL_PATH/
-mv $INSTALL_PATH/AppRunMeshLab $INSTALL_PATH/AppRun
-chmod +x $INSTALL_PATH/AppRun
+echo "======= Deb Created ======="
-#at this point, distrib folder contains all the files necessary to execute meshlab
-echo "$INSTALL_PATH is now a self contained meshlab application"
+bash $SCRIPTS_PATH/internal/2c_portable.sh -i=$INSTALL_PATH $QT_DIR_OPTION
+
+echo "======= Portable Version Created ======="
+
+bash $SCRIPTS_PATH/internal/2d_appimage.sh -i=$INSTALL_PATH -p=$PACKAGES_PATH
+
+echo "======= AppImage Created ======="
diff --git a/scripts/Linux/3_appimage.sh b/scripts/Linux/3_appimage.sh
deleted file mode 100644
index c4155f16e..000000000
--- a/scripts/Linux/3_appimage.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-# This is a script shell for setting up the AppImage bundle for linux
-# Requires a properly built meshlab, boundled and deployed (see linux_deploy.sh)
-# inside the directory given as argument
-#
-# Without given arguments, MeshLab AppImage will be placed in the src
-# directory.
-#
-# You can give as argument the path of the bundle (default is src/install),
-# and the AppImage will be placed in the parent directory (src)
-
-SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-INSTALL_PATH=$SCRIPTS_PATH/../../src/install
-ML_VERSION=$(cat $SCRIPTS_PATH/../../ML_VERSION)
-
-
-#checking for parameters
-for i in "$@"
-do
-case $i in
- -i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
- --double_precision)
- ML_VERSION=${ML_VERSION}d
- shift # past argument=value
- ;;
- *)
- # unknown option
- ;;
-esac
-done
-
-PARENT_NAME="$(dirname $INSTALL_PATH)"
-
-export VERSION=$ML_VERSION
-
-$SCRIPTS_PATH/resources/appimagetool $INSTALL_PATH
-mv MeshLab-$VERSION*.AppImage $PARENT_NAME/MeshLab$VERSION-linux.AppImage
-
-#at this point, distrib folder contains all the files necessary to execute meshlab
-echo MeshLab$VERSION-linux.AppImage generated
diff --git a/scripts/Linux/README.md b/scripts/Linux/README.md
index e83989bab..fe6ea23d4 100644
--- a/scripts/Linux/README.md
+++ b/scripts/Linux/README.md
@@ -1,39 +1,40 @@
# Linux Scripts
-This folder contains a series of scripts to build and deploy MeshLab under a Linux environment (tested on Ubuntu 16.04, 18.04 and 20.04).
+This folder contains a series of scripts to build and deploy MeshLab under a Linux environment (tested on Ubuntu 18.04, 20.04 and 22.04).
-* `0_setup_env_ubuntu.sh`: this script installs all the required dependencies that are necessary to build MeshLab in an Ubuntu distro (tested in 16.04, 18.04 and 20.04). If you never installed Qt and other libraries, you should run it before any other script;
-* `1_build.sh`: this script builds MeshLab in a Linux environment:
- * it requires a properly set Qt environment (see `0_setup_env_ubuntu.sh`);
- * takes as arguments:
- * the build directory (default: `src/build`): `--build_path=path/to/build`
- * the install directory (default: `src/install`): `--install_path=path/to/install`
- * the number of cores used to build MeshLab (default: `-j4`)`
- * the possibility to build MeshLab with double precision scalar: `--double_precision`
-* `2_deploy.sh`: this script makes the given path a portable version of MeshLab. Takes as arguments:
- * the path where the output install path of the `1_build.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
-* `3_appimage.sh`: this script computes, starting from the portable folder of MeshLab, an [AppImage](https://appimage.org/) that can be run in a Linux Environment without dependencies. Takes as arguments:
- * the path where the output install path of the `2_deploy.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
- * if MeshLab has been built with double precision scalar, add: `--double_precision`
-* `make_it.sh`: this script builds, deploys and generates an [AppImage](https://appimage.org/) that can be run in a Linux Environment without dependencies. Arguments are the same of the `1_build.sh` script.
+## Note about Qt
-__NOTE__: `linux_deploy.sh`and `linux_make_it.sh` use [LinuxDeployQt](https://github.com/probonopd/linuxdeployqt), which allows to deploy applications **only running the oldest supported linux distro** (see [this](https://github.com/probonopd/linuxdeployqt/issues/340)) in order to guarantee the largest support possible. Therefore, before running these scripts, be sure that your Linux distribution is the oldest supported one.
+Old versions of Ubuntu (< than 22.04) are shipped with old versions of Qt, but MeshLab requires Qt 5.15.
+Therefore, you must install manually Qt separatelly in your system. You can then give the path of the Qt installation
+directory to the various scripts, or you can add Qt to your `LD_LIBRARY_PATH`.
-## Examples
+The `0_setup_env.sh` script won't install qt from apt if you pass the argument `dont_install_qt`.
-Building MeshLab on a clean Linux environment (build placed in `meshlab/src/build`):
+## Dependencies
- git clone --recursive https://github.com/cnr-isti-vclab/meshlab
- bash meshlab/scripts/Linux/0_setup_env_ubuntu.sh
- bash meshlab/scripts/Linux/1_build.sh
+Dependencies are automatically installed by the `0_setup_env.sh` script, which uses [`apt-get`](https://linux.die.net/man/8/apt-get) as package manager.
+Be sure to have `apt-get` installed before running this script.
-Building and generating AppImage on a clean Ubuntu 16.04 (last supported distro) environment:
-* build directory: `./meshlab-build`
-* install directory: `./meshlab-install`
-* AppImage path: `./`
+Libraries installed by the `0_setup_env.sh` are the following:
+ - Required by MeshLab:
+ - `mesa-common-dev`
+ - `libglu1-mesa-dev`
+ - `cmake`
+ - `ninja-build`
+ - `patchelf` (for deploy stage)
+ - Required by Qt5:
+ - `libxcb-icccm4-dev`
+ - `libxcb-image0-dev`
+ - `libxcb-keysyms1-dev`
+ - `libxcb-render-util0-dev`
+ - `libxcb-xinerama0-dev`
+ - Optional:
+ - `libgmp-dev` and `libmpfr-dev` (required by cgal)
+ - `libxerces-c-dev` (required by libe57)
+ - `libcgal-dev` and `libboost-all-dev` (required by several MeshLab plugins)
-```
-git clone --recursive https://github.com/cnr-isti-vclab/meshlab
-bash meshlab/scripts/Linux/0_setup_env_ubuntu.sh
-bash meshlab/scripts/Linux/make_it.sh --build_path="./meshlab-build" --install_path="./meshlab-install"
-```
+The script won't install `cgal` and `boost` (and then they will be downloaded by `cmake` during configuration) if you pass the argument `--dont_install_cgal_and_boost`.
+
+## Note about deployment and AppImage packaging on Linux
+
+To deploy MeshLab and make it portable, we use the tool [linuxdeploy](https://github.com/linuxdeploy/linuxdeploy). The authors of this tool suggest to use the last still-supported LTS version of Linux when deploying and generating an AppImage, in order to provide wide support of the application.
\ No newline at end of file
diff --git a/scripts/Linux/internal/2a_make_bundle.sh b/scripts/Linux/internal/2a_make_bundle.sh
new file mode 100644
index 000000000..f0aa31bd6
--- /dev/null
+++ b/scripts/Linux/internal/2a_make_bundle.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/../
+RESOURCES_PATH=$SCRIPTS_PATH/../../resources
+SOURCE_PATH=$SCRIPTS_PATH/../../src
+INSTALL_PATH=$SOURCE_PATH/../install
+
+#check parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+#check if we have an exec in distrib
+if ! [ -f $INSTALL_PATH/usr/bin/meshlab ]
+then
+ echo "ERROR: meshlab bin not found inside $INSTALL_PATH/usr/bin/"
+ exit 1
+fi
+
+mkdir -p $INSTALL_PATH/usr/share/doc/meshlab
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/256x256@2x/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/256x256/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/48x48@2x/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/48x48/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/32x32@2x/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/32x32/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/24x24@2x/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/24x24/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/22x22@2x/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/22x22/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/16x16@2x/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/16x16/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/8x8@2x/apps/
+mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/8x8/apps/
+
+cp $RESOURCES_PATH/linux/meshlab.desktop $INSTALL_PATH/usr/share/applications/meshlab.desktop
+cp $RESOURCES_PATH/icons/meshlab512.png $INSTALL_PATH/usr/share/icons/Yaru/256x256@2x/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab256.png $INSTALL_PATH/usr/share/icons/Yaru/256x256/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab96.png $INSTALL_PATH/usr/share/icons/Yaru/48x48@2x/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab48.png $INSTALL_PATH/usr/share/icons/Yaru/48x48/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab64.png $INSTALL_PATH/usr/share/icons/Yaru/32x32@2x/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab32.png $INSTALL_PATH/usr/share/icons/Yaru/32x32/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab48.png $INSTALL_PATH/usr/share/icons/Yaru/24x24@2x/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab24.png $INSTALL_PATH/usr/share/icons/Yaru/24x24/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab44.png $INSTALL_PATH/usr/share/icons/Yaru/22x22@2x/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab22.png $INSTALL_PATH/usr/share/icons/Yaru/22x22/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab32.png $INSTALL_PATH/usr/share/icons/Yaru/16x16@2x/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab16.png $INSTALL_PATH/usr/share/icons/Yaru/16x16/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab16.png $INSTALL_PATH/usr/share/icons/Yaru/8x8@2x/apps/meshlab.png
+cp $RESOURCES_PATH/icons/meshlab8.png $INSTALL_PATH/usr/share/icons/Yaru/8x8/apps/meshlab.png
+cp $RESOURCES_PATH/LICENSE.txt $INSTALL_PATH/usr/share/doc/meshlab/
+cp $RESOURCES_PATH/privacy.txt $INSTALL_PATH/usr/share/doc/meshlab/
+cp $RESOURCES_PATH/readme.txt $INSTALL_PATH/usr/share/doc/meshlab/
+
+for plugin in $INSTALL_PATH/usr/lib/meshlab/plugins/*.so
+do
+ # allow plugins to find linked libraries in usr/lib, usr/lib/meshlab and usr/lib/meshlab/plugins
+ patchelf --set-rpath '$ORIGIN/../../:$ORIGIN/../:$ORIGIN' $plugin
+done
+
+chmod +x $INSTALL_PATH/usr/bin/meshlab
\ No newline at end of file
diff --git a/scripts/Linux/internal/2b_deb.sh b/scripts/Linux/internal/2b_deb.sh
new file mode 100644
index 000000000..f566465bc
--- /dev/null
+++ b/scripts/Linux/internal/2b_deb.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+RESOURCES_PATH=$SCRIPTS_PATH/../../resources
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+PACKAGES_PATH=$SCRIPTS_PATH/../../packages
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+mkdir $PACKAGES_PATH
diff --git a/scripts/Linux/internal/2c_portable.sh b/scripts/Linux/internal/2c_portable.sh
new file mode 100644
index 000000000..4cc5f2df1
--- /dev/null
+++ b/scripts/Linux/internal/2c_portable.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+shopt -s extglob
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+RESOURCES_PATH=$SCRIPTS_PATH/../../resources
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+QT_DIR=""
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR=${i#*=}
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+if [ ! -z "$QT_DIR" ]
+then
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QT_DIR/lib
+ export QMAKE=$QT_DIR/bin/qmake
+fi
+
+# Make sure that deploy succeeds before we start deleting files
+if $RESOURCES_PATH/linux/linuxdeploy --appdir=$INSTALL_PATH --plugin qt; then
+ # after deploy, all required libraries are placed into usr/lib, therefore we can remove the ones in
+ # usr/lib/meshlab (except for the ones that are loaded at runtime)
+ cd $INSTALL_PATH/usr/lib/meshlab
+ rm -v !("libIFXCore.so"|"libIFXExporting.so"|"libIFXScheduling.so")
+
+ echo "$INSTALL_PATH is now a self contained meshlab application"
+
+else
+ echo "linuxdeploy failed with error code $?. Script was not completed successfully."
+ exit 1
+fi
diff --git a/scripts/Linux/internal/2d_appimage.sh b/scripts/Linux/internal/2d_appimage.sh
new file mode 100644
index 000000000..5dd05a7cd
--- /dev/null
+++ b/scripts/Linux/internal/2d_appimage.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+RESOURCES_PATH=$SCRIPTS_PATH/../../resources
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+PACKAGES_PATH=$SCRIPTS_PATH/../../packages
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+$RESOURCES_PATH/linux/linuxdeploy --appdir=$INSTALL_PATH \
+ --output appimage
+
+#get version
+IFS=' ' #space delimiter
+STR_VERSION=$($INSTALL_PATH/AppRun --version)
+read -a strarr <<< "$STR_VERSION"
+ML_VERSION=${strarr[1]} #get the meshlab version from the string
+
+mkdir $PACKAGES_PATH
+mv MeshLab-*.AppImage $PACKAGES_PATH/MeshLab$ML_VERSION-linux.AppImage
\ No newline at end of file
diff --git a/scripts/Linux/resources/snap/README.md b/scripts/Linux/internal/snap/README.md
similarity index 100%
rename from scripts/Linux/resources/snap/README.md
rename to scripts/Linux/internal/snap/README.md
diff --git a/scripts/Linux/resources/snap/meshlab.desktop b/scripts/Linux/internal/snap/meshlab.desktop
similarity index 100%
rename from scripts/Linux/resources/snap/meshlab.desktop
rename to scripts/Linux/internal/snap/meshlab.desktop
diff --git a/scripts/Linux/resources/snap/snap_noversion.yaml b/scripts/Linux/internal/snap/snap_noversion.yaml
similarity index 90%
rename from scripts/Linux/resources/snap/snap_noversion.yaml
rename to scripts/Linux/internal/snap/snap_noversion.yaml
index 014fd9b3b..9478e7862 100644
--- a/scripts/Linux/resources/snap/snap_noversion.yaml
+++ b/scripts/Linux/internal/snap/snap_noversion.yaml
@@ -18,9 +18,14 @@ apps:
meshlab:
command: AppRun
extensions: [kde-neon]
- plugs: [home, opengl, removable-media]
desktop: usr/share/applications/meshlab.desktop
-
+ environment:
+ DISABLE_WAYLAND: 1
+ plugs:
+ - home
+ - opengl
+ - removable-media
+ - mount-observe
parts:
meshlab:
@@ -43,6 +48,9 @@ parts:
- patchelf
- rsync
- libqt5opengl5-dev
+ - libcgal-dev
+ - libboost-all-dev
+ - libxerces-c-dev
stage-packages:
- lib3ds-1-3
- libgomp1
diff --git a/scripts/Linux/make_it.sh b/scripts/Linux/make_it.sh
index 08e35e971..51a3121f3 100644
--- a/scripts/Linux/make_it.sh
+++ b/scripts/Linux/make_it.sh
@@ -1,57 +1,53 @@
#!/bin/bash
-# This is a script shell for compiling and deploying MeshLab in a Linux environment.
-#
-# This script can be run only in the oldest supported linux distro
-# due to linuxdeployqt tool choice (see https://github.com/probonopd/linuxdeployqt/issues/340).
-#
-# Requires a Qt environment which is set-up properly, and an accessible
-# cmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src/build,
-# the folder meshlab/src/install will be a portable version of MeshLab and
-# the AppImage will be placed in meshlab/src.
-#
-# You can give as argument the build path, the install path (that will contain
-# the portable version of MeshLab), and the number of cores to use to build MeshLab
-# (default: 4).
-# The AppImage will be placed in the parent directory of the install path.
-#
-# Example of call:
-# bash make_it.sh --build_path=path/to/build --install_path=path/to/install -j8
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-SOURCE_PATH=$SCRIPTS_PATH/../../src
-BUILD_PATH=$SOURCE_PATH/build
-INSTALL_PATH=$SOURCE_PATH/install
-CORES="-j4"
+SOURCE_PATH=$SCRIPTS_PATH/../..
+BUILD_PATH=$SOURCE_PATH/../build
+INSTALL_PATH=$SOURCE_PATH/../install
+PACKAGE_PATH=$SOURCE_PATH/../packages
+
DOUBLE_PRECISION_OPTION=""
+NIGHTLY_OPTION=""
+QT_DIR_OPTION=""
+CCACHE_OPTION=""
#check parameters
for i in "$@"
do
case $i in
-b=*|--build_path=*)
- BUILD_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ BUILD_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"/usr/
- shift # past argument=value
- ;;
- -j*)
- CORES=$i
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"/usr/
+ shift # past argument=value
+ ;;
+ -p=*|--package_path=*)
+ PACKAGE_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
--double_precision)
- DOUBLE_PRECISION_OPTION="--double_precision"
- shift # past argument=value
- ;;
+ DOUBLE_PRECISION_OPTION="--double_precision"
+ shift # past argument=value
+ ;;
+ -n|--nightly)
+ NIGHTLY_OPTION="--nightly"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR_OPTION=-qt=${i#*=}
+ shift # past argument=value
+ ;;
+ --ccache)
+ CCACHE_OPTION="--ccache"
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
-sh $SCRIPTS_PATH/1_build.sh -b=$BUILD_PATH -i=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $CORES
-sh $SCRIPTS_PATH/2_deploy.sh -i=$INSTALL_PATH
-sh $SCRIPTS_PATH/3_appimage.sh -i=$INSTALL_PATH $DOUBLE_PRECISION_OPTION
+bash $SCRIPTS_PATH/1_build.sh -b=$BUILD_PATH -i=$INSTALL_PATH $NIGHTLY_OPTION $DOUBLE_PRECISION_OPTION $QT_DIR_OPTION $CCACHE_OPTION
+bash $SCRIPTS_PATH/2_deploy.sh -i=$INSTALL_PATH -p=$PACKAGE_PATH $QT_DIR_OPTION
diff --git a/scripts/Linux/qmake/linux_appimages.sh b/scripts/Linux/qmake/linux_appimages.sh
deleted file mode 100644
index 795f52c62..000000000
--- a/scripts/Linux/qmake/linux_appimages.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-# This is a script shell for setting up the AppImage bundle for linux
-# Requires a properly built meshlab, boundled and deployed (see linux_deploy.sh)
-# inside the directory given as argument
-#
-# Without given arguments, MeshLab AppImage(s) will be placed in the meshlab
-# directory.
-#
-# You can give as argument the DISTRIB_PATH.
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- DISTRIB_PATH="../../../distrib"
-else
- DISTRIB_PATH=$(realpath $1)
-fi
-
-cd "$(dirname "$(realpath "$0")")"; #move to script directory
-INSTALL_PATH=$(pwd)/../
-
-cd $DISTRIB_PATH
-PARENT_NAME="$(basename $DISTRIB_PATH)"
-
-export VERSION=$(cat $INSTALL_PATH/../../ML_VERSION)
-
-cd ..
-
-#mv $PARENT_NAME/usr/share/applications/meshlab.desktop .
-
-mv $PARENT_NAME/AppRun $PARENT_NAME/AppRunMeshLab
-mv $PARENT_NAME/AppRunMeshLabServer $PARENT_NAME/AppRun
-rm $PARENT_NAME/*.desktop
-cp $PARENT_NAME/usr/share/applications/meshlab_server.desktop $PARENT_NAME/
-
-$INSTALL_PATH/resources/appimagetool $PARENT_NAME
-mv MeshLabServer-$VERSION*.AppImage MeshLabServer$VERSION-linux.AppImage
-#chmod +x MeshLabServer$VERSION-linux.AppImage
-
-#mv $PARENT_NAME/usr/share/applications/meshlab_server.desktop .
-#mv meshlab.desktop $PARENT_NAME/usr/share/applications/
-mv $PARENT_NAME/AppRun $PARENT_NAME/AppRunMeshLabServer
-mv $PARENT_NAME/AppRunMeshLab $PARENT_NAME/AppRun
-rm $PARENT_NAME/*.desktop
-cp $PARENT_NAME/usr/share/applications/meshlab.desktop $PARENT_NAME/
-
-$INSTALL_PATH/resources/appimagetool $PARENT_NAME
-mv MeshLab-$VERSION*.AppImage MeshLab$VERSION-linux.AppImage
-#chmod +x MeshLab$VERSION-linux.AppImage
-
-#at this point, distrib folder contains all the files necessary to execute meshlab
-echo MeshLab$VERSION-linux.AppImage and MeshLabServer$VERSION-linux.AppImage generated
diff --git a/scripts/Linux/qmake/linux_build.sh b/scripts/Linux/qmake/linux_build.sh
deleted file mode 100644
index a4196bb45..000000000
--- a/scripts/Linux/qmake/linux_build.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# this is a script shell for compiling meshlab in a Linux environment.
-# Requires a Qt environment which is set-up properly, and an accessible
-# qmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries will be
-# then placed inside BUILD_PATH/distrib.
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- BUILD_PATH="../../../src"
-else
- BUILD_PATH=$(realpath $1)
-fi
-
-cd "$(dirname "$(realpath "$0")")"; #move to script directory
-
-if ! [ -d $BUILD_PATH ]
-then
- mkdir $BUILD_PATH
-fi
-
-echo "Build path is: " $BUILD_PATH
-SOURCE_PATH=$PWD/../../../src
-
-cd $BUILD_PATH
-qmake $SOURCE_PATH/meshlab.pro
-make -j4
diff --git a/scripts/Linux/qmake/linux_build_debug.sh b/scripts/Linux/qmake/linux_build_debug.sh
deleted file mode 100644
index 678ef6155..000000000
--- a/scripts/Linux/qmake/linux_build_debug.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# this is a script shell for compiling meshlab in a Linux environment.
-# Requires a Qt environment which is set-up properly, and an accessible
-# qmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries will be
-# then placed inside BUILD_PATH/distrib.
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- BUILD_PATH="../../../src"
-else
- BUILD_PATH=$(realpath $1)
-fi
-
-cd "$(dirname "$(realpath "$0")")"; #move to script directory
-
-if ! [ -d $BUILD_PATH ]
-then
- mkdir $BUILD_PATH
-fi
-
-echo "Build path is: " $BUILD_PATH
-SOURCE_PATH=$PWD/../../../src
-
-cd $BUILD_PATH
-qmake $SOURCE_PATH/meshlab.pro CONFIG+=debug
-make -j4
diff --git a/scripts/Linux/qmake/linux_build_meshlab_mini.sh b/scripts/Linux/qmake/linux_build_meshlab_mini.sh
deleted file mode 100644
index 83afbc2ca..000000000
--- a/scripts/Linux/qmake/linux_build_meshlab_mini.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# this is a script shell for compiling meshlab in a Linux environment.
-# Requires a Qt environment which is set-up properly, and an accessible
-# qmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries will be
-# then placed inside BUILD_PATH/distrib.
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- BUILD_PATH="../../../src"
-else
- BUILD_PATH=$(realpath $1)
-fi
-
-cd "$(dirname "$(realpath "$0")")"; #move to script directory
-
-if ! [ -d $BUILD_PATH ]
-then
- mkdir $BUILD_PATH
-fi
-
-echo "Build path is: " $BUILD_PATH
-SOURCE_PATH=$PWD/../../../src
-
-cd $BUILD_PATH
-qmake $SOURCE_PATH/meshlab.pro "CONFIG+=meshlab_mini"
-make -j4
diff --git a/scripts/Linux/qmake/linux_deploy.sh b/scripts/Linux/qmake/linux_deploy.sh
deleted file mode 100644
index 80c416de2..000000000
--- a/scripts/Linux/qmake/linux_deploy.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-# This is a script shell for deploying a meshlab-portable folder.
-# Requires a properly built meshlab boundle (see linux_make_boundle.sh).
-#
-# This script can be run only in the oldest supported linux distro that you are using
-# due to linuxdeployqt tool choice (see https://github.com/probonopd/linuxdeployqt/issues/340).
-#
-# Without given arguments, the folder that will be deployed is meshlab/distrib.
-#
-# You can give as argument the DISTRIB_PATH.
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- DISTRIB_PATH="../../../distrib"
-else
- DISTRIB_PATH=$(realpath $1)
-fi
-
-cd "$(dirname "$(realpath "$0")")"; #move to script directory
-INSTALL_PATH=$(pwd)/../
-
-cd $DISTRIB_PATH
-
-$INSTALL_PATH/resources/linuxdeployqt usr/share/applications/meshlab.desktop -bundle-non-qt-libs -executable=usr/bin/meshlabserver
-
-chmod +x usr/bin/meshlab
-chmod +x usr/bin/meshlabserver
-rm AppRun
-
-cp $INSTALL_PATH/resources/AppRunMeshLab .
-mv AppRunMeshLab AppRun
-cp $INSTALL_PATH/resources/AppRunMeshLabServer .
-chmod +x AppRun
-chmod +x AppRunMeshLabServer
-
-#at this point, distrib folder contains all the files necessary to execute meshlab
-echo "distrib folder is now a self contained meshlab application"
\ No newline at end of file
diff --git a/scripts/Linux/qmake/linux_make_bundle.sh b/scripts/Linux/qmake/linux_make_bundle.sh
deleted file mode 100644
index 73f30fd8a..000000000
--- a/scripts/Linux/qmake/linux_make_bundle.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-# this is a script shell for setting up the application bundle for linux
-# Requires a properly built meshlab.
-#
-# Without given arguments, the application boundle will be placed in the meshlab/distrib
-# directory.
-#
-# You can give as argument the DISTRIB_PATH.
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- DISTRIB_PATH="../../../distrib"
-else
- DISTRIB_PATH=$(realpath $1)
-fi
-
-cd "$(dirname "$(realpath "$0")")"; #move to script directory
-
-SOURCE_PATH=$PWD/../../../src
-
-INSTALL_PATH=$(pwd)/../
-cd $DISTRIB_PATH
-LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
-
-#check if we have an exec in distrib
-if ! [ -f meshlab ]
-then
- echo "ERROR: meshlab bin not found inside distrib"
- exit 1
-fi
-
-mkdir -p usr/bin
-mkdir -p usr/lib/meshlab
-mkdir -p usr/share/applications
-mkdir -p usr/share/meshlab
-mkdir -p usr/share/doc/meshlab
-mkdir -p usr/share/icons/hicolor/512x512/apps/
-mkdir -p usr/share/icons/Yaru/512x512/apps/
-
-cp $INSTALL_PATH/resources/meshlab_appimage.desktop usr/share/applications/meshlab.desktop
-cp $INSTALL_PATH/resources/meshlab_server_appimage.desktop usr/share/applications/meshlab_server.desktop
-cp meshlab.png usr/share/icons/hicolor/512x512/apps/meshlab.png
-mv meshlab.png usr/share/icons/Yaru/512x512/apps/meshlab.png
-mv meshlab usr/bin
-mv meshlabserver usr/bin
-mv LICENSE.txt usr/share/doc/meshlab/
-mv privacy.txt usr/share/doc/meshlab/
-mv readme.txt usr/share/doc/meshlab/
-mv lib/libmeshlab-common* usr/lib/
-mv plugins/ usr/lib/meshlab/
-mv lib/meshlab/* usr/lib/meshlab/
-#patchelf --set-rpath '$ORIGIN/..' usr/lib/meshlab/plugins/*.so
-mv shaders/ usr/share/meshlab/
-rm -r lib
-
-patchelf --set-rpath '$ORIGIN/../lib/meshlab/' usr/bin/meshlab
-patchelf --set-rpath '$ORIGIN/../lib/meshlab/' usr/bin/meshlabserver
diff --git a/scripts/Linux/qmake/linux_make_it.sh b/scripts/Linux/qmake/linux_make_it.sh
deleted file mode 100644
index 5be497153..000000000
--- a/scripts/Linux/qmake/linux_make_it.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-# this is a script shell for compiling and deploying meshlab in a Linux environment.
-#
-# This script can be run only in the oldest supported linux distro that you are using
-# due to linuxdeployqt tool choice (see https://github.com/probonopd/linuxdeployqt/issues/340).
-#
-# Requires a Qt environment which is set-up properly, and an accessible
-# qmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries and AppImage will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries and
-# AppImage will be then placed inside BUILD_PATH/distrib.
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- BUILD_PATH="../../../src"
- DISTRIB_PATH="../../../distrib"
-else
- BUILD_PATH=$(realpath $1)
- BUILD_PATH=$BUILD_PATH/distrib
-fi
-
-cd "$(dirname "$(realpath "$0")")"; #move to script directory
-
-sh linux_build.sh $BUILD_PATH
-sh linux_make_bundle.sh $DISTRIB_PATH
-sh linux_deploy.sh $DISTRIB_PATH
-sh linux_appimages.sh $DISTRIB_PATH
diff --git a/scripts/Linux/resources/AppRunMeshLab b/scripts/Linux/resources/AppRunMeshLab
deleted file mode 100644
index c4116b94d..000000000
--- a/scripts/Linux/resources/AppRunMeshLab
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-#this script is necessary only for the u3d exporter.
-#libIFX has its own library loader, which does not consider
-#the runpath set in the meshlab binary. It looks only the
-#LD_LIBRARY_PATH variable.
-
-HERE="$(dirname "$(readlink -f "${0}")")"
-export LD_LIBRARY_PATH=${HERE}/usr/lib/meshlab:$LD_LIBRARY_PATH
-exec "${HERE}/usr/bin/meshlab" "$@"
diff --git a/scripts/Linux/resources/AppRunMeshLabServer b/scripts/Linux/resources/AppRunMeshLabServer
deleted file mode 100644
index 213271445..000000000
--- a/scripts/Linux/resources/AppRunMeshLabServer
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-#this script is necessary only for the u3d exporter.
-#libIFX has its own library loader, which does not consider
-#the runpath set in the meshlab binary. It looks only the
-#LD_LIBRARY_PATH variable.
-
-HERE="$(dirname "$(readlink -f "${0}")")"
-export LD_LIBRARY_PATH=${HERE}/usr/lib/meshlab:$LD_LIBRARY_PATH
-exec "${HERE}/usr/bin/meshlabserver" "$@"
diff --git a/scripts/Linux/resources/appimagetool b/scripts/Linux/resources/appimagetool
deleted file mode 100755
index 872c650bc..000000000
Binary files a/scripts/Linux/resources/appimagetool and /dev/null differ
diff --git a/scripts/Linux/resources/make_bundle.sh b/scripts/Linux/resources/make_bundle.sh
deleted file mode 100644
index 7dafa6980..000000000
--- a/scripts/Linux/resources/make_bundle.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-# this is a script shell for setting up the application bundle for linux
-# Requires a properly built meshlab.
-#
-# Without given arguments, the application boundle will be placed in the meshlab/src/install
-# directory.
-#
-# You can give as argument the path were meshlab has been installed.
-
-SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/../
-SOURCE_PATH=$SCRIPTS_PATH/../../src
-DISTRIB_PATH=$SCRIPTS_PATH/../../distrib
-
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- INSTALL_PATH=$SOURCE_PATH/install
-else
- INSTALL_PATH=$(realpath $1)
-fi
-
-LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_PATH
-
-#check if we have an exec in distrib
-if ! [ -f $INSTALL_PATH/usr/bin/meshlab ]
-then
- echo "ERROR: meshlab bin not found inside $INSTALL_PATH/usr/bin/"
- exit 1
-fi
-
-mkdir -p $INSTALL_PATH/usr/share/doc/meshlab
-mkdir -p $INSTALL_PATH/usr/share/icons/hicolor/512x512/apps/
-mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/512x512/apps/
-
-cp $SCRIPTS_PATH/resources/meshlab_appimage.desktop $INSTALL_PATH/usr/share/applications/meshlab.desktop
-cp $DISTRIB_PATH/meshlab.png $INSTALL_PATH/usr/share/icons/hicolor/512x512/apps/meshlab.png
-cp $DISTRIB_PATH/meshlab.png $INSTALL_PATH/usr/share/icons/Yaru/512x512/apps/meshlab.png
-cp $DISTRIB_PATH/LICENSE.txt $INSTALL_PATH/usr/share/doc/meshlab/
-cp $DISTRIB_PATH/privacy.txt $INSTALL_PATH/usr/share/doc/meshlab/
-cp $DISTRIB_PATH/readme.txt $INSTALL_PATH/usr/share/doc/meshlab/
-
-for filename in $INSTALL_PATH/usr/lib/meshlab/plugins/*.so; do
- patchelf --set-rpath '$ORIGIN/../' $filename
-done
diff --git a/scripts/Linux/resources/meshlab_appimage.desktop b/scripts/Linux/resources/meshlab_appimage.desktop
deleted file mode 100644
index de7fff193..000000000
--- a/scripts/Linux/resources/meshlab_appimage.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Type=Application
-Name=MeshLab
-GenericName=Mesh processing
-Comment=View and process meshes
-Exec=usr/bin/meshlab %F
-Icon=meshlab
-Terminal=false
-MimeType=model/mesh;application/x-3ds;image/x-3ds;model/x-ply;application/sla;model/x-quad-object;model/x-geomview-off;application/x-cyclone-ptx;application/x-vmi;application/x-bre;model/vnd.collada+xml;model/openctm;application/x-expe-binary;application/x-expe-ascii;application/x-xyz;application/x-gts;chemical/x-pdb;application/x-tri;application/x-asc;model/x3d+xml;model/x3d+vrml;model/vrml;model/u3d;model/idtf;
-Categories=Graphics;3DGraphics;Viewer;Qt;
diff --git a/scripts/Linux/resources/meshlab_server_appimage.desktop b/scripts/Linux/resources/meshlab_server_appimage.desktop
deleted file mode 100644
index 2327a0298..000000000
--- a/scripts/Linux/resources/meshlab_server_appimage.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Type=Application
-Name=MeshLabServer
-GenericName=Batch mesh processing
-Comment=Batch Processor MeshLab
-Exec=usr/bin/meshlabserver
-Icon=meshlab
-Terminal=false
-MimeType=model/mesh;application/x-3ds;image/x-3ds;model/x-ply;application/sla;model/x-quad-object;model/x-geomview-off;application/x-cyclone-ptx;application/x-vmi;application/x-bre;model/vnd.collada+xml;model/openctm;application/x-expe-binary;application/x-expe-ascii;application/x-xyz;application/x-gts;chemical/x-pdb;application/x-tri;application/x-asc;model/x3d+xml;model/x3d+vrml;model/vrml;model/u3d;model/idtf;
-Categories=Graphics;3DGraphics;Qt;
diff --git a/scripts/README.md b/scripts/README.md
index 3da38854e..d90f054ed 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -1,16 +1,140 @@
-#scripts folder
+# MeshLab scripts
-This folder contains a series of platform-dependent scripts to build and deploy MeshLab.
+This folder contains a series of platform-dependent bash scripts to build and deploy MeshLab.
Every platform folder contains:
-* `1_build.sh`: a script that builds MeshLab. Requires a Qt environment properly set, with `cmake` accessible. Takes as inputh the build directory (default: `src/build`), the install directory (default: `src/install`) and the number of cores used to build MeshLab (default: `-j4`). Example of call: `bash 1_build.sh --build_path=path/to/build --install_path=path/to/install -j8`
-* `2_deploy.sh`: a script that deploys MeshLab, making sure that the folder will be a self-contained MeshLab, without Qt library dependencies. Requires a properly built MeshLab in the directory passed as an argument (default: `src/install`). Example of call: `bash 2_deploy.sh --install_path=path/to/deploy`
-* `3_$installer$.sh`: a script that computes a platform-dependent self-contained package/installer of MeshLab. Requires a properly deployed MeshLab in the directory passed as an argument (default: `src/install`). The result will be saved in the parent directory of the given argument.
-* `make_it.sh`: a script that computes all the three previous scripts: starting from the source code, it will produce a self-contained package/installer of MeshLab (arguments are the same of `1_build.sh`). Example of call: `bash makeit.sh --build_path=path/to/build --install_path=path/to/install -j8`
+* `0_setup_env.sh`: a script that installs automatically the required dependencies;
+* `1_build.sh`: a script that builds MeshLab;
+* `2_deploy.sh`: a script that deploys MeshLab;
+* `3_pack.sh`: a script that computes a platform-dependent self-contained package/installer of MeshLab;
+* `make_it.sh`: a script that computes all the three previous scripts;
Note for Windows: scripts are written in bash, therefore they should be run in a linux subsystem environment.
+
See in each platform subfolder for details and other platform-dependent requirements:
-- [Linux](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts/Linux)
-- [MaxOS](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts/macOS)
-- [Windows](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts/Windows)
+- [Linux](https://github.com/cnr-isti-vclab/meshlab/tree/main/scripts/Linux)
+- [MaxOS](https://github.com/cnr-isti-vclab/meshlab/tree/main/scripts/macOS)
+- [Windows](https://github.com/cnr-isti-vclab/meshlab/tree/main/scripts/Windows)
+
+## `0_setup_env.sh`
+
+This script installs automatically the required dependencies of MeshLab. Common dependencies are Qt and `cmake`.
+
+The script uses a system package manager to install dependencies, which is:
+ - [`apt-get`](https://linux.die.net/man/8/apt-get) on Linux;
+ - [`brew`](https://brew.sh/) on macOS;
+ - [`choco`](https://community.chocolatey.org/) on Windows.
+
+Please be sure to have these package managers before running this script.
+
+It takes as input the `--dont_install_qt` option, that allows the user to choose whether to install or not qt using the system package manager. It could be useful if Qt is installed using other sources. For example, in our GitHub actions workflows we use a specific action step to install Qt, in order to choose a specific version.
+
+Please see the readme inside the desired platform folder for system dependent additional arguments and further details.
+
+## `1_build.sh`
+
+This script builds MeshLab. It assumes that the script `0_setup_env.sh` has been already executed and all the dependencies are correctly installed and accessible by the script.
+
+It takes the following input arguments:
+ - `--build_path`: the directory where will be placed the build files;
+ - default: `[meshlab_repo]/build`
+ - example: `--build_path=path/to/build`
+ - `--install_path`: the directory where final MeshLab binaries, libraries and files will be placed;
+ - default: `[meshlab_repo]/install`
+ - example: `--install_path=path/to/install`
+ - `--double_precision`: if present, this argument will tell to build MeshLab with double floating point precision;
+ - `--nighly`: if present, this argument will tell to build MeshLab with a nightly version;
+ - `--qt_dir`: the directory where to find Qt, useful when Qt is not in the `PATH`;
+ - example: `--qt_dir=path/to/qt`
+ - `--ccache`: if present, this argument will tell to use the `ccache` tool to speed up build time (useful for CI builds, be sure to have `ccache` installed).
+
+Example of call:
+```
+bash 1_build.sh --build_path=path/to/build --install_path=path/to/install --double_precision
+```
+
+## `2_deploy.sh`
+
+This script deploys MeshLab, making sure that the folder will be a self-contained MeshLab, without Qt or any other system libraries dependencies. It assumes that the scripts `0_setup_env.sh` and `1_build.sh` have been already executed and there is a directory where all the final MeshLab files are placed.
+
+It takes the following input arguments:
+ - `--install_path`: the directory where final MeshLab binaries, libraries and files are placed; this will be the path where MeshLab will be deployed. It should be the same argument given to the `1_build.sh` script;
+ - default: `[meshlab_repo]/install`
+ - example: `--install_path=path/to/install`
+ - `--qt_dir`: the directory where to find Qt, useful when Qt is not in the `PATH`; it should be the same argument given to the `1_build.sh` script;
+ - example: `--qt_dir=path/to/qt`
+
+Example of call:
+```
+bash 2_deploy.sh --install_path=path/to/install
+```
+
+## `3_pack.sh`
+
+This script generates a platform-dependent self-contained package/installer of MeshLab. It assumes that the scripts `0_setup_env.sh`, `1_build.sh` and `2_deploy.sh` have been already executed, and there is a directory where MeshLab has been deployed.
+
+It takes the following input arguments:
+ - `--install_path`: the directory containing MeshLab deployed; it should be the same argument given to the `2_deploy.sh` script;
+ - default: `[meshlab_repo]/install`
+ - example: `--install_path=path/to/install`
+ - `--packages_path`: the directory where the output package(s) will be placed;
+ - default: `[meshlab_repo]/packages`
+ - example: `--packages_path=path/to/packages`
+
+Example of call:
+```
+bash 3_pack.sh --install_path=path/to/install --package_path=path/to/packages
+```
+
+## `make_it.sh`
+
+This script computes all the three previous scripts: starting from the source code, it will produce a self-contained package/installer of MeshLab. Input arguments are a union of all the arguments of the previous scripts.
+
+# Examples
+
+The following examples can be run on Linux, macOS and Windows (using linux subsystem).
+
+### Building MeshLab on a clean environment
+
+The build directory will be placed in `meshlab/build`:
+
+ git clone --recursive https://github.com/cnr-isti-vclab/meshlab
+ bash meshlab/scripts/[platform]/0_setup_env.sh
+ bash meshlab/scripts/[platform]/1_build.sh
+
+### Building, deploying and packaging MeshLab using a custom Qt installation
+
+For example, let assume that Qt 5.15.2 is installed in the path `/opt/Qt`. We assume also that the compiler/architecture used by Qt is `gcc_64` (you can check yours in the directory `path/to/Qt/5.15.2/`).
+
+* build directory: `meshlab/build`
+* AppDir/portable version: `meshlab/install`
+* package (installer, dmg, AppImage) path: `meshlab/packages`
+
+```
+git clone --recursive https://github.com/cnr-isti-vclab/meshlab
+bash meshlab/scripts/[platform]/0_setup_env.sh --dont_install_qt
+bash meshlab/scripts/[platform]/1_build.sh --qt_dir=/opt/Qt/5.15.2/gcc_64
+bash meshlab/scripts/[platform]/2_deploy.sh --qt_dir=/opt/Qt/5.15.2/gcc_64
+bash meshlab/scripts/[plarform]/3_pack.sh
+```
+
+Or, alternatively:
+
+```
+git clone --recursive https://github.com/cnr-isti-vclab/meshlab
+bash meshlab/scripts/[platform]/0_setup_env.sh --dont_install_qt
+bash meshlab/scripts/[platform]/make_it.sh --qt_dir=/opt/Qt/5.15.2/gcc_64
+```
+
+### Building, deploying and packaging MeshLab using custom directories
+
+* build directory: `/my/meshlab/build`
+* AppDir/portable version: `/my/meshlab/install`
+* AppImage path: `/my/meshlab/packages`
+
+```
+git clone --recursive https://github.com/cnr-isti-vclab/meshlab
+bash meshlab/scripts/[platform]/0_setup_env.sh
+bash meshlab/scripts/[platform]/make_it.sh --build_path="/my/meshlab/build" --install_path="/my/meshlab/install" --package_path="/my/meshlab/packages"
+```
diff --git a/scripts/Windows/0_setup_env.sh b/scripts/Windows/0_setup_env.sh
new file mode 100644
index 000000000..1f27e3654
--- /dev/null
+++ b/scripts/Windows/0_setup_env.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# this is a script shell sets up a Windows environment where
+# MeshLab can be compiled, deployed and packaged.
+#
+# Run this script if you never installed any of the MeshLab dependencies.
+#
+# Requires: choco
+
+DONT_INSTALL_QT=false
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ --dont_install_qt)
+ DONT_INSTALL_QT=true
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+choco install cmake ninja ccache wget nsis
+
+if [ "$DONT_INSTALL_QT" = false ] ; then
+ echo "=== installing qt packages..."
+
+ choco install qt5-default
+else
+ echo "=== jumping installation of qt packages..."
+fi
diff --git a/scripts/Windows/1_build.sh b/scripts/Windows/1_build.sh
index 4c6541f4f..e345e8fba 100644
--- a/scripts/Windows/1_build.sh
+++ b/scripts/Windows/1_build.sh
@@ -1,47 +1,50 @@
#!/bin/bash
-# this is a script shell for compiling meshlab in a windows environment.
-# Requires a VS >= 2017 and Qt environments which are set-up properly,
-# and an accessible cmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src/build
-# directory, and installed in $BUILD_PATH/../install.
-#
-# You can give as argument the BUILD_PATH and the INSTALL_PATH in the
-# following way:
-# sh linux_build.sh --build_path=/path/to/build --install_path=/path/to/install
-# -b and -i arguments are also supported.
#default paths wrt the script folder
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-SOURCE_PATH=$SCRIPTS_PATH/../../src
+SOURCE_PATH=$SCRIPTS_PATH/../..
BUILD_PATH=$SOURCE_PATH/build
INSTALL_PATH=$SOURCE_PATH/install
-CORES="-j4"
DOUBLE_PRECISION_OPTION=""
+NIGHTLY_OPTION=""
+QT_DIR=""
+CCACHE=""
#check parameters
for i in "$@"
do
case $i in
+ -s=*|--source_path=*)
+ SOURCE_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-b=*|--build_path=*)
- BUILD_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ BUILD_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
- -j*)
- CORES=$i
- shift # past argument=value
- ;;
- --double_precision)
- DOUBLE_PRECISION_OPTION="-DBUILD_WITH_DOUBLE_SCALAR=ON"
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -d|--double_precision)
+ DOUBLE_PRECISION_OPTION="-DMESHLAB_BUILD_WITH_DOUBLE_SCALAR=ON"
+ shift # past argument=value
+ ;;
+ -n|--nightly)
+ NIGHTLY_OPTION="-DMESHLAB_IS_NIGHTLY_VERSION=ON"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR=${i#*=}
+ shift # past argument=value
+ ;;
+ --ccache)
+ CCACHE="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
@@ -60,11 +63,13 @@ fi
BUILD_PATH=$(realpath $BUILD_PATH)
INSTALL_PATH=$(realpath $INSTALL_PATH)
-echo "BUILD PATH: "$BUILD_PATH
-echo "INSTALL PATH: "$INSTALL_PATH
-echo "SCRIPTS PATH: "$SCRIPTS_PATH
+if [ ! -z "$QT_DIR" ]
+then
+ export Qt5_DIR=$QT_DIR
+fi
cd $BUILD_PATH
-cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $SOURCE_PATH
-jom $CORES #Qt nmake for parallel build
-nmake install
+export NINJA_STATUS="[%p (%f/%t) ] "
+cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $CCACHE $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $SOURCE_PATH
+ninja
+ninja install
diff --git a/scripts/Windows/2_deploy.sh b/scripts/Windows/2_deploy.sh
index 8059d30bb..54e6371d2 100644
--- a/scripts/Windows/2_deploy.sh
+++ b/scripts/Windows/2_deploy.sh
@@ -1,37 +1,63 @@
#!/bin/bash
-# This is a script shell for deploying a meshlab-portable folder.
-# Requires a properly built meshlab (see windows_build.sh).
-#
-# Without given arguments, the folder that will be deployed is meshlab/src/install.
-#
-# You can give as argument the path where meshlab is installed.
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-DISTRIB_PATH=$SCRIPTS_PATH/../../distrib
-INSTALL_PATH=$SCRIPTS_PATH/../../src/install
+RESOURCES_PATH=$SCRIPTS_PATH/../../resources
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+QT_DIR_OPTION=""
+PACKAGES_PATH=$SCRIPTS_PATH/../../packages
+SIGN=false
+CERT_FILE_OPTION=""
+CERT_PSSW=""
#checking for parameters
for i in "$@"
do
case $i in
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR_OPTION=qt="${i#*=}"
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -cf=*|--cert_file=*)
+ CERT_FILE_OPTION=cf="${i#*=}"
+ shift # past argument=value
+ ;;
+ -cp=*|--cert_pssw=*)
+ CERT_PSSW="${i#*=}"
+ if [ -n "$CERT_PSSW" ]; then
+ SIGN=true
+ fi
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
-windeployqt $INSTALL_PATH/meshlab.exe
+bash $SCRIPTS_PATH/internal/2a_portable.sh -i=$INSTALL_PATH $QT_DIR_OPTION
-windeployqt $INSTALL_PATH/plugins/filter_sketchfab.dll --libdir $INSTALL_PATH/
+echo "======= Portable Version Created ======="
-mv $INSTALL_PATH/lib/meshlab/IFX* $INSTALL_PATH
-cp $INSTALL_PATH/IFXCoreStatic.lib $INSTALL_PATH/lib/meshlab/
-cp $DISTRIB_PATH/LICENSE.txt $INSTALL_PATH/
-cp $DISTRIB_PATH/privacy.txt $INSTALL_PATH/
+if [ "$SIGN" = true ] ; then
+ bash $SCRIPTS_PATH/internal/2b_sign_dlls.sh -i=$INSTALL_PATH $CERT_FILE_OPTION -cp=$CERT_PSSW
-#at this point, distrib folder contains all the files necessary to execute meshlab
-echo "$INSTALL_PATH is now a self contained meshlab application"
+ echo "======= Portable Version Signed ======="
+fi
+
+bash $SCRIPTS_PATH/internal/2c_installer.sh -i=$INSTALL_PATH -p=$PACKAGES_PATH
+
+echo "======= Installer Created ======="
+
+if [ "$SIGN" = true ] ; then
+ bash $SCRIPTS_PATH/internal/2b_sign_dlls.sh -i=$PACKAGES_PATH $CERT_FILE_OPTION -cp=$CERT_PSSW
+
+ echo "======= Installer Signed ======="
+fi
diff --git a/scripts/Windows/3_installer.sh b/scripts/Windows/3_installer.sh
deleted file mode 100644
index 363bfd290..000000000
--- a/scripts/Windows/3_installer.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-# This is a powershell script for computing an installer for MeshLab.
-# Requires:
-# - a properly deployed meshlab (see windows_deploy.ps1);
-# - the env variable PATH containing the NSIS folder (makensis.exe must be directly accessible)
-#
-# Without given arguments, the folder that will be deployed is meshlab/distrib.
-#
-# You can give as argument the DISTRIB_PATH.
-#
-# After running this script, the installer can be found inside the resources folder.
-
-SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-INSTALL_PATH=$SCRIPTS_PATH/../../src/install
-DOUBLE_PRECISION_OPTION=""
-
-
-#checking for parameters
-for i in "$@"
-do
-case $i in
- -i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
- --double_precision)
- DOUBLE_PRECISION_OPTION="--double_precision"
- shift # past argument=value
- ;;
- *)
- # unknown option
- ;;
-esac
-done
-
-sh $SCRIPTS_PATH/resources/nsis_script.sh -i=$INSTALL_PATH $DOUBLE_PRECISION_OPTION
-
-makensis.exe $SCRIPTS_PATH/resources/meshlab_final.nsi
-
-rm $SCRIPTS_PATH/resources/meshlab_final.nsi
diff --git a/scripts/Windows/README.md b/scripts/Windows/README.md
index 31b92c38d..28aa46950 100644
--- a/scripts/Windows/README.md
+++ b/scripts/Windows/README.md
@@ -1,28 +1,29 @@
# Windows Scripts
This folder contains a series of scripts to build and deploy MeshLab under a Windows environment.
-**Note**: scripts are written in bash, therefore they should be run in a linux subsystem environment.
-* `1_build.sh`: this script builds MeshLab in a Windows environment:
- * it requires a properly set Visual Studio (>=2015) and MSVC compiler;
- * it requires a properly set Qt environment;
- * `cmake` in the PATH env variable;
- * takes as arguments:
- * the build directory (default: `src/build`): `--build_path=path/to/build`
- * the install directory (default: `src/install`): `--install_path=path/to/install`
- * the number of cores used to build MeshLab (default: `-j4`)`
- * the possibility to build MeshLab with double precision scalar: `--double_precision`
-* `2_deploy.sh`: this script makes the given path a portable version of MeshLab. Takes as arguments:
- * the path where the output install path of the `1_build.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
-* `3_installer.sh`: this script computes, starting from the portable folder of MeshLab, an NSIS installer. Takes as arguments:
- * the path where the output install path of the `2_deploy.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
- * if MeshLab has been built with double precision scalar, add: `--double_precision`
- * it requires `makensis.exe` in the PATH env variable.
+## Note about the compiler
+On Windows, we use MSVC compiler to build MeshLab. Before trying to build MeshLab, you should download and install VisualStudio with the C++ developer package, which contains the MSVC compiler.
-## Examples
+Other compilers are not tested.
-Building MeshLab on Windows, having VisualStudio, MSVC and Qt installed, cmake in the PATH (build placed in `meshlab/src/build`):
+## Note about Qt
- git clone --recursive https://github.com/cnr-isti-vclab/meshlab
- sh meshlab/scripts/Windows/1_build.sh
\ No newline at end of file
+MeshLab requires Qt 5.15. You can both install Qt5 using `choco` or manually in your system.
+If you install Qt manually. you can then give the path of the Qt installation directory to the various scripts, or you can add Qt to your `PATH`.
+
+The `0_setup_env.sh` script won't install qt from `choco` if you pass the argument `dont_install_qt`.
+
+## Dependencies
+
+Dependencies are automatically installed by the `0_setup_env.sh` script, which uses [`choco`](https://community.chocolatey.org/) as package manager.
+Be sure to have `choco` installed before running this script.
+
+Libraries installed by the `0_setup_env.sh` are the following:
+ - Required by MeshLab:
+ - `wget` (required by these scripts)
+ - `ccache` (required by github actions)
+ - `cmake`
+ - `ninja`
+ - `nsis` (for package stage)
\ No newline at end of file
diff --git a/scripts/Windows/internal/2a_portable.sh b/scripts/Windows/internal/2a_portable.sh
new file mode 100644
index 000000000..49ca551c7
--- /dev/null
+++ b/scripts/Windows/internal/2a_portable.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+RESOURCES_PATH=$SCRIPTS_PATH/../../resources
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+QT_DIR=""
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR=${i#*=}/bin/
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+${QT_DIR}windeployqt $INSTALL_PATH/meshlab.exe
+
+${QT_DIR}windeployqt $INSTALL_PATH/plugins/filter_sketchfab.dll --libdir $INSTALL_PATH/
+
+mv $INSTALL_PATH/lib/meshlab/IFX* $INSTALL_PATH
+cp $INSTALL_PATH/IFXCoreStatic.lib $INSTALL_PATH/lib/meshlab/
+cp $RESOURCES_PATH/LICENSE.txt $INSTALL_PATH/
+cp $RESOURCES_PATH/privacy.txt $INSTALL_PATH/
+
+# remove all .lib files
+for file in $(find $INSTALL_PATH -name '*.lib');
+do
+ rm $file
+done
+
+if [ ! -f $INSTALL_PATH/vc_redist.x64.exe ]
+then
+ echo "Downloading vc_redist because it was missing..."
+ wget https://aka.ms/vs/17/release/vc_redist.x64.exe --output-document=$INSTALL_PATH/vc_redist.x64.exe
+fi
\ No newline at end of file
diff --git a/scripts/Windows/internal/2b_sign_dlls.sh b/scripts/Windows/internal/2b_sign_dlls.sh
new file mode 100644
index 000000000..6f570d694
--- /dev/null
+++ b/scripts/Windows/internal/2b_sign_dlls.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+CERT_FILE=$SCRIPTS_PATH/../../certificate/certificate.pfx
+CERT_PSSW=""
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -cf=*|--cert_file=*)
+ CERT_FILE="${i#*=}"
+ shift # past argument=value
+ ;;
+ -cp=*|--cert_pssw=*)
+ CERT_PSSW=${i#*=}
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+cd $INSTALL_PATH
+
+
+CERT_REL=$(realpath --relative-to=$INSTALL_PATH $CERT_FILE) # get relative path of the cert file
+CERT_WIN=$(echo "$CERT_REL" | sed 's/^\///' | sed 's/\//\\/g') # get windows relative path (with backslashes) of the cert
+
+# will sign all dll and exe files inside INSTALL_PATH, recursively
+for file in $(find $INSTALL_PATH -name '*.dll' -or -name '*.exe');
+do
+ FILE_REL=$(realpath --relative-to=$INSTALL_PATH $file) # relative path
+ FILE_WIN=$(echo "$FILE_REL" | sed 's/^\///' | sed 's/\//\\/g') # win relative path
+ signtool.exe sign //fd SHA256 //f $CERT_WIN //p $CERT_PSSW //t http://timestamp.comodoca.com/authenticode $FILE_WIN
+done
\ No newline at end of file
diff --git a/scripts/Windows/internal/2c_installer.sh b/scripts/Windows/internal/2c_installer.sh
new file mode 100644
index 000000000..529314ac2
--- /dev/null
+++ b/scripts/Windows/internal/2c_installer.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+RESOURCES_PATH=$SCRIPTS_PATH/../../resources
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+PACKAGES_PATH=$SCRIPTS_PATH/../../packages
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+# Make nsis script
+
+#get version
+IFS=' ' #space delimiter
+STR_VERSION=$($INSTALL_PATH/meshlab.exe --version)
+read -a strarr <<< "$STR_VERSION"
+ML_VERSION=${strarr[1]} #get the meshlab version from the string
+
+sed "s%MESHLAB_VERSION%$ML_VERSION%g" $RESOURCES_PATH/windows/meshlab.nsi > $RESOURCES_PATH/windows/meshlab_final.nsi
+sed -i "s%DISTRIB_PATH%.%g" $RESOURCES_PATH/windows/meshlab_final.nsi
+
+mv $RESOURCES_PATH/windows/meshlab_final.nsi $INSTALL_PATH/
+cp $RESOURCES_PATH/windows/ExecWaitJob.nsh $INSTALL_PATH/
+cp $RESOURCES_PATH/windows/FileAssociation.nsh $INSTALL_PATH/
+
+# Make Installer
+
+makensis.exe $INSTALL_PATH/meshlab_final.nsi
+
+rm $INSTALL_PATH/meshlab_final.nsi
+rm $INSTALL_PATH/ExecWaitJob.nsh
+rm $INSTALL_PATH/FileAssociation.nsh
+
+mkdir $PACKAGES_PATH
+mv $INSTALL_PATH/MeshLab*-windows.exe $PACKAGES_PATH
\ No newline at end of file
diff --git a/scripts/Windows/make_it.sh b/scripts/Windows/make_it.sh
index 5775da5a7..01863dfe9 100644
--- a/scripts/Windows/make_it.sh
+++ b/scripts/Windows/make_it.sh
@@ -4,51 +4,66 @@
# Requires MSVC and Qt environment which is set-up properly, and accessible
# cmake and makensis binaries.
#
-# Without given arguments, MeshLab will be built in the meshlab/src/build,
-# the folder meshlab/src/install will be a portable version of MeshLab and
-# the AppImage will be placed in meshlab/src.
+# Without given arguments, MeshLab will be built in the meshlab/build,
+# the folder meshlab/install will be a portable version of MeshLab and
+# the Installer will be placed in meshlab/install.
#
# You can give as argument the build path, the install path (that will contain
# the portable version of MeshLab), and the number of cores to use to build MeshLab
# (default: 4).
-# The installer will be placed in the parent directory of the install path.
#
# Example of call:
# bash make_it.sh --build_path=path/to/build --install_path=path/to/install -j8
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-SOURCE_PATH=$SCRIPTS_PATH/../../src
+SOURCE_PATH=$SCRIPTS_PATH/../..
BUILD_PATH=$SOURCE_PATH/build
INSTALL_PATH=$SOURCE_PATH/install
-CORES="-j4"
+PACKAGES_PATH=$SOURCE_PATH/packages
+
DOUBLE_PRECISION_OPTION=""
+NIGHTLY_OPTION=""
+QT_DIR_OPTION=""
+CCACHE_OPTION=""
#check parameters
for i in "$@"
do
case $i in
-b=*|--build_path=*)
- BUILD_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ BUILD_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"/usr/
- shift # past argument=value
- ;;
- -j*)
- CORES=$i
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"/usr/
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
--double_precision)
- DOUBLE_PRECISION_OPTION="--double_precision"
- shift # past argument=value
- ;;
+ DOUBLE_PRECISION_OPTION="--double_precision"
+ shift # past argument=value
+ ;;
+ -n|--nightly)
+ NIGHTLY_OPTION="--nightly"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR_OPTION=-qt=${i#*=}
+ shift # past argument=value
+ ;;
+ --ccache)
+ CCACHE_OPTION="--ccache"
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
-sh $SCRIPTS_PATH/1_build.sh -b=$BUILD_PATH -i=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $CORES
-sh $SCRIPTS_PATH/2_deploy.sh -i=$INSTALL_PATH
-sh $SCRIPTS_PATH/3_installer.sh -i=$INSTALL_PATH $DOUBLE_PRECISION_OPTION
+bash $SCRIPTS_PATH/1_build.sh -b=$BUILD_PATH -i=$INSTALL_PATH $NIGHTLY_OPTION $DOUBLE_PRECISION_OPTION $QT_DIR_OPTION $CCACHE_OPTION
+bash $SCRIPTS_PATH/2_deploy.sh -i=$INSTALL_PATH -p=$PACKAGES_PATH $QT_DIR_OPTION
+
diff --git a/scripts/Windows/qmake/windows_build.ps1 b/scripts/Windows/qmake/windows_build.ps1
deleted file mode 100644
index ea6eec7c3..000000000
--- a/scripts/Windows/qmake/windows_build.ps1
+++ /dev/null
@@ -1,34 +0,0 @@
-# This is a powershell script compiling meshlab in a Windows environment.
-# Requires:
-# - MSVC installed;
-# - Qt installed, and qmake and jom binaries directly accessible
-#
-# # Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries will be
-# then placed inside BUILD_PATH/distrib.
-
-#saving location where script has been run
-
-write-host "N of arguments: $($args.count)"
-
-$DIR = Get-Location
-$SOURCE_PATH = Join-Path $PSScriptRoot ..\..\..\src
-
-if ($args.Count -gt 0){
- $BUILD_PATH = Resolve-Path -Path $args[0]
-} else {
- $BUILD_PATH = $SOURCE_PATH #default build
-}
-
-New-Item -ItemType Directory -Force -Path $BUILD_PATH
-cd $BUILD_PATH
-
-write-host "Build path is: $($BUILD_PATH)"
-
-qmake $SOURCE_PATH\meshlab.pro
-jom -j4 #Qt nmake for parallel build
-
-#going back to original location
-cd $DIR
diff --git a/scripts/Windows/qmake/windows_build_debug.ps1 b/scripts/Windows/qmake/windows_build_debug.ps1
deleted file mode 100644
index b391293fb..000000000
--- a/scripts/Windows/qmake/windows_build_debug.ps1
+++ /dev/null
@@ -1,34 +0,0 @@
-# This is a powershell script compiling meshlab in a Windows environment.
-# Requires:
-# - MSVC installed;
-# - Qt installed, and qmake and jom binaries directly accessible
-#
-# # Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries will be
-# then placed inside BUILD_PATH/distrib.
-
-#saving location where script has been run
-
-write-host "N of arguments: $($args.count)"
-
-$DIR = Get-Location
-$SOURCE_PATH = Join-Path $PSScriptRoot ..\..\..\src
-
-if ($args.Count -gt 0){
- $BUILD_PATH = Resolve-Path -Path $args[0]
-} else {
- $BUILD_PATH = $SOURCE_PATH #default build
-}
-
-New-Item -ItemType Directory -Force -Path $BUILD_PATH
-cd $BUILD_PATH
-
-write-host "Build path is: $($BUILD_PATH)"
-
-qmake $SOURCE_PATH\meshlab.pro CONFIG+=debug
-jom -j4 #Qt nmake for parallel build
-
-#going back to original location
-cd $DIR
diff --git a/scripts/Windows/qmake/windows_deploy.ps1 b/scripts/Windows/qmake/windows_deploy.ps1
deleted file mode 100644
index a76742244..000000000
--- a/scripts/Windows/qmake/windows_deploy.ps1
+++ /dev/null
@@ -1,45 +0,0 @@
-# This is a powershell script for deploying a meshlab-portable app.
-# Requires:
-# - a properly built meshlab;
-# - the env variable PATH containing the bin folder of QT (windeployqt.exe must be directly accessible)
-# - the env variable VCINSTALLDIR set to the VC of Visual Studio (example: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC)
-#
-# Without given arguments, the folder that will be deployed is meshlab/distrib.
-#
-# You can give as argument the DISTRIB_PATH.
-#
-# After running this script, $DISTRIB_PATH will be a portable meshlab folder.
-#
-# To be run in a windows environment without Visual Studio installed,
-# vc_redist.exe must be installed before.
-
-#saving location where script has been run
-
-write-host "N of arguments: $($args.count)"
-
-$DIR = Get-Location
-$SOURCE_PATH = Join-Path $PSScriptRoot ..\..\..\src
-
-if ($args.Count -gt 0){
- $DISTRIB_PATH = $args[0]
-} else {
- $DISTRIB_PATH = Join-Path $PSScriptRoot ..\..\..\distrib #default distrib
-}
-
-cd $DISTRIB_PATH
-
-if(! (Test-Path meshlab.exe)){ #meshlab.exe not found inside $DISTRIB_PATH
- cd $DIR
- throw 'meshlab.exe not found in ' + ($DISTRIB_PATH) + '. Exiting.'
-}
-
-windeployqt --no-translations meshlab.exe
-
-Move-Item .\lib\meshlab\IFX* .
-Copy-Item IFXCoreStatic.lib .\lib\meshlab\
-
-#at this point, distrib folder contains all the files necessary to execute meshlab
-echo "distrib folder is now a self contained meshlab application"
-
-#going back to original location
-cd $DIR
diff --git a/scripts/Windows/qmake/windows_nsis_installer.ps1 b/scripts/Windows/qmake/windows_nsis_installer.ps1
deleted file mode 100644
index 222b99512..000000000
--- a/scripts/Windows/qmake/windows_nsis_installer.ps1
+++ /dev/null
@@ -1,32 +0,0 @@
-# This is a powershell script for computing an installer for MeshLab.
-# Requires:
-# - a properly deployed meshlab (see windows_deploy.ps1);
-# - the env variable PATH containing the NSIS folder (makensis.exe must be directly accessible)
-#
-# Without given arguments, the folder that will be deployed is meshlab/distrib.
-#
-# You can give as argument the DISTRIB_PATH.
-#
-# After running this script, the installer can be found inside the resources folder.
-
-#saving location where script has been run
-$DIR = Get-Location
-
-$SCRIPTS_PATH = Join-Path $PSScriptRoot ..\
-
-if ($args.Count -gt 0){
- $DISTRIB_PATH = $args[0]
-} else {
- $DISTRIB_PATH = Join-Path $PSScriptRoot ..\..\..\distrib #default distrib
-}
-
-.\..\resources\windows_nsis_script.ps1 $DISTRIB_PATH
-
-cd $SCRIPTS_PATH
-
-makensis.exe .\..\resources\meshlab_final.nsi
-
-Remove-Item .\..\resources\meshlab_final.nsi
-
-#going back to original location
-cd $DIR
diff --git a/scripts/Windows/resources/nsis_script.sh b/scripts/Windows/resources/nsis_script.sh
deleted file mode 100644
index 51c271806..000000000
--- a/scripts/Windows/resources/nsis_script.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-# This is a powershell script for computing the meshlab_final.nsi script.
-# Requires:
-# - a properly deployed meshlab (see windows_deploy.ps1);
-#
-# Without given arguments, the folder that will be deployed is meshlab/distrib.
-#
-# You can give as argument the DISTRIB_PATH.
-#
-# After running this script, a meshlab_final.script can be found in the resources folder.
-# This script is ready to be run by makensis.exe
-
-SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
-SOURCE_PATH=$SCRIPTS_PATH/../../src
-ML_VERSION=$(cat $SOURCE_PATH/../ML_VERSION)
-INSTALL_PATH=$SOURCE_PATH/install
-
-#check parameters
-for i in "$@"
-do
-case $i in
- -i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
- --double_precision)
- ML_VERSION=${ML_VERSION}d
- shift # past argument=value
- ;;
- *)
- # unknown option
- ;;
-esac
-done
-
-sed "s%MESHLAB_VERSION%$ML_VERSION%g" $SCRIPTS_PATH/resources/meshlab.nsi > $SCRIPTS_PATH/resources/meshlab_final.nsi
-sed -i "s%DISTRIB_PATH%.%g" $SCRIPTS_PATH/resources/meshlab_final.nsi
-
-mv $SCRIPTS_PATH/resources/meshlab_final.nsi $INSTALL_PATH/
-cp $SCRIPTS_PATH/resources/ExecWaitJob.nsh $INSTALL_PATH/
-cp $SCRIPTS_PATH/resources/FileAssociation.nsh $INSTALL_PATH/
diff --git a/scripts/Windows/resources/windows_nsis_script.ps1 b/scripts/Windows/resources/windows_nsis_script.ps1
deleted file mode 100644
index d8560d022..000000000
--- a/scripts/Windows/resources/windows_nsis_script.ps1
+++ /dev/null
@@ -1,41 +0,0 @@
-# This is a powershell script for computing the meshlab_final.nsi script.
-# Requires:
-# - a properly deployed meshlab (see windows_deploy.ps1);
-#
-# Without given arguments, the folder that will be deployed is meshlab/distrib.
-#
-# You can give as argument the DISTRIB_PATH.
-#
-# After running this script, a meshlab_final.script can be found in the resources folder.
-# This script is ready to be run by makensis.exe
-
-#saving location where script has been run
-$DIR = Get-Location
-
-$INSTALL_PATH = Join-Path $PSScriptRoot ..\
-$SOURCE_PATH = Join-Path $PSScriptRoot ..\..\..\src
-
-if ($args.Count -gt 0){
- $DISTRIB_PATH = $args[0]
-} else {
- $DISTRIB_PATH = Join-Path $PSScriptRoot ..\..\..\distrib #default distrib
-}
-
-cd $DISTRIB_PATH
-
-if(! (Test-Path meshlab.exe)){ #meshlab.exe not found inside $DISTRIB_PATH
- cd $DIR
- throw 'meshlab.exe not found in ' + ($DISTRIB_PATH) + '. Exiting.'
-}
-
-$VERSION = type (Join-Path $SOURCE_PATH ..\ML_VERSION)
-
-cd $INSTALL_PATH
-
-cat resources\meshlab.nsi | %{$_ -replace "MESHLAB_VERSION",$VERSION} > resources\meshlab_tmp.nsi
-cat resources\meshlab_tmp.nsi | %{$_ -replace "DISTRIB_PATH",$DISTRIB_PATH} > resources\meshlab_final.nsi
-
-Remove-Item resources\meshlab_tmp.nsi
-
-#going back to original location
-cd $DIR
diff --git a/scripts/macOS/0_setup_env.sh b/scripts/macOS/0_setup_env.sh
index 70a796376..6bc5d3d8c 100644
--- a/scripts/macOS/0_setup_env.sh
+++ b/scripts/macOS/0_setup_env.sh
@@ -6,11 +6,35 @@
#
# Requires: homebrew
-brew install libomp qt
+DONT_INSTALL_QT=false
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ --dont_install_qt)
+ DONT_INSTALL_QT=true
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+brew install coreutils node cmake ninja libomp cgal xerces-c
npm install -g appdmg
-echo "export QTDIR=/usr/local/opt/qt" >> ~/.bash_profile
-echo "export PATH=$QTDIR/bin:$PATH" >> ~/.bash_profile
-echo "export LD_LIBRARY_PATH=/usr/local/opt/qt/lib:$LD_LIBRARY_PATH" >> ~/.bash_profile
-echo "export PKG_CONFIG_PATH=/usr/local/opt/qt/lib:$PKG_CONFIG_PATH" >> ~/.bash_profile
-. ~/.bash_profile
+if [ "$DONT_INSTALL_QT" = false ] ; then
+ echo "=== installing qt packages..."
+
+ brew install qt
+
+ echo "export QTDIR=/usr/local/opt/qt" >> ~/.bash_profile
+ echo "export PATH=$QTDIR/bin:$PATH" >> ~/.bash_profile
+ echo "export LD_LIBRARY_PATH=/usr/local/opt/qt/lib:$LD_LIBRARY_PATH" >> ~/.bash_profile
+ echo "export PKG_CONFIG_PATH=/usr/local/opt/qt/lib:$PKG_CONFIG_PATH" >> ~/.bash_profile
+ . ~/.bash_profile
+else
+ echo "=== jumping installation of qt packages..."
+fi
diff --git a/scripts/macOS/1_build.sh b/scripts/macOS/1_build.sh
index 5d561e4f4..daa31b451 100644
--- a/scripts/macOS/1_build.sh
+++ b/scripts/macOS/1_build.sh
@@ -1,52 +1,50 @@
#!/bin/bash
-# this is a script shell for compiling meshlab in a MacOS environment.
-# Requires a Qt environment which is set-up properly, and an accessible
-# cmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src/build
-# directory, and installed in $BUILD_PATH/../install.
-#
-# You can give as argument the BUILD_PATH and the INSTALL_PATH in the
-# following way:
-# sh macos_build.sh --build_path=/path/to/build --install_path=/path/to/install
-# -b and -i arguments are also supported.
-
-#realpath function
-#realpath() {
-# [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-#}
#default paths wrt the script folder
SCRIPTS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-SOURCE_PATH=$SCRIPTS_PATH/../../src
+SOURCE_PATH=$SCRIPTS_PATH/../..
BUILD_PATH=$SOURCE_PATH/build
INSTALL_PATH=$SOURCE_PATH/install
-CORES="-j4"
DOUBLE_PRECISION_OPTION=""
+NIGHTLY_OPTION=""
+QT_DIR=""
+CCACHE=""
#check parameters
for i in "$@"
do
case $i in
+ -s=*|--source_path=*)
+ SOURCE_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-b=*|--build_path=*)
- BUILD_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ BUILD_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
- -j*)
- CORES=$i
- shift # past argument=value
- ;;
- --double_precision)
- DOUBLE_PRECISION_OPTION="-DBUILD_WITH_DOUBLE_SCALAR=ON"
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -d|--double_precision)
+ DOUBLE_PRECISION_OPTION="-DMESHLAB_BUILD_WITH_DOUBLE_SCALAR=ON"
+ shift # past argument=value
+ ;;
+ -n|--nightly)
+ NIGHTLY_OPTION="-DMESHLAB_IS_NIGHTLY_VERSION=ON"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR=${i#*=}
+ shift # past argument=value
+ ;;
+ --ccache)
+ CCACHE="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
@@ -62,7 +60,16 @@ then
mkdir -p $INSTALL_PATH
fi
+if [ ! -z "$QT_DIR" ]
+then
+ export Qt5_DIR=$QT_DIR
+fi
+
+BUILD_PATH=$(realpath $BUILD_PATH)
+INSTALL_PATH=$(realpath $INSTALL_PATH)
+
cd $BUILD_PATH
-cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $SOURCE_PATH
-make $CORES
-make install
+export NINJA_STATUS="[%p (%f/%t) ] "
+cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $CCACHE $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $SOURCE_PATH
+ninja
+ninja install
diff --git a/scripts/macOS/2_deploy.sh b/scripts/macOS/2_deploy.sh
index 230b2cd93..f359e86e6 100755
--- a/scripts/macOS/2_deploy.sh
+++ b/scripts/macOS/2_deploy.sh
@@ -1,48 +1,77 @@
#!/bin/bash
-# this is a script shell for deploying a meshlab-portable app.
-# Requires a properly built meshlab.
-#
-# Without given arguments, the folder that will be deployed is meshlab/distrib.
-#
-# You can give as argument the DISTRIB_PATH.
-#
-# After running this script, $DISTRIB_PATH/meshlab.app will be a portable meshlab application.
-#realpath function
-realpath() {
- [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
-SCRIPTS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-INSTALL_PATH=$SCRIPTS_PATH/../../src/install
-APPNAME="meshlab.app"
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+QT_DIR_OPTION=""
+PACKAGES_PATH=$SCRIPTS_PATH/../../packages
+SIGN=false
+NOTARIZE=false
+CERT_ID=""
+NOTAR_USER=""
+NOTAR_TEAM_ID=""
+NOTAR_PASSWORD=""
#checking for parameters
for i in "$@"
do
case $i in
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR_OPTION=-qt=${i#*=}
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -ci=*|--cert_id=*)
+ CERT_ID="${i#*=}"
+ if [ -n "$CERT_ID" ]; then
+ SIGN=true
+ fi
+ shift # past argument=value
+ ;;
+ -nu=*|--notarization_user=*)
+ NOTAR_USER="${i#*=}"
+ if [ -n "$NOTAR_USER" ]; then
+ NOTARIZE=true
+ fi
+ shift # past argument=value
+ ;;
+ -np=*|--notarization_pssw=*)
+ NOTAR_PASSWORD="${i#*=}"
+ shift # past argument=value
+ ;;
+ -nt=*|--notarization_team=*)
+ NOTAR_TEAM_ID="${i#*=}"
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
-echo "Hopefully I should find " $INSTALL_PATH/$APPNAME
+bash $SCRIPTS_PATH/internal/2a_appbundle.sh -i=$INSTALL_PATH $QT_DIR_OPTION
-if ! [ -e $INSTALL_PATH/$APPNAME -a -d $INSTALL_PATH/$APPNAME ]
-then
- echo "Started in the wrong dir: I have not found the meshlab.app"
- exit -1
+echo "======= AppBundle Created ======="
+
+if [ "$SIGN" = true ] ; then
+ bash $SCRIPTS_PATH/internal/2b_sign_appbundle.sh -i=$INSTALL_PATH -ci=$CERT_ID
+
+ echo "======= AppBundle Signed ======="
fi
-if [ -e $QTDIR/bin/macdeployqt ]
-then
- $QTDIR/bin/macdeployqt $INSTALL_PATH/$APPNAME -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_csg.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_globalregistration.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_isoparametrization.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_screened_poisson.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_sketchfab.so
-
-else
- macdeployqt $INSTALL_PATH/$APPNAME -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_csg.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_globalregistration.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_isoparametrization.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_screened_poisson.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_sketchfab.so
+if [ "$NOTARIZE" = true ] ; then
+ bash $SCRIPTS_PATH/internal/2c_notarize_appbundle.sh -i=$INSTALL_PATH -nu=$NOTAR_USER -nt=$NOTAR_TEAM_ID -np=$NOTAR_PASSWORD
+
+ echo "======= AppBundle Notarized ======="
fi
+
+bash $SCRIPTS_PATH/internal/2d_dmg.sh -i=$INSTALL_PATH -p=$PACKAGES_PATH
+
+echo "======= DMG Created ======="
\ No newline at end of file
diff --git a/scripts/macOS/3_dmg.sh b/scripts/macOS/3_dmg.sh
deleted file mode 100755
index 328886a08..000000000
--- a/scripts/macOS/3_dmg.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-# this is a script shell for setting up the application DMG for MacOS.
-# Requires a properly built and deployed meshlab (requires to run the
-# macos_deploy.sh script first).
-#
-# Without given arguments, meshlab.app will be looked for in meshlab/distrib
-# folder. MeshLab DMG will be placed in the same directory of meshlab.app.
-#
-# You can give as argument the DISTRIB_PATH containing meshlab.app.
-
-#realpath function
-realpath() {
- [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
-
-SCRIPTS_PATH=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
-INSTALL_PATH=$SCRIPTS_PATH/../../src/install
-ML_VERSION=$(cat $SCRIPTS_PATH/../../ML_VERSION)
-
-#checking for parameters
-for i in "$@"
-do
-case $i in
- -i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"
- shift # past argument=value
- ;;
- --double_precision)
- ML_VERSION=${ML_VERSION}d
- shift # past argument=value
- ;;
- *)
- # unknown option
- ;;
-esac
-done
-
-if ! [ -e $INSTALL_PATH/meshlab.app -a -d $INSTALL_PATH/meshlab.app ]
-then
- echo "Started in the wrong dir: I have not found the meshlab.app"
- exit -1
-fi
-
-SOURCE_PATH=$SCRIPTS_PATH/../../src
-
-# final step create the dmg using appdmg
-# appdmg is installed with 'npm install -g appdmg'",
-sed "s%DISTRIB_PATH%$INSTALL_PATH%g" $SCRIPTS_PATH/resources/meshlab_dmg_latest.json > $SCRIPTS_PATH/resources/meshlab_dmg_final.json
-sed -i '' "s%SOURCE_PATH%$SOURCE_PATH%g" $SCRIPTS_PATH/resources/meshlab_dmg_final.json
-
-rm -f $INSTALL_PATH/*.dmg
-
-echo "Running appdmg"
-appdmg $SCRIPTS_PATH/resources/meshlab_dmg_final.json $INSTALL_PATH/MeshLab$ML_VERSION.dmg
-
-rm $SCRIPTS_PATH/resources/meshlab_dmg_final.json
-
-#at this point, distrib folder contains a DMG MeshLab file
-echo "distrib folder now contains a DMG file"
diff --git a/scripts/macOS/README.md b/scripts/macOS/README.md
index 6eb41a14e..b571b3258 100644
--- a/scripts/macOS/README.md
+++ b/scripts/macOS/README.md
@@ -1,37 +1,27 @@
# MacOS Scripts
-This folder contains a series of scripts to build and deploy MeshLab under a MacOS environment.
+This folder contains a series of scripts to build and deploy MeshLab under a MacOS x86_64 environment.
-* `0_setup_env.sh`: this script installs all the required dependencies that are necessary to build MeshLab and to create its DMG in a MacOS machine (tested in 10.15 Catalina). It requires [homebrew](https://brew.sh/) installed;
-* `1_build.sh`: this script builds MeshLab in a MacOS environment:
- * it requires a properly set Qt environment (see `0_setup_env.sh`);
- * takes as arguments:
- * the build directory (default: `src/build`): `--build_path=path/to/build`
- * the install directory (default: `src/install`): `--install_path=path/to/install`
- * the number of cores used to build MeshLab (default: `-j4`)`
- * the possibility to build MeshLab with double precision scalar: `--double_precision`
-* `2_deploy.sh`: this script makes portable a `meshlab.app` appdir. Takes as arguments:
- * the path where the output install path of the `1_build.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
-* `3_dmg.sh`: this script generates a [DMG](https://en.wikipedia.org/wiki/Apple_Disk_Image) that can be used to install MeshLab. Takes as arguments:
- * the path where the install path of the `2_deploy.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
- * if MeshLab has been built with double precision scalar, add: `--double_precision`
-* `make_it.sh`: this script builds, deploys and generates a [DMG](https://en.wikipedia.org/wiki/Apple_Disk_Image) that can be used to install MeshLab. Arguments are the same of the `1_build.sh` script.
+Arm (Apple M1) is still not supported. It will be supported soon.
+## Note about Qt
-## Examples
+MeshLab requires Qt 5.15. You can both install Qt5 using `brew` or manually in your system.
+If you install Qt manually. you can then give the path of the Qt installation directory to the various scripts, or you can add Qt to your `LD_LIBRARY_PATH`.
-Building MeshLab on a clean MacOS environment (build placed in `meshlab/src/build`):
+The `0_setup_env.sh` script won't install qt from `brew` if you pass the argument `dont_install_qt`.
- git clone --recursive https://github.com/cnr-isti-vclab/meshlab
- sh meshlab/scripts/macOS/0_setup_env.sh
- sh meshlab/scripts/macOS/1_build.sh
+## Dependencies
-Building and generating a DMG on a clean MacOS environment:
-* build directory: `./meshlab-build`
-* install directory: `./meshlab-install`
-* DMG path: `./`
+Dependencies are automatically installed by the `0_setup_env.sh` script, which uses [`brew`](https://brew.sh/) as package manager.
+Be sure to have `brew` installed before running this script.
-```
-git clone --recursive https://github.com/cnr-isti-vclab/meshlab
-sh meshlab/scripts/macOS/0_setup_env.sh
-sh meshlab/scripts/macOS/make_it.sh --build_path="./meshlab-build" --install_path="./meshlab-install"
-```
+Libraries installed by the `0_setup_env.sh` are the following:
+ - Required by MeshLab:
+ - `coreutils` (required by these scripts)
+ - `cmake`
+ - `ninja`
+ - `libomp`
+ - `node` (for package stage, to download appdmg)
+ - Optional:
+ - `xerces-c` (required by libe57)
+ - `cgal` (required by several MeshLab plugins)
\ No newline at end of file
diff --git a/scripts/macOS/internal/2a_appbundle.sh b/scripts/macOS/internal/2a_appbundle.sh
new file mode 100644
index 000000000..fb3dfb4c7
--- /dev/null
+++ b/scripts/macOS/internal/2a_appbundle.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+QT_DIR=""
+APPNAME="meshlab.app"
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR=${i#*=}/bin/
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+ARGUMENTS=""
+
+for plugin in $INSTALL_PATH/$APPNAME/Contents/PlugIns/*.so
+do
+ ARGUMENTS="${ARGUMENTS} -executable=${plugin}"
+done
+
+${QT_DIR}macdeployqt $INSTALL_PATH/$APPNAME \
+ $ARGUMENTS
+
+# remove everything from install path, except the appbundle
+cd $INSTALL_PATH
+ls | grep -xv "${APPNAME}" | xargs rm
\ No newline at end of file
diff --git a/scripts/macOS/internal/2b_sign_appbundle.sh b/scripts/macOS/internal/2b_sign_appbundle.sh
new file mode 100644
index 000000000..268d6c456
--- /dev/null
+++ b/scripts/macOS/internal/2b_sign_appbundle.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+CERT_ID=""
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -ci=*|--cert_id=*)
+ CERT_ID="${i#*=}"
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+codesign --options "runtime" --timestamp --force --deep --sign $CERT_ID $INSTALL_PATH/meshlab.app
+
+spctl -a -vvv $INSTALL_PATH/meshlab.app
\ No newline at end of file
diff --git a/scripts/macOS/internal/2c_notarize_appbundle.sh b/scripts/macOS/internal/2c_notarize_appbundle.sh
new file mode 100644
index 000000000..3eb6346ca
--- /dev/null
+++ b/scripts/macOS/internal/2c_notarize_appbundle.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+NOTAR_USER=""
+NOTAR_PASSWORD=""
+NOTAR_TEAM_ID=""
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -nu=*|--notarization_user=*)
+ NOTAR_USER="${i#*=}"
+ shift # past argument=value
+ ;;
+ -nt=*|--notarization_team=*)
+ NOTAR_TEAM_ID="${i#*=}"
+ shift # past argument=value
+ ;;
+ -np=*|--notarization_pssw=*)
+ NOTAR_PASSWORD="${i#*=}"
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+xcrun notarytool store-credentials "notarytool-profile" --apple-id $NOTAR_USER --team-id $NOTAR_TEAM_ID --password $NOTAR_PASSWORD
+
+ditto -c -k --keepParent "$INSTALL_PATH/meshlab.app" "$INSTALL_PATH/notarization.zip"
+
+xcrun notarytool submit "install/notarization.zip" --keychain-profile "notarytool-profile" --wait
+
+xcrun stapler staple "$INSTALL_PATH/meshlab.app"
+
+rm -rf $INSTALL_PATH/notarization.zip
\ No newline at end of file
diff --git a/scripts/macOS/internal/2d_dmg.sh b/scripts/macOS/internal/2d_dmg.sh
new file mode 100644
index 000000000..7a5495d15
--- /dev/null
+++ b/scripts/macOS/internal/2d_dmg.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
+RESOURCES_PATH=$SCRIPTS_PATH/../../resources
+INSTALL_PATH=$SCRIPTS_PATH/../../install
+PACKAGES_PATH=$SCRIPTS_PATH/../../packages
+
+#checking for parameters
+for i in "$@"
+do
+case $i in
+ -i=*|--install_path=*)
+ INSTALL_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
+ *)
+ # unknown option
+ ;;
+esac
+done
+
+if ! [ -e $INSTALL_PATH/meshlab.app -a -d $INSTALL_PATH/meshlab.app ]
+then
+ echo "Started in the wrong dir: I have not found the meshlab.app"
+ exit -1
+fi
+
+#get version
+IFS=' ' #space delimiter
+STR_VERSION=$($INSTALL_PATH/meshlab.app/Contents/MacOS/meshlab --version)
+read -a strarr <<< "$STR_VERSION"
+ML_VERSION=${strarr[1]} #get the meshlab version from the string
+
+# final step create the dmg using appdmg
+# appdmg is installed with 'npm install -g appdmg'",
+sed "s%DISTRIB_PATH%$INSTALL_PATH%g" $RESOURCES_PATH/macos/meshlab_dmg_latest.json > $RESOURCES_PATH/macos/meshlab_dmg_final.json
+sed -i '' "s%ML_VERSION%$ML_VERSION%g" $RESOURCES_PATH/macos/meshlab_dmg_final.json
+sed -i '' "s%RESOURCES_PATH%$RESOURCES_PATH%g" $RESOURCES_PATH/macos/meshlab_dmg_final.json
+
+rm -f $INSTALL_PATH/*.dmg
+
+mv $INSTALL_PATH/meshlab.app $INSTALL_PATH/MeshLab$ML_VERSION.app
+
+mkdir $PACKAGES_PATH
+
+appdmg $RESOURCES_PATH/macos/meshlab_dmg_final.json $PACKAGES_PATH/MeshLab$ML_VERSION-macos.dmg
+
+rm $RESOURCES_PATH/macos/meshlab_dmg_final.json
\ No newline at end of file
diff --git a/scripts/macOS/make_it.sh b/scripts/macOS/make_it.sh
index 3311f222f..a28a311ff 100644
--- a/scripts/macOS/make_it.sh
+++ b/scripts/macOS/make_it.sh
@@ -1,54 +1,54 @@
#!/bin/bash
-# This is a script shell for compiling and deploying MeshLab in a MacOS environment.
-#
-# Requires a Qt environment which is set-up properly, and an accessible
-# cmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src/build,
-# the folder meshlab/src/install will contain meshlab.app and
-# the DMG will be placed in meshlab/src.
-#
-# You can give as argument the build path, the install path (that will contain
-# the portable version of MeshLab), and the number of cores to use to build MeshLab
-# (default: 4).
-# The DMG will be placed in the parent directory of the install path.
-#
-# Example of call:
-# bash make_it.sh --build_path=path/to/build --install_path=path/to/install -j8
SCRIPTS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-SOURCE_PATH=$SCRIPTS_PATH/../../src
+SOURCE_PATH=$SCRIPTS_PATH/../..
BUILD_PATH=$SOURCE_PATH/build
INSTALL_PATH=$SOURCE_PATH/install
-CORES="-j4"
+PACKAGES_PATH=$SOURCE_PATH/packages
+
DOUBLE_PRECISION_OPTION=""
+NIGHTLY_OPTION=""
+QT_DIR_OPTION=""
+CCACHE_OPTION=""
#check parameters
for i in "$@"
do
case $i in
-b=*|--build_path=*)
- BUILD_PATH="${i#*=}"
- shift # past argument=value
- ;;
+ BUILD_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
-i=*|--install_path=*)
- INSTALL_PATH="${i#*=}"/usr/
- shift # past argument=value
- ;;
- -j*)
- CORES=$i
- shift # past argument=value
- ;;
+ INSTALL_PATH="${i#*=}"/usr/
+ shift # past argument=value
+ ;;
+ -p=*|--packages_path=*)
+ PACKAGES_PATH="${i#*=}"
+ shift # past argument=value
+ ;;
--double_precision)
- DOUBLE_PRECISION_OPTION="--double_precision"
- shift # past argument=value
- ;;
+ DOUBLE_PRECISION_OPTION="--double_precision"
+ shift # past argument=value
+ ;;
+ -n|--nightly)
+ NIGHTLY_OPTION="--nightly"
+ shift # past argument=value
+ ;;
+ -qt=*|--qt_dir=*)
+ QT_DIR_OPTION=-qt=${i#*=}
+ shift # past argument=value
+ ;;
+ --ccache)
+ CCACHE_OPTION="--ccache"
+ shift # past argument=value
+ ;;
*)
- # unknown option
- ;;
+ # unknown option
+ ;;
esac
done
-sh $SCRIPTS_PATH/1_build.sh -b=$BUILD_PATH -i=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $CORES
-sh $SCRIPTS_PATH/2_deploy.sh -i=$INSTALL_PATH
-sh $SCRIPTS_PATH/3_dmg.sh -i=$INSTALL_PATH $DOUBLE_PRECISION_OPTION
+bash $SCRIPTS_PATH/1_build.sh -b=$BUILD_PATH -i=$INSTALL_PATH $NIGHTLY_OPTION $DOUBLE_PRECISION_OPTION $QT_DIR_OPTION $CCACHE_OPTION
+bash $SCRIPTS_PATH/2_deploy.sh -i=$INSTALL_PATH -p=$PACKAGES_PATH $QT_DIR_OPTION
+
diff --git a/scripts/macOS/qmake/macos_build.sh b/scripts/macOS/qmake/macos_build.sh
deleted file mode 100644
index 1e1560566..000000000
--- a/scripts/macOS/qmake/macos_build.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-# this is a script shell for compiling meshlab in a MacOS environment.
-# Requires a Qt environment which is set-up properly from brew, and an accessible
-# qmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries will be
-# then placed inside BUILD_PATH/distrib.
-
-#realpath function
-realpath() {
- [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- BUILD_PATH="../../../src"
-else
- BUILD_PATH=$( realpath $1 )
-fi
-
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-cd $DIR #move to script directory
-
-if ! [ -d $BUILD_PATH ]
-then
- mkdir $BUILD_PATH
-fi
-
-echo "Build path is: " $(realpath $BUILD_PATH)
-SOURCE_PATH=$PWD/../../../src
-
-cd $BUILD_PATH
-qmake $SOURCE_PATH/meshlab.pro
-make -j4
diff --git a/scripts/macOS/qmake/macos_build_debug.sh b/scripts/macOS/qmake/macos_build_debug.sh
deleted file mode 100644
index 8e0aa622c..000000000
--- a/scripts/macOS/qmake/macos_build_debug.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-# this is a script shell for compiling meshlab in a MacOS environment.
-# Requires a Qt environment which is set-up properly from brew, and an accessible
-# qmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries will be
-# then placed inside BUILD_PATH/distrib.
-
-#realpath function
-realpath() {
- [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- BUILD_PATH="../../../src"
-else
- BUILD_PATH=$( realpath $1 )
-fi
-
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-cd $DIR #move to script directory
-
-if ! [ -d $BUILD_PATH ]
-then
- mkdir $BUILD_PATH
-fi
-
-echo "Build path is: " $(realpath $BUILD_PATH)
-SOURCE_PATH=$PWD/../../../src
-
-cd $BUILD_PATH
-qmake $SOURCE_PATH/meshlab.pro CONFIG+=debug
-make -j4
diff --git a/scripts/macOS/qmake/macos_build_meshlab_mini.sh b/scripts/macOS/qmake/macos_build_meshlab_mini.sh
deleted file mode 100644
index 8e4f89c0f..000000000
--- a/scripts/macOS/qmake/macos_build_meshlab_mini.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-# this is a script shell for compiling meshlab in a MacOS environment.
-# Requires a Qt environment which is set-up properly from brew, and an accessible
-# qmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries will be
-# then placed inside BUILD_PATH/distrib.
-
-#realpath function
-realpath() {
- [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- BUILD_PATH="../../../src"
-else
- BUILD_PATH=$( realpath $1 )
-fi
-
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-cd $DIR #move to script directory
-
-if ! [ -d $BUILD_PATH ]
-then
- mkdir $BUILD_PATH
-fi
-
-echo "Build path is: " $(realpath $BUILD_PATH)
-SOURCE_PATH=$PWD/../../../src
-
-cd $BUILD_PATH
-qmake $SOURCE_PATH/meshlab.pro "CONFIG+=meshlab_mini"
-make -j4
diff --git a/scripts/macOS/qmake/macos_deploy.sh b/scripts/macOS/qmake/macos_deploy.sh
deleted file mode 100755
index 1306a1389..000000000
--- a/scripts/macOS/qmake/macos_deploy.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-# this is a script shell for deploying a meshlab-portable app.
-# Requires a properly built meshlab.
-#
-# Without given arguments, the folder that will be deployed is meshlab/distrib.
-#
-# You can give as argument the DISTRIB_PATH.
-#
-# After running this script, $DISTRIB_PATH/meshlab.app will be a portable meshlab application.
-
-#realpath function
-realpath() {
- [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- DISTRIB_PATH="../../../distrib"
-else
- DISTRIB_PATH=$( realpath $1 )
-fi
-
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-cd $DIR #move to script directory
-
-SOURCE_PATH=$PWD/../../../src
-
-APPNAME="meshlab.app"
-
-echo "Hopefully I should find" $DISTRIB_PATH/$APPNAME
-
-if ! [ -e $DISTRIB_PATH/$APPNAME -a -d $DISTRIB_PATH/$APPNAME ]
-then
- echo "Started in the wrong dir: I have not found the meshlab.app"
- exit -1
-fi
-
-echo "Copying the built app into the bundle"
-mkdir $DISTRIB_PATH/$APPNAME/Contents/PlugIns
-# copy the files icons into the app.
-cp $SOURCE_PATH/meshlab/images/meshlab_obj.icns $DISTRIB_PATH/$APPNAME/Contents/Resources
-
-for x in $DISTRIB_PATH/plugins/*.dylib
-do
-cp $x $DISTRIB_PATH/$APPNAME/Contents/PlugIns/
-done
-
-#copy libIFX libraries and change rpath u3d plugin
-cp -a $DISTRIB_PATH/lib/meshlab/libIFX* $DISTRIB_PATH/$APPNAME/Contents/Frameworks
-rm $DISTRIB_PATH/$APPNAME/Contents/Frameworks/libIFXCoreStatic.a
-install_name_tool -change libIFXCore.1.so @rpath/libIFXCore.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
-install_name_tool -change libIFXExporting.1.so @rpath/libIFXExporting.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
-install_name_tool -change libIFXScheduling.1.so @rpath/libIFXScheduling.1.so $DISTRIB_PATH/$APPNAME/Contents/PlugIns/libio_u3d.dylib
-
-echo 'Copying other files'
-
-#shaders
-mkdir $DISTRIB_PATH/$APPNAME/Contents/shaders
-cp -r $DISTRIB_PATH/shaders/*.gdp $DISTRIB_PATH/shaders/*.vert $DISTRIB_PATH/shaders/*.frag $DISTRIB_PATH/shaders/*.txt $DISTRIB_PATH/$APPNAME/Contents/shaders
-
-#added rendermonkey shaders
-mkdir $DISTRIB_PATH/$APPNAME/Contents/shaders/shadersrm
-cp $DISTRIB_PATH/shaders/shadersrm/*.rfx $DISTRIB_PATH/$APPNAME/Contents/shaders/shadersrm
-#added shadowmapping shaders
-cp -r $DISTRIB_PATH/shaders/decorate_shadow $DISTRIB_PATH/$APPNAME/Contents/shaders
-
-echo "Changing the paths of the qt component frameworks using the qt tool macdeployqt"
-
-if [ -e $QTDIR/bin/macdeployqt ]
-then
- $QTDIR/bin/macdeployqt $DISTRIB_PATH/$APPNAME -executable=$DISTRIB_PATH/$APPNAME/Contents/MacOS/meshlabserver
-else
- macdeployqt $DISTRIB_PATH/$APPNAME -executable=$DISTRIB_PATH/$APPNAME/Contents/MacOS/meshlabserver
-fi
diff --git a/scripts/macOS/qmake/macos_dmg.sh b/scripts/macOS/qmake/macos_dmg.sh
deleted file mode 100755
index e59d97fb2..000000000
--- a/scripts/macOS/qmake/macos_dmg.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-# this is a script shell for setting up the application DMG for MacOS.
-# Requires a properly built and deployed meshlab (requires to run the
-# macos_deploy.sh script first).
-#
-# Without given arguments, meshlab.app will be looked for in meshlab/distrib
-# folder. MeshLab DMG will be placed in the same directory of meshlab.app.
-#
-# You can give as argument the DISTRIB_PATH containing meshlab.app.
-
-#realpath function
-realpath() {
- [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- DISTRIB_PATH="../../../distrib"
-else
- DISTRIB_PATH=$( realpath $1 )
-fi
-
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-cd $DIR #move to script directory
-
-DISTRIB_PATH=$( realpath $DISTRIB_PATH)
-
-if ! [ -e $DISTRIB_PATH/meshlab.app -a -d $DISTRIB_PATH/meshlab.app ]
-then
- echo "Started in the wrong dir: I have not found the meshlab.app"
- exit -1
-fi
-
-SOURCE_PATH=$DIR/../../../src
-
-# final step create the dmg using appdmg
-# appdmg is installed with 'npm install -g appdmg'",
-sed "s%DISTRIB_PATH%$DISTRIB_PATH%g" ../resources/meshlab_dmg_latest.json > ../resources/meshlab_dmg_final.json
-sed -i '' "s%SOURCE_PATH%$SOURCE_PATH%g" ../resources/meshlab_dmg_final.json
-
-rm -f $DISTRIB_PATH/*.dmg
-
-echo "Running appdmg"
-appdmg ../resources/meshlab_dmg_final.json $DISTRIB_PATH/MeshLab$(cat ../../../ML_VERSION).dmg
-
-#at this point, distrib folder contains a DMG MeshLab file
-echo "distrib folder now contains a DMG file"
diff --git a/scripts/macOS/qmake/macos_make_it.sh b/scripts/macOS/qmake/macos_make_it.sh
deleted file mode 100644
index 6d5814bdd..000000000
--- a/scripts/macOS/qmake/macos_make_it.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-# this is a script shell for compiling and deploying meshlab in a MacOS environment.
-#
-# Requires a Qt environment which is set-up properly, and an accessible
-# qmake binary.
-#
-# Without given arguments, MeshLab will be built in the meshlab/src
-# directory, and binaries and AppImage will be placed in meshlab/distrib.
-#
-# You can give as argument the BUILD_PATH, and meshlab binaries and
-# AppImage will be then placed inside BUILD_PATH/distrib.
-
-#realpath function
-realpath() {
- [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
-
-#checking for parameters
-if [ "$#" -eq 0 ]
-then
- BUILD_PATH="../../../src"
- DISTRIB_PATH="../../../distrib"
-else
- BUILD_PATH=$( realpath $1 )
- DISTRIB_PATH=$BUILD_PATH/distrib
-fi
-
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-cd $DIR #move to script directory
-
-sh macos_build.sh $BUILD_PATH
-sh macos_deploy.sh $DISTRIB_PATH
-sh macos_dmg.sh $DISTRIB_PATH
diff --git a/scripts/meshlab.png b/scripts/meshlab.png
deleted file mode 100644
index 2f787916d..000000000
Binary files a/scripts/meshlab.png and /dev/null differ
diff --git a/scripts/qt.conf b/scripts/qt.conf
deleted file mode 100644
index 1c7b73536..000000000
--- a/scripts/qt.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Paths]
-Plugins = plugins
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 53e7ff4e1..30dabb63d 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,7 +1,7 @@
# Known to build in Ubuntu 18.04, 20.04
name: meshlab
base: core18
-version: '2020.12'
+version: '2022.02'
summary: MeshLab
description: |
The open source system for processing and editing 3D triangular meshes.
@@ -18,9 +18,14 @@ apps:
meshlab:
command: AppRun
extensions: [kde-neon]
- plugs: [home, opengl, removable-media]
desktop: usr/share/applications/meshlab.desktop
-
+ environment:
+ DISABLE_WAYLAND: 1
+ plugs:
+ - home
+ - opengl
+ - removable-media
+ - mount-observe
parts:
meshlab:
@@ -43,6 +48,9 @@ parts:
- patchelf
- rsync
- libqt5opengl5-dev
+ - libcgal-dev
+ - libboost-all-dev
+ - libxerces-c-dev
stage-packages:
- lib3ds-1-3
- libgomp1
diff --git a/src/.clang-format b/src/.clang-format
new file mode 100644
index 000000000..57e9e430c
--- /dev/null
+++ b/src/.clang-format
@@ -0,0 +1,75 @@
+---
+BasedOnStyle: LLVM
+AccessModifierOffset: -4
+AlignAfterOpenBracket: AlwaysBreak
+AlignConsecutiveAssignments: true
+AlignConsecutiveDeclarations: true
+AlignEscapedNewlines: DontAlign
+AlignOperands: true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: true
+AllowShortFunctionsOnASingleLine: InlineOnly
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: true
+AlwaysBreakTemplateDeclarations: Yes
+BinPackArguments: false
+BinPackParameters: false
+BraceWrapping:
+ AfterClass: true
+ AfterControlStatement: false
+ AfterEnum: false
+ AfterFunction: true
+ AfterNamespace: false
+ AfterStruct: true
+ AfterUnion: true
+ AfterExternBlock: true
+ BeforeCatch: true
+ BeforeElse: true
+ SplitEmptyFunction: true
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Custom
+BreakBeforeTernaryOperators: false
+BreakConstructorInitializers: AfterColon
+BreakInheritanceList: AfterColon
+BreakStringLiterals: true
+ColumnLimit: 100
+CompactNamespaces: false
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+ConstructorInitializerIndentWidth: 8
+Cpp11BracedListStyle: true
+DerivePointerAlignment: false
+ExperimentalAutoDetectBinPacking: false
+ForEachMacros:
+ [ foreach, Q_FOREACH, BOOST_FOREACH ]
+IncludeBlocks: Preserve
+IndentCaseLabels: false
+IndentPPDirectives: None
+IndentWidth: 4
+IndentWrappedFunctionNames: false
+KeepEmptyLinesAtTheStartOfBlocks: false
+Language: Cpp
+NamespaceIndentation: None
+PointerAlignment: Left
+ReflowComments: true
+SpaceAfterCStyleCast: true
+SpaceAfterTemplateKeyword: false
+SpaceBeforeCpp11BracedList: true
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
+SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: true
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles: false
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard: Cpp11
+TabWidth: 4
+UseTab: ForContinuationAndIndentation
diff --git a/src/.qmake.conf b/src/.qmake.conf
deleted file mode 100644
index b3d5125df..000000000
--- a/src/.qmake.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-MESHLAB_SOURCE_DIRECTORY=$$PWD
-MESHLAB_BUILD_DIRECTORY=$$shadowed($$PWD)
-MESHLAB_EXTERNAL_DIRECTORY=$$MESHLAB_SOURCE_DIRECTORY/external
-
-#if we are using shadow build, distrib will be inside the shadow build
-!equals(MESHLAB_BUILD_DIRECTORY, $$PWD) {
- MESHLAB_DISTRIB_DIRECTORY=$$shadowed($$PWD)/distrib
-}
-
-#if we are not using shadow build, distrib will be at the same level of
-#src directory
-equals(MESHLAB_BUILD_DIRECTORY, $$PWD) {
- MESHLAB_DISTRIB_DIRECTORY=$$MESHLAB_SOURCE_DIRECTORY/../distrib
-}
-
-MESHLAB_DISTRIB_EXT_DIRECTORY=$$MESHLAB_DISTRIB_DIRECTORY/lib/meshlab
-MESHLAB_DISTRIB_PLUGINS_DIRECTORY=$$MESHLAB_DISTRIB_DIRECTORY/plugins
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 48428d4ac..87d461de4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,115 +1,93 @@
# Copyright 2019, 2020, Collabora, Ltd.
-# Copyright 2019, 2020, Visual Computing Lab, ISTI - Italian National Research Council
+# Copyright 2019, 2021, Visual Computing Lab, ISTI - Italian National Research Council
# SPDX-License-Identifier: BSL-1.0
-cmake_minimum_required(VERSION 3.9)
-project(MeshLab)
-
-# Prefer GLVND
-if(POLICY CMP0072)
- cmake_policy(SET CMP0072 NEW)
-endif()
-
-### Build options
-option(BUILD_MINI "Build only a minimal set of plugins" OFF)
-option(BUILD_SERVER "Build a command-line server application" OFF)
-option(BUILD_STRICT "Strictly enforce resolution of all symbols" ON)
-option(BUILD_WITH_DOUBLE_SCALAR "Use double type instead of float type for scalars" OFF)
-
### Dependencies
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
-message(STATUS "Searching for required components")
+include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/meshlab_global_settings.cmake" NO_POLICY_SCOPE)
+include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/meshlab_tools.cmake")
+
+#message(STATUS "Searching for required components")
find_package(OpenGL REQUIRED)
find_package(
Qt5
COMPONENTS OpenGL Xml Network
REQUIRED)
-find_package(OpenMP)
-if (NOT BUILD_MINI)
- find_package(Qt5Qml)
+if (Qt5_VERSION VERSION_LESS 5.15.0)
+ message(FATAL_ERROR "Minimum supported Qt5 version is 5.15!")
endif()
+find_package(OpenMP)
+find_package(Threads)
message(STATUS "Searching for required components with bundled fallback")
find_package(GLEW)
find_package(Eigen3)
+set(MESHLAB_RESOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../resources)
+
### Build directories
-set(MESHLAB_BUILD_DISTRIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/distrib)
-set(MESHLAB_LIB_OUTPUT_DIR ${MESHLAB_BUILD_DISTRIB_DIR})
-set(MESHLAB_PLUGIN_OUTPUT_DIR ${MESHLAB_BUILD_DISTRIB_DIR}/plugins)
-set(MESHLAB_SHADER_OUTPUT_DIR ${MESHLAB_BUILD_DISTRIB_DIR}/shaders)
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MESHLAB_BUILD_DISTRIB_DIR})
+if (MESHLAB_USE_DEFAULT_BUILD_AND_INSTALL_DIRS) # otherwise, we assume that all these dirs are defined in parent dir
+ set(MESHLAB_BUILD_DISTRIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/distrib)
+ set(MESHLAB_LIB_OUTPUT_DIR ${MESHLAB_BUILD_DISTRIB_DIR})
+ set(MESHLAB_PLUGIN_OUTPUT_DIR ${MESHLAB_BUILD_DISTRIB_DIR}/plugins)
+ set(MESHLAB_SHADER_OUTPUT_DIR ${MESHLAB_BUILD_DISTRIB_DIR}/shaders)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MESHLAB_BUILD_DISTRIB_DIR})
-### Build settings
-set(CMAKE_C_STANDARD 99)
-set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X deployment version" FORCE)
-
-### Settings needed for both "external" and internal code
-set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-set_property(GLOBAL PROPERTY USE_FOLDERS ON)
-
-### Build Settings
-if (BUILD_WITH_DOUBLE_SCALAR)
- message(STATUS "Building with double precision")
- add_definitions(-DMESHLAB_SCALAR=double)
-else()
- message(STATUS "Building with single precision")
- add_definitions(-DMESHLAB_SCALAR=float)
-endif()
-
-if(WIN32)
- add_definitions(-DNOMINMAX)
- if(MSVC)
- add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ ### Install directories
+ if(WIN32 OR APPLE)
+ set(INSTALL_TO_UNIX_LAYOUT OFF)
+ else()
+ set(INSTALL_TO_UNIX_LAYOUT ON)
+ endif()
+ include(GNUInstallDirs)
+ if(INSTALL_TO_UNIX_LAYOUT)
+ set(MESHLAB_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
+ set(MESHLAB_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/meshlab)
+ set(MESHLAB_PLUGIN_INSTALL_DIR ${MESHLAB_LIB_INSTALL_DIR}/plugins)
+ set(MESHLAB_SHADER_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/meshlab/shaders)
+ elseif(APPLE)
+ set(MESHLAB_BIN_INSTALL_DIR .)
+ set(MESHLAB_LIB_INSTALL_DIR meshlab.app/Contents/Frameworks)
+ set(MESHLAB_PLUGIN_INSTALL_DIR meshlab.app/Contents/PlugIns)
+ set(MESHLAB_SHADER_INSTALL_DIR meshlab.app/Contents/shaders)
+ else()
+ set(MESHLAB_BIN_INSTALL_DIR .)
+ set(MESHLAB_LIB_INSTALL_DIR .)
+ set(MESHLAB_PLUGIN_INSTALL_DIR plugins)
+ set(MESHLAB_SHADER_INSTALL_DIR shaders)
endif()
-endif()
-if(BUILD_STRICT AND NOT MSVC AND NOT APPLE)
- # Make sure that our shared libraries were appropriately linked
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
- set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
-endif()
+ ### Install Settings
+ if (NOT APPLE)
+ set(CMAKE_INSTALL_RPATH $ORIGIN/../${MESHLAB_LIB_INSTALL_DIR})
+ else()
+ SET(CMAKE_INSTALL_RPATH @executable_path/../Frameworks)
+ endif()
-### Install directories
-if(WIN32 OR APPLE)
- set(INSTALL_TO_UNIX_LAYOUT OFF)
-else()
- set(INSTALL_TO_UNIX_LAYOUT ON)
-endif()
-include(GNUInstallDirs)
-if(INSTALL_TO_UNIX_LAYOUT)
- set(MESHLAB_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
- set(MESHLAB_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/meshlab)
- set(MESHLAB_PLUGIN_INSTALL_DIR ${MESHLAB_LIB_INSTALL_DIR}/plugins)
- set(MESHLAB_SHADER_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/meshlab/shaders)
-elseif(APPLE)
- set(MESHLAB_BIN_INSTALL_DIR .)
- set(MESHLAB_LIB_INSTALL_DIR meshlab.app/Contents/Frameworks)
- set(MESHLAB_PLUGIN_INSTALL_DIR meshlab.app/Contents/PlugIns)
- set(MESHLAB_SHADER_INSTALL_DIR meshlab.app/Contents/shaders)
-else()
- set(MESHLAB_BIN_INSTALL_DIR .)
- set(MESHLAB_LIB_INSTALL_DIR .)
- set(MESHLAB_PLUGIN_INSTALL_DIR plugins)
- set(MESHLAB_SHADER_INSTALL_DIR shaders)
-endif()
-
-### Install Settings
-if (NOT APPLE)
- set(CMAKE_INSTALL_RPATH $ORIGIN/../${MESHLAB_LIB_INSTALL_DIR};$ORIGIN/../${CMAKE_INSTALL_LIBDIR})
-else()
- SET(CMAKE_INSTALL_RPATH $ORIGIN/../Frameworks)
+ get_directory_property(hasParent PARENT_DIRECTORY)
+ if(hasParent)
+ set(MESHLAB_PLUGIN_OUTPUT_DIR ${MESHLAB_PLUGIN_OUTPUT_DIR} PARENT_SCOPE)
+ set(MESHLAB_PLUGIN_INSTALL_DIR ${MESHLAB_PLUGIN_INSTALL_DIR} PARENT_SCOPE)
+ endif()
endif()
### Enter subdirectories
# VCGLib -- required
-if(NOT VCGDIR)
+if (VCGDIR) # VCGDIR exists - using custom user vcglib path
+ if(EXISTS ${VCGDIR})
+ add_subdirectory(${VCGDIR} {CMAKE_CURRENT_BINARY_DIR}/vcglib)
+ message(STATUS "- VCGLib - using custom VCGDIR path library")
+ else()
+ set(VCGDIR NOTFOUND)
+ endif()
+else()
get_filename_component(VCGDIR "${CMAKE_CURRENT_LIST_DIR}/vcglib" ABSOLUTE)
- if(NOT EXISTS ${VCGDIR})
+ if(EXISTS ${VCGDIR})
+ add_subdirectory(${VCGDIR})
+ message(STATUS "- VCGLib - using bundled source")
+ else()
set(VCGDIR NOTFOUND)
endif()
endif()
@@ -117,48 +95,41 @@ set(VCGDIR "${VCGDIR}")
if(NOT VCGDIR)
message(FATAL_ERROR "VCGLib not found. Please clone recursively the MeshLab repo.")
+else ()
+ message(STATUS "- VCGLib directory: " ${VCGDIR})
endif()
-
# External
set(EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
-include(${EXTERNAL_DIR}/external_common.cmake)
add_subdirectory(${EXTERNAL_DIR})
-# Start automoc/autouic/autorcc
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTOUIC ON)
-set(CMAKE_AUTORCC ON)
-
add_subdirectory(common)
-add_subdirectory(meshlab)
-if(BUILD_SERVER)
- add_subdirectory(meshlabserver)
-endif()
-if(WIN32 AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/use_cpu_opengl")
- add_subdirectory(use_cpu_opengl)
+add_subdirectory(common_gui)
+
+if (NOT MESHLAB_BUILD_ONLY_LIBRARIES)
+ add_subdirectory(meshlab)
+ if(WIN32 AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/use_cpu_opengl")
+ add_subdirectory(use_cpu_opengl)
+ endif()
+
+ # Clear RPATH before adding plugins
+ set(CMAKE_INSTALL_RPATH)
endif()
-# Clear RPATH before adding plugins
-set(CMAKE_INSTALL_RPATH)
+
### Plugin subdirectories
-if(BUILD_MINI)
+if(NOT DEFINED MESHLAB_PLUGINS) # it may be already defined in parent directory
set(MESHLAB_PLUGINS
- meshlabplugins/io_base
- meshlabplugins/filter_meshing
- meshlabplugins/decorate_base
- meshlabplugins/filter_measure
- )
-else()
- set(MESHLAB_PLUGINS
- # IOMesh plugins
+ # IO plugins
meshlabplugins/io_3ds
meshlabplugins/io_base
meshlabplugins/io_bre
meshlabplugins/io_collada
meshlabplugins/io_ctm
+ meshlabplugins/io_e57
meshlabplugins/io_expe
+ meshlabplugins/io_gltf
meshlabplugins/io_json
meshlabplugins/io_pdb
meshlabplugins/io_tri
@@ -166,12 +137,8 @@ else()
meshlabplugins/io_u3d
meshlabplugins/io_x3d
- # IORaster plugins
- meshlabplugins/ioraster_base
-
# Filter plugins
meshlabplugins/filter_sample
- meshlabplugins/filter_sample_dyn
meshlabplugins/filter_createiso
meshlabplugins/filter_geodesic
meshlabplugins/filter_sample_gpu
@@ -181,19 +148,23 @@ else()
meshlabplugins/filter_color_projection
meshlabplugins/filter_colorproc
meshlabplugins/filter_create
- meshlabplugins/filter_csg
+ meshlabplugins/filter_cubization
+ meshlabplugins/filter_developability
meshlabplugins/filter_dirt
meshlabplugins/filter_fractal
- meshlabplugins/filter_func
- meshlabplugins/filter_globalregistration
+ meshlabplugins/filter_func
meshlabplugins/filter_img_patch_param
+ meshlabplugins/filter_icp
+ meshlabplugins/filter_io_nxs
meshlabplugins/filter_isoparametrization
meshlabplugins/filter_layer
meshlabplugins/filter_measure
+ meshlabplugins/filter_mesh_booleans
meshlabplugins/filter_meshing
meshlabplugins/filter_mls
meshlabplugins/filter_mutualglobal
meshlabplugins/filter_mutualinfo
+ meshlabplugins/filter_parametrization
meshlabplugins/filter_plymc
meshlabplugins/filter_qhull
meshlabplugins/filter_quality
@@ -204,6 +175,7 @@ else()
meshlabplugins/filter_sketchfab
meshlabplugins/filter_ssynth
meshlabplugins/filter_texture
+ meshlabplugins/filter_texture_defragmentation
meshlabplugins/filter_trioptimize
meshlabplugins/filter_unsharp
meshlabplugins/filter_voronoi
@@ -248,45 +220,58 @@ endforeach()
# This variable keeps track of the output filenames that need to be copied at build time
set(COPIED_FILES)
-# shaders
-set(SHADER_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../distrib/shaders")
-file(
- GLOB_RECURSE SHADERS
- LIST_DIRECTORIES false
- "${SHADER_BASE_DIR}/*.vert"
- "${SHADER_BASE_DIR}/*.frag"
- "${SHADER_BASE_DIR}/*.gdp")
-foreach(FN ${SHADERS})
- get_filename_component(SRC_PATH ${FN} DIRECTORY)
- get_filename_component(NAME_ONLY ${FN} NAME)
- file(RELATIVE_PATH REL_DIR "${SHADER_BASE_DIR}" "${SRC_PATH}")
- set(OUTFN "${MESHLAB_SHADER_OUTPUT_DIR}/${REL_DIR}/${NAME_ONLY}")
- if(REL_DIR)
- set(REL_DIR_MESSAGE "${REL_DIR} in ")
- else()
- set(REL_DIR_MESSAGE "")
+if (NOT MESHLAB_BUILD_ONLY_LIBRARIES)
+ # shaders
+ set(SHADER_BASE_DIR "${MESHLAB_RESOURCES_DIR}/shaders")
+ file(
+ GLOB_RECURSE SHADERS
+ LIST_DIRECTORIES false
+ "${SHADER_BASE_DIR}/*.vert"
+ "${SHADER_BASE_DIR}/*.frag"
+ "${SHADER_BASE_DIR}/*.gdp")
+ foreach(FN ${SHADERS})
+ get_filename_component(SRC_PATH ${FN} DIRECTORY)
+ get_filename_component(NAME_ONLY ${FN} NAME)
+ file(RELATIVE_PATH REL_DIR "${SHADER_BASE_DIR}" "${SRC_PATH}")
+ set(OUTFN "${MESHLAB_SHADER_OUTPUT_DIR}/${REL_DIR}/${NAME_ONLY}")
+ if(REL_DIR)
+ set(REL_DIR_MESSAGE "${REL_DIR} in ")
+ else()
+ set(REL_DIR_MESSAGE "")
+ endif()
+ add_custom_command(
+ OUTPUT ${OUTFN}
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${MESHLAB_SHADER_OUTPUT_DIR}/${REL_DIR}"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different "${FN}" "${OUTFN}"
+ COMMENT "Copying ${NAME_ONLY} to ${REL_DIR_MESSAGE}shader build directory"
+ VERBATIM
+ )
+ install(
+ FILES ${FN}
+ DESTINATION ${MESHLAB_SHADER_INSTALL_DIR}/${REL_DIR}
+ COMPONENT Shaders
+ )
+ list(APPEND COPIED_FILES "${OUTFN}")
+ endforeach()
+
+ # Custom target - to trigger the execution of the custom commands above.
+ add_custom_target(copy-distrib-files ALL DEPENDS ${COPIED_FILES})
+
+ set_property(TARGET copy-distrib-files PROPERTY FOLDER Core)
+
+ # be sure to remove all plugins (also old one that are not target anymore) when clean
+ set_property(
+ TARGET copy-distrib-files
+ APPEND
+ PROPERTY ADDITIONAL_CLEAN_FILES ${MESHLAB_PLUGIN_OUTPUT_DIR}
+ )
+
+ if(NOT WIN32 AND NOT APPLE)
+ install(FILES "${MESHLAB_RESOURCES_DIR}/linux/meshlab.desktop" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
+ install(FILES "${MESHLAB_RESOURCES_DIR}/icons/meshlab.png" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps)
+ endif()
+ if(WIN32)
+ install(FILES "${MESHLAB_RESOURCES_DIR}/icons/meshlab.png" DESTINATION ${MESHLAB_BIN_INSTALL_DIR}/)
+ install(FILES "${MESHLAB_RESOURCES_DIR}/icons/meshlab.ico" DESTINATION ${MESHLAB_BIN_INSTALL_DIR}/)
endif()
- add_custom_command(
- OUTPUT ${OUTFN}
- COMMAND ${CMAKE_COMMAND} -E make_directory "${MESHLAB_SHADER_OUTPUT_DIR}/${REL_DIR}"
- COMMAND ${CMAKE_COMMAND} -E copy_if_different "${FN}" "${OUTFN}"
- COMMENT "Copying ${NAME_ONLY} to ${REL_DIR_MESSAGE}shader build directory"
- VERBATIM
- )
- install(
- FILES ${FN}
- DESTINATION ${MESHLAB_SHADER_INSTALL_DIR}/${REL_DIR}
- COMPONENT Shaders
- )
- list(APPEND COPIED_FILES "${OUTFN}")
-endforeach()
-
-
-# Custom target - to trigger the execution of the custom commands above.
-add_custom_target(copy-distrib-files ALL DEPENDS ${COPIED_FILES})
-set_property(TARGET copy-distrib-files PROPERTY FOLDER Core)
-
-if(NOT WIN32 AND NOT APPLE)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/Linux/resources/meshlab.desktop" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/meshlab.png" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps)
endif()
diff --git a/src/README.md b/src/README.md
index 9810e861a..6094a192c 100644
--- a/src/README.md
+++ b/src/README.md
@@ -5,44 +5,54 @@ In the `src` directory there are several folders containing all the source code
The source code of MeshLab is structured in the following directories:
* cmake: it contains a series of cmake scripts used to find external libraries;
- * [external](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/external): it contains a series of external libraries needed by several plugins. Some of these libraries are compiled before the compilation of meshlab, if a corresponding system library is not found and then linked; other are header-only libraries that are just included;
+ * [external](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/external): it contains a series of cmake configuration files that will download external libraries needed by MeshLab and several plugins;
* [common](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/common): a series of utility classes and functions used by MeshLab and its plugins;
* [meshlab](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlab): GUI and core of MeshLab;
- * [meshlabserver](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlabserver): a tool that allows to compute mesh operations through command line;
* [meshlabplugins](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlabplugins): all the plugins that can be added to MeshLab;
- * [use_cpu_opengl](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/use_cpu_opengl): a tool compiled only under windows that allows to use non-GPU accelerated OpenGL calls;
+ * [use_cpu_opengl](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/use_cpu_opengl): a tool compiled only under windows that allows to use non-GPU accelerated OpenGL functions;
* [vcglib](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/vcglib): submodule containing the vcglib.
## Build MeshLab
-MeshLab builds with the three major compilers: `gcc`, `clang`, and `msvc`. It requires [Qt](https://www.qt.io/) >= 5.12.
+MeshLab builds with the three major compilers: `gcc`, `clang`, and `msvc`. It requires [Qt](https://www.qt.io/) 5.15, cmake and optionally ninja (required on windows). Only 64 bit is supported.
After setting up the Qt environment:
- git clone --recursive https://github.com/cnr-isti-vclab/meshlab
- mkdir meshlab/src/build
- cd meshlab/src/build
- cmake ..
- make
+```
+git clone --recursive https://github.com/cnr-isti-vclab/meshlab
+mkdir meshlab/build
+cd meshlab/build
+cmake ..
+make
+```
+or, using ninja (supported also on Windows):
-You can also use [QtCreator](https://www.qt.io/product) to build meshlab:
+```
+cmake -GNinja ..
+ninja
+```
-1. Install QtCreator and Qt >= 5.12;
-2. Open `CMakeLists.txt` inside `src`;
-3. Select your favourite shadow build directory;
-4. Build meshlab.
+You can also use [QtCreator](https://www.qt.io/product) to build MeshLab:
-MeshLab has a plugin architecture and therefore all the plugins are compiled separately; some of them are harder to be compiled. Don't worry: if a plugin fails to compile, just remove it and you lose just that functionality.
+1. Install QtCreator and Qt 5.15;
+2. Open `CMakeLists.txt`;
+4. Configure and build MeshLab.
+
+### External libraries
+
+External libraries required by plugins, if not found, are automatically downloaded by `cmake` during the configuration, and placed into `src/external/downloads`.
### Platform specific notes
On __osx__ some plugins exploit openmp parallelism (screened poisson, isoparametrization) so you need a compiler supporting it and the clang provided by xcode does not support openmp. You can install all the required libraries by running the following command in a terminal:
- brew install llvm libomp
+```
+brew install libomp
+```
-On __Windows__, we suggest to build meshlab using QtCreator. Before trying to build, you should:
+On __Windows__, we suggest to build MeshLab using QtCreator. Before trying to build, you should:
- * install VisualStudio >= 2017 with the C++ developement package;
- * install Qt >= 5.12 and QtCreator.
+ * install VisualStudio >= 2017 with the C++ development package;
+ * install Qt 5.15 and QtCreator.
-then, open the CMakeLists.txt file and try to build MeshLab.
+then, open the CMakeLists.txt file and build MeshLab.
diff --git a/src/cmake/FindQhull.cmake b/src/cmake/FindQhull.cmake
deleted file mode 100644
index 07b1c8784..000000000
--- a/src/cmake/FindQhull.cmake
+++ /dev/null
@@ -1,141 +0,0 @@
-# - Find Qhull
-# Find the Qhull library
-#
-# Specify components:
-#
-# ::
-# libqhull = Deprecated interface: use imported target Qhull::libqhull
-# qhullstatic = Recommended alternative to re-entrant interface: use imported target Qhull::qhullstatic
-# qhull_r = Recommended (re-entrant) interface: use imported target Qhull::qhull_r
-# qhullstatic_r = Recommended (re-entrant) interface: use imported target Qhull::qhullstatic_r
-# qhullcpp = C++ interface: use imported target Qhull::libqhullcpp
-#
-# QHULL_FOUND - True if Qhull was found.
-#
-# Original Author:
-# 2019 Ryan Pavlik
-#
-# Copyright 2019, Collabora, Ltd.
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-#
-# SPDX-License-Identifier: BSL-1.0
-
-set(QHULL_ROOT_DIR
- "${QHULL_ROOT_DIR}"
- CACHE PATH "Directory to search for Qhull")
-
-# Look for a CMake config file
-find_package(Qhull QUIET NO_MODULE)
-set(_qh_found_any FALSE)
-foreach(_qh libqhull qhullstatic qhull_r qhullstatic_r qhullcpp)
- if(TARGET Qhull::${_qh})
- set(Qhull_${_qh}_FOUND TRUE)
- set(_qh_found_any TRUE)
- endif()
-endforeach()
-
-include(FindPackageHandleStandardArgs)
-if(_qh_found_any)
- # Populate QHULL_bla_INCLUDE_DIR from imported targets
- foreach(_qh libqhull qhull_r qhullcpp)
- if(TARGET Qhull::${_qh})
- get_target_property(QHULL_${_qh}_INCLUDE_DIR Qhull::${_qh} INTERFACE_INCLUDE_DIRECTORIES)
- endif()
- endforeach()
- find_package_handle_standard_args(Qhull REQUIRED_VARS _qh_found_any HANDLE_COMPONENTS CONFIG_MODE)
-
-else()
- find_path(
- QHULL_libqhull_INCLUDE_DIR
- NAMES libqhull/libqhull.h
- PATHS "${QHULL_ROOT_DIR}")
- find_path(
- QHULL_qhull_r_INCLUDE_DIR
- NAMES libqhull_r/libqhull_r.h
- PATHS "${QHULL_ROOT_DIR}")
- find_path(
- QHULL_qhullcpp_INCLUDE_DIR
- NAMES libqhullcpp/Qhull.h
- PATHS "${QHULL_ROOT_DIR}")
- foreach(_qh_lib libqhull qhull_r qhullstatic qhullstatic_r qhullcpp)
- find_library(
- QHULL_${_qh_lib}_LIBRARY
- NAMES ${_qh_lib} lib${_qh_lib}
- PATHS "${QHULL_ROOT_DIR}")
- endforeach()
-
- # Manually search for qhullstatic as a libqhull library with a static library suffix
- # (The extra condition is to avoid confusing a .dll import library with a static library)
- if(NOT QHULL_qhullstatic_LIBRARY AND NOT "${CMAKE_LINK_LIBRARY_SUFFIX}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
- set(_qh_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
- find_library(
- QHULL_qhullstatic_LIBRARY
- NAMES qhullstatic libqhullstatic libqhull
- PATHS "${QHULL_ROOT_DIR}")
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_qh_CMAKE_FIND_LIBRARY_SUFFIXES})
- unset(_qh_CMAKE_FIND_LIBRARY_SUFFIXES)
- endif()
- if(NOT Qhull_FIND_COMPONENTS)
- set(Qhull_FIND_COMPONENTS qhull_r)
- endif()
-
- set(_qh_required_vars)
- foreach(component ${Qhull_FIND_COMPONENTS})
- foreach(candidate libqhull qhull_r qhullstatic qhullstatic_r qhullcpp)
- if("${component}" STREQUAL "${candidate}")
- string(REPLACE "static" "" candidate_nonstatic "${candidate}")
- list(APPEND _qh_required_vars QHULL_${candidate}_LIBRARY QHULL_${candidate_nonstatic}_INCLUDE_DIR)
- if(QHULL_${candidate}_LIBRARY AND QHULL_${candidate_nonstatic}_INCLUDE_DIR)
- set(Qhull_${candidate}_FOUND TRUE)
- endif()
- endif()
- endforeach()
- endforeach()
-
- find_package_handle_standard_args(Qhull REQUIRED_VARS ${_qh_required_vars} HANDLE_COMPONENTS)
-
- if(Qhull_qhull_FOUND AND NOT TARGET Qhull::libqhull)
- add_library(Qhull::libqhull SHARED IMPORTED)
- set_target_properties(Qhull::libqhull PROPERTIES IMPORTED_LOCATION "${QHULL_libqhull_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${QHULL_libqhull_INCLUDE_DIR}")
- endif()
- if(Qhull_qhullstatic_FOUND AND NOT TARGET Qhull::qhullstatic)
- add_library(Qhull::qhullstatic STATIC IMPORTED)
- set_target_properties(Qhull::qhullstatic PROPERTIES IMPORTED_LOCATION "${QHULL_qhullstatic_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${QHULL_libqhull_INCLUDE_DIR}")
- endif()
- if(Qhull_qhull_r_FOUND AND NOT TARGET Qhull::qhull_r)
- add_library(Qhull::qhull_r SHARED IMPORTED)
- set_target_properties(Qhull::qhull_r PROPERTIES IMPORTED_LOCATION "${QHULL_qhull_r_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${QHULL_qhull_r_INCLUDE_DIR}")
- endif()
- if(Qhull_qhullstatic_r_FOUND AND NOT TARGET Qhull::qhullstatic_r)
- add_library(Qhull::qhullstatic_r STATIC IMPORTED)
- set_target_properties(
- Qhull::qhullstatic_r PROPERTIES IMPORTED_LOCATION "${QHULL_qhullstatic_r_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${QHULL_qhull_r_INCLUDE_DIR}")
- endif()
- if(Qhull_qhullcpp_FOUND AND NOT TARGET Qhull::qhullcpp)
- add_library(Qhull::qhullcpp STATIC IMPORTED)
- set_target_properties(Qhull::qhullcpp PROPERTIES IMPORTED_LOCATION "${QHULL_qhullcpp_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${QHULL_qhullcpp_INCLUDE_DIR}")
- endif()
-
-endif()
-
-if(QHULL_FOUND)
- mark_as_advanced(QHULL_ROOT_DIR)
-endif()
-
-mark_as_advanced(
- QHULL_libqhull_INCLUDE_DIR
- QHULL_libqhull_LIBRARY
- QHULL_qhull_r_INCLUDE_DIR
- QHULL_qhull_r_LIBRARY
- QHULL_qhullcpp_INCLUDE_DIR
- QHULL_qhullcpp_LIBRARY
- QHULL_qhullstatic_LIBRARY
- QHULL_qhullstatic_r_LIBRARY)
diff --git a/src/cmake/meshlab_global_settings.cmake b/src/cmake/meshlab_global_settings.cmake
new file mode 100644
index 000000000..20aa94f1e
--- /dev/null
+++ b/src/cmake/meshlab_global_settings.cmake
@@ -0,0 +1,50 @@
+# Copyright 2019-2020, Collabora, Ltd.
+# Copyright 2019, 2020, Visual Computing Lab, ISTI - Italian National Research Council
+# SPDX-License-Identifier: BSL-1.0
+
+# OpenGL legacy is preferred because GLVND links libOpenGL.so
+# which cannot be bundled into AppImages and is not provided by
+# default into distros:
+# https://github.com/AppImage/pkg2appimage/issues/477
+# https://github.com/probonopd/linuxdeployqt/issues/486
+
+set(OpenGL_GL_PREFERENCE LEGACY) # OpenGL legacy
+
+# Enable setting options with SET cmake command
+set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
+
+### Build settings
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version" FORCE)
+
+### Settings needed for both "external" and internal code
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
+### Build Settings
+if(WIN32)
+ add_definitions(-DNOMINMAX)
+ if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ add_compile_options(/bigobj)
+ endif()
+endif()
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+if(APPLE)
+ add_definitions(-DGL_SILENCE_DEPRECATION)
+endif()
+
+if(MESHLAB_BUILD_STRICT AND NOT MSVC AND NOT APPLE)
+ # Make sure that our shared libraries were appropriately linked
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
+endif()
+
+# Start automoc/autouic/autorcc
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_AUTORCC ON)
diff --git a/src/cmake/meshlab_tools.cmake b/src/cmake/meshlab_tools.cmake
new file mode 100644
index 000000000..4df1f2d4d
--- /dev/null
+++ b/src/cmake/meshlab_tools.cmake
@@ -0,0 +1,137 @@
+# Copyright 2019-2020, Collabora, Ltd.
+# Copyright 2019, 2020, Visual Computing Lab, ISTI - Italian National Research Council
+# SPDX-License-Identifier: BSL-1.0
+
+#function used to add plugins
+function(add_meshlab_plugin target_name)
+ set(EXCLUDE_ALL_ARG "")
+ if (MESHLAB_BUILD_MINI)
+ set(EXCLUDE_ALL_ARG "EXCLUDE_FROM_ALL")
+ endif()
+
+ cmake_parse_arguments(ARG "" "" "" ${ARGN})
+
+ add_library(${target_name} MODULE ${EXCLUDE_ALL_ARG} ${ARG_UNPARSED_ARGUMENTS})
+
+ target_include_directories(${target_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+ target_link_libraries(${target_name} PUBLIC meshlab-common)
+
+ set_property(TARGET ${target_name} PROPERTY FOLDER Plugins)
+
+ set_property(TARGET ${target_name}
+ PROPERTY RUNTIME_OUTPUT_DIRECTORY ${MESHLAB_PLUGIN_OUTPUT_DIR})
+
+ set_property(TARGET ${target_name}
+ PROPERTY LIBRARY_OUTPUT_DIRECTORY ${MESHLAB_PLUGIN_OUTPUT_DIR})
+
+ install(
+ TARGETS ${target_name}
+ DESTINATION ${MESHLAB_PLUGIN_INSTALL_DIR}
+ COMPONENT Plugins)
+endfunction()
+
+# function that dowloads and unzips an archive
+# params:
+# - link: download link
+# - dir: directory where the archive will be extracted
+# - name: a name used only for log
+function(download_and_unzip)
+ set(download_and_unzip_SUCCESS FALSE PARENT_SCOPE)
+ set(options)
+ set(oneValueArgs MD5 NAME DIR)
+ set(multiValueArgs LINK)
+ cmake_parse_arguments(DAU
+ "${options}" "${oneValueArgs}"
+ "${multiValueArgs}" ${ARGN})
+
+ list(LENGTH DAU_LINK NUMBER_OF_LINKS)
+ if(NUMBER_OF_LINKS LESS 1)
+ message(FATAL_ERROR "Need to specify at least a download link.")
+ endif()
+
+ set(ZIP ${CMAKE_CURRENT_LIST_DIR}/tmp.zip)
+
+ foreach(LINK ${DAU_LINK})
+ message(STATUS "Downloading ${DAU_NAME} from ${LINK}")
+
+ file(DOWNLOAD ${LINK} ${ZIP})
+
+ file(MD5 ${ZIP} MD5SUM)
+
+ # no md5 argument given, no checksum needed...
+ if (NOT DEFINED DAU_MD5)
+ set(DAU_MD5 ${MD5SUM})
+ endif()
+
+ # manual md5 check, avoid to fail when a download fails
+ if(MD5SUM STREQUAL ${DAU_MD5}) # download successful
+ message(STATUS "${DAU_NAME} downloaded.")
+ message(STATUS "Extracting ${DAU_NAME} archive...")
+ file(ARCHIVE_EXTRACT
+ INPUT ${ZIP}
+ DESTINATION ${DAU_DIR})
+ message(STATUS "${DAU_NAME} archive extracted.")
+ file(REMOVE ${ZIP})
+ set(download_and_unzip_SUCCESS TRUE PARENT_SCOPE)
+ break() # done
+ else()
+ file(REMOVE ${ZIP})
+ message(STATUS "${DAU_NAME} download failed...")
+ # next link in DAU_LINK list...
+ endif()
+ endforeach()
+endfunction()
+
+# make quiet some portions of cmake
+# usage
+#
+# set(MESSAGE_QUIET ON)
+# #everything here will be quiet
+# unset(MESSAGE_QUIET)
+function(message)
+ if (NOT MESSAGE_QUIET)
+ _message(${ARGN})
+ endif()
+endfunction()
+
+function(add_file_format_info_plist)
+ cmake_parse_arguments(ARG "" "TARGET;FILE;FORMAT" "" ${ARGN})
+
+ string(TOUPPER ${ARG_FORMAT} FORMAT_UPPER)
+ string(TOLOWER ${ARG_FORMAT} FORMAT_LOWER)
+
+ add_custom_command(
+ TARGET ${ARG_TARGET}
+ POST_BUILD
+ COMMAND plutil -insert CFBundleDocumentTypes.0 -xml 'CFBundleTypeName${FORMAT_UPPER} 3D FileCFBundleTypeIconFilemeshlab.icnsCFBundleTypeRoleEditorLSHandlerRankDefault' ${ARG_FILE}
+ COMMAND plutil -insert CFBundleDocumentTypes.0.CFBundleTypeExtensions -xml '' ${ARG_FILE}
+ COMMAND plutil -insert CFBundleDocumentTypes.0.CFBundleTypeExtensions.0 -xml '${FORMAT_LOWER}' ${ARG_FILE}
+ COMMAND plutil -insert CFBundleDocumentTypes.0.CFBundleTypeOSTypes -xml '' ${ARG_FILE}
+ COMMAND plutil -insert CFBundleDocumentTypes.0.CFBundleTypeOSTypes.0 -xml '${FORMAT_UPPER}' ${ARG_FILE}
+ )
+endfunction()
+
+function(set_additional_settings_info_plist)
+ cmake_parse_arguments(ARG "" "TARGET;FILE" "" ${ARGN})
+ add_custom_command(
+ TARGET ${ARG_TARGET}
+ POST_BUILD
+ COMMAND plutil -replace NSHighResolutionCapable -bool True ${ARG_FILE}
+ COMMAND plutil -replace CFBundleDocumentTypes -xml '' ${ARG_FILE}
+ COMMAND plutil -replace CFBundleIdentifier -string 'com.vcg.meshlab' ${ARG_FILE}
+ COMMAND plutil -insert NSRequiresAquaSystemAppearance -bool True ${ARG_FILE} || (exit 0)
+ )
+
+ add_file_format_info_plist(
+ TARGET ${ARG_TARGET}
+ FILE ${ARG_FILE}
+ FORMAT OBJ)
+ add_file_format_info_plist(
+ TARGET ${ARG_TARGET}
+ FILE ${ARG_FILE}
+ FORMAT STL)
+ add_file_format_info_plist(
+ TARGET ${ARG_TARGET}
+ FILE ${ARG_FILE}
+ FORMAT PLY)
+endfunction()
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index f3265648e..0e640fdd4 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,24 +1,48 @@
-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../ML_VERSION")
- file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../../ML_VERSION" MESHLAB_VERSION)
- if (BUILD_WITH_DOUBLE_SCALAR)
- set(MESHLAB_VERSION "${MESHLAB_VERSION}d")
+#version management
+string(TIMESTAMP MESHLAB_VERSION "%Y.%m")
+
+if (MESHLAB_IS_NIGHTLY_VERSION)
+ # nightly version is in the form:
+ # YYYY.mm[d]_nightly_GIT_SHA1
+ # YYYY and mm are computed by cmake and not read from file
+ # the GIT_SHA1 is stored in file, which will be read at runtime
+ find_package(Git)
+ execute_process(COMMAND
+ "${GIT_EXECUTABLE}" describe --match=NeVeRmAtCh --always --abbrev=7
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ OUTPUT_VARIABLE GIT_SHA1
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/resources/git_sha.txt ${GIT_SHA1})
+else()
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../ML_VERSION")
+ # YYYY and mm are read from file
+ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../../ML_VERSION" MESHLAB_VERSION)
endif()
- add_definitions(-DMESHLAB_VERSION=${MESHLAB_VERSION})
+endif()
+
+if (MESHLAB_BUILD_WITH_DOUBLE_SCALAR)
+ set(MESHLAB_VERSION "${MESHLAB_VERSION}d")
+endif()
+
+
+set(MESHLAB_VERSION ${MESHLAB_VERSION} PARENT_SCOPE)
+if (MESHLAB_IS_NIGHTLY_VERSION)
+ message(STATUS "MeshLab version: ${MESHLAB_VERSION}_nightly_${GIT_SHA1}")
+else()
message(STATUS "MeshLab version: ${MESHLAB_VERSION}")
endif()
+if (MESHLAB_BUILD_WITH_DOUBLE_SCALAR)
+ message(STATUS "Building with double precision")
+ set(MESHLAB_SCALAR "double")
+else()
+ message(STATUS "Building with single precision")
+ set(MESHLAB_SCALAR "float")
+endif()
+
set(HEADERS
- parameters/rich_parameter.h
- parameters/rich_parameter_list.h
- parameters/value.h
- interfaces/decorate_plugin_interface.h
- interfaces/edit_plugin_interface.h
- interfaces/filter_plugin_interface.h
- interfaces/iomesh_plugin_interface.h
- interfaces/ioraster_plugin_interface.h
- interfaces/mainwindow_interface.h
- interfaces/plugin_interface.h
- interfaces/render_plugin_interface.h
+ filter_history/filter.h
+ filter_history/filter_history.h
ml_document/helpers/mesh_document_state_data.h
ml_document/helpers/mesh_model_state_data.h
ml_document/base_types.h
@@ -28,27 +52,72 @@ set(HEADERS
ml_document/mesh_model_state.h
ml_document/raster_model.h
ml_document/render_raster.h
+ ml_shared_data_context/ml_plugin_gl_context.h
+ ml_shared_data_context/ml_scene_gl_shared_data_context.h
+ ml_shared_data_context/ml_shared_data_context.h
+ parameters/rich_parameters.h
+ parameters/values.h
+ parameters/rich_parameter_list.h
+ parameters/rich_parameter/rich_bool.h
+ parameters/rich_parameter/rich_color.h
+ parameters/rich_parameter/rich_direction.h
+ parameters/rich_parameter/rich_dynamic_float.h
+ parameters/rich_parameter/rich_enum.h
+ parameters/rich_parameter/rich_file_open.h
+ parameters/rich_parameter/rich_file_save.h
+ parameters/rich_parameter/rich_float.h
+ parameters/rich_parameter/rich_int.h
+ parameters/rich_parameter/rich_matrix44.h
+ parameters/rich_parameter/rich_mesh.h
+ parameters/rich_parameter/rich_parameter.h
+ parameters/rich_parameter/rich_percentage.h
+ parameters/rich_parameter/rich_position.h
+ parameters/rich_parameter/rich_shot.h
+ parameters/rich_parameter/rich_string.h
+ parameters/value/bool_value.h
+ parameters/value/color_value.h
+ parameters/value/float_value.h
+ parameters/value/int_value.h
+ parameters/value/matrix44_value.h
+ parameters/value/point3_value.h
+ parameters/value/shot_value.h
+ parameters/value/string_value.h
+ parameters/value/value.h
+ plugins/containers/generic_container_iterator.h
+ plugins/containers/decorate_plugin_container.h
+ plugins/containers/edit_plugin_container.h
+ plugins/containers/filter_plugin_container.h
+ plugins/containers/io_plugin_container.h
+ plugins/containers/render_plugin_container.h
+ plugins/interfaces/meshlab_plugin.h
+ plugins/interfaces/meshlab_plugin_logger.h
+ plugins/interfaces/decorate_plugin.h
+ plugins/interfaces/edit_plugin.h
+ plugins/interfaces/filter_plugin.h
+ plugins/interfaces/io_plugin.h
+ plugins/interfaces/render_plugin.h
+ plugins/action_searcher.h
+ plugins/meshlab_plugin_type.h
+ plugins/plugin_manager.h
+ python/function.h
+ python/function_parameter.h
+ python/function_set.h
+ python/python_utils.h
+ utilities/eigen_mesh_conversions.h
utilities/file_format.h
+ utilities/load_save.h
+ globals.h
GLExtensionsManager.h
GLLogStream.h
filterscript.h
- meshlabdocumentbundler.h
- meshlabdocumentxml.h
ml_selection_buffers.h
- ml_shared_data_context.h
ml_thread_safe_memory_info.h
mlapplication.h
- mlexception.h
- pluginmanager.h
- searcher.h)
+ mlexception.h)
set(SOURCES
- parameters/rich_parameter.cpp
- parameters/rich_parameter_list.cpp
- parameters/value.cpp
- interfaces/decorate_plugin_interface.cpp
- interfaces/filter_plugin_interface.cpp
- interfaces/plugin_interface.cpp
+ filter_history/filter.cpp
+ filter_history/filter_history.cpp
ml_document/helpers/mesh_document_state_data.cpp
ml_document/cmesh.cpp
ml_document/mesh_document.cpp
@@ -56,41 +125,92 @@ set(SOURCES
ml_document/mesh_model_state.cpp
ml_document/raster_model.cpp
ml_document/render_raster.cpp
+ ml_shared_data_context/ml_plugin_gl_context.cpp
+ ml_shared_data_context/ml_scene_gl_shared_data_context.cpp
+ ml_shared_data_context/ml_shared_data_context.cpp
+ parameters/rich_parameters.cpp
+ parameters/rich_parameter_list.cpp
+ parameters/rich_parameter/rich_bool.cpp
+ parameters/rich_parameter/rich_color.cpp
+ parameters/rich_parameter/rich_direction.cpp
+ parameters/rich_parameter/rich_dynamic_float.cpp
+ parameters/rich_parameter/rich_enum.cpp
+ parameters/rich_parameter/rich_file_open.cpp
+ parameters/rich_parameter/rich_file_save.cpp
+ parameters/rich_parameter/rich_float.cpp
+ parameters/rich_parameter/rich_int.cpp
+ parameters/rich_parameter/rich_matrix44.cpp
+ parameters/rich_parameter/rich_mesh.cpp
+ parameters/rich_parameter/rich_parameter.cpp
+ parameters/rich_parameter/rich_percentage.cpp
+ parameters/rich_parameter/rich_position.cpp
+ parameters/rich_parameter/rich_shot.cpp
+ parameters/rich_parameter/rich_string.cpp
+ parameters/value/bool_value.cpp
+ parameters/value/color_value.cpp
+ parameters/value/float_value.cpp
+ parameters/value/int_value.cpp
+ parameters/value/matrix44_value.cpp
+ parameters/value/point3_value.cpp
+ parameters/value/shot_value.cpp
+ parameters/value/string_value.cpp
+ plugins/containers/decorate_plugin_container.cpp
+ plugins/containers/edit_plugin_container.cpp
+ plugins/containers/filter_plugin_container.cpp
+ plugins/containers/io_plugin_container.cpp
+ plugins/containers/render_plugin_container.cpp
+ plugins/interfaces/meshlab_plugin_logger.cpp
+ plugins/interfaces/decorate_plugin.cpp
+ plugins/interfaces/filter_plugin.cpp
+ plugins/interfaces/io_plugin.cpp
+ plugins/action_searcher.cpp
+ plugins/meshlab_plugin_type.cpp
+ plugins/plugin_manager.cpp
+ python/function.cpp
+ python/function_parameter.cpp
+ python/function_set.cpp
+ python/python_utils.cpp
+ utilities/eigen_mesh_conversions.cpp
+ utilities/load_save.cpp
+ globals.cpp
GLExtensionsManager.cpp
GLLogStream.cpp
filterscript.cpp
- meshlabdocumentbundler.cpp
- meshlabdocumentxml.cpp
ml_selection_buffers.cpp
- ml_shared_data_context.cpp
ml_thread_safe_memory_info.cpp
- mlapplication.cpp
- pluginmanager.cpp
- searcher.cpp
- ${EXTERNAL_DIR}/easyexif/exif.cpp)
+ mlapplication.cpp)
+
+set(RESOURCES meshlab-common.qrc)
set(TARGET_TYPE SHARED)
-if(WIN32)
- set(TARGET_TYPE STATIC)
-endif()
add_library(meshlab-common ${TARGET_TYPE} ${SOURCES} ${HEADERS} ${RESOURCES})
-target_include_directories(meshlab-common
- PRIVATE
- ${EXTERNAL_DIR}/easyexif/
+target_compile_definitions(meshlab-common
+ PUBLIC
+ MESHLAB_VERSION=${MESHLAB_VERSION}
+ MESHLAB_SCALAR=${MESHLAB_SCALAR})
+
+if (MESHLAB_IS_NIGHTLY_VERSION)
+ target_compile_definitions(meshlab-common
+ PUBLIC
+ MESHLAB_IS_NIGHTLY)
+endif()
+
+target_include_directories(meshlab-common
PUBLIC
- ${VCGDIR}
- ${EIGEN_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/..)
target_link_libraries(
meshlab-common
- PUBLIC
+ PUBLIC
Qt5::Core
Qt5::OpenGL
Qt5::Widgets
Qt5::Xml
+ Qt5::Network
+ vcglib
external-glew
+ external-easyexif
)
set_property(TARGET meshlab-common PROPERTY FOLDER Core)
@@ -102,9 +222,16 @@ set_property(TARGET meshlab-common
PROPERTY LIBRARY_OUTPUT_DIRECTORY ${MESHLAB_LIB_OUTPUT_DIR})
if (WIN32)
+ target_compile_definitions(meshlab-common PRIVATE ML_EXPORT_SYMBOLS)
set_property(TARGET meshlab-common
PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${MESHLAB_LIB_OUTPUT_DIR})
endif()
-install(TARGETS meshlab-common DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
+if(MESHLAB_ENABLE_DEBUG_LOG_FILE)
+ target_compile_definitions(meshlab-common PUBLIC MESHLAB_LOG_FILE_ENABLED)
+endif()
+set_target_properties(meshlab-common PROPERTIES
+ INSTALL_RPATH "$ORIGIN")
+
+install(TARGETS meshlab-common DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
diff --git a/src/common/GLExtensionsManager.cpp b/src/common/GLExtensionsManager.cpp
index 985260d56..0cb2092b4 100644
--- a/src/common/GLExtensionsManager.cpp
+++ b/src/common/GLExtensionsManager.cpp
@@ -36,19 +36,19 @@ void GLExtensionsManager::init()
*/
bool GLExtensionsManager::initializeGLextensions_notThrowing()
{
- GLenum err = GLEW_OK;
if (!glewInitialized) {
glewExperimental = GL_TRUE;
- err = glewInit();
- if (err != GLEW_OK) {
+ GLenum err = glewInit();
+ if ((err == GLEW_OK) ||
+ (err == GLEW_ERROR_NO_GLX_DISPLAY)) {
+ glewInitialized = true;
+ }
+ else {
qWarning("GLEW initialization failed: %s",
(const char *)glewGetErrorString(err));
}
- else {
- glewInitialized = true;
- }
}
- return err == GLEW_OK;
+ return glewInitialized;
}
@@ -61,12 +61,13 @@ void GLExtensionsManager::initializeGLextensions()
if (!glewInitialized) {
glewExperimental = GL_TRUE;
GLenum err = glewInit();
- if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) {
+ if ((err == GLEW_OK) ||
+ (err == GLEW_ERROR_NO_GLX_DISPLAY)) {
+ glewInitialized = true;
+ }
+ else {
throw MLException(QString("GLEW initialization failed: %1\n")
.arg((const char *)glewGetErrorString(err)));
}
- else {
- glewInitialized = true;
- }
}
}
diff --git a/src/common/GLLogStream.cpp b/src/common/GLLogStream.cpp
index 8267950e5..98e6d000f 100644
--- a/src/common/GLLogStream.cpp
+++ b/src/common/GLLogStream.cpp
@@ -25,92 +25,103 @@
#include
#include
+#ifdef MESHLAB_LOG_FILE_ENABLED
+#include
+#include
+#include
+#include "globals.h"
+#endif
+
#include "GLLogStream.h"
using namespace std;
-GLLogStream::GLLogStream()
- :QObject()
+GLLogStream::GLLogStream() :
+ QObject(), bookmark(-1)
{
- ClearBookmark();
}
-void GLLogStream::RealTimeLog(const QString& Id, const QString &meshName, const QString& text)
+void GLLogStream::realTimeLog(const QString& Id, const QString &meshName, const QString& text)
{
- this->RealTimeLogText.insert(Id,qMakePair(meshName,text) );
+ this->realTimeLogText.insert(Id,qMakePair(meshName,text) );
}
-void GLLogStream::Save(int /*Level*/, const char * filename )
+void GLLogStream::save(int /*Level*/, const char * filename )
{
FILE *fp=fopen(filename,"wb");
QList > ::iterator li;
- for(li=S.begin();li!=S.end();++li)
+ for(li=logTextList.begin();li!=logTextList.end();++li)
fprintf(fp,"%s", qUtf8Printable((*li).second));
}
-void GLLogStream::ClearBookmark()
+void GLLogStream::clearBookmark()
{
bookmark = -1;
}
-void GLLogStream::SetBookmark()
+void GLLogStream::setBookmark()
{
- bookmark=S.size();
+ bookmark=logTextList.size();
}
-void GLLogStream::BackToBookmark()
+void GLLogStream::backToBookmark()
{
if(bookmark<0) return;
- while(S.size() > bookmark )
- S.removeLast();
+ while(logTextList.size() > bookmark )
+ logTextList.removeLast();
}
const QList >& GLLogStream::logStringList() const
{
- return S;
+ return logTextList;
}
const QMultiMap >& GLLogStream::realTimeLogMultiMap() const
{
- return RealTimeLogText;
+ return realTimeLogText;
}
void GLLogStream::clearRealTimeLog()
{
- RealTimeLogText.clear();
+ realTimeLogText.clear();
}
void GLLogStream::print(QStringList &out) const
{
out.clear();
- for (const pair & p : S)
+ for (const pair & p : logTextList)
out.push_back(p.second);
}
-void GLLogStream::Clear()
+void GLLogStream::clear()
{
- S.clear();
+ logTextList.clear();
}
-void GLLogStream::Log(int Level, const char * buf )
+void GLLogStream::log(int level, const char * buf )
{
QString tmp(buf);
- S.push_back(std::make_pair(Level,tmp));
- qDebug("LOG: %i %s",Level,buf);
+ logTextList.push_back(std::make_pair(level,tmp));
+ qDebug("LOG: %i %s",level,buf);
+#ifdef MESHLAB_LOG_FILE_ENABLED
+ QThread::msleep(100);
+ QFile f(meshlab::logDebugFileName());
+ f.open(QIODevice::Append);
+ QTextStream stream(&f);
+ stream << "LOG: [" + QString::number(level) + "] " + QString(buf) + "\n";
+ stream.flush();
+ f.close();
+#endif
emit logUpdated();
}
-void GLLogStream::Log(int Level, const string& logMessage)
+void GLLogStream::log(int level, const string& logMessage)
{
- S.push_back(std::make_pair(Level, QString::fromStdString(logMessage)));
- qDebug("LOG: %i %s",Level, logMessage.c_str());
- emit logUpdated();
+ log(level, logMessage.c_str());
}
-void GLLogStream::Log(int Level, const QString& logMessage)
+void GLLogStream::log(int level, const QString& logMessage)
{
- S.push_back(std::make_pair(Level, logMessage));
- qDebug("LOG: %i %s",Level, logMessage.toStdString().c_str());
- emit logUpdated();
+ log(level, logMessage.toStdString().c_str());
}
diff --git a/src/common/GLLogStream.h b/src/common/GLLogStream.h
index 5cfc03345..26b7bba0b 100644
--- a/src/common/GLLogStream.h
+++ b/src/common/GLLogStream.h
@@ -31,11 +31,23 @@
#include
#include
#include
+
+#ifdef WIN32
+#ifdef ML_EXPORT_SYMBOLS
+#define ML_DLL_EXPORT Q_DECL_EXPORT
+#else
+#define ML_DLL_EXPORT Q_DECL_IMPORT
+#endif
+#else //WIN32
+#define ML_DLL_EXPORT
+#endif
+
/**
This is the logging class.
One for each document. Responsible of getting an history of the logging message printed out by filters.
*/
-class GLLogStream : public QObject
+class ML_DLL_EXPORT
+ GLLogStream : public QObject
{
Q_OBJECT
public:
@@ -52,56 +64,56 @@ public:
GLLogStream();
~GLLogStream() {}
void print(QStringList &list) const; // Fills a QStringList with the log entries
- void Save(int Level, const char *filename);
- void Clear();
+ void save(int Level, const char *filename);
+ void clear();
template
- void Logf(int Level, const char * f, Ts&&... ts )
+ void logf(int Level, const char * f, Ts&&... ts )
{
char buf[buf_size];
int chars_written = snprintf(buf, buf_size, f, std::forward(ts)...);
- Log(Level, buf);
+ log(Level, buf);
if(chars_written >= static_cast(buf_size)){
- Log(Level, "Log message truncated.");
+ log(Level, "Log message truncated.");
}
}
- void Log(int Level, const char * buf);
- void Log(int Level, const std::string& logMessage);
- void Log(int Level, const QString& logMessage);
- void SetBookmark();
- void ClearBookmark();
- void BackToBookmark();
+ void log(int level, const char * buf);
+ void log(int level, const std::string& logMessage);
+ void log(int level, const QString& logMessage);
+ void setBookmark();
+ void clearBookmark();
+ void backToBookmark();
const QList >& logStringList() const;
const QMultiMap >& realTimeLogMultiMap() const;
void clearRealTimeLog();
template
- void RealTimeLogf(const QString& Id, const QString &meshName, const char * f, Ts&&... ts )
+ void realTimeLogf(const QString& Id, const QString &meshName, const char * f, Ts&&... ts )
{
char buf[buf_size];
int chars_written = snprintf(buf, buf_size, f, std::forward(ts)...);
- RealTimeLog(Id, meshName, buf);
+ realTimeLog(Id, meshName, buf);
if(chars_written >= static_cast(buf_size)){
- RealTimeLog(Id, meshName, "Log message truncated.");
+ realTimeLog(Id, meshName, "Log message truncated.");
}
}
- void RealTimeLog(const QString& Id, const QString &meshName, const QString& text);
+ void realTimeLog(const QString& Id, const QString &meshName, const QString& text);
signals:
void logUpdated();
private:
int bookmark; /// this field is used to place a bookmark for restoring the log. Useful for previeweing
- QList > S;
+ QList > logTextList;
// The list of strings used in realtime display of info over the mesh.
// Each box is identified by the title, name of the mesh and text.
// the name of the mesh is shown only if two or more box with the same title are shown.
- QMultiMap > RealTimeLogText;
+ QMultiMap > realTimeLogText;
};
#endif //GLLOGSTREAM_H
diff --git a/src/common/common.pro b/src/common/common.pro
deleted file mode 100644
index c88d60d2e..000000000
--- a/src/common/common.pro
+++ /dev/null
@@ -1,122 +0,0 @@
-include (../general.pri)
-
-QT += opengl
-QT += xml
-QT += network
-
-TEMPLATE = lib
-TARGET = meshlab-common
-DEPENDPATH += .
-
-DESTDIR = $$MESHLAB_DISTRIB_DIRECTORY/lib
-
-win32-msvc:CONFIG += staticlib
-win32-g++:DLLDESTDIR = $$MESHLAB_DISTRIB_DIRECTORY/lib
-
-linux:CONFIG += dll
-
-INCLUDEPATH *= \
- ../.. \
- $$$$MESHLAB_EXTERNAL_DIRECTORY/easyexif \
- $$VCGDIR \
- $$EIGENDIR
-
-!CONFIG(system_glew) {
- INCLUDEPATH *= $$GLEWDIR/include
- GLEWCODE = $$GLEWDIR/src/glew.c
-}
-
-!CONFIG(system_glew) {
- SOURCES += $$GLEWCODE
- DEFINES += GLEW_STATIC
-}
-
-# defining meshlab version
-exists(../../ML_VERSION){
- MESHLAB_VERSION = $$cat(../../ML_VERSION)
- message(MeshLab Version: $$MESHLAB_VERSION)
- DEFINES += "MESHLAB_VERSION=$$MESHLAB_VERSION"
-}
-
-# Input
-HEADERS += \
- GLExtensionsManager.h \
- parameters/rich_parameter_list.h \
- parameters/value.h \
- parameters/rich_parameter.h \
- filterscript.h \
- GLLogStream.h \
- interfaces/decorate_plugin_interface.h \
- interfaces/edit_plugin_interface.h \
- interfaces/filter_plugin_interface.h \
- interfaces/iomesh_plugin_interface.h \
- interfaces/mainwindow_interface.h \
- interfaces/plugin_interface.h \
- interfaces/render_plugin_interface.h \
- ml_document/helpers/mesh_document_state_data.h \
- ml_document/helpers/mesh_model_state_data.h \
- ml_document/base_types.h \
- ml_document/cmesh.h \
- ml_document/mesh_model.h \
- ml_document/mesh_model_state.h \
- ml_document/mesh_document.h \
- ml_document/raster_model.h \
- ml_document/render_raster.h \
- utilities/file_format.h \
- pluginmanager.h \
- mlexception.h \
- mlapplication.h \
- meshlabdocumentxml.h \
- ml_shared_data_context.h \
- ml_selection_buffers.h \
- meshlabdocumentxml.h
-
-SOURCES += \
- GLExtensionsManager.cpp \
- parameters/rich_parameter.cpp \
- parameters/rich_parameter_list.cpp \
- parameters/value.cpp \
- filterscript.cpp \
- GLLogStream.cpp \
- interfaces/decorate_plugin_interface.cpp \
- interfaces/filter_plugin_interface.cpp \
- interfaces/plugin_interface.cpp \
- ml_document/helpers/mesh_document_state_data.cpp \
- ml_document/cmesh.cpp \
- ml_document/mesh_model.cpp \
- ml_document/mesh_model_state.cpp \
- ml_document/mesh_document.cpp \
- ml_document/raster_model.cpp \
- ml_document/render_raster.cpp \
- pluginmanager.cpp \
- mlapplication.cpp \
- searcher.cpp \
- meshlabdocumentxml.cpp \
- meshlabdocumentbundler.cpp \
- ml_shared_data_context.cpp \
- ml_selection_buffers.cpp \
- $$MESHLAB_EXTERNAL_DIRECTORY/easyexif/exif.cpp
-
-macx:QMAKE_POST_LINK = "\
- if [ -d $$MESHLAB_DISTRIB_DIRECTORY/meshlab.app/Contents/Frameworks/ ]; \
- then \
- echo "Copying"; \
- else \
- mkdir -p $$MESHLAB_DISTRIB_DIRECTORY/meshlab.app/Contents/Frameworks; \
- fi; \
- cp $$MESHLAB_DISTRIB_DIRECTORY/lib/libmeshlab-common.* $$MESHLAB_DISTRIB_DIRECTORY/meshlab.app/Contents/Frameworks/ ;\
-# if [ -d ../external/ ];\
-# then \
-# echo "ok external dir exists"; \
-# else \
-# ln -s ../../meshlab/src/external ../external;\
-# echo "linked external dir"; \
-# fi;\
-# if [ -d $$MESHLAB_DISTRIB_DIRECTORY/shaders/ ];\
-# then \
-# echo "ok shader dir exists"; \
-# else \
-# ln -s ../../../meshlab/src/distrib/shaders ../distrib/shaders ;\
-# echo "linked shader dir"; \
-# fi;\
- "
diff --git a/src/common/filter_history/filter.cpp b/src/common/filter_history/filter.cpp
new file mode 100644
index 000000000..f77c6f4d5
--- /dev/null
+++ b/src/common/filter_history/filter.cpp
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ * MeshLab o o *
+ * An extendible mesh processor o o *
+ * _ O _ *
+ * Copyright(C) 2005-2022 \/)\/ *
+ * Visual Computing Lab /\/| *
+ * ISTI - Italian National Research Council | *
+ * \ *
+ * All rights reserved. *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
+ * for more details. *
+ * *
+ ****************************************************************************/
+
+#include "filter.h"
+
+Filter::Filter()
+{
+}
+
+Filter::Filter(
+ const FilterPlugin* plugin,
+ const QAction* filter,
+ const RichParameterList& paramList) :
+ plugin(plugin),
+ filter(filter),
+ paramList(paramList)
+{
+}
+
+void Filter::setParameterValue(const std::string ¶meter, const Value &value)
+{
+ RichParameter& rp = paramList.getParameterByName(QString::fromStdString(parameter));
+ rp.setValue(value);
+}
+
+/**
+ * @brief returns a string containing a pymeshlab python call of the filter with the current
+ * parameters set.
+ * @param meshSetName: the name of the MeshSet object.
+ * @return
+ */
+std::string Filter::pyMeshLabCall(std::string meshSetName) const
+{
+ bool first = true;
+ std::string call = meshSetName + "." + plugin->pythonFilterName(filter).toStdString() + "(";
+ for (const RichParameter& p : paramList) {
+ // parameter must be added only if its value is not default
+ if (!p.isValueDefault()) {
+ if (!p.isOfType()) { // RichShot not yet supported by pymeshlab
+ // if it is not the first parameter we are adding, we put the comma after the last
+ // parameter, because we are going to add another one
+ if (first) {
+ first = false;
+ }
+ else {
+ call += ", ";
+ }
+ call += p.pythonName().toStdString() + " = ";
+ if (p.isOfType()) {
+ if (p.value().getBool()) {
+ call += "True";
+ }
+ else {
+ call += "False";
+ }
+ }
+ else if (p.isOfType()) {
+ QColor c = p.value().getColor();
+ call += "pymeshlab.Color(";
+ call += std::to_string(c.red()) + ", ";
+ call += std::to_string(c.green()) + ", ";
+ call += std::to_string(c.blue()) + ", ";
+ call += std::to_string(c.alpha()) + ")";
+ }
+ else if (p.isOfType() || p.isOfType()) {
+ Point3m pp = p.value().getPoint3();
+ call += "numpy.array([";
+ call += std::to_string(pp[0]) + ", ";
+ call += std::to_string(pp[1]) + ", ";
+ call += std::to_string(pp[2]) + "])";
+ }
+ else if (p.isOfType() || p.isOfType()) {
+ call += std::to_string(p.value().getFloat());
+ }
+ else if (
+ p.isOfType() || p.isOfType() || p.isOfType()) {
+ call += std::to_string(p.value().getInt());
+ }
+ else if (
+ p.isOfType() || p.isOfType() ||
+ p.isOfType()) {
+ call += "'" + p.value().getString().toStdString() + "'";
+ }
+ else if (p.isOfType()) {
+ Matrix44m m = p.value().getMatrix44();
+ call += "numpy.array([";
+ bool firstRow = true;
+ for (unsigned int i = 0; i < 4 ; i++) {
+ if (firstRow)
+ firstRow = false;
+ else
+ call += ", ";
+ call += "[";
+ bool firstCol = true;
+ for (unsigned int j = 0; j < 4 ; j++) {
+ if (firstCol)
+ firstCol = false;
+ else
+ call += ", ";
+ call += std::to_string(m.ElementAt(i,j));
+ }
+ call += "]";
+ }
+ call += "])";
+ }
+ else if (p.isOfType()) {
+ const RichPercentage& rp = dynamic_cast(p);
+ float per = (p.value().getFloat() / (rp.max - rp.min) ) * 100;
+ call += "pymeshlab.PercentageValue(" + std::to_string(per) + ")";
+ }
+ }
+ }
+ }
+ call += ")";
+ return call;
+}
diff --git a/src/common/filter_history/filter.h b/src/common/filter_history/filter.h
new file mode 100644
index 000000000..5acc728a7
--- /dev/null
+++ b/src/common/filter_history/filter.h
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * MeshLab o o *
+ * An extendible mesh processor o o *
+ * _ O _ *
+ * Copyright(C) 2005-2022 \/)\/ *
+ * Visual Computing Lab /\/| *
+ * ISTI - Italian National Research Council | *
+ * \ *
+ * All rights reserved. *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
+ * for more details. *
+ * *
+ ****************************************************************************/
+
+#ifndef FILTER_H
+#define FILTER_H
+
+#include
+#include
+
+class Filter
+{
+public:
+ Filter();
+ Filter(
+ const FilterPlugin* plugin,
+ const QAction* filter,
+ const RichParameterList& paramList);
+
+ void setParameterValue(const std::string& parameter, const Value& value);
+
+ std::string pyMeshLabCall(std::string meshSetName = "ms") const;
+
+private:
+ const FilterPlugin* plugin;
+ const QAction* filter;
+ RichParameterList paramList;
+};
+
+#endif // FILTER_H
diff --git a/src/common/filter_history/filter_history.cpp b/src/common/filter_history/filter_history.cpp
new file mode 100644
index 000000000..ef2d395fd
--- /dev/null
+++ b/src/common/filter_history/filter_history.cpp
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * MeshLab o o *
+ * An extendible mesh processor o o *
+ * _ O _ *
+ * Copyright(C) 2005-2022 \/)\/ *
+ * Visual Computing Lab /\/| *
+ * ISTI - Italian National Research Council | *
+ * \ *
+ * All rights reserved. *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
+ * for more details. *
+ * *
+ ****************************************************************************/
+
+#include "filter_history.h"
+
+FilterHistory::iterator FilterHistory::begin()
+{
+ return history.begin();
+}
+
+FilterHistory::iterator FilterHistory::end()
+{
+ return history.end();
+}
+
+FilterHistory::const_iterator FilterHistory::begin() const
+{
+ return history.begin();
+}
+
+FilterHistory::const_iterator FilterHistory::end() const
+{
+ return history.end();
+}
diff --git a/src/common/filter_history/filter_history.h b/src/common/filter_history/filter_history.h
new file mode 100644
index 000000000..4df36ebfc
--- /dev/null
+++ b/src/common/filter_history/filter_history.h
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * MeshLab o o *
+ * An extendible mesh processor o o *
+ * _ O _ *
+ * Copyright(C) 2005-2022 \/)\/ *
+ * Visual Computing Lab /\/| *
+ * ISTI - Italian National Research Council | *
+ * \ *
+ * All rights reserved. *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
+ * for more details. *
+ * *
+ ****************************************************************************/
+
+#ifndef MESHLAB_FILTER_HISTORY_H
+#define MESHLAB_FILTER_HISTORY_H
+
+#include
+
+#include "filter.h"
+
+class FilterHistory
+{
+ using iterator = std::list::iterator;
+ using const_iterator = std::list::const_iterator;
+
+ iterator begin();
+ iterator end();
+ const_iterator begin() const;
+ const_iterator end() const;
+
+private:
+ std::list history;
+};
+
+#endif // MESHLAB_FILTER_HISTORY_H
diff --git a/src/common/globals.cpp b/src/common/globals.cpp
new file mode 100644
index 000000000..c83afc3e3
--- /dev/null
+++ b/src/common/globals.cpp
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * MeshLab o o *
+ * A versatile mesh processing toolbox o o *
+ * _ O _ *
+ * Copyright(C) 2005-2021 \/)\/ *
+ * Visual Computing Lab /\/| *
+ * ISTI - Italian National Research Council | *
+ * \ *
+ * All rights reserved. *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
+ * for more details. *
+ * *
+ ****************************************************************************/
+
+#include "globals.h"
+
+#include
+#include
+#include
+
+#include "parameters/rich_parameter_list.h"
+#include "plugins/plugin_manager.h"
+#include "plugins/action_searcher.h"
+#include "python/function_set.h"
+
+QString basePath()
+{
+ QDir baseDir(qApp->applicationDirPath());
+
+#ifdef Q_OS_WIN
+ // Windows:
+ // during development with visual studio binary could be in the debug/release subdir.
+ // once deployed plugins dir is in the application directory, so
+ if (baseDir.dirName() == "debug" || baseDir.dirName() == "release")
+ baseDir.cdUp();
+#endif
+
+#ifdef Q_OS_MAC
+ // Mac: during developmentwith xcode and well deployed the binary is well buried.
+ for (int i = 0; i < 6; ++i) {
+ if (baseDir.exists("plugins") || baseDir.exists("PlugIns"))
+ break;
+ baseDir.cdUp();
+ }
+#endif
+ return baseDir.absolutePath();
+}
+
+QString meshlab::defaultPluginPath()
+{
+ QDir pluginsDir(basePath());
+#ifdef Q_OS_WIN
+ QString d = pluginsDir.dirName();
+ QString dLower = d.toLower();
+ if (dLower == "release" || dLower == "relwithdebinfo" || dLower == "debug" ||
+ dLower == "minsizerel") {
+ // This is a configuration directory for MS Visual Studio.
+ pluginsDir.cdUp();
+ }
+ else {
+ d.clear();
+ }
+#endif
+ if (pluginsDir.exists("PlugIns")) {
+ pluginsDir.cd("PlugIns");
+ return pluginsDir.absolutePath();
+ }
+
+ if (pluginsDir.exists("plugins")) {
+ pluginsDir.cd("plugins");
+
+#ifdef Q_OS_WIN
+ // Re-apply the configuration dir, if any.
+ if (!d.isEmpty() && pluginsDir.exists(d)) {
+ pluginsDir.cd(d);
+ }
+#endif
+
+ return pluginsDir.absolutePath();
+ }
+#ifdef Q_OS_LINUX
+ else if (pluginsDir.dirName() == "bin") {
+ pluginsDir.cdUp();
+ pluginsDir.cd("lib");
+ pluginsDir.cd("meshlab");
+ if (pluginsDir.exists("plugins")) {
+ pluginsDir.cd("plugins");
+ return pluginsDir.absolutePath();
+ }
+ }
+#endif
+ qDebug("Meshlab Initialization: Serious error. Unable to find the plugins directory.");
+ return {};
+}
+
+QString meshlab::defaultShadersPath()
+{
+ QDir dir(basePath());
+#ifdef Q_OS_MAC // TODO: check that this works as expected
+ return dir.path() + "/shaders";
+#endif
+#ifdef Q_OS_LINUX
+ dir.cdUp();
+ bool res = dir.cd("share/meshlab/shaders");
+ if (res) {
+ return dir.path();
+ }
+ else { // reset and return default
+ dir.setPath(basePath());
+ }
+#endif
+ return dir.path() + "/shaders";
+}
+
+QString meshlab::logDebugFileName()
+{
+ static QString filename = QDir::homePath() + "/MeshLab" +
+ QString::fromStdString(meshlab::meshlabCompleteVersion()) + " " +
+ QDateTime::currentDateTime().toString() + ".log";
+ return filename;
+}
+
+RichParameterList& meshlab::defaultGlobalParameterList()
+{
+ static RichParameterList globalRPS;
+ return globalRPS;
+}
+
+PluginManager& meshlab::pluginManagerInstance()
+{
+ static PluginManager pm;
+ return pm;
+}
+
+ActionSearcher& meshlab::actionSearcherInstance()
+{
+ static ActionSearcher as;
+ return as;
+}
+
+std::string meshlab::meshlabCompleteVersion()
+{
+ std::string ver = meshlabVersion();
+#ifdef MESHLAB_IS_NIGHTLY
+ QFile f(":/resources/git_sha.txt");
+ if (f.open(QFile::ReadOnly | QFile::Text)) {
+ QTextStream in(&f);
+ ver += "_nightly_" + in.readAll().toStdString();
+ f.close();
+ }
+#endif
+ return ver;
+}
+
+pymeshlab::FunctionSet& pymeshlab::functionSetInstance()
+{
+ static FunctionSet fs(meshlab::pluginManagerInstance());
+ return fs;
+}
diff --git a/src/common/globals.h b/src/common/globals.h
new file mode 100644
index 000000000..daa86fd8b
--- /dev/null
+++ b/src/common/globals.h
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * MeshLab o o *
+ * A versatile mesh processing toolbox o o *
+ * _ O _ *
+ * Copyright(C) 2005-2021 \/)\/ *
+ * Visual Computing Lab /\/| *
+ * ISTI - Italian National Research Council | *
+ * \ *
+ * All rights reserved. *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
+ * for more details. *
+ * *
+ ****************************************************************************/
+
+#ifndef MESHLAB_GLOBALS_H
+#define MESHLAB_GLOBALS_H
+
+#define meshlab_xstr(a) mlstringify(a)
+#define mlstringify(a) #a
+
+#include
+#ifdef MESHLAB_IS_NIGHTLY
+#include
+#include
+#endif
+
+#ifndef MESHLAB_VERSION
+#error "MESHLAB_VERSION needs to be defined!"
+#endif
+#ifndef MESHLAB_SCALAR
+#error "MESHLAB_SCALAR needs to be defined!"
+#endif
+
+class RichParameterList;
+class PluginManager;
+class ActionSearcher;
+
+namespace meshlab {
+
+QString defaultPluginPath();
+QString defaultShadersPath();
+QString logDebugFileName();
+
+RichParameterList& defaultGlobalParameterList();
+PluginManager& pluginManagerInstance();
+ActionSearcher& actionSearcherInstance();
+
+// keep these functions inlined please
+// each plugin that uses them need to have their own definition
+// plugins cannot link them!!
+inline std::string meshlabVersion()
+{
+ return std::string(meshlab_xstr(MESHLAB_VERSION));
+}
+
+std::string meshlabCompleteVersion();
+
+inline bool builtWithDoublePrecision()
+{
+ return std::string(meshlab_xstr(MESHLAB_SCALAR)) == std::string("double");
+}
+
+} // namespace meshlab
+
+namespace pymeshlab {
+class FunctionSet;
+
+FunctionSet& functionSetInstance();
+} // namespace pymeshlab
+
+#endif // MESHLAB_GLOBALS_H
diff --git a/src/common/interfaces/iomesh_plugin_interface.h b/src/common/interfaces/iomesh_plugin_interface.h
deleted file mode 100644
index 0246e8844..000000000
--- a/src/common/interfaces/iomesh_plugin_interface.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-* MeshLab o o *
-* A versatile mesh processing toolbox o o *
-* _ O _ *
-* Copyright(C) 2005-2020 \/)\/ *
-* Visual Computing Lab /\/| *
-* ISTI - Italian National Research Council | *
-* \ *
-* All rights reserved. *
-* *
-* This program is free software; you can redistribute it and/or modify *
-* it under the terms of the GNU General Public License as published by *
-* the Free Software Foundation; either version 2 of the License, or *
-* (at your option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
-* for more details. *
-* *
-****************************************************************************/
-
-#ifndef MESHLAB_IOMESH_PLUGIN_INTERFACE_H
-#define MESHLAB_IOMESH_PLUGIN_INTERFACE_H
-
-#include
-
-#include "plugin_interface.h"
-#include "../utilities/file_format.h"
-
-/** \brief The IOPluginInterface is the base class for all the single mesh loading plugins.
-*/
-class IOMeshPluginInterface : public PluginInterface
-{
-public:
- IOMeshPluginInterface() : PluginInterface() { }
- virtual ~IOMeshPluginInterface() {}
-
- virtual QList importFormats() const = 0;
- virtual QList exportFormats() const = 0;
-
- // This function is called to initialize the list of additional parameters that a OPENING filter could require
- // it is called by the framework BEFORE the actual mesh loading to perform to determine how parse the input file
- // The instanced parameters are then passed to the open at the loading time.
- // Typical example of use to decide what subportion of a mesh you have to load.
- // If you do not need any additional processing simply do not override this and ignore the parameterSet in the open
- virtual void initPreOpenParameter(const QString &/*format*/, const QString &/*fileName*/, RichParameterList & /*par*/) {}
-
- // This function is called to initialize the list of additional parameters that a OPENING filter could require
- // it is called by the framework AFTER the mesh is already loaded to perform more or less standard processing on the mesh.
- // typical example: unifying vertices in stl models.
- // If you do not need any additional processing do nothing.
- virtual void initOpenParameter(const QString &/*format*/, MeshModel &/*m*/, RichParameterList & /*par*/) {}
-
- // This is the corresponding function that is called after the mesh is loaded with the initialized parameters
- virtual void applyOpenParameter(const QString &/*format*/, MeshModel &/*m*/, const RichParameterList &/*par*/) {}
-
- // This function is called to initialize the list of additional parameters that a SAVING filter could require
- // it is called by the framework after the mesh is loaded to perform more or less standard processing on the mesh.
- // typical example: ascii or binary format for ply or stl
- // If you do not need any additional parameter simply do nothing.
- virtual void initSaveParameter(const QString &/*format*/, MeshModel &/*m*/, RichParameterList & /*par*/) {}
-
-
- virtual void GetExportMaskCapability(const QString &format, int &capability, int &defaultBits) const = 0;
-
- /// callback used to actually load a mesh from a file
- virtual bool open(
- const QString &format, /// the extension of the format e.g. "PLY"
- const QString &fileName, /// The name of the file to be opened
- MeshModel &m, /// The mesh that is filled with the file content
- int &mask, /// a bit mask that will be filled reporting what kind of data we have found in the file (per vertex color, texture coords etc)
- const RichParameterList & par, /// The parameters that have been set up in the initPreOpenParameter()
- vcg::CallBackPos *cb = nullptr, /// standard callback for reporting progress in the loading
- QWidget *parent = nullptr) = 0; /// you should not use this...
-
- virtual bool save(
- const QString &format, // the extension of the format e.g. "PLY"
- const QString &fileName,
- MeshModel &m,
- const int mask,// a bit mask indicating what kind of the data present in the mesh should be saved (e.g. you could not want to save normals in ply files)
- const RichParameterList & par,
- vcg::CallBackPos *cb = 0,
- QWidget *parent = 0) = 0;
-
- /// This function is invoked by the framework when the import/export plugin fails to give some info to the user about the failure
- /// io plugins should avoid using QMessageBox for reporting errors.
- /// Failure should put some meaningful information inside the errorMessage string.
- const QString& errorMsg() const
- {
- return this->errorMessage;
- }
- void clearErrorString()
- {
- errorMessage.clear();
- }
-
-protected:
- // this string is used to pass back to the framework error messages in case of failure of a filter apply.
- // NEVER EVER use a msgbox to say something to the user.
- QString errorMessage;
-
-};
-
-#define MESHLAB_PLUGIN_IID_EXPORTER(x) Q_PLUGIN_METADATA(IID x)
-#define MESHLAB_PLUGIN_NAME_EXPORTER(x)
-
-#define IOMESH_PLUGIN_INTERFACE_IID "vcg.meshlab.IOMeshPluginInterface/1.0"
-Q_DECLARE_INTERFACE(IOMeshPluginInterface, IOMESH_PLUGIN_INTERFACE_IID)
-
-#endif // MESHLAB_IOMESH_PLUGIN_INTERFACE_H
diff --git a/src/common/interfaces/plugin_interface.cpp b/src/common/interfaces/plugin_interface.cpp
deleted file mode 100644
index 7161c8049..000000000
--- a/src/common/interfaces/plugin_interface.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "plugin_interface.h"
-
-PluginInterface::PluginInterface() :
- logstream(nullptr)
-{
-}
-
-void PluginInterface::setLog(GLLogStream* log)
-{
- this->logstream = log;
-}
-
-void PluginInterface::log(const char* s)
-{
- if(logstream != nullptr) {
- logstream->Log(GLLogStream::FILTER, s);
- }
-}
-
-void PluginInterface::log(const std::string& s)
-{
- if(logstream != nullptr) {
- logstream->Log(GLLogStream::FILTER, s);
- }
-}
-
-void PluginInterface::log(GLLogStream::Levels level, const char* s)
-{
- if(logstream != nullptr) {
- logstream->Log(level, s);
- }
-}
-
-void PluginInterface::log(GLLogStream::Levels level, const std::string& s)
-{
- if(logstream != nullptr) {
- logstream->Log(level, s);
- }
-}
-
-void PluginInterface::realTimeLog(QString Id, const QString& meshName, const char* f)
-{
- if(logstream != nullptr) {
- logstream->RealTimeLog(Id, meshName, f);
- }
-}
diff --git a/src/common/meshlab-common.qrc b/src/common/meshlab-common.qrc
new file mode 100644
index 000000000..2d3c3292e
--- /dev/null
+++ b/src/common/meshlab-common.qrc
@@ -0,0 +1,6 @@
+
+
+ resources/images/dummy.png
+ resources/git_sha.txt
+
+
diff --git a/src/common/meshlabdocumentbundler.cpp b/src/common/meshlabdocumentbundler.cpp
deleted file mode 100644
index 6244c706b..000000000
--- a/src/common/meshlabdocumentbundler.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "ml_document/mesh_document.h"
-#include
-#include "meshlabdocumentbundler.h"
-
-#include
-
-#include
-#include
-
-bool MeshDocumentFromBundler(MeshDocument &md, QString filename_out,QString image_list_filename, QString model_filename)
-{
- md.addNewMesh(model_filename,QString("model"));
- std::vector shots;
- const QString path = QFileInfo(filename_out).absolutePath();
- const QString path_im = QFileInfo(image_list_filename).absolutePath()+QString("/");
-
- std::vector image_filenames;
- vcg::tri::io::ImporterOUT::Open(md.mm()->cm,shots,image_filenames, qUtf8Printable(filename_out), qUtf8Printable(image_list_filename));
- md.mm()->updateDataMask(MeshModel::MM_VERTCOLOR);
-
- QString curr_path = QDir::currentPath();
- QFileInfo imi(image_list_filename);
-
- //
- QStringList image_filenames_q;
- for(unsigned int i = 0; i < image_filenames.size(); ++i)
- {
- QImageReader sizeImg(QString::fromStdString(image_filenames[i]));
- if(sizeImg.size()==QSize(-1,-1))
- image_filenames_q.push_back(path_im+QString::fromStdString(image_filenames[i]));
- else
- image_filenames_q.push_back(QString::fromStdString(image_filenames[i]));
- }
- QDir::setCurrent(imi.absoluteDir().absolutePath());
-
- for(size_t i=0 ; iaddPlane(new RasterPlane(fullpath_image_filename,RasterPlane::RGBA));
- int count=fullpath_image_filename.count('\\');
- if (count==0)
- {
- count=fullpath_image_filename.count('/');
- md.rm()->setLabel(fullpath_image_filename.section('/',count,1));
- }
- else
- md.rm()->setLabel(fullpath_image_filename.section('\\',count,1));
- md.rm()->shot = shots[i];
- }
- QDir::setCurrent(curr_path);
-
- return true;
-}
-
-bool MeshDocumentFromNvm(MeshDocument &md, QString filename_nvm, QString model_filename)
-{
- md.addNewMesh(model_filename,QString("model"));
- std::vector shots;
- const QString path = QFileInfo(filename_nvm).absolutePath();
- //const QString path_im = QFileInfo(image_list_filename).absolutePath()+QString("/");
-
- std::vector image_filenames;
- vcg::tri::io::ImporterNVM::Open(md.mm()->cm,shots,image_filenames, qUtf8Printable(filename_nvm));
- md.mm()->updateDataMask(MeshModel::MM_VERTCOLOR);
-
- QString curr_path = QDir::currentPath();
- //QFileInfo imi(image_list_filename);
-
- //QDir::setCurrent(imi.absoluteDir().absolutePath());
- QStringList image_filenames_q;
- for(size_t i = 0; i < image_filenames.size(); ++i)
- image_filenames_q.push_back(QString::fromStdString(image_filenames[int(i)]));
-
- for(size_t i=0 ; iaddPlane(new RasterPlane(fullpath_image_filename,RasterPlane::RGBA));
- md.rm()->setLabel(image_filenames_q[int(i)].section('/',1,2));
- md.rm()->shot = shots[int(i)];
- /*md.rm()->shot.Intrinsics.ViewportPx[0]=md.rm()->currentPlane->image.width();
- md.rm()->shot.Intrinsics.ViewportPx[1]=md.rm()->currentPlane->image.height();
- md.rm()->shot.Intrinsics.CenterPx[0]=(int)((double)md.rm()->shot.Intrinsics.ViewportPx[0]/2.0f);
- md.rm()->shot.Intrinsics.CenterPx[1]=(int)((double)md.rm()->shot.Intrinsics.ViewportPx[1]/2.0f);*/
-
- }
- QDir::setCurrent(curr_path);
-
- return true;
-}
diff --git a/src/common/meshlabdocumentbundler.h b/src/common/meshlabdocumentbundler.h
deleted file mode 100644
index 5d0db63b2..000000000
--- a/src/common/meshlabdocumentbundler.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __MESHLABDOC_BUNDLER_H
-#define __MESHLABDOC_BUNDLER_H
-
-#include "ml_document/mesh_model.h"
-
-bool MeshDocumentFromBundler(MeshDocument &md, QString filename_out, QString image_list_filename, QString model_filename);
-bool MeshDocumentFromNvm(MeshDocument &md, QString filename_nvm, QString model_filename);
-
-#endif // __MESHLABDOC_BUNDLER_H
diff --git a/src/common/meshlabdocumentxml.cpp b/src/common/meshlabdocumentxml.cpp
deleted file mode 100644
index 2f2bd1681..000000000
--- a/src/common/meshlabdocumentxml.cpp
+++ /dev/null
@@ -1,281 +0,0 @@
-#include
-#include
-#include
-#include
-
-#include "meshlabdocumentxml.h"
-#include
-
-bool MeshDocumentToXMLFile(MeshDocument &md, QString filename, bool onlyVisibleLayers, bool saveViewState, bool binary, const std::map& rendOpt)
-{
- md.setFileName(filename);
- QFileInfo fi(filename);
- QDir tmpDir = QDir::current();
- QDir::setCurrent(fi.absoluteDir().absolutePath());
- QDomDocument doc = MeshDocumentToXML(md, onlyVisibleLayers, saveViewState, binary, rendOpt);
- QFile file(filename);
- file.open(QIODevice::WriteOnly);
- QTextStream qstream(&file);
- doc.save(qstream, 1);
- file.close();
- QDir::setCurrent(tmpDir.absolutePath());
- return true;
-}
-
-QDomElement Matrix44mToXML(Matrix44m &m, QDomDocument &doc)
-{
- QDomElement matrixElem = doc.createElement("MLMatrix44");
- QString Row[4];
- for (int i = 0; i < 4; ++i)
- Row[i] = QString("%1 %2 %3 %4 \n").arg(m[i][0]).arg(m[i][1]).arg(m[i][2]).arg(m[i][3]);
-
- QDomText nd = doc.createTextNode("\n" + Row[0] + Row[1] + Row[2] + Row[3]);
- matrixElem.appendChild(nd);
-
- return matrixElem;
-}
-
-QDomElement Matrix44mToBinaryXML(Matrix44m &m, QDomDocument &doc)
-{
- QDomElement matrixElem = doc.createElement("MLMatrix44");
- QByteArray value = QByteArray::fromRawData((char *)m.V(), sizeof(Matrix44m::ScalarType) * 16).toBase64();
- QDomText nd = doc.createTextNode(QString(value));
- matrixElem.appendChild(nd);
- return matrixElem;
-}
-
-bool MeshDocumentFromXML(MeshDocument &md, QString filename, bool binary, std::map& rendOpt)
-{
- QFile qf(filename);
- QFileInfo qfInfo(filename);
- QDir tmpDir = QDir::current();
- QDir::setCurrent(qfInfo.absoluteDir().absolutePath());
- if (!qf.open(QIODevice::ReadOnly))
- return false;
-
- QString project_path = qfInfo.absoluteFilePath();
-
- QDomDocument doc("MeshLabDocument"); //It represents the XML document
- if (!doc.setContent(&qf))
- return false;
-
- QDomElement root = doc.documentElement();
-
- QDomNode node;
-
- node = root.firstChild();
-
- //Devices
- while (!node.isNull()) {
- if (QString::compare(node.nodeName(), "MeshGroup") == 0)
- {
- QDomNode mesh; QString filen, label;
- mesh = node.firstChild();
- while (!mesh.isNull()) {
- //return true;
- filen = mesh.attributes().namedItem("filename").nodeValue();
- label = mesh.attributes().namedItem("label").nodeValue();
- bool visible = true;
- if (mesh.attributes().contains("visible"))
- visible = (mesh.attributes().namedItem("visible").nodeValue().toInt() == 1);
- MeshModel* mm = md.addNewMesh(filen, label);
- mm->visible = visible;
- QDomNode tr = mesh.firstChildElement("MLMatrix44");
-
- if (!tr.isNull())
- {
- vcg::Matrix44f trm;
- if (tr.childNodes().size() == 1)
- {
- if (!binary)
- {
- QStringList values = tr.firstChild().nodeValue().split(" ", QString::SkipEmptyParts);
- for (int y = 0; y < 4; y++)
- for (int x = 0; x < 4; x++)
- md.mm()->cm.Tr[y][x] = values[x + 4 * y].toFloat();
- }
- else
- {
- QString str = tr.firstChild().nodeValue();
- QByteArray value = QByteArray::fromBase64(str.toLocal8Bit());
- memcpy(md.mm()->cm.Tr.V(), value.data(), sizeof(Matrix44m::ScalarType) * 16);
- }
- }
- }
-
- QDomNode renderingOpt = mesh.firstChildElement("RenderingOption");
- if (!renderingOpt.isNull())
- {
- QString value = renderingOpt.firstChild().nodeValue();
- MLRenderingData::GLOptionsType opt;
- if (renderingOpt.attributes().contains("pointSize"))
- opt._perpoint_pointsize = renderingOpt.attributes().namedItem("pointSize").nodeValue().toFloat();
- if (renderingOpt.attributes().contains("wireWidth"))
- opt._perwire_wirewidth = renderingOpt.attributes().namedItem("wireWidth").nodeValue().toFloat();
- if (renderingOpt.attributes().contains("boxColor"))
- {
- QStringList values = renderingOpt.attributes().namedItem("boxColor").nodeValue().split(" ", QString::SkipEmptyParts);
- opt._perbbox_fixed_color = vcg::Color4b(values[0].toInt(), values[1].toInt(), values[2].toInt(), values[3].toInt());
- }
- if (renderingOpt.attributes().contains("pointColor"))
- {
- QStringList values = renderingOpt.attributes().namedItem("pointColor").nodeValue().split(" ", QString::SkipEmptyParts);
- opt._perpoint_fixed_color = vcg::Color4b(values[0].toInt(), values[1].toInt(), values[2].toInt(), values[3].toInt());
- }
- if (renderingOpt.attributes().contains("wireColor"))
- {
- QStringList values = renderingOpt.attributes().namedItem("wireColor").nodeValue().split(" ", QString::SkipEmptyParts);
- opt._perwire_fixed_color = vcg::Color4b(values[0].toInt(), values[1].toInt(), values[2].toInt(), values[3].toInt());
- }
- if (renderingOpt.attributes().contains("solidColor"))
- {
- QStringList values = renderingOpt.attributes().namedItem("solidColor").nodeValue().split(" ", QString::SkipEmptyParts);
- opt._persolid_fixed_color = vcg::Color4b(values[0].toInt(), values[1].toInt(), values[2].toInt(), values[3].toInt());
- }
- MLRenderingData data;
- data.set(opt);
- if (data.deserialize(value.toStdString()))
- rendOpt.insert(std::pair(mm->id(), data));
- }
-
- mesh = mesh.nextSibling();
- }
- }
- // READ IN POINT CORRESPONDECES INCOMPLETO!!
- else if (QString::compare(node.nodeName(), "RasterGroup") == 0)
- {
- QDomNode raster; QString filen, label;
- raster = node.firstChild();
- while (!raster.isNull())
- {
- //return true;
- md.addNewRaster();
- QString labelRaster = raster.attributes().namedItem("label").nodeValue();
- md.rm()->setLabel(labelRaster);
- QDomNode sh = raster.firstChild();
- ReadShotFromQDomNode(md.rm()->shot, sh);
-
- QDomElement el = raster.firstChildElement("Plane");
- while (!el.isNull())
- {
- QString filen = el.attribute("fileName");
- QFileInfo fi(filen);
- QString sem = el.attribute("semantic");
- QString nm = fi.absoluteFilePath();
- md.rm()->addPlane(new RasterPlane(fi.absoluteFilePath(), RasterPlane::RGBA));
- el = node.nextSiblingElement("Plane");
- }
- raster = raster.nextSibling();
- }
- }
- node = node.nextSibling();
- }
-
- QDir::setCurrent(tmpDir.absolutePath());
- qf.close();
- return true;
-}
-
-QDomElement MeshModelToXML(MeshModel *mp, QDomDocument &doc, bool binary, bool saveViewState, const MLRenderingData& rendOpt = MLRenderingData())
-{
- QDomElement meshElem = doc.createElement("MLMesh");
- meshElem.setAttribute("label", mp->label());
- meshElem.setAttribute("filename", mp->relativePathName());
- meshElem.setAttribute("visible", saveViewState?mp->isVisible():true);
- if (binary)
- meshElem.appendChild(Matrix44mToBinaryXML(mp->cm.Tr, doc));
- else
- meshElem.appendChild(Matrix44mToXML(mp->cm.Tr, doc));
-
- if (saveViewState)
- {
- QDomElement renderingElem = doc.createElement("RenderingOption");
- std::string text;
- rendOpt.serialize(text);
- QDomText nd = doc.createTextNode(QString(text.c_str()));
- renderingElem.appendChild(nd);
- MLRenderingData::GLOptionsType opt;
- if (rendOpt.get(opt))
- {
- renderingElem.setAttribute("boxColor", QString("%1 %2 %3 %4").arg(opt._perbbox_fixed_color[0]).arg(opt._perbbox_fixed_color[1]).arg(opt._perbbox_fixed_color[2]).arg(opt._perbbox_fixed_color[3]));
- renderingElem.setAttribute("pointColor", QString("%1 %2 %3 %4").arg(opt._perpoint_fixed_color[0]).arg(opt._perpoint_fixed_color[1]).arg(opt._perpoint_fixed_color[2]).arg(opt._perpoint_fixed_color[3]));
- renderingElem.setAttribute("wireColor", QString("%1 %2 %3 %4").arg(opt._perwire_fixed_color[0]).arg(opt._perwire_fixed_color[1]).arg(opt._perwire_fixed_color[2]).arg(opt._perwire_fixed_color[3]));
- renderingElem.setAttribute("solidColor", QString("%1 %2 %3 %4").arg(opt._persolid_fixed_color[0]).arg(opt._persolid_fixed_color[1]).arg(opt._persolid_fixed_color[2]).arg(opt._persolid_fixed_color[3]));
- renderingElem.setAttribute("pointSize", opt._perpoint_pointsize);
- renderingElem.setAttribute("wireWidth", opt._perwire_wirewidth);
- }
- meshElem.appendChild(renderingElem);
- }
-
- return meshElem;
-}
-
-QDomElement RasterModelToXML(RasterModel *mp, QDomDocument &doc, bool binary)
-{
- QDomElement rasterElem = doc.createElement("MLRaster");
- rasterElem.setAttribute("label", mp->label());
- if (binary)
- rasterElem.appendChild(WriteShotToQDomNodeBinary(mp->shot, doc));
- else
- rasterElem.appendChild(WriteShotToQDomNode(mp->shot, doc));
- for (int ii = 0; ii < mp->planeList.size(); ++ii)
- rasterElem.appendChild(PlaneToXML(mp->planeList[ii], mp->par->pathName(), doc));
- return rasterElem;
-}
-
-QDomElement PlaneToXML(RasterPlane* pl, const QString& basePath, QDomDocument& doc)
-{
- QDomElement planeElem = doc.createElement("Plane");
- QDir dir(basePath);
- planeElem.setAttribute("fileName", dir.relativeFilePath(pl->fullPathFileName));
- planeElem.setAttribute("semantic", pl->semantic);
- return planeElem;
-}
-
-QDomDocument MeshDocumentToXML(MeshDocument &md, bool onlyVisibleLayers, bool saveViewState, bool binary, const std::map& rendOpt)
-{
- QDomDocument ddoc("MeshLabDocument");
-
- QDomElement root = ddoc.createElement("MeshLabProject");
- ddoc.appendChild(root);
- QDomElement mgroot = ddoc.createElement("MeshGroup");
-
- foreach(MeshModel *mmp, md.meshList)
- {
- if ((!onlyVisibleLayers) || (mmp->visible))
- {
- QDomElement meshElem;
- if (rendOpt.find(mmp->id()) != rendOpt.end())
- meshElem = MeshModelToXML(mmp, ddoc, binary, saveViewState, rendOpt.at(mmp->id()));
- else
- meshElem = MeshModelToXML(mmp, ddoc, binary, saveViewState);
- mgroot.appendChild(meshElem);
- }
- }
- root.appendChild(mgroot);
-
- QDomElement rgroot = ddoc.createElement("RasterGroup");
-
- foreach(RasterModel *rmp, md.rasterList)
- {
- QDomElement rasterElem = RasterModelToXML(rmp, ddoc, binary);
- rgroot.appendChild(rasterElem);
- }
-
- root.appendChild(rgroot);
-
- // tag.setAttribute(QString("name"),(*ii).first);
- // RichParameterSet &par=(*ii).second;
- // QList::iterator jj;
- // RichParameterXMLVisitor v(doc);
- // for(jj=par.paramList.begin();jj!=par.paramList.end();++jj)
- // {
- // (*jj)->accept(v);
- // tag.appendChild(v.parElem);
- // }
- // root.appendChild(tag);
- // }
- //
- return ddoc;
-}
-
diff --git a/src/common/meshlabdocumentxml.h b/src/common/meshlabdocumentxml.h
deleted file mode 100644
index fef8e123e..000000000
--- a/src/common/meshlabdocumentxml.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __MESHLABDOC_XML_H
-#define __MESHLABDOC_XML_H
-
-#include
-
-#include "ml_shared_data_context.h"
-#include "ml_document/mesh_document.h"
-#include