[Bf-python] Thought about IRC meeting and beyond

Joseph Gilbert jgilbert at tigr.ORG
Mon Jan 9 19:45:28 CET 2006



Toni Alatalo wrote:

>On Monday 09 January 2006 16:31, Willian Padovani Germano wrote:
>  
>
>>>1) The use of True/False over 1/0:
>>>      
>>>
>>Hi Joseph. Python itself accepts many things as true or false, as
>>discussed previously, but of course we won't go there (we won't accept
>>"" as false for functions that don't even expect a string, etc).
>>    
>>
>
>err, anything that can be evaluated as true/false should accepted where a 
>boolean is expected. those arguments should not be typechecked, just use that 
>eval func that python provides. why not just do what python does?
>  
>

Again I feel that PyObject_IsTrue is too liberal for use with tp_getset. 
However I may be (other than theeth) the only person to feel that 
'wassup' != True.

>  
>
>>Ton specifically asked us to give access via objects instead of obdata
>>right before the meeting yesterday. I'll ask him to develop his request
>>a little more to understand it throughly, so we can discuss.
>>    
>>
>
>i think i finally understood yesterday what he means. i guess it was that 
>operations on e.g. Meshes should be in MeshObjects, not in MeshData. i dont 
>know if it is a valid point, nor if i understood it the way he meant.
>
>but i guess it would, in the new api, make sense to have, instead of the 
>current:
>meshob = Blender.Get('mycube')
>meshob.getType() ==> 'Mesh'
>type(meshob) ==> <Blender Object> 
>
>something like:
>mesh = Blender.Mesh()
>type(mesh) #==> <'Blender Mesh'>
>
>and then:
>mesh.data would be a MeshData object?
>
>but we definitely need more info from Ton.
>  
>

This makes sense lol. I like the idea of a MeshObject + MeshDataObject. 
Where:
{
Object * object
Mesh *mesh
}MeshObject

{
Mesh *mesh
}MeshDataObject

This would mean that object.link(data) would simply replace the pointer.
I think this might make sense as this follows the internals of blender 
closely. As we have coded the api we realize that there are certain 
operation that require the parent object pointer. I think that a 
MeshObject would be where this data would go. Other things only operate 
on the mesh data - which is where this stuff would go.
Personally I think it's genious. :0

I dont know where the plain Object type would fall into this though.






More information about the Bf-python mailing list