Description resource
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/10/2004 at 03:42, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform: Windows ;
Language(s) : C++ ;---------
I have my own object and want to edit the member variables of my object through a DescriptionCustomGui:
Here my source (i'm doing all steps as described in the docs) :
In Oworld.res
CONTAINER Oworld
{
NAME Oworld;
GROUP ID_TEMPOBJECTPROPERTIES
{
STRING TEMPOBJECT_ID { }
}
}
In Oworld.h
#ifndef _Oworld_H_
#define _Oworld_H_
enum
{
TEMPOBJECT_ID = 3000,
ID_TEMPOBJECTPROPERTIES= 3001,
Oworld = 3002
};
#endif
In Oworld.str.
STRINGTABLE Oworld
{
Oworld "World";
}
In my mainapp:
...
#include "Oworld.h"
...
//i want to assign my "CONTAINER" Oworld to the CUSTOMGUI_DESCRIPTION
void* desc = FindCustomGui_(IDC_CUSTOM2, CUSTOMGUI_DESCRIPTION);
if(desc != NULL)
{
//sample with C4D-Objects
PluginObject* pObj1 = PluginObject::Alloc(Olight); //it works with Olight, Oplane
//my object
PluginObject* pObj2 = PluginObject::Alloc(Oworld); //doesn't work, pObj2 is NULL
//later i will do:
if(pObj2 != NULL)
{
((DescriptionCustomGui* )desc)->SetObject(pObj);
}
}
...
Where is my mistake.
Thanks for all replys.
Torsten -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/10/2004 at 18:42, xxxxxxxx wrote:
Howdy,
I'm not absolutely sure, but don't you need to include the line...
INCLUDE Obase
...right after NAME Oworld?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/10/2004 at 23:09, xxxxxxxx wrote:
I inserted the line, but there are no changes to my problem.
Thanks, Torsten -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/10/2004 at 00:28, xxxxxxxx wrote:
You also need to create a NodeData class, for example "WorldObjectData : public ObjectData" in order to be able to use PluginObject::Alloc(Oworld). Set the description string of the class to "Oworld" in RegisterObjectPlugin().
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/10/2004 at 10:28, xxxxxxxx wrote:
Thanks, Mikael.
I did the changes and i get an allocated object of my type Oworld. But when i want to assign the object to my DescriptionCustomGui, i dont see anything. Should i not expect to see my CONTAINER from the Oworld.res file in the DescriptionCustomGui?...
PluginObject* pObj = PluginObject::Alloc(Oworld);
if(pObj != NULL)
{ ((DescriptionCustomGui* )desc)->SetObject(pObj); //here i dont see anything in the DescriptionCustomGui
}
...Torsten
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/10/2004 at 04:27, xxxxxxxx wrote:
After trying a lot i found one solution:
The allocated PluginObject must inserted in an allocated BaseDocument. And this document must inserted to C4D. After that, the DescriptionCustomGui shows the assigned PluginObject.
BaseDocument* basedoc = BaseDocument::Alloc();
InsertBaseDocument(basedoc);
PluginObject* pObj = PluginObject::Alloc(Oworld);
basedoc->InsertObject(pObj,0,0,FALSE);
But i have not found any solution to hide the document from the user.
Is there a way to allocate a BaseDocument and assign it to C4D without showing it to the user?
Thanks, Torsten -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/11/2004 at 11:12, xxxxxxxx wrote:
No, inserted documents are always visible. I guess DESCRIPTION_OBJECTSNOTINDOC solved the problem anyway?