Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-dev-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-dev-tools
Commits
85988181
Commit
85988181
authored
5 years ago
by
Aaron Carlisle
Browse files
Options
Downloads
Patches
Plain Diff
Tools: Update RNA/Manual Reference for sphobjinv 2.0
parent
281c6315
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils_doc/rna_manual_reference_updater.py
+5
-6
5 additions, 6 deletions
utils_doc/rna_manual_reference_updater.py
with
5 additions
and
6 deletions
utils_doc/rna_manual_reference_updater.py
+
5
−
6
View file @
85988181
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
# URL is the: url_manual_prefix + url_manual_mapping[#id]
# URL is the: url_manual_prefix + url_manual_mapping[#id]
import
os
import
os
import
sphobjinv
import
sphobjinv
as
soi
import
urllib.request
import
urllib.request
# Download the objects.inv file
# Download the objects.inv file
...
@@ -47,11 +47,11 @@ urlretrieve = urllib.request.urlretrieve
...
@@ -47,11 +47,11 @@ urlretrieve = urllib.request.urlretrieve
urlretrieve
(
"
https://docs.blender.org/manual/en/dev/objects.inv
"
,
"
objects.inv
"
)
urlretrieve
(
"
https://docs.blender.org/manual/en/dev/objects.inv
"
,
"
objects.inv
"
)
# Decode objects.inv
# Decode objects.inv
objects
=
sphobjinv
.
readfile
(
'
objects.inv
'
)
objects_data
=
sphobjinv
.
decode
(
objects
)
sphobjinv
.
writefile
(
'
objects.tmp
'
,
objects_data
)
# TODO leave in memory
os
.
remove
(
"
objects.inv
"
)
inv
=
soi
.
Inventory
(
'
objects.inv
'
)
objects_data
=
inv
.
data_file
()
soi
.
writebytes
(
'
objects.tmp
'
,
objects_data
)
# TODO leave in memory
os
.
remove
(
"
objects.inv
"
)
# Write the fire
# Write the fire
filepath
=
os
.
path
.
join
(
"
rna_manual_reference.py
"
)
filepath
=
os
.
path
.
join
(
"
rna_manual_reference.py
"
)
...
@@ -98,7 +98,6 @@ fw("if LANG is not None:\n")
...
@@ -98,7 +98,6 @@ fw("if LANG is not None:\n")
fw
(
"
url_manual_prefix = url_manual_prefix.replace(
\"
manual/en
\"
,
\"
manual/
\"
+ LANG)
\n\n
"
)
fw
(
"
url_manual_prefix = url_manual_prefix.replace(
\"
manual/en
\"
,
\"
manual/
\"
+ LANG)
\n\n
"
)
fw
(
"
url_manual_mapping = (
\n
"
)
fw
(
"
url_manual_mapping = (
\n
"
)
# Logic to manipulate strings from objects.inv
# Logic to manipulate strings from objects.inv
with
open
(
"
objects.tmp
"
,
encoding
=
"
utf8
"
)
as
obj_tmp
:
with
open
(
"
objects.tmp
"
,
encoding
=
"
utf8
"
)
as
obj_tmp
:
lines
=
[
l
for
l
in
obj_tmp
if
(
l
.
startswith
(
"
bpy.types
"
)
or
l
.
startswith
(
"
bpy.ops
"
))]
lines
=
[
l
for
l
in
obj_tmp
if
(
l
.
startswith
(
"
bpy.types
"
)
or
l
.
startswith
(
"
bpy.ops
"
))]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment