Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 923225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:09:31+00:00 2026-05-15T19:09:31+00:00

Using Blender 2.49’s Python API I’m creating a mesh. I have a list of

  • 0

Using Blender 2.49’s Python API I’m creating a mesh.
I have a list of vertices and a list of face indices.

e.g.

mesh = bpy.data.meshes.new('mesh')
mesh.verts.extend(mVerts)
mesh.faces.extend(mFaces)

I’ve noticed MVert’s uvco property and MFace’s uv
property, and added some random values, but I can’t see any
change when I render.

Regarding uvco, the documentation mentions:

Note: These are not seen in the UV editor and they are not a part of UV a UVLayer.

I tried this with the new mesh selected:

import Blender
from Blender import *
import random

scn = Scene.GetCurrent()
ob = scn.objects.active
o = ob.getData()

for v in o.verts:
    v.uvco = (random.random(),random.random(),random.random())
    print v.uvco

for f in o.faces:
    r = (random.random(),random.random())
    for i in range(0,4):
        f.uv.append(r)
        print f.uv

I can see the values change in Terminal, but I don’t see any change when I render.
If I reselect the object, the previous face uvs are gone.

Can anyone explain how are UVs set using the Blender 2.49 Python API ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:09:32+00:00Added an answer on May 15, 2026 at 7:09 pm

    Try simply replacing this line:

    o = ob.getData()
    

    with

    o = ob.getData(mesh=True)
    

    Due to the historic development of Blender Python API, an ordinary call to blender_object.getData gives you a copy of an object’s mesh data, that while can be modified, is not “live” on the displayed object. (Actually it is even an “NMesh” – a class that differs from the living “Mesh” class).

    With the optional parameter “mesh=True” passed to the getData method you get back the living mesh of the object, and changes therein have effect (that can be seen upon an update forced with after a Blender.Redraw()).

    I never tried UV things, however, so there might be more things to it, but I believe this is your issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a model using Sketchup, and have tested rendering it using Blender
I have a blender image exported using Jeff LaMarche .h export script. I am
I just created a random mesh using Blender and I want to export it
I'm writing an application for creating 3D skeletal animations. I'm currently using Blender for
I already know some Python and got interested in extending Blender using Python scripts.
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using import datetime in python, is it possible to take a formatted time/date string
I'm using Blender v.2.6.1: is there a way to export my project (.blend) to
I am using Blender 2.6 to create a model in Quake III format (md3).
What is the framework using in Blender GUI? QT? Or Tk, GTK+, FOX toolkit,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.