Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Change parameter in texture tag

    SDK Help
    0
    3
    288
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 12/02/2004 at 06:28, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.207 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I use my own object and shader. This pair should only use UVW-Mapping. So, within my object, I grab a pointer to the texture tag, and want to set the projection to uvw....
      GePrint( "textag " + LongToString( ptagdata->GetLong( TEXTURETAG_PROJECTION ) ) );
         ptagdata->SetLong( TEXTURETAG_PROJECTION, TEXTURETAG_PROJECTION_UVW );
         GePrint( "textag " + LongToString( ptagdata->GetLong( TEXTURETAG_PROJECTION ) ) );
      Before, the projection is set to 0, after it is set to 6. This value is kept, if I run to that lines later, I also read 6 before the setting line. So, the new value should be sucessfully written into the tags container. But if I look at the attributes of the tag in the manager, the projection is still set to the original value, and when I start rendering, also the original value is used......is it impossible, or is there a way to do it? The user would have to set the projection to uvw MANUALLY for each object, thats not too nice.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 12/02/2004 at 23:12, xxxxxxxx wrote:

        Found something strange....when I take a cinema basematerial and drop it onto my object, then the texture tag is set to uvw-mapping by default. If I use my own shader and drop it on my object, then spherical projection is set by default. This depends on the material I use, but not on the kind of object. So somehow it has to deal with or even can set by the material/shader. But how?

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 15/02/2004 at 16:22, xxxxxxxx wrote:

          Some things I can think of:

          1. I assume that ptagdata is what you get from GetDataInstance(), right? (GetData() won't work in that way.)
          2. Perhaps you need to call tag->Message(MSG_UPDATE)?
          3. A more fool proof way to set parameters in C4D R8 is to use SetParameter(). That would be:
              
              
              tag->SetParameter(DescLevel(TEXTURETAG_PROJECTION), GeData(TEXTURETAG_PROJECTION_UVW), 0);
          

          1 Reply Last reply Reply Quote 0
          • First post
            Last post