Jump to content
Light-O-Rama Forums

Shifting the animation without redrawing it


ItsMeBobO

Recommended Posts

This solution builds on this topic started by Steven Jul 2008
http://lightorama.mywowbb.com/forum77/16790.html

You have an animation you want to keep but you need more space on the left or top and do not want to redraw it.

The basic steps to resize and shift your animition in SE are
Remove any background image from your animation
Enter you new image dimensions. New rows are added to the right and bottom.
Export your config to a new work filename. Dont overlay a prior one.
Using notepad open the config and add the line as line 2

<?xml-stylesheet type="text/xsl" href="shiftani.xsl"?>


Save the config with extension XML instead of lcc.

Clip the code below and paste it into notepad.
Type in your shift values for RowChange and ColChange. They can be positive or negative but must not result in the animation moving off the page.
Note that a minus sign - is ok but + on a positive number fill cause it to fail. Just use 30 not +30
Save this as shiftani.xsl into the same folder where the modified config is.
Now open the modified config in IE by pastiing in the full file name.
You should immediately see the result of your transformation.
Now you clip this out of IE and paste it into your config file replacing it entirely. No editing at all.
Save the replaced config but save AS with extension .lcc as SE expects.
Import this file into your sequence in SE.
Check that it looks correct before saving your sequence.


This xsl file is longer BUT the only two values to change for your situation at near the top lines 5+6.

<?xml version="1.0" encoding="ISO-8859-1"?>







<?xml version="1.0" encoding="UTF-8"
standalone="no"?>



">













" columns="

" image="

" hideControls="

">














" color="

" deviceType="

" unit="

" circuit="

" savedIndex="

" />









" >














" />









" >







" >



" channel="

" />






Link to comment
Share on other sites

I must be dense.:?

I got your file from the site. It had the &lt not the <.

I added 10 extra rows to the right and bottom of my config file. I modded the shiftani file to do plus 8 in both cases (no + sign) and saved as .xml. I opened config file in Notepad and added line 2 to my config file; then saved as .xml.
Opened config.xml in IE. It appeared to do something. Viewed resulting file as source. Saved it with .lcc. Imported in my sequence. No shifting of rows or columns.

Help!

BTW, if you put a minus sign in before the numbers for RowChange or ColumnChange, would the animation shift upwards and left? If so, what is the point of that since you could just increase the size of the grid? Appreciate what you are doing, but still need assistance. I may do a compare to the config file before and after opening in IE to see if there is a difference.

Do you ever need to remove line #2 from config file?

Richard

Link to comment
Share on other sites

rjnitto wrote:

I must be dense.:?

I got your file  from the site.  It had the < not the <.

I added 10 extra rows to the right and bottom of my config file.  I modded the shiftani file to do plus 8 in both cases (no + sign) and saved as .xml.  I opened config file in Notepad and added line 2 to my config file; then saved as .xml.
Opened config.xml in IE.  It appeared to do something.  Viewed resulting file as source.  Saved it with .lcc.  Imported in my sequence.  No shifting of rows or columns.

Help!

BTW, if you put a minus sign in before the numbers for RowChange or ColumnChange, would the animation shift upwards and left?  If so, what is the point of that since you could just increase the size of the grid?  Appreciate what you are doing, but still need assistance.  I may do a compare to the config file before and after opening in IE to see if there is a difference.

Do you ever need to remove line #2 from config file?

Richard


No worries Richard. I am happy to help and if we cant figure it out you can send me the file and I will apply the change for you.

The file which contains the transform instructions is shiftani.xsl (not xml as you say above) This is the same name that is added as href="" on line two to your exported config.
The output should be usable as the replacement config. The line you added should not be in the result so you dont have to remove it. If it is there then the transform did not work.
Yes the positive numbers would usually be used as they move to the left and down which is where LOR adds the extra new rows or columns.
Link to comment
Share on other sites

ItsMeBobO wrote:

No worries Richard. I am happy to help and if we cant figure it out you can send me the file and I will apply the change for you.

The file which contains the transform instructions is shiftani.xsl (not xml as you say above) This is the same name that is added as href="" on line two to your exported config.
The output should be usable as the replacement config. The line you added should not be in the result so you dont have to remove it. If it is there then the transform did not work.

I appreciate your offer, but I'm stubborn and want to get it to work (as my grandkids say, I can do it myself :)). If I can't ever solve it, I may take you up on it.

My shiftani file is .xsl not .xml. I've tried the script with IE and Firefox and get the same following results. Your script does its job :D , the added 2nd line is gone, and I can see the modified row indexes in the transformed results. However, I do notice that all the indents in the final results are missing; is that a problem?

Anyway, I think I have isolated my problem area, and still need your help. You stated the following ...

Now you clip this out of IE and paste it into your config file replacing it entirely. No editing at all.

Save the replaced config but save AS with extension .lcc as SE expects.

Using notepad with file types set to all files, opened my old .lcc config, selected all (so it is all highlighted).
In the IE results page, I select all, copy, go back to notepad, and paste.
If I now save, it saves it as an .lcc file. If I save as, and add the .lcc extension it appears to save it the same way. In both cases, the indents are missing (when you open them up in Notepad).

In SE, when I try to import either file, I get "Unknown device type name:" error.

I'd like to know if anyone else has attempted this with no errors. If you would prefer to respond using a PM so we don't dominate this thread with "MY" problem, that would be OK also.

Richard

Link to comment
Share on other sites

Its normal for all of the indenting to be gone. This is just for readability not function. After a successful import into SE, if you do an export again you will see that SE put the indents back in again. You got the saving down.

It sounds like you got a lot further but the transformation file may have a bug which would be my mistake. SE is validating the file (as it should since the open xml format invites this kind of manipulation) and the deviceType has something wrong with it. Maybe you could visually scan it and see if all of your channels look like this with something between quotes after deviceType. Must be one of
LOR, Dasher, Digital IO, BSoft Digital IO, X10. I just discovered that if you have "Sequence" in there the published solution wont work.

Link to comment
Share on other sites

I'm just guessing here; I haven't looked at this closely.

Perhaps the transformation changes an entry without a deviceType attribute (which, in a save file, indicates that the channel's device type is not set) to an entry that has a deviceType attribute set to an empty string. Something like:

deviceType=""

LOR won't understand that. It will understand a complete lack of a deviceType attribute, and I believe it will also understand the following to mean the same thing:

deviceType="(none)"

But it will not understand:

deviceType=""


Link to comment
Share on other sites

Bob may have the answer. I've copied a few lines to show differences between the two files. Blue is original. Red is Transformed.

Also, every line in this group has an extra space between the savedIndex="0" and the />. This might not add to the problem, but the transformed file does add deviceType="" unit="" circuit="" to every line that does not have a device.

Maybe this will help you analyze the problem. Are we having fun yet? :D

Richard








Should be no device here.








Should be no device here.

I added 5 rows and 5 columns so the difference in numbers in the transformed lines below are correct (but again an extra space was added before the ending codes "/>" and ">").















Link to comment
Share on other sites

The extra space should be unimportant.

The blank device type, unit, and circuit attributes won't work.

I suspect that the reason device type "Sequence" doesn't work is because the transformation might not preserve the "filename" attribute. Again, though, I'm just guessing about this one - I haven't checked.

Link to comment
Share on other sites

ItsMeBobO,

I just used Notebook to find and replace deviceType="" unit="" circuit="" with nothing, saved it as an .lcc file, imported it into my sequence, and guess what?

It worked perfectly.:D Bob (administrator) was right.

Thought this might help you in modifying your script, because other than that, it really works just great. I know I spent a lot of time with this, but it saved an enormous amount of time it would have taken to re-do the animation screen. Thanks.

BTW, exporting the animation put back the indents, and removed that pesky extra space near the end of each line. You both are awesome.


Richard


Attached files 198371=11063-You

Link to comment
Share on other sites

bob wrote:

The extra space should be unimportant. 

The blank device type, unit, and circuit attributes won't work.

I suspect that the reason device type "Sequence" doesn't work is because the transformation might not preserve the "filename" attribute.  Again, though, I'm just guessing about this one - I haven't checked.


Two corrections made for when no device is selected and when Sequence is selected. Both effected the attributes which should be written. Update has been made to the downloadable file http://itsmebob.com/Christmas/shiftani.xsl




" color="


" deviceType="

"


filename="



unit="

" circuit="




" savedIndex="

"/>


Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...