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. C4DS
    3. Topics
    • Profile
    • Following 0
    • Followers 1
    • Topics 96
    • Posts 404
    • Best 51
    • Controversial 0
    • Groups 0

    Topics created by C4DS

    • C4DSC

      Detect CTRL + RightMouseButton in SceneHook

      Cinema 4D SDK
      • r25 c++ 2023 • • C4DS
      3
      0
      Votes
      3
      Posts
      549
      Views

      C4DSC

      Thanks for taking the time to respond, even during the weekend.
      I must say this is quite embarrassing: I already had forgotten about the response in the other thread, and it's not even 3 weeks old.
      I sincerely apologize for wasting your time with this duplicate thread.

      I can confirm the GetInputState is working fine, no need to waste more of your time trying it out.
      Thanks again.

    • C4DSC

      Removing IsolateObjects document

      Cinema 4D SDK
      • r23 r25 c++ 2023 r20 • • C4DS
      3
      0
      Votes
      3
      Posts
      571
      Views

      ManuelM

      hi,

      yes, KillDocument is not necessary in that case.

      Cheers,
      Manuel

    • C4DSC

      How to detect CTRL being pressed in a GeDialog

      Cinema 4D SDK
      • r23 r25 2023 c++ • • C4DS
      4
      0
      Votes
      4
      Posts
      912
      Views

      C4DSC

      Thanks @m_adam
      I can confirm that the following does work with R20, R23 and 2023

      Int32 MyDialog::Message(const BaseContainer& msg, BaseContainer& result) { BaseContainer keyChannels; if (GetInputState(BFM_INPUT_KEYBOARD, QCTRL, keyChannels)) { Bool ctrlModifier = (keyChannels.GetInt32(BFM_INPUT_QUALIFIER) & QCTRL) != 0;
    • C4DSC

      Development versions

      Bugs
      • • • C4DS
      3
      0
      Votes
      3
      Posts
      762
      Views

      C4DSC

      Thanks for the link to the updated page on the dev blog.

    • C4DSC

      Detect CTRL + RightMouseButton in SceneHook

      Cinema 4D SDK
      • c++ r20 • • C4DS
      8
      0
      Votes
      8
      Posts
      1.4k
      Views

      ManuelM

      The workaround is to have your scenehook priority over 2k. Remember this priority is reversed, the lowest, the latest to be called so you can delete what have been done by other scenehook. (if you are using the draw function)
      The function will call scenehook beginning at LIMIT<Int32>::MAX to 2000 included.

      This bug was introduced more than 10 years ago after fixing another issue. The code is old and would need a session of refactoring.

      Cheers,
      Manuel

    • C4DSC

      Detect tool button pressed - outside tool plugin

      Cinema 4D SDK
      • r20 python c++ • • C4DS
      5
      0
      Votes
      5
      Posts
      664
      Views

      C4DSC

      As I won't be spending more time on this project there is no need for delving further into the subject. As such I am setting the status of the topic to "solved".

    • C4DSC

      def state breaks viewport rendering when script is docked in layout

      Bugs
      • python r20 • • C4DS
      11
      0
      Votes
      11
      Posts
      2.1k
      Views

      ferdinandF

      Hey @HerzogVonWiesel,

      There is nothing that is strictly illegal to do with Script Manager scripts, but threading is not supported. Scripts are intended to be little blocks of code that run and while they run block the execution of other things. They are not intended to spawn dialogs which then dangle forever without an owner. Because when the user closes a dialog, it is not deallocated (because dialogs can be re-opened). This contrasts for example with a node, tool, or command plugin, which always sit there and do stuff even when they are not the focus of things. When they own a dialog, it is bound to the plugin instance and when properly implemented, the plugin also uses one dialog which is simply opened and closed instead of allocating a new dialog for each execution.

      In the end you can do pretty much anything with scripts, but you should avoid the c4d.threading module and async dialogs. There might be a minor feature I am overlooking here, but the yardstick is async execution. When something is async in nature it might not work properly in Script Manager scripts.

      edit: You should also avoid (attempting) to draw into a viewport from a script, or more precisely, manipulate the draw buffer of a BaseDraw. Cinema 4D won't let you do this anyways but there might be cases where you can still mess up things when you add drawing instructions. Getting information, e.g., calling myBaseDraw.GetDisplayFilter() or doing other things which are not drawing instructions is fine. You can also manipulate the parameters of a BaseDraw or switch the camera.

      Cheers,
      Ferdinand

    • C4DSC

      BaseDraw::DrawTexture alpha issue

      Cinema 4D SDK
      • r20 r21 c++ • • C4DS
      5
      0
      Votes
      5
      Posts
      711
      Views

      C4DSC

      @m_magalhaes

      Gradients.png

      Did some more testing, using the original code and the conversion code, with linear workflow on and off.

      When I look at the original code with linear workflow OFF, this most resembles the gradient from Photoshop. Except for the gap at the top .. obviously.

      The result from conversion code with linear workflow ON is what I am using now, as this provides the smallest gap. And to my eyes that result looks the most linear.

    • C4DSC

      Search results

      General Talk
      • • • C4DS
      2
      1
      Votes
      2
      Posts
      542
      Views

      ferdinandF

      Hello @C4DS,

      Thank you for reaching out to us and getting involved in shaping Plugin Café. While the requested functionality of yours would certainly be useful, we cannot provide it currently. I agree that the excerpts provided by the search function are too long for the common use case and information needs of users, but fixing that would require us modifying the search engine of NodeBB; as there are to our knowledge no build-in options of NodeBB to modify that excerpt length. We currently do not have the resources to do that customization of the search engine of NodeBB.

      Your proposal has been noted and might be taken into consideration in a future iteration of Plugin Café but considering that we just moved to a new system, this might take some time.

      Thank you for your understanding,
      Ferdinand

    • C4DSC

      NodeData Undo

      Cinema 4D SDK
      • r20 r19 r21 c++ • • C4DS
      13
      0
      Votes
      13
      Posts
      1.7k
      Views

      ferdinandF

      Hello @C4DS,

      without any further questions, we will consider this topic as solved by Monday, the 25th and flag it accordingly.

      Thank you for your understanding,
      Ferdinand

    • C4DSC

      No notifications of replies

      General Talk
      • • • C4DS
      14
      0
      Votes
      14
      Posts
      1.9k
      Views

      C4DSC

      @ferdinand
      We are indeed talking about the little bell icon with a number next to it.

      The strange thing is (as mentioned earlier as well) is that the unread icon does show up with a number of new unread posts. So, some of the notifications are working. Just not the bell icon.

      When I re-enable a notification in the dropdown of the bell icon, I do see the number show up.
      I noticed just recently that when I am currently looking at the forum page and someone replies, the number do show up. But without reading the posts, nor doing any actions and I leave the page, then come back to the forum ... the number on the bell icon is gone. Still the dropdown of the bell icon shows the list of notifications with a black circle next to it. Indicating that the replies have not been read yet.

      I don't have any content, script, or ad blocker. All was working fine with previous plugincafe.
      I have tried with Microsoft Edge (which isn't my default browser), and have exactly the same issues there. The number on the icon bell isn't displayed.
      To me this sounds like it isn't browser related.
      Do I have some setting in my account which causes this - no idea?
      As said, all worked fine with previous plugincafe, and as far as I remember I haven't changed anything in my account settings since the switch.

    • C4DSC

      GeDialog.AddSeparatorH documentation

      Cinema 4D SDK
      • python s24 • • C4DS
      8
      0
      Votes
      8
      Posts
      1.0k
      Views

      mikeudinM

      I have a same issue. The problem solved by assigning argument without name:

      self.AddSeparatorH(5, flags=c4d.BFH_FIT);

    • C4DSC

      ActiveObjectManager_SetObject gets overruled by Xpresso tag

      Cinema 4D SDK
      • c++ r19 r20 r21 • • C4DS
      4
      0
      Votes
      4
      Posts
      729
      Views

      C4DSC

      Seems the only solution here is to register an own mode.

    • C4DSC

      DrawPolygonObject at specific z-offset

      Cinema 4D SDK
      • r23 c++ • • C4DS
      5
      0
      Votes
      5
      Posts
      826
      Views

      ferdinandF

      Hi @C4DS,

      I am not sure that I can follow on what you are exactly doing. But my assumption is that you have x objects in a scene, want to block out all these objects with some kind of background texture and then draw one of these objects on top of that background texture, right? This is unfortunately not possible in my understanding.

      What you could do, is fill the viewport with a background texture by putting it behind an object by manually doing the trigonometry/transforms necessary for a given cemara. Not fun to do, because you have all these ifs and whens of camera parameters, but doable. This however would only give you a custom background and block out everything behind it, but not what is between the camera, the object and the background. Which is probably not what you are after if I understand you correctly.

      Cheers,
      Ferdinand

    • C4DSC

      How to know when Apply button is grayed out (disabled)

      Cinema 4D SDK
      • r20 c++ • • C4DS
      4
      0
      Votes
      4
      Posts
      577
      Views

      ManuelM

      hi,

      one side note, there is GetDEnabling and GetEnabling you can have more information in our manual

      GetEnabling will call GetDEnabling.

      There are pretty the same but the one you implement is GetDEnabling.

      Cheers,
      Manuel.

    • C4DSC

      SceneHook and object caches

      Cinema 4D SDK
      • r20 c++ • • C4DS
      13
      0
      Votes
      13
      Posts
      1.6k
      Views

      ferdinandF

      Hi @C4DS,

      with some delay comes here a request for closing this. If you want to keep it open for now, you can push it one more cycle ahead, but at some point I will insist on closing it without further activity. Thank you for your your understanding.

      Without further questions or feedback, we will consider this thread as solved by Monday and flag it accordingly.

      Cheers,
      Ferdinand

    • C4DSC

      Custom ColorField?

      Cinema 4D SDK
      • c++ r20 • • C4DS
      5
      0
      Votes
      5
      Posts
      684
      Views

      C4DSC

      @zipit
      Thanks for the detailed info.
      Much appreciated!

    • C4DSC

      Best Wishes to the team

      General Talk
      • • • C4DS
      3
      2
      Votes
      3
      Posts
      653
      Views

      ferdinandF

      Hi @C4DS and @Motion4D,

      thanks you two, that is very kind of you. A happy new year to you too and everyone in the forum.

      Cheers,
      Ferdinand

    • C4DSC

      DrawTexture related crashes

      Cinema 4D SDK
      • • • C4DS
      4
      0
      Votes
      4
      Posts
      616
      Views

      C4DSC

      @m_adam Thanks for that extra info.
      I had done a search in the documentation regarding DrawTexture but didn't see it listed in the API changes. Hence, I didn't expect its behaviour to have changed so drastically.
      I haven't worked with S22 nor R23 before, so I didn't look in detail about the DrawTexture documentation, since it wasn't listed as changed.

      May I encourage this to be added in API Changes ... as it is quite a big deal encountering this issue when all worked fine in R16 upto R21.

    • C4DSC

      Unique name for object

      Cinema 4D SDK
      • c++ python r20 • • C4DS
      5
      0
      Votes
      5
      Posts
      689
      Views

      C4DSC

      OK ... so I reinvented the wheel.

      # make unique tag name def makeUniqueTagName(theTag): if theTag != None: obj = theTag.GetObject() # get all names of the tags of same type usedNames = [] if obj != None: tag = obj.GetFirstTag() while tag != None: # skip the tag and # ignore tags of other types if tag != theTag and tag.IsInstanceOf(theTag.GetType()) == True: usedNames.append(tag.GetName()) tag = tag.GetNext() # If the name is already taken we will append a dot and number # and increment the number until a unique name is found. # Note that since we have created the tag we can assume that # the original name does not have a dot and number already. suffix = 0 uniqueName = theTag.GetName() while uniqueName in usedNames: suffix = suffix + 1 uniqueName = theTag.GetName() + '.' + str(suffix) theTag.SetName(uniqueName) return

      Maybe not the best nor cleanest code, but then again I am not used to code in Python.
      I am sure others might have a better solution, but this seems to work for what I need, so I am happy with how it turned out.