Loaders + some other basic questions



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/10/2003 at 09:22, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.207 
    Platform:   Windows  ;   
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    Sorry I guess this is another set of stupid beginner's questions. I did a proper search on the subject this time, though, but haven't find a satisfactory answer.
    Loading files via coffee. I saw some examples - but I don't seem able to recreate it. What I need is to merge an obj file inside a Cinema document and then simply get its points positions. I already learned that merging files using coffee is not possible - one has to open the object in a separate file and then copy data to the original file. Copy data - HOW?
    I saw an example of LoadDocument() but, besides not being able to recreate it in my project (it simply will not work - nothing happens) I doubt that life is so easy and beatiful and that LoadDocument() will recognize obj file automatically and load it. I guess the function is intended for loading of c4d files exclusively. So I guess it would be a better idea to forget all about the LoadDocument() function and write a code that will Open an OBJ file and then extract data one by one out of it, right?
    So here are my questions:
    1. Will LoadDocument() open any file that Cinema recognizes as a valid file (ie, obj, dxf etc) or only c4d files?
    2. Where can I find a whole, working example of how to implement the LoadDocument() function properly - the example in SDK is very basic.
    3. Where can I find a working example of an OBJ file loader?
    4. I made a piece of code. It works extremly well when I put it inside Execute(doc). But since there's already code for dialog box in there - I have to call my routine from a dialog instead (it should run when user clicks on OK button). The problem is, when I put my code inside a separate subroutine, for example, MyCode()  and call it from Command(id, msg)- it doesn't work anymore. I tried to find out why - it seems the problem is, that MyCode() starts with
    var obj=doc->FindObject(OBJECT); // search object inside current document, with name, defined in the OBJECT variable
    and when I put it as separate subroutine and call it from Command(id,msg) - it "forgets" what "doc" stands for i.e. I get Object not found error (which means - the routine didn't search for object in the right (current) document. So what am I doing wrong? (OBJECT variable is declared at the beginning of the document - so I guess it is "global" and supposed to retain its value inside all functions?)
    I hope there's someone here who will have a little patience with me :) Thanks for any answer or direction from a more experienced user. And sorry for long post.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/10/2003 at 04:08, xxxxxxxx wrote:

    thanks again for your numerous answers, guys, and your endless willingness  to help a beginner...
    :(
    And please don't tell me again the stories of "being too busy to answer stupid, repeating beginners questions". First, I don't have the impression that there are dozens of questions in this forum every day. Second, I searched the forum throughly before I posed above questions a found no similar questions.
    So what is the purpose of this forum? Enabling a couple of COFFEE Gods to chat about coffee secrets so deep, that us beginners can not even dream of them? You could use e-mails for that, guys...
    I'm administrator on a forum (http//www.3delavnica.com) , too - and also a very busy man - but as an administrator I take care that user questions on our forum get answered every day - especially the beginners' ones - ne matter how stupid and basic they might seem to me. Our forum has more than 2000 dayly visits and apropriate amount of questions regarding 3D, 2D, photography, video (only different IPs counted). Still no questions stays with zero answers more than a couple of hours. And, no, we don't have a software firm behind us to pay us for support.
    Sorry - but I have impression, that existing plugin developers are not very interested, that more of the C4D users learn coffee or C++ and start writing plugins. Not difficult to guess why :(
    And I also have an impresion that Maxon supports that attitude. A little bit more difficult to guess why.
    Sorry for bothering. Don't bother to answer this post (if you feel like answering, rather start with the first one in the thread!)
    :(
    "If you have any questions come to the Plugin Forum and don't be ashamed to ask".
    Yeah, sure... I might as well ask my dog the above (I'm sure very basic) questions about coffee. He'd at least wing its tail.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/10/2003 at 08:03, xxxxxxxx wrote:

    This forum is for sdk support, if you read the information about that the support team doesn't have a limit on the days to reply, you gave 2 days, usually 5 is expected, plus not everything comes under sdk support either. I've sometimes have to wait weeks for support replies from other companies with SDKs I've used.
    As for other users, why should anyone at all reply to you when you have that sort of bad attitude? Anyone that posts is giving up their own time for free to help out, I'm sure they do it when they can.
    Most of the bigger players don't use this forum, they deal directly with sdk support since their projects aren't public knowledge.
    From the info on sdk support:

    • The support team will give support for the C++ SDK and C.O.F.F.E.E., free of charge.
    • The support team will try to give you precise answers, wherever possible.
    • Depending on the nature of your query, an answer can be made quickly or perhaps take several days.
    • The support team will assist you with information when it is not available through this reference.
    • The support team cannot help you learn C++ or C.O.F.F.E.E..
    • The support team cannot debug your plugins.
    • If a bug has been found, the support team will try to assist you to the best of their abilities but cannot be asked to make changes to the SDK.
    • The support team will not write code for you.
    • Depending on the complexity of your problem the support team is not obliged to help you.
    • The support team will not give support for non-public functions/variables/hooks.
    • The support team cannot be held responsible for any damages to your code or schedule.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/10/2003 at 10:25, xxxxxxxx wrote:

    David, you've always made an  impression to be a nice person with correct and professional attitude towards C4D users.  So I've got no doubts you'd help If you had time. Please don't understand my above post as a personal attack towards you. I believe you're not the only one in the support team, though...
    Of course I don't expect others to write code for me  or debug my plugins - but since coffee is a part of Cinema 4D - one would expect that there's someone who's job is to support users. Of course I don't expect them to be members of the programming team - I'm sure you programmers  have better things to do and you're already doing a great job with C4D. The problem obviously lies with Maxon executives - with all the money they get they could organise a separate coffee support team who'd do only that.
    Ok I understand all the points you mentioned and of course I agree with most of them. But please try to look at it from my perspective for a moment: being desperately in need for a certain function in C4d which in v8.x doesn't work anymore. After one year still none seems interested to write such a plugin. What else is to do than to try to do it myself. With lots of optimism and a little experience in programming (mostly basic, mel, GDL, assembler...) I download SDK (the only "manual" for coffee I know of) - and am greeted with the message that I'm supposed to already know coffee in order to use it... Already know - from where? Tutorials? there are few and they are not explaining what I need to know. Hello World is great stuff, sure. Then I start asking question in Cinema 4D forum. "No, no, you bad boy - you're not supposed to ask questions about coffee in this forum - go to Plugin Cafe". So I came here and find out that I've been bad boy again - for not waiting patiently that in a couple of weeks  some merciful soul by some chance runs into my question and eventually helps me. You people call it support ?
    Gift horse shows no teeth - ok, I guess I should be silent and leave the forum without complicating - But if everyone stay silent - what happens? I have not got 5 or 10 years to spend learning coffee or develope a plugin. Maxon should do something about it - a decent manual and step by step tutorials for beginners. I don't mind attending courses and paying for them. I've never been afraid of learning. I don't know - there're excellent manuals for Cinema, Bodypaint - I learned almost everything I needed to begin with serious work from them. How can not Maxon  executives understand that people are not born with the knowledge of coffee. If they did something about it - I'm sure many amongst ordinary users would start writing plugins - many of them for free and the situation would not be what it is now - there are few plugins (compared with for example Max), most of them are useless and the rest (a little bit less useless) have to be bought...
    Ok, I guess I'm in the wrong forum then ("The support team cannot help you learn C++ or C.O.F.F.E.E.." - if I knew coffee I surely wouldn't be here making fool of myself, asking stupid questions and being treated as a bad little boy and receiving lessons about my attitude instead of help).
    So my (probably last) question in this forum is:
    Is there another forum - for people who were not born with the knowledge of coffee but are actually trying to learn it from zero  ?
    Of course - I learned my lesson well and I don't expect to get the answer before Christmass. :-)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/10/2003 at 13:00, xxxxxxxx wrote:

    I have lots of patience. It is my sincere hope that you will have too. As for your questions:
    1. Any file recognized. (Wouldn't it be easier to test? I did, using this simple plugin:

        
        
        class MyMenuPlugin : MenuPlugin  
        {  
        public:  
          MyMenuPlugin();  
            
          GetID();  
          GetName();  
          GetHelp();  
          Execute(doc);  
        }
        
        
        
        
        MyMenuPlugin::MyMenuPlugin()  
        {  
          super();  
        }
        
        
        
        
        MyMenuPlugin::GetID()  
        {  
          return 1000001;  
        }
        
        
        
        
        MyMenuPlugin::GetName()  
        {  
          return "File test";  
        }
        
        
        
        
        MyMenuPlugin::GetHelp()  
        {  
          return "Demonstrates LoadDocument()";  
        }
        
        
        
        
        MyMenuPlugin::Execute(doc)  
        {  
          var fn = new(Filename);  
          fn->FileSelect("Select an obj file:", FALSE);  
          LoadDocument(fn);  
        }
        
        
        
        
          
        main()  
        {  
          Register(MyMenuPlugin);  
        }
    

    )
    2. See above. I didn't have any obj files handy, but at least it worked on a dxf file.
    3. I don't know. Perhaps there's an open source one somewhere. But that shouldn't be needed if C4D recognizes the particular obj file already.
    4. C.O.F.F.E.E. shares the Java/C++ scope model, so functions cannot automatically access variables from other functions. You'll have to create a member variable in your dialog and set it:

        
        
        class MyDialog  
        public:  
          var doc;  
          ...  
        };
        
        
        
        
        MyDialog::Command(...)   
        {  
          ...  
          doc->FindObject(...); // Will work  
        }  
          
        function(doc)   
        {  
          ...  
          var d = new(MyDialog);  
          d->doc = doc;  
          ...  
        }
    

    I hope this helped!



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 31/10/2003 at 03:09, xxxxxxxx wrote:

    Mikael thank you very much again.  Exactly the information I was missing!
    Hope that one day my knowledge of coffee will be adequate to help others as well, in this forum and elsewhere.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 31/10/2003 at 04:23, xxxxxxxx wrote:

    Sorry Daniel, it just seemed the last two posts I read from you were complaints that nobody was replying/helping, but you seemed to give very little time to anyone to do so, plus, I'm not sure that many of the people using this forum (that are experienced enough to help) are using coffee much, many of the old coffee guys are now working with C++, coffee is a fairly good step to it, since they're very similar to begin with!
    As for me, I'm not on the support team at all, I'm just a freelance programmer that does the odd project for MAXON ;-) if I can post a quick answer I will do when I think I can help, but I don't know coffee at all (barely used it), so all coffee posts I usually ignore.
    Also, don't forget, not everyone may know an answer, it is also possible a question goes unanswered simply because nobody knows.
    I understand completely how bad it can be waiting, especially when deadlines are pressuring to be met, I also know how demanding sdk support can be since I used to do that too (last year). This forum isn't the only support place :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 31/10/2003 at 05:10, xxxxxxxx wrote:

    David - no need to appologize. It's me who overreacted, obviously. I got the impression that no one wanted to answer, because the questions were too basic and I was a completely new and unknown face in the Forum. I'll be more careful from now on - and much more patient...


Log in to reply