On 26/10/2016 at 03:02, xxxxxxxx wrote:
I'm trying to create a plugin.
I cannot get ID BOOL.
Prompt me please where I have an error
ConsoleLog:
AttributeError: 'module' object has no attribute 'ID_TEST1'
TEST\Test.pyp
import c4d
PLUGIN_ID = 1234390
class Otest(c4d.plugins.ObjectData) :
def Init(self, op) :
print c4d.ID_TEST1,c4d.ID_TEST2,c4d.ID_TEST3
return True
def GetVirtualObjects(self, op, hierarchyhelp) :
return c4d.BaseObject(c4d.Ocube)
if __name__ == "__main__":
c4d.plugins.RegisterObjectPlugin(id=PLUGIN_ID,str="Test",g=Otest,description="Otest",icon=None,info=c4d.OBJECT_GENERATOR)
TEST\res\description\Otest.h
#ifndef _OTEST_H_
#define _OTEST_H_
enum
{
Otest=10000,
ID_TEST_GROUP=10014,
ID_TEST1=1015,
ID_TEST2=1016,
ID_TEST3=1017,
};
#endif
TEST\res\description\Otest.res
CONTAINER Otest
{
NAME Otest;
INCLUDE Obase;
GROUP ID_TEST_GROUP
{
BOOL ID_TEST1 { ANIM OFF; }
BOOL ID_TEST2 { ANIM OFF; }
BOOL ID_TEST3 { ANIM OFF; }
}
}
TEST\res\strings_us\description\Otest.str
STRINGTABLE Otest
{
Otest "Otest";
ID_TEST_GROUP "TEST";
ID_TEST1 "TEST1";
ID_TEST2 "TEST2";
ID_TEST3 "TEST3";
}