BGE 2.50: replace all material properties (strings) by datablock pointers (Material *) - (may affect ext. blend libraries) #22482

Closed
opened 2010-06-02 08:57:56 +02:00 by Dalai Felinto · 8 comments

%%%Hello there,
I just (finally) finished a patch to have materials - [x] and actuators

  • properties in Logic to use datablocks pointers.

There are two main advantages of this:
a) we can have nice lookups for the existent materials/actuators.
b) if you change a material name, everything get updated.

  • as a reference this is how Touch Sensor works already (since 2.49)

The downside of this is that I have no idea how well this will work
with external .blend "library" files. I tested with simple linked data
and it works fine.
However as soon as a material is no longer in the library the
sensor/actuator will not detect it anymore (no material == no
pointer).
I don't have experience using external library files with BGE, so I
would like some help to test it or at least to think if this is a real
drawback or not.

If this kind of flexibility is necessary, the alternative I see if to
add datablock lookups stored as strings (as we do for game properties,
bone and pose channel). And on top of that make the Touch Sensor to
use strings instead of pointers (for consistency sake).

  • - Ray Sensor, Collision Sensor and Constraint Actuator
  • - Actuator Sensor

Posted on bf-committers, but after talking with Campbell I agreed that it could wait until we have more games ported to 2.50 (to avoid new bugs).
The patch went through exhaustive tests though, it should be working fine.%%%

%%%Hello there, I just (finally) finished a patch to have materials - [x] and actuators - [x] properties in Logic to use datablocks pointers. There are two main advantages of this: a) we can have nice lookups for the existent materials/actuators. b) if you change a material name, everything get updated. * as a reference this is how Touch Sensor works already (since 2.49) The downside of this is that I have no idea how well this will work with external .blend "library" files. I tested with simple linked data and it works fine. However as soon as a material is no longer in the library the sensor/actuator will not detect it anymore (no material == no pointer). I don't have experience using external library files with BGE, so I would like some help to test it or at least to think if this is a real drawback or not. If this kind of flexibility is necessary, the alternative I see if to add datablock lookups stored as strings (as we do for game properties, bone and pose channel). And on top of that make the Touch Sensor to use strings instead of pointers (for consistency sake). - [x] - Ray Sensor, Collision Sensor and Constraint Actuator - [x] - Actuator Sensor **** Posted on bf-committers, but after talking with Campbell I agreed that it could wait until we have more games ported to 2.50 (to avoid new bugs). The patch went through exhaustive tests though, it should be working fine.%%%
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @Moguri

Added subscriber: @Moguri

Working on cleaning out the patch tracker:

Is this something still being worked on, or should this report be closed? If there is no response in a week, I will close this report. Active patches should start being migrated to Differential.

Working on cleaning out the patch tracker: Is this something still being worked on, or should this report be closed? If there is no response in a week, I will close this report. Active patches should start being migrated to Differential.
Author
Owner

Added subscriber: @brita

Added subscriber: @brita
Author
Owner

This was an internal patch, no new functionality to the user. @brita can tackle this if she feels like, but I don't even know if there is a real benefit to the user.

This was an internal patch, no new functionality to the user. @brita can tackle this if she feels like, but I don't even know if there is a real benefit to the user.
Member

Added subscriber: @kupoman

Added subscriber: @kupoman
Member

@dfelinto you mention 2 advantages no? The task looks like a good learning opportunity... @kupoman?

@dfelinto you mention 2 advantages no? The task looks like a good learning opportunity... @kupoman?
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
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
Interest: X11
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
4 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#22482
No description provided.