sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Duplicate Material (in materials) with correct texture API

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 4.4k Views 1 Watching
    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.
    • artmusicstudioA Offline
      artmusicstudio
      last edited by

      hello,
      i have a small script, which

      • takes the material from a selected face
      • creates same material as copy in "materials" with a indexed name
      • copy includes the texture of the source material

      BUT

      my problem is, that the texture in the copied material is beeing reset to original size (although adjusted manually in the material section).

      is it possible to retrieve the texture exctly and asign it again to the indexed material?

      i studied the texture section and can get width/height (original size) an maybe also uv,
      but i do not find a way to aply it again to a new material.

      thanx for any tip!

      stan

      edit: just found a way:

      • create new material
      • retrieve path of source-material-texture
      • load it directly ( material.texture = path)
      • assign [tw,th] from source-material....

      it works this way around 😄

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement