KX_GameObject, not str ERROR!!! #1522

Closed
opened 2004-08-10 18:03:14 +02:00 by Jason · 3 comments

Resolution: Fixed
Category: Animation system

%%%Here's the link to the .blend. I don't have good
webspace so copy the link and paste it in a new
browser window.
http://www.geocities.com/blender3dsite/BugTest.zip
If you can get the file, skip all the instructions
and go directly to read the last lines starting
from "Hit p and..." If it doesn't work, you can go
on ahead and recreate the problem, it shouldn't take
longer than 2 minutes.

Ok, to recreate the problem. Add 4 empties in a line
in layer 1, make sure they have a good amount of
space between them. In layer 2 add a two cubes and
name it, Box, Box0. Now go to the python script
window, create a new txt file and name it, Add, and
add this in.

import GameLogic

controller = GameLogic.getCurrentController()
owner = controller.getOwner()

Lets you use that particular actuator

act = controller.getActuator("act")

act.setObject('Box0')
GameLogic.addActiveActuator(act, 1)

Select the first empty and go to the logic bricks.
Under sensor add an always sensor with pulse mode
off. Under controllers add Python and type in Add as
the script name. Under Actuators add Edit Object and
make sure the actuator name is, act. Type in, Box,
as the name for the parameter OB. Now all 4 empties
will have the same logic so shift select the right 3
empties then shift select the 1st empty. Ctrl-C and
choose logic bricks.

Hit p and 2.34 will only add 2 boxes instead of 4.
In 2.33a and 2.25, the correct 4 boxes are added. In
2.34 the console window prints out

PYTHON SCRIPT ERROR:
TypeError: argument 1 must be KX_GameObject, not str

I call this a bug in 2.34.

Jason Lin%%%

**Resolution**: Fixed **Category**: Animation system %%%Here's the link to the .blend. I don't have good webspace so copy the link and paste it in a new browser window. http://www.geocities.com/blender3dsite/BugTest.zip If you can get the file, skip all the instructions and go directly to read the last lines starting from "Hit p and..." If it doesn't work, you can go on ahead and recreate the problem, it shouldn't take longer than 2 minutes. Ok, to recreate the problem. Add 4 empties in a line in layer 1, make sure they have a good amount of space between them. In layer 2 add a two cubes and name it, Box, Box0. Now go to the python script window, create a new txt file and name it, Add, and add this in. import GameLogic controller = GameLogic.getCurrentController() owner = controller.getOwner() # Lets you use that particular actuator act = controller.getActuator("act") act.setObject('Box0') GameLogic.addActiveActuator(act, 1) Select the first empty and go to the logic bricks. Under sensor add an always sensor with pulse mode off. Under controllers add Python and type in Add as the script name. Under Actuators add Edit Object and make sure the actuator name is, act. Type in, Box, as the name for the parameter OB. Now all 4 empties will have the same logic so shift select the right 3 empties then shift select the 1st empty. Ctrl-C and choose logic bricks. Hit p and 2.34 will only add 2 boxes instead of 4. In 2.33a and 2.25, the correct 4 boxes are added. In 2.34 the console window prints out PYTHON SCRIPT ERROR: TypeError: argument 1 must be KX_GameObject, not str I call this a bug in 2.34. Jason Lin%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

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

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

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
3 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#1522
No description provided.