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).
Pro Tip: your installation of Cinema C4D contains the resource\modules\ folder.
resource\modules\
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.
IsDirty() is only relevant in the pipeline of an ObjectData generator plugin (BaseObject Manual).
IsDirty()
ObjectData
You need C4DAtom.GetDirty() or C4DAtom.GetHDirty() to compare the dirty checksums.
@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.
@intenditore said in Python tag - IsDirty() not working?:
AttributeError: 'c4d.BaseObject' object has no attribute 'SetDitry'
According to this error message, you wrote SetDitry
SetDitry
@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:
message()
Why are you calling SetDirty() before calling GetDirty() ?
SetDirty()
GetDirty()
Why not use GetHDirty(c4d.HDIRTYFLAGS_OBJECT_HIERARCHY)? (Dirty States)
GetHDirty(c4d.HDIRTYFLAGS_OBJECT_HIERARCHY)
I don't think you can configure a bitmap button in a res file.
res
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.
BITMAPBUTTON
ocamera.res
DescriptionToolData::GetDDescription()
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.
std::vector
So, does maxon::BaseArray has initializer list constructors or methods?
maxon::BaseArray
Looking at the API, it seems it does not have such a constructor, but methods handling std::initializer_list. So you can actually write:
std::initializer_list
maxon::BaseArray<maxon::Int> testArray; testArray.Append({ 1,2,3 }) iferr_return;
And BTW, in your *.h file you miss the comma in line 7 : " = 1001,"
" = 1001,"
Maybe you have to call LayoutChanged() after that. See gedialog_gadgets.cpp.
LayoutChanged()
You can simply edit the MATERIAL_TRANSPARENCY_COLOR parameter.
MATERIAL_TRANSPARENCY_COLOR
Mat[c4d.MATERIAL_TRANSPARENCY_COLOR]
The parameter stores a c4d.Vector.
You find examples on how to handle materials on GitHub.
RenderData objects are objects stored with the BaseDocument, representing a set of render settings.
RenderData
BaseDocument
GetActiveRenderData() returns a reference to such an object. So calling GetActiveRenderData() twice just returns two references to the same object.
GetActiveRenderData()
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.
doc = c4d.documents.GetActiveDocument()
Parameter units are defined with the c4d.DESC_UNITproperty. See Description Settings Manual.
c4d.DESC_UNIT
To change the properties of an existing parameter, one would have to translate this code to Python: Description 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."
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.
@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.
geometryutils.h is part of the geom.framework.
geometryutils.h
See also Where is lib_geom.h
Hi,
Cinema has a programmable Token system that can be used to define parts of the final file name
The boid simulation in a Python Tag can be found on GitHub (scene, source).
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.