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

    Crashing duplicate script

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 318 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 27/01/2009 at 14:26, xxxxxxxx wrote:

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

      ---------
      Hi there!

      I've tried to write my first coffee script. I had a tutorial of Arndt von Koenigsmarck and modified it for my own purpose. But there must be a error, cause it crashes Cinema after activation.

      Here is the script I wrote:

      > main() \> { \>    if (!instanceof(op, PolygonObject)) return false; \>     \>    if(an) \>    { \>       var init_step, count; \>       init_step = hoehe/anzahl; \>       count = anzahl - 1; \>        \>       var data = new(BaseContainer); \>       data->SetData(MDATA_DUPLICATE_COPIES, count); \>       data->SetData(MDATA_DUPLICATE_INSTANCES, true); \>       data->SetData(MDATA_ARRANGE_MODE, 1); \>       data->SetData(MDATA_ARRANGE_LINEAR_PERSTEP,true); \>       data->SetData(MDATA_ARRANGE_LINEAR_USE_MOVE,true); \>       data->SetData(MDATA_ARRANGE_LINEAR_USE_MOVE_Y, true); \>       data->SetData(MDATA_ARRANGE_LINEAR_MOVE, vector(0,init_step,0)); \> \>       SendModelingCommand(ID_MODELING_DUPLICATE_TOOL, NULL,op,data,MODIFY_ALL); \> \>       op->Message(MSG_UPDATE); \>    } \>    set = false; \> }

      The script is entered in a coffee-node which is connected with xpresso-nodes on both sides for the user-datas.

      Any ideas why it crashes Cinema everytime?

      Thank you for your help.

      Best regards,
      skone

      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 27/01/2009 at 17:03, xxxxxxxx wrote:

        I am not 100%, but I think Coffee nodes are now allowed to alter the scene. Why don't you make a command plugin from your code?

        Greetings,
        Jack

        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 28/01/2009 at 00:12, xxxxxxxx wrote:

          Hi Jack,

          a command plugin is exactly what?
          Is it something like the one you describes in your wiki?

          I think I have to read the section about the different types of plugins first. ;]

          I'll inform you about my success - hopefully. :]

          Till next time,
          Skone

          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 28/01/2009 at 00:27, xxxxxxxx wrote:

            It is not allowed to alter the scene's structure (allocations, insertions, removing etc.) from within an expression. I am not what you want to to achieve but a script may be sufficient.

            cheers,
            Matthias

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