Navigation

    • Register
    • Login
        No matches found
    • Search
    1. Home
    2. PluginStudent
    3. Best
    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups

    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 •
    RE: Transparency channel - Color update

    You can simply edit the MATERIAL_TRANSPARENCY_COLOR parameter.

    Mat[c4d.MATERIAL_TRANSPARENCY_COLOR]
    

    The parameter stores a c4d.Vector.

    You find examples on how to handle materials on GitHub.

    posted in Cinema 4D SDK •
    RE: SetActiveRenderData Does Not Work As Expected?

    RenderData objects are objects stored with the BaseDocument, representing a set of render settings.

    GetActiveRenderData() returns a reference to such an object. So calling GetActiveRenderData() twice just returns two references to the same object.

    If you want to store the previous state, you could simply get a clone:

    rd_saved = doc.GetActiveRenderData().GetClone()
    

    and use that clone to restore the original state:

    rd_saved.CopyTo(rd, c4d.COPYFLAGS_NONE)
    

    But without knowing what you actually want to achive, it is hard to say if that is a good solution or not.

    Also, assuming this is a Script Manager script: doc = c4d.documents.GetActiveDocument() is useless.

    posted in Cinema 4D SDK •
    RE: Change parameter's unit type

    Parameter units are defined with the c4d.DESC_UNITproperty. See Description Settings Manual.

    To change the properties of an existing parameter, one would have to translate this code to Python: Description Manual.

    posted in Cinema 4D SDK •
    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 •
    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 •
    RE: how can I convert a c4d file to fbx format

    @liushu said in how can I convert a c4d file to fbx format:

    2 . I can download c++ sdk. I am c++ programmer.
    I do it according to https://medium.com/@antoinefortin_64750/how-to-setup-cinema4d-and-melange-c-sdk-924110725c01

    This is NOT the C++ SDK. The C++ SDK is included in your installation of Cinema 4D; you find the C++ documentation online.

    What you are looking at is some random online source talking about the Cineware SDK (formerly known as Melange), which is something else. See Cineware.

    posted in Cineware SDK •
    RE: Missing Library

    geometryutils.h is part of the geom.framework.

    See also Where is lib_geom.h

    posted in General Talk •
    RE: How to set completely custom render output filename?

    Hi,

    Cinema has a programmable Token system that can be used to define parts of the final file name

    • Variable Path and File Names
    • Token System Overview
    • c4d.modules.tokensystem
    posted in Cinema 4D SDK •
    RE: Flock Modifier

    The boid simulation in a Python Tag can be found on GitHub (scene, source).

    posted in General Talk •
    RE: Make Button Invisible And Still Occupies Space?

    If you are using a BitmapButtonCustomGui, you could simply change the image the bitmap button is displaying. E.g. use an image filled with the background color.

    posted in Cinema 4D SDK •