PDA

View Full Version : A Prototype Plugin for "Instant COFFEE"


H. Ikeda
03-02-2003, 09:54 AM
Hi all,

This is a plugin not for practical use but for a conceptual one explaining what the words "Instant COFFEE" mean, i.e., what we could have or what we should have for a new script system.

Instant COFFEE stands for a COFFEE-like script in which object-oriented scheme has been removed and scripting has been extensively simplified. For example, if you need a light object at the position (100, 200, 300), just write 'insert Light 100 200 300'.

I think development of a new script scheme should be maxon's business since a plugin cannot monitor all kinds of commands given in c4d. So this plugin cannot record operations in c4d document, while it can record its own commands input into a text field.

Now what I meant may be clear. This plugin is just an example of what we could expect for a new script system. Its commands are limited and record can be done only with files now.

But one of the powerful features of this (did you hear the similar words elsewhere?) is that it can repeat operations with variables. For instance, for(i=0;i<10) insert Light 0 100*i 0 creates an array of ten Light objects aligning along the y axis.

InstantC.zip(28K, R8) (http://www.interq.or.jp/aquarius/ikeda3dr/data/cgtalk/InstantC.zip)

Thank you,
and enjoy.:)

Katachi
03-02-2003, 12:40 PM
Great idea Hiroshi! :thumbsup: Keep it up!

michaeli
03-02-2003, 01:10 PM
Great!:thumbsup:

flingster
03-02-2003, 03:38 PM
sounds user friendly to me. which is never a bad thing....
developers always seem to have problems implementing things like this...not sure why though...sounds functional in principle and useable.

are you going for simpicity here? are you saying maxon should take the lead in developing something like this? surely xpresso was supposed to fulfil this role? or am i just completely missing the point....how do programs like houdini handle scripting?

would be cool to say
insert, cube, 100,200,300 rotate 720deg at f25-50
move 100,200,500 at f51-100
explode!!! then variables on this function say random patterns...build your own fireworks....
like the concept....whats with the dialog box and html files are these to give to maxon....or are you saying you want to develop this?:thumbsup:

wuensch
03-03-2003, 08:20 AM
as it is easierto get into then coffee with a more natural language (like Macromedia Directors older Lingo) is a pain for programmers with more routine as it is harder to browse throug text and you have to write more code.(The reason why Macromedia strated changing Lingo)
IMHO Maxons way to create Expresso is *much* more userfriendly for the non-programmers since it is not necessary to learn any vocabulyry or grammar for it.
I think it is too late for a simpler Coffee, sorry to say.
I am not even using it any more (and I have a little programming knowledge)and prefer Xpresso.
Olli

H. Ikeda
03-03-2003, 01:21 PM
Designer, michaeli: Thanks a lot. I'll improve this plugin.:beer:
Originally posted by Olli Wuensch
IMHO Maxons way to create Expresso is *much* more userfriendly for the non-programmers since it is not necessary to learn any vocabulyry or grammar for it.
I think it is too late for a simpler Coffee, sorry to say.
I am not even using it any more (and I have a little programming knowledge)and prefer Xpresso.
Originally posted by flingster
are you going for simpicity here? are you saying maxon should take the lead in developing something like this? surely xpresso was supposed to fulfil this role? or am i just completely missing the point....how do programs like houdini handle scripting?
Yes, for simplicity and easy to use. The reason why I said maxon should lead is that a real script system (and its recording function) must include also usual c4d commands through the menu or the icons, which is almost impossible using just a plugin. And, XPresso is a relation among given objects, but scripts can generate objects themselves. They are different.

What is clear about Instant COFFEE is that it uses single-line commands and separation is done with 'space'. So write insert Cube and then press Execute button, and write setpos Cube 100 100 100 and press Execute button. A Cube will be created at the origin and it will move to (100, 100, 100).

The remove command in Instant COFFEE mimics Remove() function of C.O.F.F.E.E., and setpos simulates SetPosition() function. So you could easily step up your scripting to more complicated C.O.F.F.E.E., ...possibly. But if you satisfy 'Instant' things, you'd need not use C.O.F.F.E.E.

For example, if set name command is added, we can rename object names such as
for(i=0;i<10) set name name1 name@i
this will generate object names like name0, name1, ...,name9 instantly.

But concept of Instant COFFEE may not be very clear now.
So if you all suggest what is useful for Instant COFFEE's commands, this plugin may become a little useful tool (of course, maybe), even if maxon will develope a more powerful script system in the future.

Cheers, :)

wuensch
03-03-2003, 02:43 PM
--ok, I was a little fast in judging---
you are right, of course, that expresso is limited (although very simple to use) and i see the advantage of the simpler coffee syntax .
A recording function--yes, that would be nice.
What i am missing a lot is a "Zero out" function, one that sets HBP of the Axis of all Objects in a hierarchy to 0/0/0 and the Axis scale to 1/1/1.
I need to do that to make export to Lifeforms all the time and i could not find out how to do it in Coffee (for lack of time and the very rudimentary documentation).

Hmm---
Olli ;-)

rui_mac
03-03-2003, 04:20 PM
I like it a lot.
But I would refrain from using a mix of "user-friendly" commands and other that are real commands from high/middle level languages.
For instance, instead of:

for(i=0;i<10;i++)

we should have:

loop i 1 to 10

I mean, getting back to something more basic than BASIC ;-)

Rui Batita

H. Ikeda
03-04-2003, 01:25 PM
Olli: Thanks for the suggestion. I think it's a good example of the advantage. Instead of setting three 0s and push Apply button in the coordinate manager, you only input setpos and push Execute (in the case if no [object name] specified, it is applied to the first selected. But this is not the case now. I'll modify it soon.)
Also, it's much better if we could execute multiple commands such as sequence of select and setpos, like a dope sheet. This is also what I'm now thinking about.

rui_mac: Thanks for the comment. I think flexible syntax may be possible. That is, you could choose for(i=0;i<5) or loop i=1 to 5 for iteration. It's possible.
Since iteration is an important tool in Instant COFFEE to help your tedious task, some flexibility will be helpful.

Cheers,:)

H. Ikeda
03-09-2003, 09:34 AM
Ok, everybody, here is a new version of Instant COFFEE (ver. 0.6).

InstantC0.6e.zip(38KB, R8) (http://www.interq.or.jp/aquarius/ikeda3dr/data/cgtalk/InstantC0.6e.zip)

where commands are arranged to be only basic and useful. But sorry for no alternative syntax for iteration, this may be implemented in the future.
Also, this can read a saved file and execute a set of commands. In the files folder, you could find sample files for this purpose. Of course, this plugin can also read a file saved by yourself.

As a bonus command, the search command has been added. This is a special case of select command, where a folded hierarchy is automatically unfolded in the Object manager while selecting the object you now wish to search out, as shown below.

http://www.interq.or.jp/aquarius/ikeda3dr/data/C4DUser.com/search.jpg

Have fun,;)
and let's discuss!:beer:

H. Ikeda
03-12-2003, 12:53 PM
not interesting?:shrug: or, no problem?:)

flingster
03-12-2003, 02:58 PM
isn't there a coffee node now in 8.1 which you could also use. i know its not the simplicity part but just to make people aware.

i like the search command..sounds ok to me.
no problem...:thumbsup:

H. Ikeda
03-16-2003, 11:44 AM
Sure, now XPresso has a COFFEE node and we could use COFFEE expressions somewhat easily.
But this doesn't mean writing COFFEE itself becomes easier, and so the situation doesn't seem to change greatly.

Anyway, this may be a regular update? Here is version 0.7 of Instant COFFEE.

InstantC0.7e.zip(54KB, R8) (http://www.interq.or.jp/aquarius/ikeda3dr/data/cgtalk/InstantC0.7e.zip)

In this version, there is a system of registering sequences of commands, and you could reuse them anytime, as shown below.

http://www.interq.or.jp/aquarius/ikeda3dr/data/cgtalk/Instant07.jpg

Further, an alternative command for iteration like

loop i 1 to 5

has been added. And also this has a new 'convert selection' command, convsel, but edge selection is not yet implemented, so it's not so useful now.

Anyway, have fun.
Again suggestions will be appreciated. :)

michaeli
03-16-2003, 12:22 PM
I like this cool idea, and I think the future will be clear and better for this plugin if Maxon join in the development .

flingster
03-16-2003, 05:24 PM
did you try approaching maxon H. Ikeda?

i was wondering whether they had any thoughts...i like the concept and it would fit with the whole creatives and not programmers theme of xpresso etc. making the two very useful and ultimately more accessible toolset for users.

if you didn't approach maxon, any reason why not? don't really understand why others have not had much input on this....also did you think about posting this on post forum is not already or maybe creative cow...as you maybe aware user levels vary from forum to forum and i might be worth getting input on a broader spectrum....because essentially it a very nice idea.:thumbsup:

H. Ikeda
03-17-2003, 12:55 PM
michaeli, flingster: Thanks a lot for the suggestions.

Well, as for approaching maxon, not yet because the concept has not been clear and I guessed maxon may be thinking about another method (that is, not as a plugin) if any plan.
Posting in other forums might be good idea, thanks flingster, and I'll do that soon. I don't have enough time to post in several forums, but I could reuse text in this forum if the content is almost the same.
Anyway, after the posting, I'll thinking about approaching maxon.

Thank you,:)

CGTalk Moderation
01-14-2006, 01:00 PM
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.