OpenPype icon indicating copy to clipboard operation
OpenPype copied to clipboard

Feature/cinema4d integration

Open ninglesby opened this issue 3 years ago • 5 comments

Brief description

Beginning work on a Cinema4D integration for OpenPype

Description

  • Added Cinema4D to the Launcher
  • Added .c4d as a file extensions associated with Cinema4D
  • Created a base Cinema4D Host
  • Created methods for creating selection sets in C4D with imprinted data
  • Created a Camera creator plugin
  • Created a Camera (Alembic) exporter plugin
  • Created a Workfile publish plugin
  • Created Set Frame range function for workfile settings
  • Created Set resolution function for workfile settings

Additional info

This is still very much a WIP. I haven't dived to deeply into figuring out if this is allowed for licensing reasons, but I am including a python3.dll because pyside is expecting that dll and it is not shipped with C4D so including that is the only way I found to get OP gui to work with C4D.

Feature Request

Documentation (add "type: documentation" label)

No documentation yet.

Testing notes:

This was built with r26, and they just changed their versioning scheme to the year so I think technically cinema4d 2023 is a minor update to r26. It should be backward compatible to r23 but I haven't fully tested that.

ninglesby avatar Sep 12 '22 23:09 ninglesby

That is really impressive! What I would suggest is that you'll move the creator/publishing logic to the new infrastructure we call .... the new publisher! :) I can help you with that as I am now finishing Houdini transition to that. It can probably help you with a few things (and complicate few more) but it is worth it.

antirotor avatar Sep 13 '22 08:09 antirotor

@antirotor Is there a good spot to see an example of what that should look like?

ninglesby avatar Sep 13 '22 10:09 ninglesby

Is there a good spot to see an example of what that should look like?

This is the Houdini PR: #3046 Which is a good reference for the changes involved. Here's a similar but older one for After Effects: #2838

And according to this PR #2896 that added documentation for the New Publisher this is the related documentation page:

  • https://openpype.io/docs/dev_publishing

BigRoy avatar Sep 13 '22 11:09 BigRoy

Exactly as @BigRoy listed. In the Houdini integration there is this part of code:

https://github.com/pypeclub/OpenPype/blob/9b32b4926ce8eb3356c9aea899acf05b0fe77ece/openpype/hosts/houdini/api/plugin.py#L95-L182

defining common "new" Creator. Of note there is collect_instances() that should pick up any created instances from the current scene - in this particular case it looks for the nodes with attribute id containing specific signature string - but that can reflect the logic of the host that suits it more. For example in Maya, it would go over the sets and look for such attribute there or you can use completely different logic how to store instance data. We think it is better to use general stuff available to you as opposed to for example some custom types, because that might breakt the scene if you open in in "vanilla" DCC. You can still work with the scene files coming from OpenPype Maya in vanilla Maya because there is no custom magic.

get_pre_create_attr_defs() defines options on the creator, in Houdini case there is the "use selection" option that is used during the creation, but there might be creators where this option isn't needed so that creator can override this to fit it's needs.

Everything is written in the documentation BigRoy mentioned but if you have any questions, we are here for you.

antirotor avatar Sep 13 '22 12:09 antirotor

Thanks! I am going to dig into this and let you know if I hit any roadblocks.

ninglesby avatar Sep 13 '22 12:09 ninglesby

@ninglesby Any chance we can see some activity on this again? Would love to see this moving into the community. Let us know where we can help out.

BigRoy avatar Dec 22 '22 11:12 BigRoy

Hey @ninglesby friendly ping about this PR, are you able to dedicate time to it?

Minkiu avatar Sep 20 '23 09:09 Minkiu

@Minkiu If there's big interest on this I can try and spend some spare time on this - that is, if there are testers available. ;)

BigRoy avatar Sep 20 '23 11:09 BigRoy

I'm afraid we might need to close this stale PR. cinema4d would be great, but the demand is really minimal and @ninglesby seems quiet for a while. Better to put efforts into C4D for AYON if it comes to it.

mkolar avatar Jan 25 '24 22:01 mkolar