Getting started with scripting in Blender, coming from 3DS Max... sort of.

I cut my teeth on Maxscripting and found it to be fun. Haven’t used it in a while, so while brushing up on that, I’m giving Blender scripting a shot. Learned a bit of python recently, and tried doing something I remember being relatively easy in Maxscript, linking one of the values of one object’s location to another object, for example Obj1.location.x to Obj2.location.y.

It’s not quite working. :slight_smile:

It does it for that instance, but when I move object 2, object 1 doesn’t react at all. I’m wanting this to work in the Python API, not the game engine API (different beast for a later time). The difference I think I’m expecting here is that Maxscript is constantly evaluating things and there doesn’t appear to be anything in blender’s python API to tell it to constantly evaluate something. Tried “while 1 ==1: etc…” to link the objects and hopefully have one move when moving the other, no dice.

Help and pointers in the right direction are greatly appreciated.

I too come from a heavy Maxscripting background.

In this case, all you need is a driver. You are trying to drive the Y location of object#2 from the X location of object 1. No code is needed.

But if you do want your code to run every time the frame changes, feel free to click on the link in my signature. That will take you to a links page where you can download the frameChange AddOn I wrote.

Thanks for the reply. :slight_smile: I’ll check it out a bit later on today and let you know how it works out.

this http://www.blendernation.com/2011/05/27/realtime-non-game-engine-physics-in-blender/ may be interesting…