Navigation

    • Register
    • Login
    • Search
    • Categories
    1. Home
    2. Tags
    3. c++
    Log in to post

    • D

      SOLVED I want to get the coordinates of the points I have selected "en"
      Cinema 4D Development • c++ r21 microsoft windows • • dada  

      4
      0
      Votes
      4
      Posts
      34
      Views

      D

      @m_magalhaes I'll write it in your way Thank you very much. Cheers!
    • SOLVED Access parameter failed
      Cinema 4D Development • c++ r21 • • chuanzhen  

      3
      0
      Votes
      3
      Posts
      37
      Views

      @s_bach Thanks, I ignored the parameter check and it works now!
    • C

      SOLVED Reverse iterators, how to use them?
      Cinema 4D Development • r20 c++ r21 documentation • • C4DS  

      8
      0
      Votes
      8
      Posts
      72
      Views

      C

      @m_adam said in Reverse iterators, how to use them?: Hi @C4DS Here the message from the development team which confirms what I said to you previously. Hi Maxime, I didn't doubt what you said earlier. I only wanted to point out that it wasn't clear from reading the documentation which collection could be used with reverse iterators. It's nice mentioning in the documentation about RBegin/REnd, Range based loops, etc ... but not everyone looks into the collection implementation to see which types do have RBegin/REnd or are range based, ... HashMap doesn’t support -- so you can’t use a reverse iterator for that. It wouldn’t make sense anyway because HashMap iteration is unordered. Having used std::map some might expect HashMap to be ordered, but it isn't mentioned anywhere it isn't. But the point has been made, and it is now clear how to use reverse iterator. Topic well be closed as "solved".
    • UNSOLVED Direction vector
      General Programming & Plugin Discussions • c++ general programming • • WickedP  

      3
      0
      Votes
      3
      Posts
      61
      Views

      Thanks Ricky, but I'm not sure if that's what I'm after. That looks like normal object rotation, but I'm trying to make a direction vector. The example given in a previous post did something like this: CreateRay(Ray* dst,Real x,Real y) { CameraMatrix = MyCam->GetMg(); Vector H = CameraMatrix.v1; Vector V = CameraMatrix.v2; Vector A = CameraMatrix.v3; Vector direction_vector = H + V + A; // how do I "add" 4.5° yaw to the direction_vector? // similarly for pitch dst->v = direction_vector; dst->p = CameraMatrix.off; } How do I "add" 4.5 degrees to the yaw with something like this (taking into account the camera's rotation as well)? I'd like to see the math so I can play around with that. If it's easier, think of it like this - I'm trying to create the standard camera ray without any lens effects (trying to keep it simple). How is the standard camera ray done? WP.
    • C

      UNSOLVED R21 BaseDraw::DrawPointArray draws squares versus circles in R20
      Cinema 4D Development • r20 c++ r21 issue limitation open bug • • C4DS  

      3
      0
      Votes
      3
      Posts
      38
      Views

      M

      hello, To keep you inform, I'm asking the devs and this is taking more time than expected. Sorry for the delay. Cheers, Manuel
    • M

      UNSOLVED How to add Layers Shader - C++
      Cinema 4D Development • c++ r19 sdk • • mfersaoui  

      6
      0
      Votes
      6
      Posts
      53
      Views

      M

      @s_bach Thank you.
    • SOLVED Strange crashes in R20 & R21
      Cinema 4D Development • r20 c++ r21 maxon api apple macos • • fwilleke80  

      5
      0
      Votes
      5
      Posts
      70
      Views

      Thanks for the update Frank. Looking at your "resolutions" I think that the actions you took were responsible, in the first case, to clean the existing derived data for the R20 project, whilst in the second, to refresh the DerivedData subfolder where the newly re-created R21 project was supposed to store intermediate files. Please keep us updated and for the mean time I'm going to set this thread as solved. Cheers
    • N

      SOLVED Get CustomGUI Data in python
      Cinema 4D Development • python r20 c++ sdk • • neon  

      9
      0
      Votes
      9
      Posts
      62
      Views

      N

      Hello Sebastian, I now understand what the difference is, thank you very much! With the customdata_customgui example file I actually made both a GUI and a custom DataType. So I only needed to change my resource file and modifiy my data code a bit! Best Regards, Florian
    • S

      SOLVED Unable to insert a key frame for the color attribute of the plugin.
      Cinema 4D Development • python r20 c++ r19 r21 • • sean  

      9
      0
      Votes
      9
      Posts
      115
      Views

      S

      @m_magalhaes Hello, thank you very much for your inspiration. You've been very helpful. There is no need to overwrite TranslateDescID(), only two macros HandleDescGetVector and HandleDescSetVector can realize my idea. Thanks again! Cheers, Sean
    • C

      UNSOLVED R21 GeUserArea in docked GeDialog behaves differently
      Cinema 4D Development • c++ r21 classic api issue open bug • • C4DS  

      4
      0
      Votes
      4
      Posts
      47
      Views

      M

      Still not I will update you as soon as I have some news. Cheers, Maxime.
    • F

      UNSOLVED Viewport render and camera FOV
      Cinema 4D Development • c++ r21 classic api • • Filip  

      2
      0
      Votes
      2
      Posts
      46
      Views

      M

      hello, From the execute command you can retrieve the RayCamera using the VolumeData stored inside the VideoPostStruct const RayCamera* cam = vps->vd->GetRayCamera(); You can get the off parameter of the RayCamera that is the offset of the camera (so double it to have the resolution) Using the zoom factor should help you to retrieve the aperture and determine the ray direction. This RayCamera will change depending on where the render is done, (viewport or picture viewer) in the Execute Function : const RayCamera* cam = vps->vd->GetRayCamera(); if (cam == nullptr) return RENDERRESULT::OUTOFMEMORY; ppx_ = cam->off.x; ppy_ = cam->off.y; zoomRatio_ = 1.0 / cam->zoom; in the CalculateRay function maxon::Float newx = x - ppx_; maxon::Float newy = y - ppy_; maxon::Vector focalPoint; // Sets the value of the focal point in local space, the plan is put at the image size * ration in Z axis focalPoint = Vector(newx, -newy, xres_ / zoomRatio_); // go to goal space focalPoint = camMg_ * focalPoint; // remove the camera position so we have a direction focalPoint -= camMg_.off; // set the ray position dst.p = camMg_.off; // set the ray direction dst.v = focalPoint; dst.v.Normalize(); Hope this help a bit. Cheers, Manuel
    • R

      SOLVED Project Tool Permission Denied
      Cinema 4D Development • c++ r21 sdk plugin migration application development project tool • • rui_mac  

      6
      0
      Votes
      6
      Posts
      73
      Views

      R

      Ok, made it work now. Thank you so much.
    • UNSOLVED Project Tool: Some projectdefinition.txt options don't seem to work
      Cinema 4D Development • c++ r21 microsoft windows apple macos project setup project tool • • fwilleke80  

      9
      0
      Votes
      9
      Posts
      61
      Views

      S

      I think we are talking past each other. You can of course build any project any way you like. An then make sure that your plugins link to the build result using the link options defined in projectdefinition.txt. But I think you want to include an already existing (non-plugin) project in the solution created by the Project Tool, right? And I think that is not possible. I guess you could add the project manually to the solution created by the Project Tool.
    • M

      SOLVED Enable/Disable parameters in the Attribute Manager by their parent Group ID
      Cinema 4D Development • c++ • • mfersaoui  

      6
      0
      Votes
      6
      Posts
      42
      Views

      S

      Hello, just for your information: GetDEnabling() gives you the description of the parameter with the itemdesc parameter. From that BaseContainer, you should be able to read the ID of the parameter's parent group (see Description Settings Manual - Groups). best wishes, Sebastian
    • SOLVED Catch other object's delete/undo
      Cinema 4D Development • r20 c++ r19 r21 • • rsodre  

      5
      0
      Votes
      5
      Posts
      69
      Views

      @m_adam , AddEventNotification was exactly what I needed. I created a notification to NOTIFY_EVENT_UNDO, and then add my object to it. Now if I delete anything from my object after a polygon is deleted, it will be restored with Undo. Thanks! case MSG_NOTIFY_EVENT: { CHECK_BREAK( data != nullptr ); const auto eventData = static_cast<NotifyEventData*>( data ); if( eventData->eventid == NOTIFY_EVENT_UNDO ) { NotifyEventMsg* notifyMessage = static_cast<NotifyEventMsg*>( eventData->event_data ); CHECK_BREAK( notifyMessage != nullptr ); if( notifyMessage->msg_id == Int32( UNDOTYPE_DELETE ) ) { eventData->doc->AddUndo( UNDOTYPE_CHANGE, Get() ); } } break; }
    • M

      SOLVED Visual Studio - Debugging Plugin Error
      Cinema 4D Development • c++ r19 issue project setup project tool • • mfersaoui  

      9
      0
      Votes
      9
      Posts
      66
      Views

      S

      Hello, you find information how to run a plugin from within Visual Studio in the documentation: Development for Microsoft Windows - Running Plugins. best wishes, Sebastian
    • J

      SOLVED Inconsistent Matrix Behavior
      Cinema 4D Development • r20 c++ • • JohnThomas  

      13
      0
      Votes
      13
      Posts
      147
      Views

      J

      Thanks for the response. I changed my code to match the example you gave and it seems like that fixes the immediate problem I was running into. It will take some tests to verify if this covers all of the circumstances that I need it to. I appreciate the help. John Thomas
    • M

      SOLVED Visual Studio - How to build the final plugin version.
      Cinema 4D Development • c++ project setup • • mfersaoui  

      5
      0
      Votes
      5
      Posts
      83
      Views

      M

      Thank you so much, all The Cinema 4D on the other computer was not updated to R19.068, I updated the c4d app and I made new test, it seem to work normally. To be sure, I will retest it again on a third computer. I have an error when I try to debugging plugins, I will create new topic concerning this error. Thanks again, and have a great day.
    • F

      SOLVED Custom renderer, viewport render crashes
      Cinema 4D Development • c++ r21 classic api • • Filip  

      3
      0
      Votes
      3
      Posts
      50
      Views

      F

      "I warmly recommend cloning the whole document on a temp doc" Thanks, I'll try working on a clone. I had the impression that the document passed to the videopost was already a clone of the original document, but perhaps this is not the case for viewport rendering? "With regard to your issue, I'm a bit confused by the need you have to call BaseDocument::AnimateObject() or BaseDocument::ExecutePasses() when the VIDEOPOSTCALL in VideoPostData::Execute() is VIDEOPOSTCALL::INNER. Actually when you're in this step, you can already access and query the VolumeData to retrieve all the relevant information about the scene elements (like RayObject, RayLight and so on)." -We have some good reasons for working with the basedocument directly, rather than the data provided from the VolumeData. "Consider that this approach is sub-optimal since you're going to double the resources used to store the current document." -OK. This should be fine for our purposes. Our plugin actually provides custom rendering commands, that are the preferred way of rendering with the plugin. The videopost functionality is added as more of a convenience in our case, to make the plugin work nicely with things like viewport rendering, material preview etc. /Filip
    • O

      SOLVED Use existing data for DynamicDescription
      Cinema 4D Development • c++ r21 microsoft windows maxon api documentation • • Ogers  

      3
      0
      Votes
      3
      Posts
      56
      Views

      O

      Thanks @s_bach This is very helpful. Best wishes.