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 24/08/2009 at 10:16, xxxxxxxx wrote:
User Information: Cinema 4D Version: Platform: Language(s) :
--------- This is my code,
> `
\> \> Bool TrueSymmetry::Draw(PluginTag *tag, BaseObject *op, BaseDraw *bd, BaseDrawHelp *bh) \> { \> \> LONG lngMySymPlane =tag->GetDataInstance()->GetLong (SYMMETRY_PLANE); \> \> if (tag->GetDataInstance()->GetBool(SHOW_PLANE)) // If SHOW_PLANE is checked, then draw the polygon. \> \> \> { \> \> switch (lngMySymPlane) \> { case XY_PLANE: \> \> Vector p[4] = { Vector(-200,-200,0),Vector(-200,200,0),Vector(200,200,0),Vector(200,-200,0)}; \> Vector f[3] = { Vector(0,1,0),Vector(0,1,0),Vector(0,1,0)}; \> bd->Polygon3D(p,f,TRUE); \> GePrint ("Showing the Symmetry Plane"); \> return true; \> \> break; \> \> case YZ_PLANE: \> Vector p[4] = { Vector(0,-200,-200),Vector(0,200,-200),Vector(0,200,200),Vector(0,-200,200)}; \> Vector f[3] = { Vector(0,1,0),Vector(0,1,0),Vector(0,1,0)}; \> bd->Polygon3D(p,f,TRUE); \> GePrint ("Showing the Symmetry Plane"); \> return true; \> \> break; \> \> case XZ_PLANE: \> Vector p[4] = { Vector(-200,0,-200),Vector(-200,0,200),Vector(200,0,200),Vector(200,0,-200)}; \> Vector f[3] = { Vector(0,1,0),Vector(0,1,0),Vector(0,1,0)}; \> bd->Polygon3D(p,f,TRUE); \> GePrint ("Showing the Symmetry Plane"); \> return true; \> break; \> } \> \> } \> else //If SHOW_PLANE is unchecked, say goodbye to the polygon. \> { \> Vector p[4] = { Vector(0,0,0),Vector(0,0,0),Vector(0,0,0),Vector(0,0,0)}; \> Vector f[3] = { Vector(0,0,0),Vector(0,0,0),Vector(0,0,0)}; \> bd->Polygon3D(p,f,FALSE); \> GePrint ("Symmetry Plane Hidden"); \> } \> return DRAW_HANDLES|DRAW_AXIS; \> \> \> \> \> \> } \> \>
`
And these are the errors I am getting.
1>truesymmetry.cpp 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(87) : error C2360: initialization of 'f' is skipped by 'case' label 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(80) : see declaration of 'f' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(87) : error C2360: initialization of 'p' is skipped by 'case' label 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(79) : see declaration of 'p' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(88) : error C2374: 'p' : redefinition; multiple initialization 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(79) : see declaration of 'p' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(89) : error C2374: 'f' : redefinition; multiple initialization 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(80) : see declaration of 'f' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(96) : error C2360: initialization of 'f' is skipped by 'case' label 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(89) : see declaration of 'f' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(96) : error C2360: initialization of 'p' is skipped by 'case' label 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(88) : see declaration of 'p' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(96) : error C2360: initialization of 'f' is skipped by 'case' label 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(80) : see declaration of 'f' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(96) : error C2360: initialization of 'p' is skipped by 'case' label 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(79) : see declaration of 'p' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(97) : error C2374: 'p' : redefinition; multiple initialization 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(79) : see declaration of 'p' 1>c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(98) : error C2374: 'f' : redefinition; multiple initialization 1> c:\users he fosters\desktop\cinema4dr11010\plugins ruesymmetry\source ag ruesymmetry.cpp(80) : see declaration of 'f'
Can anyone tell me what I am doing wrong.
On 24/08/2009 at 10:30, xxxxxxxx wrote:
nevermind. solved this one too.. added my if statement to each case
thanks,
~Shawn