Navigation

    • Register
    • Login
    • Search
    1. Home
    2. fwilleke80
    3. Posts
    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups

    Posts made by fwilleke80

    RE: Can't debug C4D 2023 and 2024 on macOS

    @ferdinand said in Can't debug C4D 2023 and 2024 on macOS:

    first, thank you very much for investing more time into this and with that saving time for me, truly appreciated.

    You're welcome. If any of this get any of us further it's worth the time.

    @ferdinand said in Can't debug C4D 2023 and 2024 on macOS:

    But let us discuss the details per mail.

    Okay!

    Cheers,
    Frank

    posted in Cinema 4D SDK •
    RE: Can't debug C4D 2023 and 2024 on macOS

    Well, well, well, there we have it. It's a Redshift issue! After removing the Redshift .xlib files from /corelibs and /Redshift, most of the error messages are gone, and so is the crash. Tested in C4D 2023.2.

    Screenshot 2023-09-22 at 11.18.36.jpg

    posted in Cinema 4D SDK •
    RE: How to get OutLine of Polygon object

    Another idea: You could also use some primitive way to render an object mask (e.g. white object on black background), and then run an edge recognition kernel on the resulting image.

    posted in General Talk •
    RE: Can't debug C4D 2023 and 2024 on macOS

    Redshift sure complains a lot in the debug console.

    Should I try and remove redshift.xlib from C4D 2023 and see if that changes anything?

    posted in Cinema 4D SDK •
    RE: Can't debug C4D 2023 and 2024 on macOS

    Follow-up: C4D 2024 (latest release, just downloaded from Maxon website)

    Tried on the same system as before: 2019 MacBook Pro, Xcode 13.2.1 using legacy build system, macOS Monterey 12.6.8.

    Screenshot 2023-09-22 at 11.06.40.jpg

    posted in Cinema 4D SDK •
    RE: Can't debug C4D 2023 and 2024 on macOS

    Thank you :-)

    posted in Cinema 4D SDK •
    RE: Can't debug C4D 2023 and 2024 on macOS

    That made no difference at all :-(
    Exactly the same error with legacy build system.

    I also tried in both versions of C4D 2023: 2023.1.3 and 2023.2. Both exactly the same.

    The release build freezes from time to time, too, in about the same moment that the debug build always crashes.

    Built with Xcode 13.2.1 on macOS Monterey 12.6.8 on my 2019 MacBook Pro.

    posted in Cinema 4D SDK •
    RE: Can't debug C4D 2023 and 2024 on macOS

    It is mysterious.

    @ferdinand said in Can't debug C4D 2023 on macOS:

    But you are running things with the so-called legacy build system, right? I know that you are an experienced developer, but if you have somehow managed to get the SDK with the new build system going, all sorts of weird errors are to be expected.

    Ah, that could be it. Because I did manage to get it to build with the new system. Hang on, I'll try with the legacy system.

    posted in Cinema 4D SDK •
    RE: R23 Monterey SDK compile errors

    Which exact Code version is it? I remember I couldn't use any Xcode version later than 13.2.1. Any more recent version would throw countless errors.

    posted in Cinema 4D SDK •
    Can't debug C4D 2023 and 2024 on macOS

    Hi,

    here's a problem that occurs on both my Mac machines (2019 MacBook Pro, 2019 iMac), on macOS Big Sur and Monterey, and in Xcode 12 and 13 alike. It also happens with C4D 2024 (though the error message might look different, if necessary I can add a screenshot of that, too).

    Screenshot 2023-09-22 at 08.06.53.jpg

    It happens early on in the debug session, before the C4D GUI even shows up. And it also happens with the cinema4dsdk project, without any of my plugins being present. Running Cinema 4D without attaching a debugger works as expected. Running a Release build without the debugger attached works as expected, however, running a Debug build without the debugger freezes after the GUI has appeared.

    It never happens on Windows (not even in Boot Camp on the iMac), and it also doesn't happen with R25 and earlier versions.

    What could it be?

    Cheers,
    Frank

    posted in Cinema 4D SDK •
    RE: Casting GeListNode* to BaseObject*

    You need to add the const to the static_cast template argument, too:

    const BaseObject* objectPtr = static_cast<const BaseObject*>(node);
    
    posted in Cinema 4D SDK •
    RE: C4D 2023 on macOS: GeUserArea::DrawBitmap() not working anymore?

    I already tried using 8 bit greyscale. Still doesn't work in 2023 on macOS, but on the other C4D/OS combinations.

    Will try RGB, too.

    If that doesn't work either, I'll be back and try to write a minimal example.

    Cheers,
    Frank

    posted in Cinema 4D SDK •
    RE: C4D 2023 on macOS: GeUserArea::DrawBitmap() not working anymore?

    By the way, interesting fact: Using the 32-Bit greyscale BaseBitmap in a BITMAPBUTTON CustomGUI works flawlessly. I would have expected it also uses a GeUserArea internally to draw the bitmap. So, if it was a "known limitation" in the GeUserArea/ImageInterface, it shouldn't draw there either, should it?

    I still suspect a bug :-P

    Cheers,
    Frank

    posted in Cinema 4D SDK •
    RE: C4D 2023 on macOS: GeUserArea::DrawBitmap() not working anymore?

    That would be the first time ever that Windows code is more clever than macOS, especially when it comes to media 😁

    I’d say, if the API offers a format COLORBYTES_GRAYf, it should work. The fact that it fails only on one OS and in one C4D release does hint to a bug.

    However, I’ll try going 8 Bit 🙂

    Cheers,
    Frank

    posted in Cinema 4D SDK •
    RE: C4D 2023 on macOS: GeUserArea::DrawBitmap() not working anymore?

    Thank you Ferdinand! Yes, going 8 bits RGB or greyscale is the next thing I‘ll try.

    It’s just strange that it works with R25, and on Windows in 2023, too. Only macOS with C4D 2023 is affected by this. Therefore, I respectfully suspect it’s a bug ;-)

    Cheers,
    Frank

    posted in Cinema 4D SDK •
    C4D 2023 on macOS: GeUserArea::DrawBitmap() not working anymore?

    Hi,

    I am using GeUserArea::DrawBitmap() to draw a 32-bit greyscale bitmap into a GeUserArea in a GeDialog. On macOS, the code works nicely in R20 - R25, but in C4D 2023, nothing happens. All my drawing operations in the GeUserArea work as expected, but the DrawBitmap() call does nothing.

    This is how I create the bitmap:

    AutoAlloc<BaseBitmap> bitmap;
    const maxon::Int32 pixelBytes = COLORBYTES_GRAYf;
    const maxon::Int32 pixelBits = pixelBytes * 8;
    
    if (bitmap->Init((maxon::Int32)_width, (maxon::Int32)_height, pixelBits, INITBITMAPFLAGS::GRAYSCALE) != IMAGERESULT::OK)
    	return maxon::OutOfMemoryError(MAXON_SOURCE_LOCATION, "Could not initialize BaseBitmap!"_s);
    
    auto populateBitmapWorker = [&bitmap, pixelBytes] (maxon::Int z)
    {
    	iferr (maxon::Float32* bufferPtr = NewMem(maxon::Float32, _width))
    		return;
    
    	for (maxon::Int x = 0; x < _width; ++x)
    	{
    		// Get value between 0.0 and 1.0
    		const maxon::Float value = GetTheValue(x, z);
    		bufferPtr[x] = (maxon::Float32)value;
    	}
    	bitmap->SetPixelCnt(0, (Int32)z, (Int32)_width, (UChar*)bufferPtr, pixelBytes, COLORMODE::GRAYf, PIXELCNT::NONE);
    	DeleteMem(bufferPtr);
    };
    maxon::ParallelFor::Dynamic(0, _height, populateBitmapWorker);
    

    Calling ShowBitmap() to display the bitmap in the Picture Viewer works fine, it looks exactly as I'd expect.

    Now, in GeUserArea::DrawMsg() I want to draw the bitmap in a GeUserArea in a GeDialog.
    theBitmapPtr has been allocated, initialised, and populated by the above shown code.

    OffScreenOn(); 
    SetClippingRegion(x1, y1, x2, y2);
    
    // Fill background with standard background color
    DrawSetPen(COLOR_BG);
    DrawRectangle(0, 0, GetWidth(), GetHeight());
    
    // Draw the bitmap
    DrawBitmap(theBitmapPtr, 20, 0, 500, 500, 0, 0, theBitmapPtr->GetBw(), theBitmapPtr->GetBh(), BMP_NORMAL);
    

    Again, this works perfectly fine in R25 and older releases. After drawing the bitmap, I also draw some text, and that text still appears in C4D 2023. Just the bitmap is missing. Any ideas?

    Sporadically (but not always), I get messages like this in the Xcode console:

    2023-09-12 15:07:53.549687+0200 Cinema 4D[5384:86871] [net.maxon.cinema4d] CGImageCreate: invalid image bits/component: 8 bits/pixel 32 alpha info = kCGImageAlphaNoneSkipFirst
    outofmemory [mac_gui_tools.mm(291)]
    

    Also, it seems (but I'll double check to validate) that it only fails on macOS, but works on Windows.
    In deed, it works on Windows, but not on macOS.

    Thanks in advance!

    Cheers,
    Frank

    posted in Cinema 4D SDK •
    RE: Plugin ID page is down?

    Me neither :-O

    posted in General Talk •
    RE: Getting rid of the burger icon in a dialog

    Woot, it works! :man_dancing:

    posted in Cinema 4D SDK •
    RE: Getting rid of the burger icon in a dialog

    Wow, thanks! :-)

    posted in Cinema 4D SDK •
    RE: How to implement a moveable type with MAXON_OPERATOR_MOVE_ASSIGNMENT?

    @jana sorry, I forgot to flag it myself. All solved, thank you :+1:

    posted in Cinema 4D SDK •