coffee commands inside of Python

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 04/09/2011 at 18:49, xxxxxxxx wrote:

Is there any way to run simple Coffee commands from within Python. I ask because i already have a working Python script but would like to add these simple commands as well...

a) delete unused materials/textures
b) delete unused layers
c) Launch the Python console window.

This is very easy in coffee, as there is a script listener ala maya mel. there is no such thing for python.

I suspect the answer is no and you will refer me to the documentation, however i have searched there and I cant see where i can run these commands...

Thank you.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 05/09/2011 at 02:26, xxxxxxxx wrote:

Hi, Coffee Plugins and Coffee Scripts have an ID so you can use c4d,CallCommand(id) to execute them. Just open the command manager, search your coffee plugin/script and pass the ID of them to the function. Cheers, Sebastian

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 05/09/2011 at 02:28, xxxxxxxx wrote:

Those CallCommand ID's are the same all over.
So you can run the Script Log to get the ID's and
use them in Py adding c4d. before them.

I.e:

  
c4d.CallCommand(100004760) # Remove Unused Layers   

Cheers
Lennart

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 05/09/2011 at 03:19, xxxxxxxx wrote:

Thanks so much guys. Exactly what i was after. :slightly_smiling_face: