XRef Python command?

On 16/07/2014 at 19:09, xxxxxxxx wrote:

Anybody know the Python command to XRef a given file?  I can't turn up anything on a google search, using the search on the Python SDK page doesn't give any meaningful results, and going through all of the main topics on that page and doing a search over the page for "xref" doesn't return anything.  Anybody know the python command for this?

On 16/07/2014 at 19:12, xxxxxxxx wrote:

This is the only thing I could find that even had "xref" on the page, but that command doesn't seem right...

http://code.vonc.fr/c4d/python/help/modules/c4d/C4DAtom/GeListNode/index.html?highlight=xref

On 17/07/2014 at 08:06, xxxxxxxx wrote:

This creates an empty Xref object in the OM
c4d.CallCommand(1025766)

These are the Xref menu ID#s found in: C:\Program Files\MAXON\Your_C4D_version\resource\res\menus\c4d_m_editor.res
Put the numbers in a CallCommand to execute them.

Example: c4d.CallCommand(1025763)

SUBMENU IDS_MENU_XREF
  {
    PLUGIN_CMD_1025763;
    SEPARATOR;
    PLUGIN_CMD_1025766;     
    PLUGIN_CMD_1025776;
    PLUGIN_CMD_1025773;
    PLUGIN_CMD_200000162;
    PLUGIN_CMD_200000163;
  }

-ScottA

On 17/07/2014 at 15:39, xxxxxxxx wrote:

So XRef is a plugin, not a native C4D command??

On 17/07/2014 at 16:48, xxxxxxxx wrote:

Practically everything in C4D is a plugin.
When Maxon adds new things it's usually done with a plugin.
If you use the FindPlugin() function you can see them all. It's a pretty long list of plugins.

All a command really does is execute the proper plugin.

-ScottA

On 17/07/2014 at 18:46, xxxxxxxx wrote:

Hrm, any idea of how to actually get to the commands being used by the plugin, or where those scripts are at?  If I just give CallCommand the plugin ID, it just opens up the dialog, which is what I was trying to avoid.  Same thing with Save Selected Objects As.  I was thinking that it would just be similar to a normal file save command, where you just pass it the filename, but no dice.

On 17/07/2014 at 19:03, xxxxxxxx wrote:

The IDs for it are here:
C:\Program Files\MAXON\YOUR_C4D_VERSION\resource\modules\ca\res\description\dxrefmanager.h
C:\Program Files\MAXON\YOUR_C4D_VERSION\resource\modules\ca\res\description\oxrefholder.h
C:\Program Files\MAXON\YOUR_C4D_VERSION\resource\modules\ca\res\description\oxref.h

I personally never use xrefs.
So I don't really know how much that can be done with them.

-ScottA

On 18/07/2014 at 12:01, xxxxxxxx wrote:

Hmmm, it looks like the code for the XRef plugin is in :

C:\Program Files\MAXON\CINEMA 4D R15\resource\modules\ca\characteranim.cdl64

Which seems to be an encrypted file, so you can't see what the actual XRef commands are.  😞

And I'm assuming the "Save Selected Object As" is set up the same way.  This makes me a sad panda.