Only search projects.blender.org
Log In
New Account
Home
My Page
Projects
Blender 2.x BF release
Summary
Activity
Tracker
SCM
Files
Blender 2.6 Bug Tracker: Browse
[#23576] Logic Bricks: non-active objects retrieves the wrong Actuator type
Date:
2010-08-29 13:32
Priority:
3
State:
Closed
Submitted by:
Constantin Rahn (
conz
)
Assigned to:
Ton Roosendaal (ton)
Category:
Interface
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
Summary:
Logic Bricks: non-active objects retrieves the wrong Actuator type
Detailed description
2.53 r31593
When linking a GameLogic from one object to some other, not all actutors are available.
Example: Logic to activate an animation of an armature from an empty. (same logic like the characters in "Yo Frankie")
The UI in 2.5x filters all possible Actuators for an object. But you can link the logic to some other object, which can have other possible Actuators. (eg. the ActionActuator)
This throws an error in the console: "RNA_enum_get: ActionActuator.mode not found."
I have attached a screenshot and a small demo blend.
Same as attached:
http://www.vrchannel.de/blender/GE_Actuator_Bug.png
http://www.vrchannel.de/blender/ActionActuator_Bug.blend
The possible Actuators from the linked object should be accessable, too.
Followup
Message
Date
: 2010-08-29 19:52
Sender
:
Dalai Felinto
ok, confirmed here.
Note to self: the problem can be in the context, it may be always using the active object instead of the object that contains the Logic. Strange.
Date
: 2010-09-01 00:29
Sender
:
Dalai Felinto
The error thrown had nothing to do with the main bug. I fixed the error problem, but not the main one. Renaming the bug report for clarity sake.
Date
: 2010-09-01 01:24
Sender
:
Dalai Felinto
Hi Matt,
I narrowed down this bug a lot, but I think I could use some help to finish it.
The problem:
in rna_actuator.c line 393 we have:
if (ptr->type == &RNA_Actuator) {
We need instead (pseudo-code):
if rna_pointer_inherit_is_refined(ptr->type, &RNA_Actuator)
Otherwise this test always fails since the pointer passed from logic_window.c have the type already refined. Any suggestions on how to proceed from here?
Thanks
* I'm attaching a simpler file where you can see the problem (armature_act.blend)
* renaming the bug report again
Date
: 2010-11-24 15:35
Sender
:
Ton Roosendaal
Dalai: it was very easy to just add the two exceptions (armature, mesh) for making this function work.
Doesn't take away that a inherited type check would be useful too. Fix is in svn now.
Date
: 2010-11-24 15:59
Sender
:
Brecht Van Lommel
For reference, rna_pointer_inherit_is_refined already exists, it's called RNA_struct_is_a :)
Date
: 2010-11-26 05:00
Sender
:
Dalai Felinto
Thanks Brecht. I replaced the hardcode by RNA_struct_is_a and changed the test in sensors as well (not needed now, but could show up as a bug in the future).
Attached Files:
Name
Date
Download
GE_Actuator_Bug.png
2010-08-29 13:32
Download
ActionActuator_Bug.blend
2010-08-29 13:32
Download
armature_act.blend
2010-09-01 01:24
Download
Changes:
Field
Old Value
Date
By
close_date
2010-11-26 05:00
2010-11-26 05:00
dfelinto
close_date
2010-11-24 15:59
2010-11-24 15:59
blendix
Resolution
Investigate
2010-11-24 15:35
ton
close_date
2010-11-24 15:35
2010-11-24 15:35
ton
assigned_to
broken
2010-11-24 15:35
ton
status_id
Open
2010-11-24 15:35
ton
assigned_to
dfelinto
2010-09-01 02:07
dfelinto
File Added
12416: armature_act.blend
2010-09-01 01:24
dfelinto
Category
Game engine
2010-09-01 01:24
dfelinto
summary
GameLogic: Actuator from obj to other obj doesn\'t show the type name
2010-09-01 01:24
dfelinto
summary
GameLogic: Actuator from obj to other obj throws error
2010-09-01 00:29
dfelinto
Resolution
None
2010-08-29 19:32
dfelinto
assigned_to
none
2010-08-29 19:32
dfelinto
File Added
12379: ActionActuator_Bug.blend
2010-08-29 13:32
conz
File Added
12378: GE_Actuator_Bug.png
2010-08-29 13:32
conz