CGTalk > Software > Maxon Cinema 4D
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 02-24-2014, 11:45 AM   #1
Join Date: Feb 2014
Posts: 45
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...
Old 02-25-2014, 12:42 AM   #2
Fur Stylist
Cairyn's Avatar
Robert Gruenweiss
Join Date: Dec 2005
Posts: 387
Originally Posted by grasycho
Is it possible to set off function whenever user changes spline on a xpresso setup using CoffeeScript ?


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++.
Old 02-25-2014, 12:42 AM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,479
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Society of Digital Artists

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

All times are GMT. The time now is 04:43 PM.

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