: Quick Origin  ( 248 )

0 1 .

Quick Origin
« : 04 2019, 16:20:36 »
!
, 2.79 ( ) .
https://www.youtube.com/watch?v=ZD3L-xMEzcc&feature=youtu.be
Blender 2.80 - .
2.80, . -: 2014 ., -: , , "".
, :  , , 2.80? 

  • emerge --keep-going
Re: Quick Origin
« #1 : 04 2019, 19:17:36 »
... , ...
... 280 EDITMODE ...

: []
#
#The MIT License (MIT)
#
#Copyright (c) 2014 ishidourou
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in
#all copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#THE SOFTWARE.
#
#(│╝http://sourceforge.jp/projects/opensource/wiki/licenses%2FMIT_license╝
#
#Copyright (c) 2014 ishidourou
#
#╗╕╗╢╛╜│╕╝╗╕╜╝
#╜╛╣║║╛╜╢▒▒╛
#╜╜╜┐┤╡▓╝╕╡╗│╣
#│/╛▓▓│╜╛╕▒
#╢╛╛
#
#╕╜║│▒╛║╜╣╜╛╝
#╛
#
#╜╛╢╛╛║╗╜┐╝
#╛╛┐╝╣╕│╛╡│
#┐╝┐╛╛ ╜╛╜
#┤║╕│║╛╗╜╡╖╛
#╜╜┐╛╗▒╕▒│╗╛
#╜▓╗╗▓╛
#
#####################################
# Quick Origin
#    v.1.0
#  (c)ishidourou 2014
####################################

bl_info = {
"name": "Quick Origin",
"author": "ishidourou",
"version": (1, 2),
"blender": (2, 80, 0),
"location": "View3D > Toolbar and View3D",
"description": "QuickOrigin",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": 'Mesh'}

import bpy
#import re

from bpy.props import *

class mes():
    title = ('Quick Origin','╕│')
    btn01 = ('Set Origin','╣')

def lang():
    system = bpy.context.user_preferences.system
    if system.use_international_fonts:
        if system.language == 'ja_JP':
            return 1
    return 0

class QuickOriginPanel(bpy.types.Panel):
bl_category = "View"
bl_label = mes.title[lang()]
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
 
def draw(self, context):
self.layout.operator("quick.origin")

class QuickOrigin(bpy.types.Operator):
bl_idname = "quick.origin"
bl_label = mes.btn01[lang()]
bl_options = {'REGISTER'}

def execute(self, context):
if bpy.context.mode != 'EDIT_MESH':
bpy.ops.object.editmode_toggle()
return{'FINISHED'}
bpy.ops.view3d.snap_cursor_to_selected()
bpy.ops.object.editmode_toggle()
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
if bpy.context.mode != 'Object':
bpy.ops.object.editmode_toggle()
return{'FINISHED'}

def register():
bpy.utils.register_class(QuickOriginPanel)
bpy.utils.register_class(QuickOrigin)
kc = bpy.context.window_manager.keyconfigs.addon
if kc:
kmmm = kc.keymaps.new(name="Mesh", space_type="EMPTY")
kmmi1 = kmmm.keymap_items.new('quick.origin', 'O', 'PRESS', alt=True, shift=True)
 

def unregister():
bpy.utils.unregister_class(QuickOriginPanel)
bpy.utils.unregister_class(QuickOrigin)
if kc:
km = kc.keymaps["Mesh"]
for kmi in km.keymap_items:
if kmi.idname == 'quick.origin':
km.keymap_items.remove(kmi)

if __name__ == "__main__":
register()

Re: Quick Origin
« #2 : 04 2019, 19:43:42 »
-, .

  • emerge --keep-going
Re: Quick Origin
« #3 : 04 2019, 20:13:18 »
... ? ...

Re: Quick Origin
« #4 : 04 2019, 20:40:34 »

  • emerge --keep-going
Re: Quick Origin
« #5 : 04 2019, 21:01:47 »
... blender ? ...
... ...

Re: Quick Origin
« #6 : 04 2019, 21:15:56 »

  • emerge --keep-going
Re: Quick Origin
« #7 : 04 2019, 21:32:34 »
>> , Linux?
... , ...
... 2.80/scripts/addons .config/blender .config/blender ...

Re: Quick Origin
« #8 : 04 2019, 21:34:44 »
... 2.80/scripts/addons ...
. .
2.8???

  • emerge --keep-going
Re: Quick Origin
« #9 : 04 2019, 21:42:06 »
... , ...
... ? blender ...

Re: Quick Origin
« #10 : 04 2019, 21:43:46 »
... ? blender ...

 Debian

  • emerge --keep-going
Re: Quick Origin
« #11 : 04 2019, 22:04:38 »
>> Debian
>>
... api , , ...

  • emerge --keep-going
Re: Quick Origin
« #12 : 04 2019, 22:17:01 »
... , - ...
... , ...

Re: Quick Origin
« #13 : 04 2019, 22:59:04 »
... , - ...
... , ...

-!!!! !!!!!! !!!. 2.7, 2.8 , .

: ( 2.80) API , ?


  • emerge --keep-going
Re: Quick Origin
« #14 : 04 2019, 23:31:16 »
>> ?
... ...
... , ...
... , , , " ", blender, , api ...

 


*

*

111111.png
: 3
: kaucap
1986f28b22243136d9f571177f130682.jpg
: 4
: chupasubway
1.jpg
: 11
: chupasubway
11.jpg
: 16
: kaucap
222222.png
: 20
: kaucap