Rotlopes (for Klopes)

Hi Klopes

I just tried your rotlopes python script, and I can’t get it to work.

I keep getting the error:

Processing object RuedA
Traceback (most recent call last):
File “Rotlopes20G.py”, line 84, in ?
AttributeError: Unknown object specified.

I believe I have followed the instructions properly:
Added loc ipo curves for the object,
renamed the object ‘RuedA’
set the rotation axis (EJE)
entered the python script name in the right hand side of the script window, with the ‘framechanged’ mode.

What am I missing?

<Update>

I managed to get it working.
Very cool script Klopes :slight_smile:

I am using a September 24 build of Tuhopuu2 (also tried it in 2.28a), and for some reason, I had to manually add and name the Empty ‘.Buff.RuedA’ before it would work. I’m no Python expert, but it seems like your Python script has some code to automatically do this.

Here’s what I did, in case I’m messing up somewhere:

[>] Name the default plane ‘RuedA’
[>] Insert a location ipo, advance to frame 21, move the plane, inset another location ipo,
[>] Add an Empty and name it ‘.Buff.RuedA’,
[>] load the rotlopes python script and enter it’s name in the script window in the right hand side of the window,
[>] Change the axis rotation to ‘Z’ (line 52, EPE=Z)
Advance the frame number.

When I return the frame number to 1, the plane isn’t rotated back to it’s initial orientation. Is there a way to correct or prevent this?

Also, would it be possible to have a fast rotation, even when the object doesn’t move -> ie. when an automobile spins it’s tire at the start or perhaps gets stuck in mud?

Finally, I notice in your example blend file the circle “spins out” going up the ‘incline’, and falls back down; was this intentional or some other reason for it?

</Update>

I’m no Python expert, but it seems like your Python script has some code to automatically do this.
Right. It must be done :-? I’ll try to update.

When I return the frame number to 1, the plane isn’t rotated back to it’s initial orientation. Is there a way to correct or prevent this?
Oh, sorry. The script is a quick&easy to implement way to get rotations, and many ‘realistic’ features left. The same answer is valid for:
I notice in your example blend file the circle “spins out” going up the ‘incline’, and falls back down; was this intentional or some other reason for it?
In this case, the movement has the goal to show the limitations of the method. The reason is: the script has no way to know the tire what is sliding over: whether it’s a ground, either a wall, a ceiling…? I’ve supossed balls round over ground :slight_smile:

Sorry for the late again (i sent you a private some days ago), i’ll try to fix some points, thank you.

Done! Now it works on 2.28c. Indeed, you may delete the nasty empties and they continue afecting from the memory space.

Visit (new address, less commercials… a bit less :< ):

As always… ¡en ESPAÑOL!:

Klopes:

I am getting the following error running the new script from your Blend file under Blender 2.28c (Win98) :

Processing object RuedA
Traceback (most recent call last):
File “Rotlopes2.0G”, line 94, in ?
AttributeError: expected a String as argument

Hi there,
I got the script working, at least for the normal circle (not for that star shaped thing)
by adding
‘.Buff.’+o.name
as a second parameter to the New() in the except part and deleting the oBuff.setName() statement that caused the
" expected a String as argument".

Btw, is there any better way to pass information from one
FrameChanged call to the next, than to store it in an Empty?

But: Very cool script, does pretty much what I was looking for
Cheers, Holter

Thanks for the fixing, holtermp.
I’m waiting for next corrections on the API before doing nothing, this’s too…
changing.

Btw, is there any better way to pass information from one
FrameChanged call to the next, than to store it in an Empty?

Sure!, writing on a file? %|
Well, there’s the ReleaseGlobalDict() statement, I guess it’s used for preserve (or not) values, but i prefer not to venture, by now…[/i]