Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
a2413cc0
Commit
a2413cc0
authored
Jun 27, 2014
by
Daniel Brown
Browse files
fixing issue where kat class changes were being made globally instead of to the cloned class
parent
b20e1b58
Changes
1
Hide whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
a2413cc0
...
...
@@ -356,6 +356,9 @@ Constant = namedtuple('Constant', 'name, value, usedBy')
class
kat
(
object
):
def
__init__
(
self
,
kat_file
=
None
,
kat_code
=
None
,
katdir
=
""
,
katname
=
""
,
tempdir
=
None
,
tempname
=
None
):
cls
=
type
(
self
)
self
.
__class__
=
type
(
cls
.
__name__
,
(
cls
,),
{})
self
.
scene
=
None
# scene object for GUI
self
.
verbose
=
True
...
...
@@ -401,9 +404,6 @@ class kat(object):
if
kat_file
!=
None
:
self
.
loadKatFile
(
kat_file
)
cls
=
type
(
self
)
self
.
__class__
=
type
(
cls
.
__name__
,
(
cls
,),
{})
@
property
def
signals
(
self
):
return
self
.
__signals
...
...
@@ -687,7 +687,7 @@ class kat(object):
if
obj
!=
None
and
not
isinstance
(
obj
,
str
):
if
self
.
hasNamedObject
(
obj
.
name
):
getattr
(
self
,
obj
.
name
).
remove
()
print
"Removed existing object '{0}' of type {1} to add
new object
"
.
format
(
obj
.
name
,
obj
.
__class__
)
print
"Removed existing object '{0}' of type {1} to add
line '{2}'
"
.
format
(
obj
.
name
,
obj
.
__class__
,
line
)
self
.
add
(
obj
)
...
...
@@ -1021,8 +1021,8 @@ class kat(object):
del
nodes
import
gc
print
gc
.
get_referrers
(
obj
)
#
import gc
#
print gc.get_referrers(obj)
def
getMatrices
(
self
):
...
...
@@ -1404,6 +1404,9 @@ class kat(object):
raise
exceptions
.
ValueError
(
"Argument is not of type Command"
)
name
=
com
.
__class__
.
__name__
print
getattr
(
self
.
__class__
,
name
)
delattr
(
self
.
__class__
,
name
)
delattr
(
self
,
'__com_'
+
name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment