Add listener which set off a script only when spline changed using coffeescript node

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  02 February 2014
Question Add listener which set off a script only when spline changed using coffeescript node

Is it possible to set off function whenever user changes spline on a xpresso setup using CoffeeScript ?

(I have a Xpresso Setup, working fine, but everytime user make change it is trying to calculate same data, so after a while it expands memory and getting slower. This is a script which spline axis, position...So I need to create a function and put this script inside this function, but what I need to learn is, adding a listener which runs only when user changes spline. I have variablechanged, I don't know if it's related with that, I am a newbie on coffeescript)

Any help would be greatly appreciated. Thank you, have a nice day,
Best Regards...
 
  02 February 2014
Originally Posted by grasycho: Is it possible to set off function whenever user changes spline on a xpresso setup using CoffeeScript ?


No.

As I tried to describe in the other thread, XPresso and its nodes are evaluated constantly. There is no way around that. There is also no way of accessing the messaging system or the plugin methods from a COFFEE node. COFFEE itself may contain related functionality in its API, but XPresso is simply the wrong place for what you are trying to do, and will not allow this functionality to be called, or simply crash.

What you need is a plugin. This plugin then offers methods to listen to the C4D internal messaging system. I guess you may catch the "object changed" methods through that (I haven't tried something like this yet), and if the changed object is your spline, then you can trigger the desired functionality.

I would even recommend that you forget COFFEE and start working in Python or even better in C++.
 
  02 February 2014
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:16 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.