Set another path for res files?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/02/2009 at 05:39, xxxxxxxx wrote:
unless you write your own resource file managment system.
Oh,....
Do you have a suggestion what I can do to support that stuff for custom python plugins? It seems I found out a workaround how to support TagData, ObjectData, etc. for Python plugins but internally Py4D registers the plugins so the res files will be searched in the res folder of Py4D.
Bye
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/02/2009 at 06:06, xxxxxxxx wrote:
I guess it would be possible through GetDDescription() to read resource files. But I think you would have to write your own resource file loader/parser.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/02/2009 at 07:12, xxxxxxxx wrote:
Is it just possible to create SubDialogs in the AttributeManager for NodeDatas via res files or can I support dialogs in a different way?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/02/2009 at 09:24, xxxxxxxx wrote:
This isn't possible either. ToolData is the only plugin type that utilizes a SubDialog for the Attributes Manager. The rest use Descriptions through resources (and dynamic Descriptions added in GetDDescription()).
I would imagine that although the plugins menu items might be in a different menu, the resources are still in their proper respective places: C4D/plugins/Py4D/plugins/myplugin/res/... Nesting shouldn't be a problem here (afaik).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/02/2009 at 11:47, xxxxxxxx wrote:
Yes, but CINEMA 4D doesn't know the python plugins. All is wrapped by py4d so CINEMA doesn't notice any *.pyp plugins or their paths. Its just searched in the Py4D res folder.
Matthias, is there an undocumentated method which could help me? CINEMA knows the Coffeee plugin paths, even COFFEE is more close to the core than my plugin but it seems there is something that could help me.
Thank you very much indeed!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/02/2009 at 01:28, xxxxxxxx wrote:
I don't understand what is different between COFFEE and regular C++ plugins. Afaik COFFEE handles resource files the same as C++ plugins.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/02/2009 at 03:30, xxxxxxxx wrote:
Correct me if I am wrong but I assume the concept of the integration of Python plugins is the same like in Coffee.
When I want to execute a Python plugin and I call the register_tagdata(...) function in Python, I parse the syntax and if register_tagdata(...) is reached in the code, I catch the given arguments and redirect them to a C++ function. In this case a function in "Py4D". So Py4D calls the Register*() functions and CINEMA 4D doesn't know anything about the python plugins.
Because Py4D calls the Register*() methods the description files will be searched in the res folder of Py4D.
But here is the difference to Coffee. Coffee plugins can contain their own directory with res files.
plugins/my_coffee_plugin/res/
And because the Coffee plugin does not really ( I guess something else in CINEMA 4D does it) call the original Register*() functions there has to be a possibility to register a new directory for res files like:
ResFolder desc; //* just an example *//
desc.SetAnotherResFolder("/.../res")
RegisterDescription(123, desc);
RegisterTagData(.... , 123, );I hope thats more informative.
Thanks. Bye
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/02/2009 at 04:49, xxxxxxxx wrote:
Ok, that is something I have to ask the developers.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/02/2009 at 04:56, xxxxxxxx wrote:
Thanks! If you have any questions what I've aready checked out or if you need further information, just ask. Can't wait to get a solution..
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/03/2009 at 03:30, xxxxxxxx wrote:
Hi!
Any news?
Thanks.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/03/2009 at 07:10, xxxxxxxx wrote:
Global Pointer:
GeResource *myres = NULL;In C4D_PL_INIT:
>
Filename fn = GeGetPluginPath()+Filename("custom_res_folder"); \> myres = gNew GeResource; \> LocalResource\* local = NULL; \> \> if(myres && myres->Init(fn)) \> { \> local = myres->Get(); \> //Descriptions \> RegisterDescription(ID,"Tcontainer",local); \> }
and in C4DPL_ENDACTIVITY:
>
if(myres) \> { \> myres->Free(); \> gDelete(myres); \> }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/03/2009 at 07:37, xxxxxxxx wrote:
The problem with that is he is trying to implement Python (Py4D) plugins and not simply C++ plugins. If he is able to transmit the necessary information (plugin folder, id, type name) from one of these plugins to the C++ code and have it associated with the Py4D plugin then this might be possible.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/03/2009 at 08:13, xxxxxxxx wrote:
3DDesigner: I already tried this out but that does not work because Get() always returns "NULL".
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2009 at 03:18, xxxxxxxx wrote:
I am using this exact code myself (working flawlessly), so either you are doing something wrong or......I don´t know why it´s not working for you. My custom folder is inside my plugin`s folder.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2009 at 07:21, xxxxxxxx wrote:
@3DDesigner:
You wrote you use it in In C4D_PL_INIT:I would like to call in in PluginStart. Maybe thats the reason why it does not work?
it seems I have problems to explain it well enough, but maybe there is a solution
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2009 at 07:35, xxxxxxxx wrote:
Maybe PluginStart() is too early for this type of registration to work. Try it in PluginMessage() with C4DPL_INIT. Hopefully that won't make a difference for registering the python plugins.
But, I see a problem. Samir is only registering a single plugin but you'll be registering any number of plugins. So, this idea of storing 'myres' is going to get tricky - you'll need a myres for every plugin description resource being registered this way in order to free them later in C4DPL_ENDACTIVITY.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2009 at 07:40, xxxxxxxx wrote:
yep, I think this is the problem. It must be registered in C4DPL_INIT_SYS as that´s also when plugins check if the resources are available, so I assume it´s fundamental to register the resources at that point in the pipeline.
C4DPL_INIT is maybe too late (was a typo that I wrote it´s the one to be used! it´s INIT_SYS). Is there a special reason why you need to do it in PluginStart() (which is actually called by C4DPL_INIT)?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2009 at 08:38, xxxxxxxx wrote:
Because of several initialization stuff of python and the parsing of the python files, I have just the possibility to execute the plugins code at PluginStart.
thats very tricky. hm...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2009 at 10:43, xxxxxxxx wrote:
Ok. Hmm, but doesn´t plugin start come AFTER resource registering?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2009 at 10:52, xxxxxxxx wrote:
I opened RegisterTag() and saw that a description is registered before - for each RegisterTag().
So I just copied the whole content of the original Registration method and changed the RegisterDescription() method with the given examples here in the thread.
The other thing was just to register another res folder for the whole project (your example) but that does not work either.