Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. tdapper
    T
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 10
    • Best 0
    • Controversial 0
    • Groups 0

    tdapper

    @tdapper

    0
    Reputation
    54
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    tdapper Unfollow Follow

    Latest posts made by tdapper

    • RE: Registration code being run in After Effects

      Hi Ilia,

      You are assuming correctly, that with "not registered" refers to our licensing. I am struggling a little with figuring out what our correct behavior would be. Is Cineware a fully useably version of Cinema 4D? Would we perhaps want to have registered customers to be able to use their license in Cineware as well? What does this Cineware integration even look like? Are there examples? I have a hard time figuring out how it would even present itself to the user. Is there any guide on what it would look like and what the expected behavior is?

      Also to get the licensing to work, we use information from GetGeneralLicensingInformation(). Would the result from that function look similar (especially the machine id) or different? We are then creating a licensing hash and store that in the world settings. Would those settings be shared between Cineware and a regular Cinema 4D installation or would they be different?

      Thanks for your help!
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • Registration code being run in After Effects

      We have a customer here who installed one of our plugins successfully in Cinema 4D 2023, but now a dialog we bring up when the plugin is not registered also comes up in After Effects.

      I don't think this was a thing in previous versions or it hasn't come up before, but I guess the plugin in question maybe just shouldn't load in After Effects at all? What is the expected behavior in such cases and how would I detect them?

      Any help greatly appreciated!

      Best
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • RE: Set the Preview of an Asset using an Image file.

      Hi Maxime and Ferdinand,

      Thank you so much for the extensive answers. I am working with @till-niese on this project. First perhaps to clarify what we are trying to do:

      1. We realize that the asset library creates a thumbnail on its own. However, that thumbnail is, in our case, basically just black and useless and even if it weren't, we need a custom thumbnail to match a specific style that has been requested by our customer.
      2. Therefore we are basically trying to replicate the functionality you get when you right-click on the thumbnail in the Asset Browser and Click "Update Thumbnail from File...".
      3. The current version of our automated asset creation does set the thumbnail using maxon.ASSETMETADATA.ASSET_PREVIEWIMAGEURL and that works. However, the automated thumbnail creating is also running (as you pointed out, @ferdinand). So if we set out thumbnail before the automated thumbnail creation is finished, it will get overwritten with what the preview render job comes up with.
      4. We currently work around the problem of our manual thumbnails being overwritten, by adding a pretty ten seconds sleep. That works, but it slows our conversion process down significantly and is likely very brittle.
      5. What is not really a problem for us is when an updated thumbnail does not immediately show in the Asset Browser. It's totally fine if the Asset Browser after our conversion shows the wrong thumbnails, as long as they are all fine after a restart of Cinema 4D.

      Bottom line is that it's cool that the asset browser automatically creates thumbnails, but unfortunately those are useless for us because they are not to spec. What would be awesome:

      • Perhaps there is a way to just immediately kill the job that creates the thumbnail from being generated in the background or prevent that job from starting in the first place.
      • If that is not possible, maybe there is a message we could intercept to know the thumbnail has been updated so we can run our workaround right after the thumbnail creation job is finished instead of waiting a hardcoded amount of time.
      • Maybe there is another option that we're not clearly seeing right now?

      Thank you again for your help so far! Very much appreciated!

      Best
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • Creating my own color preferences

      Hi everyone,

      I'm trying to add my own color preferences and add them to the "Scheme Colors" section in the Cinema 4D preferences, similarly to what Hair does.

      To do so, I successfully add and register a PrefsDialogObject. I used a description similar to the Hair one in prefshaircolor.res/prefshaircolor.h and it displays fine. The implementation is based on an earlier thread from the forum (and a bit of prior experience): https://developers.maxon.net/forum/topic/11737/default-startup-settings/4

      It works pretty much fine, the preferences show up in the right place and I am able to control the colors in the list view the same way it works in all the other color preferences. I even added that "Reset..." button. The only problem is that the data in the ListViewData element does not appear to be restored properly when Cinema 4D starts up again. I tried other data types like Int32 and those are brought over into a new session just fine.

      When looking at the BaseContainer with my Plugins' settings I see that when I call BaseContainer::GetData() on it, the resulting GeData is of type DA_MISSINGPLUG, which to me looks like Cinema 4D is somehow not able to restore the data element from the preferences. It looks a little like that might be because the ListViewData custom datatype hasn't been registered when the preferences are restored?

      However, I am assuming that the regular Cinema 4D color scheme preferences somehow store their setting and when loading the Hair preferences via HairLibrary::GetPrefsInstance(), I see the container it returns contains elements of type CUSTOMDATA_LISTVIEW (1018397), so it somehow must be possible to store values of that type in the preferences.

      Did anybody run into similar problems before and can help me? I'm feel like I must be missing something trivial here.

      Thanks in advance for any help!

      Best
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • RE: Making geometry available for IPR rendering

      Hi @r_gigante!

      Thanks for the elaborate answer, there is a lot to chew on here. I was wondering if you also had an answer to my first question:

      @tdapper said in Making geometry available for IPR rendering:

      We actually have been thinking about offering a mechanism for rendering vendors to retrieve the full geometry, my observations just made me think that there might be a better way (meaning: a standard way that wouldn't have to be vendor specific). Anyway, the way we thought about it was to use the function publishing interface and implement a call on our object, similarly to what the Hair module does. What would be your reasoning to prefer using messages instead?

      Best
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • RE: Making geometry available for IPR rendering

      Hi Ricardo,

      Thanks for helping me out here. Couple followup questions:

      1. We actually have been thinking about offering a mechanism for rendering vendors to retrieve the full geometry, my observations just made me think that there might be a better way (meaning: a standard way that wouldn't have to be vendor specific). Anyway, the way we thought about it was to use the function publishing interface and implement a call on our object, similarly to what the Hair module does. What would be your reasoning to prefer using messages instead?
      2. Another approach we thought about was dropping the full geometry into the cache always, and allowing a different editor representation not by using the BUILDFLAGS::INTERNALRENDER/BUILDFLAGS::EXTERNALRENDER flags in GetVirtualObjects(), but by overwriting the Draw() method and just drawing different viewport geometry ourselves (e.g. by building one or more PolygonObject's and drawing them using ObjectData::DrawPolygonObject(). Do you have any thoughts on this? Will this come with a performance penalty, or is that basically what is done internally?

      Thanks for your awesome support, @r_gigante!

      Best
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • Making geometry available for IPR rendering

      Our plugins have two generator objects that both produce two vastly different representations for editor display and for rendering. We decide which one to create by the existence of BUILDFLAGS::INTERNALRENDER/BUILDFLAGS::EXTERNALRENDER. That produces problems with all sorts of IPR renderers, because they use the editor representation. However, I noticed, that this is being solved somehow. For example, when using Multi-Instances and setting them to display boxes in the viewport, most IPR renderers (I tried Arnold and heard it works in Redshift as well) do show the render geometry. Same appears to work happen (at least in Arnold) with the Subdiv object. The editor shows the editor detail, in the IPR I get the render subdivision.

      I am not sure how this happens (or whether both of the above cases use the same mechanism), but I would like to figure out how this works, so we can do the same.

      I am aware, that we could just create both, editor and render geometry always and just set the visibility flags in the cache. However, at least with one of our objects that would be less than ideal, because generating the full detail representation also takes a bit.

      Hope someone can help, ideally with some insight on how the two examples, I described above, work.

      Best
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • Is it still not possible to create Xrefs from Python?

      I'm trying to create an Xref object from within Python, but somehow cannot set certain parameters (like the Reference and Proxy Reference). Is there a way to add an Xref to a scene using Python?
      A similar thread from the legacy forum seems to indicate it is not possible, but then that was years ago, so I hope this may be possible now.

      Best
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • RE: Custom Errors

      Hi @r_gigante!

      Looking at this thread, it looks like the only way for me to register and use my own error types, requires me to put them into a separate framework, instead of just defining them as part of my project, as well as actually copying them into the SDK folder. Is it only me or is this mindblowingly clumsy and tedious? Or am I just getting this wrong? This makes the Cinema 4D error handling system so much harder to use and embrace.

      It would be great to know whether this is just a misunderstanding on my side (which I sincerely hope it is). Also the documentation is not really clear on this there is example code how in the regular SDK docs which make it look like a piece of cake and they are lacking any reference to this disproportionate complexity introduced to just add twenty lines of code for a custom error handler.

      I am trying to get all our developers to use and embrace the new error handling, but this feels like it will make my life pretty hard in this regard. 😞

      Any further clarification very much appreciated.

      Best
      Timm

      posted in Cinema 4D SDK
      T
      tdapper
    • Remove observer from ObservableFinished

      Hi everyone,

      I am creating a job that does some potentially long-ish computation in a queue in the background. To that job I added an finish observer like this:

      _job.ObservableFinished().AddObserver(ConcurrentGeneratorObjectData::WatchGeneratorFinished) iferr_ignore();
      

      The _jobvariable in this example is of type maxon::JobResultRef<BaseObject*>.

      The WatchGeneratorFinished() observer function just fires an EventAdd() when the job finishes, which is usually what I want. There are, however, certain events in the scene that I am listening to which indicate that this is not the behavior I want (e.g. an editor render being kicked off) in which case I would like to remove the observer (to potentially add it back again later). I did find a function ObservableBaseInterface::RemoveObserver(), which appears to do what I want, but I am having a hard time finding out how to use it. The ObservableFinishedBaseobject that is returned from JobResultRef<>::ObservableFinished()` function I am using does not seem to implement it. Is there a way for me to do this?

      Any pointers very much appreciated!

      posted in Cinema 4D SDK
      T
      tdapper