THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/11/2006 at 10:44, xxxxxxxx wrote:
Cinema 4D Version: 10.0
Platform: Mac OSX ;
Language(s) : C++ ;
Okay, what's the story here?
For my R9.5 UB version, I could see (barely) the reason why fopen() and gzopen() failed unless using Volumes with the new-fangled mess that Apple uses for filepath specifications.
Now, nothing works in R10 UB version. My Runtime Explorer folders are not filled in (BrowseFiles, Filename are used exclusively) and importing content cannot resolve any referenced files. Seems to only work with relative paths (e.g.: resources) and filepaths returned from Filename.FileSelect(). Otherwise these work on these plugin versions (big list) :
Windows 32-bit R8.2, R8.5, R9.1, R9.6, R10.0
Windows 64-bit R9.1
MacOS PPC R8.2, R8.5, R9.1, R9.6
MacOS UB R9.5
The pattern here is that it only fails on MacOS UB R10.
I see that there is a new-fangled (correlative, I hope) BrowseVolumes class.
On 05/11/2006 at 11:35, xxxxxxxx wrote:
As expected, for full file paths (something constructed regularly to get at referenced files in my case - never relative paths for these), the '/Volumes/' is required to be prepended. A little test with an external drive and FileSelect() bears that out.
Note this well if you are doing the same in MacOSX C4D R10!
On 05/11/2006 at 11:54, xxxxxxxx wrote:
thanks for the info Kuro. I don´t have much MAC experience and haven´t compiled an UB till now. Hope I don´t have such problems.
On 05/11/2006 at 12:12, xxxxxxxx wrote:
Just remember these things:
1. If the volume is included in the file path, you need '/Volumes/' appended. Relative paths don't need this. FileSelect() will do this if the file resides on another volume.
2. If you were previously using MacOS ':' path separators, these need to be changed to Unix '/' path separators.
3. If you are using fopen(), gzopen(), et al, you'll need to specify full paths (the relative paths don't work, but I'm going to check for a workaround - might just involve removing the initial '/' (?)).
My main problem now is getting the name of the current volume - Cinema 4D returns relative paths when this is the case. I'll need full paths ('/Volumes/vol_name/...') if 3. holds true and there is no workaround.
On 05/11/2006 at 13:32, xxxxxxxx wrote:
1. Thanks, will remember this!
2. I am using MacOS now. I thought it´s possible to compile UBs for IntelMACs on MacOS (just like Win64 on a Win32 environement). Isn´t it? 8-? Hope it is. I don´t wanna buy an IntelMAC just to compile for UB. I am usually working on PC, so my MAC knowledge (beside working with it at university, hehe, but that´s pure industrial design) is veeeery limited. So, sorry that I cannot be of any help here.
On 05/11/2006 at 13:43, xxxxxxxx wrote:
Yes, you can compile and test in C4D UB on a PPC Mac as long as you have the minimum OS requirement (10.3.9, I think). Get XCode 2.2.1 or later and you're good to go.
I'm still having difficulties with the full paths - fopen/gzopen need full paths (otherwise, I'd need to construct the '../../' type of path or set the current working directory - don't know how to do that). Have no idea how to get the current volume name to fill out the path.
Wish me luck.
On 05/11/2006 at 17:13, xxxxxxxx wrote:
For the moment (and to the gasp of Mac users, I'm sure), the only solution is to add a setting on the main dialog that requires the volume name of the Cinema 4D install volume.
This is not my first option, but since there don't seem to be any in the SDK whatsoever and what to use from Carbon/Cocoa/BSD/whatever are not elucidated this is the path for now (hah, no pun intended).
I think that I'm going to petition Apple to get off their high-and-mighty a$$es and include some form of POSIX support without the extensive workarounds (CUrl to this to that to this and back to POSIX eventually - crap!). You might think there is a "false" dichotomy here - either POSIX or the other method. How near-sighted. They need 2" thick glasses for sure.
If the developers can profer a solution, I'd be well ingratiated. I've seen the solutions that are somewhat relevant and they aren't pretty. I've also seen the Content Browser preferences setting in R10 (file://localhost)... hmmm. Same problem, eh?
On 06/11/2006 at 12:41, xxxxxxxx wrote:
I might have an answer on the volumes situation. There are a couple possibilities, but they need to be tested.
It is possible that the new BrowseVolumes may provide the answer - if it returns "/" for the Filename on the current volume. Then I can get the name from GetVolumeName(). This will be my first test.
If that fails, I need to go the Carbon.framework route with, yes you've guessed it, CUrl types and a lot of code just to get at the name.
Will post back here with my findings!
On 06/11/2006 at 14:06, xxxxxxxx wrote:
Ah, it vorks!
if (!bvols) return "";
String vname = "";
if (bvols->GetFilename() != "/") continue;
vname = bvols->GetVolumeName(&vflags;);
if (vflags & BROWSEVOLUMES_VOLUME_NOT AVAILABLE) continue;
GePrint("Working Volume Name: "+vname);
Back to finishing the R10 version of interPoser Pro!
On 06/11/2006 at 14:14, xxxxxxxx wrote:
Cool! Glad you found a solution. And thanks for sharing.
On 08/11/2006 at 13:23, xxxxxxxx wrote:
Yes, thanks alot. You're help is very welcome!