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

    monitoring GoTo Start into script

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 310 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 15/02/2011 at 14:14, xxxxxxxx wrote:

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

      ---------
      language c.o.f.f.e.e
      Hi,
      I would need to "monitor/get the info from" the  Goto Start command (CallCommand(12501)  into my script.
      I need to made an action (SetSelection) when going back to frame 0.
      Is this possible?
      Thanks a lot,
      Jean

      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 16/02/2011 at 01:45, xxxxxxxx wrote:

        The only way to do this in COFFEE is by writing an ExpressionPluginTag plugin. The tag will be called if you step through the frames. You can then check at which frame you are and react accordingly. There are some limitations to tags though. File access and scene structure modifications are forbidden 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 16/02/2011 at 10:06, xxxxxxxx wrote:

          Thanks a lot 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 17/02/2011 at 00:01, xxxxxxxx wrote:

            Hmm I am not sure what your problem exactly is.
            Like Matthias said, a way to "leave a skript in the scene" is an ExpressionTagPlugin.
            But you could also use a NonModalDialog.

            To check for the frame:

              
            var time = doc->GetTime();  
            var frame = time->GetFrame(doc->GetFps());  
              
            if(frame == 0) {  
              //Do stuff since frame 0 is active  
            }  
            

            If you only want it being executed *once* in frame 0, you have to use a second variable.

              
            var time = doc->GetTime();  
            var frame = time->GetFrame(doc->GetFps());  
            var executed;  
            if(!executed || frame != 0) { executed = false; }  
              
            if(frame == 0 && executed != true) {  
              //Do stuff since frame 0 is active  
            }  
            

            Cheers, nux

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