Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'AssimpKit/PostProcessingFlags.h' file not found #82

Closed
Leo-Kuyaco opened this issue Oct 9, 2017 · 10 comments
Closed

'AssimpKit/PostProcessingFlags.h' file not found #82

Leo-Kuyaco opened this issue Oct 9, 2017 · 10 comments

Comments

@Leo-Kuyaco
Copy link

Hello,

I'm getting an error message saying, "'AssimpKit/PostProcessingFlags.h' file not found" .

I copied the file AssimpKit.framework generated by carthage in my project per instructions but I'm not sure why I'm still getting this error message. Please help when you get a chance.

Thanks,
Leo

@dmsurti
Copy link
Owner

dmsurti commented Oct 10, 2017

@Leo-Kuyaco Are you sure, your Carthage build succeeded? Ensure you have p7zip installed, this is a recent change in the build process.

It will be easier to help, if you can push a sample project that shows the problem.

There is a sample project that uses AssimpKit as an external dependency; may be that can help.

@Leo-Kuyaco
Copy link
Author

Hi @dmsurti,

Thanks for your immediate reply. I'm certain that the Carthage build succeeded because I can see the files that were created after the carthage update. I'm also certain that I installed p7zip because I was getting an error message when I was doing the carthage update and it went away after I installed the p7zip.

What I've done are as follows:
(1) Copied original project
(2) Installed p7zip
(3) Did carthage update with github "dmsurti/AssimpKit" in the cartfile
(4) Copied/Dragged and dropped assimpkit.framework file from Carthage\Build\iOS folder to both the assimpkit.xcworkspace and iOS-Example.xcodeproj.
(4) I build/run the xcworkspace file. No errors on the build.
(5) I build/run the iOS-Example.xcodeproj file then get the error, "'AssimpKit/PostProcessingFlags.h' file not found".

Not sure if I'm doing something wrong here or missing any steps. I hope I gave you enough information to decipher the issue. Attached is the screenshot showing where the files were created after I did the carthage update.

screen shot 2017-10-10 at 8 49 27 am

Thanks in advance!

@dmsurti
Copy link
Owner

dmsurti commented Oct 10, 2017

Sorry, but I don't understand; what is your goal? To work on the AssimpKit source itself or to use AssimpKit.framework as a dependency in some app of yours.

For the former, just build the targets; see #77. You don't use Carthage when you work on AssimpKit source itself.

To use AssimpKit.framework in your app, you just add the Cartfile to your app sources, build and drop AssimpKit.framework to your app's libraries section; see the sample project I referenced earlier.

Hope this helps.

@Leo-Kuyaco
Copy link
Author

I just want to use Assimpkit to convert fbx files to scn files. I was under the assumption that you need the Assimpkit.framework to do this. When I ran the sample project you mentioned above, I still get the same error message. I didn't do anything else but copy the project and run it. Should I be doing something else?

screen shot 2017-10-10 at 10 07 09 am

@dmsurti
Copy link
Owner

dmsurti commented Oct 10, 2017

@Leo-Kuyaco You have to run carthage update in the directory of the cloned sample project. I just did a fresh clone and I get no such build error.

Your screenshot also shows AssimpKit.framework in red which implies it is not yet built.

Similar to this project, in your project, add a Cartfile, run carthage update and add the AssimpKit.framework to your project's embedded binaries section.

Screenshots:

screenshot 2017-10-10 21 40 12

screenshot 2017-10-10 21 40 34

@Leo-Kuyaco
Copy link
Author

Got it working! Thank you for you patience! This is awesome!

I guess my next question is, does AssimpKit actually generate an scn file after you load your projects in it? I was under the assumption that AssimpKit is an asset converter.

img_1778

@dmsurti
Copy link
Owner

dmsurti commented Oct 10, 2017

Great 👍

I was under the assumption that AssimpKit is an asset converter.

Definitely, it is a converter that converts the supported file formats to SceneKit files. It gives you SCNScene instances which you need to serialize.

SCNAssimpScene holds native SCNScene model and animation scene objects, so you can just use these regular options to archive these to .scn files on disk.

@dmsurti dmsurti closed this as completed Oct 10, 2017
@Leo-Kuyaco
Copy link
Author

Leo-Kuyaco commented Oct 10, 2017

I'm going to admit... Objective-C is not my strong suit. I've been working on serializing the scene file but haven't had any luck. Can you look at my code below and see what I'm doing wrong? All I want is for the scn file to be generated in the same location where it's reading the files from. I'd really appreciate it if you can do me a solid and help me with this last request. Thanks so much!

screen shot 2017-10-10 at 2 17 54 pm

@dmsurti
Copy link
Owner

dmsurti commented Oct 10, 2017

You are writing to the docsDir, instead you have to write to a file in the docsDir with the file scheme PS: I am writing this off the top of my head and the code below might need some minor fixes in Xcode.

NSString *bobScnFile = [docsDir stringByAppendingString:@"/Bob.scn"];
NSURL *bobURL = [NSURL URLWithString:bobSCNFIle];
if(![bobURL isFileURL]) {
   bobURL = [NSURL URLWithString: [@"file://"  stringByAppendingString:bobURL.absoluteString]];
}

Now use the above URL in your writeToURL method. Note that you will have to fetch the bobScnFile via iTunes files sharing as we are writing it to the docs dir. The above definitely works. Hope this helps.

@Leo-Kuyaco
Copy link
Author

You the man @dmsurti! I truly appreciate all your help. Couldn't have done it without you :).

screen shot 2017-10-10 at 3 12 44 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants