Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/Patch2PDF/MVR-Parser
go 1.25.4

require (
github.com/Patch2PDF/GDTF-Mesh-Reader v1.1.2
github.com/Patch2PDF/GDTF-Parser v0.2.2
github.com/Patch2PDF/GDTF-Mesh-Reader/v2 v2.0.1
github.com/Patch2PDF/GDTF-Parser v0.3.0
golang.org/x/sync v0.19.0
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/Patch2PDF/GDTF-Mesh-Reader v1.1.2 h1:4LHeQjH+cwRoXuv+O4X9YoJaZAO/DihGGN5t3jVIFFk=
github.com/Patch2PDF/GDTF-Mesh-Reader v1.1.2/go.mod h1:4Uipj5UA1HhD3v032aSnEFlpItN80UY5zKB15mIeVwQ=
github.com/Patch2PDF/GDTF-Parser v0.2.2 h1:MpUqTsRVxsgqfsM6oTFx1BPUgVL5TaAXfiomI2mMqYI=
github.com/Patch2PDF/GDTF-Parser v0.2.2/go.mod h1:sXYpcmWKjVBL0JuRWyHwSFHRGzx6kex+HaS/vEPLZ2Y=
github.com/Patch2PDF/GDTF-Mesh-Reader/v2 v2.0.1 h1:xc6xxlDRv9s19um206MW6lYsZU7sXOfHgROuo7PxTZg=
github.com/Patch2PDF/GDTF-Mesh-Reader/v2 v2.0.1/go.mod h1:zAcGHlYdE75hdFo624nQfQHTzw9+NfPJT8Eo2mB1lI8=
github.com/Patch2PDF/GDTF-Parser v0.3.0 h1:aUPiTMJrlNW06nMdzxbRuqU4ZVsrskC14ZzKN7gsUz0=
github.com/Patch2PDF/GDTF-Parser v0.3.0/go.mod h1:4NWUS8fNAQJjQetvlZvrVE/lv2oFaEkuPUKc/r/TugE=
github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg=
github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/qmuntal/gltf v0.28.0 h1:C4A1temWMPtcI2+qNfpfRq8FEJxoBGUN3ZZM8BCc+xU=
Expand Down
12 changes: 4 additions & 8 deletions internal/gdtfreader/getgdtf.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"archive/zip"
"strings"

"github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"
GDTFParser "github.com/Patch2PDF/GDTF-Parser"
MVRTypes "github.com/Patch2PDF/MVR-Parser/pkg/types"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -43,20 +42,17 @@ func getGDTF(jobs <-chan *GDTFTask, results chan<- *MVRTypes.GDTF, fileMap map[s
if err != nil {
return err
}
meshes := map[string]*MeshTypes.Mesh{}
for gdtfMode := range task.GDTFModes {
if config.MeshHandling >= MVRTypes.BuildFixtureModels {
mesh, err := gdtf.BuildMesh(gdtfMode)
if config.MeshHandling >= MVRTypes.BuildFixtureModels && gdtf.FixtureType.DMXModes[gdtfMode].MeshModels == nil {
_, err := gdtf.BuildMesh(gdtfMode)
if err != nil {
return err
}
meshes[gdtfMode] = mesh
}
}
results <- &MVRTypes.GDTF{
Name: task.GDTFSpec,
Data: gdtf,
Meshes: meshes,
Name: task.GDTFSpec,
Data: gdtf,
}
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion internal/types/mvrxml/general.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

"github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"
"github.com/Patch2PDF/GDTF-Mesh-Reader/v2/pkg/MeshTypes"
GDTFReader "github.com/Patch2PDF/MVR-Parser/internal/gdtfreader"
)

Expand Down
5 changes: 1 addition & 4 deletions mvr-parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ func ParseMVRZipReader(zipfile *zip.Reader, config MVRTypes.MVRParserConfig) (*M

if config.MeshHandling >= MVRTypes.BuildStageModel {
meshTasks := MVRTypes.MeshTasks{}
parsedData.CreateMeshTasks(&meshTasks, config.ModelConfig)
fmt.Println(len(meshTasks))

parsedData.StageModel = MVRTypes.CompleteMeshTasks(&meshTasks, config)
parsedData.GenerateMeshes(&meshTasks, config.ModelConfig)
}

return parsedData, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package MVRTypes
import (
"archive/zip"

"github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"
"github.com/Patch2PDF/GDTF-Mesh-Reader/v2/pkg/MeshTypes"
)

type Fixture struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/focuspoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package MVRTypes
import (
"archive/zip"

"github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"
"github.com/Patch2PDF/GDTF-Mesh-Reader/v2/pkg/MeshTypes"
)

type FocusPoint struct {
Expand Down
6 changes: 2 additions & 4 deletions pkg/types/gdtfdata.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package MVRTypes

import (
"github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"
GDTFTypes "github.com/Patch2PDF/GDTF-Parser/pkg/types"
)

type GDTF struct {
Name string
Data *GDTFTypes.GDTF
Meshes map[string]*MeshTypes.Mesh
Name string
Data *GDTFTypes.GDTF
}
2 changes: 1 addition & 1 deletion pkg/types/general.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strconv"
"strings"

"github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"
"github.com/Patch2PDF/GDTF-Mesh-Reader/v2/pkg/MeshTypes"
)

type Matrix = MeshTypes.Matrix
Expand Down
4 changes: 1 addition & 3 deletions pkg/types/generalscenedescription.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package MVRTypes

import "github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"

type GeneralSceneDescription struct {
VersionMajor int
VersionMinor int
Provider string
ProviderVersion string
UserData *UserData
Scene *Scene
StageModel *MeshTypes.Mesh
StageModel *StageModel
}

func (a *GeneralSceneDescription) CreateReferencePointer(refPointers *ReferencePointers) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/types/geometries.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"archive/zip"
"path"

GDTFMeshReader "github.com/Patch2PDF/GDTF-Mesh-Reader"
"github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"
GDTFMeshReader "github.com/Patch2PDF/GDTF-Mesh-Reader/v2"
"github.com/Patch2PDF/GDTF-Mesh-Reader/v2/pkg/MeshTypes"
)

type Geometries struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/groupobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package MVRTypes
import (
"archive/zip"

"github.com/Patch2PDF/GDTF-Mesh-Reader/pkg/MeshTypes"
"github.com/Patch2PDF/GDTF-Mesh-Reader/v2/pkg/MeshTypes"
)

type GroupObject struct {
Expand Down
Loading
Loading