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. PluginStudent
    3. Posts
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 132
    • Best 60
    • Controversial 0
    • Groups 0

    Posts made by PluginStudent

    • RE: Color Surface with Python Generator

      In your code, you create a polygon object:

      node = c4d.PolygonObject(pcnt=10, vcnt=10)

      you have to add the tag to this polygon object:

      tag = node.MakeVariableTag(c4d.Tvertexcolor, 10)

      I don't have any further code, but the support team should be able to provide more examples.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Color Surface with Python Generator

      You must not add the VertexColorTag to the Python generator.

      You must add the VertexColorTag to the polygon object you are creating inside the generator

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Color Surface with Python Generator

      A polygon object itself does not have any colors. You can store colors by adding a VertexColorTag.

      See the manual and Python docs.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Querying and Storing Object Information

      I don't think there is a function that returns the memory value, but some formula was discussed here: https://developers.maxon.net/forum/topic/12414/how-to-report-plugin-object-s-memory-usage-in-object-information/2

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: LineObject custom segment colors

      alternative: don't use LineObject. Draw a bunch of colorful lines in Draw()

      https://developers.maxon.net/docs/cpp/2023_2/page_manual_draw.html
      https://developers.maxon.net/docs/cpp/2023_2/page_manual_basedraw.html

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: ToolData::GetDDescription() redundant call, why?

      Cinema will call GetDDescription() whenever it feels like.

      But you can optimize by checking for GetSingleDescID(). You find a snippet here: https://developers.maxon.net/docs/cpp/2023_2/page_manual_description.html#page_manual_description_content_edit

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Is there a Resource Editor for Version 23

      Interfaces are typically defined using resource files:

      https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_gui_interaction.html

      https://developers.maxon.net/docs/cpp/2023_2/page_manual_resource_files.html

      ResEdit was just an option to edit a specific type to resource files. You find example resource files in the example project:

      https://github.com/PluginCafe/cinema4d_cpp_sdk_extended/tree/master/plugins/cinema4dsdk/res

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Custom register plugin

      You can create arbitrary plugin hooks using the MAXON API's interface system:

      https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_interfaces.html

      Especially look at registries:

      https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_registry_overview.html

      or published objects:

      https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_publishedobjects.html

      See these examples in maxonsdk.module:

      https://github.com/PluginCafe/cinema4d_cpp_sdk_extended/blob/master/plugins/maxonsdk.module/source/foundations/interfaces_declarations.h

      Alternatively, you can register arbitrary node plugins with RegisterNodePlugin().

      You could implement your functionality e.g. in the Message() method.

      https://developers.maxon.net/docs/cpp/2023_2/class_node_data.html

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Get Spline Data from document->GetActiveObject();

      You have to cast the BaseObject into a SplineObject - if the object is actually a SplineObject or a spline generator.

      You find some example code here: https://developers.maxon.net/docs/cpp/2023_2/page_manual_baseobject.html#page_manual_baseobject_flags

      Then you can use the SplineObject / PointObject class as usual.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: compiling for r20 new solution

      Hello,

      the recommended VS version for Cinema 4D R20 is VS 2015, see https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_dev_windows.html.

      Every plugin has to implement PluginStart(), PluginMessage(), and PluginEnd().

      You find an example here: https://github.com/PluginCafe/cinema4d_cpp_sdk_extended/blob/master/plugins/microsdk/source/main.cpp

      See also https://developers.maxon.net/docs/cpp/2023_2/page_manual_module_functions.html

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Retrieving Viewport Camera Matrix

      According to the documentation, the midpoint of orthogonal projections is set with the "Offset" property.

      See CameraObject Manual.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: MSG_GETCUSTOMICON: Bitmap in IconData always empty

      According to the documentation, you can use GetIcon().

      See NodeData::Message() Manual.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: How do I open a maxon::Url in the default web browser?

      Why not use IoShowInOS()? (didn't test it on macOS though).

      maxon::Url url { "file:///D:/_tests/test.html"_s };
      url.IoShowInOS(maxon::IOSHOWINOSFLAGS::OPEN_IN_EXPLORER) iferr_ignore("");
      

      See Url Manual.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: VolumeData::trans vs VolumeData::alpha

      According to the documentation: transparency defines how much color the thing has: "A transparency texture is similar to a photographic slide: Red parts of the slide allow only red light to pass through; white parts allow all light through. With black, no light can pass through the slide."

      Alpha defines if there is a thing at all: "An alpha channel enables you to use an image to mask out areas of the material, allowing any background to show through."

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: What is the max parameter in BaseSelect.GetRange() really for?

      @Cairyn said in What is the max parameter in BaseSelect.GetRange() really for?:

      I would interpret that as assurance that any value we get returned is smaller than max. So if there is a segment (1,5) and max = 3, then we'd get (1,3) back. (I can't for the life of me think of a reason why I would want that, but hey.)

      Simple: interpret an element number as an index. You don't want that index to be out of range.

      If you have a list of n elements and a BaseSelect object to store which elements of that list are "selected", you want to ensure that an index provided by GetRange() is a valid index of that list.

      Why there is an issue with Python I don't know.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Customgui for ShaderLink

      As you can read in the documentation, the custom GUI for SHADERLINK is TexBoxGui, which has the custom GUI ID CUSTOMGUI_TEXBOX.

      See also Custom GUI Elements.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Changing Face Normal's Direction?

      Normal data is stored in a Normal tag. See NormalTag Manual.

      So you can create a (new) normal tag and store any new normal data you like.

      If you look around the forum you will find threads showing how to do that in Python, e.g. Handling direction of the normal tag.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Getting poly normal and CreatePhongNormals()

      Just FYI: To calculate the normal of a single CPolygon, there is CalcFaceNormal().

      See also NormalTag Manual.

      What version of Cinema 4D are you using? GeFree() is pretty outdated.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: Detecting unsaved changes

      Is BaseDocument.GetChanged() what you want? See Changed Mode.

      posted in Cinema 4D SDK
      P
      PluginStudent
    • RE: how can I convert a c4d file to fbx format

      The Cinema 4D C++ SDK is not the same as the Cineware SDK.

      The Cinema 4D C++ SDK is included in every distribution of Cinema 4D.

      The Maxon Cineware SDK can be downloaded from the developers' blog[URL-REMOVED], as you already did, according to your previous posts.


      [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

      posted in Cineware SDK
      P
      PluginStudent