Home

again material problem link/shareFrom()
Closed, ArchivedPublic

Description

Group: V 2.31 release
Resolution: Fixed
Category: Python

Hi,

there is still a problem when using obj.shareFrom
(obj2) and/or obj.link(mesh) and mesh is already
linked to another object.

Reproduce it:
- create a cube named "Cube" with mesh "Cube". Give
the cube mesh a material
- execute the script:

from Blender import *
o = Object.New("Mesh", "x")
o1 = Object.Get("Cube")
Scene.GetCurrent().link(o)
o.shareFrom(o1)


"x" is created and linked to the mesh of "Cube". But
if you go to the material buttons window, you will see
that "x" is linked to mesh "Cube", but no materials
are shown!!! There should be at least one.

Problem seems to be, that Object.link() and
Object.shareFrom() do not update the totcol and actcol
elements of struct Object.

I tried to set object->totcol from the mesh's totcol
and actcol = 0, seemed to work, materials are now
shown in the materials buttons window, but opening the
OOPS window crashes Blender. Seems i missed
something ;)

BalaGi
balagi (Thomas Maier) set Type to Bug.Via Old WorldJan 12 2004, 11:33 PM
ianwill (Willian Padovani Germano) closed this task as "Archived".Via Old WorldJun 12 2004, 8:14 AM
None (Nobody) added a comment.Via Old WorldJan 12 2004, 11:33 PM

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.

Add Comment