On 02/10/2017 at 04:22, xxxxxxxx wrote:
Ho, thanks my bad even if it's written in the documentation I was always thinked a DescLevel only accept DTYPE and not CUSTOMGUI_ID (which is used in my case and not a CUSTOMDATATYPE as I thought initially).
Sadly it didn't fix the issue so I will contact rs dev, in any case thanks you a lot I understand way more how DescId and DescLevel works :)
Another ask, which is more related to c4d, I notice vp[3102, 6000] only work when I do Show All Sub Containers. Then what really change in the description object wehn we activate this feature? Anyway thanks for everythings.
EDIT: Ok got it working using c++ to know wich datatype is used. :D
Here is my actual C++ code
RenderData* rd = doc->GetActiveRenderData();
BaseVideoPost* vp = rd->GetFirstVideoPost();
while (vp)
{
if (!vp) break;
if (vp->GetType() == 1036219) break;
vp = vp->GetNext();
}
BaseContainer* bc = vp->GetDataInstance();
Int32 i = 0;
while (true)
{
const Int32 id = bc->GetIndexId(i++);
if (id == NOTOK)
break;
else
if (id == 3102)
GePrint(String::IntToString(
bc->GetData(id).GetType()
));
}
That give me the ID 1036235. And then using my previous script with this ID works like a charm.
ID_CUSTOM_UI_AOV = 1036235
lv1 = c4d.DescLevel(c4d.REDSHIFT_RENDERER_AOV_LAYER_FIRST, ID_CUSTOM_UI_AOV, 0)
lv2 = c4d.DescLevel(c4d.REDSHIFT_AOV_ENABLED, c4d.DTYPE_BOOL, 0)
print vp.GetParameter(c4d.DescID(lv1, lv2), c4d.DESCFLAGS_GET_0)
The only things that reminds weird for me is. I don't know which datatype is used. I don't need it, but I would like to know the BasePlugin of this ID. By using the following code I thought I can actually find the BasePlugin of the type. But no success, why?
ID_CUSTOM_UI_AOV = 1036235
plug = c4d.plugins.GetFirstPlugin()
while plug:
if plug.GetID() == ID_CUSTOM_UI_AOV:
print type(plug)
break
plug = plug.GetNext()
This code print nothing and I don't understand why.
Moreover using Set-GetParameter allow me to set/get data even if Show Sub Container feature is not activate which is what I want ! :D
Anyway thanks in advance.