Sun, Dec 1, 5:34 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 29 7:57 am)



Subject: ??? for the pythonheads


noxiart ( ) posted Fri, 22 January 2010 at 2:32 PM · edited Mon, 18 November 2024 at 10:09 AM

file_446900.JPG

Hi, I'm still using Bushi's MagCloner script a lot and it works quite well in Poser 8.

Only problem is that whenever I open or close it, I get a warning popup I have to close first.
So, is there any way I could edit it to avoid this error popups ?

This is the error I get when opening it:


PhilC ( ) posted Fri, 22 January 2010 at 2:46 PM

If you open the PY file in Notepad what do you see in line number 4?

The error message indicates that there is a non ASCII character present. May be something like the copyright symbol or something invisible line a carriage return. Whatever it is it will probably be obvious and can be deleted or edited to something else.

If you are not sure please copy/paste line 4 to the thread and we can go from there.


noxiart ( ) posted Fri, 22 January 2010 at 3:02 PM

Hmm,
I opened it up in EditPad Lite but I see no line numbers.

Here is the first block without the annotations:

from Tkinter import *
import poser,string

scene = poser.Scene()

class App:
  def init(self, master):
    self.MainButtonWidth = 9
    self.FullActorList = []
    self.DeformerList = []
    self.MagnetList = []
    self.MagnetPairsList = []
    self.FigureSelected = 'no'
    self.FromQuit = 'no'
    self.CloneDone = 'no'
    self.FullParameterList1 = []
    self.Frame4ButtonWidth = 3
    self.Mode = 0
    self.SaveCurrentFigureName = ''
    self.InactiveMags = []
    self.ActiveMags = []
    self.InactiveMagNames = []
    self.ActiveMagNames = []
    self.ReselectMags = 'yes'
    self.UndoDictionary =
    self.UndoCount = 0
    self.MagnetDictionary =
    self.MagnetCount = 0
    self.DummyFont = ('Arial','1')


markschum ( ) posted Fri, 22 January 2010 at 3:17 PM

Its the literal line 4 in the file , count comments and all

it might be a hex A0 character , which will appear as a blank character

The deprecation warning is not a problem , but will pop up an error.


noxiart ( ) posted Fri, 22 January 2010 at 3:48 PM

Here are the comments, but the only "unusual" I see is the @ in the third line ?

#    Script: MagClonerV1n.py
#    Author: bushi (PoserPython.com) - bushi@velocitus.net
#    Description: This script mirrors magnets on a Poser figure.  
#             After selecting the magnets to use, you can either
#             clone the magnets to the opposite side of the
#                  figure or delete the selected magnets.

#    System: Poser Pro, Poser 5

This script is released as freeware and is copyrighted.

You can use the script free of charge but you can't modify

it and then make the modified script available to the

public.  You can take it apart to see how it works but

you can't take sections of the code and use the code in

scripts that will be available to the public.  It is

released "as is" so you are fully responsible for any

problems or damage that may result from using this script.

This script may not be posted to other websites without

permission.  It may not be included in any collection

for sale or for free without permission.

Copyright 2003 - Cletus D. Payton - 12/13/03

Docs:

This is version 1n of a PoserPython script to mirror magnets on a

Poser figure.  Unzip the attached WINZIP archive to a folder under

the poserScripts directory.  It really doesn't matter where as long

as it's in the Poser Python path. 

Start the script then choose a figure and click the 'Select'

button in the main button box.   A drop-down panel will appear.

The mags in the left scrollbox (inactive) will not be selected for

cloning or deleteing.  The mags in the right scrollbox (active) will

be selected for cloning or deleteing.  You can use the buttons below

the scrollboxes to move the magnets between the boxes. To select

specific magnets to move, click on the magnet name to highlight it.

You can select one or more to move.

The move buttons perform the following functions:

'>>' - move all magnets in the inactive scrollbox to the

#        active scrollbox.

'>'  - move selected (highlighted) magnets to the active scrollbox.

'<'  - move selected magnets to the inactive scrollbox.

'<<' - move all magnets in the inactive scrollbox to the inactive

#        scrollbox.

When you've selected the mags you want to operate on, click the

'Select' button at the bottom of the pull-down panel.  The panel will

close.  You may now use the 'Clone' button or 'Delete' button to clone

or delete the active magnets.

The 'Unclone' button will remove cloned magnets.  It's a multi-level

undo so you can step back through several cloning steps.

The long, dark-grey button at the bottom of the main button box will

close the drop-down panel without doing a selection set.

Under a heavy system load, you may have the user window pop back to

it's original location while moving it.  This is due to the

interaction between the script and Poser refresh routines being used

by the script.  If you have a problem with moving the window,

right-click the blue bar at the top of the window and use the 'Move'

option.  This lets the Window Manager take control of the panel

movement.

When you first run the script, a small text file will be created

in C:.  This file keeps track of the last location of the script

window and uses the stored location as the initial position on

re-start of the script.

Maybe I should just try deleting all comments ?


noxiart ( ) posted Fri, 22 January 2010 at 5:42 PM

file_446907.JPG

Many thanks so far. ALMOST there ! :-)

I just deleted the "comment" block and the initial popup is gone.

Still getting another popup when I close MagCloner.

(see pic)

Any idea what I can do to get rid it, too ?


PhilC ( ) posted Fri, 22 January 2010 at 6:04 PM

Try just commenting out line 1871.


noxiart ( ) posted Fri, 22 January 2010 at 6:17 PM

file_446908.JPG

"Try just commenting out line 1871"

Problem is, there are only 588 lines in that script !

LOL !


PhilC ( ) posted Fri, 22 January 2010 at 6:35 PM

OK sorry, yes line 1871 is in the Tkinter module. I'd need to see the script to know where the call to that module originates from.


noxiart ( ) posted Fri, 22 January 2010 at 6:55 PM

Hi Phil,
I sent you a site mail.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.