PDA

View Full Version : script for batch importing of files?


moka.studio
07-06-2007, 06:44 PM
Does anyone know of a script to batch import all files within a specific folder into c4d?

I am on PC btw, so Quickkeys would not work.

thanks,

Kuroyume0161
07-06-2007, 08:03 PM
Don't know of any offhand, but should be very easy with a simple COFFEE plugin - as long as the types of files you want to import are supported by Cinema 4D (any C4D or importable file).

What kind of files?

Robert

Ernest Burden
07-06-2007, 08:05 PM
THat's pretty much the same question I was asking here:
http://forums.cgsociety.org/showthread.php?t=511846

The Mac solution sounds great...excpet for us poor saps still cludging along on a PC.

Is this possible, maybe command-line?

Ernest Burden
07-06-2007, 08:08 PM
What kind of files?

In my case, nostly .3ds with a few .dxf and .lwo I would guess moka would be looking at something similar. Or, he might want to open a folder full of 3D files (.c4d or the others) into a single existing file.

Is the hard part the save and close? Because WinOS can force an open of selected files, I think it would work on more than one at a time.

I was looking to import/save thousands of files.

Kuroyume0161
07-06-2007, 08:10 PM
I hate to break it to ya, but there is a version of QuicKeys for Windows XP!

Link (http://www.cesoft.com/products/quickeys.html)

Maybe that is the way to go! :)

Robert

Ernest Burden
07-06-2007, 08:30 PM
I hate to break it to ya, but there is a version of QuicKeys for Windows XP!

OK, that look promising, 80 bucks, but promising. But this is not in the realm of Cinema4D directly?

Kuroyume0161
07-06-2007, 09:26 PM
Yeah, as with most (not all) Mac software, the price is a bit extravagant but if the other guy (in the other thread) could use it with Cinema 4D than the same should apply to Windows as well.

Personally, I think it might be better to use a C++ plugin as you can just LoadDocument() or MergeDocument() which should handle any file type that is importable as well (I think). The question arises here as to whether the load of files should be generalized (handle C4D documents, other types, images, audio, etc.) - that could get sticky. And also if loading files that will become part of a document, do you want separate documents or everything merged into a single document - if that is the desired end result (?).

More information on the end result is required. :)

Robert

Ernest Burden
07-06-2007, 10:00 PM
The question arises here as to whether the load of files should be generalized (handle C4D documents, other types, images, audio, etc.) - that could get sticky.

I'll let moka speak for themselves about what they were after, but all I want is:

open *.3ds, save a .c4d file by the same name, move on to next file until all files processed.

it could be any supported filetype, but I'll just be converting 3D formats.

I would prefer to simply use the Content Browser, but its not able to run in a stable way with random 3D files squeezed through all the tubes of the internets. Nor is any of the other 'thumbnail generator' programs I've tried. So if I convert to .c4d at least then I can catalog all my model files.

acmepixel
07-06-2007, 10:27 PM
Yeah, as with most (not all) Mac software, the price is a bit extravagant but if the other guy (in the other thread) could use it with Cinema 4D than the same should apply to Windows as well........

Robert


"other guy'' here, I was thinking, surely, there must be a number of choices for MACRO utilities on the PC side? Since Apple introduced Applescript, most of the Mac side Macro apps have disappeared. do a Cnet search for Macro or some such. Might even find a freebie or cheap shareware one.

With a Macro program (like QuicKeys) you can make any program do anything you want while you go and get yourself a cup of coffee, (or sleep). Including making a number of different programs work together on a batch process of your choosing.

It also (Quickeys) lets you assign keys and shortcuts to menu items that don't have a keyboard command or allow for one.

So if and until Maxon gives us more options with the Browser, Macros (or programming if you have the wherewith-all) are the only way to go for now.

moka.studio
07-07-2007, 10:26 AM
Ernest is right, I am also looking for something similar.

In our case, we are dealing with Rhino files, and going through MOi to export OBJ formats.

MOi is great at this, much better than Rhino, the only drawback being that it does not support layers, so you get all objects together.

We can save rhino layers as individual file through a script,
it would be nice to able to batch import all files at once into one C4d file as well.

Robert, how difficult would such a C+ script be to write?


edit> thanks for the link to the PC version of quickkeys,
there is a demo so I will give it a try. It is perhaps the best for what we are after, since we can also I hope, batch Moi commands as well.
thanks,

LucentDreams
07-07-2007, 10:01 PM
you do know you can drag multiple files from a folder onto cinema and it will open each individually.

moka.studio
07-08-2007, 09:38 AM
thanks for the tip Kai,

Ernest Burden
07-08-2007, 05:04 PM
you do know you can drag multiple files from a folder onto cinema and it will open each individually.

And save them? What about 5000 files? That's what I'm looking at.

But again, this is just to get around the Content Browser not working as I'd like.

stevester1
07-08-2007, 05:10 PM
Hate to hijack the thread, but it is somewhat on topic. Is there any plugin that imports a sequence of objects exported from another application (.obj or .lwo or .3ds)? If not, would it be hard to code if I have 0 coding exp.?

Kuroyume0161
07-08-2007, 05:51 PM
It wouldn't be too difficult for me but the question is - do I have the time? With my other plugin still receiving plenty of attention, not really much, no.

It would just require a little dialog for configuration - what types of files, where, and how they should be saved if that is the goal would be some good configuration options. Then start processing, show the progress, possibly create a log so that the user can see if anything failed, and away you go.

Robert

unseenthings
07-10-2007, 03:20 PM
In addition to dragging them from an explorer window like Kai mentioned, if you want them all in the same document (like it's a sequence), you can browse to the directory with the content browser and drag them from there, and they'll all come into the current document, rather than one to it's own new document. Both cases are handy at various points.

Neither really helps with mass file conversion, though. You can drag them into Cinema a group at a time and then use File->Save All, however. Still not very automated, though.

CGTalk Moderation
07-10-2007, 03:20 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.