coffee help
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2006 at 13:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.6
Platform:
Language(s) : C.O.F.F.E.E ;---------
Hi. Forgive me as I am completely new to any type of coding. However I am trying to write some coffee scripts for 9.6. My question is, is there a mathematical operator for "not equal to"?for example in the following line of code I would like
if (tool->GetType() not equal 1016202)
I'm not sure if there is a mathematical expression for "not equal". Can someone advise? Thanks so much
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2006 at 13:56, xxxxxxxx wrote:
Same as C/C++/Java: !=
as is:
if (tool->GetType() != 1016202)
Don't forget that there is a difference between the 'equals' operators:
= is for assignment: var x = 10;
== is for conditional comparison: if (x == 10)Lot of beginners get caught out by that one!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2006 at 14:44, xxxxxxxx wrote:
Thanks so much for your help!!
By the way, don't know anything about C/C++/Java. This is my first coding experience ever.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2006 at 15:31, xxxxxxxx wrote:
Study the COFFEE documentation (esp. the "Introduction", "The C.O.F.F.E.E. Language", and "Tutorials"). I'd also suggest getting some sort of C++ or Java 'Reference' book. This will give you a general idea of the syntax and how various operators/statements work in C++/Java - which work similarly in COFFEE to a good extent.
Look at the examples in the documentation (there are usually links to code or embedded code in these at the bottom of various Reference sections).
You can download the R9.5 COFFEE Windows Documentation here.
If you are on a Mac, you will have to live with HTML Documentation from here
Good luck in your learning and coding!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2006 at 20:01, xxxxxxxx wrote:
thanks for all your generosity. SO far, I'm getting a big headache doing this. But I've made some progress.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2006 at 20:43, xxxxxxxx wrote:
One more question. Writing a script
I have an arbitray tool chosen and active. I run the following script
CallCommand X
(do this)
CallCommand Y
(do this)
CallCommand Z
(do this)THe way the above script is written, after the script is run, tool Z will be the active tool. However I want the original tool to remain the active tool.
How would I get the script to return back to the original tool that was active?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/10/2006 at 02:56, xxxxxxxx wrote:
You could do something like this:
var old_tool = doc->GetActiveTool()->GetType(); CallCommand(CommandX); CallCommand(CommandY); CallCommand(CommandZ); CallCommand(old_tool);
This stores the Command ID in the variable old_tool, then calls your CommandX,Y,Z and then calls the old tool again.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/11/2006 at 17:51, xxxxxxxx wrote:
Thanks so much for your help. Got it figured out.