Navigation

    • Register
    • Login
    • Search
    1. Home
    2. PluginStudent
    P

    PluginStudent

    @PluginStudent

    76
    Reputation
    132
    Posts
    131
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    PluginStudent Follow

    Best posts made by PluginStudent

    RE: UI, Resource Descripion and all those .h, .str, .res

    Pro Tip: your installation of Cinema C4D contains the resource\modules\ folder.

    In that folder, you find sub-folders. These sub-folders contain Cinema's resource files. So you actually have hundreds of example files for all of this.

    And of course lots of examples on GitHub.

    posted in Cinema 4D SDK •
    RE: Python tag - IsDirty() not working?

    IsDirty() is only relevant in the pipeline of an ObjectData generator plugin (BaseObject Manual).

    You need C4DAtom.GetDirty() or C4DAtom.GetHDirty() to compare the dirty checksums.

    posted in General Talk •
    RE: Custom FIELDLAYER_CHANNELFLAG

    @mikeudin said in Custom FIELDLAYER_CHANNELFLAG:

    So instead color, value, direction and rotation flags

    These things aren't flags. These properties are hard-coded in the FieldOutput struct.

    posted in Cinema 4D SDK •
    RE: Python tag - IsDirty() not working?

    @intenditore said in Python tag - IsDirty() not working?:

    AttributeError: 'c4d.BaseObject' object has no attribute 'SetDitry'

    According to this error message, you wrote SetDitry

    posted in General Talk •
    RE: Python NODES - Shouldn't really they can change the scene?

    @SolarPH said in Python NODES - Shouldn't really they can change the scene?:

    without any need of any plugin

    If you want to have interaction with a scene without plugins you could do this:

    • Add a Python Scripting Tag to your scene
    • Add user-data buttons and other UI to that tag
    • implement the message() function of that tag
    • in that message() function, you can react to interaction with the tag's user-data UI
    • you can write code that is executed from the main thread to edit the scene safely
    • and leave the poor Python Node and all that thread stuff alone...
    posted in Cinema 4D SDK •
    RE: Python tag - IsDirty() not working?

    Why are you calling SetDirty() before calling GetDirty() ?

    Why not use GetHDirty(c4d.HDIRTYFLAGS_OBJECT_HIERARCHY)? (Dirty States)

    posted in General Talk •
    RE: Custom GUI button via resource description

    I don't think you can configure a bitmap button in a res file.

    You can add a BITMAPBUTTON parameter in the res file (e.g. ocamera.res). But then you have to implement DescriptionToolData::GetDDescription() to define the specific settings of this parameter's GUI.

    posted in Cinema 4D SDK •
    RE: Best way to fill a maxon::BaseArray

    Example 1 is the initialization of a C-array from a brace-enclosed list.

    Example 2 is the construction of a std::vector object using an initializer list.

    So, does maxon::BaseArray has initializer list constructors or methods?

    Looking at the API, it seems it does not have such a constructor, but methods handling std::initializer_list. So you can actually write:

    maxon::BaseArray<maxon::Int> testArray;
    testArray.Append({ 1,2,3 }) iferr_return;
    
    posted in General Talk •
    RE: UI, Resource Descripion and all those .h, .str, .res

    And BTW, in your *.h file you miss the comma in line 7 : " = 1001,"

    posted in Cinema 4D SDK •
    RE: Hide a tab group of a resource-based GeDialog

    Maybe you have to call LayoutChanged() after that. See gedialog_gadgets.cpp.

    posted in Cinema 4D SDK •

    Latest 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 •
    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 •
    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 •
    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://plugincafe.maxon.net/topic/12414/how-to-report-plugin-object-s-memory-usage-in-object-information/2

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

    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

    posted in Cinema 4D SDK •
    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/Cinema4DCPPSDK/html/page_manual_description.html#page_manual_description_content_edit

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

    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

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

    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

    posted in Cinema 4D SDK •
    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/Cinema4DCPPSDK/html/page_manual_baseobject.html#page_manual_baseobject_flags

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

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

    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

    posted in Cinema 4D SDK •