Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
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-addons
Commits
0d3cc9a0
Commit
0d3cc9a0
authored
6 years ago
by
Gaia Clary
Browse files
Options
Downloads
Patches
Plain Diff
new: MathVis: Added option to display points and lines in front
parent
3456a058
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
space_view3d_math_vis/__init__.py
+7
-0
7 additions, 0 deletions
space_view3d_math_vis/__init__.py
space_view3d_math_vis/draw.py
+6
-0
6 additions, 0 deletions
space_view3d_math_vis/draw.py
with
13 additions
and
0 deletions
space_view3d_math_vis/__init__.py
+
7
−
0
View file @
0d3cc9a0
...
@@ -88,6 +88,7 @@ class PanelConsoleVars(Panel):
...
@@ -88,6 +88,7 @@ class PanelConsoleVars(Panel):
col
=
layout
.
column
()
col
=
layout
.
column
()
col
.
prop
(
bpy
.
context
.
window_manager
.
MathVisProp
,
"
name_hide
"
)
col
.
prop
(
bpy
.
context
.
window_manager
.
MathVisProp
,
"
name_hide
"
)
col
.
prop
(
bpy
.
context
.
window_manager
.
MathVisProp
,
"
bbox_hide
"
)
col
.
prop
(
bpy
.
context
.
window_manager
.
MathVisProp
,
"
bbox_hide
"
)
col
.
prop
(
bpy
.
context
.
window_manager
.
MathVisProp
,
"
in_front
"
)
col
.
prop
(
bpy
.
context
.
window_manager
.
MathVisProp
,
"
bbox_scale
"
)
col
.
prop
(
bpy
.
context
.
window_manager
.
MathVisProp
,
"
bbox_scale
"
)
col
.
operator
(
"
mathvis.cleanup_console
"
)
col
.
operator
(
"
mathvis.cleanup_console
"
)
...
@@ -242,6 +243,12 @@ class MathVis(PropertyGroup):
...
@@ -242,6 +243,12 @@ class MathVis(PropertyGroup):
"
lines for the display of Matrix items
"
"
lines for the display of Matrix items
"
)
)
in_front
:
BoolProperty
(
name
=
"
Always In Front
"
,
default
=
True
,
description
=
"
Draw Points and lines alwasy in front
"
,
update
=
call_console_hook
)
classes
=
(
classes
=
(
PanelConsoleVars
,
PanelConsoleVars
,
...
...
This diff is collapsed.
Click to expand it.
space_view3d_math_vis/draw.py
+
6
−
0
View file @
0d3cc9a0
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
import
bpy
import
bpy
import
blf
import
blf
import
gpu
import
gpu
import
bgl
from
gpu_extras.batch
import
batch_for_shader
from
gpu_extras.batch
import
batch_for_shader
from
.
import
utils
from
.
import
utils
...
@@ -132,6 +133,11 @@ def draw_callback_view():
...
@@ -132,6 +133,11 @@ def draw_callback_view():
scale
=
settings
.
bbox_scale
scale
=
settings
.
bbox_scale
with_bounding_box
=
not
settings
.
bbox_hide
with_bounding_box
=
not
settings
.
bbox_hide
if
settings
.
in_front
:
bgl
.
glDepthFunc
(
bgl
.
GL_ALWAYS
)
else
:
bgl
.
glDepthFunc
(
bgl
.
GL_LESS
)
data_matrix
,
data_quat
,
data_euler
,
data_vector
,
data_vector_array
=
utils
.
console_math_data
()
data_matrix
,
data_quat
,
data_euler
,
data_vector
,
data_vector_array
=
utils
.
console_math_data
()
if
data_vector
:
if
data_vector
:
...
...
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