since BMesh, files < 2.59.3 no longer have their texface converted #32067

Closed
opened 2012-07-10 22:46:02 +02:00 by Dalai Felinto · 6 comments

%%%The code to convert texface into material options is relying on functions deprecated since BMesh.

In the do_version_tface routine (in material.c) the following line is always returning -1 making the conversion to never to happen:
index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);

The code needs to be updated to use BMesh loop routines (e.g. to use MTexPoly instead of MTFace, and whatever else is needed).

To try with the attached file open it with Blender svn (>2.63) and in Material Panel (for material 'People') go to Game Settings and see the Face Orientation.
It should be Billboard

  • Note: I'm trying to look at that, but the code is big and BMesh data structure is new to me. If anyone can help on that would be lovely. I consider this an important, given that it affects backward compatibility of any pre-259.3 BGE file.
    ** And please don't move this bug to the BGE Tracker. This is not a BGE bug, but a BMesh one.%%%
%%%The code to convert texface into material options is relying on functions deprecated since BMesh. In the do_version_tface routine (in material.c) the following line is always returning -1 making the conversion to never to happen: index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE); The code needs to be updated to use BMesh loop routines (e.g. to use MTexPoly instead of MTFace, and whatever else is needed). To try with the attached file open it with Blender svn (>2.63) and in Material Panel (for material 'People') go to Game Settings and see the Face Orientation. It should be Billboard * Note: I'm trying to look at that, but the code is big and BMesh data structure is new to me. If anyone can help on that would be lovely. I consider this an important, given that it affects backward compatibility of any pre-259.3 BGE file. ** And please don't move this bug to the BGE Tracker. This is not a BGE bug, but a BMesh one.%%%
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'

%%%Looked deeper into the issue. In fact, this code doesn't seems to be able to be converted to bmesh -- it's totally versioning stuff which still should use tesselated faces.

The issue was caused by the fact that tesselated faces were being cleared in lib_link_mesh (by BKE_mesh_tessface_clear).

Prepared a patch which does a mtface conversion for per-mesh which is being called before clearing tessfaces. It seems to be working, but need to be tested further -- there's a chance that this change introduced some regressions in how materials are creating.

Dalai, could you doublecheck this changes?%%%

%%%Looked deeper into the issue. In fact, this code doesn't seems to be able to be converted to bmesh -- it's totally versioning stuff which still should use tesselated faces. The issue was caused by the fact that tesselated faces were being cleared in lib_link_mesh (by BKE_mesh_tessface_clear). Prepared a patch which does a mtface conversion for per-mesh which is being called before clearing tessfaces. It seems to be working, but need to be tested further -- there's a chance that this change introduced some regressions in how materials are creating. Dalai, could you doublecheck this changes?%%%
Author
Owner

%%%Hi Sergey, the patch creates problems with other files. - see everythingTF.blend
This file works perfectly in rev. 40371 (2.59.2 - aka pre-texface commit) and with a good doversion in 2.61 (or probably any other release after 40371).%%%

%%%Hi Sergey, the patch creates problems with other files. - see everythingTF.blend This file works perfectly in rev. 40371 (2.59.2 - aka pre-texface commit) and with a good doversion in 2.61 (or probably any other release after 40371).%%%

%%%OK, would check on that.%%%

%%%OK, would check on that.%%%

%%%I believe it was fixed in svn rev48866. Would be cool if you'll do a full regressions tests of this stuff -- from my side it seems to be working as it's expected, but i'm not su familiar with BGE :)%%%

%%%I believe it was fixed in svn rev48866. Would be cool if you'll do a full regressions tests of this stuff -- from my side it *seems* to be working as it's expected, but i'm not su familiar with BGE :)%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#32067
No description provided.