Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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.
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
A polygon object itself does not have any colors. You can store colors by adding a VertexColorTag.
See the manual and Python docs.
I don't think there is a function that returns the memory value, but some formula was discussed here: https://plugincafe.maxon.net/topic/12414/how-to-report-plugin-object-s-memory-usage-in-object-information/2
alternative: don't use LineObject. Draw a bunch of colorful lines in Draw()
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_manual_draw.html https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_manual_basedraw.html
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/Cinema4DCPPSDK/html/page_manual_description.html#page_manual_description_content_edit
Interfaces are typically defined using resource files:
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_gui_interaction.html
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/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
You can create arbitrary plugin hooks using the MAXON API's interface system:
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_interfaces.html
Especially look at registries:
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_registry_overview.html
or published objects:
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/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/Cinema4DCPPSDK/html/class_node_data.html
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/Cinema4DCPPSDK/html/page_manual_baseobject.html#page_manual_baseobject_flags
Then you can use the SplineObject / PointObject class as usual.
Hello,
the recommended VS version for Cinema 4D R20 is VS 2015, see https://developers.maxon.net/docs/Cinema4DCPPSDK/html/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/Cinema4DCPPSDK/html/page_manual_module_functions.html
According to the documentation, the midpoint of orthogonal projections is set with the "Offset" property.
See CameraObject Manual.
According to the documentation, you can use GetIcon().
See NodeData::Message() Manual.
Why not use IoShowInOS()? (didn't test it on macOS though).
IoShowInOS()
maxon::Url url { "file:///D:/_tests/test.html"_s }; url.IoShowInOS(maxon::IOSHOWINOSFLAGS::OPEN_IN_EXPLORER) iferr_ignore("");
See Url Manual.
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."
@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.
BaseSelect
GetRange()
Why there is an issue with Python I don't know.
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.
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.
Just FYI: To calculate the normal of a single CPolygon, there is CalcFaceNormal().
CPolygon
See also NormalTag Manual.
What version of Cinema 4D are you using? GeFree() is pretty outdated.
GeFree()
Is BaseDocument.GetChanged() what you want? See Changed Mode.
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, as you already did, according to your previous posts.