Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    MCOMMAND_MAKEEDITABLE crashes

    Scheduled Pinned Locked Moved SDK Help
    12 Posts 0 Posters 1.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

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

      On 10/10/2008 at 05:20, xxxxxxxx wrote:

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

      ---------
         Hello,

      I'm very new to COFFEE, but have a pretty good knowledge of Flash actionscript.

      I'm just testing the MAKEEDITABLE command, but whenever I run it, C4D crashes every time.

      I'm attaching a COFFEE tag to a default sphere primitive. This is the code:

      > <code>
      > main(doc,op)
      > {
      >
      > var bc = new(BaseContainer);
      > SendModelingCommand(MCOMMAND_MAKEEDITABLE, doc, op, bc, MODIFY_ALL);
      >
      > }
      > </code>

      What am I doing wrong?

      Big thanks to anyone who can help

      Jon

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

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

        On 10/10/2008 at 05:35, xxxxxxxx wrote:

        I can only guess that using a ModellingCommand in a Tag will
        fill up any memory pretty fast as it is calculated for each new frame/action.

        Try it in the ScriptManager or make a MenuPlugin of instead and it shoud work.

        Cheers
        Lennart

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

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

          On 10/10/2008 at 05:45, xxxxxxxx wrote:

          Thanks for the quick reply Lennart.

          I'd be surprised, if this is the case though. I've got 3GB of RAM, I just have one default sphere which I'm applying it too, plus it crashes when the command is triggered the first time (i.e. just when I press 'execute' - I'm not running the playhead).

          This would be very disappointing too, as I was hoping to do some cool COFFEE powered animations, but if you can't do modeling commands on the fly, that sucks.

          Cheers

          Jon

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

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

            On 10/10/2008 at 06:01, xxxxxxxx wrote:

            Try to put the coffee tag on a null object and the sphere as a child of the null.

            Then try to modify it. It´s not very clever to directly modify the scene object that your coffee tag is attached to! 😉

            Also it may be possible that you need to use a copy of the document instead, but the former should work.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

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

              On 10/10/2008 at 06:24, xxxxxxxx wrote:

              Hey Katachi,

              are you saying I'm stupid?

              You're probably right!

              Now that you mention it, it makes sense not to have the Tag on a manipulated object and use a Null instead - so that's what I've done, and it works! Thank you Katachi for the quick, informed reply.

              So for anyone as dumb as me 😉 here's the code (applied to an inactive Null) :

              > \> main(doc,op) \> { \>      var obj=doc->FindObject("Sphere"); \>      var bc = new(BaseContainer); \>      SendModelingCommand(MCOMMAND_MAKEeditable, doc, obj, bc, MODIFY_ALL); \> } \>

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

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

                On 10/10/2008 at 06:34, xxxxxxxx wrote:

                lol, I would never call anybody stupid except myself! 🙂

                Glad it worked out for you.

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

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

                  On 13/10/2008 at 07:47, xxxxxxxx wrote:

                  Actually I would discourage anyone from modifying object/scene structures with a COFFEE tag. It's not really safe to add something to a scene's hierachy with a COFFEE tag for instance. For these things you should consider to use scripts or command plugins.

                  cheers,
                  Matthoas

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    Helper
                    last edited by

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

                    On 13/10/2008 at 08:04, xxxxxxxx wrote:

                    Hi Matthias,

                    Thanks for your reply.

                    So I'd be best applying a script via the script manager?

                    I've never used this before, but just tried after reading your response. My initial findings with the script manager are that it seems a script is only instigated via manually executing it, and also variable values don't appear to be retained upon subsequent execution. Is this correct?

                    My experimentation here is with animation, so if my findings above are correct, then a COFFEE tag seems to be the only way to go i.e. use a COFFEE tag, and play through the timeline. I haven't had any problems with this (except for my issue mentioned above) - but you're saying I'd be likely to discover some instability if I attempt anything too heavy?

                    Thanks!

                    Jon

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      Helper
                      last edited by

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

                      On 13/10/2008 at 08:22, xxxxxxxx wrote:

                      Hi Jon, maybe you can tell me a bit about what you are trying to do with the expression.

                      There are some things you shouldn't do in COFFEE expression tag. One of them is adding objects to a document. Another one is accessing files. For subsequent/continous generative purposes currently the only safe way is to write generator plugins in C++.

                      cheers,
                      Matthias

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        Helper
                        last edited by

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

                        On 13/10/2008 at 08:35, xxxxxxxx wrote:

                        Hi Matthias,

                        my interest is to just experiment and produce some lovely scripted animations and see where it takes me. My first script creates about 3000(!) cubes randomly, and they are eased into place to form letters. All this on a COFFEE tag. I've rendered out the animation fine, no problems. Pretty basic at the moment but I wanted to take it further, integrating some dynamics into the equation and then who knows!

                        From your response, I gather my expectations are too high for COFFEE? As I say, it's been fine so far, but I'm now frightened I'll soon be hit with problems if I push COFFEE much further. Should I abandon COFFEE then? Generator C++ plug-ins sounds a little scary!

                        Thanks

                        Jon

                        1 Reply Last reply Reply Quote 0
                        • H Offline
                          Helper
                          last edited by

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

                          On 20/10/2008 at 08:05, xxxxxxxx wrote:

                          As I said, creating objects through a COFFEE expression tag is not safe. A safe way to create objects is to use Thinking Particles. You can control the particle creation with a COFFEE Xpresso node for instance.

                          cheers,
                          Matthias

                          1 Reply Last reply Reply Quote 0
                          • H Offline
                            Helper
                            last edited by

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

                            On 20/10/2008 at 08:08, xxxxxxxx wrote:

                            Thanks Matthias, I'll investigate.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post