Adding object properties in .res-file
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 02:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C++ ;---------
Hi,
it's me again with a new problem! If I see that right in the samples it is possible to add object properties which can be changed by users, just by writing them into the *res - and *.str-files. So I did that, but when I start the plugin Cinema 4D shows me an error in the *res-file.
Here is my *.res-file:>
\> CONTAINER OBaum \> { \> NAME OBaum; \> INCLUDE Obase; \> \> GROUP ID_OBJECTPROPERTIES \> { \> BOOL ECHTZEIT { } \> } \> } \> \>
The error is located in line 8, which is the BOOL...-line I think.
I also added ECHTZEIT to the *.str-files and the *.h-file.
Any idea about that?
Thanks
Basti -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 02:56, xxxxxxxx wrote:
Seems ok to me. Be aware that you need five ressource/header/string files for your plugin. They should look something like this
c4d_symbols.h
>
\> enum \> { \> // string table definitions \> IDS_BAUM = 10000, \> \> // End of symbol definition \> \_DUMMY_ELEMENT\_ \> }; \>
c4d_strings.str
>
\> // C4D-StringResource \> // Identifier Text \> \> STRINGTABLE \> { \> IDS_BAUM "Baum"; \> } \>
obaum.res
>
\> CONTAINER OBaum \> { \> NAME OBaum; \> INCLUDE Obase; \> \> GROUP ID_OBJECTPROPERTIES \> { \> BOOL ECHTZEIT { } \> } \> } \>
obaum.h
>
\> #ifndef \_OBaum_H\_ \> #define \_OBaum_H\_ \> \> enum \> { \> ECHTZEIT = 1000 \> }; \> \> #endif \>
obaum.str
>
\> STRINGTABLE OBaum \> { \> OBaum "Baum Objekt"; \> \> ECHTZEIT "Echtzeit"; \> } \>
Maybe there is something wrong in your plugin registration code?
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 03:14, xxxxxxxx wrote:
Ah, ok, I didn't know about c4d_strings.str and c4d_symbols.h. Thanks a lot!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 03:29, xxxxxxxx wrote:
Hm, still I got the error...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 03:48, xxxxxxxx wrote:
I would need some source code to help you further.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 04:13, xxxxxxxx wrote:
Oh, of course. Sorry.
My *.res-file still is unchanged.
Baum.h:
>
\> #ifndef \_OBaum_H\_ \> #define \_OBaum_H\_ \> \> enum \> { \> ECHTZEIT = 1000 \> }; \> \> #endif \>
obaum.str:
>
\> STRINGTABLE OBaum \> { \> OBaum "Baum Objekt"; \> \> ECHTZEIT "Echtzeitaktualisierung"; \> } \>
c4d_strings.str:
>
\> STRINGTABLE \> { \> IDS_BAUM "Baum"; \> IDS_SDK_VORLAGE "SDK-Vorlage"; \> \> } \>
c4d_symbols.h:
>
\> enum \> { \> \> IDS_SDK_VORLAGE, \> IDS_BAUM = 10000, \> \> }; \>
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 04:59, xxxxxxxx wrote:
please make sure that header, ressource and string file have the same name, for example "obaum.h", "obaum.res" and "obaum.str".
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 05:05, xxxxxxxx wrote:
Changed that, still the same error.
Maybe it helps to see my Init-Method:
>
\> Bool Baum::Init(GeListNode \*node) \> { \> BaseObject \*op = (BaseObject\* )node; \> BaseContainer \*data = op->GetDataInstance(); \> \> data->SetBool(ECHTZEIT,FALSE); \> \> return TRUE; \> } \>
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 05:24, xxxxxxxx wrote:
What does your register function look like? Something like this
>
\> Bool RegisterAtomObject(void) \> { \> // decide by name if the plugin shall be registered - just for user convenience \> String name=GeLoadString(IDS_ATOM); if (!name.Content()) return TRUE; \> return RegisterObjectPlugin(ID_ATOMOBJECT,name,OBJECT_GENERATOR|OBJECT_INPUT,AtomObject::Alloc,"Oatom","atom.tif",0); \> } \>
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 06:00, xxxxxxxx wrote:
There it is:
>
\> Bool RegisterBaum(void) \> { \> String name=GeLoadString(IDS_BAUM); if (!name.Content()) return TRUE; \> return RegisterObjectPlugin(ID_BAUMOBJECT,"Baum",OBJECT_GENERATOR,Baum::Alloc,"oBaum",NULL,0); \> } \>
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 06:11, xxxxxxxx wrote:
Does the "oBaum" in the RegisterObjectPlugin() function exactly match with the file names? Usally it's best to avoid upper case completly.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 07:19, xxxxxxxx wrote:
Yes, that's the exact filename (without file type extension of course).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 08:09, xxxxxxxx wrote:
Could you send me the source code? You can send it to [email protected] , it will kept confidential of course.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/06/2008 at 02:20, xxxxxxxx wrote:
Oh, thanks a lot for the offer, but I found the error! Stupid little me put the *.h-file into the wrong folder!