Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Register
    • Login
    1. Maxon Developers Forum
    2. spedler
    3. Posts
    S
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 18
    • Posts 97
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Problem with Undo when using COLOR field in a description resource

      Hi Ferdinand,

      Sorry to take a while to get back to you. Yes, that's what I did - changed the colour with the colour chip, the dialog appears, change the colour in that, close the dialog then hit Undo, which reverts any previous change before the colour change as well.

      I tried with a Cube where the only way to change colour is to use the display colour in the basic tab. At first sight this doesn't cause the problem, but in fact it does. To change the display colour you first have to change the 'Display Color' menu from Material (the default) to Automatic or Custom. If you then change the colour, then hit Undo, what happens is that the colour is reverted and the display colour menu is reverted back to 'Material'. So yes, you can reproduce the same bug with a simple cube (I missed that when I started looking at this, could have saved the time writing a test plugin!).

      Cheers,
      Steve

      posted in Bugs
      S
      spedler
    • RE: Problem with Undo when using COLOR field in a description resource

      Hi Ferdinand,

      OK, I'll try that again. Trying upload: Diamond.zip

      And the output (hope this is what you wanted!):
      alt text

      I can't even upload an image, this is a link to my site.

      Steve

      posted in Bugs
      S
      spedler
    • RE: Problem with Undo when using COLOR field in a description resource

      Hi Ferdinand,

      Thanks for getting back to me. I'll try uploading the file again in this message and see what it says. Here goes: Diamond.zip
      Well that failed. The error message was: "Error. Something went wrong while parsing server response"

      I'll try again using a VPN: Diamond.zip

      No, same error. Not sure what that means!

      Steve

      posted in Bugs
      S
      spedler
    • RE: Problem with Undo when using COLOR field in a description resource

      Apologies - the file upload to my original post doesn't seem to have worked. I tried a different link but that was deleted for some reason. Here's another attempt. You can download the file from my site using this link.

      Hopefully that has worked!
      Steve

      posted in Bugs
      S
      spedler
    • Problem with Undo when using COLOR field in a description resource

      I've encountered an odd problem when a plugin has a COLOR field in a description and Undo (Ctrl-Z) is hit after changing the colour.

      The attached archive contains a small ObjectData plugin called 'Diamond' to demonstrate this (Windows only, debug build). If you install it then invoke it from the Extensions menu, you see it generates a simple polygon object. There are three parameters - height, width and colour.

      To reproduce the problem, change either the height or width parameter to anything. Then, click the 'Color' coloured rectangle and in the colour dialog box change the colour to anything. The object colour changes as expected. Close the dialog, then hit Ctrl-Z to undo the colour change. The colour changes back, but also undoes the previous parameter change to width or height. In fact, if you didn't change anything other than the colour, then hit undo, the object is deleted. It's almost as if the effect is to undo two levels on the undo stack rather than one.

      At first I thought this must be the code I used to change the colour (it's just a call to BaseObject::SetColorProperties()) but not so. Because, if instead of clicking the coloured rectangle you expand the COLOR field to show the colour sliders, you can change the colour using the sliders and undo works normally You can also modify the source so the object colour is not changed at all and the problem still occurs.

      Unless I'm missing something really obvious this looks like a possible bug in the colour picker dialog implementation. (N.B. the full plugin source code is included in the archive.)

      Steve

      Diamond.zip

      posted in Bugs 2026 c++ windows
      S
      spedler
    • RE: Crash when using C4D shader in Redshift

      Tried to send the crash report on 6/6/25 at 22:08 but I got a message saying there was a problem sending it. The message also says to send it by email so I've sent it to sdk_support(at)maxon(dot)net.

      Steve

      posted in Bugs
      S
      spedler
    • RE: Crash when using C4D shader in Redshift

      Hi @ferdinand

      Thanks, I’ll submit a crash report as soon as I can. The power keeps going on and off here, when it’s restored I’ll send one in.

      Steve

      posted in Bugs
      S
      spedler
    • RE: Crash when using C4D shader in Redshift

      Hi @ferdinand

      Firstly, many thanks for looking at this. The plugin ID is a silly mistake on my part (I didn't realise that VS had auto-completed with the wrong ID). It should be ID_RSC4DSHADER (not IDS...) in the register function. If you look in rsc4dshader.h, you'll see it correctly identified with a valid plugin ID there. I was in a bit of a hurry building this and didn't realise what had happened. I'm surprised it ran at all TBH!

      The SDK version was 2024.5.1 (Build 2024_5_ac4bc44383e4_1378804312). Isn't this a newer SDK than 2024.4.0, not an older one?

      I can get the crash in 2024 but I've tried now in 2025.2.1 and it doesn't crash, so possibly whatever it is was fixed. I've also tried several other of my shader plugins in 2024 and they all exhibit the same issue, crash in 2024 but not in 2025.

      Cheers,
      Steve

      posted in Bugs
      S
      spedler
    • Crash when using C4D shader in Redshift

      Hi,
      I've written several shaders which I also use in Redshift using the C4D Shader material. I get a consistent crash in the following circumstances:

      • the renderer is Redshift and the material is the C4D Shader mat
      • the shader contains a gradient
      • the texture parameters in the C4D Shader Node are set high (e.g. 512 x 512)
      • the user edits the gradient by scrubbing one of the gradient knots quickly to left or right

      The crash occurs in customgui_gradient.cpp at line 59, which is:

      maxon::Result<maxon::GradientRenderData> Gradient::PrepareRenderData(const InitRenderStruct &irs) const
      {
      	GradientCallRC(maxon::UnexpectedError(MAXON_SOURCE_LOCATION, "Gradient::PrepareRenderData() not found."_s), PrepareRenderData)(irs);
      }
      

      It happens in all the shaders I've written which use a gradient. It looks as if scrubbing the knot forces Redshift to repeatedly bake the shader and doesn't like it for some reason, but that is just a guess.

      To demonstrate this, I've written a very basic shader plugin - it just draws a red-blue gradient over the surface. The attached file has the source and a debug version of the shader built with the R2024 SDK. To see it, load the included example file, then scrub one of the knots in the gradient, increasing the texture parameter size until it crashes.

      I should also mention that this does not happen in the standard renderer.

      Cheers,
      Steve
      RSC4DShader.zip

      posted in Bugs 2024 c++ windows
      S
      spedler
    • RE: Problem building the SDK examples on macOS

      I actually quite like the Apple keyboard, even if Apple’s idea of a UK keyboard is different to everyone else. For example, shift-2 should produce a “ character but on this Apple kit, it’s the @ symbol. The odd key bindings just make it worse, but it’s a nice keyboard.

      But I detest the Apple Magic Mouse, I can’t get used to those ‘gestures’. Give me my Logitech trackball any time. A bit of extra software does make a Mac so much more useful though. Pathfinder is way better than the horrible Finder, and BetterZip is very user-friendly.

      posted in Cinema 4D SDK
      S
      spedler
    • RE: Problem building the SDK examples on macOS

      Ouch. I've never had that happen with VS, but I've had Xcode refuse to build for all sorts of reasons, all of which VS happily ignores. I have to say that building on this Mac mini compared to my old MacBook is a revelation though - so much faster, and the screen is way bigger. That said, I still prefer VS, it just seems easier to use. Xcode really is painful, and as you say, Apple clearly enjoy that.

      Yes, that Xcode download site is extremely useful!

      Cheers,
      Steve

      posted in Cinema 4D SDK
      S
      spedler
    • RE: Problem building the SDK examples on macOS

      Well, for the benefit of anyone else in this position, I finally got it working. There was another problem in that Xcode 15.3 won't install on macOS Sequoia; you can apparently make it run with a small hack, but in the end it was easier to uninstall Xcode 16.3 and install 16.2 instead. Then it works fine and builds the SDK without incident.

      On a side note: why do Apple make life so ^&%&^$^^(* difficult for developers?

      Thanks again Ferdinand,
      Steve

      posted in Cinema 4D SDK
      S
      spedler
    • RE: Problem building the SDK examples on macOS

      Hi @ferdinand,

      Many thanks for this. It shouldn’t be a problem using an older version of Xcode for the time bring. I’ll get version 15.3 and give it another try.

      Cheers,
      Steve

      posted in Cinema 4D SDK
      S
      spedler
    • Problem building the SDK examples on macOS

      I've tried for the first time to build the SDK C++ examples on MacOS and have run into a problem. I'm using a new Mac mini with Sequoia 15.4.1, Xcode 16.3, CMake 4.02 and Python 3.13. I've followed the procedure in the SDK docs and everything appears fine until I try to build the examples, when it fails with this error in interfacebase.h:

      /Users/steve/Documents/C4DPlugins/C4D_2025/frameworks/core.framework/source/maxon/interfacebase.h:638:73 A template argument list is expected after a name prefixed by the template keyword
      

      I have no idea what to do about that. The examples build fine on Windows but (as usual) Xcode throws up some sort of problem. Could I have done something wrong or is this an issue in the SDK code?

      Thanks,
      Steve

      posted in Cinema 4D SDK 2025 macos c++
      S
      spedler
    • RE: find out if generator object? (in case of a Field object)

      The green tick/red cross only indicates if an object is enabled or not. You can see it with deformers, fields, primitives (which are generators anyway), other generators such as the cloner or extrude, etc. The tick does NOT show that the object is a generator. You only see it with objects whose actions can be enabled or disabled, so you won't see it with polygon objects or things such as the floor object.

      To get the status of the green tick for objects which have it, use GetDeformMode().

      (Edit) I've never used it, but if you call obj.GetInfo() and test for the flag OBJECT_HASDEFORMMODE, if that flag is present then it seems that the object does have the green tick. This could be useful when looking at objects which aren't generators, etc. but still have that tick.

      Steve

      posted in Cinema 4D SDK
      S
      spedler
    • RE: Issue: CommandData Plugin Compilation Errors in Cinema 4D 2025.1.0 SDK

      Hi @skibinvitaliy
      There's a few things to watch out for here. First, you will need to include at the very least the file c4d.h from the framework, if this is missing that might account for the undeclared identifiers.

      Assuming you're doing that, you must either use the cinema namespace or specifically qualify function declarations etc. If you don't, the compiler won't recognise the C4D functions and objects as valid. The manual explains how to do this, it's not difficult - just an extra step to take which I keep forgetting because it's new to R2025.

      The error 'int Bool' redefinition is because what it looks like you're doing there is declaring a variable named 'Bool' to be of type 'int'. But 'Bool' cannot be a variable, it's a variable type (actually a typedef defined by the SDK) so the compiler thinks you are redefining it, which isn't allowed.

      These are all just guesses though without seeing any code, but the first thing to look at is the namespace. Catches me out every time.

      Steve

      posted in Cinema 4D SDK
      S
      spedler
    • RE: res file, formatting, line ending, or encoding ?

      Excellent. Glad you got it working okay.

      Steve

      posted in Cinema 4D SDK
      S
      spedler
    • RE: res file, formatting, line ending, or encoding ?

      What I meant was, if your resource files are now named curvaturetools.res/h/str then RegisterTagPlugin() must contain the ‘description’ parameter to be “curvaturetools” not “Tpylookatcamera”.

      Steve

      posted in Cinema 4D SDK
      S
      spedler
    • RE: res file, formatting, line ending, or encoding ?

      @mogh If you are using the same code but just different resource files, did you remember to change the resource name in the RegisterTagPlugin() function?

      Steve

      posted in Cinema 4D SDK
      S
      spedler