Navigation

    • Register
    • Login
    • Search
    1. Home
    2. tdapper
    T

    tdapper

    @tdapper

    0
    Reputation
    8
    Posts
    46
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    tdapper Follow

    Best posts made by tdapper

    This user does not have any upvoted posts yet.

    Latest posts made by 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 •
    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://plugincafe.maxon.net/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 •
    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 •
    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 •
    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 •
    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 •
    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 •
    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 •