[Bf-extensions-cvs] [3c538b4b] master: chromoly ruler: remove unmaintained fork of this addon
meta-androcto
noreply at git.blender.org
Sat Jun 10 15:50:57 CEST 2017
Commit: 3c538b4b6cc96015e9262da1cdef4156b2985629
Author: meta-androcto
Date: Sat Jun 10 23:50:28 2017 +1000
Branches: master
https://developer.blender.org/rBAC3c538b4b6cc96015e9262da1cdef4156b2985629
chromoly ruler: remove unmaintained fork of this addon
===================================================================
D space_view3d_ruler_chromoly/__init__.py
D space_view3d_ruler_chromoly/va/__init__.py
D space_view3d_ruler_chromoly/va/gl.py
D space_view3d_ruler_chromoly/va/math.py
D space_view3d_ruler_chromoly/va/mesh.py
D space_view3d_ruler_chromoly/va/utils.py
D space_view3d_ruler_chromoly/va/view.py
===================================================================
diff --git a/space_view3d_ruler_chromoly/__init__.py b/space_view3d_ruler_chromoly/__init__.py
deleted file mode 100644
index 1ee970e4..00000000
--- a/space_view3d_ruler_chromoly/__init__.py
+++ /dev/null
@@ -1,3208 +0,0 @@
-# coding: utf-8
-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
- 'name': 'Ruler',
- 'author': 'chromoly - adapted for 2.63 by Gert De Roost',
- 'version': (2, 3, 0),
- 'blender': (2, 63, 0),
- 'location': 'View3D > Properties > Ruler',
- "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
- 'category': '3D View'}
-
-'''
-Pour afficher la règle en 3D Voir.
-Pour utiliser le patch la fonctionnalité complète sera nécessaire.
-'''
-
-
-import time # debug
-from functools import reduce
-from collections import OrderedDict
-import math
-
-import bpy
-from bpy.props import *
-import bgl
-from bgl import glEnable, glDisable, GL_BLEND, \
- GL_LINES, GL_LINE_LOOP, GL_LINE_STRIP, GL_TRIANGLES, \
- glBegin, glEnd, glColor4f, glLineWidth, glRectf, glVertex2f, \
- glLineStipple, GL_LINE_STIPPLE
-import mathutils
-from mathutils import *
-geo = mathutils.geometry
-intersect_line_line_2d = geo.intersect_line_line_2d
-import blf
-
-from .va.view import check_view, check_view_context, \
- make_snap_matrix, get_vector_from_snap_maxrix, \
- convert_world_to_window, convert_window_to_world, window_to_world_coordinate
-from .va.utils import get_matrix_element_square
-from .va.gl import draw_box, draw_triangles, draw_triangle_relative, \
- draw_circle, draw_arc12
-
-import copy
-# from va.utils import print_mat
-
-debug = 0
-globmx = 0
-globmy = 0
-started = 0
-cursorstate = 0
-snapon = snapon3d = 0
-
-class TmpClass():
- def __init__(self, d=None):
- if isinstance(d, (dict, OrderedDict)):
- self.__dict__.update(d)
-
-
-# Valeur utilisée pour initialiser
-default_config = d = OrderedDict() # OrderedDict Il y avait pas de besoin d'utiliser particulier
-d['color_background'] = [0, 0, 0, 1]
-d['scale_size'] = [5, 4, 4] # (10 Mémoire, le nombre pair, l'impair) de la taille de la mémoire
-d['number_min_px'] = [18, 40]
-# 36 # Affiche un nombre dans la position de la (ou grille minimum) de grille minimum de 5 *
-# devient plus grande que cette valeur (.) taille minimale de la grille.
-d['draw_mouse_coordinate'] = 1 # 0:off, 1:on Patched pour afficher les coordonnées de la souris.
-d['autohide_mouse_coordinate'] = 1
-d['autohide_MC_threthold'] = 2 # -1:off, Comme valeur de seuil: supérieur ou égal à 0.
-# masquer l'affichage des coordonnées lors des approches de la souris.
-#d['font_main'] = [0, 10, 72, 3] #(id, size, dpi, offset)
-d['font_main'] = TmpClass({'id':0, 'size':10, 'dpi':72, 'offset':3})
-d['font_mc'] = TmpClass({'id':0, 'size':12, 'dpi':72, 'offset':3}) # mouse coordinate box
-d['font_measure'] = TmpClass({'id':0, 'size':10, 'dpi':72, 'offset':3}) # measure mode
-d['cursor_type'] = 'cross_scale' # enum['none', 'cross', 'cross_scale']0 Patched pour
-d['cursor_scale_size'] = [12, 6, 2] # La taille de la mémoire (main, sub1, sub2)
-d['measure_cursor_scale_size'] = [16, 6, 6] # La taille de la mémoire (main, sub1, sub2)
-d['measure_scale_size'] = [14, 5, 5] # draw measure.rulers
-d['measure_select_point_threthold'] = 30 # MeasureMode Temps, la distance peut être sélectionné par un clic-droit
-d['draw_scale_type'] = 1 # 0:offz, 1:on Affichage dans le coin supérieur droit
-d['draw_unit'] = 1 # 0:offz, 1:on Affichage dans le coin inférieur droit, la plus petite grille minutes BlenderUnit
-d['color_main'] = [1.0, 1.0, 0.2, 1.0] # [r, g, b, a]
-d['color_number'] = d['color_main']
-d['color_cursor'] = [1.0, 1.0, 1.0, 0.3]
-d['color_cursor_bold'] = [1.0, 1.0, 1.0, 1.0]
-#d['color_cursor_number'] = [1.0, 1.0, 1.0, 1.0] # inutilisé
-d['color_measure'] = [0.9, 1.0, 0.7, 0.6]
-d['color_measure_sub'] = [0.9, 1.0, 0.7, 0.3] # ligne auxiliaire & ruler.draw_circle
-d['color_measure_number'] = [0.9, 1.0, 1.0, 1.0]
-d['color_measure_angle'] = [1.0, 0.7, 0.7, 1.0]
-d['color_measure_cursor'] = d['color_measure']
-d['color_measure_cursor_bold'] = [0.9, 1.0, 0.7, 0.8]
-d['color_measure_alpha'] = 0.8
-
-
-class FontMain(bpy.types.PropertyGroup):
- '''
- Note: Lorsque vous héritez de cette classe en outre, toutes les méthodes vont disparaître.
- '''
- id = IntProperty(name='ID',
- default=default_config['font_main'].id,
- min=0, max=100, soft_min=0, soft_max=100)
- size = IntProperty(name='Size',
- default=default_config['font_main'].size,
- min=1, max=100, soft_min=1, soft_max=100)
- dpi = IntProperty(name='DPI',
- default=default_config['font_main'].dpi,
- min=1, max=300, soft_min=1, soft_max=300)
- offset = IntProperty(name='Offset',
- default=default_config['font_main'].offset,
- min=0, max=100, soft_min=0, soft_max=100)
-
-class FontMC(bpy.types.PropertyGroup):
- id = IntProperty(name='ID',
- default=default_config['font_mc'].id,
- min=0, max=100, soft_min=0, soft_max=100)
- size = IntProperty(name='Size',
- default=default_config['font_mc'].size,
- min=1, max=100, soft_min=1, soft_max=100)
- dpi = IntProperty(name='DPI',
- default=default_config['font_mc'].dpi,
- min=1, max=300, soft_min=1, soft_max=300)
- offset = IntProperty(name='Offset',
- default=default_config['font_mc'].offset,
- min=0, max=100, soft_min=0, soft_max=100)
-
-class FontMeasure(bpy.types.PropertyGroup):
- id = IntProperty(name='ID',
- default=default_config['font_measure'].id,
- min=0, max=100, soft_min=0, soft_max=100)
- size = IntProperty(name='Size',
- default=default_config['font_measure'].size,
- min=1, max=100, soft_min=1, soft_max=100)
- dpi = IntProperty(name='DPI',
- default=default_config['font_measure'].dpi,
- min=1, max=300, soft_min=1, soft_max=300)
- offset = IntProperty(name='Offset',
- default=default_config['font_measure'].offset,
- min=0, max=100, soft_min=0, soft_max=100)
-
-
-def blf_text_height_max(fontid):
- text_width, text_height = blf.dimensions(fontid,
- reduce(lambda x, y: x+chr(y), range(32, 127), ''))
- return text_height
-
-class RulerConfig(bpy.types.PropertyGroup):
- # IntVectorProporty Ne peut être utilisé en raison d'un bug
- color_background = FloatVectorProperty(attr='color_background', name='Back',
- default=default_config['color_background'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_main = FloatVectorProperty(attr='color_main', name='Main',
- default=default_config['color_main'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_number = FloatVectorProperty(attr='color_number', name='Number',
- default=default_config['color_number'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_cursor = FloatVectorProperty(attr='color_cursor', name='Cursor',
- default=default_config['color_cursor'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_cursor_bold = FloatVectorProperty(attr='color_cursor_bold', name='Cursor Bold',
- default=default_config['color_cursor_bold'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_measure = FloatVectorProperty(attr='color_measure', name='Measure',
- default=default_config['color_measure'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_measure_sub = FloatVectorProperty(attr='color_measure_sub', name='M-Sub',
- default=default_config['color_measure_sub'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_measure_number = FloatVectorProperty(attr='color_measure_number',
- name='M-Number',
- description='Measure number',
- default=default_config['color_measure_number'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_measure_angle = FloatVectorProperty(attr='color_measure_angle', name='M-Angle',
- description='Measure angle number',
- default=default_config['color_measure_angle'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_measure_cursor = FloatVectorProperty(attr='color_measure_cursor',
- name='M-Cursor',
- default=default_config['color_measure_cursor'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_measure_cursor_bold = FloatVectorProperty(attr='color_measure_cursor_bold',
- name='M-Cursor Bold',
- default=default_config['color_measure_cursor_bold'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='COLOR', size=4)
- color_measure_alpha = FloatProperty(attr='color_measure_alpha',
- name='Alpha in Normal Mode',
- default=default_config['color_measure_alpha'],
- min=0., max=1., soft_min=0., soft_max=1.,
- subtype='PERCENTAGE')
-
- font_main = PointerProperty(attr='font_main', name='font main', type=FontMain)
- font_mc = PointerProperty(attr='font_mc', name='font MC', type=FontMC)
- font_measure = PointerProperty(attr='font_measure', name='font measure', type=FontMeasure)
-
- scale_size = FloatVectorProperty(attr='scale_size', name='Scale size',
- default=default_config['s
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list