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

    TextureBitmap-Where to find it?

    SDK Help
    0
    6
    513
    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 25/06/2008 at 15:09, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10+ 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      I need to get the pixelsize (GetWidth() , GetHeight()) of a bitmap that is already loaded.
      Where and in what Container is it?
      I can get the name and filepath and reload it from disk into a new(BaseBitmap) but:
      A. it is very slow.
      B. if the path is relative there is no path to go by (without extra search and thus even slower.

      I do feel a little rusty, but just can't find the loaded bitmap/correct container.....

      Cheers
      Lennart

      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 25/06/2008 at 15:11, xxxxxxxx wrote:

        What I have and works with absolute paths is:

        > \> var mat=doc->GetFirstMaterial(); \> if(!mat) return; \> \> \> var channel = mat->GetChannel(CHANNEL_COLOR); \> \> if(mat#MATERIAL_COLOR_SHADER->GetType()!=5833) \> { \> println("No bitmap"); \> return; \> } \> var path    = mat#MATERIAL_COLOR_SHADER#BITMAPSHADER_FILENAME; \> var name    = path->GetLastString(); \> //     var file = GenerateTexturePath(name, doc->GetFilename()); \> \>      var bitmap = new(BaseBitmap,1,1); \>      bitmap->Load(path); \> \>      var bm_x, bm_y; \>      bm_x = bitmap->GetWidth(); \>      bm_y = bitmap->GetHeight(); \> \> println(name,": ",bm_x,"--",bm_y); \>

        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 26/06/2008 at 00:48, xxxxxxxx wrote:

          Where is the bitmap loaded, in a material/shader?

          cheers,
          Matthias

          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 26/06/2008 at 02:52, xxxxxxxx wrote:

            Hi. Here it is loaded in a Colorchannel of a material.
            It could be loaded in any channel (luminance,alpha etc)
            but that I can check if I know where to look for it.

            thanks
            Lennart

            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 30/06/2008 at 12:04, xxxxxxxx wrote:

              I'm not there...
              I see the size info of the loaded bitmap in the Material AM as well as if I
              use the "Bitmap properties" command but no luck in getting it from
              the channel basecontainer..
              If anyone knows I'd be happy.
              I'll keep on searching meanwhile.

              Cheers
              Lennart

              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 30/06/2008 at 17:56, xxxxxxxx wrote:

                Unfortunatly the resolution or the link to the bitmap is not stored in a container. You have to check the bitmap manually, going by the path provided.

                cheers,
                Matthias

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