diff --git a/manyfold/root/hook.d/experience_updated/1000-extract-textures.rb b/manyfold/root/hook.d/experience_updated/1000-extract-textures.rb index 0bb0369..68b325e 100755 --- a/manyfold/root/hook.d/experience_updated/1000-extract-textures.rb +++ b/manyfold/root/hook.d/experience_updated/1000-extract-textures.rb @@ -52,14 +52,8 @@ begin # Iterate through the images array gltf['images'].each_with_index do |img, i| - name = img['name'] - next unless name && !name.empty? - + new_filename = "#{dir}/#{filenameWithoutExt}_img#{i}.png" old_filename = "#{dir}/.xrforge/#{filenameWithoutExt}_img#{i}.png" - new_filename = "#{dir}/#{name}.png" - - puts old_filename - puts new_filename # move file to modeldirectory (but dont overwrite if user overwrite it) if File.exist?(old_filename) && !File.exist?(new_filename) diff --git a/manyfold/root/hook.d/experience_updated/1050-compile-textures.rb b/manyfold/root/hook.d/experience_updated/1050-compile-textures.rb index 80abea5..51acb11 100755 --- a/manyfold/root/hook.d/experience_updated/1050-compile-textures.rb +++ b/manyfold/root/hook.d/experience_updated/1050-compile-textures.rb @@ -35,7 +35,7 @@ begin end XRForge.log("✅ compiling textures", logfile) - gltf_path = ".xrforge/#{filenameWithoutExt}.gltf" + gltf_path = ".xrforge/#{filenameWithoutExt}.gltf" # Read and parse the GLTF JSON gltf = JSON.parse(File.read(gltf_path)) @@ -48,16 +48,14 @@ begin # Iterate through the images array gltf['images'].each_with_index do |img, i| - name = img['name'] - next unless name && !name.empty? - - new_filename = "#{dir}/#{name}.png" + new_filename = "" + new_filename = "#{dir}/#{filenameWithoutExt}_img#{i}.png" # move file to modeldirectory (but dont overwrite if user overwrite it) XRForge.log("🤔 checking #{new_filename}",logfile) if File.exist?(new_filename) XRForge.log("✅ importing #{new_filename} -> #{resource['path']}",logfile) - img['uri'] = "#{name}.png" + img['uri'] = new_filename # NOTE: editing uri will cause assimp to drop image['name'] when exporting :/ update = true end end diff --git a/manyfold/root/hook.d/experience_updated/300-package_janusxr.rb b/manyfold/root/hook.d/experience_updated/300-package_janusxr.rb index a7d35df..8ad3a92 100755 --- a/manyfold/root/hook.d/experience_updated/300-package_janusxr.rb +++ b/manyfold/root/hook.d/experience_updated/300-package_janusxr.rb @@ -71,7 +71,7 @@ begin if data['description'] && data['description'].match(JMLHeuristic) if data['description'].match(/autogenerate=['"]false['"]/) - XRForge.log("✅ autogenerate='false' found in JML..keeping this JML") + XRForge.log("✅ autogenerate='false' found in JML..keeping this JML",logfile) autogenerate = false jmlMatch = data['description'].match(JMLHeuristic) jml = jmlMatch[0] @@ -84,7 +84,7 @@ begin - + @@ -117,6 +117,13 @@ begin #{jml} + + + + diff --git a/manyfold/usr/src/app/app/views/models/show.html.erb b/manyfold/usr/src/app/app/views/models/show.html.erb index c5e7cd9..553e2f8 100644 --- a/manyfold/usr/src/app/app/views/models/show.html.erb +++ b/manyfold/usr/src/app/app/views/models/show.html.erb @@ -82,7 +82,7 @@ <% end %> <% if ENV['FEDERATE_DRIVE_HOST'].present? %> - <% if @model.tags.where(name: "janusxr" ).any? %> + <% if @model.tags.where(name: "xrfragments" ).any? %> @@ -123,7 +123,7 @@ <% end %> - <% if @model.tags.where(name: "mml" ).any? %> + <% if @model.tags.where(name: "xrfragments" ).any? %> @@ -187,6 +187,7 @@ + <% end %> <% if @model.collection %>