Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jimver04 committed Nov 8, 2017
2 parents be74517 + c669e9b commit 8956ada
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/wpunity-core-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ function wpunity_create_asset_3DFilesExtra_frontend($asset_newID, $assetTitleFor
$mtlFile_filename = basename(get_attached_file($mtlFile_id));

// OBJ
$obj_content = preg_replace("/.*\b" . 'mtllib' . "\b.*\n/ui", "mtllib " . $mtlFile_filename . "\n", $obj_content);
$mtlFile_filename_notxt = substr( $mtlFile_filename, 0, -4 );
$mtlFile_filename_withMTLext = $mtlFile_filename_notxt . '.mtl';
$obj_content = preg_replace("/.*\b" . 'mtllib' . "\b.*\n/ui", "mtllib " . $mtlFile_filename_withMTLext . "\n", $obj_content);
$objFile_id = wpunity_upload_AssetText($obj_content, 'obj'.$assetTitleForm, $asset_newID, $gameSlug);

// SCREENSHOT
Expand Down

0 comments on commit 8956ada

Please sign in to comment.