Broken assets

Discussions about user contributed assets. This is a good place to request new assets, as well as requesting support on existing assets that have been downloaded from the user contributions repository.

Moderator: joepal

Broken assets

Postby joepal » Sat Jan 09, 2016 11:37 am

I've modified the github asset export routine so that it also analyzes everything it exports and looks for missing files. Upside is that this should make it easy to find and fix broken assets. Downside is it only get updated when I run the export routine.

The current file is here: https://github.com/makehumancommunity/c ... g_files.md

I'm pasting the contents here too:

Code: Select all
# Missing files

These are broken file references in mhclo and mhmat files

## sonntag78

* In beanie3 mhmat, diffuseTexture is set to Mütze2.png, but this file does not exist.

## Aethelraed_Unraed

* In Viking_dress mhmat, aomapTexture is set to ao.png, but this file does not exist.
* In egtved_dress mhmat, aomapTexture is set to combined_ao.png, but this file does not exist.
* In egtved_dress mhmat, litsphereTexture is set to litspheres/lit_matte.png, but this file does not exist.

## frankyaye

* In bra_string_pink mhclo, material is set to bra_string_pink.mhmat, but this file does not exist.
* In panty_string mhclo, material is set to panty_string.mhmat, but this file does not exist.
* In tights mhclo, material is set to tights.mhmat, but this file does not exist.

## Marco_105

* In collier_02 mhmat, diffuseTexture is set to clothes/Textures_common/CollierCou.png, but this file does not exist.
* In collier_02 mhmat, litsphereTexture is set to litspheres/lit_leather.png, but this file does not exist.

## grinsegold

* In fingernails_elegant mhmat, diffuseTexture is set to toenail_natural_diff.png, but this file does not exist.
* In fingernails_elegant mhmat, bumpTexture is set to toenail_natural_Normal.png, but this file does not exist.

## brkurt

* In robotarmor mhmat, diffuseTexture is set to robotArmor.jpg, but this file does not exist.
* In ovalveil mhmat, diffuseTexture is set to ovalVeil.png, but this file does not exist.
* In summerdress mhmat, diffuseTexture is set to sari1.jpg, but this file does not exist.
* In pigtailbraids1_249b mhmat, diffuseTexture is set to streakedBlonde1.png, but this file does not exist.
* In rondarouseyblondecornrows1 mhclo, obj_path is set to rondarouseyblondecornrows1.001.obj, but this file does not exist.
* In rondarouseyblondecornrows1 mhclo, material is set to rondarouseyblondecornrows1.001.mhmat, but this file does not exist.


Of less importance is missing thumbnails and missing screenshots/renders. These files are optional, but it will pretty hard for a user to figure out if they want the asset if the files are not there. The list of which assets are missing these are at

https://github.com/makehumancommunity/c ... _render.md

and

https://github.com/makehumancommunity/c ... _thumbs.md
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4469
Joined: Wed Jun 04, 2008 11:20 am

Re: Broken assets

Postby learning » Sun Jan 10, 2016 1:26 am

Whew, no mention of me! 8-)
learning
 
Posts: 317
Joined: Mon Feb 24, 2014 9:36 am

Re: Broken assets

Postby loki1950 » Sun Jan 10, 2016 5:17 am

learning wrote:Whew, no mention of me! 8-)


Yet ;) I'm a believer in Murphy's Law so never surprised at my own Homer moments when they occur and since a stroke a few years back they have been more common left hand kinda wonky on the keyboard.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Re: Broken assets

Postby badwolf » Tue Jan 12, 2016 2:25 pm

would you mind sharing your script so that folks could do mirrors/local copies?? (it would be cool if we could get a number of folks to do mirrors with a staggered run date
(A does the run on first thursday B does on second thursday C does on third thursday D ...) also it solves the What if Joepal gets run over by a bus issue.
badwolf
 
Posts: 272
Joined: Fri Feb 06, 2015 12:41 am

Re: Broken assets

Postby joepal » Tue Jan 12, 2016 2:38 pm

Eeek. It's a ugly hack perl script (since yes, I'm that old...). If I had thought I'd have to show it to someone I wouldn't have been that messy. :-)

Most parts of it are related to selecting and sifting through the drupal database, and that's hardly relevant for anyone since they don't have access to that. But I'll paste the relevant part of the script here. It'll probably need some touchup before working standalone.

Also, it'll only work on unixoid operating systems. Or possibly if you manage to find the "find" command for windows.

Code: Select all
my($root) = "communityassets";
my(%thumbwarnings);
my(%fileswarnings);

open(PIPE,'find ' . $root . ' -name "*.mhclo" |') || die "pipe\n\n";
while($assetfile = <PIPE>)
{
  $assetfile =~ m/(.*)\/(.*)\.mhclo/;
  $assetpath = $1;
  $assetname = $2;

  chomp($assetfile);

  open(FIL,"$assetpath/README.md") || die "readme\n\n";

  $author = "unknown";

  while($inlin = <FIL>)
  {
    chomp($inlin);
    if($inlin =~ m/\* Author:\s+(.*)/)
    {
      $author = $1;
    }
  }

  close(FIL);

  if(!$fileswarnings{$author})
  {
    $fileswarnings{$author} = [];
  }

  if(!-e "$assetpath/$assetname.thumb")
  {
    if(!$thumbwarnings{$author})
    {
      $thumbwarnings{$author} = [];
    }
    push($thumbwarnings{$author},$assetname);
  }

  open(FIL,"$assetfile") || die "asset\n\n";

  while($inlin = <FIL>)
  {
    chomp($inlin);
    if($inlin =~ m/obj_file (.*)$/)
    {
      $objpath = $assetpath . "/" . $1;
      if(!-e $objpath)
      {
        push($fileswarnings{$author},"* In $assetname mhclo, obj_path is set to $1, but this file does not exist.\n");
      }
    }
    if($inlin =~ m/material (.*)$/)
    {
      $matpath = $assetpath . "/" . $1;
      if(!-e $matpath)
      {
        push($fileswarnings{$author},"* In $assetname mhclo, material is set to $1, but this file does not exist.\n");
      }
      else
      {
        open(MAT,$matpath) || die "mat\n\n";
        while($matlin = <MAT>)
        {
          if($matlin =~ m/([a-z]+)Texture (.*)$/)
          {
            $path = $assetpath . "/" . $2;
            if(!-e $path)
            {
              push($fileswarnings{$author},"* In $assetname mhmat, $1" . "Texture is set to $2, but this file does not exist.\n");
            }
          }
        }
        close(MAT);
      }
    }
  }

  close(FIL);
}

close(PIPE);

open(FIL,">$root/missing_thumbs.md") || die "render\n\n";

print FIL "# Missing thumbnails\n\n";
print FIL "These assets are missing thumbnail, which might make it difficult to find them in lists\n";
foreach $k (keys %thumbwarnings)
{
  print FIL "\n## $k\n\n";
  foreach $l (@{$thumbwarnings{$k}})
  {
    print FIL "* " . $l . "\n";
  }
}
close(FIL);

open(FIL,">$root/missing_files.md") || die "render\n\n";

print FIL "# Missing files\n\n";
print FIL "These are broken file references in mhclo and mhmat files\n";

foreach $k (keys %fileswarnings)
{
  if($fileswarnings{$k} && scalar(@{$fileswarnings{$k}}) > 0)
  {
    print FIL "\n## $k\n\n";
    foreach $l (@{$fileswarnings{$k}})
    {
      print FIL $l;
    }
  }
}
close(FIL);
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4469
Joined: Wed Jun 04, 2008 11:20 am


Return to Assets, asset repositories and asset downloader

Who is online

Users browsing this forum: No registered users and 1 guest