Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pyMKcam
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
pyMKcam
Commits
30dc5651
Commit
30dc5651
authored
Jan 25, 2012
by
Lars Kruse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved xml state representation slightly
* add a UUID to all interesting objects * include models in dump
parent
d37b4fc8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
Models.py
pycam/Plugins/Models.py
+2
-3
Processes.py
pycam/Plugins/Processes.py
+0
-1
__init__.py
pycam/Plugins/__init__.py
+4
-3
xml_handling.py
pycam/Utils/xml_handling.py
+1
-1
No files found.
pycam/Plugins/Models.py
View file @
30dc5651
...
...
@@ -20,7 +20,6 @@ You should have received a copy of the GNU General Public License
along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
"""
import
uuid
# imported later (on demand)
#import gtk
...
...
@@ -97,9 +96,11 @@ class Models(pycam.Plugins.ListPluginBase):
self
.
core
.
register_namespace
(
"models"
,
pycam
.
Plugins
.
get_filter
(
self
))
self
.
core
.
set
(
"models"
,
self
)
self
.
register_state_item
(
"models"
,
self
)
return
True
def
teardown
(
self
):
self
.
clear_state_items
()
self
.
core
.
unregister_namespace
(
"models"
)
if
self
.
gui
:
self
.
core
.
unregister_ui_section
(
"model_handling"
)
...
...
@@ -210,6 +211,4 @@ class ModelEntity(pycam.Plugins.ObjectWithAttributes):
def
__init__
(
self
,
model
):
super
(
ModelEntity
,
self
)
.
__init__
(
"model"
)
self
.
model
=
model
# this UUID is not connected with model.uuid
self
[
"uuid"
]
=
uuid
.
uuid4
()
pycam/Plugins/Processes.py
View file @
30dc5651
...
...
@@ -115,7 +115,6 @@ class Processes(pycam.Plugins.ListPluginBase):
self
.
clear_state_items
()
self
.
core
.
unregister_namespace
(
"processes"
)
if
self
.
gui
:
self
.
core
.
unregister_chain
(
"state_dump"
,
self
.
dump_state
)
self
.
core
.
unregister_ui
(
"main"
,
self
.
gui
.
get_object
(
"ProcessBox"
))
self
.
core
.
unregister_ui_section
(
"process_path_parameters"
)
self
.
core
.
unregister_ui
(
"process_parameters"
,
...
...
pycam/Plugins/__init__.py
View file @
30dc5651
...
...
@@ -23,6 +23,7 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
import
os
import
imp
import
inspect
import
uuid
# TODO: load these modules only on demand
import
gtk
import
gobject
...
...
@@ -502,9 +503,9 @@ class ListPluginBase(PluginBase, list):
class
ObjectWithAttributes
(
dict
):
def
__init__
(
self
,
key
,
params
=
None
):
if
params
is
None
:
params
=
{}
self
.
update
(
params
)
if
not
params
is
None
:
self
.
update
(
params
)
self
[
"uuid"
]
=
uuid
.
uuid4
(
)
self
.
node_key
=
key
...
...
pycam/Utils/xml_handling.py
View file @
30dc5651
...
...
@@ -42,7 +42,7 @@ def get_xml(item, name=None):
return
leaf
else
:
leaf
=
ET
.
Element
(
name
)
leaf
.
text
=
rep
r
(
item
)
leaf
.
text
=
st
r
(
item
)
return
leaf
def
parse_xml_dict
(
item
):
...
...
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