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).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/05/2011 at 11:29, xxxxxxxx wrote:
Hi guys,
I'm trying to register a TagPlugin, but I just can't find the issue. The following Code is for registering:
@classmethod def Register(cls, path) : data = \ { 'id': 1000002, # id for developing use 'str': "Mesh Saver", 'info': c4d.TAG_VISIBLE | c4d.TAG_EXPRESSION, 'description': "Tmeshsaver", } icon = None RegisterTagPlugin(g = cls, icon = icon, **data)
C4D Tells me that the global ressource could not be initialised.
I have the following structure:
Py-Mesh Saver\ Tmeshsaver.pyp res\ c4d_symbols.h description\ Tmeshsaver.h Tmeshsaver.res strings_us\ description\ Tmeshsaver.str
and these are my ressourcefiles:
######################################## Tmeshsaver.h ######################################## #ifndef _TMESHSAVER_H_ #define _TMESHSAVER_H_ enum { BTN_SAVEMESH = 1000 }; #endif ######################################## Tmeshsaver.res ######################################## CONTAINER { NAME Tmeshsaver; INCLUDE Tbase; GROUP ID_TAGPROPERTIES { BUTTON BTN_SAVEMESH { } } } ######################################## Tmeshsaver.str ######################################## STRINGTABLE Tmeshsaver { Tmeshsaver "Mesh Saver"; BTN_SAVEMESH "Save Mesh"; }
Do you have any idea ?
Thanks in advance ! Niklas
On 07/05/2011 at 13:39, xxxxxxxx wrote:
In the scope of the pyp file there is an object called __res__. You have to make the _res_ reference from the global scope available in the scope where you register your tag.
On 08/05/2011 at 00:34, xxxxxxxx wrote:
Unofrtunately, this doesn't solve the problem. I also couldn't find this way in any of the example Plugins..
Better I provide the whole source. http://www.file-upload.net/download-3415032/Py-Mesh-Saver.rar.html
Thanks, Niklas
On 08/05/2011 at 06:19, xxxxxxxx wrote:
Remove res=__res__, in this case its uncessary indeed. One of your folder is called string_us, but it must be strings_us. Thats why the resource structure for this plugin fails on build.
On 08/05/2011 at 08:26, xxxxxxxx wrote:
Perhaps I'm wrong. But it looks like you're also missing the proper naming convention at the top of your .res file.
I believe it should read: CONTAINER Tmeshsaver
-ScottA
On 08/05/2011 at 11:50, xxxxxxxx wrote:
Oh my god, thanks Sebastian ! And Scott you are right too.
Much thanks to both of you I really hate writing resource files .. There should be a reseditor for it