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 28/03/2003 at 10:56, xxxxxxxx wrote:
User Information: Cinema 4D Version: 8.100 Platform: Windows ; Language(s) : C++ ;
--------- Hi. I'm new to programming plug-ins for Cinema, and I have a problem with the "description"-container. I didn't have enough time to look into the API that much... I just took the examples that are given with the SDK and modify (a copy of) the shaders there to achieve my goal. And it works pretty fine, up to the point when I try to use a VECTOR or a TEXGROUP element in the "description". Then I get a "failed to load resource" error when I click on the "edit"-button. I've compared my "description" with the one from the bitmapDistortionshader (BDS) and it's exaclty the same bar the names of the identifiers. It works for the BDS but not for my shader. Is there something I'm forgetting that you have to define/initialize somewhere when using elements other then REAL? I hope somebody can help me with this...
On 28/03/2003 at 11:01, xxxxxxxx wrote:
Could you post the .res, .h and .str files for your plugin?
On 28/03/2003 at 11:14, xxxxxxxx wrote:
Sure! Here's the XAnimatedGradient.res: CONTAINER XAnimatedGradient { NAME XAnimatedGradient; INCLUDE Xbase; GROUP ID_SHADERPROPERTIES { TEXGROUP AG_BASETEXTURE { } //VECTOR AG_STARTINGPOSITION { UNIT REAL; } REAL AG_CURRENTPOSITION { STEP 0.01; } REAL AG_ANGLE { UNIT DEGREE; } REAL AG_GRADIENTWIDTH { MIN 0.0001; STEP 0.01; } } } The error is always generated at the line TEXGROUP is at. Here's the XAnimatedGradient.h: #ifndef _XAnimatedGradient_H_ #define _XAnimatedGradient_H_ enum { AG_BASETEXTURE = 1000, AG_STARTINGPOSITION, AG_CURRENTPOSITION, AG_ANGLE, AG_GRADIENTWIDTH }; #endif //_XAnimatedGradient_H_ and lastly the XAnimatedGradient.str: STRINGTABLE XAnimatedGradient { XAnimatedGradient "Animated Gradient Shader"; AG_BASETEXTURE "Texture"; AG_STARTINGPOSITION "Starting position"; AG_CURRENTPOSITION "Current position"; AG_ANGLE "Angle"; AG_GRADIENTWIDTH "Gradient width"; }
I've noticed that the "base texture" is stored as a BaseChannel instance in the BitmapDistortionShader, and that it is allocated, initialized and sampled, but there doesn't seem to be a call to explicitely add it to the container data in the way of SetReal(). Hope this helps... me in future
On 04/04/2003 at 06:28, xxxxxxxx wrote:
I really can't see what the error could be. My only advice would be to create a new clone of the SDK and make smaller changes to the example, observing when it stops working.