Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2019-09-02 16:48:47 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-09-02 16:48:47 +0300
commit155382e8d551b4df8b3ddd9244bb1c95617502f6 (patch)
treee5255e155ea57e1eb757f4944e78aaf7a483f955
parentba24849492c4adccdb704319eaa2fd8e73a75f9e (diff)
parenta215a3c85ad950e38d344205701b4258201f8412 (diff)
Merge commit 'a215a3c85ad950e38d344205701b4258201f8412' into filebrowser_redesign
-rw-r--r--animation_animall.py587
-rw-r--r--archimesh/achm_room_maker.py4
-rw-r--r--blenderkit/asset_inspector.py1
-rw-r--r--blenderkit/autothumb.py12
-rw-r--r--blenderkit/bg_blender.py2
-rw-r--r--blenderkit/bkit_oauth.py1
-rw-r--r--blenderkit/blendfiles/thumbnailer.blendbin222192 -> 218003 bytes
-rw-r--r--blenderkit/categories.py22
-rw-r--r--blenderkit/download.py5
-rw-r--r--blenderkit/paths.py2
-rw-r--r--blenderkit/ratings.py2
-rw-r--r--blenderkit/search.py2
-rw-r--r--blenderkit/ui.py22
-rw-r--r--blenderkit/ui_panels.py8
-rw-r--r--blenderkit/upload.py2
-rw-r--r--io_import_images_as_planes.py18
-rw-r--r--io_scene_fbx/__init__.py2
-rw-r--r--io_scene_fbx/export_fbx_bin.py83
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_export.py6
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_extract.py14
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather.py6
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py34
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_image.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py6
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py7
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_primitives.py138
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py2
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_image.py2
-rw-r--r--io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py7
-rw-r--r--io_scene_x3d/__init__.py2
-rw-r--r--io_scene_x3d/import_x3d.py31
-rw-r--r--materials_library_vx/__init__.py67
-rw-r--r--measureit/measureit_geometry.py3
-rw-r--r--mesh_bsurfaces.py31
-rw-r--r--modules/rna_manual_reference.py856
-rw-r--r--object_carver/carver_draw.py17
-rw-r--r--object_scatter/operator.py3
-rw-r--r--render_povray/__init__.py27
-rw-r--r--render_povray/render.py2132
-rw-r--r--render_povray/ui.py64
-rw-r--r--space_view3d_math_vis/draw.py3
-rw-r--r--space_view3d_pie_menus/__init__.py5
-rw-r--r--space_view3d_pie_menus/pie_cursor.py122
-rw-r--r--space_view3d_pie_menus/pie_modes_menu.py67
-rw-r--r--space_view3d_pie_menus/pie_orientation_menu.py87
-rw-r--r--space_view3d_pie_menus/pie_proportional_menu.py427
-rw-r--r--space_view3d_pie_menus/pie_save_open_menu.py43
-rw-r--r--space_view3d_pie_menus/pie_select_menu.py59
-rw-r--r--space_view3d_pie_menus/pie_snap_menu.py268
-rw-r--r--space_view3d_spacebar_menu/__init__.py158
-rw-r--r--space_view3d_spacebar_menu/animation_menus.py96
-rw-r--r--space_view3d_spacebar_menu/object_menus.py102
-rw-r--r--space_view3d_spacebar_menu/view_menus.py211
54 files changed, 2339 insertions, 3543 deletions
diff --git a/animation_animall.py b/animation_animall.py
new file mode 100644
index 00000000..df658ff3
--- /dev/null
+++ b/animation_animall.py
@@ -0,0 +1,587 @@
+# ##### 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": "AnimAll",
+ "author": "Daniel Salazar <zanqdo@gmail.com>",
+ "version": (0, 8, 3),
+ "blender": (2, 80, 0),
+ "location": "3D View > Toolbox > Animation tab > AnimAll",
+ "description": "Allows animation of mesh, lattice, curve and surface data",
+ "warning": "",
+ "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
+ "Scripts/Animation/AnimAll",
+ "category": "Animation",
+}
+
+"""
+Thanks to Campbell Barton and Joshua Leung for hes API additions and fixes
+Daniel 'ZanQdo' Salazar
+"""
+
+import bpy
+from bpy.types import (
+ Operator,
+ Panel,
+ AddonPreferences,
+ )
+from bpy.props import (
+ BoolProperty,
+ StringProperty,
+ )
+
+
+# Property Definitions
+class AnimallProperties(bpy.types.PropertyGroup):
+ key_selected: BoolProperty(
+ name="Selected Only",
+ description="Insert keyframes only on selected elements",
+ default=True
+ )
+ key_shape: BoolProperty(
+ name="Shape",
+ description="Insert keyframes on active Shape Key layer",
+ default=False
+ )
+ key_uvs: BoolProperty(
+ name="UVs",
+ description="Insert keyframes on active UV coordinates",
+ default=False
+ )
+ key_ebevel: BoolProperty(
+ name="E-Bevel",
+ description="Insert keyframes on edge bevel weight",
+ default=False
+ )
+ key_vbevel: BoolProperty(
+ name="V-Bevel",
+ description="Insert keyframes on vertex bevel weight",
+ default=False
+ )
+ key_crease: BoolProperty(
+ name="Crease",
+ description="Insert keyframes on edge creases",
+ default=False
+ )
+ key_vcols: BoolProperty(
+ name="V-Cols",
+ description="Insert keyframes on active Vertex Color values",
+ default=False
+ )
+ key_vgroups: BoolProperty(
+ name="V-groups",
+ description="Insert keyframes on active Vertex group values",
+ default=False
+ )
+ key_points: BoolProperty(
+ name="Points",
+ description="Insert keyframes on point locations",
+ default=False
+ )
+ key_radius: BoolProperty(
+ name="Radius",
+ description="Insert keyframes on point radius (Shrink/Fatten)",
+ default=False
+ )
+ key_tilt: BoolProperty(
+ name="Tilt",
+ description="Insert keyframes on point tilt",
+ default=False
+ )
+
+
+# Utility functions
+
+def refresh_ui_keyframes():
+ try:
+ for area in bpy.context.screen.areas:
+ if area.type in ('TIMELINE', 'GRAPH_EDITOR', 'DOPESHEET_EDITOR'):
+ area.tag_redraw()
+ except:
+ pass
+
+
+def insert_key(data, key, group=None):
+ try:
+ if group is not None:
+ data.keyframe_insert(key, group=group)
+ else:
+ data.keyframe_insert(key)
+ except:
+ pass
+
+
+def delete_key(data, key):
+ try:
+ data.keyframe_delete(key)
+ except:
+ pass
+
+
+# GUI (Panel)
+
+class VIEW3D_PT_animall(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+ bl_category = "Animation"
+ bl_label = 'AnimAll'
+
+ @classmethod
+ def poll(self, context):
+ return context.active_object and context.active_object.type in {'MESH', 'LATTICE', 'CURVE', 'SURFACE'}
+
+ def draw(self, context):
+ obj = context.active_object
+ animall_properties = context.window_manager.animall_properties
+
+ layout = self.layout
+ col = layout.column(align=True)
+ row = col.row()
+ row.prop(animall_properties, "key_selected")
+ col.separator()
+
+ row = col.row()
+
+ if obj.type == 'LATTICE':
+ row.prop(animall_properties, "key_points")
+ row.prop(animall_properties, "key_shape")
+
+ elif obj.type == 'MESH':
+ row.prop(animall_properties, "key_points")
+ row.prop(animall_properties, "key_shape")
+ row = col.row()
+ row.prop(animall_properties, "key_ebevel")
+ row.prop(animall_properties, "key_vbevel")
+ row = col.row()
+ row.prop(animall_properties, "key_crease")
+ row.prop(animall_properties, "key_uvs")
+ row = col.row()
+ row.prop(animall_properties, "key_vcols")
+ row.prop(animall_properties, "key_vgroups")
+
+ elif obj.type == 'CURVE':
+ row.prop(animall_properties, "key_points")
+ row.prop(animall_properties, "key_shape")
+ row = col.row()
+ row.prop(animall_properties, "key_radius")
+ row.prop(animall_properties, "key_tilt")
+
+ elif obj.type == 'SURFACE':
+ row.prop(animall_properties, "key_points")
+ row.prop(animall_properties, "key_shape")
+ row = col.row()
+ row.prop(animall_properties, "key_radius")
+ row.prop(animall_properties, "key_tilt")
+
+ layout.separator()
+ row = layout.row(align=True)
+ row.operator("anim.insert_keyframe_animall", icon="KEY_HLT")
+ row.operator("anim.delete_keyframe_animall", icon="KEY_DEHLT")
+ row = layout.row()
+ row.operator("anim.clear_animation_animall", icon="X")
+
+ if animall_properties.key_shape:
+ shape_key = obj.active_shape_key
+ shape_key_index = obj.active_shape_key_index
+
+ split = layout.split()
+ row = split.row()
+
+ if shape_key_index > 0:
+ row.label(text=shape_key.name, icon="SHAPEKEY_DATA")
+ row.prop(shape_key, "value", text="")
+ row.prop(obj, "show_only_shape_key", text="")
+ if shape_key.value < 1:
+ row = layout.row()
+ row.label(text='Maybe set "%s" to 1.0?' % shape_key.name, icon="INFO")
+ elif shape_key:
+ row.label(text="Cannot key on Basis Shape", icon="ERROR")
+ else:
+ row.label(text="No active Shape Key", icon="ERROR")
+
+ if animall_properties.key_points and animall_properties.key_shape:
+ row = layout.row()
+ row.label(text='"Points" and "Shape" are redundant?', icon="INFO")
+
+
+class ANIM_OT_insert_keyframe_animall(Operator):
+ bl_label = "Insert"
+ bl_idname = "anim.insert_keyframe_animall"
+ bl_description = "Insert a Keyframe"
+ bl_options = {'REGISTER', 'UNDO'}
+
+ def execute(op, context):
+ animall_properties = context.window_manager.animall_properties
+
+ if context.mode == 'OBJECT':
+ objects = context.selected_objects
+ else:
+ objects = context.objects_in_mode_unique_data[:]
+
+ mode = context.object.mode
+
+ # Separate loop for lattices, curves and surfaces, since keyframe insertion
+ # has to happen in Edit Mode, otherwise points move back upon mode switch...
+ # (except for curve shape keys)
+ for obj in [o for o in objects if o.type in {'CURVE', 'SURFACE', 'LATTICE'}]:
+ data = obj.data
+
+ if obj.type == 'LATTICE':
+ if animall_properties.key_shape:
+ if obj.active_shape_key_index > 0:
+ sk_name = obj.active_shape_key.name
+ for p_i, point in enumerate(obj.active_shape_key.data):
+ if not animall_properties.key_selected or data.points[p_i].select:
+ insert_key(point, 'co', group="%s Point %s" % (sk_name, p_i))
+
+ if animall_properties.key_points:
+ for p_i, point in enumerate(data.points):
+ if not animall_properties.key_selected or point.select:
+ insert_key(point, 'co_deform', group="Point %s" % p_i)
+
+ else:
+ for s_i, spline in enumerate(data.splines):
+ if spline.type == 'BEZIER':
+ for v_i, CV in enumerate(spline.bezier_points):
+ if (not animall_properties.key_selected
+ or CV.select_control_point
+ or CV.select_left_handle
+ or CV.select_right_handle):
+ if animall_properties.key_points:
+ insert_key(CV, 'co', group="Spline %s CV %s" % (s_i, v_i))
+ insert_key(CV, 'handle_left', group="Spline %s CV %s" % (s_i, v_i))
+ insert_key(CV, 'handle_right', group="Spline %s CV %s" % (s_i, v_i))
+
+ if animall_properties.key_radius:
+ insert_key(CV, 'radius', group="Spline %s CV %s" % (s_i, v_i))
+
+ if animall_properties.key_tilt:
+ insert_key(CV, 'tilt', group="Spline %s CV %s" % (s_i, v_i))
+
+ elif spline.type in ('POLY', 'NURBS'):
+ for v_i, CV in enumerate(spline.points):
+ if not animall_properties.key_selected or CV.select:
+ if animall_properties.key_points:
+ insert_key(CV, 'co', group="Spline %s CV %s" % (s_i, v_i))
+
+ if animall_properties.key_radius:
+ insert_key(CV, 'radius', group="Spline %s CV %s" % (s_i, v_i))
+
+ if animall_properties.key_tilt:
+ insert_key(CV, 'tilt', group="Spline %s CV %s" % (s_i, v_i))
+
+ bpy.ops.object.mode_set(mode='OBJECT')
+
+ for obj in [o for o in objects if o.type in {'MESH', 'CURVE', 'SURFACE'}]:
+ data = obj.data
+ if obj.type == 'MESH':
+ if animall_properties.key_points:
+ for v_i, vert in enumerate(data.vertices):
+ if not animall_properties.key_selected or vert.select:
+ insert_key(vert, 'co', group="Vertex %s" % v_i)
+
+ if animall_properties.key_vbevel:
+ for v_i, vert in enumerate(data.vertices):
+ if not animall_properties.key_selected or vert.select:
+ insert_key(vert, 'bevel_weight', group="Vertex %s" % v_i)
+
+ if animall_properties.key_vgroups:
+ for v_i, vert in enumerate(data.vertices):
+ if not animall_properties.key_selected or vert.select:
+ for group in vert.groups:
+ insert_key(group, 'weight', group="Vertex %s" % v_i)
+
+ if animall_properties.key_ebevel:
+ for e_i, edge in enumerate(data.edges):
+ if not animall_properties.key_selected or edge.select:
+ insert_key(edge, 'bevel_weight', group="Edge %s" % e_i)
+
+ if animall_properties.key_crease:
+ for e_i, edge in enumerate(data.edges):
+ if not animall_properties.key_selected or edge.select:
+ insert_key(edge, 'crease', group="Edge %s" % e_i)
+
+ if animall_properties.key_shape:
+ if obj.active_shape_key_index > 0:
+ sk_name = obj.active_shape_key.name
+ for v_i, vert in enumerate(obj.active_shape_key.data):
+ if not animall_properties.key_selected or data.vertices[v_i].select:
+ insert_key(vert, 'co', group="%s Vertex %s" % (sk_name, v_i))
+
+ if animall_properties.key_uvs:
+ if data.uv_layers.active is not None:
+ for uv_i, uv in enumerate(data.uv_layers.active.data):
+ if not animall_properties.key_selected or uv.select:
+ insert_key(uv, 'uv', group="UV layer %s" % uv_i)
+
+ if animall_properties.key_vcols:
+ for v_col_layer in data.vertex_colors:
+ if v_col_layer.active: # only insert in active VCol layer
+ for v_i, data in enumerate(v_col_layer.data):
+ insert_key(data, 'color', group="Loop %s" % v_i)
+
+ elif obj.type in {'CURVE', 'SURFACE'}:
+ # Shape key keys have to be inserted in object mode for curves...
+ if animall_properties.key_shape:
+ sk_name = obj.active_shape_key.name
+ global_spline_index = 0 # numbering for shape keys, which have flattened indices
+ for s_i, spline in enumerate(data.splines):
+ if spline.type == 'BEZIER':
+ for v_i, CV in enumerate(spline.bezier_points):
+ if (not animall_properties.key_selected
+ or CV.select_control_point
+ or CV.select_left_handle
+ or CV.select_right_handle):
+ if obj.active_shape_key_index > 0:
+ CV = obj.active_shape_key.data[global_spline_index]
+ insert_key(CV, 'co', group="%s Spline %s CV %s" % (sk_name, s_i, v_i))
+ insert_key(CV, 'handle_left', group="%s Spline %s CV %s" % (sk_name, s_i, v_i))
+ insert_key(CV, 'handle_right', group="%s Spline %s CV %s" % (sk_name, s_i, v_i))
+ insert_key(CV, 'radius', group="%s Spline %s CV %s" % (sk_name, s_i, v_i))
+ insert_key(CV, 'tilt', group="%s Spline %s CV %s" % (sk_name, s_i, v_i))
+ global_spline_index += 1
+
+ elif spline.type in ('POLY', 'NURBS'):
+ for v_i, CV in enumerate(spline.points):
+ if not animall_properties.key_selected or CV.select:
+ if obj.active_shape_key_index > 0:
+ CV = obj.active_shape_key.data[global_spline_index]
+ insert_key(CV, 'co', group="%s Spline %s CV %s" % (sk_name, s_i, v_i))
+ insert_key(CV, 'radius', group="%s Spline %s CV %s" % (sk_name, s_i, v_i))
+ insert_key(CV, 'tilt', group="%s Spline %s CV %s" % (sk_name, s_i, v_i))
+ global_spline_index += 1
+
+ bpy.ops.object.mode_set(mode=mode)
+ refresh_ui_keyframes()
+
+ return {'FINISHED'}
+
+
+class ANIM_OT_delete_keyframe_animall(Operator):
+ bl_label = "Delete"
+ bl_idname = "anim.delete_keyframe_animall"
+ bl_description = "Delete a Keyframe"
+ bl_options = {'REGISTER', 'UNDO'}
+
+
+ def execute(op, context):
+ animall_properties = context.window_manager.animall_properties
+
+ if context.mode == 'OBJECT':
+ objects = context.selected_objects
+ else:
+ objects = context.objects_in_mode_unique_data[:]
+
+ mode = context.object.mode
+
+ for obj in objects:
+ data = obj.data
+ if obj.type == 'MESH':
+ if animall_properties.key_points:
+ for vert in data.vertices:
+ if not animall_properties.key_selected or vert.select:
+ delete_key(vert, 'co')
+
+ if animall_properties.key_vbevel:
+ for vert in data.vertices:
+ if not animall_properties.key_selected or vert.select:
+ delete_key(vert, 'bevel_weight')
+
+ if animall_properties.key_vgroups:
+ for vert in data.vertices:
+ if not animall_properties.key_selected or vert.select:
+ for group in vert.groups:
+ delete_key(group, 'weight')
+
+ if animall_properties.key_ebevel:
+ for edge in data.edges:
+ if not animall_properties.key_selected or edge.select:
+ delete_key(edge, 'bevel_weight')
+
+ if animall_properties.key_crease:
+ for edge in data.edges:
+ if not animall_properties.key_selected or vert.select:
+ delete_key(edge, 'crease')
+
+ if animall_properties.key_shape:
+ if obj.active_shape_key:
+ for v_i, vert in enumerate(obj.active_shape_key.data):
+ if not animall_properties.key_selected or data.vertices[v_i].select:
+ delete_key(vert, 'co')
+
+ if animall_properties.key_uvs:
+ if data.uv_layers.active is not None:
+ for uv in data.uv_layers.active.data:
+ if not animall_properties.key_selected or uv.select:
+ delete_key(uv, 'uv')
+
+ if animall_properties.key_vcols:
+ for v_col_layer in data.vertex_colors:
+ if v_col_layer.active: # only delete in active VCol layer
+ for data in v_col_layer.data:
+ delete_key(data, 'color')
+
+ elif obj.type == 'LATTICE':
+ if animall_properties.key_shape:
+ if obj.active_shape_key:
+ for point in obj.active_shape_key.data:
+ delete_key(point, 'co')
+
+ if animall_properties.key_points:
+ for point in data.points:
+ if not animall_properties.key_selected or point.select:
+ delete_key(point, 'co_deform')
+
+ elif obj.type in {'CURVE', 'SURFACE'}:
+ # run this outside the splines loop (only once)
+ if animall_properties.key_shape:
+ if obj.active_shape_key_index > 0:
+ for CV in obj.active_shape_key.data:
+ delete_key(CV, 'co')
+ delete_key(CV, 'handle_left')
+ delete_key(CV, 'handle_right')
+
+ for spline in data.splines:
+ if spline.type == 'BEZIER':
+ for CV in spline.bezier_points:
+ if (not animall_properties.key_selected
+ or CV.select_control_point
+ or CV.select_left_handle
+ or CV.select_right_handle):
+ if animall_properties.key_points:
+ delete_key(CV, 'co')
+ delete_key(CV, 'handle_left')
+ delete_key(CV, 'handle_right')
+ if animall_properties.key_radius:
+ delete_key(CV, 'radius')
+ if animall_properties.key_tilt:
+ delete_key(CV, 'tilt')
+
+ elif spline.type in ('POLY', 'NURBS'):
+ for CV in spline.points:
+ if not animall_properties.key_selected or CV.select:
+ if animall_properties.key_points:
+ delete_key(CV, 'co')
+ if animall_properties.key_radius:
+ delete_key(CV, 'radius')
+ if animall_properties.key_tilt:
+ delete_key(CV, 'tilt')
+
+ refresh_ui_keyframes()
+
+ return {'FINISHED'}
+
+
+class ANIM_OT_clear_animation_animall(Operator):
+ bl_label = "Clear Animation"
+ bl_idname = "anim.clear_animation_animall"
+ bl_description = ("Delete all keyframes for this object\n"
+ "If in a specific case it doesn't work\n"
+ "try to delete the keys manually")
+ bl_options = {'REGISTER', 'UNDO'}
+
+ def invoke(self, context, event):
+ wm = context.window_manager
+ return wm.invoke_confirm(self, event)
+
+ def execute(self, context):
+ if context.mode == 'OBJECT':
+ objects = context.selected_objects
+ else:
+ objects = context.objects_in_mode_unique_data
+
+ for obj in objects:
+ try:
+ data = obj.data
+ data.animation_data_clear()
+ except:
+ self.report({'WARNING'}, "Clear Animation could not be performed")
+ return {'CANCELLED'}
+
+ refresh_ui_keyframes()
+
+ return {'FINISHED'}
+
+
+# Add-ons Preferences Update Panel
+
+# Define Panel classes for updating
+panels = [
+ VIEW3D_PT_animall
+ ]
+
+
+def update_panel(self, context):
+ message = "AnimAll: Updating Panel locations has failed"
+ try:
+ for panel in panels:
+ if "bl_rna" in panel.__dict__:
+ bpy.utils.unregister_class(panel)
+
+ for panel in panels:
+ panel.bl_category = context.preferences.addons[__name__].preferences.category
+ bpy.utils.register_class(panel)
+
+ except Exception as e:
+ print("\n[{}]\n{}\n\nError:\n{}".format(__name__, message, e))
+ pass
+
+
+class AnimallAddonPreferences(AddonPreferences):
+ # this must match the addon name, use '__package__'
+ # when defining this in a submodule of a python package.
+ bl_idname = __name__
+
+ category: StringProperty(
+ name="Tab Category",
+ description="Choose a name for the category of the panel",
+ default="Animation",
+ update=update_panel
+ )
+
+ def draw(self, context):
+ layout = self.layout
+ row = layout.row()
+ col = row.column()
+
+ col.label(text="Tab Category:")
+ col.prop(self, "category", text="")
+
+
+def register():
+ bpy.utils.register_class(AnimallProperties)
+ bpy.types.WindowManager.animall_properties = bpy.props.PointerProperty(type=AnimallProperties)
+ bpy.utils.register_class(VIEW3D_PT_animall)
+ bpy.utils.register_class(ANIM_OT_insert_keyframe_animall)
+ bpy.utils.register_class(ANIM_OT_delete_keyframe_animall)
+ bpy.utils.register_class(ANIM_OT_clear_animation_animall)
+ bpy.utils.register_class(AnimallAddonPreferences)
+ update_panel(None, bpy.context)
+
+
+def unregister():
+ del bpy.types.WindowManager.animall_properties
+ bpy.utils.unregister_class(AnimallProperties)
+ bpy.utils.unregister_class(VIEW3D_PT_animall)
+ bpy.utils.unregister_class(ANIM_OT_insert_keyframe_animall)
+ bpy.utils.unregister_class(ANIM_OT_delete_keyframe_animall)
+ bpy.utils.unregister_class(ANIM_OT_clear_animation_animall)
+ bpy.utils.unregister_class(AnimallAddonPreferences)
+
+if __name__ == "__main__":
+ register()
diff --git a/archimesh/achm_room_maker.py b/archimesh/achm_room_maker.py
index 645311d2..7a59eee5 100644
--- a/archimesh/achm_room_maker.py
+++ b/archimesh/achm_room_maker.py
@@ -503,7 +503,7 @@ def shape_walls_and_create_children(myroom, tmp_mesh, update=False):
create_walls(rp, baseboardmesh, get_blendunits(rp.base_height), True)
set_normals(mybase, rp.inverse) # inside/outside room
- if rp.base_width > 0.0:
+ if rp.base_width:
set_modifier_solidify(mybase, get_blendunits(rp.base_width))
# Move to Top SOLIDIFY
movetotopsolidify(mybase)
@@ -1527,7 +1527,7 @@ class RoomProperties(PropertyGroup):
)
base_width: FloatProperty(
- name='Width', min=0.001, max=10,
+ name='Width', min=-10, max=10,
default=0.015, precision=3,
description='Baseboard width', update=update_room,
)
diff --git a/blenderkit/asset_inspector.py b/blenderkit/asset_inspector.py
index b437a226..73e6c09a 100644
--- a/blenderkit/asset_inspector.py
+++ b/blenderkit/asset_inspector.py
@@ -350,6 +350,7 @@ class AutoFillTags(bpy.types.Operator):
"""Fill tags for asset. Now run before upload, no need to interact from user side."""
bl_idname = "object.blenderkit_auto_tags"
bl_label = "Generate Auto Tags for BlenderKit"
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
diff --git a/blenderkit/autothumb.py b/blenderkit/autothumb.py
index 2e5eb710..f9e7c85f 100644
--- a/blenderkit/autothumb.py
+++ b/blenderkit/autothumb.py
@@ -256,6 +256,7 @@ class GenerateThumbnailOperator(bpy.types.Operator):
"""Generate Cycles thumbnail for model assets"""
bl_idname = "object.blenderkit_generate_thumbnail"
bl_label = "BlenderKit Thumbnail Generator"
+ bl_options = {'REGISTER', 'INTERNAL'}
@classmethod
def poll(cls, context):
@@ -281,6 +282,16 @@ class GenerateThumbnailOperator(bpy.types.Operator):
def invoke(self, context, event):
wm = context.window_manager
+ if bpy.data.filepath == '':
+ title = "Can't render thumbnail"
+ message = "please save your file first"
+
+ def draw_message(self, context):
+ self.layout.label(text = message)
+
+ bpy.context.window_manager.popup_menu(draw_message, title=title, icon='INFO')
+ return {'FINISHED'}
+
return wm.invoke_props_dialog(self)
@@ -288,6 +299,7 @@ class GenerateMaterialThumbnailOperator(bpy.types.Operator):
"""Tooltip"""
bl_idname = "object.blenderkit_material_thumbnail"
bl_label = "BlenderKit Material Thumbnail Generator"
+ bl_options = {'REGISTER', 'INTERNAL'}
@classmethod
def poll(cls, context):
diff --git a/blenderkit/bg_blender.py b/blenderkit/bg_blender.py
index 4a7afd92..9ed68128 100644
--- a/blenderkit/bg_blender.py
+++ b/blenderkit/bg_blender.py
@@ -157,7 +157,7 @@ class KillBgProcess(bpy.types.Operator):
'''Remove processes in background.'''
bl_idname = "object.kill_bg_process"
bl_label = "Kill Background Process"
- bl_options = {'REGISTER', 'UNDO'}
+ bl_options = {'REGISTER'}
process_type: EnumProperty(
name="Type",
diff --git a/blenderkit/bkit_oauth.py b/blenderkit/bkit_oauth.py
index cb0e7586..f435d95d 100644
--- a/blenderkit/bkit_oauth.py
+++ b/blenderkit/bkit_oauth.py
@@ -97,6 +97,7 @@ class RegisterLoginOnline(bpy.types.Operator):
bl_label = "BlenderKit login or signup"
bl_options = {'REGISTER', 'UNDO'}
+
signup: BoolProperty(
name="create a new account",
description="True for register, otherwise login",
diff --git a/blenderkit/blendfiles/thumbnailer.blend b/blenderkit/blendfiles/thumbnailer.blend
index 84f243d3..970499c3 100644
--- a/blenderkit/blendfiles/thumbnailer.blend
+++ b/blenderkit/blendfiles/thumbnailer.blend
Binary files differ
diff --git a/blenderkit/categories.py b/blenderkit/categories.py
index ee20557c..6407b050 100644
--- a/blenderkit/categories.py
+++ b/blenderkit/categories.py
@@ -92,16 +92,18 @@ def load_categories():
categories_filepath = os.path.join(tempdir, 'categories.json')
wm = bpy.context.window_manager
- with open(categories_filepath, 'r') as catfile:
- wm['bkit_categories'] = json.load(catfile)
-
- wm['active_category'] = {
- 'MODEL': ['model'],
- 'SCENE': ['scene'],
- 'MATERIAL': ['material'],
- 'BRUSH': ['brush'],
- }
-
+ try:
+ with open(categories_filepath, 'r') as catfile:
+ wm['bkit_categories'] = json.load(catfile)
+
+ wm['active_category'] = {
+ 'MODEL': ['model'],
+ 'SCENE': ['scene'],
+ 'MATERIAL': ['material'],
+ 'BRUSH': ['brush'],
+ }
+ except:
+ print('categories failed to read')
def fetch_categories(API_key):
url = paths.get_api_url() + 'categories/'
diff --git a/blenderkit/download.py b/blenderkit/download.py
index 37b2c8e6..366081ca 100644
--- a/blenderkit/download.py
+++ b/blenderkit/download.py
@@ -815,7 +815,7 @@ class BlenderkitKillDownloadOperator(bpy.types.Operator):
"""Kill a download."""
bl_idname = "scene.blenderkit_download_kill"
bl_label = "BlenderKit Kill Asset Download"
- bl_options = {'REGISTER', 'UNDO'}
+ bl_options = {'REGISTER', 'INTERNAL'}
thread_index: IntProperty(name="Thread index", description='index of the thread to kill', default=-1)
@@ -831,7 +831,8 @@ class BlenderkitDownloadOperator(bpy.types.Operator):
"""Download and link asset to scene. Only link if asset already available locally."""
bl_idname = "scene.blenderkit_download"
bl_label = "BlenderKit Asset Download"
- bl_options = {'REGISTER', 'UNDO'}
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
+
asset_type: EnumProperty(
name="Type",
diff --git a/blenderkit/paths.py b/blenderkit/paths.py
index c3f92484..3aa7aaa9 100644
--- a/blenderkit/paths.py
+++ b/blenderkit/paths.py
@@ -24,7 +24,7 @@ BLENDERKIT_MAIN = "https://www.blenderkit.com"
BLENDERKIT_DEVEL = "https://devel.blenderkit.com"
BLENDERKIT_API = "/api/v1/"
BLENDERKIT_REPORT_URL = "usage_report/"
-BLENDERKIT_USER_ASSETS = "https://www.blenderkit.com/my-assets"
+BLENDERKIT_USER_ASSETS = "/my-assets"
BLENDERKIT_PLANS = "https://www.blenderkit.com/plans/pricing/"
BLENDERKIT_MANUAL = "https://youtu.be/1hVgcQhIAo8"
BLENDERKIT_MODEL_UPLOAD_INSTRUCTIONS_URL = "https://www.blenderkit.com/docs/upload/"
diff --git a/blenderkit/ratings.py b/blenderkit/ratings.py
index c3621df3..ddf01e6c 100644
--- a/blenderkit/ratings.py
+++ b/blenderkit/ratings.py
@@ -123,6 +123,7 @@ class StarRatingOperator(bpy.types.Operator):
"""Tooltip"""
bl_idname = "object.blenderkit_rating"
bl_label = "Rate the Asset"
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
property_name: StringProperty(
name="Rating Property",
@@ -153,6 +154,7 @@ class UploadRatingOperator(bpy.types.Operator):
"""Upload rating to the web db"""
bl_idname = "object.blenderkit_rating_upload"
bl_label = "Upload the Rating"
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
# type of upload - model, material, textures, e.t.c.
asset_type: EnumProperty(
diff --git a/blenderkit/search.py b/blenderkit/search.py
index 56c8b526..f19a019e 100644
--- a/blenderkit/search.py
+++ b/blenderkit/search.py
@@ -1096,7 +1096,7 @@ class SearchOperator(Operator):
"""Tooltip"""
bl_idname = "view3d.blenderkit_search"
bl_label = "BlenderKit asset search"
-
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
own: BoolProperty(name="own assets only",
description="Find all own assets",
default=False)
diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index bd30d152..dd4e765b 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -1154,7 +1154,7 @@ class AssetBarOperator(bpy.types.Operator):
'''runs search and displays the asset bar at the same time'''
bl_idname = "view3d.blenderkit_asset_bar"
bl_label = "BlenderKit Asset Bar UI"
- bl_options = {'REGISTER', 'UNDO'}
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
do_search: BoolProperty(name="Run Search", description='', default=True, options={'SKIP_SAVE'})
keep_running: BoolProperty(name="Keep Running", description='', default=True, options={'SKIP_SAVE'})
@@ -1683,9 +1683,27 @@ class AssetBarOperator(bpy.types.Operator):
return {'RUNNING_MODAL'}
+class TransferBlenderkitData(bpy.types.Operator):
+ """Regenerate cobweb"""
+ bl_idname = "object.blenderkit_data_trasnfer"
+ bl_label = "Transfer BlenderKit data"
+ bl_description = "Transfer blenderKit metadata from one object to another when fixing uploads with wrong parenting."
+ bl_options = {'REGISTER', 'UNDO'}
+
+ def execute(self, context):
+ source_ob = bpy.context.active_object
+ for target_ob in bpy.context.selected_objects:
+ if target_ob != source_ob:
+ target_ob.property_unset('blenderkit')
+ for k in source_ob.keys():
+ target_ob[k] = source_ob[k]
+ source_ob.property_unset('blenderkit')
+ return {'FINISHED'}
+
+
classess = (
AssetBarOperator,
-
+ TransferBlenderkitData
)
# store keymap items here to access after registration
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index d17fe040..5a758291 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -430,7 +430,7 @@ class VIEW3D_PT_blenderkit_profile(Panel):
layout.label(text='Remaining private storage: %i MiB' % (me['remainingPrivateQuota']))
layout.operator("wm.url_open", text="See my uploads",
- icon='URL').url = paths.BLENDERKIT_USER_ASSETS
+ icon='URL').url = paths.get_bkit_url() + paths.BLENDERKIT_USER_ASSETS
def draw_panel_model_rating(self, context):
@@ -769,6 +769,7 @@ class SetCategoryOperator(bpy.types.Operator):
"""Visit subcategory"""
bl_idname = "view3d.blenderkit_set_category"
bl_label = "BlenderKit Set Active Category"
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
category: bpy.props.StringProperty(
name="Category",
@@ -803,9 +804,12 @@ def draw_panel_categories(self, context):
# row = layout.row()
# row.prop(ui_props, 'asset_type', expand=True, icon_only=True)
layout.separator()
+
+
layout.label(text='Categories')
wm = bpy.context.window_manager
-
+ if wm.get('bkit_categories') == None:
+ return
col = layout.column(align=True)
if wm.get('active_category') is not None:
acat = wm['active_category'][ui_props.asset_type]
diff --git a/blenderkit/upload.py b/blenderkit/upload.py
index 3616beb0..c9e767a4 100644
--- a/blenderkit/upload.py
+++ b/blenderkit/upload.py
@@ -699,6 +699,7 @@ class UploadOperator(Operator):
bl_description = "Upload or re-upload asset + thumbnail + metadata"
bl_label = "BlenderKit asset upload"
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
# type of upload - model, material, textures, e.t.c.
asset_type: EnumProperty(
@@ -797,6 +798,7 @@ class AssetVerificationStatusChange(Operator):
bl_idname = "object.blenderkit_change_status"
bl_description = "Change asset ststus"
bl_label = "Change verification status"
+ bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
# type of upload - model, material, textures, e.t.c.
asset_id: StringProperty(
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index ca55ef70..742623cb 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "Import Images as Planes",
"author": "Florian Meyer (tstscr), mont29, matali, Ted Schundler (SpkyElctrc)",
- "version": (3, 2, 2),
+ "version": (3, 3, 0),
"blender": (2, 80, 0),
"location": "File > Import > Images as Planes or Add > Mesh > Images as Planes",
"description": "Imports images and creates planes with the appropriate aspect ratio. "
@@ -727,11 +727,11 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
# ------------------------------
# Properties - Material / Shader
SHADERS = (
- ('DIFFUSE', "Diffuse", "Diffuse Shader"),
+ ('PRINCIPLED',"Principled","Principled Shader"),
('SHADELESS', "Shadeless", "Only visible to camera and reflections"),
('EMISSION', "Emit", "Emission Shader"),
)
- shader: EnumProperty(name="Shader", items=SHADERS, default='DIFFUSE', description="Node shader to use")
+ shader: EnumProperty(name="Shader", items=SHADERS, default='PRINCIPLED', description="Node shader to use")
emit_strength: FloatProperty(
name="Strength", min=0.0, default=1.0, soft_max=10.0,
@@ -1009,8 +1009,8 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
tex_image = self.create_cycles_texnode(context, node_tree, img_spec)
- if self.shader == 'DIFFUSE':
- core_shader = node_tree.nodes.new('ShaderNodeBsdfDiffuse')
+ if self.shader == 'PRINCIPLED':
+ core_shader = node_tree.nodes.new('ShaderNodeBsdfPrincipled')
elif self.shader == 'SHADELESS':
core_shader = get_shadeless_node(node_tree)
else: # Emission Shading
@@ -1021,13 +1021,7 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
node_tree.links.new(core_shader.inputs[0], tex_image.outputs[0])
if self.use_transparency:
- bsdf_transparent = node_tree.nodes.new('ShaderNodeBsdfTransparent')
-
- mix_shader = node_tree.nodes.new('ShaderNodeMixShader')
- node_tree.links.new(mix_shader.inputs[0], tex_image.outputs[1])
- node_tree.links.new(mix_shader.inputs[1], bsdf_transparent.outputs[0])
- node_tree.links.new(mix_shader.inputs[2], core_shader.outputs[0])
- core_shader = mix_shader
+ node_tree.links.new(core_shader.inputs[18], tex_image.outputs[1])
node_tree.links.new(out_node.inputs[0], core_shader.outputs[0])
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index b7caf3d3..4c0e911c 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "FBX format",
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
- "version": (4, 14, 14),
+ "version": (4, 14, 15),
"blender": (2, 80, 0),
"location": "File > Import-Export",
"description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 35c17c3d..9292d656 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -1032,42 +1032,53 @@ def fbx_data_mesh_elements(root, me_obj, scene_data, done_meshes):
if scene_data.settings.use_tspace:
tspacenumber = len(me.uv_layers)
if tspacenumber:
- t_ln = array.array(data_types.ARRAY_FLOAT64, (0.0,)) * len(me.loops) * 3
- # t_lnw = array.array(data_types.ARRAY_FLOAT64, (0.0,)) * len(me.loops)
- uv_names = [uvlayer.name for uvlayer in me.uv_layers]
- for name in uv_names:
- me.calc_tangents(uvmap=name)
- for idx, uvlayer in enumerate(me.uv_layers):
- name = uvlayer.name
- # Loop bitangents (aka binormals).
- # NOTE: this is not supported by importer currently.
- me.loops.foreach_get("bitangent", t_ln)
- lay_nor = elem_data_single_int32(geom, b"LayerElementBinormal", idx)
- elem_data_single_int32(lay_nor, b"Version", FBX_GEOMETRY_BINORMAL_VERSION)
- elem_data_single_string_unicode(lay_nor, b"Name", name)
- elem_data_single_string(lay_nor, b"MappingInformationType", b"ByPolygonVertex")
- elem_data_single_string(lay_nor, b"ReferenceInformationType", b"Direct")
- elem_data_single_float64_array(lay_nor, b"Binormals",
- chain(*nors_transformed_gen(t_ln, geom_mat_no)))
- # Binormal weights, no idea what it is.
- # elem_data_single_float64_array(lay_nor, b"BinormalsW", t_lnw)
-
- # Loop tangents.
- # NOTE: this is not supported by importer currently.
- me.loops.foreach_get("tangent", t_ln)
- lay_nor = elem_data_single_int32(geom, b"LayerElementTangent", idx)
- elem_data_single_int32(lay_nor, b"Version", FBX_GEOMETRY_TANGENT_VERSION)
- elem_data_single_string_unicode(lay_nor, b"Name", name)
- elem_data_single_string(lay_nor, b"MappingInformationType", b"ByPolygonVertex")
- elem_data_single_string(lay_nor, b"ReferenceInformationType", b"Direct")
- elem_data_single_float64_array(lay_nor, b"Tangents",
- chain(*nors_transformed_gen(t_ln, geom_mat_no)))
- # Tangent weights, no idea what it is.
- # elem_data_single_float64_array(lay_nor, b"TangentsW", t_lnw)
-
- del t_ln
- # del t_lnw
- me.free_tangents()
+ # We can only compute tspace on tesellated meshes, need to check that here...
+ t_lt = [None] * len(me.polygons)
+ me.polygons.foreach_get("loop_total", t_lt)
+ if any((lt > 4 for lt in t_lt)):
+ del t_lt
+ scene_data.settings.report(
+ {'WARNING'},
+ "Mesh '%s' has polygons with more than 4 vertices, "
+ "cannot compute/export tangent space for it" % me.name)
+ else:
+ del t_lt
+ t_ln = array.array(data_types.ARRAY_FLOAT64, (0.0,)) * len(me.loops) * 3
+ # t_lnw = array.array(data_types.ARRAY_FLOAT64, (0.0,)) * len(me.loops)
+ uv_names = [uvlayer.name for uvlayer in me.uv_layers]
+ for name in uv_names:
+ me.calc_tangents(uvmap=name)
+ for idx, uvlayer in enumerate(me.uv_layers):
+ name = uvlayer.name
+ # Loop bitangents (aka binormals).
+ # NOTE: this is not supported by importer currently.
+ me.loops.foreach_get("bitangent", t_ln)
+ lay_nor = elem_data_single_int32(geom, b"LayerElementBinormal", idx)
+ elem_data_single_int32(lay_nor, b"Version", FBX_GEOMETRY_BINORMAL_VERSION)
+ elem_data_single_string_unicode(lay_nor, b"Name", name)
+ elem_data_single_string(lay_nor, b"MappingInformationType", b"ByPolygonVertex")
+ elem_data_single_string(lay_nor, b"ReferenceInformationType", b"Direct")
+ elem_data_single_float64_array(lay_nor, b"Binormals",
+ chain(*nors_transformed_gen(t_ln, geom_mat_no)))
+ # Binormal weights, no idea what it is.
+ # elem_data_single_float64_array(lay_nor, b"BinormalsW", t_lnw)
+
+ # Loop tangents.
+ # NOTE: this is not supported by importer currently.
+ me.loops.foreach_get("tangent", t_ln)
+ lay_nor = elem_data_single_int32(geom, b"LayerElementTangent", idx)
+ elem_data_single_int32(lay_nor, b"Version", FBX_GEOMETRY_TANGENT_VERSION)
+ elem_data_single_string_unicode(lay_nor, b"Name", name)
+ elem_data_single_string(lay_nor, b"MappingInformationType", b"ByPolygonVertex")
+ elem_data_single_string(lay_nor, b"ReferenceInformationType", b"Direct")
+ elem_data_single_float64_array(lay_nor, b"Tangents",
+ chain(*nors_transformed_gen(t_ln, geom_mat_no)))
+ # Tangent weights, no idea what it is.
+ # elem_data_single_float64_array(lay_nor, b"TangentsW", t_lnw)
+
+ del t_ln
+ # del t_lnw
+ me.free_tangents()
me.free_normals_split()
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index a9f47bca..66d09a44 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
- "version": (0, 9, 47),
+ "version": (0, 9, 53),
'blender': (2, 80, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_export.py b/io_scene_gltf2/blender/exp/gltf2_blender_export.py
index a41759a3..8c39cfdb 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_export.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_export.py
@@ -66,14 +66,14 @@ def __get_copyright(export_settings):
def __gather_gltf(exporter, export_settings):
- scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
+ active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
if export_settings['gltf_draco_mesh_compression']:
gltf2_io_draco_compression_extension.compress_scene_primitives(scenes, export_settings)
exporter.add_draco_extension()
- for scene in scenes:
- exporter.add_scene(scene)
+ for idx, scene in enumerate(scenes):
+ exporter.add_scene(scene, idx==active_scene_idx)
for animation in animations:
exporter.add_animation(animation)
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
index 69c3f1d6..a4705e91 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
@@ -499,14 +499,14 @@ def extract_primitives(glTF, blender_mesh, blender_vertex_groups, modifiers, exp
blender_shape_keys = []
if blender_mesh.shape_keys is not None:
- morph_max = len(blender_mesh.shape_keys.key_blocks) - 1
-
for blender_shape_key in blender_mesh.shape_keys.key_blocks:
if blender_shape_key != blender_shape_key.relative_key:
- blender_shape_keys.append(ShapeKey(
- blender_shape_key,
- blender_shape_key.normals_vertex_get(), # calculate vertex normals for this shape key
- blender_shape_key.normals_polygon_get())) # calculate polygon normals for this shape key
+ if blender_shape_key.mute is False:
+ morph_max += 1
+ blender_shape_keys.append(ShapeKey(
+ blender_shape_key,
+ blender_shape_key.normals_vertex_get(), # calculate vertex normals for this shape key
+ blender_shape_key.normals_polygon_get())) # calculate polygon normals for this shape key
#
# Convert polygon to primitive indices and eliminate invalid ones. Assign to material.
@@ -588,7 +588,7 @@ def extract_primitives(glTF, blender_mesh, blender_vertex_groups, modifiers, exp
vertex = blender_mesh.vertices[vertex_index]
v = convert_swizzle_location(vertex.co, export_settings)
- if blender_polygon.use_smooth:
+ if blender_polygon.use_smooth or blender_mesh.use_auto_smooth:
if blender_mesh.has_custom_normals:
n = convert_swizzle_location(blender_mesh.loops[loop_index].normal, export_settings)
else:
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather.py
index 013debdc..4d28a4bd 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather.py
@@ -30,12 +30,14 @@ def gather_gltf2(export_settings):
"""
scenes = []
animations = [] # unfortunately animations in gltf2 are just as 'root' as scenes.
+ active_scene = None
for blender_scene in bpy.data.scenes:
scenes.append(__gather_scene(blender_scene, export_settings))
if export_settings[gltf2_blender_export_keys.ANIMATIONS]:
animations += __gather_animations(blender_scene, export_settings)
-
- return scenes, animations
+ if bpy.context.scene.name == blender_scene.name:
+ active_scene = len(scenes) -1
+ return active_scene, scenes, animations
@cached
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
index 412f275b..45a75717 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
@@ -64,12 +64,35 @@ def gather_animation_channels(blender_action: bpy.types.Action,
channels.append(channel)
else:
for channel_group in __get_channel_groups(blender_action, blender_object, export_settings):
- channel = __gather_animation_channel(channel_group, blender_object, export_settings, None, None, None, None, blender_action.name)
+ channel_group_sorted = __get_channel_group_sorted(channel_group, blender_object)
+ channel = __gather_animation_channel(channel_group_sorted, blender_object, export_settings, None, None, None, None, blender_action.name)
if channel is not None:
channels.append(channel)
return channels
+def __get_channel_group_sorted(channels: typing.Tuple[bpy.types.FCurve], blender_object: bpy.types.Object):
+ # if this is shapekey animation, we need to sort in same order than shapekeys
+ # else, no need to sort
+ if blender_object.type == "MESH":
+ first_channel = channels[0]
+ object_path = get_target_object_path(first_channel.data_path)
+ if object_path:
+ # This is shapekeys, we need to sort channels
+ shapekeys_idx = {}
+ cpt_sk = 0
+ for sk in blender_object.data.shape_keys.key_blocks:
+ if sk == sk.relative_key:
+ continue
+ if sk.mute is True:
+ continue
+ shapekeys_idx[sk.name] = cpt_sk
+ cpt_sk += 1
+
+ return tuple(sorted(channels, key=lambda x: shapekeys_idx[blender_object.data.shape_keys.path_resolve(get_target_object_path(x.data_path)).name]))
+
+ # if not shapekeys, stay in same order, because order doesn't matter
+ return channels
def __gather_animation_channel(channels: typing.Tuple[bpy.types.FCurve],
blender_object: bpy.types.Object,
@@ -164,12 +187,17 @@ def __get_channel_groups(blender_action: bpy.types.Action, blender_object: bpy.t
else:
try:
target = gltf2_blender_get.get_object_from_datapath(blender_object, object_path)
+ if blender_object.type == "MESH":
+ shape_key = blender_object.data.shape_keys.path_resolve(object_path)
+ if shape_key.mute is True:
+ continue
except ValueError as e:
# if the object is a mesh and the action target path can not be resolved, we know that this is a morph
# animation.
if blender_object.type == "MESH":
- # if you need the specific shape key for some reason, this is it:
- # shape_key = blender_object.data.shape_keys.path_resolve(object_path)
+ shape_key = blender_object.data.shape_keys.path_resolve(object_path)
+ if shape_key.mute is True:
+ continue
target = blender_object.data.shape_keys
else:
gltf2_io_debug.print_console("WARNING", "Animation target {} not found".format(object_path))
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
index a92de291..9f322f10 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
@@ -148,7 +148,7 @@ def __get_image_data(sockets_or_slots, export_settings) -> gltf2_blender_image.E
if image.name in channelcache:
return channelcache[image.name]
- pixels = np.array(image.pixels)
+ pixels = np.array(image.pixels[:])
pixels = pixels.reshape((pixels.shape[0] // image.channels, image.channels))
channels = np.split(pixels, pixels.shape[1], axis=1)
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py
index e321ea07..d0d2d4a5 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py
@@ -83,7 +83,8 @@ def __gather_extras(blender_mesh: bpy.types.Mesh,
target_names = []
for blender_shape_key in blender_mesh.shape_keys.key_blocks:
if blender_shape_key != blender_shape_key.relative_key:
- target_names.append(blender_shape_key.name)
+ if blender_shape_key.mute is False:
+ target_names.append(blender_shape_key.name)
extras['targetNames'] = target_names
if extras:
@@ -130,7 +131,8 @@ def __gather_weights(blender_mesh: bpy.types.Mesh,
for blender_shape_key in blender_mesh.shape_keys.key_blocks:
if blender_shape_key != blender_shape_key.relative_key:
- weights.append(blender_shape_key.value)
+ if blender_shape_key.mute is False:
+ weights.append(blender_shape_key.value)
return weights
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
index c13af707..c0fa11ff 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
@@ -224,6 +224,11 @@ def __gather_mesh(blender_object, export_settings):
if blender_object.type != "MESH":
return None
+ modifier_normal_types = [
+ "NORMAL_EDIT",
+ "WEIGHTED_NORMAL"
+ ]
+
# If not using vertex group, they are irrelevant for caching --> ensure that they do not trigger a cache miss
vertex_groups = blender_object.vertex_groups
modifiers = blender_object.modifiers
@@ -239,7 +244,7 @@ def __gather_mesh(blender_object, export_settings):
edge_split = blender_object.modifiers.new('Temporary_Auto_Smooth', 'EDGE_SPLIT')
edge_split.split_angle = blender_object.data.auto_smooth_angle
edge_split.use_edge_angle = not blender_object.data.has_custom_normals
- blender_object.data.use_auto_smooth = False
+ blender_object.data.use_auto_smooth = any([m in modifier_normal_types for m in [mod.type for mod in blender_object.modifiers]])
bpy.context.view_layer.update()
armature_modifiers = {}
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives.py
index 2c4ee91f..82673e5e 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives.py
@@ -143,87 +143,91 @@ def __gather_targets(blender_primitive, blender_mesh, modifiers, export_settings
if blender_mesh.shape_keys is not None:
morph_index = 0
for blender_shape_key in blender_mesh.shape_keys.key_blocks:
- if blender_shape_key != blender_shape_key.relative_key:
-
- target_position_id = 'MORPH_POSITION_' + str(morph_index)
- target_normal_id = 'MORPH_NORMAL_' + str(morph_index)
- target_tangent_id = 'MORPH_TANGENT_' + str(morph_index)
-
- if blender_primitive["attributes"].get(target_position_id):
- target = {}
- internal_target_position = blender_primitive["attributes"][target_position_id]
+ if blender_shape_key == blender_shape_key.relative_key:
+ continue
+
+ if blender_shape_key.mute is True:
+ continue
+
+ target_position_id = 'MORPH_POSITION_' + str(morph_index)
+ target_normal_id = 'MORPH_NORMAL_' + str(morph_index)
+ target_tangent_id = 'MORPH_TANGENT_' + str(morph_index)
+
+ if blender_primitive["attributes"].get(target_position_id):
+ target = {}
+ internal_target_position = blender_primitive["attributes"][target_position_id]
+ binary_data = gltf2_io_binary_data.BinaryData.from_list(
+ internal_target_position,
+ gltf2_io_constants.ComponentType.Float
+ )
+ target["POSITION"] = gltf2_io.Accessor(
+ buffer_view=binary_data,
+ byte_offset=None,
+ component_type=gltf2_io_constants.ComponentType.Float,
+ count=len(internal_target_position) // gltf2_io_constants.DataType.num_elements(
+ gltf2_io_constants.DataType.Vec3),
+ extensions=None,
+ extras=None,
+ max=gltf2_blender_utils.max_components(
+ internal_target_position, gltf2_io_constants.DataType.Vec3),
+ min=gltf2_blender_utils.min_components(
+ internal_target_position, gltf2_io_constants.DataType.Vec3),
+ name=None,
+ normalized=None,
+ sparse=None,
+ type=gltf2_io_constants.DataType.Vec3
+ )
+
+ if export_settings[NORMALS] \
+ and export_settings[MORPH_NORMAL] \
+ and blender_primitive["attributes"].get(target_normal_id):
+
+ internal_target_normal = blender_primitive["attributes"][target_normal_id]
binary_data = gltf2_io_binary_data.BinaryData.from_list(
- internal_target_position,
- gltf2_io_constants.ComponentType.Float
+ internal_target_normal,
+ gltf2_io_constants.ComponentType.Float,
)
- target["POSITION"] = gltf2_io.Accessor(
+ target['NORMAL'] = gltf2_io.Accessor(
buffer_view=binary_data,
byte_offset=None,
component_type=gltf2_io_constants.ComponentType.Float,
- count=len(internal_target_position) // gltf2_io_constants.DataType.num_elements(
+ count=len(internal_target_normal) // gltf2_io_constants.DataType.num_elements(
gltf2_io_constants.DataType.Vec3),
extensions=None,
extras=None,
- max=gltf2_blender_utils.max_components(
- internal_target_position, gltf2_io_constants.DataType.Vec3),
- min=gltf2_blender_utils.min_components(
- internal_target_position, gltf2_io_constants.DataType.Vec3),
+ max=None,
+ min=None,
name=None,
normalized=None,
sparse=None,
type=gltf2_io_constants.DataType.Vec3
)
- if export_settings[NORMALS] \
- and export_settings[MORPH_NORMAL] \
- and blender_primitive["attributes"].get(target_normal_id):
-
- internal_target_normal = blender_primitive["attributes"][target_normal_id]
- binary_data = gltf2_io_binary_data.BinaryData.from_list(
- internal_target_normal,
- gltf2_io_constants.ComponentType.Float,
- )
- target['NORMAL'] = gltf2_io.Accessor(
- buffer_view=binary_data,
- byte_offset=None,
- component_type=gltf2_io_constants.ComponentType.Float,
- count=len(internal_target_normal) // gltf2_io_constants.DataType.num_elements(
- gltf2_io_constants.DataType.Vec3),
- extensions=None,
- extras=None,
- max=None,
- min=None,
- name=None,
- normalized=None,
- sparse=None,
- type=gltf2_io_constants.DataType.Vec3
- )
-
- if export_settings[TANGENTS] \
- and export_settings[MORPH_TANGENT] \
- and blender_primitive["attributes"].get(target_tangent_id):
- internal_target_tangent = blender_primitive["attributes"][target_tangent_id]
- binary_data = gltf2_io_binary_data.BinaryData.from_list(
- internal_target_tangent,
- gltf2_io_constants.ComponentType.Float,
- )
- target['TANGENT'] = gltf2_io.Accessor(
- buffer_view=binary_data,
- byte_offset=None,
- component_type=gltf2_io_constants.ComponentType.Float,
- count=len(internal_target_tangent) // gltf2_io_constants.DataType.num_elements(
- gltf2_io_constants.DataType.Vec3),
- extensions=None,
- extras=None,
- max=None,
- min=None,
- name=None,
- normalized=None,
- sparse=None,
- type=gltf2_io_constants.DataType.Vec3
- )
- targets.append(target)
- morph_index += 1
+ if export_settings[TANGENTS] \
+ and export_settings[MORPH_TANGENT] \
+ and blender_primitive["attributes"].get(target_tangent_id):
+ internal_target_tangent = blender_primitive["attributes"][target_tangent_id]
+ binary_data = gltf2_io_binary_data.BinaryData.from_list(
+ internal_target_tangent,
+ gltf2_io_constants.ComponentType.Float,
+ )
+ target['TANGENT'] = gltf2_io.Accessor(
+ buffer_view=binary_data,
+ byte_offset=None,
+ component_type=gltf2_io_constants.ComponentType.Float,
+ count=len(internal_target_tangent) // gltf2_io_constants.DataType.num_elements(
+ gltf2_io_constants.DataType.Vec3),
+ extensions=None,
+ extras=None,
+ max=None,
+ min=None,
+ name=None,
+ normalized=None,
+ sparse=None,
+ type=gltf2_io_constants.DataType.Vec3
+ )
+ targets.append(target)
+ morph_index += 1
return targets
return None
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py b/io_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py
index 19157c46..e97a30fd 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py
@@ -156,7 +156,7 @@ class GlTF2Exporter:
with open(dst_path, 'wb') as f:
f.write(image.data)
- def add_scene(self, scene: gltf2_io.Scene, active: bool = True):
+ def add_scene(self, scene: gltf2_io.Scene, active: bool = False):
"""
Add a scene to the glTF.
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_image.py b/io_scene_gltf2/blender/exp/gltf2_blender_image.py
index 707feb91..828b07fe 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_image.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_image.py
@@ -46,7 +46,7 @@ class ExportImage:
@classmethod
def from_blender_image(cls, blender_image: bpy.types.Image):
- img = np.array(blender_image.pixels)
+ img = np.array(blender_image.pixels[:])
img = img.reshape((blender_image.size[0], blender_image.size[1], blender_image.channels))
has_alpha = blender_image.depth == 32
return ExportImage(img=img, blender_image=blender_image, has_alpha=has_alpha)
diff --git a/io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py b/io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py
index 222aab3a..2d42ce10 100644
--- a/io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py
+++ b/io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py
@@ -28,11 +28,12 @@ def dll_path() -> Path:
"""
lib_name = 'extern_draco'
blender_root = Path(bpy.app.binary_path).parent
- python_lib = Path('2.80/python/lib')
+ python_lib = Path("{v[0]}.{v[1]}/python/lib".format(v=bpy.app.version))
+ python_version = "python{v[0]}.{v[1]}".format(v=sys.version_info)
paths = {
'win32': blender_root/python_lib/'site-packages'/'{}.dll'.format(lib_name),
- 'linux': blender_root/python_lib/'python3.7'/'site-packages'/'lib{}.so'.format(lib_name),
- 'darwin': blender_root.parent/'Resources'/python_lib/'python3.7'/'site-packages'/'lib{}.dylib'.format(lib_name)
+ 'linux': blender_root/python_lib/python_version/'site-packages'/'lib{}.so'.format(lib_name),
+ 'darwin': blender_root.parent/'Resources'/python_lib/python_version/'site-packages'/'lib{}.dylib'.format(lib_name)
}
path = paths.get(sys.platform)
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py
index 70b67ba6..f776b125 100644
--- a/io_scene_x3d/__init__.py
+++ b/io_scene_x3d/__init__.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "Web3D X3D/VRML2 format",
"author": "Campbell Barton, Bart, Bastien Montagne, Seva Alekseyev",
- "version": (2, 2, 1),
+ "version": (2, 2, 2),
"blender": (2, 80, 0),
"location": "File > Import-Export",
"description": "Import-Export X3D, Import VRML2",
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index ea591d7a..9c1ceae8 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -2341,7 +2341,7 @@ def importMesh_Extrusion(geom, ancestry):
in scaledLoopVertex(mloops[lb + i].vertex_index % nc)]
importMesh_ApplyTextureToLoops(bpymesh, loops)
- bpymesh.validate(True)
+ bpymesh.validate()
bpymesh.update()
return bpymesh
@@ -2478,8 +2478,19 @@ def importMesh_Sphere(geom, ancestry):
-cos(lou * seg) * sin(lau * ring))]
bpymesh.vertices.foreach_set('co', co)
+ num_poly = ns * nr
+ num_tri = ns * 2
+ num_quad = num_poly - num_tri
+ num_loop = num_quad * 4 + num_tri * 3
tf = bpymesh.polygons
- tf.add(ns * nr)
+ tf.add(num_poly)
+ bpymesh.loops.add(num_loop)
+ bpymesh.polygons.foreach_set("loop_start",
+ tuple(range(0, ns * 3, 3)) +
+ tuple(range(ns * 3, num_loop - ns * 3, 4)) +
+ tuple(range(num_loop - ns * 3, num_loop, 3)))
+ bpymesh.polygons.foreach_set("loop_total", (3,) * ns + (4,) * num_quad + (3,) * ns)
+
vb = 2 + (nr - 2) * ns # First vertex index for the bottom cap
fb = (nr - 1) * ns # First face index for the bottom cap
@@ -2499,12 +2510,12 @@ def importMesh_Sphere(geom, ancestry):
for seg in range(ns):
tf[seg].vertices = (0, seg + 2, (seg + 1) % ns + 2)
tf[fb + seg].vertices = (1, vb + (seg + 1) % ns, vb + seg)
- for lidx, uv in zip(tf[seg].loops,
+ for lidx, uv in zip(tf[seg].loop_indices,
(((seg + 0.5) / ns, 1),
(seg / ns, 1 - 1 / nr),
((seg + 1) / ns, 1 - 1 / nr))):
tex[lidx].uv = uv
- for lidx, uv in zip(tf[fb + seg].loops,
+ for lidx, uv in zip(tf[fb + seg].loop_indices,
(((seg + 0.5) / ns, 0),
((seg + 1) / ns, 1 / nr),
(seg / ns, 1 / nr))):
@@ -2521,15 +2532,15 @@ def importMesh_Sphere(geom, ancestry):
# First face index for the ring
for seg in range(ns):
nseg = (seg + 1) % ns
- tf[rfb + seg].vertices_raw = (tvb + seg, bvb + seg, bvb + nseg, tvb + nseg)
- for lidx, uv in zip(tf[rfb + seg].loops,
+ tf[rfb + seg].vertices = (tvb + seg, bvb + seg, bvb + nseg, tvb + nseg)
+ for lidx, uv in zip(tf[rfb + seg].loop_indices,
((seg / ns, 1 - (ring + 1) / nr),
(seg / ns, 1 - (ring + 2) / nr),
((seg + 1) / ns, 1 - (ring + 2) / nr),
((seg + 1) / ns, 1 - (ring + 1) / nr))):
tex[lidx].uv = uv
- bpymesh.validate(False)
+ bpymesh.validate()
bpymesh.update()
return bpymesh
@@ -2570,7 +2581,7 @@ def importMesh_Cylinder(geom, ancestry):
# Tried constructing the mesh manually from polygons/loops/edges,
# the difference in performance on Blender 2.74 (Win64) is negligible.
- bpymesh.validate(False)
+ bpymesh.validate()
# The structure of the loop array goes: cap, side, cap.
loops = []
@@ -2619,7 +2630,7 @@ def importMesh_Cone(geom, ancestry):
bpymesh = bpy.data.meshes.new(name="Cone")
bpymesh.from_pydata(verts, [], faces)
- bpymesh.validate(False)
+ bpymesh.validate()
loops = []
if side:
loops += [co for i in range(n)
@@ -2662,7 +2673,7 @@ def importMesh_Box(geom, ancestry):
5, 1, 0, 4, # +z
7, 6, 5, 4)) # -y
- bpymesh.validate(False)
+ bpymesh.validate()
d = bpymesh.uv_layers.new().data
d.foreach_set('uv', (
1, 0, 0, 0, 0, 1, 1, 1,
diff --git a/materials_library_vx/__init__.py b/materials_library_vx/__init__.py
index 0e9cf5e7..16713b29 100644
--- a/materials_library_vx/__init__.py
+++ b/materials_library_vx/__init__.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "Material Library",
"author": "Mackraken (mackraken2023@hotmail.com)",
- "version": (0, 5, 8),
+ "version": (0, 5, 9),
"blender": (2, 80, 0),
"location": "Properties > Material",
"description": "Material Library VX",
@@ -301,7 +301,7 @@ class matlibProperties(PropertyGroup):
#hide_search: Hides Search Field
link: BoolProperty(name = "Linked", description="Link the material", default = False)
force_import: BoolProperty(name = "Force Import", description="Use Scene Materials by default", default = False)
- filter: BoolProperty(name = "Filter",description="Filter Categories", default = False, update=update_filter)
+ filter: BoolProperty(name = "Filter",description="Filter Categories", default = True, update=update_filter)
show_prefs: BoolProperty(name = "show_prefs", description="Preferences", default = False)
last_selected: StringProperty(name="Last Selected")
hide_search: BoolProperty(name="Hide Search", description="Use Blender Search Only")
@@ -1133,55 +1133,56 @@ class MATLIB_PT_vxPanel(Panel):
# matlib.__init__()
#libraries
- row = layout.row(align=True)
+ col = layout.column(align=True)
if matlib.current_library:
text = matlib.current_library.shortname
else:
text = "Select a Library"
-
- row.menu("MATLIB_MT_LibsMenu",text=text)
- row.operator("matlib.operator", icon="ADD", text="").cmd = "LIBRARY_ADD"
- if matlib.active_material:
- row.label(text = matlib.active_material.category)
- else:
- row.label(text="")
- #
- # #search
- if not matlib.hide_search:
- row = layout.row(align=True)
- row.prop_search(matlib, "search", matlib, "materials", text="", icon="VIEWZOOM")
+ split = col.split(factor=0.55, align=True)
+ split.menu("MATLIB_MT_LibsMenu",text=text)
+ split.operator("matlib.operator", icon="ADD", text="New Library").cmd = "LIBRARY_ADD"
# #list
row = layout.row()
row.template_list("UI_UL_list", " ", matlib, "materials", matlib, "mat_index", rows=6)
- col = row.column(align=True)
- row = layout.row()
-
+ col = row.column()
+ # row = layout.row()
#operators
- col.operator("matlib.operator", icon="ADD", text="").cmd="ADD"
- col.operator("matlib.operator", icon="REMOVE", text="").cmd="REMOVE"
- col.operator("matlib.operator", icon="FILE_REFRESH", text="").cmd="RELOAD"
- col.operator("matlib.operator", icon="MATERIAL", text="").cmd="APPLY"
- col.operator("matlib.operator", icon="COLOR", text="").cmd="PREVIEW"
- col.operator("matlib.operator", icon="GHOST_DISABLED", text="").cmd="FLUSH"
- col.prop(matlib, "show_prefs", icon="MODIFIER", text="")
+ col.operator("matlib.operator", icon="ADD", text="Add To Library").cmd="ADD"
+ col.operator("matlib.operator", icon="MATERIAL", text="Apply To Selected").cmd="APPLY"
+ col.operator("matlib.operator", icon="FILE_REFRESH", text="Reload Material").cmd="RELOAD"
+ col.operator("matlib.operator", icon="COLOR", text="Preview Material").cmd="PREVIEW"
+ col.operator("matlib.operator", icon="GHOST_DISABLED", text="Remove Preview").cmd="FLUSH"
+ col.operator("matlib.operator", icon="REMOVE", text="Remove Material").cmd="REMOVE"
+ col.prop(matlib, "show_prefs", icon="MODIFIER", text="Settings")
+
+ # Search
+ if not matlib.hide_search:
+ row = layout.row(align=True)
+ row.prop_search(matlib, "search", matlib, "materials", text="", icon="VIEWZOOM")
#categories
+ row = layout.row()
+ if matlib.active_material:
+ row.label(text="Category:")
+ row.label(text = matlib.active_material.category)
+ else:
+ row.label(text="Category Tools:")
row = layout.row(align=True)
text = "All"
if matlib.current_category: text = matlib.current_category
row.menu("MATLIB_MT_CatsMenu",text=text)
- row.prop(matlib, "filter", icon="FILTER", text="")
- row.operator("matlib.operator", icon="FILE_PARENT", text="").cmd="FILTER_SET"
- row.operator("matlib.operator", icon="ADD", text="").cmd="FILTER_ADD"
- row.operator("matlib.operator", icon="REMOVE", text="").cmd="FILTER_REMOVE"
+ row = layout.row(align=True)
+ row.prop(matlib, "filter", icon="FILTER", text="Filter")
+ row.operator("matlib.operator", icon="FILE_PARENT", text="Set Type").cmd="FILTER_SET"
+ row.operator("matlib.operator", icon="ADD", text="New").cmd="FILTER_ADD"
+ row.operator("matlib.operator", icon="REMOVE", text="Remove").cmd="FILTER_REMOVE"
#prefs
if matlib.show_prefs:
- row = layout.row()
+ row = layout.row(align=True)
row.prop(matlib, "force_import")
row.prop(matlib, "link")
- row = layout.row()
row.prop(matlib, "hide_search")
# row = layout.row(align=True)
#row = layout.row()
@@ -1262,7 +1263,7 @@ matlibvxPref
"""
def register():
global libraries
- #bpy.utils.register_module(__name__)
+
for c in classes:
bpy.utils.register_class(c)
Scene.matlib_categories = CollectionProperty(type=EmptyGroup)
@@ -1273,7 +1274,7 @@ def register():
def unregister():
global libraries
- #bpy.utils.unregister_module(__name__)
+
try:
# raise ValueError list.remove(x): x not in list
del Scene.matlib_categories
diff --git a/measureit/measureit_geometry.py b/measureit/measureit_geometry.py
index 6b20d713..8aa834dd 100644
--- a/measureit/measureit_geometry.py
+++ b/measureit/measureit_geometry.py
@@ -810,7 +810,8 @@ def draw_text(myobj, pos2d, display_text, rgba, fsize, align='L', text_rot=0.0):
gap = 12
x_pos, y_pos = pos2d
font_id = 0
- blf.size(font_id, fsize, 72)
+ ui_scale = bpy.context.preferences.system.ui_scale
+ blf.size(font_id, round(fsize * ui_scale), bpy.context.preferences.system.dpi)
# blf.size(font_id, fsize, dpi)
# height of one line
mwidth, mheight = blf.dimensions(font_id, "Tp") # uses high/low letters
diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py
index abd8e77e..90caee2c 100644
--- a/mesh_bsurfaces.py
+++ b/mesh_bsurfaces.py
@@ -20,7 +20,7 @@
bl_info = {
"name": "Bsurfaces GPL Edition",
"author": "Eclectiel, Spivak Vladimir(cwolf3d)",
- "version": (1, 6, 0),
+ "version": (1, 6, 1),
"blender": (2, 80, 0),
"location": "View3D EditMode > Sidebar > Edit Tab",
"description": "Modeling and retopology tool",
@@ -50,6 +50,7 @@ from bpy.props import (
IntProperty,
StringProperty,
PointerProperty,
+ EnumProperty,
)
from bpy.types import (
Operator,
@@ -75,16 +76,16 @@ class VIEW3D_PT_tools_SURFSK_mesh(Panel):
row.separator()
col.operator("gpencil.surfsk_init", text="Initialize")
col.prop(scn, "SURFSK_object_with_retopology")
- col.prop(scn, "SURFSK_use_annotation")
- if not scn.SURFSK_use_annotation:
+ col.row().prop(scn, "SURFSK_guide", expand=True)
+ if not scn.SURFSK_guide == 'Annotation':
col.prop(scn, "SURFSK_object_with_strokes")
col.separator()
props = col.operator("gpencil.surfsk_add_surface", text="Add Surface")
col.operator("gpencil.surfsk_edit_surface", text="Edit Surface")
- if not scn.SURFSK_use_annotation:
+ if scn.SURFSK_guide == 'GPencil':
col.operator("gpencil.surfsk_add_strokes", text="Add Strokes")
col.operator("gpencil.surfsk_edit_strokes", text="Edit Strokes")
- else:
+ if scn.SURFSK_guide == 'Annotation':
col.operator("gpencil.surfsk_add_annotation", text="Add Annotation")
col.separator()
col.label(text="Initial settings:")
@@ -124,7 +125,7 @@ def get_strokes_type(context):
strokes_num = 0
# Check if they are grease pencil
- if context.scene.bsurfaces.SURFSK_use_annotation:
+ if context.scene.bsurfaces.SURFSK_guide == 'Annotation':
try:
strokes = bpy.data.grease_pencils[0].layers.active.active_frame.strokes
@@ -3213,6 +3214,7 @@ class GPENCIL_OT_SURFSK_add_surface(Operator):
# self.edges_V = 1
#else:
# self.edges_V = bsurfaces_props.SURFSK_edges_V
+ self.edges_U = bsurfaces_props.SURFSK_edges_U
self.edges_V = bsurfaces_props.SURFSK_edges_V
self.is_fill_faces = False
@@ -3509,7 +3511,7 @@ class GPENCIL_OT_SURFSK_init(Operator):
bpy.context.scene.bsurfaces.SURFSK_object_with_retopology = mesh_object
- if not context.scene.bsurfaces.SURFSK_use_annotation and bs.SURFSK_object_with_strokes == None:
+ if context.scene.bsurfaces.SURFSK_guide == 'GPencil' and bs.SURFSK_object_with_strokes == None:
bpy.ops.object.select_all('INVOKE_REGION_WIN', action='DESELECT')
bpy.ops.object.gpencil_add(radius=1.0, align='WORLD', location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), type='EMPTY')
bpy.context.scene.tool_settings.gpencil_stroke_placement_view3d = 'SURFACE'
@@ -3520,7 +3522,7 @@ class GPENCIL_OT_SURFSK_init(Operator):
bpy.context.scene.bsurfaces.SURFSK_object_with_strokes = gpencil_object
gpencil_object.data.stroke_depth_order = '3D'
- if context.scene.bsurfaces.SURFSK_use_annotation:
+ if context.scene.bsurfaces.SURFSK_guide == 'Annotation':
bpy.ops.wm.tool_set_by_id(name="builtin.annotate")
bpy.context.scene.tool_settings.annotation_stroke_placement_view3d = 'SURFACE'
@@ -4143,10 +4145,15 @@ class BsurfPreferences(AddonPreferences):
# Properties
class BsurfacesProps(PropertyGroup):
- SURFSK_use_annotation: BoolProperty(
- name="Use Annotation",
- default=True
- )
+ SURFSK_guide: EnumProperty(
+ name="Guide:",
+ items=[
+ ('Annotation', 'Annotation', 'Annotation'),
+ ('GPencil', 'GPencil', 'GPencil'),
+ ('Curve', 'Curve', 'Curve')
+ ],
+ default="Annotation"
+ )
SURFSK_edges_U: IntProperty(
name="Cross",
description="Number of face-loops crossing the strokes",
diff --git a/modules/rna_manual_reference.py b/modules/rna_manual_reference.py
deleted file mode 100644
index a09f1f22..00000000
--- a/modules/rna_manual_reference.py
+++ /dev/null
@@ -1,856 +0,0 @@
-# Do not edit this file. This file is auto generated from rna_manual_reference_updater.py
-
-import bpy
-
-if bpy.app.version_cycle in {'rc', 'release'}:
- manual_version = '%d.%d' % bpy.app.version[:2]
-else:
- manual_version = 'dev'
-
-url_manual_prefix = "https://docs.blender.org/manual/en/" + manual_version + "/"
-
-language = ""
-if bpy.context.preferences.view.use_international_fonts:
- language = bpy.context.preferences.view.language
- if language == 'DEFAULT':
- import os
- language = os.getenv('LANG', '').split('.')[0]
-
-LANG = {
- "de_DE": "de",
- "ru_RU": "ru",
- "uk_UA": "uk",
- "es": "es",
- "fr_FR": "fr",
- "it_IT": "it",
- "ja_JP": "ja",
- "ko_KR": "ko",
- "pt_PT": "pt",
- "pt_BR": "pt",
- "vi_VN": "vi",
- "zh_CN": "zh-hans",
- "zh_TW": "zh-hant",
-}.get(language)
-
-if LANG is not None:
- url_manual_prefix = url_manual_prefix.replace("manual/en", "manual/" + LANG)
-
-url_manual_mapping = (
- ("bpy.types.cyclesobjectsettings.use_adaptive_subdivision*", "render/cycles/object_settings/adaptive_subdiv.html#bpy-types-cyclesobjectsettings-use-adaptive-subdivision"),
- ("bpy.types.cyclesrendersettings.offscreen_dicing_scale*", "render/cycles/render_settings/subdivision.html#bpy-types-cyclesrendersettings-offscreen-dicing-scale"),
- ("bpy.types.linestylegeometrymodifier_backbonestretcher*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/backbone_stretcher.html#bpy-types-linestylegeometrymodifier-backbonestretcher"),
- ("bpy.types.linestylegeometrymodifier_sinusdisplacement*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/sinus_displacement.html#bpy-types-linestylegeometrymodifier-sinusdisplacement"),
- ("bpy.types.linestylegeometrymodifier_polygonalization*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/polygonization.html#bpy-types-linestylegeometrymodifier-polygonalization"),
- ("bpy.types.cyclesrendersettings.distance_cull_margin*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-distance-cull-margin"),
- ("bpy.types.linestylegeometrymodifier_simplification*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/simplification.html#bpy-types-linestylegeometrymodifier-simplification"),
- ("bpy.types.cyclesrendersettings.camera_cull_margin*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-camera-cull-margin"),
- ("bpy.types.linestylegeometrymodifier_perlinnoise1d*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/perlin_noise_1d.html#bpy-types-linestylegeometrymodifier-perlinnoise1d"),
- ("bpy.types.linestylegeometrymodifier_perlinnoise2d*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/perlin_noise_2d.html#bpy-types-linestylegeometrymodifier-perlinnoise2d"),
- ("bpy.types.smokedomainsettings.use_high_resolution*", "render/cycles/render_settings/simplify.html#bpy-types-smokedomainsettings-use-high-resolution"),
- ("bpy.types.cyclesrendersettings.use_distance_cull*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-use-distance-cull"),
- ("bpy.types.linestylegeometrymodifier_guidinglines*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/guiding_lines.html#bpy-types-linestylegeometrymodifier-guidinglines"),
- ("bpy.types.linestylegeometrymodifier_spatialnoise*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/spatial_noise.html#bpy-types-linestylegeometrymodifier-spatialnoise"),
- ("bpy.types.linestylethicknessmodifier_calligraphy*", "render/freestyle/parameter_editor/line_style/modifiers/thickness/calligraphy.html#bpy-types-linestylethicknessmodifier-calligraphy"),
- ("bpy.types.cyclesrendersettings.max_subdivisions*", "render/cycles/render_settings/subdivision.html#bpy-types-cyclesrendersettings-max-subdivisions"),
- ("bpy.types.linestyle*modifier_distancefromcamera*", "render/freestyle/parameter_editor/line_style/modifiers/color/distance_from_camera.html#bpy-types-linestyle-modifier-distancefromcamera"),
- ("bpy.types.linestyle*modifier_distancefromobject*", "render/freestyle/parameter_editor/line_style/modifiers/color/distance_from_object.html#bpy-types-linestyle-modifier-distancefromobject"),
- ("bpy.types.linestylegeometrymodifier_2dtransform*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/2d_transform.html#bpy-types-linestylegeometrymodifier-2dtransform"),
- ("bpy.types.linestylegeometrymodifier_beziercurve*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/bezier_curve.html#bpy-types-linestylegeometrymodifier-beziercurve"),
- ("bpy.types.cyclesrendersettings.use_camera_cull*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-use-camera-cull"),
- ("bpy.types.linestylegeometrymodifier_tipremover*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/tip_remover.html#bpy-types-linestylegeometrymodifier-tipremover"),
- ("bpy.types.cyclesmaterialsettings.displacement*", "render/cycles/material_settings.html#bpy-types-cyclesmaterialsettings-displacement"),
- ("bpy.types.linestylegeometrymodifier_blueprint*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/blueprint.html#bpy-types-linestylegeometrymodifier-blueprint"),
- ("bpy.types.rendersettings.simplify_subdivision*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-subdivision"),
- ("bpy.types.cyclesrendersettings.dicing_camera*", "render/cycles/render_settings/subdivision.html#bpy-types-cyclesrendersettings-dicing-camera"),
- ("bpy.types.cyclesrendersettings.texture_limit*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-texture-limit"),
- ("bpy.types.linestylegeometrymodifier_2doffset*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/2d_offset.html#bpy-types-linestylegeometrymodifier-2doffset"),
- ("bpy.types.linestylegeometrymodifier_sampling*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/sampling.html#bpy-types-linestylegeometrymodifier-sampling"),
- ("bpy.types.cyclesrendersettings.*dicing_rate*", "render/cycles/render_settings/subdivision.html#bpy-types-cyclesrendersettings-dicing-rate"),
- ("bpy.types.rendersettings.use_file_extension*", "render/output/settings.html#bpy-types-rendersettings-use-file-extension"),
- ("bpy.types.spaceview3d.transform_orientation*", "scene_layout/object/editing/transform/control/orientations.html#bpy-types-spaceview3d-transform-orientation"),
- ("bpy.ops.object.constraint_add_with_targets*", "animation/constraints/interface/adding_removing.html#bpy-ops-object-constraint-add-with-targets"),
- ("bpy.types.cyclesobjectsettings.dicing_rate*", "render/cycles/object_settings/adaptive_subdiv.html#bpy-types-cyclesobjectsettings-dicing-rate"),
- ("bpy.types.posebone.use_ik_rotation_control*", "animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html#bpy-types-posebone-use-ik-rotation-control"),
- ("bpy.ops.constraint.disable_keep_transform*", "animation/constraints/interface/common.html#bpy-ops-constraint-disable-keep-transform"),
- ("bpy.types.imagepaint.use_backface_culling*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-use-backface-culling"),
- ("bpy.types.linestyle*modifier_curvature_3d*", "render/freestyle/parameter_editor/line_style/modifiers/color/curvature_3d.html#bpy-types-linestyle-modifier-curvature-3d"),
- ("bpy.types.rendersettings.use_render_cache*", "render/output/settings.html#bpy-types-rendersettings-use-render-cache"),
- ("bpy.types.sceneeevee.use_taa_reprojection*", "render/eevee/render_settings/sampling.html#bpy-types-sceneeevee-use-taa-reprojection"),
- ("bpy.ops.object.anim_transforms_to_deltas*", "scene_layout/object/editing/transform/clear_apply.html#bpy-ops-object-anim-transforms-to-deltas"),
- ("bpy.types.compositornodeplanetrackdeform*", "compositing/types/distort/plane_track_deform.html#bpy-types-compositornodeplanetrackdeform"),
- ("bpy.types.linestyle*modifier_alongstroke*", "render/freestyle/parameter_editor/line_style/modifiers/color/along_stroke.html#bpy-types-linestyle-modifier-alongstroke"),
- ("bpy.types.linestyle*modifier_creaseangle*", "render/freestyle/parameter_editor/line_style/modifiers/color/crease_angle.html#bpy-types-linestyle-modifier-creaseangle"),
- ("bpy.types.linestylecolormodifier_tangent*", "render/freestyle/parameter_editor/line_style/modifiers/color/tangent.html#bpy-types-linestylecolormodifier-tangent"),
- ("bpy.types.rendersettings.use_placeholder*", "render/output/settings.html#bpy-types-rendersettings-use-placeholder"),
- ("bpy.types.shadernodesubsurfacescattering*", "render/shader_nodes/shader/sss.html#bpy-types-shadernodesubsurfacescattering"),
- ("bpy.types.compositornodecolorcorrection*", "compositing/types/color/color_correction.html#bpy-types-compositornodecolorcorrection"),
- ("bpy.types.compositornodemoviedistortion*", "compositing/types/distort/movie_distortion.html#bpy-types-compositornodemoviedistortion"),
- ("bpy.types.ffmpegsettings.audio_channels*", "scene_layout/scene/properties.html#bpy-types-ffmpegsettings-audio-channels"),
- ("bpy.types.fmodifierenvelopecontrolpoint*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierenvelopecontrolpoint"),
- ("bpy.types.material.use_sss_translucency*", "render/eevee/materials/settings.html#bpy-types-material-use-sss-translucency"),
- ("bpy.types.sceneeevee.taa_render_samples*", "render/eevee/render_settings/sampling.html#bpy-types-sceneeevee-taa-render-samples"),
- ("bpy.types.spaceuveditor.pixel_snap_mode*", "modeling/meshes/editing/uv/layout.html#bpy-types-spaceuveditor-pixel-snap-mode"),
- ("bpy.types.spaceuveditor.use_live_unwrap*", "modeling/meshes/editing/uv/layout.html#bpy-types-spaceuveditor-use-live-unwrap"),
- ("bpy.types.vertexweightproximitymodifier*", "modeling/modifiers/modify/weight_proximity.html#bpy-types-vertexweightproximitymodifier"),
- ("bpy.types.compositornodebrightcontrast*", "compositing/types/color/bright_contrast.html#bpy-types-compositornodebrightcontrast"),
- ("bpy.types.compositornodedoubleedgemask*", "compositing/types/matte/double_edge_mask.html#bpy-types-compositornodedoubleedgemask"),
- ("bpy.types.ffmpegsettings.audio_mixrate*", "scene_layout/scene/properties.html#bpy-types-ffmpegsettings-audio-mixrate"),
- ("bpy.types.material.preview_render_type*", "render/materials/preview.html#bpy-types-material-preview-render-type"),
- ("bpy.types.rendersettings.use_overwrite*", "render/output/settings.html#bpy-types-rendersettings-use-overwrite"),
- ("bpy.types.sceneeevee.volumetric_shadow*", "render/eevee/render_settings/volumetrics.html#bpy-types-sceneeevee-volumetric-shadow"),
- ("bpy.types.shadernodebsdfhairprincipled*", "render/shader_nodes/shader/hair_principled.html#bpy-types-shadernodebsdfhairprincipled"),
- ("bpy.types.shadernodevectordisplacement*", "render/shader_nodes/vector/vector_displacement.html#bpy-types-shadernodevectordisplacement"),
- ("bpy.types.spacegrapheditor.show_cursor*", "editors/graph_editor/fcurves/properties.html#bpy-types-spacegrapheditor-show-cursor"),
- ("bpy.types.spaceimageeditor.show_repeat*", "editors/image/view_tab.html#bpy-types-spaceimageeditor-show-repeat"),
- ("bpy.ops.object.visual_transform_apply*", "scene_layout/object/editing/transform/clear_apply.html#bpy-ops-object-visual-transform-apply"),
- ("bpy.types.brush.texture_overlay_alpha*", "sculpt_paint/brush/display.html#bpy-types-brush-texture-overlay-alpha"),
- ("bpy.types.compositornodebilateralblur*", "compositing/types/filter/bilateral_blur.html#bpy-types-compositornodebilateralblur"),
- ("bpy.types.compositornodedistancematte*", "compositing/types/matte/distance_key.html#bpy-types-compositornodedistancematte"),
- ("bpy.types.imagepaint.screen_grab_size*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-screen-grab-size"),
- ("bpy.types.linestyle*modifier_material*", "render/freestyle/parameter_editor/line_style/modifiers/color/material.html#bpy-types-linestyle-modifier-material"),
- ("bpy.types.particlesettingstextureslot*", "physics/particles/texture_influence.html#bpy-types-particlesettingstextureslot"),
- ("bpy.types.posebone.ik_rotation_weight*", "animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html#bpy-types-posebone-ik-rotation-weight"),
- ("bpy.types.sceneeevee.volumetric_light*", "render/eevee/render_settings/volumetrics.html#bpy-types-sceneeevee-volumetric-light"),
- ("bpy.ops.mesh.normals_make_consistent*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-normals-make-consistent"),
- ("bpy.ops.object.duplicate_move_linked*", "scene_layout/object/editing/duplication.html#bpy-ops-object-duplicate-move-linked"),
- ("bpy.ops.view3d.localview_remove_from*", "editors/3dview/navigate/views.html#bpy-ops-view3d-localview-remove-from"),
- ("bpy.types.brush.cursor_overlay_alpha*", "sculpt_paint/brush/display.html#bpy-types-brush-cursor-overlay-alpha"),
- ("bpy.types.brush.topology_rake_factor*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-brush-topology-rake-factor"),
- ("bpy.types.compositornodechannelmatte*", "compositing/types/matte/channel_key.html#bpy-types-compositornodechannelmatte"),
- ("bpy.types.compositornodecolorbalance*", "compositing/types/color/color_balance.html#bpy-types-compositornodecolorbalance"),
- ("bpy.types.compositornodekeyingscreen*", "compositing/types/matte/keying_screen.html#bpy-types-compositornodekeyingscreen"),
- ("bpy.types.dynamicpaintcanvassettings*", "physics/dynamic_paint/canvas.html#bpy-types-dynamicpaintcanvassettings"),
- ("bpy.types.fmodifierfunctiongenerator*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierfunctiongenerator"),
- ("bpy.types.movietrackingstabilization*", "movie_clip/tracking/clip/properties/stabilization/index.html#bpy-types-movietrackingstabilization"),
- ("bpy.types.object.display_bounds_type*", "scene_layout/object/properties/display.html#bpy-types-object-display-bounds-type"),
- ("bpy.types.shadernodeambientocclusion*", "render/shader_nodes/input/ao.html#bpy-types-shadernodeambientocclusion"),
- ("bpy.types.shadernodevolumeabsorption*", "render/shader_nodes/shader/volume_absorption.html#bpy-types-shadernodevolumeabsorption"),
- ("bpy.types.shadernodevolumeprincipled*", "render/shader_nodes/shader/volume_principled.html#bpy-types-shadernodevolumeprincipled"),
- ("bpy.types.toolsettings.use_uv_sculpt*", "modeling/meshes/editing/uv/uv_sculpt.html#bpy-types-toolsettings-use-uv-sculpt"),
- ("bpy.ops.mesh.set_normals_from_faces*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-set-normals-from-faces"),
- ("bpy.ops.object.duplicates_make_real*", "scene_layout/object/editing/transform/clear_apply.html#bpy-ops-object-duplicates-make-real"),
- ("bpy.ops.object.transforms_to_deltas*", "scene_layout/object/editing/transform/clear_apply.html#bpy-ops-object-transforms-to-deltas"),
- ("bpy.types.brush.use_primary_overlay*", "sculpt_paint/brush/display.html#bpy-types-brush-use-primary-overlay"),
- ("bpy.types.compositornodechromamatte*", "compositing/types/matte/chroma_key.html#bpy-types-compositornodechromamatte"),
- ("bpy.types.compositornodedilateerode*", "compositing/types/filter/dilate_erode.html#bpy-types-compositornodedilateerode"),
- ("bpy.types.compositornodeellipsemask*", "compositing/types/matte/ellipse_mask.html#bpy-types-compositornodeellipsemask"),
- ("bpy.types.compositornodesplitviewer*", "compositing/types/output/split_viewer.html#bpy-types-compositornodesplitviewer"),
- ("bpy.types.curve.use_uv_as_generated*", "editors/uv/generated_uvs.html#bpy-types-curve-use-uv-as-generated"),
- ("bpy.types.dynamicpaintbrushsettings*", "physics/dynamic_paint/brush.html#bpy-types-dynamicpaintbrushsettings"),
- ("bpy.types.rendersettings.use_border*", "render/output/settings.html#bpy-types-rendersettings-use-border"),
- ("bpy.types.sceneeevee.bokeh_max_size*", "render/eevee/render_settings/depth_of_field.html#bpy-types-sceneeevee-bokeh-max-size"),
- ("bpy.types.shadernodebsdfanisotropic*", "render/shader_nodes/shader/anisotropic.html#bpy-types-shadernodebsdfanisotropic"),
- ("bpy.types.shadernodebsdftranslucent*", "render/shader_nodes/shader/translucent.html#bpy-types-shadernodebsdftranslucent"),
- ("bpy.types.shadernodebsdftransparent*", "render/shader_nodes/shader/transparent.html#bpy-types-shadernodebsdftransparent"),
- ("bpy.types.shadernodevectortransform*", "render/shader_nodes/vector/transform.html#bpy-types-shadernodevectortransform"),
- ("bpy.types.spaceuveditor.lock_bounds*", "modeling/meshes/editing/uv/layout.html#bpy-types-spaceuveditor-lock-bounds"),
- ("bpy.types.spline.tilt_interpolation*", "modeling/curves/properties/active_spline.html#bpy-types-spline-tilt-interpolation"),
- ("bpy.ops.mesh.quads_convert_to_tris*", "modeling/meshes/editing/faces.html#bpy-ops-mesh-quads-convert-to-tris"),
- ("bpy.ops.node.read_fullsamplelayers*", "interface/controls/nodes/editing.html#bpy-ops-node-read-fullsamplelayers"),
- ("bpy.ops.object.datalayout_transfer*", "modeling/meshes/editing/data_transfer.html#bpy-ops-object-datalayout-transfer"),
- ("bpy.ops.object.randomize_transform*", "scene_layout/object/editing/transform/tools.html#bpy-ops-object-randomize-transform"),
- ("bpy.ops.object.vertex_group_levels*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-levels"),
- ("bpy.ops.sequencer.crossfade_sounds*", "video_editing/sequencer/strips/transitions/cross.html#bpy-ops-sequencer-crossfade-sounds"),
- ("bpy.ops.transform.edge_bevelweight*", "modeling/meshes/editing/edges.html#bpy-ops-transform-edge-bevelweight"),
- ("bpy.ops.wm.previews_batch_generate*", "files/blend/previews.html#bpy-ops-wm-previews-batch-generate"),
- ("bpy.types.brush.use_cursor_overlay*", "sculpt_paint/brush/display.html#bpy-types-brush-use-cursor-overlay"),
- ("bpy.types.compositornodebokehimage*", "compositing/types/input/bokeh_image.html#bpy-types-compositornodebokehimage"),
- ("bpy.types.compositornodecolormatte*", "compositing/types/matte/color_key.html#bpy-types-compositornodecolormatte"),
- ("bpy.types.compositornodecolorspill*", "compositing/types/matte/color_spill.html#bpy-types-compositornodecolorspill"),
- ("bpy.types.compositornodehuecorrect*", "compositing/types/color/hue_correct.html#bpy-types-compositornodehuecorrect"),
- ("bpy.types.compositornodeoutputfile*", "compositing/types/output/file.html#bpy-types-compositornodeoutputfile"),
- ("bpy.types.compositornodeswitchview*", "compositing/types/converter/switch_view.html#bpy-types-compositornodeswitchview"),
- ("bpy.types.copytransformsconstraint*", "animation/constraints/transform/copy_transforms.html#bpy-types-copytransformsconstraint"),
- ("bpy.types.correctivesmoothmodifier*", "modeling/modifiers/deform/corrective_smooth.html#bpy-types-correctivesmoothmodifier"),
- ("bpy.types.cyclesvisibilitysettings*", "render/cycles/object_settings/object_data.html#bpy-types-cyclesvisibilitysettings"),
- ("bpy.types.imagepaint.interpolation*", "sculpt_paint/texture_paint/tool_settings/texture_slots.html#bpy-types-imagepaint-interpolation"),
- ("bpy.types.linestyle*modifier_noise*", "render/freestyle/parameter_editor/line_style/modifiers/color/noise.html#bpy-types-linestyle-modifier-noise"),
- ("bpy.types.maintainvolumeconstraint*", "animation/constraints/transform/maintain_volume.html#bpy-types-maintainvolumeconstraint"),
- ("bpy.types.mesh.use_mirror_topology*", "modeling/meshes/editing/mesh_options.html#bpy-types-mesh-use-mirror-topology"),
- ("bpy.types.particleinstancemodifier*", "modeling/modifiers/simulate/particle_instance.html#bpy-types-particleinstancemodifier"),
- ("bpy.types.shadernodebrightcontrast*", "render/shader_nodes/color/bright_contrast.html#bpy-types-shadernodebrightcontrast"),
- ("bpy.types.shadernodebsdfprincipled*", "render/shader_nodes/shader/principled.html#bpy-types-shadernodebsdfprincipled"),
- ("bpy.types.shadernodebsdfrefraction*", "render/shader_nodes/shader/refraction.html#bpy-types-shadernodebsdfrefraction"),
- ("bpy.types.shadernodeoutputmaterial*", "render/shader_nodes/output/material.html#bpy-types-shadernodeoutputmaterial"),
- ("bpy.types.shadernodetexenvironment*", "render/shader_nodes/textures/environment.html#bpy-types-shadernodetexenvironment"),
- ("bpy.types.transformcacheconstraint*", "animation/constraints/transform/transform_cache.html#bpy-types-transformcacheconstraint"),
- ("bpy.types.userpreferencesfilepaths*", "editors/preferences/file_paths.html#bpy-types-userpreferencesfilepaths"),
- ("bpy.types.vertexweighteditmodifier*", "modeling/modifiers/modify/weight_edit.html#bpy-types-vertexweighteditmodifier"),
- ("bpy.ops.curve.match_texture_space*", "editors/uv/generated_uvs.html#bpy-ops-curve-match-texture-space"),
- ("bpy.ops.font.text_paste_from_file*", "modeling/texts/selecting_editing.html#bpy-ops-font-text-paste-from-file"),
- ("bpy.ops.render.play-rendered-anim*", "render/output/animation_player.html#bpy-ops-render-play-rendered-anim"),
- ("bpy.types.camera.show_composition*", "render/cameras.html#bpy-types-camera-show-composition"),
- ("bpy.types.compositornodealphaover*", "compositing/types/color/alpha_over.html#bpy-types-compositornodealphaover"),
- ("bpy.types.compositornodebokehblur*", "compositing/types/filter/bokeh_blur.html#bpy-types-compositornodebokehblur"),
- ("bpy.types.compositornodecomposite*", "compositing/types/output/composite.html#bpy-types-compositornodecomposite"),
- ("bpy.types.compositornodedespeckle*", "compositing/types/filter/despeckle.html#bpy-types-compositornodedespeckle"),
- ("bpy.types.compositornodediffmatte*", "compositing/types/matte/difference_key.html#bpy-types-compositornodediffmatte"),
- ("bpy.types.compositornodelumamatte*", "compositing/types/matte/luminance_key.html#bpy-types-compositornodelumamatte"),
- ("bpy.types.compositornodemovieclip*", "compositing/types/input/movie_clip.html#bpy-types-compositornodemovieclip"),
- ("bpy.types.compositornodenormalize*", "compositing/types/vector/normalize.html#bpy-types-compositornodenormalize"),
- ("bpy.types.compositornodepremulkey*", "compositing/types/converter/alpha_convert.html#bpy-types-compositornodepremulkey"),
- ("bpy.types.compositornodestabilize*", "compositing/types/distort/stabilize_2d.html#bpy-types-compositornodestabilize"),
- ("bpy.types.compositornodetransform*", "compositing/types/distort/transform.html#bpy-types-compositornodetransform"),
- ("bpy.types.compositornodetranslate*", "compositing/types/distort/translate.html#bpy-types-compositornodetranslate"),
- ("bpy.types.fluidsimulationmodifier*", "physics/fluid/index.html#bpy-types-fluidsimulationmodifier"),
- ("bpy.types.freestylemodulesettings*", "render/freestyle/python.html#bpy-types-freestylemodulesettings"),
- ("bpy.types.laplaciandeformmodifier*", "modeling/modifiers/deform/laplacian_deform.html#bpy-types-laplaciandeformmodifier"),
- ("bpy.types.laplaciansmoothmodifier*", "modeling/modifiers/deform/laplacian_smooth.html#bpy-types-laplaciansmoothmodifier"),
- ("bpy.types.limitdistanceconstraint*", "animation/constraints/transform/limit_distance.html#bpy-types-limitdistanceconstraint"),
- ("bpy.types.limitlocationconstraint*", "animation/constraints/transform/limit_location.html#bpy-types-limitlocationconstraint"),
- ("bpy.types.limitrotationconstraint*", "animation/constraints/transform/limit_rotation.html#bpy-types-limitrotationconstraint"),
- ("bpy.types.rendersettings.filepath*", "render/output/settings.html#bpy-types-rendersettings-filepath"),
- ("bpy.types.sceneeevee.use_overscan*", "render/eevee/render_settings/film.html#bpy-types-sceneeevee-use-overscan"),
- ("bpy.types.shadernodeeeveespecular*", "render/shader_nodes/shader/specular_bsdf.html#bpy-types-shadernodeeeveespecular"),
- ("bpy.types.shadernodehuesaturation*", "render/shader_nodes/color/hue_saturation.html#bpy-types-shadernodehuesaturation"),
- ("bpy.types.shadernodevolumescatter*", "render/shader_nodes/shader/volume_scatter.html#bpy-types-shadernodevolumescatter"),
- ("bpy.types.spacegrapheditor.cursor*", "editors/graph_editor/introduction.html#bpy-types-spacegrapheditor-cursor"),
- ("bpy.types.vertexweightmixmodifier*", "modeling/modifiers/modify/weight_mix.html#bpy-types-vertexweightmixmodifier"),
- ("bpy.ops.object.constraints_clear*", "animation/constraints/interface/adding_removing.html#bpy-ops-object-constraints-clear"),
- ("bpy.ops.uv.average_islands_scale*", "modeling/meshes/editing/uv/layout.html#bpy-ops-uv-average-islands-scale"),
- ("bpy.ops.view3d.edit_mesh_extrude*", "modeling/meshes/editing/duplicating/extrude.html#bpy-ops-view3d-edit-mesh-extrude"),
- ("bpy.types.brightcontrastmodifier*", "video_editing/sequencer/properties/modifiers.html#bpy-types-brightcontrastmodifier"),
- ("bpy.types.brush.cursor_color_add*", "sculpt_paint/brush/display.html#bpy-types-brush-cursor-color-add"),
- ("bpy.types.camerasolverconstraint*", "animation/constraints/motion_tracking/camera_solver.html#bpy-types-camerasolverconstraint"),
- ("bpy.types.clothcollisionsettings*", "physics/cloth/settings/collisions.html#bpy-types-clothcollisionsettings"),
- ("bpy.types.compositornodecurvergb*", "compositing/types/color/rgb_curves.html#bpy-types-compositornodecurvergb"),
- ("bpy.types.compositornodecurvevec*", "compositing/types/vector/vector_curves.html#bpy-types-compositornodecurvevec"),
- ("bpy.types.compositornodedisplace*", "compositing/types/distort/displace.html#bpy-types-compositornodedisplace"),
- ("bpy.types.compositornodelensdist*", "compositing/types/distort/lens_distortion.html#bpy-types-compositornodelensdist"),
- ("bpy.types.compositornodemaprange*", "compositing/types/vector/map_range.html#bpy-types-compositornodemaprange"),
- ("bpy.types.compositornodemapvalue*", "compositing/types/vector/map_value.html#bpy-types-compositornodemapvalue"),
- ("bpy.types.compositornodepixelate*", "compositing/types/filter/pixelate.html#bpy-types-compositornodepixelate"),
- ("bpy.types.compositornodesetalpha*", "compositing/types/converter/set_alpha.html#bpy-types-compositornodesetalpha"),
- ("bpy.types.compositornodesunbeams*", "compositing/types/filter/sun_beams.html#bpy-types-compositornodesunbeams"),
- ("bpy.types.compositornodetrackpos*", "compositing/types/input/track_position.html#bpy-types-compositornodetrackpos"),
- ("bpy.types.compositornodezcombine*", "compositing/types/color/z_combine.html#bpy-types-compositornodezcombine"),
- ("bpy.types.copylocationconstraint*", "animation/constraints/transform/copy_location.html#bpy-types-copylocationconstraint"),
- ("bpy.types.copyrotationconstraint*", "animation/constraints/transform/copy_rotation.html#bpy-types-copyrotationconstraint"),
- ("bpy.types.cyclesmaterialsettings*", "render/cycles/material_settings.html#bpy-types-cyclesmaterialsettings"),
- ("bpy.types.imagepaint.use_occlude*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-use-occlude"),
- ("bpy.types.mesh.auto_smooth_angle*", "modeling/meshes/structure.html#bpy-types-mesh-auto-smooth-angle"),
- ("bpy.types.objectsolverconstraint*", "animation/constraints/motion_tracking/object_solver.html#bpy-types-objectsolverconstraint"),
- ("bpy.types.particlesystemmodifier*", "physics/particles/index.html#bpy-types-particlesystemmodifier"),
- ("bpy.types.sceneeevee.motion_blur*", "render/eevee/render_settings/motion_blur.html#bpy-types-sceneeevee-motion-blur"),
- ("bpy.types.sceneeevee.taa_samples*", "render/eevee/render_settings/sampling.html#bpy-types-sceneeevee-taa-samples"),
- ("bpy.types.shadernodedisplacement*", "render/shader_nodes/vector/displacement.html#bpy-types-shadernodedisplacement"),
- ("bpy.types.shadernodelightfalloff*", "render/shader_nodes/color/light_falloff.html#bpy-types-shadernodelightfalloff"),
- ("bpy.types.shadernodeparticleinfo*", "render/shader_nodes/input/particle_info.html#bpy-types-shadernodeparticleinfo"),
- ("bpy.types.weightednormalmodifier*", "modeling/modifiers/modify/weighted_normal.html#bpy-types-weightednormalmodifier"),
- ("bpy.ops.object.constraints_copy*", "animation/constraints/interface/adding_removing.html#bpy-ops-object-constraints-copy"),
- ("bpy.ops.object.make_single_user*", "scene_layout/object/editing/duplication.html#bpy-ops-object-make-single-user"),
- ("bpy.ops.object.select_hierarchy*", "scene_layout/object/selecting.html#bpy-ops-object-select-hierarchy"),
- ("bpy.ops.screen.screen_full_area*", "interface/window_system/areas.html#bpy-ops-screen-screen-full-area"),
- ("bpy.ops.transform.rotate_normal*", "modeling/meshes/editing/normals.html#bpy-ops-transform-rotate-normal"),
- ("bpy.ops.transform.shrink_fatten*", "modeling/meshes/editing/transform/shrink-fatten.html#bpy-ops-transform-shrink-fatten"),
- ("bpy.ops.wm.dependency_relations*", "advanced/operators.html#bpy-ops-wm-dependency-relations"),
- ("bpy.ops.wm.previews_batch_clear*", "files/blend/previews.html#bpy-ops-wm-previews-batch-clear"),
- ("bpy.types.brush.use_custom_icon*", "sculpt_paint/brush/display.html#bpy-types-brush-use-custom-icon"),
- ("bpy.types.camerabackgroundimage*", "render/cameras.html#bpy-types-camerabackgroundimage"),
- ("bpy.types.compositornodeboxmask*", "compositing/types/matte/box_mask.html#bpy-types-compositornodeboxmask"),
- ("bpy.types.compositornodedefocus*", "compositing/types/filter/defocus.html#bpy-types-compositornodedefocus"),
- ("bpy.types.compositornodeinpaint*", "compositing/types/filter/inpaint.html#bpy-types-compositornodeinpaint"),
- ("bpy.types.compositornodergbtobw*", "compositing/types/converter/rgb_to_bw.html#bpy-types-compositornodergbtobw"),
- ("bpy.types.compositornoderlayers*", "compositing/types/input/render_layers.html#bpy-types-compositornoderlayers"),
- ("bpy.types.compositornodetexture*", "compositing/types/input/texture.html#bpy-types-compositornodetexture"),
- ("bpy.types.compositornodetonemap*", "compositing/types/color/tone_map.html#bpy-types-compositornodetonemap"),
- ("bpy.types.compositornodevecblur*", "compositing/types/filter/vector_blur.html#bpy-types-compositornodevecblur"),
- ("bpy.types.dampedtrackconstraint*", "animation/constraints/tracking/damped_track.html#bpy-types-dampedtrackconstraint"),
- ("bpy.types.distortednoisetexture*", "render/materials/legacy_textures/types/distorted_noise.html#bpy-types-distortednoisetexture"),
- ("bpy.types.followtrackconstraint*", "animation/constraints/motion_tracking/follow_track.html#bpy-types-followtrackconstraint"),
- ("bpy.types.lockedtrackconstraint*", "animation/constraints/tracking/locked_track.html#bpy-types-lockedtrackconstraint"),
- ("bpy.types.obstaclefluidsettings*", "physics/fluid/types/obstacle.html#bpy-types-obstaclefluidsettings"),
- ("bpy.types.particlefluidsettings*", "physics/particles/emitter/physics/fluid.html#bpy-types-particlefluidsettings"),
- ("bpy.types.sceneeevee.volumetric*", "render/eevee/render_settings/volumetrics.html#bpy-types-sceneeevee-volumetric"),
- ("bpy.types.shadernodebsdfdiffuse*", "render/shader_nodes/shader/diffuse.html#bpy-types-shadernodebsdfdiffuse"),
- ("bpy.types.shadernodelayerweight*", "render/shader_nodes/input/layer_weight.html#bpy-types-shadernodelayerweight"),
- ("bpy.types.shadernodeoutputlight*", "render/shader_nodes/output/light.html#bpy-types-shadernodeoutputlight"),
- ("bpy.types.shadernodeoutputworld*", "render/shader_nodes/output/world.html#bpy-types-shadernodeoutputworld"),
- ("bpy.types.shadernodetexgradient*", "render/shader_nodes/textures/gradient.html#bpy-types-shadernodetexgradient"),
- ("bpy.types.shadernodetexmusgrave*", "render/shader_nodes/textures/musgrave.html#bpy-types-shadernodetexmusgrave"),
- ("bpy.types.shadernodevectorcurve*", "render/shader_nodes/vector/curves.html#bpy-types-shadernodevectorcurve"),
- ("bpy.types.userpreferencessystem*", "editors/preferences/system.html#bpy-types-userpreferencessystem"),
- ("bpy.ops.mesh.bridge-edge-loops*", "modeling/meshes/editing/edges.html#bpy-ops-mesh-bridge-edge-loops"),
- ("bpy.ops.object.paths_calculate*", "animation/motion_paths.html#bpy-ops-object-paths-calculate"),
- ("bpy.ops.object.transform_apply*", "scene_layout/object/editing/transform/clear_apply.html#bpy-ops-object-transform-apply"),
- ("bpy.ops.outliner.lib_operation*", "files/linked_libraries.html#bpy-ops-outliner-lib-operation"),
- ("bpy.ops.screen.region_quadview*", "editors/3dview/navigate/views.html#bpy-ops-screen-region-quadview"),
- ("bpy.ops.uv.follow_active_quads*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-follow-active-quads"),
- ("bpy.types.colorbalancemodifier*", "video_editing/sequencer/properties/modifiers.html#bpy-types-colorbalancemodifier"),
- ("bpy.types.compositornodefilter*", "compositing/types/filter/filter_node.html#bpy-types-compositornodefilter"),
- ("bpy.types.compositornodehuesat*", "compositing/types/color/hue_saturation.html#bpy-types-compositornodehuesat"),
- ("bpy.types.compositornodeidmask*", "compositing/types/converter/id_mask.html#bpy-types-compositornodeidmask"),
- ("bpy.types.compositornodeinvert*", "compositing/types/color/invert.html#bpy-types-compositornodeinvert"),
- ("bpy.types.compositornodekeying*", "compositing/types/matte/keying.html#bpy-types-compositornodekeying"),
- ("bpy.types.compositornodelevels*", "compositing/types/output/levels.html#bpy-types-compositornodelevels"),
- ("bpy.types.compositornodemixrgb*", "compositing/types/color/mix.html#bpy-types-compositornodemixrgb"),
- ("bpy.types.compositornodenormal*", "compositing/types/vector/normal.html#bpy-types-compositornodenormal"),
- ("bpy.types.compositornoderotate*", "compositing/types/distort/rotate.html#bpy-types-compositornoderotate"),
- ("bpy.types.compositornodeviewer*", "compositing/types/output/viewer.html#bpy-types-compositornodeviewer"),
- ("bpy.types.constraint.influence*", "animation/constraints/interface/common.html#bpy-types-constraint-influence"),
- ("bpy.types.controlfluidsettings*", "physics/fluid/types/control.html#bpy-types-controlfluidsettings"),
- ("bpy.types.datatransfermodifier*", "modeling/modifiers/modify/data_transfer.html#bpy-types-datatransfermodifier"),
- ("bpy.types.dynamicpaintmodifier*", "physics/dynamic_paint/index.html#bpy-types-dynamicpaintmodifier"),
- ("bpy.types.ffmpegsettings.audio*", "render/output/file_formats.html#bpy-types-ffmpegsettings-audio"),
- ("bpy.types.followpathconstraint*", "animation/constraints/relationship/follow_path.html#bpy-types-followpathconstraint"),
- ("bpy.types.gaussianblursequence*", "video_editing/sequencer/strips/effects/blur.html#bpy-types-gaussianblursequence"),
- ("bpy.types.image.display_aspect*", "editors/image/view_tab.html#bpy-types-image-display-aspect"),
- ("bpy.types.limitscaleconstraint*", "animation/constraints/transform/limit_scale.html#bpy-types-limitscaleconstraint"),
- ("bpy.types.mesh.use_auto_smooth*", "modeling/meshes/structure.html#bpy-types-mesh-use-auto-smooth"),
- ("bpy.types.outflowfluidsettings*", "physics/fluid/types/flow.html#bpy-types-outflowfluidsettings"),
- ("bpy.types.scene.background_set*", "scene_layout/scene/properties.html#bpy-types-scene-background-set"),
- ("bpy.types.shadernodebackground*", "render/shader_nodes/shader/background.html#bpy-types-shadernodebackground"),
- ("bpy.types.shadernodebsdfglossy*", "render/shader_nodes/shader/glossy.html#bpy-types-shadernodebsdfglossy"),
- ("bpy.types.shadernodebsdfvelvet*", "render/shader_nodes/shader/velvet.html#bpy-types-shadernodebsdfvelvet"),
- ("bpy.types.shadernodecameradata*", "render/shader_nodes/input/camera_data.html#bpy-types-shadernodecameradata"),
- ("bpy.types.shadernodeobjectinfo*", "render/shader_nodes/input/object_info.html#bpy-types-shadernodeobjectinfo"),
- ("bpy.types.shadernodetexchecker*", "render/shader_nodes/textures/checker.html#bpy-types-shadernodetexchecker"),
- ("bpy.types.shadernodetexvoronoi*", "render/shader_nodes/textures/voronoi.html#bpy-types-shadernodetexvoronoi"),
- ("bpy.types.shadernodevectormath*", "render/shader_nodes/converter/vector_math.html#bpy-types-shadernodevectormath"),
- ("bpy.types.shadernodewavelength*", "render/shader_nodes/converter/wavelength.html#bpy-types-shadernodewavelength"),
- ("bpy.types.shrinkwrapconstraint*", "animation/constraints/relationship/shrinkwrap.html#bpy-types-shrinkwrapconstraint"),
- ("bpy.types.simpledeformmodifier*", "modeling/modifiers/deform/simple_deform.html#bpy-types-simpledeformmodifier"),
- ("bpy.types.spacedopesheeteditor*", "editors/dope_sheet/index.html#bpy-types-spacedopesheeteditor"),
- ("bpy.types.spaceuserpreferences*", "editors/preferences/index.html#bpy-types-spaceuserpreferences"),
- ("bpy.types.speedcontrolsequence*", "video_editing/sequencer/strips/effects/speed_control.html#bpy-types-speedcontrolsequence"),
- ("bpy.types.texturenodecurvetime*", "editors/texture_node/types/input/time.html#bpy-types-texturenodecurvetime"),
- ("bpy.types.transformorientation*", "scene_layout/object/editing/transform/control/orientations.html#bpy-types-transformorientation"),
- ("bpy.types.unifiedpaintsettings*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-unifiedpaintsettings"),
- ("bpy.types.userpreferencesinput*", "editors/preferences/input.html#bpy-types-userpreferencesinput"),
- ("bpy.types.whitebalancemodifier*", "video_editing/sequencer/properties/modifiers.html#bpy-types-whitebalancemodifier"),
- ("bpy.ops.mesh.smoothen_normals*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-smoothen-normals"),
- ("bpy.ops.object.duplicate_move*", "scene_layout/object/editing/duplication.html#bpy-ops-object-duplicate-move"),
- ("bpy.ops.object.select_by_type*", "scene_layout/object/selecting.html#bpy-ops-object-select-by-type"),
- ("bpy.ops.object.select_grouped*", "scene_layout/object/selecting.html#bpy-ops-object-select-grouped"),
- ("bpy.ops.object.select_pattern*", "scene_layout/object/selecting.html#bpy-ops-object-select-pattern"),
- ("bpy.ops.screen.repeat_history*", "interface/undo_redo.html#bpy-ops-screen-repeat-history"),
- ("bpy.ops.sequencer.refresh_all*", "video_editing/sequencer/navigating.html#bpy-ops-sequencer-refresh-all"),
- ("bpy.ops.transform.edge_crease*", "modeling/meshes/editing/edges.html#bpy-ops-transform-edge-crease"),
- ("bpy.ops.uv.seams_from_islands*", "modeling/meshes/editing/uv/unwrapping/seams.html#bpy-ops-uv-seams-from-islands"),
- ("bpy.types.brush.icon_filepath*", "sculpt_paint/brush/display.html#bpy-types-brush-icon-filepath"),
- ("bpy.types.camera.display_size*", "render/cameras.html#bpy-types-camera-display-size"),
- ("bpy.types.compositornodedblur*", "compositing/types/filter/directional_blur.html#bpy-types-compositornodedblur"),
- ("bpy.types.compositornodegamma*", "compositing/types/color/gamma.html#bpy-types-compositornodegamma"),
- ("bpy.types.compositornodeglare*", "compositing/types/filter/glare.html#bpy-types-compositornodeglare"),
- ("bpy.types.compositornodegroup*", "compositing/types/groups.html#bpy-types-compositornodegroup"),
- ("bpy.types.compositornodeimage*", "compositing/types/input/image.html#bpy-types-compositornodeimage"),
- ("bpy.types.compositornodemapuv*", "compositing/types/distort/map_uv.html#bpy-types-compositornodemapuv"),
- ("bpy.types.compositornodescale*", "compositing/types/distort/scale.html#bpy-types-compositornodescale"),
- ("bpy.types.compositornodevalue*", "compositing/types/input/value.html#bpy-types-compositornodevalue"),
- ("bpy.types.copyscaleconstraint*", "animation/constraints/transform/copy_scale.html#bpy-types-copyscaleconstraint"),
- ("bpy.types.cyclesworldsettings*", "render/cycles/world_settings.html#bpy-types-cyclesworldsettings"),
- ("bpy.types.domainfluidsettings*", "physics/fluid/types/domain.html#bpy-types-domainfluidsettings"),
- ("bpy.types.imageformatsettings*", "files/media/image_formats.html#bpy-types-imageformatsettings"),
- ("bpy.types.inflowfluidsettings*", "physics/fluid/types/flow.html#bpy-types-inflowfluidsettings"),
- ("bpy.types.kinematicconstraint*", "animation/constraints/tracking/ik_solver.html#bpy-types-kinematicconstraint"),
- ("bpy.types.mesh.use_paint_mask*", "sculpt_paint/brush/introduction.html#bpy-types-mesh-use-paint-mask"),
- ("bpy.types.movietrackingcamera*", "movie_clip/tracking/clip/properties/camera_data.html#bpy-types-movietrackingcamera"),
- ("bpy.types.object.display_type*", "scene_layout/object/properties/display.html#bpy-types-object-display-type"),
- ("bpy.types.particledupliweight*", "physics/particles/emitter/vertex_groups.html#bpy-types-particledupliweight"),
- ("bpy.types.poseboneconstraints*", "animation/armatures/posing/bone_constraints/index.html#bpy-types-poseboneconstraints"),
- ("bpy.types.rigidbodyconstraint*", "physics/rigid_body/constraints/index.html#bpy-types-rigidbodyconstraint"),
- ("bpy.types.shadernodeaddshader*", "render/shader_nodes/shader/add.html#bpy-types-shadernodeaddshader"),
- ("bpy.types.shadernodeattribute*", "render/shader_nodes/input/attribute.html#bpy-types-shadernodeattribute"),
- ("bpy.types.shadernodeblackbody*", "render/shader_nodes/converter/blackbody.html#bpy-types-shadernodeblackbody"),
- ("bpy.types.shadernodebsdfglass*", "render/shader_nodes/shader/glass.html#bpy-types-shadernodebsdfglass"),
- ("bpy.types.shadernodelightpath*", "render/shader_nodes/input/light_path.html#bpy-types-shadernodelightpath"),
- ("bpy.types.shadernodemixshader*", "render/shader_nodes/shader/mix.html#bpy-types-shadernodemixshader"),
- ("bpy.types.shadernodenormalmap*", "render/shader_nodes/vector/normal_map.html#bpy-types-shadernodenormalmap"),
- ("bpy.types.shadernodewireframe*", "render/shader_nodes/input/wireframe.html#bpy-types-shadernodewireframe"),
- ("bpy.types.smokedomainsettings*", "physics/smoke/types/domain.html#bpy-types-smokedomainsettings"),
- ("bpy.types.spacesequenceeditor*", "video_editing/index.html#bpy-types-spacesequenceeditor"),
- ("bpy.types.stretchtoconstraint*", "animation/constraints/tracking/stretch_to.html#bpy-types-stretchtoconstraint"),
- ("bpy.types.texturenodecurvergb*", "editors/texture_node/types/color/rgb_curves.html#bpy-types-texturenodecurvergb"),
- ("bpy.types.texturenodevaltorgb*", "editors/texture_node/types/converter/rgb_to_bw.html#bpy-types-texturenodevaltorgb"),
- ("bpy.types.transformconstraint*", "animation/constraints/transform/transformation.html#bpy-types-transformconstraint"),
- ("bpy.types.triangulatemodifier*", "modeling/modifiers/generate/triangulate.html#bpy-types-triangulatemodifier"),
- ("bpy.types.userpreferencesedit*", "editors/preferences/editing.html#bpy-types-userpreferencesedit"),
- ("bpy.types.userpreferencesview*", "editors/preferences/interface.html#bpy-types-userpreferencesview"),
- ("bpy.types.windowmanager.addon*", "editors/preferences/addons.html#bpy-types-windowmanager-addon"),
- ("bpy.ops.anim.keyframe_delete*", "animation/keyframes/editing.html#bpy-ops-anim-keyframe-delete"),
- ("bpy.ops.anim.keyframe_insert*", "animation/keyframes/editing.html#bpy-ops-anim-keyframe-insert"),
- ("bpy.ops.mesh.average_normals*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-average-normals"),
- ("bpy.ops.mesh.vertices_smooth*", "modeling/meshes/editing/transform/smooth.html#bpy-ops-mesh-vertices-smooth"),
- ("bpy.ops.node.read_viewlayers*", "interface/controls/nodes/editing.html#bpy-ops-node-read-viewlayers"),
- ("bpy.ops.object.data_transfer*", "modeling/meshes/editing/data_transfer.html#bpy-ops-object-data-transfer"),
- ("bpy.ops.object.select_camera*", "scene_layout/object/selecting.html#bpy-ops-object-select-camera"),
- ("bpy.ops.object.select_linked*", "scene_layout/object/selecting.html#bpy-ops-object-select-linked"),
- ("bpy.ops.object.select_mirror*", "scene_layout/object/selecting.html#bpy-ops-object-select-mirror"),
- ("bpy.ops.object.select_random*", "scene_layout/object/selecting.html#bpy-ops-object-select-random"),
- ("bpy.ops.sound.bake_animation*", "scene_layout/scene/properties.html#bpy-ops-sound-bake-animation"),
- ("bpy.ops.transform.edge_slide*", "modeling/meshes/editing/edges.html#bpy-ops-transform-edge-slide"),
- ("bpy.ops.transform.vert_slide*", "modeling/meshes/editing/vertices.html#bpy-ops-transform-vert-slide"),
- ("bpy.ops.uv.project_from_view*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-project-from-view"),
- ("bpy.ops.wm.memory_statistics*", "advanced/operators.html#bpy-ops-wm-memory-statistics"),
- ("bpy.types.adjustmentsequence*", "video_editing/sequencer/strips/adjustment.html#bpy-types-adjustmentsequence"),
- ("bpy.types.alphaundersequence*", "video_editing/sequencer/strips/effects/alpha_over_under_overdrop.html#bpy-types-alphaundersequence"),
- ("bpy.types.armatureconstraint*", "animation/constraints/relationship/armature.html#bpy-types-armatureconstraint"),
- ("bpy.types.compositornodeblur*", "compositing/types/filter/blur_node.html#bpy-types-compositornodeblur"),
- ("bpy.types.compositornodecomb*", "editors/texture_node/types/color/combine_separate.html#bpy-types-compositornodecomb"),
- ("bpy.types.compositornodecrop*", "compositing/types/distort/crop.html#bpy-types-compositornodecrop"),
- ("bpy.types.compositornodeflip*", "compositing/types/distort/flip.html#bpy-types-compositornodeflip"),
- ("bpy.types.compositornodemask*", "compositing/types/input/mask.html#bpy-types-compositornodemask"),
- ("bpy.types.compositornodemath*", "compositing/types/converter/math.html#bpy-types-compositornodemath"),
- ("bpy.types.compositornodetime*", "compositing/types/input/time.html#bpy-types-compositornodetime"),
- ("bpy.types.curvepaintsettings*", "modeling/curves/editing/other.html#bpy-types-curvepaintsettings"),
- ("bpy.types.fluidfluidsettings*", "physics/fluid/types/fluid_object.html#bpy-types-fluidfluidsettings"),
- ("bpy.types.fmodifiergenerator*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifiergenerator"),
- ("bpy.types.freestylelinestyle*", "render/freestyle/parameter_editor/line_style/index.html#bpy-types-freestylelinestyle"),
- ("bpy.types.gammacrosssequence*", "video_editing/sequencer/strips/transitions/cross.html#bpy-types-gammacrosssequence"),
- ("bpy.types.huecorrectmodifier*", "video_editing/sequencer/properties/modifiers.html#bpy-types-huecorrectmodifier"),
- ("bpy.types.imagepaint.stencil*", "sculpt_paint/texture_paint/tool_settings/mask.html#bpy-types-imagepaint-stencil"),
- ("bpy.types.meshdeformmodifier*", "modeling/modifiers/deform/mesh_deform.html#bpy-types-meshdeformmodifier"),
- ("bpy.types.movietrackingtrack*", "movie_clip/tracking/clip/properties/introduction.html#bpy-types-movietrackingtrack"),
- ("bpy.types.nodeoutputfileslot*", "compositing/types/output/file.html#bpy-types-nodeoutputfileslot"),
- ("bpy.types.normaleditmodifier*", "modeling/modifiers/modify/normal_edit.html#bpy-types-normaleditmodifier"),
- ("bpy.types.object.show_bounds*", "scene_layout/object/properties/display.html#bpy-types-object-show-bounds"),
- ("bpy.types.scene.audio_volume*", "scene_layout/scene/properties.html#bpy-types-scene-audio-volume"),
- ("bpy.types.shadernodebsdfhair*", "render/shader_nodes/shader/hair.html#bpy-types-shadernodebsdfhair"),
- ("bpy.types.shadernodebsdftoon*", "render/shader_nodes/shader/toon.html#bpy-types-shadernodebsdftoon"),
- ("bpy.types.shadernodeemission*", "render/shader_nodes/shader/emission.html#bpy-types-shadernodeemission"),
- ("bpy.types.shadernodegeometry*", "render/shader_nodes/input/geometry.html#bpy-types-shadernodegeometry"),
- ("bpy.types.shadernodehairinfo*", "render/shader_nodes/input/hair_info.html#bpy-types-shadernodehairinfo"),
- ("bpy.types.shadernodergbcurve*", "render/shader_nodes/color/rgb_curves.html#bpy-types-shadernodergbcurve"),
- ("bpy.types.shadernodeseparate*", "render/shader_nodes/converter/combine_separate.html#bpy-types-shadernodeseparate"),
- ("bpy.types.shadernodetexbrick*", "render/shader_nodes/textures/brick.html#bpy-types-shadernodetexbrick"),
- ("bpy.types.shadernodetexcoord*", "render/shader_nodes/input/texture_coordinate.html#bpy-types-shadernodetexcoord"),
- ("bpy.types.shadernodeteximage*", "render/shader_nodes/textures/image.html#bpy-types-shadernodeteximage"),
- ("bpy.types.shadernodetexmagic*", "render/shader_nodes/textures/magic.html#bpy-types-shadernodetexmagic"),
- ("bpy.types.shadernodetexnoise*", "render/shader_nodes/textures/noise.html#bpy-types-shadernodetexnoise"),
- ("bpy.types.shrinkwrapmodifier*", "modeling/modifiers/deform/shrinkwrap.html#bpy-types-shrinkwrapmodifier"),
- ("bpy.types.splineikconstraint*", "animation/constraints/tracking/spline_ik.html#bpy-types-splineikconstraint"),
- ("bpy.types.texturenodetexture*", "editors/texture_node/types/input/texture.html#bpy-types-texturenodetexture"),
- ("bpy.ops.anim.keyframe_clear*", "animation/keyframes/editing.html#bpy-ops-anim-keyframe-clear"),
- ("bpy.ops.curve.primitive*add*", "modeling/curves/primitives.html#bpy-ops-curve-primitive-add"),
- ("bpy.ops.mesh.duplicate_move*", "modeling/meshes/editing/duplicating/duplicate.html#bpy-ops-mesh-duplicate-move"),
- ("bpy.ops.mesh.extrude_region*", "modeling/meshes/editing/duplicating/extrude.html#bpy-ops-mesh-extrude-region"),
- ("bpy.ops.object.parent_clear*", "scene_layout/object/properties/relations/parents.html#bpy-ops-object-parent-clear"),
- ("bpy.ops.object.shade_smooth*", "modeling/meshes/editing/normals.html#bpy-ops-object-shade-smooth"),
- ("bpy.ops.transform.push_pull*", "modeling/meshes/editing/transform/push_pull.html#bpy-ops-transform-push-pull"),
- ("bpy.ops.transform.trackball*", "scene_layout/object/editing/transform/basics.html#bpy-ops-transform-trackball"),
- ("bpy.ops.transform.transform*", "scene_layout/object/editing/transform/control/orientations.html#bpy-ops-transform-transform"),
- ("bpy.ops.transform.translate*", "scene_layout/object/editing/transform/basics.html#bpy-ops-transform-translate"),
- ("bpy.ops.uv.cylinder_project*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-cylinder-project"),
- ("bpy.ops.uv.minimize_stretch*", "modeling/meshes/editing/uv/layout.html#bpy-ops-uv-minimize-stretch"),
- ("bpy.types.alphaoversequence*", "video_editing/sequencer/strips/effects/alpha_over_under_overdrop.html#bpy-types-alphaoversequence"),
- ("bpy.types.armatureeditbones*", "animation/armatures/bones/editing/index.html#bpy-types-armatureeditbones"),
- ("bpy.types.cameradofsettings*", "render/cameras.html#bpy-types-cameradofsettings"),
- ("bpy.types.childofconstraint*", "animation/constraints/relationship/child_of.html#bpy-types-childofconstraint"),
- ("bpy.types.clamptoconstraint*", "animation/constraints/tracking/clamp_to.html#bpy-types-clamptoconstraint"),
- ("bpy.types.collisionmodifier*", "physics/collision.html#bpy-types-collisionmodifier"),
- ("bpy.types.collisionsettings*", "physics/collision.html#bpy-types-collisionsettings"),
- ("bpy.types.compositornodergb*", "compositing/types/input/rgb.html#bpy-types-compositornodergb"),
- ("bpy.types.compositornodesep*", "editors/texture_node/types/color/combine_separate.html#bpy-types-compositornodesep"),
- ("bpy.types.edgesplitmodifier*", "modeling/modifiers/generate/edge_split.html#bpy-types-edgesplitmodifier"),
- ("bpy.types.fmodifierenvelope*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierenvelope"),
- ("bpy.types.freestylesettings*", "render/freestyle/view_layer.html#bpy-types-freestylesettings"),
- ("bpy.types.imagepaint.dither*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-dither"),
- ("bpy.types.mesh.texture_mesh*", "editors/uv/generated_uvs.html#bpy-types-mesh-texture-mesh"),
- ("bpy.types.mesh.use_mirror_x*", "modeling/meshes/editing/mesh_options.html#bpy-types-mesh-use-mirror-x"),
- ("bpy.types.meshcachemodifier*", "modeling/modifiers/modify/mesh_cache.html#bpy-types-meshcachemodifier"),
- ("bpy.types.movieclipsequence*", "video_editing/sequencer/strips/clip_mask.html#bpy-types-movieclipsequence"),
- ("bpy.types.object.dimensions*", "scene_layout/object/properties/transforms.html#bpy-types-object-dimensions"),
- ("bpy.types.object.track_axis*", "scene_layout/object/properties/relations/extras.html#bpy-types-object-track-axis"),
- ("bpy.types.scene.active_clip*", "scene_layout/scene/properties.html#bpy-types-scene-active-clip"),
- ("bpy.types.sceneeevee.shadow*", "render/eevee/render_settings/shadows.html#bpy-types-sceneeevee-shadow"),
- ("bpy.types.shadernodecombine*", "render/shader_nodes/converter/combine_separate.html#bpy-types-shadernodecombine"),
- ("bpy.types.shadernodefresnel*", "render/shader_nodes/input/fresnel.html#bpy-types-shadernodefresnel"),
- ("bpy.types.shadernodeholdout*", "render/shader_nodes/shader/holdout.html#bpy-types-shadernodeholdout"),
- ("bpy.types.shadernodemapping*", "render/shader_nodes/vector/mapping.html#bpy-types-shadernodemapping"),
- ("bpy.types.shadernodergbtobw*", "render/shader_nodes/converter/rgb_to_bw.html#bpy-types-shadernodergbtobw"),
- ("bpy.types.shadernodetangent*", "render/shader_nodes/input/tangent.html#bpy-types-shadernodetangent"),
- ("bpy.types.shadernodetexwave*", "render/shader_nodes/textures/wave.html#bpy-types-shadernodetexwave"),
- ("bpy.types.smokecollsettings*", "physics/smoke/types/collision.html#bpy-types-smokecollsettings"),
- ("bpy.types.smokeflowsettings*", "physics/smoke/types/flow_object.html#bpy-types-smokeflowsettings"),
- ("bpy.types.texturenodebricks*", "editors/texture_node/types/patterns/bricks.html#bpy-types-texturenodebricks"),
- ("bpy.types.texturenodemixrgb*", "editors/texture_node/types/color/mix_rgb.html#bpy-types-texturenodemixrgb"),
- ("bpy.types.texturenodeoutput*", "editors/texture_node/types/output/output.html#bpy-types-texturenodeoutput"),
- ("bpy.types.tracktoconstraint*", "animation/constraints/tracking/track_to.html#bpy-types-tracktoconstraint"),
- ("bpy.types.transformsequence*", "video_editing/sequencer/strips/effects/transform.html#bpy-types-transformsequence"),
- ("bpy.types.uvprojectmodifier*", "modeling/modifiers/modify/uv_project.html#bpy-types-uvprojectmodifier"),
- ("bpy.types.wireframemodifier*", "modeling/modifiers/generate/wireframe.html#bpy-types-wireframemodifier"),
- ("bpy.types.worldmistsettings*", "render/cycles/world_settings.html#bpy-types-worldmistsettings"),
- ("bpy.ops.mesh.loopcut_slide*", "modeling/meshes/editing/subdividing/loop.html#bpy-ops-mesh-loopcut-slide"),
- ("bpy.ops.mesh.merge_normals*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-merge-normals"),
- ("bpy.ops.mesh.normals_tools*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-normals-tools"),
- ("bpy.ops.mesh.point_normals*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-point-normals"),
- ("bpy.ops.mesh.primitive*add*", "modeling/meshes/primitives.html#bpy-ops-mesh-primitive-add"),
- ("bpy.ops.mesh.split_normals*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-split-normals"),
- ("bpy.ops.object.gpencil_add*", "grease_pencil/primitives.html#bpy-ops-object-gpencil-add"),
- ("bpy.ops.object.select_less*", "scene_layout/object/selecting.html#bpy-ops-object-select-less"),
- ("bpy.ops.object.select_more*", "scene_layout/object/selecting.html#bpy-ops-object-select-more"),
- ("bpy.ops.object.track_clear*", "animation/constraints/interface/adding_removing.html#bpy-ops-object-track-clear"),
- ("bpy.ops.screen.repeat_last*", "interface/undo_redo.html#bpy-ops-screen-repeat-last"),
- ("bpy.ops.transform.tosphere*", "modeling/meshes/editing/transform/to_sphere.html#bpy-ops-transform-tosphere"),
- ("bpy.ops.wm.previews_ensure*", "files/blend/previews.html#bpy-ops-wm-previews-ensure"),
- ("bpy.types.actionconstraint*", "animation/constraints/relationship/action.html#bpy-types-actionconstraint"),
- ("bpy.types.addonpreferences*", "editors/preferences/addons.html#bpy-types-addonpreferences"),
- ("bpy.types.armaturemodifier*", "modeling/modifiers/deform/armature.html#bpy-types-armaturemodifier"),
- ("bpy.types.colormixsequence*", "video_editing/sequencer/strips/effects/color_mix.html#bpy-types-colormixsequence"),
- ("bpy.types.decimatemodifier*", "modeling/modifiers/generate/decimate.html#bpy-types-decimatemodifier"),
- ("bpy.types.displacemodifier*", "modeling/modifiers/deform/displace.html#bpy-types-displacemodifier"),
- ("bpy.types.displaysafeareas*", "render/cameras.html#bpy-types-displaysafeareas"),
- ("bpy.types.fmodifierstepped*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierstepped"),
- ("bpy.types.freestylelineset*", "render/freestyle/parameter_editor/line_set.html#bpy-types-freestylelineset"),
- ("bpy.types.mesh.*customdata*", "modeling/meshes/properties/custom_data.html#bpy-types-mesh-customdata"),
- ("bpy.types.multicamsequence*", "video_editing/sequencer/strips/effects/multicam.html#bpy-types-multicamsequence"),
- ("bpy.types.multiplysequence*", "video_editing/sequencer/strips/effects/multiply.html#bpy-types-multiplysequence"),
- ("bpy.types.multiresmodifier*", "modeling/modifiers/generate/multiresolution.html#bpy-types-multiresmodifier"),
- ("bpy.types.object.use_extra*", "scene_layout/object/properties/relations/extras.html#bpy-types-object-use-extra"),
- ("bpy.types.overdropsequence*", "video_editing/sequencer/strips/effects/alpha_over_under_overdrop.html#bpy-types-overdropsequence"),
- ("bpy.types.paint.show_brush*", "sculpt_paint/brush/display.html#bpy-types-paint-show-brush"),
- ("bpy.types.paint.use_cavity*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-paint-use-cavity"),
- ("bpy.types.particlesettings*", "physics/particles/index.html#bpy-types-particlesettings"),
- ("bpy.types.sceneeevee.bloom*", "render/eevee/render_settings/bloom.html#bpy-types-sceneeevee-bloom"),
- ("bpy.types.scenerenderlayer*", "render/layers/layers.html#bpy-types-scenerenderlayer"),
- ("bpy.types.sequencemodifier*", "video_editing/sequencer/properties/modifiers.html#bpy-types-sequencemodifier"),
- ("bpy.types.shadernodeinvert*", "render/shader_nodes/color/invert.html#bpy-types-shadernodeinvert"),
- ("bpy.types.shadernodemixrgb*", "render/shader_nodes/color/mix.html#bpy-types-shadernodemixrgb"),
- ("bpy.types.shadernodenormal*", "render/shader_nodes/vector/normal.html#bpy-types-shadernodenormal"),
- ("bpy.types.shadernodescript*", "render/shader_nodes/osl.html#bpy-types-shadernodescript"),
- ("bpy.types.shadernodetexies*", "render/shader_nodes/textures/ies.html#bpy-types-shadernodetexies"),
- ("bpy.types.shadernodetexsky*", "render/shader_nodes/textures/sky.html#bpy-types-shadernodetexsky"),
- ("bpy.types.softbodymodifier*", "physics/soft_body/index.html#bpy-types-softbodymodifier"),
- ("bpy.types.softbodysettings*", "physics/soft_body/settings.html#bpy-types-softbodysettings"),
- ("bpy.types.solidifymodifier*", "modeling/modifiers/generate/solidify.html#bpy-types-solidifymodifier"),
- ("bpy.types.spacegrapheditor*", "editors/graph_editor/index.html#bpy-types-spacegrapheditor"),
- ("bpy.types.spaceview3d.lock*", "editors/3dview/properties/sidebar.html#bpy-types-spaceview3d-lock"),
- ("bpy.types.sphfluidsettings*", "physics/fluid/index.html#bpy-types-sphfluidsettings"),
- ("bpy.types.subtractsequence*", "video_editing/sequencer/strips/effects/subtract.html#bpy-types-subtractsequence"),
- ("bpy.types.texturenodegroup*", "editors/texture_node/types/groups.html#bpy-types-texturenodegroup"),
- ("bpy.types.texturenodeimage*", "editors/texture_node/types/input/image.html#bpy-types-texturenodeimage"),
- ("bpy.ops.mesh.flip_normals*", "modeling/meshes/editing/normals.html#bpy-ops-mesh-flip-normals"),
- ("bpy.ops.object.lightprobe*", "render/eevee/lightprobes/index.html#bpy-ops-object-lightprobe"),
- ("bpy.ops.object.make_links*", "scene_layout/object/editing/duplication.html#bpy-ops-object-make-links"),
- ("bpy.ops.object.make_local*", "files/linked_libraries.html#bpy-ops-object-make-local"),
- ("bpy.ops.object.origin_set*", "scene_layout/object/origin.html#bpy-ops-object-origin-set"),
- ("bpy.ops.object.parent_set*", "scene_layout/object/properties/relations/parents.html#bpy-ops-object-parent-set"),
- ("bpy.ops.object.proxy_make*", "files/linked_libraries.html#bpy-ops-object-proxy-make"),
- ("bpy.ops.object.select_all*", "scene_layout/object/selecting.html#bpy-ops-object-select-all"),
- ("bpy.ops.object.shade_flat*", "modeling/meshes/editing/normals.html#bpy-ops-object-shade-flat"),
- ("bpy.ops.preferences.addon*", "editors/preferences/addons.html#bpy-ops-preferences-addon"),
- ("bpy.ops.scene.light_cache*", "render/eevee/render_settings/indirect_lighting.html#bpy-ops-scene-light-cache"),
- ("bpy.ops.screen.area_dupli*", "interface/window_system/areas.html#bpy-ops-screen-area-dupli"),
- ("bpy.ops.uv.remove_doubles*", "modeling/meshes/editing/uv/layout.html#bpy-ops-uv-remove-doubles"),
- ("bpy.ops.uv.sphere_project*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-sphere-project"),
- ("bpy.ops.wm.previews_clear*", "files/blend/previews.html#bpy-ops-wm-previews-clear"),
- ("bpy.types.booleanmodifier*", "modeling/modifiers/generate/booleans.html#bpy-types-booleanmodifier"),
- ("bpy.types.constraint.mute*", "animation/constraints/interface/header.html#bpy-types-constraint-mute"),
- ("bpy.types.explodemodifier*", "modeling/modifiers/simulate/explode.html#bpy-types-explodemodifier"),
- ("bpy.types.fcurvemodifiers*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fcurvemodifiers"),
- ("bpy.types.floorconstraint*", "animation/constraints/relationship/floor.html#bpy-types-floorconstraint"),
- ("bpy.types.fluidmeshvertex*", "physics/fluid/index.html#bpy-types-fluidmeshvertex"),
- ("bpy.types.fmodifiercycles*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifiercycles"),
- ("bpy.types.fmodifierlimits*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifierlimits"),
- ("bpy.types.imagepaint.mode*", "sculpt_paint/texture_paint/tool_settings/texture_slots.html#bpy-types-imagepaint-mode"),
- ("bpy.types.latticemodifier*", "modeling/modifiers/deform/lattice.html#bpy-types-latticemodifier"),
- ("bpy.types.musgravetexture*", "render/materials/legacy_textures/types/musgrave.html#bpy-types-musgravetexture"),
- ("bpy.types.object.location*", "scene_layout/object/properties/transforms.html#bpy-types-object-location"),
- ("bpy.types.object.rotation*", "scene_layout/object/properties/transforms.html#bpy-types-object-rotation"),
- ("bpy.types.particlehairkey*", "physics/particles/emitter/physics/keyed.html#bpy-types-particlehairkey"),
- ("bpy.types.pivotconstraint*", "animation/constraints/relationship/pivot.html#bpy-types-pivotconstraint"),
- ("bpy.types.rigidbodyobject*", "physics/rigid_body/index.html#bpy-types-rigidbodyobject"),
- ("bpy.types.sceneeevee.gtao*", "render/eevee/render_settings/ambient_occlusion.html#bpy-types-sceneeevee-gtao"),
- ("bpy.types.shadernodebevel*", "render/shader_nodes/input/bevel.html#bpy-types-shadernodebevel"),
- ("bpy.types.shadernodegamma*", "render/shader_nodes/color/gamma.html#bpy-types-shadernodegamma"),
- ("bpy.types.shadernodegroup*", "render/shader_nodes/groups.html#bpy-types-shadernodegroup"),
- ("bpy.types.shadernodeuvmap*", "render/shader_nodes/input/uv_map.html#bpy-types-shadernodeuvmap"),
- ("bpy.types.shadernodevalue*", "render/shader_nodes/input/value.html#bpy-types-shadernodevalue"),
- ("bpy.types.spaceclipeditor*", "movie_clip/index.html#bpy-types-spaceclipeditor"),
- ("bpy.types.spaceproperties*", "editors/properties_editor.html#bpy-types-spaceproperties"),
- ("bpy.types.spacetexteditor*", "editors/text_editor.html#bpy-types-spacetexteditor"),
- ("bpy.types.subsurfmodifier*", "modeling/modifiers/generate/subdivision_surface.html#bpy-types-subsurfmodifier"),
- ("bpy.types.texturenodemath*", "editors/texture_node/types/converter/math.html#bpy-types-texturenodemath"),
- ("bpy.types.userpreferences*", "editors/preferences/index.html#bpy-types-userpreferences"),
- ("bpy.ops.graph.frame_jump*", "editors/graph_editor/fcurves/properties.html#bpy-ops-graph-frame-jump"),
- ("bpy.ops.mesh.edge_rotate*", "modeling/meshes/editing/edges.html#bpy-ops-mesh-edge-rotate"),
- ("bpy.ops.object.hide_view*", "scene_layout/object/editing/introduction.html#bpy-ops-object-hide-view"),
- ("bpy.ops.object.track_set*", "animation/constraints/interface/adding_removing.html#bpy-ops-object-track-set"),
- ("bpy.ops.transform.mirror*", "scene_layout/object/editing/transform/mirror.html#bpy-ops-transform-mirror"),
- ("bpy.ops.transform.resize*", "scene_layout/object/editing/transform/basics.html#bpy-ops-transform-resize"),
- ("bpy.ops.transform.rotate*", "scene_layout/object/editing/transform/basics.html#bpy-ops-transform-rotate"),
- ("bpy.ops.uv.lightmap_pack*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-lightmap-pack"),
- ("bpy.ops.uv.smart_project*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-smart-project"),
- ("bpy.ops.view3d.localview*", "editors/3dview/navigate/views.html#bpy-ops-view3d-localview"),
- ("bpy.types.curvesmodifier*", "video_editing/sequencer/properties/modifiers.html#bpy-types-curvesmodifier"),
- ("bpy.types.ffmpegsettings*", "render/output/file_formats.html#bpy-types-ffmpegsettings"),
- ("bpy.types.fmodifiernoise*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifiernoise"),
- ("bpy.types.material.paint*", "sculpt_paint/texture_paint/index.html#bpy-types-material-paint"),
- ("bpy.types.mirrormodifier*", "modeling/modifiers/generate/mirror.html#bpy-types-mirrormodifier"),
- ("bpy.types.movieclipproxy*", "editors/clip/sidebar.html#bpy-types-movieclipproxy"),
- ("bpy.types.object.up_axis*", "scene_layout/object/properties/relations/extras.html#bpy-types-object-up-axis"),
- ("bpy.types.particlesystem*", "physics/particles/index.html#bpy-types-particlesystem"),
- ("bpy.types.particletarget*", "physics/particles/emitter/physics/keyed.html#bpy-types-particletarget"),
- ("bpy.types.remeshmodifier*", "modeling/modifiers/generate/remesh.html#bpy-types-remeshmodifier"),
- ("bpy.types.rendersettings*", "render/index.html#bpy-types-rendersettings"),
- ("bpy.types.rigidbodyworld*", "physics/rigid_body/world.html#bpy-types-rigidbodyworld"),
- ("bpy.types.sceneeevee.ssr*", "render/eevee/render_settings/screen_space_reflections.html#bpy-types-sceneeevee-ssr"),
- ("bpy.types.sceneeevee.sss*", "render/eevee/render_settings/subsurface_scattering.html#bpy-types-sceneeevee-sss"),
- ("bpy.types.shadernodebump*", "render/shader_nodes/vector/bump.html#bpy-types-shadernodebump"),
- ("bpy.types.shadernodemath*", "render/shader_nodes/converter/math.html#bpy-types-shadernodemath"),
- ("bpy.types.smoothmodifier*", "modeling/modifiers/deform/smooth.html#bpy-types-smoothmodifier"),
- ("bpy.types.timelinemarker*", "animation/markers.html#bpy-types-timelinemarker"),
- ("bpy.types.usersolidlight*", "editors/preferences/lights.html#bpy-types-usersolidlight"),
- ("bpy.types.uvwarpmodifier*", "modeling/modifiers/modify/uv_warp.html#bpy-types-uvwarpmodifier"),
- ("bpy.types.voronoitexture*", "render/materials/legacy_textures/types/voronoi.html#bpy-types-voronoitexture"),
- ("bpy.types.walknavigation*", "editors/3dview/navigate/walk_fly.html#bpy-types-walknavigation"),
- ("bpy.ops.*.select_circle*", "interface/selecting.html#bpy-ops-select-circle"),
- ("bpy.ops.anim.keying_set*", "animation/keyframes/keying_sets.html#bpy-ops-anim-keying-set"),
- ("bpy.ops.ed.undo_history*", "interface/undo_redo.html#bpy-ops-ed-undo-history"),
- ("bpy.ops.mesh.edge_split*", "modeling/meshes/editing/edges.html#bpy-ops-mesh-edge-split"),
- ("bpy.ops.mesh.mark_sharp*", "modeling/meshes/editing/edges.html#bpy-ops-mesh-mark-sharp"),
- ("bpy.ops.object.armature*", "animation/armatures/index.html#bpy-ops-object-armature"),
- ("bpy.ops.object.face_map*", "modeling/meshes/properties/object_data.html#bpy-ops-object-face-map"),
- ("bpy.ops.rigidbody.world*", "physics/rigid_body/world.html#bpy-ops-rigidbody-world"),
- ("bpy.ops.transform.shear*", "modeling/meshes/editing/transform/shear.html#bpy-ops-transform-shear"),
- ("bpy.ops.uv.cube_project*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-cube-project"),
- ("bpy.ops.uv.pack_islands*", "modeling/meshes/editing/uv/layout.html#bpy-ops-uv-pack-islands"),
- ("bpy.ops.wm.app_template*", "advanced/app_templates.html#bpy-ops-wm-app-template"),
- ("bpy.ops.wm.redraw_timer*", "advanced/operators.html#bpy-ops-wm-redraw-timer"),
- ("bpy.types.*light.shadow*", "render/eevee/lighting.html#bpy-types-light-shadow"),
- ("bpy.types.armaturebones*", "animation/armatures/bones/index.html#bpy-types-armaturebones"),
- ("bpy.types.arraymodifier*", "modeling/modifiers/generate/array.html#bpy-types-arraymodifier"),
- ("bpy.types.bevelmodifier*", "modeling/modifiers/generate/bevel.html#bpy-types-bevelmodifier"),
- ("bpy.types.buildmodifier*", "modeling/modifiers/generate/build.html#bpy-types-buildmodifier"),
- ("bpy.types.camera.sensor*", "render/cameras.html#bpy-types-camera-sensor"),
- ("bpy.types.clothmodifier*", "physics/cloth/index.html#bpy-types-clothmodifier"),
- ("bpy.types.clothsettings*", "physics/cloth/settings/index.html#bpy-types-clothsettings"),
- ("bpy.types.cloudstexture*", "render/materials/legacy_textures/types/clouds.html#bpy-types-cloudstexture"),
- ("bpy.types.colorsequence*", "video_editing/sequencer/strips/color.html#bpy-types-colorsequence"),
- ("bpy.types.crosssequence*", "video_editing/sequencer/strips/transitions/cross.html#bpy-types-crosssequence"),
- ("bpy.types.curvemodifier*", "modeling/modifiers/deform/curve.html#bpy-types-curvemodifier"),
- ("bpy.types.fieldsettings*", "physics/forces/force_fields/index.html#bpy-types-fieldsettings"),
- ("bpy.types.fluidsettings*", "physics/fluid/index.html#bpy-types-fluidsettings"),
- ("bpy.types.imagesequence*", "video_editing/sequencer/strips/movie_image.html#bpy-types-imagesequence"),
- ("bpy.types.marbletexture*", "render/materials/legacy_textures/types/marble.html#bpy-types-marbletexture"),
- ("bpy.types.modifier.show*", "modeling/modifiers/introduction.html#bpy-types-modifier-show"),
- ("bpy.types.moviesequence*", "video_editing/sequencer/strips/movie_image.html#bpy-types-moviesequence"),
- ("bpy.types.movietracking*", "movie_clip/tracking/index.html#bpy-types-movietracking"),
- ("bpy.types.object.parent*", "scene_layout/object/properties/relations/parents.html#bpy-types-object-parent"),
- ("bpy.types.oceanmodifier*", "modeling/modifiers/simulate/ocean.html#bpy-types-oceanmodifier"),
- ("bpy.types.particlebrush*", "physics/particles/mode.html#bpy-types-particlebrush"),
- ("bpy.types.scene.gravity*", "physics/forces/gravity.html#bpy-types-scene-gravity"),
- ("bpy.types.sceneeevee.gi*", "render/eevee/render_settings/indirect_lighting.html#bpy-types-sceneeevee-gi"),
- ("bpy.types.scenesequence*", "video_editing/sequencer/strips/scene.html#bpy-types-scenesequence"),
- ("bpy.types.screwmodifier*", "modeling/modifiers/generate/screw.html#bpy-types-screwmodifier"),
- ("bpy.types.sequenceproxy*", "video_editing/sequencer/properties/proxy_cache.html#bpy-types-sequenceproxy"),
- ("bpy.types.shadernodergb*", "render/shader_nodes/input/rgb.html#bpy-types-shadernodergb"),
- ("bpy.types.smokemodifier*", "physics/smoke/index.html#bpy-types-smokemodifier"),
- ("bpy.types.soundsequence*", "video_editing/sequencer/strips/sound.html#bpy-types-soundsequence"),
- ("bpy.types.spaceoutliner*", "editors/outliner.html#bpy-types-spaceoutliner"),
- ("bpy.types.spacetimeline*", "editors/timeline.html#bpy-types-spacetimeline"),
- ("bpy.types.stuccitexture*", "render/materials/legacy_textures/types/stucci.html#bpy-types-stuccitexture"),
- ("bpy.types.windowmanager*", "interface/index.html#bpy-types-windowmanager"),
- ("bpy.ops.*.select_lasso*", "interface/selecting.html#bpy-ops-select-lasso"),
- ("bpy.ops.mesh.mark_seam*", "modeling/meshes/editing/edges.html#bpy-ops-mesh-mark-seam"),
- ("bpy.ops.mesh.subdivide*", "modeling/meshes/editing/subdividing/subdivide.html#bpy-ops-mesh-subdivide"),
- ("bpy.ops.object.convert*", "scene_layout/object/editing/introduction.html#bpy-ops-object-convert"),
- ("bpy.ops.object.speaker*", "render/output/audio/speaker.html#bpy-ops-object-speaker"),
- ("bpy.ops.transform.bend*", "modeling/meshes/editing/transform/bend.html#bpy-ops-transform-bend"),
- ("bpy.types.bakesettings*", "render/cycles/baking.html#bpy-types-bakesettings"),
- ("bpy.types.blendtexture*", "render/materials/legacy_textures/types/blend.html#bpy-types-blendtexture"),
- ("bpy.types.castmodifier*", "modeling/modifiers/deform/cast.html#bpy-types-castmodifier"),
- ("bpy.types.colormanaged*", "render/color_management.html#bpy-types-colormanaged"),
- ("bpy.types.glowsequence*", "video_editing/sequencer/strips/effects/glow.html#bpy-types-glowsequence"),
- ("bpy.types.hookmodifier*", "modeling/modifiers/deform/hooks.html#bpy-types-hookmodifier"),
- ("bpy.types.latticepoint*", "animation/lattice.html#bpy-types-latticepoint"),
- ("bpy.types.magictexture*", "render/materials/legacy_textures/types/magic.html#bpy-types-magictexture"),
- ("bpy.types.maskmodifier*", "modeling/modifiers/generate/mask.html#bpy-types-maskmodifier"),
- ("bpy.types.masksequence*", "video_editing/sequencer/strips/clip_mask.html#bpy-types-masksequence"),
- ("bpy.types.metasequence*", "video_editing/sequencer/meta.html#bpy-types-metasequence"),
- ("bpy.types.object.color*", "scene_layout/object/properties/display.html#bpy-types-object-color"),
- ("bpy.types.object.delta*", "scene_layout/object/properties/transforms.html#bpy-types-object-delta"),
- ("bpy.types.object.empty*", "modeling/empties.html#bpy-types-object-empty"),
- ("bpy.types.object.scale*", "scene_layout/object/properties/transforms.html#bpy-types-object-scale"),
- ("bpy.types.particleedit*", "physics/particles/mode.html#bpy-types-particleedit"),
- ("bpy.types.scene.camera*", "scene_layout/scene/properties.html#bpy-types-scene-camera"),
- ("bpy.types.skinmodifier*", "modeling/modifiers/generate/skin.html#bpy-types-skinmodifier"),
- ("bpy.types.spaceconsole*", "editors/python_console.html#bpy-types-spaceconsole"),
- ("bpy.types.textsequence*", "video_editing/sequencer/strips/text.html#bpy-types-textsequence"),
- ("bpy.types.unitsettings*", "scene_layout/scene/properties.html#bpy-types-unitsettings"),
- ("bpy.types.vertexcolors*", "sculpt_paint/vertex_paint/index.html#bpy-types-vertexcolors"),
- ("bpy.types.view3dcursor*", "editors/3dview/3d_cursor.html#bpy-types-view3dcursor"),
- ("bpy.types.warpmodifier*", "modeling/modifiers/deform/warp.html#bpy-types-warpmodifier"),
- ("bpy.types.wavemodifier*", "modeling/modifiers/deform/wave.html#bpy-types-wavemodifier"),
- ("bpy.types.wipesequence*", "video_editing/sequencer/strips/transitions/wipe.html#bpy-types-wipesequence"),
- ("bpy.ops.image.project*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-ops-image-project"),
- ("bpy.ops.object.*clear*", "scene_layout/object/editing/transform/clear_apply.html#bpy-ops-object-clear"),
- ("bpy.ops.object.delete*", "scene_layout/object/editing/introduction.html#bpy-ops-object-delete"),
- ("bpy.ops.screen.header*", "interface/window_system/regions.html#bpy-ops-screen-header"),
- ("bpy.ops.view3d.select*", "editors/3dview/selecting.html#bpy-ops-view3d-select"),
- ("bpy.ops.wm.debug_menu*", "advanced/operators.html#bpy-ops-wm-debug-menu"),
- ("bpy.ops.wm.properties*", "files/data_blocks.html#bpy-ops-wm-properties"),
- ("bpy.types.addsequence*", "video_editing/sequencer/strips/effects/add.html#bpy-types-addsequence"),
- ("bpy.types.camera.show*", "render/cameras.html#bpy-types-camera-show"),
- ("bpy.types.consoleline*", "editors/python_console.html#bpy-types-consoleline"),
- ("bpy.types.meshstatvis*", "modeling/meshes/mesh_analysis.html#bpy-types-meshstatvis"),
- ("bpy.types.nodesetting*", "interface/controls/nodes/parts.html#bpy-types-nodesetting"),
- ("bpy.types.object.lock*", "scene_layout/object/properties/transforms.html#bpy-types-object-lock"),
- ("bpy.types.object.show*", "scene_layout/object/properties/display.html#bpy-types-object-show"),
- ("bpy.types.particlekey*", "physics/particles/emitter/physics/keyed.html#bpy-types-particlekey"),
- ("bpy.types.posebone.ik*", "animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html#bpy-types-posebone-ik"),
- ("bpy.types.renderlayer*", "render/layers/layers.html#bpy-types-renderlayer"),
- ("bpy.types.spaceview3d*", "editors/3dview/index.html#bpy-types-spaceview3d"),
- ("bpy.types.uipopupmenu*", "interface/controls/buttons/menus.html#bpy-types-uipopupmenu"),
- ("bpy.types.vertexpaint*", "sculpt_paint/vertex_paint/index.html#bpy-types-vertexpaint"),
- ("bpy.types.woodtexture*", "render/materials/legacy_textures/types/wood.html#bpy-types-woodtexture"),
- ("bpy.ops.*.select_box*", "interface/selecting.html#bpy-ops-select-box"),
- ("bpy.ops.object.align*", "scene_layout/object/editing/transform/tools.html#bpy-ops-object-align"),
- ("bpy.ops.object.empty*", "modeling/empties.html#bpy-ops-object-empty"),
- ("bpy.ops.object.quick*", "physics/introduction.html#bpy-ops-object-quick"),
- ("bpy.ops.uv.mark_seam*", "modeling/meshes/editing/uv/unwrapping/seams.html#bpy-ops-uv-mark-seam"),
- ("bpy.ops.view3d.ruler*", "editors/3dview/toolbar/measure.html#bpy-ops-view3d-ruler"),
- ("bpy.types.areaspaces*", "interface/window_system/areas.html#bpy-types-areaspaces"),
- ("bpy.types.bpy_struct*", "files/data_blocks.html#bpy-types-bpy-struct"),
- ("bpy.types.collection*", "scene_layout/collections/collections.html#bpy-types-collection"),
- ("bpy.types.compositor*", "compositing/index.html#bpy-types-compositor"),
- ("bpy.types.constraint*", "animation/constraints/index.html#bpy-types-constraint"),
- ("bpy.types.imagepaint*", "sculpt_paint/texture_paint/index.html#bpy-types-imagepaint"),
- ("bpy.types.lightprobe*", "render/eevee/lightprobes/index.html#bpy-types-lightprobe"),
- ("bpy.types.nodesocket*", "interface/controls/nodes/parts.html#bpy-types-nodesocket"),
- ("bpy.types.pointcache*", "physics/baking.html#bpy-types-pointcache"),
- ("bpy.types.pointlight*", "render/lights/light_object.html#bpy-types-pointlight"),
- ("bpy.types.renderview*", "render/output/multiview/index.html#bpy-types-renderview"),
- ("bpy.types.sceneeevee*", "render/eevee/index.html#bpy-types-sceneeevee"),
- ("bpy.types.vectorfont*", "modeling/texts/index.html#bpy-types-vectorfont"),
- ("bpy.ops.mesh.bisect*", "modeling/meshes/editing/subdividing/bisect.html#bpy-ops-mesh-bisect"),
- ("bpy.ops.object.join*", "scene_layout/object/editing/introduction.html#bpy-ops-object-join"),
- ("bpy.ops.object.text*", "modeling/texts/index.html#bpy-ops-object-text"),
- ("bpy.ops.view3d.snap*", "scene_layout/object/editing/transform/control/snap.html#bpy-ops-view3d-snap"),
- ("bpy.types.*texspace*", "editors/uv/generated_uvs.html#bpy-types-texspace"),
- ("bpy.types.arealight*", "render/lights/light_object.html#bpy-types-arealight"),
- ("bpy.types.blenddata*", "files/data_blocks.html#bpy-types-blenddata"),
- ("bpy.types.colorramp*", "interface/controls/templates/color_ramp.html#bpy-types-colorramp"),
- ("bpy.types.dopesheet*", "editors/dope_sheet/index.html#bpy-types-dopesheet"),
- ("bpy.types.fmodifier*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifier"),
- ("bpy.types.freestyle*", "render/freestyle/index.html#bpy-types-freestyle"),
- ("bpy.types.movieclip*", "movie_clip/index.html#bpy-types-movieclip"),
- ("bpy.types.nodeframe*", "interface/controls/nodes/frame.html#bpy-types-nodeframe"),
- ("bpy.types.nodegroup*", "interface/controls/nodes/groups.html#bpy-types-nodegroup"),
- ("bpy.types.spotlight*", "render/lights/light_object.html#bpy-types-spotlight"),
- ("bpy.types.textcurve*", "modeling/texts/index.html#bpy-types-textcurve"),
- ("bpy.types.uipiemenu*", "interface/controls/buttons/menus.html#bpy-types-uipiemenu"),
- ("bpy.types.uipopover*", "interface/controls/buttons/menus.html#bpy-types-uipopover"),
- ("bpy.ops.collection*", "scene_layout/collections/collections.html#bpy-ops-collection"),
- ("bpy.ops.constraint*", "animation/constraints/index.html#bpy-ops-constraint"),
- ("bpy.ops.curve.draw*", "modeling/curves/editing/other.html#bpy-ops-curve-draw"),
- ("bpy.ops.mesh.knife*", "modeling/meshes/editing/subdividing/knife.html#bpy-ops-mesh-knife"),
- ("bpy.ops.mesh.noise*", "modeling/meshes/editing/transform/noise.html#bpy-ops-mesh-noise"),
- ("bpy.ops.mesh.screw*", "modeling/meshes/editing/duplicating/screw.html#bpy-ops-mesh-screw"),
- ("bpy.ops.safe_areas*", "render/cameras.html#bpy-ops-safe-areas"),
- ("bpy.types.armature*", "animation/armatures/index.html#bpy-types-armature"),
- ("bpy.types.editbone*", "animation/armatures/bones/editing/index.html#bpy-types-editbone"),
- ("bpy.types.facemaps*", "modeling/meshes/properties/object_data.html#bpy-types-facemaps"),
- ("bpy.types.keyframe*", "animation/keyframes/index.html#bpy-types-keyframe"),
- ("bpy.types.linesets*", "render/freestyle/parameter_editor/line_set.html#bpy-types-linesets"),
- ("bpy.types.metaball*", "modeling/metas/index.html#bpy-types-metaball"),
- ("bpy.types.modifier*", "modeling/modifiers/index.html#bpy-types-modifier"),
- ("bpy.types.nlastrip*", "editors/nla/strips.html#bpy-types-nlastrip"),
- ("bpy.types.nlatrack*", "editors/nla/tracks.html#bpy-types-nlatrack"),
- ("bpy.types.nodelink*", "interface/controls/nodes/parts.html#bpy-types-nodelink"),
- ("bpy.types.nodetree*", "interface/controls/nodes/parts.html#bpy-types-nodetree"),
- ("bpy.types.particle*", "physics/particles/index.html#bpy-types-particle"),
- ("bpy.types.sequence*", "video_editing/index.html#bpy-types-sequence"),
- ("bpy.types.shapekey*", "animation/shape_keys/index.html#bpy-types-shapekey"),
- ("bpy.types.spacenla*", "editors/nla/index.html#bpy-types-spacenla"),
- ("bpy.types.sunlight*", "render/lights/light_object.html#bpy-types-sunlight"),
- ("bpy.ops.mesh.spin*", "modeling/meshes/editing/duplicating/spin.html#bpy-ops-mesh-spin"),
- ("bpy.ops.rigidbody*", "physics/rigid_body/index.html#bpy-ops-rigidbody"),
- ("bpy.ops.sequencer*", "video_editing/index.html#bpy-ops-sequencer"),
- ("bpy.ops.transform*", "scene_layout/object/editing/transform/index.html#bpy-ops-transform"),
- ("bpy.ops.uv.stitch*", "modeling/meshes/editing/uv/layout.html#bpy-ops-uv-stitch"),
- ("bpy.ops.uv.unwrap*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-unwrap"),
- ("bpy.types.animviz*", "animation/motion_paths.html#bpy-types-animviz"),
- ("bpy.types.lattice*", "animation/lattice.html#bpy-types-lattice"),
- ("bpy.types.library*", "files/linked_libraries.html#bpy-types-library"),
- ("bpy.types.speaker*", "render/output/audio/speaker.html#bpy-types-speaker"),
- ("bpy.types.textbox*", "modeling/texts/layout.html#bpy-types-textbox"),
- ("bpy.types.texture*", "render/materials/legacy_textures/index.html#bpy-types-texture"),
- ("bpy.ops.armature*", "animation/armatures/index.html#bpy-ops-armature"),
- ("bpy.ops.nla.bake*", "animation/actions.html#bpy-ops-nla-bake"),
- ("bpy.ops.outliner*", "editors/outliner.html#bpy-ops-outliner"),
- ("bpy.ops.particle*", "physics/particles/index.html#bpy-ops-particle"),
- ("bpy.ops.uv.align*", "modeling/meshes/editing/uv/layout.html#bpy-ops-uv-align"),
- ("bpy.ops.uv.reset*", "modeling/meshes/editing/uv/unwrapping/mapping_types.html#bpy-ops-uv-reset"),
- ("bpy.ops.wm.addon*", "editors/preferences/addons.html#bpy-ops-wm-addon"),
- ("bpy.types.action*", "animation/actions.html#bpy-types-action"),
- ("bpy.types.cycles*", "render/cycles/index.html#bpy-types-cycles"),
- ("bpy.types.driver*", "animation/drivers/index.html#bpy-types-driver"),
- ("bpy.types.fcurve*", "editors/graph_editor/fcurves/index.html#bpy-types-fcurve"),
- ("bpy.types.header*", "interface/window_system/regions.html#bpy-types-header"),
- ("bpy.types.object*", "scene_layout/object/index.html#bpy-types-object"),
- ("bpy.types.region*", "interface/window_system/regions.html#bpy-types-region"),
- ("bpy.types.render*", "render/index.html#bpy-types-render"),
- ("bpy.types.sculpt*", "sculpt_paint/sculpting/index.html#bpy-types-sculpt"),
- ("bpy.types.shader*", "render/shader_nodes/shader/index.html#bpy-types-shader"),
- ("bpy.types.window*", "interface/index.html#bpy-types-window"),
- ("bpy.ops.buttons*", "interface/index.html#bpy-ops-buttons"),
- ("bpy.ops.console*", "editors/python_console.html#bpy-ops-console"),
- ("bpy.ops.ed.redo*", "interface/undo_redo.html#bpy-ops-ed-redo"),
- ("bpy.ops.ed.undo*", "interface/undo_redo.html#bpy-ops-ed-undo"),
- ("bpy.ops.gpencil*", "grease_pencil/index.html#bpy-ops-gpencil"),
- ("bpy.ops.lattice*", "animation/lattice.html#bpy-ops-lattice"),
- ("bpy.ops.poselib*", "animation/armatures/properties/pose_library.html#bpy-ops-poselib"),
- ("bpy.ops.ptcache*", "physics/baking.html#bpy-ops-ptcache"),
- ("bpy.ops.surface*", "modeling/surfaces/index.html#bpy-ops-surface"),
- ("bpy.ops.texture*", "render/materials/legacy_textures/index.html#bpy-ops-texture"),
- ("bpy.ops.uv.weld*", "modeling/meshes/editing/uv/layout.html#bpy-ops-uv-weld"),
- ("bpy.types.addon*", "editors/preferences/addons.html#bpy-types-addon"),
- ("bpy.types.brush*", "sculpt_paint/brush/brush.html#bpy-types-brush"),
- ("bpy.types.curve*", "modeling/curves/index.html#bpy-types-curve"),
- ("bpy.types.image*", "files/media/image_formats.html#bpy-types-image"),
- ("bpy.types.itasc*", "animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html#bpy-types-itasc"),
- ("bpy.types.nodes*", "interface/controls/nodes/index.html#bpy-types-nodes"),
- ("bpy.types.paint*", "sculpt_paint/index.html#bpy-types-paint"),
- ("bpy.types.panel*", "interface/window_system/tabs_panels.html#bpy-types-panel"),
- ("bpy.types.scene*", "scene_layout/scene/index.html#bpy-types-scene"),
- ("bpy.types.sound*", "render/output/audio/index.html#bpy-types-sound"),
- ("bpy.types.space*", "editors/index.html#bpy-types-space"),
- ("bpy.types.theme*", "editors/preferences/themes.html#bpy-types-theme"),
- ("bpy.ops.action*", "animation/actions.html#bpy-ops-action"),
- ("bpy.ops.cycles*", "render/cycles/index.html#bpy-ops-cycles"),
- ("bpy.ops.dpaint*", "physics/dynamic_paint/index.html#bpy-ops-dpaint"),
- ("bpy.ops.export*", "files/import_export.html#bpy-ops-export"),
- ("bpy.ops.import*", "files/import_export.html#bpy-ops-import"),
- ("bpy.ops.marker*", "animation/markers.html#bpy-ops-marker"),
- ("bpy.ops.object*", "scene_layout/object/index.html#bpy-ops-object"),
- ("bpy.ops.render*", "render/index.html#bpy-ops-render"),
- ("bpy.ops.script*", "advanced/scripting/index.html#bpy-ops-script"),
- ("bpy.ops.sculpt*", "sculpt_paint/sculpting/index.html#bpy-ops-sculpt"),
- ("bpy.ops.uv.pin*", "modeling/meshes/editing/uv/layout.html#bpy-ops-uv-pin"),
- ("bpy.ops.view3d*", "editors/3dview/index.html#bpy-ops-view3d"),
- ("bpy.types.area*", "interface/window_system/areas.html#bpy-types-area"),
- ("bpy.types.boid*", "physics/particles/emitter/physics/boids.html#bpy-types-boid"),
- ("bpy.types.bone*", "animation/armatures/bones/index.html#bpy-types-bone"),
- ("bpy.types.mask*", "movie_clip/masking/index.html#bpy-types-mask"),
- ("bpy.types.menu*", "interface/controls/buttons/menus.html#bpy-types-menu"),
- ("bpy.types.mesh*", "modeling/meshes/index.html#bpy-types-mesh"),
- ("bpy.types.pose*", "animation/armatures/posing/index.html#bpy-types-pose"),
- ("bpy.types.text*", "modeling/texts/index.html#bpy-types-text"),
- ("bpy.ops.brush*", "sculpt_paint/brush/brush.html#bpy-ops-brush"),
- ("bpy.ops.cloth*", "physics/cloth/index.html#bpy-ops-cloth"),
- ("bpy.ops.curve*", "modeling/curves/index.html#bpy-ops-curve"),
- ("bpy.ops.fluid*", "physics/fluid/index.html#bpy-ops-fluid"),
- ("bpy.ops.graph*", "editors/graph_editor/index.html#bpy-ops-graph"),
- ("bpy.ops.image*", "files/media/image_formats.html#bpy-ops-image"),
- ("bpy.ops.mball*", "modeling/metas/index.html#bpy-ops-mball"),
- ("bpy.ops.paint*", "sculpt_paint/index.html#bpy-ops-paint"),
- ("bpy.ops.scene*", "scene_layout/scene/index.html#bpy-ops-scene"),
- ("bpy.ops.sound*", "render/output/audio/index.html#bpy-ops-sound"),
- ("bpy.types.key*", "animation/shape_keys/index.html#bpy-types-key"),
- ("bpy.ops.anim*", "animation/index.html#bpy-ops-anim"),
- ("bpy.ops.boid*", "physics/particles/emitter/physics/boids.html#bpy-ops-boid"),
- ("bpy.ops.clip*", "movie_clip/index.html#bpy-ops-clip"),
- ("bpy.ops.font*", "modeling/texts/index.html#bpy-ops-font"),
- ("bpy.ops.mask*", "movie_clip/masking/index.html#bpy-ops-mask"),
- ("bpy.ops.mesh*", "modeling/meshes/index.html#bpy-ops-mesh"),
- ("bpy.ops.node*", "interface/controls/nodes/index.html#bpy-ops-node"),
- ("bpy.ops.pose*", "animation/armatures/posing/index.html#bpy-ops-pose"),
- ("bpy.ops.text*", "editors/text_editor.html#bpy-ops-text"),
- ("bpy.ops.time*", "editors/timeline.html#bpy-ops-time"),
- ("bpy.types.id*", "files/data_blocks.html#bpy-types-id"),
- ("bpy.ops.nla*", "editors/nla/index.html#bpy-ops-nla"),
- ("bpy.ops.ed*", "interface/undo_redo.html#bpy-ops-ed"),
- ("bpy.ops.ui*", "interface/index.html#bpy-ops-ui"),
- ("bpy.ops.wm*", "interface/index.html#bpy-ops-wm"),
-)
diff --git a/object_carver/carver_draw.py b/object_carver/carver_draw.py
index be2b5a4d..695d0ca1 100644
--- a/object_carver/carver_draw.py
+++ b/object_carver/carver_draw.py
@@ -57,6 +57,8 @@ def draw_string(self, color1, color2, left, bottom, text, max_option, divide = 1
""" Draw the text like 'option : key' or just 'option' """
font_id = 0
+ ui_scale = bpy.context.preferences.system.ui_scale
+
blf.enable(font_id,blf.SHADOW)
blf.shadow(font_id, 0, 0.0, 0.0, 0.0, 1.0)
blf.shadow_offset(font_id,2,-2)
@@ -65,14 +67,16 @@ def draw_string(self, color1, color2, left, bottom, text, max_option, divide = 1
# Test if the text is a list formatted like : ('option', 'key')
if isinstance(text,list):
+ spacer_text = " : "
+ spacer_width = blf.dimensions(font_id, spacer_text)[0]
for string in text:
blf.position(font_id, (left), (bottom + y_offset), 0)
blf.color(font_id, *color1)
blf.draw(font_id, string[0])
blf.position(font_id, (left + max_option), (bottom + y_offset), 0)
- blf.draw(font_id, " : ")
+ blf.draw(font_id, spacer_text)
blf.color(font_id, *color2)
- blf.position(font_id, (left + max_option + 15), (bottom + y_offset), 0)
+ blf.position(font_id, (left + max_option + spacer_width), (bottom + y_offset), 0)
blf.draw(font_id, string[1])
y_offset += line_height
else:
@@ -129,7 +133,8 @@ def draw_callback_px(self, context):
# Get the size of the text
text_size = 18 if region.width >= 850 else 12
- blf.size(0, int(round(text_size * bpy.context.preferences.view.ui_scale, 0)), 72)
+ ui_scale = bpy.context.preferences.system.ui_scale
+ blf.size(0, round(text_size * ui_scale), bpy.context.preferences.system.dpi)
# Help Display
if (self.ObjectMode is False) and (self.ProfileMode is False):
@@ -227,7 +232,7 @@ def draw_callback_px(self, context):
# Display boolean mode
text_size = 40 if region.width >= 850 else 20
- blf.size(0, int(round(text_size * bpy.context.preferences.view.ui_scale, 0)), 72)
+ blf.size(0, round(text_size * ui_scale), bpy.context.preferences.system.dpi)
draw_string(self, color2, color2, region_width - (blf.dimensions(0, BooleanMode)[0]) / 2, \
y_txt + bloc_height + 16, BooleanMode, 0, divide = 2)
@@ -236,7 +241,7 @@ def draw_callback_px(self, context):
if self.AskHelp is False:
# "H for Help" text
- blf.size(0, int(round(13 * bpy.context.preferences.view.ui_scale, 0)), 72)
+ blf.size(0, round(13 * ui_scale), bpy.context.preferences.system.dpi)
help_txt = "[" + self.carver_prefs.Key_Help + "] for help"
txt_width = blf.dimensions(0, help_txt)[0]
txt_height = (blf.dimensions(0, "gM")[1] * 1.45)
@@ -321,7 +326,7 @@ def draw_callback_px(self, context):
["Gap for rows or columns", self.carver_prefs.Key_Gapy + " " + self.carver_prefs.Key_Gapx]
]
- blf.size(0, int(round(15 * bpy.context.preferences.view.ui_scale, 0)), 72)
+ blf.size(0, round(15 * ui_scale), bpy.context.preferences.system.dpi)
help_txt, bloc_height, max_option, max_key, comma = get_text_info(self, context, help_txt)
draw_string(self, color1, color2, xHelp, yHelp, help_txt, max_option)
diff --git a/object_scatter/operator.py b/object_scatter/operator.py
index dbb277fe..5294d173 100644
--- a/object_scatter/operator.py
+++ b/object_scatter/operator.py
@@ -392,8 +392,9 @@ def create_line_strip_batch(coords):
def draw_text(location, text, size=15, color=(1, 1, 1, 1)):
font_id = 0
+ ui_scale = bpy.context.preferences.system.ui_scale
blf.position(font_id, *location)
- blf.size(font_id, size, 72)
+ blf.size(font_id, round(size * ui_scale), bpy.context.preferences.system.dpi)
blf.draw(font_id, text)
diff --git a/render_povray/__init__.py b/render_povray/__init__.py
index e475335e..0551e2eb 100644
--- a/render_povray/__init__.py
+++ b/render_povray/__init__.py
@@ -4094,7 +4094,32 @@ class RenderPovSettingsLight(PropertyGroup):
default="RAY_SHADOW")
active_texture_index: IntProperty(
name = "Index for texture_slots",
- default = 0)
+ default = 0)
+ use_halo: BoolProperty(
+ name="Halo", description="Render spotlight with a volumetric halo",
+ default=False)
+ halo_intensity: FloatProperty(
+ name="Halo intensity",
+ description="Brightness of the spotlight halo cone",
+ soft_min=0.0, soft_max=1.0, default=1.0)
+ shadow_ray_samples_x: IntProperty(
+ name = "Number of samples taken extra (samples x samples)",
+ min=1, soft_max=64,
+ default = 1)
+ shadow_ray_samples_y: IntProperty(
+ name = "Number of samples taken extra (samples x samples)",
+ min=1, soft_max=64,
+ default = 1)
+ shadow_ray_sample_method: EnumProperty(
+ name="",
+ description="Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower",
+ items=(('ADAPTIVE_QMC', "", "Halton samples distribution", "",0),
+ ('CONSTANT_QMC', "", "QMC samples distribution", "",1),
+ ('CONSTANT_JITTERED', "", "Uses POV jitter keyword", "",2)), #"Show other data textures"
+ default = 'CONSTANT_JITTERED')
+ use_jitter: BoolProperty(
+ name="Jitter", description="Use noise for sampling (Constant Jittered sampling)",
+ default=False)
###############################################################################
# World POV properties.
###############################################################################
diff --git a/render_povray/render.py b/render_povray/render.py
index a845d102..69a6b56a 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -547,13 +547,13 @@ def write_pov(filename, scene=None, info_callback=None):
tuple([degrees(e) for e in matrix.to_3x3().to_euler()]))
tabWrite("translate <%.6f, %.6f, %.6f>\n" % matrix.translation[:])
if camera.data.dof.use_dof and (focal_point != 0 or camera.data.dof.focus_object):
- tabWrite("aperture %.3g\n" % 1/camera.data.dof.aperture_fstop*1000)
+ tabWrite("aperture %.3g\n" % (1/camera.data.dof.aperture_fstop*1000))
tabWrite("blur_samples %d %d\n" % \
(camera.data.pov.dof_samples_min, camera.data.pov.dof_samples_max))
tabWrite("variance 1/%d\n" % camera.data.pov.dof_variance)
tabWrite("confidence %.3g\n" % camera.data.pov.dof_confidence)
- if camera.data.dof_object:
- focalOb = scene.objects[camera.data.dof_object.name]
+ if camera.data.dof.focus_object:
+ focalOb = scene.objects[camera.data.dof.focus_object.name]
matrixBlur = global_matrix @ focalOb.matrix_world
tabWrite("focal_point <%.4f,%.4f,%.4f>\n"% matrixBlur.translation[:])
else:
@@ -579,8 +579,8 @@ def write_pov(filename, scene=None, info_callback=None):
matrix = global_matrix @ ob.matrix_world
- # Color is modified by energy #multiplied by 2 for a better match --Maurice
- color = tuple([c * (lamp.energy) for c in lamp.color])
+ # Color is no longer modified by energy
+ color = tuple([c for c in lamp.color])
tabWrite("light_source {\n")
tabWrite("< 0,0,0 >\n")
@@ -600,13 +600,13 @@ def write_pov(filename, scene=None, info_callback=None):
tabWrite("tightness 0\n") # 0:10f
tabWrite("point_at <0, 0, -1>\n")
- if lamp.use_halo:
+ if lamp.pov.use_halo:
tabWrite("looks_like{\n")
tabWrite("sphere{<0,0,0>,%.6f\n" %lamp.distance)
tabWrite("hollow\n")
tabWrite("material{\n")
tabWrite("texture{\n")
- tabWrite("pigment{rgbf<1,1,1,%.4f>}\n" % (lamp.halo_intensity*5.0))
+ tabWrite("pigment{rgbf<1,1,1,%.4f>}\n" % (lamp.pov.halo_intensity*5.0))
tabWrite("}\n")
tabWrite("interior{\n")
tabWrite("media{\n")
@@ -635,19 +635,19 @@ def write_pov(filename, scene=None, info_callback=None):
# for those?
tabWrite("fade_power %d\n" % 2)
size_x = lamp.size
- samples_x = lamp.shadow_ray_samples_x
+ samples_x = lamp.pov.shadow_ray_samples_x
if lamp.shape == 'SQUARE':
size_y = size_x
samples_y = samples_x
else:
size_y = lamp.size_y
- samples_y = lamp.shadow_ray_samples_y
+ samples_y = lamp.pov.shadow_ray_samples_y
tabWrite("area_light <%.6f,0,0>,<0,%.6f,0> %d, %d\n" % \
(size_x, size_y, samples_x, samples_y))
tabWrite("area_illumination\n")
- if lamp.shadow_ray_sample_method == 'CONSTANT_JITTERED':
- if lamp.use_jitter:
+ if lamp.pov.shadow_ray_sample_method == 'CONSTANT_JITTERED':
+ if lamp.pov.use_jitter:
tabWrite("jitter\n")
else:
tabWrite("adaptive 1\n")
@@ -2064,1159 +2064,1163 @@ def write_pov(filename, scene=None, info_callback=None):
ob_num = 0
for ob in sel:
- ob_num += 1
-
- # XXX I moved all those checks here, as there is no need to compute names
- # for object we won't export here!
- if (ob.type in {'LIGHT', 'CAMERA', #'EMPTY', #empties can bear dupligroups
- 'META', 'ARMATURE', 'LATTICE'}):
- continue
- smokeFlag=False
- for mod in ob.modifiers:
- if mod and hasattr(mod, 'smoke_type'):
- smokeFlag=True
- if (mod.smoke_type == 'DOMAIN'):
- exportSmoke(ob.name)
- break # don't render domain mesh or flow emitter mesh, skip to next object.
- if not smokeFlag:
- # Export Hair
- renderEmitter = True
- if hasattr(ob, 'particle_systems'):
- renderEmitter = False
- for pSys in ob.particle_systems:
- if pSys.settings.use_render_emitter:
- renderEmitter = True
- for mod in [m for m in ob.modifiers if (m is not None) and (m.type == 'PARTICLE_SYSTEM')]:
- if (pSys.settings.render_type == 'PATH') and mod.show_render and (pSys.name == mod.particle_system.name):
- tstart = time.time()
- texturedHair=0
- if ob.material_slots[pSys.settings.material - 1].material and ob.active_material is not None:
- pmaterial = ob.material_slots[pSys.settings.material - 1].material
- for th in pmaterial.texture_slots:
- if th and th.use:
- if (th.texture.type == 'IMAGE' and th.texture.image) or th.texture.type != 'IMAGE':
- if th.use_map_color_diffuse:
- texturedHair=1
- if pmaterial.strand.use_blender_units:
- strandStart = pmaterial.strand.root_size
- strandEnd = pmaterial.strand.tip_size
- strandShape = pmaterial.strand.shape
- else: # Blender unit conversion
- strandStart = pmaterial.strand.root_size / 200.0
- strandEnd = pmaterial.strand.tip_size / 200.0
- strandShape = pmaterial.strand.shape
- else:
- pmaterial = "default" # No material assigned in blender, use default one
- strandStart = 0.01
- strandEnd = 0.01
- strandShape = 0.0
- # Set the number of particles to render count rather than 3d view display
- pSys.set_resolution(scene, ob, 'RENDER')
- steps = pSys.settings.display_step
- steps = 3 ** steps # or (power of 2 rather than 3) + 1 # Formerly : len(particle.hair_keys)
-
- totalNumberOfHairs = ( len(pSys.particles) + len(pSys.child_particles) )
- #hairCounter = 0
- file.write('#declare HairArray = array[%i] {\n' % totalNumberOfHairs)
- for pindex in range(0, totalNumberOfHairs):
-
- #if particle.is_exist and particle.is_visible:
- #hairCounter += 1
- #controlPointCounter = 0
- # Each hair is represented as a separate sphere_sweep in POV-Ray.
-
- file.write('sphere_sweep{')
- if pSys.settings.use_hair_bspline:
- file.write('b_spline ')
- file.write('%i,\n' % (steps + 2)) # +2 because the first point needs tripling to be more than a handle in POV
- else:
- file.write('linear_spline ')
- file.write('%i,\n' % (steps))
- #changing world coordinates to object local coordinates by multiplying with inverted matrix
- initCo = ob.matrix_world.inverted()*(pSys.co_hair(ob, pindex, 0))
- if ob.material_slots[pSys.settings.material - 1].material and ob.active_material is not None:
- pmaterial = ob.material_slots[pSys.settings.material-1].material
- for th in pmaterial.texture_slots:
- if th and th.use and th.use_map_color_diffuse:
- #treat POV textures as bitmaps
- if (th.texture.type == 'IMAGE' and th.texture.image and th.texture_coords == 'UV' and ob.data.uv_textures is not None): # or (th.texture.pov.tex_pattern_type != 'emulator' and th.texture_coords == 'UV' and ob.data.uv_textures is not None):
- image=th.texture.image
- image_width = image.size[0]
- image_height = image.size[1]
- image_pixels = image.pixels[:]
- uv_co = pSys.uv_on_emitter(mod, pSys.particles[pindex], pindex, 0)
- x_co = round(uv_co[0] * (image_width - 1))
- y_co = round(uv_co[1] * (image_height - 1))
- pixelnumber = (image_width * y_co) + x_co
- r = image_pixels[pixelnumber*4]
- g = image_pixels[pixelnumber*4+1]
- b = image_pixels[pixelnumber*4+2]
- a = image_pixels[pixelnumber*4+3]
- initColor=(r,g,b,a)
- else:
- #only overwrite variable for each competing texture for now
- initColor=th.texture.evaluate((initCo[0],initCo[1],initCo[2]))
- for step in range(0, steps):
- co = ob.matrix_world.inverted()*(pSys.co_hair(ob, pindex, step))
- #for controlPoint in particle.hair_keys:
- if pSys.settings.clump_factor != 0:
- hDiameter = pSys.settings.clump_factor / 200.0 * random.uniform(0.5, 1)
- elif step == 0:
- hDiameter = strandStart
+ #subtract original from the count of their instances as were not counted before 2.8
+ if not (ob.is_instancer and ob.original != ob):
+ ob_num += 1
+
+ # XXX I moved all those checks here, as there is no need to compute names
+ # for object we won't export here!
+ if (ob.type in {'LIGHT', 'CAMERA', #'EMPTY', #empties can bear dupligroups
+ 'META', 'ARMATURE', 'LATTICE'}):
+ continue
+ smokeFlag=False
+ for mod in ob.modifiers:
+ if mod and hasattr(mod, 'smoke_type'):
+ smokeFlag=True
+ if (mod.smoke_type == 'DOMAIN'):
+ exportSmoke(ob.name)
+ break # don't render domain mesh or flow emitter mesh, skip to next object.
+ if not smokeFlag:
+ # Export Hair
+ renderEmitter = True
+ if hasattr(ob, 'particle_systems'):
+ renderEmitter = False
+ for pSys in ob.particle_systems:
+ if pSys.settings.use_render_emitter:
+ renderEmitter = True
+ for mod in [m for m in ob.modifiers if (m is not None) and (m.type == 'PARTICLE_SYSTEM')]:
+ if (pSys.settings.render_type == 'PATH') and mod.show_render and (pSys.name == mod.particle_system.name):
+ tstart = time.time()
+ texturedHair=0
+ if ob.material_slots[pSys.settings.material - 1].material and ob.active_material is not None:
+ pmaterial = ob.material_slots[pSys.settings.material - 1].material
+ for th in pmaterial.texture_slots:
+ if th and th.use:
+ if (th.texture.type == 'IMAGE' and th.texture.image) or th.texture.type != 'IMAGE':
+ if th.use_map_color_diffuse:
+ texturedHair=1
+ if pmaterial.strand.use_blender_units:
+ strandStart = pmaterial.strand.root_size
+ strandEnd = pmaterial.strand.tip_size
+ strandShape = pmaterial.strand.shape
+ else: # Blender unit conversion
+ strandStart = pmaterial.strand.root_size / 200.0
+ strandEnd = pmaterial.strand.tip_size / 200.0
+ strandShape = pmaterial.strand.shape
+ else:
+ pmaterial = "default" # No material assigned in blender, use default one
+ strandStart = 0.01
+ strandEnd = 0.01
+ strandShape = 0.0
+ # Set the number of particles to render count rather than 3d view display
+ pSys.set_resolution(scene, ob, 'RENDER')
+ steps = pSys.settings.display_step
+ steps = 3 ** steps # or (power of 2 rather than 3) + 1 # Formerly : len(particle.hair_keys)
+
+ totalNumberOfHairs = ( len(pSys.particles) + len(pSys.child_particles) )
+ #hairCounter = 0
+ file.write('#declare HairArray = array[%i] {\n' % totalNumberOfHairs)
+ for pindex in range(0, totalNumberOfHairs):
+
+ #if particle.is_exist and particle.is_visible:
+ #hairCounter += 1
+ #controlPointCounter = 0
+ # Each hair is represented as a separate sphere_sweep in POV-Ray.
+
+ file.write('sphere_sweep{')
+ if pSys.settings.use_hair_bspline:
+ file.write('b_spline ')
+ file.write('%i,\n' % (steps + 2)) # +2 because the first point needs tripling to be more than a handle in POV
else:
- hDiameter += (strandEnd-strandStart)/(pSys.settings.display_step+1) #XXX +1 or not?
- if step == 0 and pSys.settings.use_hair_bspline:
- # Write three times the first point to compensate pov Bezier handling
- file.write('<%.6g,%.6g,%.6g>,%.7g,\n' % (co[0], co[1], co[2], abs(hDiameter)))
- file.write('<%.6g,%.6g,%.6g>,%.7g,\n' % (co[0], co[1], co[2], abs(hDiameter)))
- #file.write('<%.6g,%.6g,%.6g>,%.7g' % (particle.location[0], particle.location[1], particle.location[2], abs(hDiameter))) # Useless because particle location is the tip, not the root.
- #file.write(',\n')
- #controlPointCounter += 1
- #totalNumberOfHairs += len(pSys.particles)# len(particle.hair_keys)
-
- # Each control point is written out, along with the radius of the
- # hair at that point.
- file.write('<%.6g,%.6g,%.6g>,%.7g' % (co[0], co[1], co[2], abs(hDiameter)))
-
- # All coordinates except the last need a following comma.
-
- if step != steps - 1:
+ file.write('linear_spline ')
+ file.write('%i,\n' % (steps))
+ #changing world coordinates to object local coordinates by multiplying with inverted matrix
+ initCo = ob.matrix_world.inverted()*(pSys.co_hair(ob, pindex, 0))
+ if ob.material_slots[pSys.settings.material - 1].material and ob.active_material is not None:
+ pmaterial = ob.material_slots[pSys.settings.material-1].material
+ for th in pmaterial.texture_slots:
+ if th and th.use and th.use_map_color_diffuse:
+ #treat POV textures as bitmaps
+ if (th.texture.type == 'IMAGE' and th.texture.image and th.texture_coords == 'UV' and ob.data.uv_textures is not None): # or (th.texture.pov.tex_pattern_type != 'emulator' and th.texture_coords == 'UV' and ob.data.uv_textures is not None):
+ image=th.texture.image
+ image_width = image.size[0]
+ image_height = image.size[1]
+ image_pixels = image.pixels[:]
+ uv_co = pSys.uv_on_emitter(mod, pSys.particles[pindex], pindex, 0)
+ x_co = round(uv_co[0] * (image_width - 1))
+ y_co = round(uv_co[1] * (image_height - 1))
+ pixelnumber = (image_width * y_co) + x_co
+ r = image_pixels[pixelnumber*4]
+ g = image_pixels[pixelnumber*4+1]
+ b = image_pixels[pixelnumber*4+2]
+ a = image_pixels[pixelnumber*4+3]
+ initColor=(r,g,b,a)
+ else:
+ #only overwrite variable for each competing texture for now
+ initColor=th.texture.evaluate((initCo[0],initCo[1],initCo[2]))
+ for step in range(0, steps):
+ co = ob.matrix_world.inverted()*(pSys.co_hair(ob, pindex, step))
+ #for controlPoint in particle.hair_keys:
+ if pSys.settings.clump_factor != 0:
+ hDiameter = pSys.settings.clump_factor / 200.0 * random.uniform(0.5, 1)
+ elif step == 0:
+ hDiameter = strandStart
+ else:
+ hDiameter += (strandEnd-strandStart)/(pSys.settings.display_step+1) #XXX +1 or not?
+ if step == 0 and pSys.settings.use_hair_bspline:
+ # Write three times the first point to compensate pov Bezier handling
+ file.write('<%.6g,%.6g,%.6g>,%.7g,\n' % (co[0], co[1], co[2], abs(hDiameter)))
+ file.write('<%.6g,%.6g,%.6g>,%.7g,\n' % (co[0], co[1], co[2], abs(hDiameter)))
+ #file.write('<%.6g,%.6g,%.6g>,%.7g' % (particle.location[0], particle.location[1], particle.location[2], abs(hDiameter))) # Useless because particle location is the tip, not the root.
+ #file.write(',\n')
+ #controlPointCounter += 1
+ #totalNumberOfHairs += len(pSys.particles)# len(particle.hair_keys)
+
+ # Each control point is written out, along with the radius of the
+ # hair at that point.
+ file.write('<%.6g,%.6g,%.6g>,%.7g' % (co[0], co[1], co[2], abs(hDiameter)))
+
+ # All coordinates except the last need a following comma.
+
+ if step != steps - 1:
+ file.write(',\n')
+ else:
+ if texturedHair:
+ # Write pigment and alpha (between Pov and Blender alpha 0 and 1 are reversed)
+ file.write('\npigment{ color srgbf < %.3g, %.3g, %.3g, %.3g> }\n' %(initColor[0], initColor[1], initColor[2], 1.0-initColor[3]))
+ # End the sphere_sweep declaration for this hair
+ file.write('}\n')
+
+ # All but the final sphere_sweep (each array element) needs a terminating comma.
+ if pindex != totalNumberOfHairs:
file.write(',\n')
else:
- if texturedHair:
- # Write pigment and alpha (between Pov and Blender alpha 0 and 1 are reversed)
- file.write('\npigment{ color srgbf < %.3g, %.3g, %.3g, %.3g> }\n' %(initColor[0], initColor[1], initColor[2], 1.0-initColor[3]))
- # End the sphere_sweep declaration for this hair
- file.write('}\n')
-
- # All but the final sphere_sweep (each array element) needs a terminating comma.
- if pindex != totalNumberOfHairs:
- file.write(',\n')
- else:
- file.write('\n')
+ file.write('\n')
- # End the array declaration.
+ # End the array declaration.
- file.write('}\n')
- file.write('\n')
-
- if not texturedHair:
- # Pick up the hair material diffuse color and create a default POV-Ray hair texture.
-
- file.write('#ifndef (HairTexture)\n')
- file.write(' #declare HairTexture = texture {\n')
- file.write(' pigment {srgbt <%s,%s,%s,%s>}\n' % (pmaterial.diffuse_color[0], pmaterial.diffuse_color[1], pmaterial.diffuse_color[2], (pmaterial.strand.width_fade + 0.05)))
- file.write(' }\n')
- file.write('#end\n')
+ file.write('}\n')
file.write('\n')
- # Dynamically create a union of the hairstrands (or a subset of them).
- # By default use every hairstrand, commented line is for hand tweaking test renders.
- file.write('//Increasing HairStep divides the amount of hair for test renders.\n')
- file.write('#ifndef(HairStep) #declare HairStep = 1; #end\n')
- file.write('union{\n')
- file.write(' #local I = 0;\n')
- file.write(' #while (I < %i)\n' % totalNumberOfHairs)
- file.write(' object {HairArray[I]')
- if not texturedHair:
- file.write(' texture{HairTexture}\n')
- else:
- file.write('\n')
- # Translucency of the hair:
- file.write(' hollow\n')
- file.write(' double_illuminate\n')
- file.write(' interior {\n')
- file.write(' ior 1.45\n')
- file.write(' media {\n')
- file.write(' scattering { 1, 10*<0.73, 0.35, 0.15> /*extinction 0*/ }\n')
- file.write(' absorption 10/<0.83, 0.75, 0.15>\n')
- file.write(' samples 1\n')
- file.write(' method 2\n')
- file.write(' density {cylindrical\n')
- file.write(' color_map {\n')
- file.write(' [0.0 rgb <0.83, 0.45, 0.35>]\n')
- file.write(' [0.5 rgb <0.8, 0.8, 0.4>]\n')
- file.write(' [1.0 rgb <1,1,1>]\n')
- file.write(' }\n')
- file.write(' }\n')
- file.write(' }\n')
- file.write(' }\n')
- file.write(' }\n')
-
- file.write(' #local I = I + HairStep;\n')
- file.write(' #end\n')
-
- writeMatrix(global_matrix @ ob.matrix_world)
-
-
- file.write('}')
- print('Totals hairstrands written: %i' % totalNumberOfHairs)
- print('Number of tufts (particle systems)', len(ob.particle_systems))
-
- # Set back the displayed number of particles to preview count
- pSys.set_resolution(scene, ob, 'PREVIEW')
-
- if renderEmitter == False:
- continue #don't render mesh, skip to next object.
-
- #############################################
- # Generating a name for object just like materials to be able to use it
- # (baking for now or anything else).
- # XXX I don't understand that if we are here, sel if a non-empty iterable,
- # so this condition is always True, IMO -- mont29
- if ob.data:
- name_orig = "OB" + ob.name
- dataname_orig = "DATA" + ob.data.name
- elif ob.is_instancer:
- if ob.instance_type == 'COLLECTION':
+ if not texturedHair:
+ # Pick up the hair material diffuse color and create a default POV-Ray hair texture.
+
+ file.write('#ifndef (HairTexture)\n')
+ file.write(' #declare HairTexture = texture {\n')
+ file.write(' pigment {srgbt <%s,%s,%s,%s>}\n' % (pmaterial.diffuse_color[0], pmaterial.diffuse_color[1], pmaterial.diffuse_color[2], (pmaterial.strand.width_fade + 0.05)))
+ file.write(' }\n')
+ file.write('#end\n')
+ file.write('\n')
+
+ # Dynamically create a union of the hairstrands (or a subset of them).
+ # By default use every hairstrand, commented line is for hand tweaking test renders.
+ file.write('//Increasing HairStep divides the amount of hair for test renders.\n')
+ file.write('#ifndef(HairStep) #declare HairStep = 1; #end\n')
+ file.write('union{\n')
+ file.write(' #local I = 0;\n')
+ file.write(' #while (I < %i)\n' % totalNumberOfHairs)
+ file.write(' object {HairArray[I]')
+ if not texturedHair:
+ file.write(' texture{HairTexture}\n')
+ else:
+ file.write('\n')
+ # Translucency of the hair:
+ file.write(' hollow\n')
+ file.write(' double_illuminate\n')
+ file.write(' interior {\n')
+ file.write(' ior 1.45\n')
+ file.write(' media {\n')
+ file.write(' scattering { 1, 10*<0.73, 0.35, 0.15> /*extinction 0*/ }\n')
+ file.write(' absorption 10/<0.83, 0.75, 0.15>\n')
+ file.write(' samples 1\n')
+ file.write(' method 2\n')
+ file.write(' density {cylindrical\n')
+ file.write(' color_map {\n')
+ file.write(' [0.0 rgb <0.83, 0.45, 0.35>]\n')
+ file.write(' [0.5 rgb <0.8, 0.8, 0.4>]\n')
+ file.write(' [1.0 rgb <1,1,1>]\n')
+ file.write(' }\n')
+ file.write(' }\n')
+ file.write(' }\n')
+ file.write(' }\n')
+ file.write(' }\n')
+
+ file.write(' #local I = I + HairStep;\n')
+ file.write(' #end\n')
+
+ writeMatrix(global_matrix @ ob.matrix_world)
+
+
+ file.write('}')
+ print('Totals hairstrands written: %i' % totalNumberOfHairs)
+ print('Number of tufts (particle systems)', len(ob.particle_systems))
+
+ # Set back the displayed number of particles to preview count
+ pSys.set_resolution(scene, ob, 'PREVIEW')
+
+ if renderEmitter == False:
+ continue #don't render mesh, skip to next object.
+
+ #############################################
+ # Generating a name for object just like materials to be able to use it
+ # (baking for now or anything else).
+ # XXX I don't understand that if we are here, sel if a non-empty iterable,
+ # so this condition is always True, IMO -- mont29
+ if ob.data:
name_orig = "OB" + ob.name
- dataname_orig = "DATA" + ob.instance_collection.name
+ dataname_orig = "DATA" + ob.data.name
+ elif ob.is_instancer:
+ if ob.instance_type == 'COLLECTION':
+ name_orig = "OB" + ob.name
+ dataname_orig = "DATA" + ob.instance_collection.name
+ else:
+ #hoping only dupligroups have several source datablocks
+ #ob_dupli_list_create(scene) #deprecated in 2.8
+ depsgraph = bpy.context.evaluated_depsgraph_get()
+ for eachduplicate in depsgraph.object_instances:
+ if eachduplicate.is_instance: # Real dupli instance filtered because original included in list since 2.8
+ dataname_orig = "DATA" + eachduplicate.object.name
+ #ob.dupli_list_clear() #just don't store any reference to instance since 2.8
+ elif ob.type == 'EMPTY':
+ name_orig = "OB" + ob.name
+ dataname_orig = "DATA" + ob.name
else:
- #hoping only dupligroups have several source datablocks
- ob.dupli_list_create(scene)
- for eachduplicate in ob.dupli_list:
- dataname_orig = "DATA" + eachduplicate.object.name
- ob.dupli_list_clear()
- elif ob.type == 'EMPTY':
- name_orig = "OB" + ob.name
- dataname_orig = "DATA" + ob.name
- else:
- name_orig = DEF_OBJ_NAME
- dataname_orig = DEF_OBJ_NAME
- name = string_strip_hyphen(bpy.path.clean_name(name_orig))
- dataname = string_strip_hyphen(bpy.path.clean_name(dataname_orig))
- ## for slot in ob.material_slots:
- ## if slot.material is not None and slot.link == 'OBJECT':
- ## obmaterial = slot.material
-
- #############################################
-
- if info_callback:
- info_callback("Object %2.d of %2.d (%s)" % (ob_num, len(sel), ob.name))
-
- #if ob.type != 'MESH':
- # continue
- # me = ob.data
-
- matrix = global_matrix @ ob.matrix_world
- povdataname = store(scene, ob, name, dataname, matrix)
- if povdataname is None:
- print("This is an instance of " + name)
- continue
+ name_orig = DEF_OBJ_NAME
+ dataname_orig = DEF_OBJ_NAME
+ name = string_strip_hyphen(bpy.path.clean_name(name_orig))
+ dataname = string_strip_hyphen(bpy.path.clean_name(dataname_orig))
+ ## for slot in ob.material_slots:
+ ## if slot.material is not None and slot.link == 'OBJECT':
+ ## obmaterial = slot.material
+
+ #############################################
+
+ if info_callback:
+ info_callback("Object %2.d of %2.d (%s)" % (ob_num, len(sel), ob.name))
+
+ #if ob.type != 'MESH':
+ # continue
+ # me = ob.data
+
+ matrix = global_matrix @ ob.matrix_world
+ povdataname = store(scene, ob, name, dataname, matrix)
+ if povdataname is None:
+ print("This is an instance of " + name)
+ continue
- print("Writing Down First Occurrence of " + name)
+ print("Writing Down First Occurrence of " + name)
+
+ ############################################Povray Primitives
+ # special exportCurves() function takes care of writing
+ # lathe, sphere_sweep, birail, and loft except with modifiers
+ # converted to mesh
+ if not ob.is_modified(scene, 'RENDER'):
+ if ob.type == 'CURVE' and (ob.pov.curveshape in
+ {'lathe', 'sphere_sweep', 'loft'}):
+ continue #Don't render proxy mesh, skip to next object
+
+ if ob.pov.object_as == 'ISOSURFACE':
+ tabWrite("#declare %s = isosurface{ \n"% povdataname)
+ tabWrite("function{ \n")
+ textName = ob.pov.iso_function_text
+ if textName:
+ node_tree = bpy.context.scene.node_tree
+ for node in node_tree.nodes:
+ if node.bl_idname == "IsoPropsNode" and node.label == ob.name:
+ for inp in node.inputs:
+ if inp:
+ tabWrite("#declare %s = %.6g;\n"%(inp.name,inp.default_value))
+
+ text = bpy.data.texts[textName]
+ for line in text.lines:
+ split = line.body.split()
+ if split[0] != "#declare":
+ tabWrite("%s\n"%line.body)
+ else:
+ tabWrite("abs(x) - 2 + y")
+ tabWrite("}\n")
+ tabWrite("threshold %.6g\n"%ob.pov.threshold)
+ tabWrite("max_gradient %.6g\n"%ob.pov.max_gradient)
+ tabWrite("accuracy %.6g\n"%ob.pov.accuracy)
+ tabWrite("contained_by { ")
+ if ob.pov.contained_by == "sphere":
+ tabWrite("sphere {0,%.6g}}\n"%ob.pov.container_scale)
+ else:
+ tabWrite("box {-%.6g,%.6g}}\n"%(ob.pov.container_scale,ob.pov.container_scale))
+ if ob.pov.all_intersections:
+ tabWrite("all_intersections\n")
+ else:
+ if ob.pov.max_trace > 1:
+ tabWrite("max_trace %.6g\n"%ob.pov.max_trace)
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ tabWrite("scale %.6g\n"%(1/ob.pov.container_scale))
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
-############################################Povray Primitives
- # special exportCurves() function takes care of writing
- # lathe, sphere_sweep, birail, and loft except with modifiers
- # converted to mesh
- if not ob.is_modified(scene, 'RENDER'):
- if ob.type == 'CURVE' and (ob.pov.curveshape in
- {'lathe', 'sphere_sweep', 'loft'}):
+ if ob.pov.object_as == 'SUPERELLIPSOID':
+ tabWrite("#declare %s = superellipsoid{ <%.4f,%.4f>\n"%(povdataname,ob.pov.se_n2,ob.pov.se_n1))
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ write_object_modifiers(scene,ob,file)
+ tabWrite("}\n")
continue #Don't render proxy mesh, skip to next object
- if ob.pov.object_as == 'ISOSURFACE':
- tabWrite("#declare %s = isosurface{ \n"% povdataname)
- tabWrite("function{ \n")
- textName = ob.pov.iso_function_text
- if textName:
- node_tree = bpy.context.scene.node_tree
- for node in node_tree.nodes:
- if node.bl_idname == "IsoPropsNode" and node.label == ob.name:
- for inp in node.inputs:
- if inp:
- tabWrite("#declare %s = %.6g;\n"%(inp.name,inp.default_value))
-
- text = bpy.data.texts[textName]
- for line in text.lines:
- split = line.body.split()
- if split[0] != "#declare":
- tabWrite("%s\n"%line.body)
- else:
- tabWrite("abs(x) - 2 + y")
- tabWrite("}\n")
- tabWrite("threshold %.6g\n"%ob.pov.threshold)
- tabWrite("max_gradient %.6g\n"%ob.pov.max_gradient)
- tabWrite("accuracy %.6g\n"%ob.pov.accuracy)
- tabWrite("contained_by { ")
- if ob.pov.contained_by == "sphere":
- tabWrite("sphere {0,%.6g}}\n"%ob.pov.container_scale)
- else:
- tabWrite("box {-%.6g,%.6g}}\n"%(ob.pov.container_scale,ob.pov.container_scale))
- if ob.pov.all_intersections:
- tabWrite("all_intersections\n")
- else:
- if ob.pov.max_trace > 1:
- tabWrite("max_trace %.6g\n"%ob.pov.max_trace)
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- tabWrite("scale %.6g\n"%(1/ob.pov.container_scale))
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
- if ob.pov.object_as == 'SUPERELLIPSOID':
- tabWrite("#declare %s = superellipsoid{ <%.4f,%.4f>\n"%(povdataname,ob.pov.se_n2,ob.pov.se_n1))
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- write_object_modifiers(scene,ob,file)
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
-
-
- if ob.pov.object_as == 'SUPERTORUS':
- rMajor = ob.pov.st_major_radius
- rMinor = ob.pov.st_minor_radius
- ring = ob.pov.st_ring
- cross = ob.pov.st_cross
- accuracy=ob.pov.st_accuracy
- gradient=ob.pov.st_max_gradient
- ############Inline Supertorus macro
- file.write("#macro Supertorus(RMj, RMn, MajorControl, MinorControl, Accuracy, MaxGradient)\n")
- file.write(" #local CP = 2/MinorControl;\n")
- file.write(" #local RP = 2/MajorControl;\n")
- file.write(" isosurface {\n")
- file.write(" function { pow( pow(abs(pow(pow(abs(x),RP) + pow(abs(z),RP), 1/RP) - RMj),CP) + pow(abs(y),CP) ,1/CP) - RMn }\n")
- file.write(" threshold 0\n")
- file.write(" contained_by {box {<-RMj-RMn,-RMn,-RMj-RMn>, < RMj+RMn, RMn, RMj+RMn>}}\n")
- file.write(" #if(MaxGradient >= 1)\n")
- file.write(" max_gradient MaxGradient\n")
- file.write(" #else\n")
- file.write(" evaluate 1, 10, 0.1\n")
- file.write(" #end\n")
- file.write(" accuracy Accuracy\n")
- file.write(" }\n")
- file.write("#end\n")
- ############
- tabWrite("#declare %s = object{ Supertorus( %.4g,%.4g,%.4g,%.4g,%.4g,%.4g)\n"%(povdataname,rMajor,rMinor,ring,cross,accuracy,gradient))
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- write_object_modifiers(scene,ob,file)
- tabWrite("rotate x*90\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
+ if ob.pov.object_as == 'SUPERTORUS':
+ rMajor = ob.pov.st_major_radius
+ rMinor = ob.pov.st_minor_radius
+ ring = ob.pov.st_ring
+ cross = ob.pov.st_cross
+ accuracy=ob.pov.st_accuracy
+ gradient=ob.pov.st_max_gradient
+ ############Inline Supertorus macro
+ file.write("#macro Supertorus(RMj, RMn, MajorControl, MinorControl, Accuracy, MaxGradient)\n")
+ file.write(" #local CP = 2/MinorControl;\n")
+ file.write(" #local RP = 2/MajorControl;\n")
+ file.write(" isosurface {\n")
+ file.write(" function { pow( pow(abs(pow(pow(abs(x),RP) + pow(abs(z),RP), 1/RP) - RMj),CP) + pow(abs(y),CP) ,1/CP) - RMn }\n")
+ file.write(" threshold 0\n")
+ file.write(" contained_by {box {<-RMj-RMn,-RMn,-RMj-RMn>, < RMj+RMn, RMn, RMj+RMn>}}\n")
+ file.write(" #if(MaxGradient >= 1)\n")
+ file.write(" max_gradient MaxGradient\n")
+ file.write(" #else\n")
+ file.write(" evaluate 1, 10, 0.1\n")
+ file.write(" #end\n")
+ file.write(" accuracy Accuracy\n")
+ file.write(" }\n")
+ file.write("#end\n")
+ ############
+ tabWrite("#declare %s = object{ Supertorus( %.4g,%.4g,%.4g,%.4g,%.4g,%.4g)\n"%(povdataname,rMajor,rMinor,ring,cross,accuracy,gradient))
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ write_object_modifiers(scene,ob,file)
+ tabWrite("rotate x*90\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- if ob.pov.object_as == 'PLANE':
- tabWrite("#declare %s = plane{ <0,0,1>,1\n"%povdataname)
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- write_object_modifiers(scene,ob,file)
- #tabWrite("rotate x*90\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
+ if ob.pov.object_as == 'PLANE':
+ tabWrite("#declare %s = plane{ <0,0,1>,1\n"%povdataname)
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ write_object_modifiers(scene,ob,file)
+ #tabWrite("rotate x*90\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- if ob.pov.object_as == 'BOX':
- tabWrite("#declare %s = box { -1,1\n"%povdataname)
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- write_object_modifiers(scene,ob,file)
- #tabWrite("rotate x*90\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
-
-
- if ob.pov.object_as == 'CONE':
- br = ob.pov.cone_base_radius
- cr = ob.pov.cone_cap_radius
- bz = ob.pov.cone_base_z
- cz = ob.pov.cone_cap_z
- tabWrite("#declare %s = cone { <0,0,%.4f>,%.4f,<0,0,%.4f>,%.4f\n"%(povdataname,bz,br,cz,cr))
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- write_object_modifiers(scene,ob,file)
- #tabWrite("rotate x*90\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
-
- if ob.pov.object_as == 'CYLINDER':
- r = ob.pov.cylinder_radius
- x2 = ob.pov.cylinder_location_cap[0]
- y2 = ob.pov.cylinder_location_cap[1]
- z2 = ob.pov.cylinder_location_cap[2]
- tabWrite("#declare %s = cylinder { <0,0,0>,<%6f,%6f,%6f>,%6f\n"%(
- povdataname,
- x2,
- y2,
- z2,
- r))
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- #cylinders written at origin, translated below
- write_object_modifiers(scene,ob,file)
- #tabWrite("rotate x*90\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
-
-
- if ob.pov.object_as == 'HEIGHT_FIELD':
- data = ""
- filename = ob.pov.hf_filename
- data += '"%s"'%filename
- gamma = ' gamma %.4f'%ob.pov.hf_gamma
- data += gamma
- if ob.pov.hf_premultiplied:
- data += ' premultiplied on'
- if ob.pov.hf_smooth:
- data += ' smooth'
- if ob.pov.hf_water > 0:
- data += ' water_level %.4f'%ob.pov.hf_water
- #hierarchy = ob.pov.hf_hierarchy
- tabWrite('#declare %s = height_field { %s\n'%(povdataname,data))
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- write_object_modifiers(scene,ob,file)
- tabWrite("rotate x*90\n")
- tabWrite("translate <-0.5,0.5,0>\n")
- tabWrite("scale <0,-1,0>\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
+ if ob.pov.object_as == 'BOX':
+ tabWrite("#declare %s = box { -1,1\n"%povdataname)
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ write_object_modifiers(scene,ob,file)
+ #tabWrite("rotate x*90\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- if ob.pov.object_as == 'SPHERE':
+ if ob.pov.object_as == 'CONE':
+ br = ob.pov.cone_base_radius
+ cr = ob.pov.cone_cap_radius
+ bz = ob.pov.cone_base_z
+ cz = ob.pov.cone_cap_z
+ tabWrite("#declare %s = cone { <0,0,%.4f>,%.4f,<0,0,%.4f>,%.4f\n"%(povdataname,bz,br,cz,cr))
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ write_object_modifiers(scene,ob,file)
+ #tabWrite("rotate x*90\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- tabWrite("#declare %s = sphere { 0,%6f\n"%(povdataname,ob.pov.sphere_radius))
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- write_object_modifiers(scene,ob,file)
- #tabWrite("rotate x*90\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
+ if ob.pov.object_as == 'CYLINDER':
+ r = ob.pov.cylinder_radius
+ x2 = ob.pov.cylinder_location_cap[0]
+ y2 = ob.pov.cylinder_location_cap[1]
+ z2 = ob.pov.cylinder_location_cap[2]
+ tabWrite("#declare %s = cylinder { <0,0,0>,<%6f,%6f,%6f>,%6f\n"%(
+ povdataname,
+ x2,
+ y2,
+ z2,
+ r))
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ #cylinders written at origin, translated below
+ write_object_modifiers(scene,ob,file)
+ #tabWrite("rotate x*90\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- if ob.pov.object_as == 'TORUS':
- tabWrite("#declare %s = torus { %.4f,%.4f\n"%(povdataname,ob.pov.torus_major_radius,ob.pov.torus_minor_radius))
- povMatName = "Default_texture"
- if ob.active_material:
- #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
- try:
- material = ob.active_material
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
- #tabWrite("texture {%s}\n"%povMatName)
- write_object_modifiers(scene,ob,file)
- tabWrite("rotate x*90\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
+ if ob.pov.object_as == 'HEIGHT_FIELD':
+ data = ""
+ filename = ob.pov.hf_filename
+ data += '"%s"'%filename
+ gamma = ' gamma %.4f'%ob.pov.hf_gamma
+ data += gamma
+ if ob.pov.hf_premultiplied:
+ data += ' premultiplied on'
+ if ob.pov.hf_smooth:
+ data += ' smooth'
+ if ob.pov.hf_water > 0:
+ data += ' water_level %.4f'%ob.pov.hf_water
+ #hierarchy = ob.pov.hf_hierarchy
+ tabWrite('#declare %s = height_field { %s\n'%(povdataname,data))
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ write_object_modifiers(scene,ob,file)
+ tabWrite("rotate x*90\n")
+ tabWrite("translate <-0.5,0.5,0>\n")
+ tabWrite("scale <0,-1,0>\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- if ob.pov.object_as == 'PARAMETRIC':
- tabWrite("#declare %s = parametric {\n"%povdataname)
- tabWrite("function { %s }\n"%ob.pov.x_eq)
- tabWrite("function { %s }\n"%ob.pov.y_eq)
- tabWrite("function { %s }\n"%ob.pov.z_eq)
- tabWrite("<%.4f,%.4f>, <%.4f,%.4f>\n"%(ob.pov.u_min,ob.pov.v_min,ob.pov.u_max,ob.pov.v_max))
- if ob.pov.contained_by == "sphere":
- tabWrite("contained_by { sphere{0, 2} }\n")
- else:
- tabWrite("contained_by { box{-2, 2} }\n")
- tabWrite("max_gradient %.6f\n"%ob.pov.max_gradient)
- tabWrite("accuracy %.6f\n"%ob.pov.accuracy)
- tabWrite("precompute 10 x,y,z\n")
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
-
- if ob.pov.object_as == 'POLYCIRCLE':
- #TODO write below macro Once:
- #if write_polytocircle_macro_once == 0:
- file.write("/****************************\n")
- file.write("This macro was written by 'And'.\n")
- file.write("Link:(http://news.povray.org/povray.binaries.scene-files/)\n")
- file.write("****************************/\n")
- file.write("//from math.inc:\n")
- file.write("#macro VPerp_Adjust(V, Axis)\n")
- file.write(" vnormalize(vcross(vcross(Axis, V), Axis))\n")
- file.write("#end\n")
- file.write("//Then for the actual macro\n")
- file.write("#macro Shape_Slice_Plane_2P_1V(point1, point2, clip_direct)\n")
- file.write("#local p1 = point1 + <0,0,0>;\n")
- file.write("#local p2 = point2 + <0,0,0>;\n")
- file.write("#local clip_v = vnormalize(clip_direct + <0,0,0>);\n")
- file.write("#local direct_v1 = vnormalize(p2 - p1);\n")
- file.write("#if(vdot(direct_v1, clip_v) = 1)\n")
- file.write(' #error "Shape_Slice_Plane_2P_1V error: Can\'t decide plane"\n')
- file.write("#end\n\n")
- file.write("#local norm = -vnormalize(clip_v - direct_v1*vdot(direct_v1,clip_v));\n")
- file.write("#local d = vdot(norm, p1);\n")
- file.write("plane{\n")
- file.write("norm, d\n")
- file.write("}\n")
- file.write("#end\n\n")
- file.write("//polygon to circle\n")
- file.write("#macro Shape_Polygon_To_Circle_Blending(_polygon_n, _side_face, _polygon_circumscribed_radius, _circle_radius, _height)\n")
- file.write("#local n = int(_polygon_n);\n")
- file.write("#if(n < 3)\n")
- file.write(" #error ""\n")
- file.write("#end\n\n")
- file.write("#local front_v = VPerp_Adjust(_side_face, z);\n")
- file.write("#if(vdot(front_v, x) >= 0)\n")
- file.write(" #local face_ang = acos(vdot(-y, front_v));\n")
- file.write("#else\n")
- file.write(" #local face_ang = -acos(vdot(-y, front_v));\n")
- file.write("#end\n")
- file.write("#local polyg_ext_ang = 2*pi/n;\n")
- file.write("#local polyg_outer_r = _polygon_circumscribed_radius;\n")
- file.write("#local polyg_inner_r = polyg_outer_r*cos(polyg_ext_ang/2);\n")
- file.write("#local cycle_r = _circle_radius;\n")
- file.write("#local h = _height;\n")
- file.write("#if(polyg_outer_r < 0 | cycle_r < 0 | h <= 0)\n")
- file.write(' #error "error: each side length must be positive"\n')
- file.write("#end\n\n")
- file.write("#local multi = 1000;\n")
- file.write("#local poly_obj =\n")
- file.write("polynomial{\n")
- file.write("4,\n")
- file.write("xyz(0,2,2): multi*1,\n")
- file.write("xyz(2,0,1): multi*2*h,\n")
- file.write("xyz(1,0,2): multi*2*(polyg_inner_r-cycle_r),\n")
- file.write("xyz(2,0,0): multi*(-h*h),\n")
- file.write("xyz(0,0,2): multi*(-pow(cycle_r - polyg_inner_r, 2)),\n")
- file.write("xyz(1,0,1): multi*2*h*(-2*polyg_inner_r + cycle_r),\n")
- file.write("xyz(1,0,0): multi*2*h*h*polyg_inner_r,\n")
- file.write("xyz(0,0,1): multi*2*h*polyg_inner_r*(polyg_inner_r - cycle_r),\n")
- file.write("xyz(0,0,0): multi*(-pow(polyg_inner_r*h, 2))\n")
- file.write("sturm\n")
- file.write("}\n\n")
- file.write("#local mockup1 =\n")
- file.write("difference{\n")
- file.write(" cylinder{\n")
- file.write(" <0,0,0.0>,<0,0,h>, max(polyg_outer_r, cycle_r)\n")
- file.write(" }\n\n")
- file.write(" #for(i, 0, n-1)\n")
- file.write(" object{\n")
- file.write(" poly_obj\n")
- file.write(" inverse\n")
- file.write(" rotate <0, 0, -90 + degrees(polyg_ext_ang*i)>\n")
- file.write(" }\n")
- file.write(" object{\n")
- file.write(" Shape_Slice_Plane_2P_1V(<polyg_inner_r,0,0>,<cycle_r,0,h>,x)\n")
- file.write(" rotate <0, 0, -90 + degrees(polyg_ext_ang*i)>\n")
- file.write(" }\n")
- file.write(" #end\n")
- file.write("}\n\n")
- file.write("object{\n")
- file.write("mockup1\n")
- file.write("rotate <0, 0, degrees(face_ang)>\n")
- file.write("}\n")
- file.write("#end\n")
- #Use the macro
- ngon = ob.pov.polytocircle_ngon
- ngonR = ob.pov.polytocircle_ngonR
- circleR = ob.pov.polytocircle_circleR
- tabWrite("#declare %s = object { Shape_Polygon_To_Circle_Blending(%s, z, %.4f, %.4f, 2) rotate x*180 translate z*1\n"%(povdataname,ngon,ngonR,circleR))
- tabWrite("}\n")
- continue #Don't render proxy mesh, skip to next object
+ if ob.pov.object_as == 'SPHERE':
-############################################else try to export mesh
- elif ob.is_instancer == False: #except duplis which should be instances groups for now but all duplis later
- if ob.type == 'EMPTY':
- tabWrite("\n//dummy sphere to represent Empty location\n")
- tabWrite("#declare %s =sphere {<0, 0, 0>,0 pigment{rgbt 1} no_image no_reflection no_radiosity photons{pass_through collect off} hollow}\n" % povdataname)
+ tabWrite("#declare %s = sphere { 0,%6f\n"%(povdataname,ob.pov.sphere_radius))
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ write_object_modifiers(scene,ob,file)
+ #tabWrite("rotate x*90\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- # TODO(sergey): PovRay is a render engine, so should be using dependency graph
- # which was given to it via render engine API.
- depsgraph = bpy.context.evaluated_depsgraph_get()
- ob_eval = ob.evaluated_get(depsgraph)
- try:
- me = ob_eval.to_mesh()
+ if ob.pov.object_as == 'TORUS':
+ tabWrite("#declare %s = torus { %.4f,%.4f\n"%(povdataname,ob.pov.torus_major_radius,ob.pov.torus_minor_radius))
+ povMatName = "Default_texture"
+ if ob.active_material:
+ #povMatName = string_strip_hyphen(bpy.path.clean_name(ob.active_material.name))
+ try:
+ material = ob.active_material
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+ #tabWrite("texture {%s}\n"%povMatName)
+ write_object_modifiers(scene,ob,file)
+ tabWrite("rotate x*90\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- #XXX Here? identify the specific exception for mesh object with no data
- #XXX So that we can write something for the dataname !
- except:
- # also happens when curves cant be made into meshes because of no-data
- continue
+ if ob.pov.object_as == 'PARAMETRIC':
+ tabWrite("#declare %s = parametric {\n"%povdataname)
+ tabWrite("function { %s }\n"%ob.pov.x_eq)
+ tabWrite("function { %s }\n"%ob.pov.y_eq)
+ tabWrite("function { %s }\n"%ob.pov.z_eq)
+ tabWrite("<%.4f,%.4f>, <%.4f,%.4f>\n"%(ob.pov.u_min,ob.pov.v_min,ob.pov.u_max,ob.pov.v_max))
+ if ob.pov.contained_by == "sphere":
+ tabWrite("contained_by { sphere{0, 2} }\n")
+ else:
+ tabWrite("contained_by { box{-2, 2} }\n")
+ tabWrite("max_gradient %.6f\n"%ob.pov.max_gradient)
+ tabWrite("accuracy %.6f\n"%ob.pov.accuracy)
+ tabWrite("precompute 10 x,y,z\n")
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- importance = ob.pov.importance_value
- if me:
- me.calc_loop_triangles()
- me_materials = me.materials
- me_faces = me.loop_triangles[:]
- #if len(me_faces)==0:
- #tabWrite("\n//dummy sphere to represent empty mesh location\n")
- #tabWrite("#declare %s =sphere {<0, 0, 0>,0 pigment{rgbt 1} no_image no_reflection no_radiosity photons{pass_through collect off} hollow}\n" % povdataname)
+ if ob.pov.object_as == 'POLYCIRCLE':
+ #TODO write below macro Once:
+ #if write_polytocircle_macro_once == 0:
+ file.write("/****************************\n")
+ file.write("This macro was written by 'And'.\n")
+ file.write("Link:(http://news.povray.org/povray.binaries.scene-files/)\n")
+ file.write("****************************/\n")
+ file.write("//from math.inc:\n")
+ file.write("#macro VPerp_Adjust(V, Axis)\n")
+ file.write(" vnormalize(vcross(vcross(Axis, V), Axis))\n")
+ file.write("#end\n")
+ file.write("//Then for the actual macro\n")
+ file.write("#macro Shape_Slice_Plane_2P_1V(point1, point2, clip_direct)\n")
+ file.write("#local p1 = point1 + <0,0,0>;\n")
+ file.write("#local p2 = point2 + <0,0,0>;\n")
+ file.write("#local clip_v = vnormalize(clip_direct + <0,0,0>);\n")
+ file.write("#local direct_v1 = vnormalize(p2 - p1);\n")
+ file.write("#if(vdot(direct_v1, clip_v) = 1)\n")
+ file.write(' #error "Shape_Slice_Plane_2P_1V error: Can\'t decide plane"\n')
+ file.write("#end\n\n")
+ file.write("#local norm = -vnormalize(clip_v - direct_v1*vdot(direct_v1,clip_v));\n")
+ file.write("#local d = vdot(norm, p1);\n")
+ file.write("plane{\n")
+ file.write("norm, d\n")
+ file.write("}\n")
+ file.write("#end\n\n")
+ file.write("//polygon to circle\n")
+ file.write("#macro Shape_Polygon_To_Circle_Blending(_polygon_n, _side_face, _polygon_circumscribed_radius, _circle_radius, _height)\n")
+ file.write("#local n = int(_polygon_n);\n")
+ file.write("#if(n < 3)\n")
+ file.write(" #error ""\n")
+ file.write("#end\n\n")
+ file.write("#local front_v = VPerp_Adjust(_side_face, z);\n")
+ file.write("#if(vdot(front_v, x) >= 0)\n")
+ file.write(" #local face_ang = acos(vdot(-y, front_v));\n")
+ file.write("#else\n")
+ file.write(" #local face_ang = -acos(vdot(-y, front_v));\n")
+ file.write("#end\n")
+ file.write("#local polyg_ext_ang = 2*pi/n;\n")
+ file.write("#local polyg_outer_r = _polygon_circumscribed_radius;\n")
+ file.write("#local polyg_inner_r = polyg_outer_r*cos(polyg_ext_ang/2);\n")
+ file.write("#local cycle_r = _circle_radius;\n")
+ file.write("#local h = _height;\n")
+ file.write("#if(polyg_outer_r < 0 | cycle_r < 0 | h <= 0)\n")
+ file.write(' #error "error: each side length must be positive"\n')
+ file.write("#end\n\n")
+ file.write("#local multi = 1000;\n")
+ file.write("#local poly_obj =\n")
+ file.write("polynomial{\n")
+ file.write("4,\n")
+ file.write("xyz(0,2,2): multi*1,\n")
+ file.write("xyz(2,0,1): multi*2*h,\n")
+ file.write("xyz(1,0,2): multi*2*(polyg_inner_r-cycle_r),\n")
+ file.write("xyz(2,0,0): multi*(-h*h),\n")
+ file.write("xyz(0,0,2): multi*(-pow(cycle_r - polyg_inner_r, 2)),\n")
+ file.write("xyz(1,0,1): multi*2*h*(-2*polyg_inner_r + cycle_r),\n")
+ file.write("xyz(1,0,0): multi*2*h*h*polyg_inner_r,\n")
+ file.write("xyz(0,0,1): multi*2*h*polyg_inner_r*(polyg_inner_r - cycle_r),\n")
+ file.write("xyz(0,0,0): multi*(-pow(polyg_inner_r*h, 2))\n")
+ file.write("sturm\n")
+ file.write("}\n\n")
+ file.write("#local mockup1 =\n")
+ file.write("difference{\n")
+ file.write(" cylinder{\n")
+ file.write(" <0,0,0.0>,<0,0,h>, max(polyg_outer_r, cycle_r)\n")
+ file.write(" }\n\n")
+ file.write(" #for(i, 0, n-1)\n")
+ file.write(" object{\n")
+ file.write(" poly_obj\n")
+ file.write(" inverse\n")
+ file.write(" rotate <0, 0, -90 + degrees(polyg_ext_ang*i)>\n")
+ file.write(" }\n")
+ file.write(" object{\n")
+ file.write(" Shape_Slice_Plane_2P_1V(<polyg_inner_r,0,0>,<cycle_r,0,h>,x)\n")
+ file.write(" rotate <0, 0, -90 + degrees(polyg_ext_ang*i)>\n")
+ file.write(" }\n")
+ file.write(" #end\n")
+ file.write("}\n\n")
+ file.write("object{\n")
+ file.write("mockup1\n")
+ file.write("rotate <0, 0, degrees(face_ang)>\n")
+ file.write("}\n")
+ file.write("#end\n")
+ #Use the macro
+ ngon = ob.pov.polytocircle_ngon
+ ngonR = ob.pov.polytocircle_ngonR
+ circleR = ob.pov.polytocircle_circleR
+ tabWrite("#declare %s = object { Shape_Polygon_To_Circle_Blending(%s, z, %.4f, %.4f, 2) rotate x*180 translate z*1\n"%(povdataname,ngon,ngonR,circleR))
+ tabWrite("}\n")
+ continue #Don't render proxy mesh, skip to next object
- if not me or not me_faces:
- tabWrite("\n//dummy sphere to represent empty mesh location\n")
- tabWrite("#declare %s =sphere {<0, 0, 0>,0 pigment{rgbt 1} no_image no_reflection no_radiosity photons{pass_through collect off} hollow}\n" % povdataname)
- continue
+ ############################################else try to export mesh
+ elif ob.is_instancer == False: #except duplis which should be instances groups for now but all duplis later
+ if ob.type == 'EMPTY':
+ tabWrite("\n//dummy sphere to represent Empty location\n")
+ tabWrite("#declare %s =sphere {<0, 0, 0>,0 pigment{rgbt 1} no_image no_reflection no_radiosity photons{pass_through collect off} hollow}\n" % povdataname)
- uv_layers = me.uv_layers
- if len(uv_layers) > 0:
- if me.uv_layers.active and uv_layers.active.data:
- uv_layer = uv_layers.active.data
- else:
- uv_layer = None
+ # TODO(sergey): PovRay is a render engine, so should be using dependency graph
+ # which was given to it via render engine API.
+ depsgraph = bpy.context.evaluated_depsgraph_get()
+ ob_eval = ob.evaluated_get(depsgraph)
+ try:
+ me = ob_eval.to_mesh()
- try:
- #vcol_layer = me.vertex_colors.active.data
- vcol_layer = me.vertex_colors.active.data
- except AttributeError:
- vcol_layer = None
+ #XXX Here? identify the specific exception for mesh object with no data
+ #XXX So that we can write something for the dataname !
+ except:
- faces_verts = [f.vertices[:] for f in me_faces]
- faces_normals = [f.normal[:] for f in me_faces]
- verts_normals = [v.normal[:] for v in me.vertices]
+ # also happens when curves cant be made into meshes because of no-data
+ continue
- # Use named declaration to allow reference e.g. for baking. MR
- file.write("\n")
- tabWrite("#declare %s =\n" % povdataname)
- tabWrite("mesh2 {\n")
- tabWrite("vertex_vectors {\n")
- tabWrite("%d" % len(me.vertices)) # vert count
-
- tabStr = tab * tabLevel
- for v in me.vertices:
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%.6f, %.6f, %.6f>" % v.co[:]) # vert count
- else:
- file.write(", ")
- file.write("<%.6f, %.6f, %.6f>" % v.co[:]) # vert count
- #tabWrite("<%.6f, %.6f, %.6f>" % v.co[:]) # vert count
- file.write("\n")
- tabWrite("}\n")
+ importance = ob.pov.importance_value
+ if me:
+ me.calc_loop_triangles()
+ me_materials = me.materials
+ me_faces = me.loop_triangles[:]
+ #if len(me_faces)==0:
+ #tabWrite("\n//dummy sphere to represent empty mesh location\n")
+ #tabWrite("#declare %s =sphere {<0, 0, 0>,0 pigment{rgbt 1} no_image no_reflection no_radiosity photons{pass_through collect off} hollow}\n" % povdataname)
- # Build unique Normal list
- uniqueNormals = {}
- for fi, f in enumerate(me_faces):
- fv = faces_verts[fi]
- # [-1] is a dummy index, use a list so we can modify in place
- if f.use_smooth: # Use vertex normals
- for v in fv:
- key = verts_normals[v]
- uniqueNormals[key] = [-1]
- else: # Use face normal
- key = faces_normals[fi]
- uniqueNormals[key] = [-1]
-
- tabWrite("normal_vectors {\n")
- tabWrite("%d" % len(uniqueNormals)) # vert count
- idx = 0
- tabStr = tab * tabLevel
- for no, index in uniqueNormals.items():
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%.6f, %.6f, %.6f>" % no) # vert count
+
+ if not me or not me_faces:
+ tabWrite("\n//dummy sphere to represent empty mesh location\n")
+ tabWrite("#declare %s =sphere {<0, 0, 0>,0 pigment{rgbt 1} no_image no_reflection no_radiosity photons{pass_through collect off} hollow}\n" % povdataname)
+ continue
+
+ uv_layers = me.uv_layers
+ if len(uv_layers) > 0:
+ if me.uv_layers.active and uv_layers.active.data:
+ uv_layer = uv_layers.active.data
else:
- file.write(", ")
- file.write("<%.6f, %.6f, %.6f>" % no) # vert count
- index[0] = idx
- idx += 1
- file.write("\n")
- tabWrite("}\n")
+ uv_layer = None
- # Vertex colors
- vertCols = {} # Use for material colors also.
+ try:
+ #vcol_layer = me.vertex_colors.active.data
+ vcol_layer = me.vertex_colors.active.data
+ except AttributeError:
+ vcol_layer = None
- if uv_layer:
- # Generate unique UV's
- uniqueUVs = {}
- #n = 0
- for f in me_faces: # me.faces in 2.7
- uvs = [uv_layer[l].uv[:] for l in f.loops]
+ faces_verts = [f.vertices[:] for f in me_faces]
+ faces_normals = [f.normal[:] for f in me_faces]
+ verts_normals = [v.normal[:] for v in me.vertices]
- for uv in uvs:
- uniqueUVs[uv[:]] = [-1]
+ # Use named declaration to allow reference e.g. for baking. MR
+ file.write("\n")
+ tabWrite("#declare %s =\n" % povdataname)
+ tabWrite("mesh2 {\n")
+ tabWrite("vertex_vectors {\n")
+ tabWrite("%d" % len(me.vertices)) # vert count
- tabWrite("uv_vectors {\n")
- #print unique_uvs
- tabWrite("%d" % len(uniqueUVs)) # vert count
- idx = 0
tabStr = tab * tabLevel
- for uv, index in uniqueUVs.items():
+ for v in me.vertices:
if linebreaksinlists:
file.write(",\n")
- file.write(tabStr + "<%.6f, %.6f>" % uv)
+ file.write(tabStr + "<%.6f, %.6f, %.6f>" % v.co[:]) # vert count
else:
file.write(", ")
- file.write("<%.6f, %.6f>" % uv)
- index[0] = idx
- idx += 1
- '''
- else:
- # Just add 1 dummy vector, no real UV's
- tabWrite('1') # vert count
- file.write(',\n\t\t<0.0, 0.0>')
- '''
+ file.write("<%.6f, %.6f, %.6f>" % v.co[:]) # vert count
+ #tabWrite("<%.6f, %.6f, %.6f>" % v.co[:]) # vert count
file.write("\n")
tabWrite("}\n")
- if me.vertex_colors:
- #Write down vertex colors as a texture for each vertex
- tabWrite("texture_list {\n")
- tabWrite("%d\n" % (len(me_faces) * 3)) # assumes we have only triangles
- VcolIdx=0
- if comments:
- file.write("\n //Vertex colors: one simple pigment texture per vertex\n")
+ # Build unique Normal list
+ uniqueNormals = {}
for fi, f in enumerate(me_faces):
- # annoying, index may be invalid
- material_index = f.material_index
- try:
- material = me_materials[material_index]
- except:
- material = None
- if material: #and material.use_vertex_color_paint: #Always use vertex color when there is some for now
-
- cols = [vcol_layer[l].color[:] for l in f.loops]
+ fv = faces_verts[fi]
+ # [-1] is a dummy index, use a list so we can modify in place
+ if f.use_smooth: # Use vertex normals
+ for v in fv:
+ key = verts_normals[v]
+ uniqueNormals[key] = [-1]
+ else: # Use face normal
+ key = faces_normals[fi]
+ uniqueNormals[key] = [-1]
- for col in cols:
- key = col[0], col[1], col[2], material_index # Material index!
- VcolIdx+=1
- vertCols[key] = [VcolIdx]
- if linebreaksinlists:
- tabWrite("texture {pigment{ color srgb <%6f,%6f,%6f> }}\n" % (col[0], col[1], col[2]))
- else:
- tabWrite("texture {pigment{ color srgb <%6f,%6f,%6f> }}" % (col[0], col[1], col[2]))
- tabStr = tab * tabLevel
+ tabWrite("normal_vectors {\n")
+ tabWrite("%d" % len(uniqueNormals)) # vert count
+ idx = 0
+ tabStr = tab * tabLevel
+ for no, index in uniqueNormals.items():
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%.6f, %.6f, %.6f>" % no) # vert count
else:
- if material:
- # Multiply diffuse with SSS Color
- if material.pov_subsurface_scattering.use:
- diffuse_color = [i * j for i, j in zip(material.pov_subsurface_scattering.color[:], material.diffuse_color[:])]
- key = diffuse_color[0], diffuse_color[1], diffuse_color[2], \
- material_index
- vertCols[key] = [-1]
- else:
- diffuse_color = material.diffuse_color[:]
- key = diffuse_color[0], diffuse_color[1], diffuse_color[2], \
- material_index
- vertCols[key] = [-1]
+ file.write(", ")
+ file.write("<%.6f, %.6f, %.6f>" % no) # vert count
+ index[0] = idx
+ idx += 1
+ file.write("\n")
+ tabWrite("}\n")
- tabWrite("\n}\n")
- # Face indices
- tabWrite("\nface_indices {\n")
- tabWrite("%d" % (len(me_faces))) # faces count
- tabStr = tab * tabLevel
+ # Vertex colors
+ vertCols = {} # Use for material colors also.
- for fi, f in enumerate(me_faces):
- fv = faces_verts[fi]
- material_index = f.material_index
+ if uv_layer:
+ # Generate unique UV's
+ uniqueUVs = {}
+ #n = 0
+ for f in me_faces: # me.faces in 2.7
+ uvs = [uv_layer[l].uv[:] for l in f.loops]
- if vcol_layer:
- cols = [vcol_layer[l].color[:] for l in f.loops]
+ for uv in uvs:
+ uniqueUVs[uv[:]] = [-1]
- if not me_materials or me_materials[material_index] is None: # No materials
+ tabWrite("uv_vectors {\n")
+ #print unique_uvs
+ tabWrite("%d" % len(uniqueUVs)) # vert count
+ idx = 0
+ tabStr = tab * tabLevel
+ for uv, index in uniqueUVs.items():
if linebreaksinlists:
file.write(",\n")
- # vert count
- file.write(tabStr + "<%d,%d,%d>" % (fv[0], fv[1], fv[2]))
+ file.write(tabStr + "<%.6f, %.6f>" % uv)
else:
file.write(", ")
- file.write("<%d,%d,%d>" % (fv[0], fv[1], fv[2])) # vert count
+ file.write("<%.6f, %.6f>" % uv)
+ index[0] = idx
+ idx += 1
+ '''
else:
- material = me_materials[material_index]
- if me.vertex_colors: #and material.use_vertex_color_paint:
- # Color per vertex - vertex color
-
- col1 = cols[0]
- col2 = cols[1]
- col3 = cols[2]
+ # Just add 1 dummy vector, no real UV's
+ tabWrite('1') # vert count
+ file.write(',\n\t\t<0.0, 0.0>')
+ '''
+ file.write("\n")
+ tabWrite("}\n")
- ci1 = vertCols[col1[0], col1[1], col1[2], material_index][0]
- ci2 = vertCols[col2[0], col2[1], col2[2], material_index][0]
- ci3 = vertCols[col3[0], col3[1], col3[2], material_index][0]
- else:
- # Color per material - flat material color
- if material.pov_subsurface_scattering.use:
- diffuse_color = [i * j for i, j in zip(material.pov_subsurface_scattering.color[:], material.diffuse_color[:])]
- else:
- diffuse_color = material.diffuse_color[:]
- ci1 = ci2 = ci3 = vertCols[diffuse_color[0], diffuse_color[1], \
- diffuse_color[2], f.material_index][0]
- # ci are zero based index so we'll subtract 1 from them
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%d,%d,%d>, %d,%d,%d" % \
- (fv[0], fv[1], fv[2], ci1-1, ci2-1, ci3-1)) # vert count
+ if me.vertex_colors:
+ #Write down vertex colors as a texture for each vertex
+ tabWrite("texture_list {\n")
+ tabWrite("%d\n" % (len(me_faces) * 3)) # assumes we have only triangles
+ VcolIdx=0
+ if comments:
+ file.write("\n //Vertex colors: one simple pigment texture per vertex\n")
+ for fi, f in enumerate(me_faces):
+ # annoying, index may be invalid
+ material_index = f.material_index
+ try:
+ material = me_materials[material_index]
+ except:
+ material = None
+ if material: #and material.use_vertex_color_paint: #Always use vertex color when there is some for now
+
+ cols = [vcol_layer[l].color[:] for l in f.loops]
+
+ for col in cols:
+ key = col[0], col[1], col[2], material_index # Material index!
+ VcolIdx+=1
+ vertCols[key] = [VcolIdx]
+ if linebreaksinlists:
+ tabWrite("texture {pigment{ color srgb <%6f,%6f,%6f> }}\n" % (col[0], col[1], col[2]))
+ else:
+ tabWrite("texture {pigment{ color srgb <%6f,%6f,%6f> }}" % (col[0], col[1], col[2]))
+ tabStr = tab * tabLevel
else:
- file.write(", ")
- file.write("<%d,%d,%d>, %d,%d,%d" % \
- (fv[0], fv[1], fv[2], ci1-1, ci2-1, ci3-1)) # vert count
+ if material:
+ # Multiply diffuse with SSS Color
+ if material.pov_subsurface_scattering.use:
+ diffuse_color = [i * j for i, j in zip(material.pov_subsurface_scattering.color[:], material.diffuse_color[:])]
+ key = diffuse_color[0], diffuse_color[1], diffuse_color[2], \
+ material_index
+ vertCols[key] = [-1]
+ else:
+ diffuse_color = material.diffuse_color[:]
+ key = diffuse_color[0], diffuse_color[1], diffuse_color[2], \
+ material_index
+ vertCols[key] = [-1]
+
+ tabWrite("\n}\n")
+ # Face indices
+ tabWrite("\nface_indices {\n")
+ tabWrite("%d" % (len(me_faces))) # faces count
+ tabStr = tab * tabLevel
- file.write("\n")
- tabWrite("}\n")
+ for fi, f in enumerate(me_faces):
+ fv = faces_verts[fi]
+ material_index = f.material_index
- # normal_indices indices
- tabWrite("normal_indices {\n")
- tabWrite("%d" % (len(me_faces))) # faces count
- tabStr = tab * tabLevel
- for fi, fv in enumerate(faces_verts):
+ if vcol_layer:
+ cols = [vcol_layer[l].color[:] for l in f.loops]
- if me_faces[fi].use_smooth:
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%d,%d,%d>" %\
- (uniqueNormals[verts_normals[fv[0]]][0],\
- uniqueNormals[verts_normals[fv[1]]][0],\
- uniqueNormals[verts_normals[fv[2]]][0])) # vert count
- else:
- file.write(", ")
- file.write("<%d,%d,%d>" %\
- (uniqueNormals[verts_normals[fv[0]]][0],\
- uniqueNormals[verts_normals[fv[1]]][0],\
- uniqueNormals[verts_normals[fv[2]]][0])) # vert count
- else:
- idx = uniqueNormals[faces_normals[fi]][0]
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%d,%d,%d>" % (idx, idx, idx)) # vert count
+ if not me_materials or me_materials[material_index] is None: # No materials
+ if linebreaksinlists:
+ file.write(",\n")
+ # vert count
+ file.write(tabStr + "<%d,%d,%d>" % (fv[0], fv[1], fv[2]))
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>" % (fv[0], fv[1], fv[2])) # vert count
else:
- file.write(", ")
- file.write("<%d,%d,%d>" % (idx, idx, idx)) # vert count
+ material = me_materials[material_index]
+ if me.vertex_colors: #and material.use_vertex_color_paint:
+ # Color per vertex - vertex color
- file.write("\n")
- tabWrite("}\n")
+ col1 = cols[0]
+ col2 = cols[1]
+ col3 = cols[2]
- if uv_layer:
- tabWrite("uv_indices {\n")
+ ci1 = vertCols[col1[0], col1[1], col1[2], material_index][0]
+ ci2 = vertCols[col2[0], col2[1], col2[2], material_index][0]
+ ci3 = vertCols[col3[0], col3[1], col3[2], material_index][0]
+ else:
+ # Color per material - flat material color
+ if material.pov_subsurface_scattering.use:
+ diffuse_color = [i * j for i, j in zip(material.pov_subsurface_scattering.color[:], material.diffuse_color[:])]
+ else:
+ diffuse_color = material.diffuse_color[:]
+ ci1 = ci2 = ci3 = vertCols[diffuse_color[0], diffuse_color[1], \
+ diffuse_color[2], f.material_index][0]
+ # ci are zero based index so we'll subtract 1 from them
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%d,%d,%d>, %d,%d,%d" % \
+ (fv[0], fv[1], fv[2], ci1-1, ci2-1, ci3-1)) # vert count
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>, %d,%d,%d" % \
+ (fv[0], fv[1], fv[2], ci1-1, ci2-1, ci3-1)) # vert count
+
+ file.write("\n")
+ tabWrite("}\n")
+
+ # normal_indices indices
+ tabWrite("normal_indices {\n")
tabWrite("%d" % (len(me_faces))) # faces count
tabStr = tab * tabLevel
- for f in me_faces:
- uvs = [uv_layer[l].uv[:] for l in f.loops]
+ for fi, fv in enumerate(faces_verts):
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%d,%d,%d>" % (
- uniqueUVs[uvs[0]][0],\
- uniqueUVs[uvs[1]][0],\
- uniqueUVs[uvs[2]][0]))
+ if me_faces[fi].use_smooth:
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%d,%d,%d>" %\
+ (uniqueNormals[verts_normals[fv[0]]][0],\
+ uniqueNormals[verts_normals[fv[1]]][0],\
+ uniqueNormals[verts_normals[fv[2]]][0])) # vert count
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>" %\
+ (uniqueNormals[verts_normals[fv[0]]][0],\
+ uniqueNormals[verts_normals[fv[1]]][0],\
+ uniqueNormals[verts_normals[fv[2]]][0])) # vert count
else:
- file.write(", ")
- file.write("<%d,%d,%d>" % (
- uniqueUVs[uvs[0]][0],\
- uniqueUVs[uvs[1]][0],\
- uniqueUVs[uvs[2]][0]))
+ idx = uniqueNormals[faces_normals[fi]][0]
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%d,%d,%d>" % (idx, idx, idx)) # vert count
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>" % (idx, idx, idx)) # vert count
file.write("\n")
tabWrite("}\n")
- #XXX BOOLEAN
- onceCSG = 0
- for mod in ob.modifiers:
- if onceCSG == 0:
- if mod :
- if mod.type == 'BOOLEAN':
- if ob.pov.boolean_mod == "POV":
- file.write("\tinside_vector <%.6g, %.6g, %.6g>\n" %
- (ob.pov.inside_vector[0],
- ob.pov.inside_vector[1],
- ob.pov.inside_vector[2]))
- onceCSG = 1
-
- if me.materials:
- try:
- material = me.materials[0] # dodgy
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
+ if uv_layer:
+ tabWrite("uv_indices {\n")
+ tabWrite("%d" % (len(me_faces))) # faces count
+ tabStr = tab * tabLevel
+ for f in me_faces:
+ uvs = [uv_layer[l].uv[:] for l in f.loops]
- # POV object modifiers such as
- # hollow / sturm / double_illuminate etc.
- write_object_modifiers(scene,ob,file)
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%d,%d,%d>" % (
+ uniqueUVs[uvs[0]][0],\
+ uniqueUVs[uvs[1]][0],\
+ uniqueUVs[uvs[2]][0]))
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>" % (
+ uniqueUVs[uvs[0]][0],\
+ uniqueUVs[uvs[1]][0],\
+ uniqueUVs[uvs[2]][0]))
- #Importance for radiosity sampling added here:
- tabWrite("radiosity { \n")
- tabWrite("importance %3g \n" % importance)
- tabWrite("}\n")
+ file.write("\n")
+ tabWrite("}\n")
- tabWrite("}\n") # End of mesh block
- else:
- facesMaterials = [] # WARNING!!!!!!!!!!!!!!!!!!!!!!
- if me_materials:
- for f in me_faces:
- if f.material_index not in facesMaterials:
- facesMaterials.append(f.material_index)
- # No vertex colors, so write material colors as vertex colors
- for i, material in enumerate(me_materials):
-
- if material and material.pov.material_use_nodes == False: # WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- # Multiply diffuse with SSS Color
- if material.pov_subsurface_scattering.use:
- diffuse_color = [i * j for i, j in zip(material.pov_subsurface_scattering.color[:], material.diffuse_color[:])]
- key = diffuse_color[0], diffuse_color[1], diffuse_color[2], i # i == f.mat
- vertCols[key] = [-1]
- else:
- diffuse_color = material.diffuse_color[:]
- key = diffuse_color[0], diffuse_color[1], diffuse_color[2], i # i == f.mat
- vertCols[key] = [-1]
-
- idx = 0
- LocalMaterialNames = []
- for col, index in vertCols.items():
- #if me_materials:
- mater = me_materials[col[3]]
- if me_materials is None: #XXX working?
- material_finish = DEF_MAT_NAME # not working properly,
- trans = 0.0
+ #XXX BOOLEAN
+ onceCSG = 0
+ for mod in ob.modifiers:
+ if onceCSG == 0:
+ if mod :
+ if mod.type == 'BOOLEAN':
+ if ob.pov.boolean_mod == "POV":
+ file.write("\tinside_vector <%.6g, %.6g, %.6g>\n" %
+ (ob.pov.inside_vector[0],
+ ob.pov.inside_vector[1],
+ ob.pov.inside_vector[2]))
+ onceCSG = 1
+
+ if me.materials:
+ try:
+ material = me.materials[0] # dodgy
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+
+ # POV object modifiers such as
+ # hollow / sturm / double_illuminate etc.
+ write_object_modifiers(scene,ob,file)
+
+ #Importance for radiosity sampling added here:
+ tabWrite("radiosity { \n")
+ tabWrite("importance %3g \n" % importance)
+ tabWrite("}\n")
- else:
- shading.writeTextureInfluence(mater, materialNames,
- LocalMaterialNames,
- path_image, lampCount,
- imageFormat, imgMap,
- imgMapTransforms,
- tabWrite, comments,
- string_strip_hyphen,
- safety, col, os, preview_dir, unpacked_images)
- ###################################################################
- index[0] = idx
- idx += 1
-
-
-
- # Vert Colors
- tabWrite("texture_list {\n")
- # In case there's is no material slot, give at least one texture
- #(an empty one so it uses pov default)
- if len(vertCols)==0:
- file.write(tabStr + "1")
+ tabWrite("}\n") # End of mesh block
else:
- file.write(tabStr + "%s" % (len(vertCols))) # vert count
+ facesMaterials = [] # WARNING!!!!!!!!!!!!!!!!!!!!!!
+ if me_materials:
+ for f in me_faces:
+ if f.material_index not in facesMaterials:
+ facesMaterials.append(f.material_index)
+ # No vertex colors, so write material colors as vertex colors
+ for i, material in enumerate(me_materials):
+
+ if material and material.pov.material_use_nodes == False: # WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ # Multiply diffuse with SSS Color
+ if material.pov_subsurface_scattering.use:
+ diffuse_color = [i * j for i, j in zip(material.pov_subsurface_scattering.color[:], material.diffuse_color[:])]
+ key = diffuse_color[0], diffuse_color[1], diffuse_color[2], i # i == f.mat
+ vertCols[key] = [-1]
+ else:
+ diffuse_color = material.diffuse_color[:]
+ key = diffuse_color[0], diffuse_color[1], diffuse_color[2], i # i == f.mat
+ vertCols[key] = [-1]
+ idx = 0
+ LocalMaterialNames = []
+ for col, index in vertCols.items():
+ #if me_materials:
+ mater = me_materials[col[3]]
+ if me_materials is None: #XXX working?
+ material_finish = DEF_MAT_NAME # not working properly,
+ trans = 0.0
+ else:
+ shading.writeTextureInfluence(mater, materialNames,
+ LocalMaterialNames,
+ path_image, lampCount,
+ imageFormat, imgMap,
+ imgMapTransforms,
+ tabWrite, comments,
+ string_strip_hyphen,
+ safety, col, os, preview_dir, unpacked_images)
+ ###################################################################
+ index[0] = idx
+ idx += 1
+
+
+
+ # Vert Colors
+ tabWrite("texture_list {\n")
+ # In case there's is no material slot, give at least one texture
+ #(an empty one so it uses pov default)
+ if len(vertCols)==0:
+ file.write(tabStr + "1")
+ else:
+ file.write(tabStr + "%s" % (len(vertCols))) # vert count
- # below "material" alias, added check ob.active_material
- # to avoid variable referenced before assignment error
- try:
- material = ob.active_material
- except IndexError:
- #when no material slot exists,
- material=None
-
- # WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- if material and ob.active_material is not None and material.pov.material_use_nodes == False:
- if material.pov.replacement_text != "":
- file.write("\n")
- file.write(" texture{%s}\n" % material.pov.replacement_text)
- else:
- # Loop through declared materials list
- for cMN in LocalMaterialNames:
- if material != "Default":
- file.write("\n texture{MAT_%s}\n" % cMN)
- #use string_strip_hyphen(materialNames[material]))
- #or Something like that to clean up the above?
- elif material and material.pov.material_use_nodes:
- for index in facesMaterials:
- faceMaterial = string_strip_hyphen(bpy.path.clean_name(me_materials[index].name))
- file.write("\n texture{%s}\n" % faceMaterial)
- # END!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- else:
- file.write(" texture{}\n")
- tabWrite("}\n")
-
- # Face indices
- tabWrite("face_indices {\n")
- tabWrite("%d" % (len(me_faces))) # faces count
- tabStr = tab * tabLevel
- for fi, f in enumerate(me_faces):
- fv = faces_verts[fi]
- material_index = f.material_index
+ # below "material" alias, added check ob.active_material
+ # to avoid variable referenced before assignment error
+ try:
+ material = ob.active_material
+ except IndexError:
+ #when no material slot exists,
+ material=None
- if vcol_layer:
- cols = [vcol_layer[l].color[:] for l in f.loops]
+ # WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ if material and ob.active_material is not None and material.pov.material_use_nodes == False:
+ if material.pov.replacement_text != "":
+ file.write("\n")
+ file.write(" texture{%s}\n" % material.pov.replacement_text)
- if not me_materials or me_materials[material_index] is None: # No materials
- if linebreaksinlists:
- file.write(",\n")
- # vert count
- file.write(tabStr + "<%d,%d,%d>" % (fv[0], fv[1], fv[2]))
else:
- file.write(", ")
- file.write("<%d,%d,%d>" % (fv[0], fv[1], fv[2])) # vert count
+ # Loop through declared materials list
+ for cMN in LocalMaterialNames:
+ if material != "Default":
+ file.write("\n texture{MAT_%s}\n" % cMN)
+ #use string_strip_hyphen(materialNames[material]))
+ #or Something like that to clean up the above?
+ elif material and material.pov.material_use_nodes:
+ for index in facesMaterials:
+ faceMaterial = string_strip_hyphen(bpy.path.clean_name(me_materials[index].name))
+ file.write("\n texture{%s}\n" % faceMaterial)
+ # END!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
else:
- material = me_materials[material_index]
- ci1 = ci2 = ci3 = f.material_index
- if me.vertex_colors: #and material.use_vertex_color_paint:
- # Color per vertex - vertex color
-
- col1 = cols[0]
- col2 = cols[1]
- col3 = cols[2]
-
- ci1 = vertCols[col1[0], col1[1], col1[2], material_index][0]
- ci2 = vertCols[col2[0], col2[1], col2[2], material_index][0]
- ci3 = vertCols[col3[0], col3[1], col3[2], material_index][0]
- elif material.pov.material_use_nodes:
- ci1 = ci2 = ci3 = 0
- else:
- # Color per material - flat material color
- if material.pov_subsurface_scattering.use:
- diffuse_color = [i * j for i, j in
- zip(material.pov_subsurface_scattering.color[:],
- material.diffuse_color[:])]
- else:
- diffuse_color = material.diffuse_color[:]
- ci1 = ci2 = ci3 = vertCols[diffuse_color[0], diffuse_color[1], \
- diffuse_color[2], f.material_index][0]
+ file.write(" texture{}\n")
+ tabWrite("}\n")
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%d,%d,%d>, %d,%d,%d" % \
- (fv[0], fv[1], fv[2], ci1, ci2, ci3)) # vert count
- else:
- file.write(", ")
- file.write("<%d,%d,%d>, %d,%d,%d" % \
- (fv[0], fv[1], fv[2], ci1, ci2, ci3)) # vert count
+ # Face indices
+ tabWrite("face_indices {\n")
+ tabWrite("%d" % (len(me_faces))) # faces count
+ tabStr = tab * tabLevel
- file.write("\n")
- tabWrite("}\n")
+ for fi, f in enumerate(me_faces):
+ fv = faces_verts[fi]
+ material_index = f.material_index
- # normal_indices indices
- tabWrite("normal_indices {\n")
- tabWrite("%d" % (len(me_faces))) # faces count
- tabStr = tab * tabLevel
- for fi, fv in enumerate(faces_verts):
- if me_faces[fi].use_smooth:
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%d,%d,%d>" %\
- (uniqueNormals[verts_normals[fv[0]]][0],\
- uniqueNormals[verts_normals[fv[1]]][0],\
- uniqueNormals[verts_normals[fv[2]]][0])) # vert count
- else:
- file.write(", ")
- file.write("<%d,%d,%d>" %\
- (uniqueNormals[verts_normals[fv[0]]][0],\
- uniqueNormals[verts_normals[fv[1]]][0],\
- uniqueNormals[verts_normals[fv[2]]][0])) # vert count
- else:
- idx = uniqueNormals[faces_normals[fi]][0]
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%d,%d,%d>" % (idx, idx, idx)) # vertcount
+ if vcol_layer:
+ cols = [vcol_layer[l].color[:] for l in f.loops]
+
+ if not me_materials or me_materials[material_index] is None: # No materials
+ if linebreaksinlists:
+ file.write(",\n")
+ # vert count
+ file.write(tabStr + "<%d,%d,%d>" % (fv[0], fv[1], fv[2]))
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>" % (fv[0], fv[1], fv[2])) # vert count
else:
- file.write(", ")
- file.write("<%d,%d,%d>" % (idx, idx, idx)) # vert count
+ material = me_materials[material_index]
+ ci1 = ci2 = ci3 = f.material_index
+ if me.vertex_colors: #and material.use_vertex_color_paint:
+ # Color per vertex - vertex color
+
+ col1 = cols[0]
+ col2 = cols[1]
+ col3 = cols[2]
+
+ ci1 = vertCols[col1[0], col1[1], col1[2], material_index][0]
+ ci2 = vertCols[col2[0], col2[1], col2[2], material_index][0]
+ ci3 = vertCols[col3[0], col3[1], col3[2], material_index][0]
+ elif material.pov.material_use_nodes:
+ ci1 = ci2 = ci3 = 0
+ else:
+ # Color per material - flat material color
+ if material.pov_subsurface_scattering.use:
+ diffuse_color = [i * j for i, j in
+ zip(material.pov_subsurface_scattering.color[:],
+ material.diffuse_color[:])]
+ else:
+ diffuse_color = material.diffuse_color[:]
+ ci1 = ci2 = ci3 = vertCols[diffuse_color[0], diffuse_color[1], \
+ diffuse_color[2], f.material_index][0]
- file.write("\n")
- tabWrite("}\n")
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%d,%d,%d>, %d,%d,%d" % \
+ (fv[0], fv[1], fv[2], ci1, ci2, ci3)) # vert count
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>, %d,%d,%d" % \
+ (fv[0], fv[1], fv[2], ci1, ci2, ci3)) # vert count
- if uv_layer:
- tabWrite("uv_indices {\n")
+ file.write("\n")
+ tabWrite("}\n")
+
+ # normal_indices indices
+ tabWrite("normal_indices {\n")
tabWrite("%d" % (len(me_faces))) # faces count
tabStr = tab * tabLevel
- for f in me_faces:
- uvs = [uv_layer[l].uv[:] for l in f.loops]
-
- if linebreaksinlists:
- file.write(",\n")
- file.write(tabStr + "<%d,%d,%d>" % (
- uniqueUVs[uvs[0]][0],\
- uniqueUVs[uvs[1]][0],\
- uniqueUVs[uvs[2]][0]))
+ for fi, fv in enumerate(faces_verts):
+ if me_faces[fi].use_smooth:
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%d,%d,%d>" %\
+ (uniqueNormals[verts_normals[fv[0]]][0],\
+ uniqueNormals[verts_normals[fv[1]]][0],\
+ uniqueNormals[verts_normals[fv[2]]][0])) # vert count
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>" %\
+ (uniqueNormals[verts_normals[fv[0]]][0],\
+ uniqueNormals[verts_normals[fv[1]]][0],\
+ uniqueNormals[verts_normals[fv[2]]][0])) # vert count
else:
- file.write(", ")
- file.write("<%d,%d,%d>" % (
- uniqueUVs[uvs[0]][0],\
- uniqueUVs[uvs[1]][0],\
- uniqueUVs[uvs[2]][0]))
+ idx = uniqueNormals[faces_normals[fi]][0]
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%d,%d,%d>" % (idx, idx, idx)) # vertcount
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>" % (idx, idx, idx)) # vert count
file.write("\n")
tabWrite("}\n")
- #XXX BOOLEAN
- onceCSG = 0
- for mod in ob.modifiers:
- if onceCSG == 0:
- if mod :
- if mod.type == 'BOOLEAN':
- if ob.pov.boolean_mod == "POV":
- file.write("\tinside_vector <%.6g, %.6g, %.6g>\n" %
- (ob.pov.inside_vector[0],
- ob.pov.inside_vector[1],
- ob.pov.inside_vector[2]))
- onceCSG = 1
-
- if me.materials:
- try:
- material = me.materials[0] # dodgy
- writeObjectMaterial(material, ob)
- except IndexError:
- print(me)
+ if uv_layer:
+ tabWrite("uv_indices {\n")
+ tabWrite("%d" % (len(me_faces))) # faces count
+ tabStr = tab * tabLevel
+ for f in me_faces:
+ uvs = [uv_layer[l].uv[:] for l in f.loops]
- # POV object modifiers such as
- # hollow / sturm / double_illuminate etc.
- write_object_modifiers(scene,ob,file)
+ if linebreaksinlists:
+ file.write(",\n")
+ file.write(tabStr + "<%d,%d,%d>" % (
+ uniqueUVs[uvs[0]][0],\
+ uniqueUVs[uvs[1]][0],\
+ uniqueUVs[uvs[2]][0]))
+ else:
+ file.write(", ")
+ file.write("<%d,%d,%d>" % (
+ uniqueUVs[uvs[0]][0],\
+ uniqueUVs[uvs[1]][0],\
+ uniqueUVs[uvs[2]][0]))
- #Importance for radiosity sampling added here:
- tabWrite("radiosity { \n")
- tabWrite("importance %3g \n" % importance)
- tabWrite("}\n")
+ file.write("\n")
+ tabWrite("}\n")
- tabWrite("}\n") # End of mesh block
+ #XXX BOOLEAN
+ onceCSG = 0
+ for mod in ob.modifiers:
+ if onceCSG == 0:
+ if mod :
+ if mod.type == 'BOOLEAN':
+ if ob.pov.boolean_mod == "POV":
+ file.write("\tinside_vector <%.6g, %.6g, %.6g>\n" %
+ (ob.pov.inside_vector[0],
+ ob.pov.inside_vector[1],
+ ob.pov.inside_vector[2]))
+ onceCSG = 1
+
+ if me.materials:
+ try:
+ material = me.materials[0] # dodgy
+ writeObjectMaterial(material, ob)
+ except IndexError:
+ print(me)
+
+ # POV object modifiers such as
+ # hollow / sturm / double_illuminate etc.
+ write_object_modifiers(scene,ob,file)
+
+ #Importance for radiosity sampling added here:
+ tabWrite("radiosity { \n")
+ tabWrite("importance %3g \n" % importance)
+ tabWrite("}\n")
+ tabWrite("}\n") # End of mesh block
- ob_eval.to_mesh_clear()
+
+ ob_eval.to_mesh_clear()
if csg:
duplidata_ref = []
@@ -3224,21 +3228,28 @@ def write_pov(filename, scene=None, info_callback=None):
#matrix = global_matrix @ ob.matrix_world
if ob.is_instancer:
tabWrite("\n//--DupliObjects in %s--\n\n"% ob.name)
- ob.dupli_list_create(scene)
+ #ob.dupli_list_create(scene) #deprecated in 2.8
+ depsgraph = bpy.context.evaluated_depsgraph_get()
dup = ""
if ob.is_modified(scene, 'RENDER'):
#modified object always unique so using object name rather than data name
dup = "#declare OB%s = union{\n" %(string_strip_hyphen(bpy.path.clean_name(ob.name)))
else:
dup = "#declare DATA%s = union{\n" %(string_strip_hyphen(bpy.path.clean_name(ob.name)))
- for eachduplicate in ob.dupli_list:
- duplidataname = "OB"+string_strip_hyphen(bpy.path.clean_name(bpy.data.objects[eachduplicate.object.name].data.name))
- dup += ("\tobject {\n\t\tDATA%s\n\t\t%s\t}\n" %(string_strip_hyphen(bpy.path.clean_name(bpy.data.objects[eachduplicate.object.name].data.name)), MatrixAsPovString(ob.matrix_world.inverted() * eachduplicate.matrix)))
- #add object to a list so that it is not rendered for some instance_types
- if ob.instance_type not in {'COLLECTION'} and duplidataname not in duplidata_ref:
- duplidata_ref.append(duplidataname) #older key [string_strip_hyphen(bpy.path.clean_name("OB"+ob.name))]
+ for eachduplicate in depsgraph.object_instances:
+ if eachduplicate.is_instance: # Real dupli instance filtered because original included in list since 2.8
+ print("eachduplicate.object.name: %s" % eachduplicate.object.name)
+ if not "name" in dir(bpy.data.objects[eachduplicate.object.name].data):
+ print("WARNING: No 'name' in dir(bpy.data.objects[eachduplicate.object.name].data) = %s" % (dir(bpy.data.objects[eachduplicate.object.name].data)))
+ continue # don't try to parse objects with no name
+ duplidataname = "OB"+string_strip_hyphen(bpy.path.clean_name(bpy.data.objects[eachduplicate.object.name].data.name))
+ dupmatrix = eachduplicate.matrix_world.copy() #has to be copied to not store instance since 2.8
+ dup += ("\tobject {\n\t\tDATA%s\n\t\t%s\t}\n" %(string_strip_hyphen(bpy.path.clean_name(bpy.data.objects[eachduplicate.object.name].data.name)), MatrixAsPovString(ob.matrix_world.inverted() @ dupmatrix)))
+ #add object to a list so that it is not rendered for some instance_types
+ if ob.instance_type not in {'COLLECTION'} and duplidataname not in duplidata_ref:
+ duplidata_ref.append(duplidataname) #older key [string_strip_hyphen(bpy.path.clean_name("OB"+ob.name))]
dup += "}\n"
- ob.dupli_list_clear()
+ #ob.dupli_list_clear()# just do not store any reference to instance since 2.8
tabWrite(dup)
else:
continue
@@ -3805,7 +3816,6 @@ class PovrayRender(bpy.types.RenderEngine):
def _export(self, depsgraph, povPath, renderImagePath):
import tempfile
scene = bpy.context.scene
-
if scene.pov.tempfiles_enable:
self._temp_file_in = tempfile.NamedTemporaryFile(suffix=".pov", delete=False).name
# PNG with POV 3.7, can show the background color with alpha. In the long run using the
diff --git a/render_povray/ui.py b/render_povray/ui.py
index c1408153..1ffb0140 100644
--- a/render_povray/ui.py
+++ b/render_povray/ui.py
@@ -622,6 +622,70 @@ class LIGHT_PT_POV_shadow(PovLampButtonsPanel, Panel):
lamp = context.lamp
layout.row().prop(lamp, "shadow_method", expand=True)
+
+ split = layout.split()
+
+ col = split.column()
+ sub = col.column()
+ sub.prop(lamp, "spot_size", text="Size")
+ sub.prop(lamp, "spot_blend", text="Blend", slider=True)
+ col.prop(lamp, "use_square")
+ col.prop(lamp, "show_cone")
+
+ col = split.column()
+
+ col.active = (lamp.shadow_method != 'BUFFER_SHADOW' or lamp.shadow_buffer_type != 'DEEP')
+ col.prop(lamp, "use_halo")
+ sub = col.column(align=True)
+ sub.active = lamp.use_halo
+ sub.prop(lamp, "halo_intensity", text="Intensity")
+ if lamp.shadow_method == 'BUFFER_SHADOW':
+ sub.prop(lamp, "halo_step", text="Step")
+ if lamp.shadow_method == 'NOSHADOW' and lamp.type == 'AREA':
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Form factor sampling:")
+
+ sub = col.row(align=True)
+
+ if lamp.shape == 'SQUARE':
+ sub.prop(lamp, "shadow_ray_samples_x", text="Samples")
+ elif lamp.shape == 'RECTANGLE':
+ sub.prop(lamp.pov, "shadow_ray_samples_x", text="Samples X")
+ sub.prop(lamp.pov, "shadow_ray_samples_y", text="Samples Y")
+
+ if lamp.shadow_method != 'NOSHADOW':
+ split = layout.split()
+
+ col = split.column()
+ col.prop(lamp, "shadow_color", text="")
+
+ col = split.column()
+ col.prop(lamp, "use_shadow_layer", text="This Layer Only")
+ col.prop(lamp, "use_only_shadow")
+
+ if lamp.shadow_method == 'RAY_SHADOW':
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Sampling:")
+
+ if lamp.type in {'POINT', 'SUN', 'SPOT'}:
+ sub = col.row()
+
+ sub.prop(lamp, "shadow_ray_samples", text="Samples")
+ sub.prop(lamp, "shadow_soft_size", text="Soft Size")
+
+ elif lamp.type == 'AREA':
+ sub = col.row(align=True)
+
+ if lamp.shape == 'SQUARE':
+ sub.prop(lamp, "shadow_ray_samples_x", text="Samples")
+ elif lamp.shape == 'RECTANGLE':
+ sub.prop(lamp, "shadow_ray_samples_x", text="Samples X")
+ sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y")
+
'''
if lamp.shadow_method == 'NOSHADOW' and lamp.type == 'AREA':
split = layout.split()
diff --git a/space_view3d_math_vis/draw.py b/space_view3d_math_vis/draw.py
index f9777e77..8fe9f6a8 100644
--- a/space_view3d_math_vis/draw.py
+++ b/space_view3d_math_vis/draw.py
@@ -81,7 +81,8 @@ def draw_callback_px():
return
font_id = 0
- blf.size(font_id, 12, 72)
+ ui_scale = context.preferences.system.ui_scale
+ blf.size(font_id, round(12 * ui_scale), context.preferences.system.dpi)
data_matrix, data_quat, data_euler, data_vector, data_vector_array = utils.console_math_data()
if not data_matrix and not data_quat and not data_euler and not data_vector and not data_vector_array:
diff --git a/space_view3d_pie_menus/__init__.py b/space_view3d_pie_menus/__init__.py
index 32c386e9..8b741888 100644
--- a/space_view3d_pie_menus/__init__.py
+++ b/space_view3d_pie_menus/__init__.py
@@ -34,7 +34,7 @@ from bpy.types import (
bl_info = {
"name": "3D Viewport Pie Menus",
"author": "meta-androcto",
- "version": (1, 2, 8),
+ "version": (1, 2, 9),
"blender": (2, 80, 0),
"description": "Pie Menu Activation",
"location": "Addons Preferences",
@@ -49,11 +49,8 @@ sub_modules_names = (
"pie_views_numpad_menu",
"pie_sculpt_menu",
"pie_origin",
- "pie_cursor",
"pie_manipulator_menu",
- "pie_snap_menu",
"pie_shading_menu",
- "pie_proportional_menu",
"pie_align_menu",
"pie_delete_menu",
"pie_apply_transform_menu",
diff --git a/space_view3d_pie_menus/pie_cursor.py b/space_view3d_pie_menus/pie_cursor.py
deleted file mode 100644
index 6d60c47e..00000000
--- a/space_view3d_pie_menus/pie_cursor.py
+++ /dev/null
@@ -1,122 +0,0 @@
-# ##### 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 #####
-
-# <pep8 compliant>
-
-bl_info = {
- "name": "Hotkey: 'Shift S'",
- "description": "Cursor Menu",
- "author": "pitiwazou, meta-androcto",
- "version": (0, 1, 0),
- "blender": (2, 80, 0),
- "location": "3D View",
- "warning": "",
- "wiki_url": "",
- "category": "Cursor Pie"
- }
-
-import bpy
-from bpy.types import (
- Menu,
- Operator,
- )
-
-
-# SnapCursSelToCenter1 thanks to Isaac Weaver (wisaac) D1963
-class PIE_OT_Snap_CursSelToCenter1(Operator):
- bl_idname = "view3d.snap_cursor_selected_to_center1"
- bl_label = "Snap Cursor & Selection to Center"
- bl_description = ("Snap 3D cursor and selected objects to the center \n"
- "Works only in Object Mode")
-
- @classmethod
- def poll(cls, context):
- return (context.area.type == "VIEW_3D" and context.mode == "OBJECT")
-
- def execute(self, context):
- context.scene.cursor.location = (0, 0, 0)
- for obj in context.selected_objects:
- obj.location = (0, 0, 0)
-
- return {'FINISHED'}
-
-
-# Origin/Pivot menu1 - Shift + S
-class PIE_MT_Snap_CursorMenu(Menu):
- bl_idname = "SNAP_MT_cursormenu"
- bl_label = "Cursor Menu"
-
- def draw(self, context):
- layout = self.layout
- pie = layout.menu_pie()
- # 4 - LEFT
- pie.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor",
- icon='CLIPUV_HLT').use_offset = False
- # 6 - RIGHT
- pie.operator("view3d.snap_selected_to_cursor",
- text="Selection to Cursor (Keep Offset)", icon='PIVOT_CURSOR').use_offset = True
- # 2 - BOTTOM
- pie.operator("view3d.snap_cursor_selected_to_center1",
- text="Selected & Cursor to Center", icon='NONE')
- # 8 - TOP
- pie.operator("view3d.snap_cursor_to_center", text="Cursor to World Origin", icon='CLIPUV_DEHLT')
- # 7 - TOP - LEFT
- pie.operator("view3d.snap_cursor_to_selected", text="Cursor to Selected", icon='NONE')
- # 9 - TOP - RIGHT
- pie.operator("view3d.snap_cursor_to_active", text="Cursor to Active", icon='NONE')
- # 1 - BOTTOM - LEFT
- pie.operator("view3d.snap_selected_to_grid", text="Selection to Grid", icon='GRID')
- # 3 - BOTTOM - RIGHT
- pie.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid", icon='GRID')
-
-
-classes = (
- PIE_MT_Snap_CursorMenu,
- PIE_OT_Snap_CursSelToCenter1,
- )
-
-addon_keymaps = []
-
-
-def register():
- for cls in classes:
- bpy.utils.register_class(cls)
-
- wm = bpy.context.window_manager
- if wm.keyconfigs.addon:
- # Origin/Pivot
- km = wm.keyconfigs.addon.keymaps.new(name='3D View Generic', space_type='VIEW_3D')
- kmi = km.keymap_items.new('wm.call_menu_pie', 'S', 'PRESS', shift=True)
- kmi.properties.name = "SNAP_MT_cursormenu"
- addon_keymaps.append((km, kmi))
-
-
-def unregister():
- for cls in classes:
- bpy.utils.unregister_class(cls)
-
- wm = bpy.context.window_manager
- kc = wm.keyconfigs.addon
- if kc:
- for km, kmi in addon_keymaps:
- km.keymap_items.remove(kmi)
- addon_keymaps.clear()
-
-
-if __name__ == "__main__":
- register()
diff --git a/space_view3d_pie_menus/pie_modes_menu.py b/space_view3d_pie_menus/pie_modes_menu.py
index 0b68c79e..bcaf4af6 100644
--- a/space_view3d_pie_menus/pie_modes_menu.py
+++ b/space_view3d_pie_menus/pie_modes_menu.py
@@ -178,57 +178,6 @@ class PIE_OT_ClassFace(Operator):
return {'FINISHED'}
-class PIE_OT_VertsEdges(Operator):
- bl_idname = "verts.edges"
- bl_label = "Verts Edges"
- bl_description = "Vert/Edge Select Mode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- if context.object.mode != "EDIT":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
- if bpy.ops.mesh.select_mode != "VERT, EDGE, FACE":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
- bpy.ops.mesh.select_mode(use_extend=True, use_expand=False, type='EDGE')
- return {'FINISHED'}
-
-
-class PIE_OT_EdgesFaces(Operator):
- bl_idname = "edges.faces"
- bl_label = "EdgesFaces"
- bl_description = "Edge/Face Select Mode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- if context.object.mode != "EDIT":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='EDGE')
- if bpy.ops.mesh.select_mode != "VERT, EDGE, FACE":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='EDGE')
- bpy.ops.mesh.select_mode(use_extend=True, use_expand=False, type='FACE')
- return {'FINISHED'}
-
-
-class PIE_OT_VertsFaces(Operator):
- bl_idname = "verts.faces"
- bl_label = "Verts Faces"
- bl_description = "Vert/Face Select Mode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- if context.object.mode != "EDIT":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
- if bpy.ops.mesh.select_mode != "VERT, EDGE, FACE":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
- bpy.ops.mesh.select_mode(use_extend=True, use_expand=False, type='FACE')
- return {'FINISHED'}
-
-
class PIE_OT_VertsEdgesFaces(Operator):
bl_idname = "verts.edgesfaces"
bl_label = "Verts Edges Faces"
@@ -280,9 +229,6 @@ class PIE_MT_ObjectEditotherModes(Menu):
box.operator("class.vertex", text="Vertex", icon='VERTEXSEL')
box.operator("class.edge", text="Edge", icon='EDGESEL')
box.operator("class.face", text="Face", icon='FACESEL')
- box.operator("verts.faces", text="Vertex/Faces", icon='VERTEXSEL')
- box.operator("verts.edges", text="Vertex/Edges", icon='EDGESEL')
- box.operator("edges.faces", text="Edges/Faces", icon='FACESEL')
box.operator("verts.edgesfaces", text="Vertex/Edges/Faces", icon='OBJECT_DATAMODE')
@@ -309,17 +255,17 @@ class PIE_MT_ObjectEditMode(Menu):
'PARTICLE_EDIT', 'GPENCIL_EDIT'}:
pie = layout.menu_pie()
# 4 - LEFT
- pie.operator("class.pievertexpaint", text="Vertex Paint", icon='VPAINT_HLT')
+ pie.operator("class.pieweightpaint", text="Weight Paint", icon='WPAINT_HLT')
# 6 - RIGHT
pie.operator("class.pietexturepaint", text="Texture Paint", icon='TPAINT_HLT')
# 2 - BOTTOM
- pie.menu("MENU_MT_objecteditmodeothermodes", text="Vert,Edge,Face Modes", icon='EDITMODE_HLT')
+ pie.menu("MENU_MT_objecteditmodeothermodes", text="Edit Modes", icon='EDITMODE_HLT')
# 8 - TOP
pie.operator("class.object", text="Object/Edit Toggle", icon='OBJECT_DATAMODE')
# 7 - TOP - LEFT
pie.operator("sculpt.sculptmode_toggle", text="Sculpt", icon='SCULPTMODE_HLT')
# 9 - TOP - RIGHT
- pie.operator("class.pieweightpaint", text="Weight Paint", icon='WPAINT_HLT')
+ pie.operator("class.pievertexpaint", text="Vertex Paint", icon='VPAINT_HLT')
# 1 - BOTTOM - LEFT
if context.object.particle_systems:
pie.operator("class.pieparticleedit", text="Particle Edit", icon='PARTICLEMODE')
@@ -332,7 +278,7 @@ class PIE_MT_ObjectEditMode(Menu):
elif ob and ob.type == 'MESH' and ob.mode in {'EDIT'}:
pie = layout.menu_pie()
# 4 - LEFT
- pie.operator("class.pievertexpaint", text="Vertex Paint", icon='VPAINT_HLT')
+ pie.operator("class.pieweightpaint", text="Weight Paint", icon='WPAINT_HLT')
# 6 - RIGHT
pie.operator("class.pietexturepaint", text="Texture Paint", icon='TPAINT_HLT')
# 2 - BOTTOM
@@ -342,7 +288,7 @@ class PIE_MT_ObjectEditMode(Menu):
# 7 - TOP - LEFT
pie.operator("sculpt.sculptmode_toggle", text="Sculpt", icon='SCULPTMODE_HLT')
# 9 - TOP - RIGHT
- pie.operator("class.pieweightpaint", text="Weight Paint", icon='WPAINT_HLT')
+ pie.operator("class.pievertexpaint", text="Vertex Paint", icon='VPAINT_HLT')
# 1 - BOTTOM - LEFT
if context.object.particle_systems:
pie.operator("class.pieparticleedit", text="Particle Edit", icon='PARTICLEMODE')
@@ -484,9 +430,6 @@ classes = (
PIE_OT_ClassVertexPaint,
PIE_OT_ClassParticleEdit,
PIE_OT_InteractiveModeGreasePencil,
- PIE_OT_VertsEdges,
- PIE_OT_EdgesFaces,
- PIE_OT_VertsFaces,
PIE_OT_VertsEdgesFaces,
PIE_OT_SetObjectModePie,
)
diff --git a/space_view3d_pie_menus/pie_orientation_menu.py b/space_view3d_pie_menus/pie_orientation_menu.py
deleted file mode 100644
index 2b8dd844..00000000
--- a/space_view3d_pie_menus/pie_orientation_menu.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# ##### 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 #####
-
-# <pep8 compliant>
-
-"""Replace default list-style menu for transform orientations with a pie."""
-
-bl_info = {
- "name": "Hotkey: 'Alt + Spacebar'",
- "author": "Italic_",
- "version": (1, 1, 0),
- "blender": (2, 80, 0),
- "description": "Set Transform Orientations",
- "location": "3D View",
- "category": "Orientation Pie"}
-
-import bpy
-from bpy.types import (
- Menu,
- Operator,
- )
-from bpy.props import (
- StringProperty,
- )
-
-
-class PIE_MT_OrientPie(Menu):
- bl_label = "Transform Orientation"
- bl_idname = "PIE_MT_orient"
-
- def draw(self, context):
- layout = self.layout
- pie = layout.menu_pie()
- scene = context.scene
-
- pie.prop(scene.transform_orientation_slots[0], "type", expand=True)
-
-
-addon_keymaps = []
-
-classes = (
- PIE_MT_OrientPie,
- )
-
-
-def register():
- for cls in classes:
- bpy.utils.register_class(cls)
-
- wm = bpy.context.window_manager
- if wm.keyconfigs.addon:
- # Manipulators
- km = wm.keyconfigs.addon.keymaps.new(name='3D View Generic', space_type='VIEW_3D')
- kmi = km.keymap_items.new('wm.call_menu_pie', 'SPACE', 'PRESS', alt=True)
- kmi.properties.name = "PIE_MT_orient"
- addon_keymaps.append((km, kmi))
-
-
-def unregister():
- for cls in classes:
- bpy.utils.unregister_class(cls)
-
- wm = bpy.context.window_manager
- kc = wm.keyconfigs.addon
- if kc:
- for km, kmi in addon_keymaps:
- km.keymap_items.remove(kmi)
- addon_keymaps.clear()
-
-
-if __name__ == "__main__":
- register()
diff --git a/space_view3d_pie_menus/pie_proportional_menu.py b/space_view3d_pie_menus/pie_proportional_menu.py
deleted file mode 100644
index 10b4cf57..00000000
--- a/space_view3d_pie_menus/pie_proportional_menu.py
+++ /dev/null
@@ -1,427 +0,0 @@
-# ##### 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 #####
-
-# <pep8 compliant>
-
-bl_info = {
- "name": "Hotkey: 'Shift O'",
- "description": "Proportional Object/Edit Tools",
- "author": "pitiwazou, meta-androcto",
- "version": (0, 1, 1),
- "blender": (2, 80, 0),
- "location": "3D View Object & Edit modes",
- "warning": "",
- "wiki_url": "",
- "category": "Proportional Edit Pie"
- }
-
-import bpy
-from bpy.types import (
- Menu,
- Operator,
- )
-
-
-# Proportional Edit Object
-class PIE_OT_ProportionalEditObj(Operator):
- bl_idname = "proportional_obj.active"
- bl_label = "Proportional Edit Object"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
-
- if ts.use_proportional_edit_objects is True:
- ts.use_proportional_edit_objects = False
-
- elif ts.use_proportional_edit_objects is False:
- ts.use_proportional_edit_objects = True
-
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalSmoothObj(Operator):
- bl_idname = "proportional_obj.smooth"
- bl_label = "Proportional Smooth Object"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- if ts.use_proportional_edit_objects is False:
- ts.use_proportional_edit_objects = True
- ts.proportional_edit_falloff = 'SMOOTH'
-
- if ts.proportional_edit_falloff != 'SMOOTH':
- ts.proportional_edit_falloff = 'SMOOTH'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalSphereObj(Operator):
- bl_idname = "proportional_obj.sphere"
- bl_label = "Proportional Sphere Object"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- if ts.use_proportional_edit_objects is False:
- ts.use_proportional_edit_objects = True
- ts.proportional_edit_falloff = 'SPHERE'
-
- if ts.proportional_edit_falloff != 'SPHERE':
- ts.proportional_edit_falloff = 'SPHERE'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalRootObj(Operator):
- bl_idname = "proportional_obj.root"
- bl_label = "Proportional Root Object"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- if ts.use_proportional_edit_objects is False:
- ts.use_proportional_edit_objects = True
- ts.proportional_edit_falloff = 'ROOT'
-
- if ts.proportional_edit_falloff != 'ROOT':
- ts.proportional_edit_falloff = 'ROOT'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalSharpObj(Operator):
- bl_idname = "proportional_obj.sharp"
- bl_label = "Proportional Sharp Object"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- if ts.use_proportional_edit_objects is False:
- ts.use_proportional_edit_objects = True
- ts.proportional_edit_falloff = 'SHARP'
-
- if ts.proportional_edit_falloff != 'SHARP':
- ts.proportional_edit_falloff = 'SHARP'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalLinearObj(Operator):
- bl_idname = "proportional_obj.linear"
- bl_label = "Proportional Linear Object"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- if ts.use_proportional_edit_objects is False:
- ts.use_proportional_edit_objects = True
- ts.proportional_edit_falloff = 'LINEAR'
-
- if ts.proportional_edit_falloff != 'LINEAR':
- ts.proportional_edit_falloff = 'LINEAR'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalConstantObj(Operator):
- bl_idname = "proportional_obj.constant"
- bl_label = "Proportional Constant Object"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- if ts.use_proportional_edit_objects is False:
- ts.use_proportional_edit_objects = True
- ts.proportional_edit_falloff = 'CONSTANT'
-
- if ts.proportional_edit_falloff != 'CONSTANT':
- ts.proportional_edit_falloff = 'CONSTANT'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalRandomObj(Operator):
- bl_idname = "proportional_obj.random"
- bl_label = "Proportional Random Object"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- if ts.use_proportional_edit_objects is False:
- ts.use_proportional_edit_objects = True
- ts.proportional_edit_falloff = 'RANDOM'
-
- if ts.proportional_edit_falloff != 'RANDOM':
- ts.proportional_edit_falloff = 'RANDOM'
- return {'FINISHED'}
-
-
-# Proportional Edit Edit Mode
-class PIE_OT_ProportionalEditEdt(Operator):
- bl_idname = "proportional_edt.active"
- bl_label = "Proportional Edit EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit ^= 1
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalConnectedEdt(Operator):
- bl_idname = "proportional_edt.connected"
- bl_label = "Proportional Connected EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_connected = True
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalProjectedEdt(Operator):
- bl_idname = "proportional_edt.projected"
- bl_label = "Proportional projected EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
-
- ts = context.tool_settings
- ts.use_proportional_projected = True
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalSmoothEdt(Operator):
- bl_idname = "proportional_edt.smooth"
- bl_label = "Proportional Smooth EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit = True
- ts.proportional_edit_falloff = 'SMOOTH'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalSphereEdt(Operator):
- bl_idname = "proportional_edt.sphere"
- bl_label = "Proportional Sphere EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit = True
- ts.proportional_edit_falloff = 'SPHERE'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalRootEdt(Operator):
- bl_idname = "proportional_edt.root"
- bl_label = "Proportional Root EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit = True
- ts.proportional_edit_falloff = 'ROOT'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalSharpEdt(Operator):
- bl_idname = "proportional_edt.sharp"
- bl_label = "Proportional Sharp EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit = True
- ts.proportional_edit_falloff = 'SHARP'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalLinearEdt(Operator):
- bl_idname = "proportional_edt.linear"
- bl_label = "Proportional Linear EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit = True
- ts.proportional_edit_falloff = 'LINEAR'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalConstantEdt(Operator):
- bl_idname = "proportional_edt.constant"
- bl_label = "Proportional Constant EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit = True
- ts.proportional_edit_falloff = 'CONSTANT'
- return {'FINISHED'}
-
-
-class PIE_OT_ProportionalRandomEdt(Operator):
- bl_idname = "proportional_edt.random"
- bl_label = "Proportional Random EditMode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit = True
- ts.proportional_edit_falloff = 'RANDOM'
- return {'FINISHED'}
-
-class PIE_OT_ProportionalInverseS(Operator):
- bl_idname = "proportional_edt.inverse"
- bl_label = "Proportional Inverse Square"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- ts.use_proportional_edit = True
- ts.proportional_edit_falloff = 'INVERSE_SQUARE'
- return {'FINISHED'}
-
-# Pie ProportionalEditObj - O
-class PIE_MT_ProportionalObj(Menu):
- bl_idname = "PIE_MT_proportional_obj"
- bl_label = "Pie Proportional Obj"
-
- def draw(self, context):
- layout = self.layout
- pie = layout.menu_pie()
- # 4 - LEFT
- pie.operator("proportional_obj.sphere", text="Sphere", icon='SPHERECURVE')
- # 6 - RIGHT
- pie.operator("proportional_obj.root", text="Root", icon='ROOTCURVE')
- # 2 - BOTTOM
- pie.operator("proportional_obj.smooth", text="Smooth", icon='SMOOTHCURVE')
- # 8 - TOP
- pie.prop(context.tool_settings, "use_proportional_edit_objects", text="Proportional On/Off")
- # 7 - TOP - LEFT
- pie.operator("proportional_obj.linear", text="Linear", icon='LINCURVE')
- # 9 - TOP - RIGHT
- pie.operator("proportional_obj.sharp", text="Sharp", icon='SHARPCURVE')
- # 1 - BOTTOM - LEFT
- pie.operator("proportional_obj.constant", text="Constant", icon='NOCURVE')
- # 3 - BOTTOM - RIGHT
- pie.operator("proportional_obj.random", text="Random", icon='RNDCURVE')
-
-
-# Pie ProportionalEditEdt - O
-class PIE_MT_ProportionalEdt(Menu):
- bl_idname = "PIE_MT_proportional_edt"
- bl_label = "Pie Proportional Edit"
-
- def draw(self, context):
- layout = self.layout
- pie = layout.menu_pie()
- # 4 - LEFT
- pie.operator("proportional_edt.connected", text="Connected", icon='PROP_CON')
- # 6 - RIGHT
- pie.operator("proportional_edt.projected", text="Projected", icon='PROP_ON')
- # 2 - BOTTOM
- pie.operator("proportional_edt.root", text="Root", icon='ROOTCURVE')
- # 8 - TOP
- pie.operator("proportional_edt.active", text="Proportional On/Off", icon='PROP_ON')
- # 7 - TOP - LEFT
- pie.operator("proportional_edt.smooth", text="Smooth", icon='SMOOTHCURVE')
- # 9 - TOP - RIGHT
- pie.operator("proportional_edt.sphere", text="Sphere", icon='SPHERECURVE')
- # 1 - BOTTOM - LEFT
- pie.operator("proportional_edt.constant", text="Constant", icon='NOCURVE')
- # 3 - BOTTOM - RIGHT
- pie.menu("PIE_MT_proportional_more", text="More", icon='LINCURVE')
-
-
-# Pie ProportionalEditEdt - O
-class PIE_MT_ProportionalMore(Menu):
- bl_idname = "PIE_MT_proportional_more"
- bl_label = "Pie Proportional More"
-
- def draw(self, context):
- layout = self.layout
- pie = layout.menu_pie()
- box = pie.split().column()
- box.operator("proportional_edt.linear", text="Linear", icon='LINCURVE')
- box.operator("proportional_edt.sharp", text="Sharp", icon='SHARPCURVE')
- box.operator("proportional_edt.random", text="Random", icon='RNDCURVE')
- box.operator("proportional_edt.inverse", text="INVERSE", icon='INVERSESQUARECURVE')
-
-
-classes = (
- PIE_OT_ProportionalEditObj,
- PIE_OT_ProportionalSmoothObj,
- PIE_OT_ProportionalSphereObj,
- PIE_OT_ProportionalRootObj,
- PIE_OT_ProportionalSharpObj,
- PIE_OT_ProportionalLinearObj,
- PIE_OT_ProportionalConstantObj,
- PIE_OT_ProportionalRandomObj,
- PIE_OT_ProportionalEditEdt,
- PIE_OT_ProportionalConnectedEdt,
- PIE_OT_ProportionalProjectedEdt,
- PIE_OT_ProportionalSmoothEdt,
- PIE_OT_ProportionalSphereEdt,
- PIE_OT_ProportionalRootEdt,
- PIE_OT_ProportionalSharpEdt,
- PIE_OT_ProportionalLinearEdt,
- PIE_OT_ProportionalConstantEdt,
- PIE_OT_ProportionalRandomEdt,
- PIE_MT_ProportionalObj,
- PIE_MT_ProportionalEdt,
- PIE_MT_ProportionalMore,
- PIE_OT_ProportionalInverseS,
- )
-
-addon_keymaps = []
-
-
-def register():
- for cls in classes:
- bpy.utils.register_class(cls)
-
- wm = bpy.context.window_manager
- if wm.keyconfigs.addon:
- # ProportionalEditObj
- km = wm.keyconfigs.addon.keymaps.new(name='Object Mode')
- kmi = km.keymap_items.new('wm.call_menu_pie', 'O', 'PRESS', shift=True)
- kmi.properties.name = "PIE_MT_proportional_obj"
- addon_keymaps.append((km, kmi))
-
- # ProportionalEditEdt
- km = wm.keyconfigs.addon.keymaps.new(name='Mesh')
- kmi = km.keymap_items.new('wm.call_menu_pie', 'O', 'PRESS', shift=True)
- kmi.properties.name = "PIE_MT_proportional_edt"
- addon_keymaps.append((km, kmi))
-
-
-def unregister():
- for cls in classes:
- bpy.utils.unregister_class(cls)
-
- wm = bpy.context.window_manager
- kc = wm.keyconfigs.addon
- if kc:
- for km, kmi in addon_keymaps:
- km.keymap_items.remove(kmi)
- addon_keymaps.clear()
-
-
-if __name__ == "__main__":
- register()
diff --git a/space_view3d_pie_menus/pie_save_open_menu.py b/space_view3d_pie_menus/pie_save_open_menu.py
index 29fe67a2..9e02b321 100644
--- a/space_view3d_pie_menus/pie_save_open_menu.py
+++ b/space_view3d_pie_menus/pie_save_open_menu.py
@@ -35,9 +35,8 @@ from bpy.types import (
)
import os
-# Pie Save/Open
-
+# Pie Save/Open
class PIE_MT_SaveOpen(Menu):
bl_idname = "PIE_MT_saveopen"
bl_label = "Pie Save/Open"
@@ -48,17 +47,17 @@ class PIE_MT_SaveOpen(Menu):
# 4 - LEFT
pie.operator("wm.read_homefile", text="New", icon='FILE_NEW')
# 6 - RIGHT
- pie.menu("PIE_MT_link", text="Link", icon='LINK_BLEND')
+ pie.menu("PIE_MT_link", text="Link Menu", icon='LINK_BLEND')
# 2 - BOTTOM
pie.menu("PIE_MT_fileio", text="Import/Export Menu", icon='IMPORT')
# 8 - TOP
- pie.operator("file.save_incremental", text="Incremental Save", icon='NONE')
+ pie.operator("wm.open_mainfile", text="Open File", icon='FILE_FOLDER')
# 7 - TOP - LEFT
pie.operator("wm.save_mainfile", text="Save", icon='FILE_TICK')
# 9 - TOP - RIGHT
pie.operator("wm.save_as_mainfile", text="Save As...", icon='NONE')
# 1 - BOTTOM - LEFT
- pie.operator("wm.open_mainfile", text="Open file", icon='FILE_FOLDER')
+ pie.operator("file.save_incremental", text="Incremental Save", icon='NONE')
# 3 - BOTTOM - RIGHT
pie.menu("PIE_MT_recover", text="Recovery Menu", icon='RECOVER_LAST')
@@ -73,7 +72,13 @@ class PIE_MT_link(Menu):
box = pie.split().column()
box.operator("wm.link", text="Link", icon='LINK_BLEND')
box.operator("wm.append", text="Append", icon='APPEND_BLEND')
- box.menu("EXTERNAL_MT_data", text="External Data")
+ box.separator()
+ box.operator("file.autopack_toggle", text="Automatically Pack Into .blend")
+ box.operator("file.pack_all", text="Pack All Into .blend")
+ box.operator("file.unpack_all", text="Unpack All Into Files")
+ box.separator()
+ box.operator("file.make_paths_relative", text="Make All Paths Relative")
+ box.operator("file.make_paths_absolute", text="Make All Paths Absolute")
class PIE_MT_recover(Menu):
@@ -87,7 +92,9 @@ class PIE_MT_recover(Menu):
box.operator("wm.recover_auto_save", text="Recover Auto Save...", icon='NONE')
box.operator("wm.recover_last_session", text="Recover Last Session", icon='RECOVER_LAST')
box.operator("wm.revert_mainfile", text="Revert", icon='FILE_REFRESH')
-
+ box.separator()
+ box.operator("file.report_missing_files", text="Report Missing Files")
+ box.operator("file.find_missing_files", text="Find Missing Files")
class PIE_MT_fileio(Menu):
bl_idname = "PIE_MT_fileio"
@@ -102,26 +109,7 @@ class PIE_MT_fileio(Menu):
box.menu("TOPBAR_MT_file_export", icon='EXPORT')
-class PIE_MT_ExternalData(Menu):
- bl_idname = "EXTERNAL_MT_data"
- bl_label = "External Data"
-
- def draw(self, context):
- layout = self.layout
-
- layout.operator("file.autopack_toggle", text="Automatically Pack Into .blend")
- layout.separator()
- layout.operator("file.pack_all", text="Pack All Into .blend")
- layout.operator("file.unpack_all", text="Unpack All Into Files")
- layout.separator()
- layout.operator("file.make_paths_relative", text="Make All Paths Relative")
- layout.operator("file.make_paths_absolute", text="Make All Paths Absolute")
- layout.operator("file.report_missing_files", text="Report Missing Files")
- layout.operator("file.find_missing_files", text="Find Missing Files")
-
-
# Save Incremental
-
class PIE_OT_FileIncrementalSave(Operator):
bl_idname = "file.save_incremental"
bl_label = "Save Incremental"
@@ -174,7 +162,6 @@ class PIE_OT_FileIncrementalSave(Operator):
classes = (
PIE_MT_SaveOpen,
- PIE_MT_ExternalData,
PIE_OT_FileIncrementalSave,
PIE_MT_fileio,
PIE_MT_recover,
@@ -191,7 +178,7 @@ def register():
wm = bpy.context.window_manager
if wm.keyconfigs.addon:
# Save/Open/...
- km = wm.keyconfigs.addon.keymaps.new(name='Object Non-modal')
+ km = wm.keyconfigs.addon.keymaps.new(name='Window')
kmi = km.keymap_items.new('wm.call_menu_pie', 'S', 'PRESS', ctrl=True)
kmi.properties.name = "PIE_MT_saveopen"
addon_keymaps.append((km, kmi))
diff --git a/space_view3d_pie_menus/pie_select_menu.py b/space_view3d_pie_menus/pie_select_menu.py
index 48819c13..c1cdf2af 100644
--- a/space_view3d_pie_menus/pie_select_menu.py
+++ b/space_view3d_pie_menus/pie_select_menu.py
@@ -47,11 +47,30 @@ class PIE_MT_SelectionsMore(Menu):
layout = self.layout
pie = layout.menu_pie()
box = pie.split().column()
- box.operator("object.select_by_type", text="Select By Type", icon='SNAP_VOLUME')
- box.operator("object.select_grouped", text="Select Grouped", icon='NONE')
- box.operator("object.select_linked", text="Select Linked", icon='CONSTRAINT_BONE')
- box.menu("VIEW3D_MT_select_object_more_less", text="More/Less")
+ box.operator("object.select_random", text="Select Random")
+ box.operator("object.select_linked", text="Select Linked")
+ box.separator()
+ box.operator("object.select_more", text="More")
+ box.operator("object.select_less", text="Less")
+ box.separator()
+
+ props = box.operator("object.select_hierarchy", text="Parent")
+ props.extend = False
+ props.direction = 'PARENT'
+
+ props = box.operator("object.select_hierarchy", text="Child")
+ props.extend = False
+ props.direction = 'CHILD'
+ box.separator()
+
+ props = box.operator("object.select_hierarchy", text="Extend Parent")
+ props.extend = True
+ props.direction = 'PARENT'
+
+ props = box.operator("object.select_hierarchy", text="Extend Child")
+ props.extend = True
+ props.direction = 'CHILD'
# Pie Selection Object Mode - A
class PIE_MT_SelectionsOM(Menu):
@@ -62,9 +81,9 @@ class PIE_MT_SelectionsOM(Menu):
layout = self.layout
pie = layout.menu_pie()
# 4 - LEFT
- pie.row().label(text="")
+ pie.operator("object.select_grouped", text="Select Grouped")
# 6 - RIGHT
- pie.operator("object.select_random", text="Select Random", icon='GROUP_VERTEX')
+ pie.operator("object.select_by_type", text="Select By Type")
# 2 - BOTTOM
pie.operator("object.select_all", text="Invert Selection",
icon='ZOOM_PREVIOUS').action = 'INVERT'
@@ -72,13 +91,13 @@ class PIE_MT_SelectionsOM(Menu):
pie.operator("object.select_all", text="Select All Toggle",
icon='NONE').action = 'TOGGLE'
# 7 - TOP - LEFT
- pie.operator("view3d.select_circle", text="Circle Select", icon='NONE')
+ pie.operator("view3d.select_circle", text="Circle Select")
# 9 - TOP - RIGHT
- pie.operator("view3d.select_box", text="Box Select", icon='NONE')
+ pie.operator("view3d.select_box", text="Box Select")
# 1 - BOTTOM - LEFT
- pie.operator("object.select_camera", text="Select Camera", icon='CAMERA_DATA')
+ pie.operator("object.select_camera", text="Select Camera")
# 3 - BOTTOM - RIGHT
- pie.menu("PIE_MT_selectionsmore", text="Select Menu", icon='RESTRICT_SELECT_OFF')
+ pie.menu("PIE_MT_selectionsmore", text="Select Menu")
# Pie Selection Edit Mode
@@ -90,25 +109,19 @@ class PIE_MT_SelectionsEM(Menu):
layout = self.layout
pie = layout.menu_pie()
# 4 - LEFT
- pie.operator("view3d.select_box", text="Box Select",
- icon='NONE')
+ pie.operator("mesh.select_less", text="Select Less")
# 6 - RIGHT
- pie.menu("OBJECT_MT_selectloopselection", text="Select Loop Menu", icon='NONE')
+ pie.operator("mesh.select_more", text="Select More")
# 2 - BOTTOM
- pie.operator("mesh.select_all", text="Select None",
- icon='RESTRICT_SELECT_ON').action = 'DESELECT'
+ pie.menu("OBJECT_MT_selectloopselection", text="Select Loop Menu")
# 8 - TOP
- pie.operator("mesh.select_all", text="Select All",
- icon='RESTRICT_SELECT_OFF').action = 'SELECT'
+ pie.operator("mesh.select_all", text="Select All Toggle").action = 'TOGGLE'
# 7 - TOP - LEFT
- pie.operator("mesh.select_all", text="Select All Toggle",
- icon='ARROW_LEFTRIGHT').action = 'TOGGLE'
+ pie.operator("view3d.select_circle", text="Circle Select")
# 9 - TOP - RIGHT
- pie.operator("mesh.select_all", text="Invert Selection",
- icon='FULLSCREEN_EXIT').action = 'INVERT'
+ pie.operator("view3d.select_box", text="Box Select")
# 1 - BOTTOM - LEFT
- pie.operator("view3d.select_circle", text="Circle Select",
- icon='NONE')
+ pie.operator("mesh.select_all", text="Invert Selection").action = 'INVERT'
# 3 - BOTTOM - RIGHT
pie.menu("PIE_MT_selectallbyselection", text="Edit Modes", icon='VERTEXSEL')
diff --git a/space_view3d_pie_menus/pie_snap_menu.py b/space_view3d_pie_menus/pie_snap_menu.py
deleted file mode 100644
index 11058861..00000000
--- a/space_view3d_pie_menus/pie_snap_menu.py
+++ /dev/null
@@ -1,268 +0,0 @@
-# ##### 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 #####
-
-# <pep8 compliant>
-
-bl_info = {
- "name": "Hotkey: 'Ctrl Shift Tab'",
- "description": "Snap Element Menu",
- "author": "pitiwazou, meta-androcto",
- "version": (0, 1, 1),
- "blender": (2, 80, 0),
- "location": "3d View",
- "warning": "",
- "wiki_url": "",
- "category": "Snap Element Pie"
- }
-
-import bpy
-from bpy.types import (
- Menu,
- Operator,
- )
-
-
-# Pie Snap - Shift + Tab
-class PIE_MT_Snaping(Menu):
- bl_idname = "PIE_MT_snapping"
- bl_label = "Pie Snapping"
-
- def draw(self, context):
- layout = self.layout
- pie = layout.menu_pie()
- # 4 - LEFT
- pie.operator("snap.vertex", text="Vertex", icon='SNAP_VERTEX')
- # 6 - RIGHT
- pie.operator("snap.face", text="Face", icon='SNAP_FACE')
- # 2 - BOTTOM
- pie.operator("snap.edge", text="Edge", icon='SNAP_EDGE')
- # 8 - TOP
- pie.prop(context.tool_settings, "use_snap", text="Snap On/Off")
- # 7 - TOP - LEFT
- pie.operator("snap.volume", text="Volume", icon='SNAP_VOLUME')
- # 9 - TOP - RIGHT
- pie.operator("snap.increment", text="Increment", icon='SNAP_INCREMENT')
- # 1 - BOTTOM - LEFT
- pie.operator("snap.alignrotation", text="Align rotation", icon='SNAP_NORMAL')
- # 3 - BOTTOM - RIGHT
- pie.operator("wm.call_menu_pie", text="Snap Target", icon='NONE').name = "SNAP_MT_targetmenu"
-
-
-class PIE_OT_SnapActive(Operator):
- bl_idname = "snap.active"
- bl_label = "Snap Active"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
-
- if ts.use_snap is True:
- ts.use_snap = False
-
- elif ts.use_snap is False:
- ts.use_snap = True
-
- return {'FINISHED'}
-
-
-class PIE_OT_SnapVolume(Operator):
- bl_idname = "snap.volume"
- bl_label = "Snap Volume"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
- if ts.use_snap is False:
- ts.use_snap = True
- ts.snap_elements = {'VOLUME'}
- if ts.snap_elements != {'VOLUME'}:
- ts.snap_elements = {'VOLUME'}
- return {'FINISHED'}
-
-
-class PIE_OT_SnapFace(Operator):
- bl_idname = "snap.face"
- bl_label = "Snap Face"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
-
- if ts.use_snap is False:
- ts.use_snap = True
- ts.snap_elements = {'FACE'}
-
- if ts.snap_elements != {'FACE'}:
- ts.snap_elements = {'FACE'}
- return {'FINISHED'}
-
-
-class PIE_OT_SnapEdge(Operator):
- bl_idname = "snap.edge"
- bl_label = "Snap Edge"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
-
- if ts.use_snap is False:
- ts.use_snap = True
- ts.snap_elements = {'EDGE'}
-
- if ts.snap_elements != {'EDGE'}:
- ts.snap_elements = {'EDGE'}
- return {'FINISHED'}
-
-
-class PIE_OT_SnapVertex(Operator):
- bl_idname = "snap.vertex"
- bl_label = "Snap Vertex"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
-
- if ts.use_snap is False:
- ts.use_snap = True
- ts.snap_elements = {'VERTEX'}
-
- if ts.snap_elements != {'VERTEX'}:
- ts.snap_elements = {'VERTEX'}
- return {'FINISHED'}
-
-
-class PIE_OT_SnapIncrement(Operator):
- bl_idname = "snap.increment"
- bl_label = "Snap Increment"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
-
- if ts.use_snap is False:
- ts.use_snap = True
- ts.snap_elements = {'INCREMENT'}
-
- if ts.snap_elements != {'INCREMENT'}:
- ts.snap_elements = {'INCREMENT'}
- return {'FINISHED'}
-
-
-class PIE_OT_SnapAlignRotation(Operator):
- bl_idname = "snap.alignrotation"
- bl_label = "Snap Align rotation"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- ts = context.tool_settings
-
- if ts.use_snap_align_rotation is True:
- ts.use_snap_align_rotation = False
-
- elif ts.use_snap_align_rotation is False:
- ts.use_snap_align_rotation = True
-
- return {'FINISHED'}
-
-
-class PIE_OT_SnapTargetVariable(Operator):
- bl_idname = "object.snaptargetvariable"
- bl_label = "Snap Target Variable"
- bl_options = {'REGISTER', 'UNDO'}
-
- variable: bpy.props.StringProperty()
-
- @classmethod
- def poll(cls, context):
- return True
-
- def execute(self, context):
- ts = context.tool_settings
-
- ts.snap_target = self.variable
- return {'FINISHED'}
-
-# Menu Snap Target - Shift + Tab
-
-
-class PIE_MT_SnapTargetMenu(Menu):
- bl_idname = "SNAP_MT_targetmenu"
- bl_label = "Snap Target Menu"
-
- def draw(self, context):
- layout = self.layout
- pie = layout.menu_pie()
- # 4 - LEFT
- pie.operator("object.snaptargetvariable", text="Active").variable = 'ACTIVE'
- # 6 - RIGHT
- pie.operator("object.snaptargetvariable", text="Median").variable = 'MEDIAN'
- # 2 - BOTTOM
- pie.operator("object.snaptargetvariable", text="Center").variable = 'CENTER'
- # 8 - TOP
- pie.operator("object.snaptargetvariable", text="Closest").variable = 'CLOSEST'
- # 7 - TOP - LEFT
- # 9 - TOP - RIGHT
- # 1 - BOTTOM - LEFT
- # 3 - BOTTOM - RIGHT
-
-
-# Pie Snapping - Shift + Tab
-
-classes = (
- PIE_MT_Snaping,
- PIE_MT_SnapTargetMenu,
- PIE_OT_SnapActive,
- PIE_OT_SnapVolume,
- PIE_OT_SnapFace,
- PIE_OT_SnapEdge,
- PIE_OT_SnapVertex,
- PIE_OT_SnapIncrement,
- PIE_OT_SnapAlignRotation,
- PIE_OT_SnapTargetVariable
- )
-
-addon_keymaps = []
-
-
-def register():
- for cls in classes:
- bpy.utils.register_class(cls)
-
- wm = bpy.context.window_manager
- if wm.keyconfigs.addon:
- # Snapping
- km = wm.keyconfigs.addon.keymaps.new(name='3D View Generic', space_type='VIEW_3D')
- kmi = km.keymap_items.new('wm.call_menu_pie', 'TAB', 'PRESS', ctrl=True, shift=True)
- kmi.properties.name = "PIE_MT_snapping"
- addon_keymaps.append((km, kmi))
-
-
-def unregister():
- for cls in classes:
- bpy.utils.unregister_class(cls)
-
- wm = bpy.context.window_manager
- kc = wm.keyconfigs.addon
- if kc:
- for km, kmi in addon_keymaps:
- km.keymap_items.remove(kmi)
- addon_keymaps.clear()
-
-
-if __name__ == "__main__":
- register()
diff --git a/space_view3d_spacebar_menu/__init__.py b/space_view3d_spacebar_menu/__init__.py
index 845740c9..2cf797ef 100644
--- a/space_view3d_spacebar_menu/__init__.py
+++ b/space_view3d_spacebar_menu/__init__.py
@@ -41,6 +41,7 @@ if "bpy" in locals():
importlib.reload(curve_menus)
importlib.reload(snap_origin_cursor)
importlib.reload(sculpt_brush_paint)
+ importlib.reload(animation_menus)
else:
from . import object_menus
@@ -52,6 +53,7 @@ else:
from . import curve_menus
from . import snap_origin_cursor
from . import sculpt_brush_paint
+ from . import animation_menus
import bpy
from bpy.types import (
@@ -91,8 +93,8 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("INFO_MT_area", icon='WORKSPACE')
- layout.menu("VIEW3D_MT_View_Directions", icon='ZOOM_ALL')
- layout.menu("VIEW3D_MT_View_Navigation", icon='PIVOT_BOUNDBOX')
+ layout.menu("VIEW3D_MT_view_viewpoint", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view_navigation", icon='PIVOT_BOUNDBOX')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
UseSeparator(self, context)
@@ -118,7 +120,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -142,9 +144,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Mesh Edit Mode #
if obj and obj.type == 'MESH' and obj.mode in {'EDIT'}:
@@ -156,7 +155,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Edit_Mesh", icon='RESTRICT_SELECT_OFF')
layout.menu("VIEW3D_MT_Edit_Multi", icon='VERTEXSEL')
UseSeparator(self, context)
@@ -178,9 +177,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("VIEW3D_MT_edit_mesh_delete", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Sculpt Mode #
if obj and obj.type == 'MESH' and obj.mode in {'SCULPT'}:
@@ -192,7 +188,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Sculpts", icon='SCULPTMODE_HLT')
layout.menu("VIEW3D_MT_Angle_Control", text="Angle Control", icon='BRUSH_SCULPT_DRAW')
@@ -202,9 +198,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("VIEW3D_MT_Sculpt_Specials", icon='SOLO_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Vertex Paint #
if obj and obj.type == 'MESH' and obj.mode in {'VERTEX_PAINT'}:
@@ -216,7 +209,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
UseSeparator(self, context)
# layout.menu("VIEW3D_MT_Brush_Settings", icon='BRUSH_DATA')
layout.menu("VIEW3D_MT_Brush_Selection",
@@ -224,9 +217,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("VIEW3D_MT_Vertex_Colors", icon='GROUP_VCOL')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Weight Paint Menu #
if obj and obj.type == 'MESH' and obj.mode in {'WEIGHT_PAINT'}:
@@ -238,7 +228,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Paint_Weights", icon='WPAINT_HLT')
# layout.menu("VIEW3D_MT_Brush_Settings", icon='BRUSH_DATA')
@@ -246,9 +236,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
text="Weight Paint Tool", icon='BRUSH_TEXMASK')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Texture Paint #
if obj and obj.type == 'MESH' and obj.mode in {'TEXTURE_PAINT'}:
@@ -260,15 +247,12 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_InteractiveMode", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
# layout.menu("VIEW3D_MT_Brush_Settings", icon='BRUSH_DATA')
layout.menu("VIEW3D_MT_Brush_Selection",
text="Texture Paint Tool", icon='SCULPTMODE_HLT')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Curve Object Mode #
if obj and obj.type == 'CURVE' and obj.mode in {'OBJECT'}:
@@ -281,7 +265,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -304,9 +288,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Edit Curve #
if obj and obj.type == 'CURVE' and obj.mode in {'EDIT'}:
@@ -318,7 +299,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Edit_Curve",
icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
@@ -338,9 +319,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Surface Object Mode #
if obj and obj.type == 'SURFACE' and obj.mode in {'OBJECT'}:
@@ -353,7 +331,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -375,9 +353,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Edit Surface #
if obj and obj.type == 'SURFACE' and obj.mode in {'EDIT'}:
@@ -389,7 +364,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Edit_Surface", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_surface_add", text="Add Surface",
@@ -409,9 +384,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
icon='CANCEL')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Metaball Object Mode #
if obj and obj.type == 'META' and obj.mode in {'OBJECT'}:
@@ -424,7 +396,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -445,9 +417,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Edit Metaball #
if obj and obj.type == 'META' and obj.mode in {'EDIT'}:
@@ -459,7 +428,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_SelectMetaball", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.operator_menu_enum("object.metaball_add", "type",
@@ -478,9 +447,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
icon='CANCEL')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Text Object Mode #
if obj and obj.type == 'FONT' and obj.mode in {'OBJECT'}:
@@ -493,7 +459,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.operator("view3d.interactive_mode_text", icon='VIEW3D')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -516,9 +482,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Text Edit Mode #
# To Do: Space is already reserved for the typing tool
@@ -533,14 +496,11 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
UseSeparator(self, context)
layout.operator("object.editmode_toggle", text="Enter Object Mode",
icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_select_edit_text", icon='VIEW3D')
layout.menu("VIEW3D_MT_edit_font", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Camera Object Mode #
if obj and obj.type == 'CAMERA' and obj.mode in {'OBJECT'}:
@@ -552,7 +512,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("wm.toolbar", text="Tools", icon='TOOL_SETTINGS')
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -573,9 +533,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Lamp Object Mode #
if obj and obj.type == 'LIGHT' and obj.mode in {'OBJECT'}:
@@ -587,7 +544,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("wm.toolbar", text="Tools", icon='TOOL_SETTINGS')
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -608,9 +565,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Armature Object Mode #
if obj and obj.type == 'ARMATURE' and obj.mode in {'OBJECT'}:
@@ -623,7 +577,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Armature", icon='VIEW3D')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -645,9 +599,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Armature Edit #
if obj and obj.type == 'ARMATURE' and obj.mode in {'EDIT'}:
@@ -659,7 +610,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Armature", icon='VIEW3D')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Edit_Armature",
icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
@@ -682,9 +633,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Armature Pose #
if obj and obj.type == 'ARMATURE' and obj.mode in {'POSE'}:
@@ -698,7 +646,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Armature", icon='VIEW3D')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Pose", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Pose", icon='ARMATURE_DATA')
@@ -723,10 +671,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
-
# Lattice Object Mode #
if obj and obj.type == 'LATTICE' and obj.mode in {'OBJECT'}:
@@ -738,7 +682,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -761,9 +705,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Edit Lattice #
if obj and obj.type == 'LATTICE' and obj.mode in {'EDIT'}:
@@ -775,7 +716,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_Object_Interactive_Other", icon='OBJECT_DATA')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Edit_Lattice",
icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
@@ -791,9 +732,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("lattice.make_regular")
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Empty Object Mode #
if obj and obj.type == 'EMPTY' and obj.mode in {'OBJECT'}:
@@ -805,7 +743,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("wm.toolbar", text="Tools", icon='TOOL_SETTINGS')
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -827,9 +765,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Speaker Object Mode #
if obj and obj.type == 'SPEAKER' and obj.mode in {'OBJECT'}:
@@ -841,7 +776,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("wm.toolbar", text="Tools", icon='TOOL_SETTINGS')
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -859,9 +794,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Particle Menu #
if obj and context.mode == 'PARTICLE':
@@ -873,7 +805,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_InteractiveMode", icon='VIEW3D')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Particle",
icon='RESTRICT_SELECT_OFF')
layout.menu("VIEW3D_MT_Selection_Mode_Particle",
@@ -894,9 +826,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Grease Pencil Object Mode #
if obj and obj.type == 'GPENCIL' and obj.mode in {'OBJECT'}:
@@ -908,7 +837,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_Select_Object", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -932,9 +861,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.operator("object.delete", text="Delete Object", icon='X')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Grease Pencil Edit Mode #
if obj and obj.type == 'GPENCIL' and obj.mode in {'EDIT_GPENCIL'}:
@@ -947,7 +873,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_select_gpencil", icon='RESTRICT_SELECT_OFF')
layout.menu("VIEW3D_MT_edit_gpencil", icon='GREASEPENCIL')
UseSeparator(self, context)
@@ -959,9 +885,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
text="Cursor to Grid", icon='SNAP_GRID')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Grease Pencil Sculpt Mode #
if obj and obj.type == 'GPENCIL' and obj.mode in {'SCULPT_GPENCIL'}:
@@ -974,7 +897,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_select_gpencil", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -985,9 +908,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
text="Cursor to Grid", icon='SNAP_GRID')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Grease Pencil Paint Mode #
if obj and obj.type == 'GPENCIL' and obj.mode in {'PAINT_GPENCIL'}:
@@ -1000,7 +920,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_paint_gpencil", icon='RESTRICT_SELECT_OFF')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
@@ -1011,9 +931,6 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
text="Cursor to Grid", icon='SNAP_GRID')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Grease Pencil Weight Mode #
if obj and obj.type == 'GPENCIL' and obj.mode in {'WEIGHT_GPENCIL'}:
@@ -1026,15 +943,12 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_interactive_mode_gpencil", icon='EDITMODE_HLT')
- layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view", icon='ZOOM_ALL')
layout.menu("VIEW3D_MT_weight_gpencil", icon="GPBRUSH_WEIGHT")
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_UndoS", icon='ARROW_LEFTRIGHT')
- UseSeparator(self, context)
- layout.prop(view, "show_region_toolbar", icon='MENU_PANEL')
- layout.prop(view, "show_region_ui", icon='MENU_PANEL')
# Light Probe Menu #
if obj and obj.type == 'LIGHT_PROBE':
@@ -1047,8 +961,8 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout.menu("SCREEN_MT_user_menu", text="Quick Favorites", icon='HEART')
UseSeparator(self, context)
layout.menu("INFO_MT_area", icon='WORKSPACE')
- layout.menu("VIEW3D_MT_View_Directions", icon='ZOOM_ALL')
- layout.menu("VIEW3D_MT_View_Navigation", icon='PIVOT_BOUNDBOX')
+ layout.menu("VIEW3D_MT_view_viewpoint", icon='ZOOM_ALL')
+ layout.menu("VIEW3D_MT_view_navigation", icon='PIVOT_BOUNDBOX')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_AddMenu", icon='OBJECT_DATAMODE')
UseSeparator(self, context)
@@ -1126,6 +1040,7 @@ def register():
curve_menus.register()
snap_origin_cursor.register()
sculpt_brush_paint.register()
+ animation_menus.register()
wm = bpy.context.window_manager
kc = wm.keyconfigs.addon
@@ -1156,6 +1071,7 @@ def unregister():
curve_menus.unregister()
snap_origin_cursor.unregister()
sculpt_brush_paint.unregister()
+ animation_menus.unregister()
for cls in reversed(classes):
bpy.utils.unregister_class(cls)
diff --git a/space_view3d_spacebar_menu/animation_menus.py b/space_view3d_spacebar_menu/animation_menus.py
new file mode 100644
index 00000000..ece261f7
--- /dev/null
+++ b/space_view3d_spacebar_menu/animation_menus.py
@@ -0,0 +1,96 @@
+# ##### 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 #####
+# Contributed to by: meta-androcto, JayDez, sim88, sam, lijenstina, mkb, wisaac, CoDEmanX #
+
+
+import bpy
+from bpy.types import (
+ Operator,
+ Menu,
+ )
+from bpy.props import (
+ BoolProperty,
+ StringProperty,
+ )
+
+from bl_ui.properties_paint_common import UnifiedPaintPanel
+
+
+# Animation Menus
+class VIEW3D_MT_KeyframeMenu(Menu):
+ bl_label = "Keyframe"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator("anim.keyframe_insert_menu",
+ text="Insert Keyframe...")
+ layout.operator("anim.keyframe_delete_v3d",
+ text="Delete Keyframe...")
+ layout.operator("anim.keying_set_active_set",
+ text="Change Keying Set...")
+
+
+
+# Animation Player (Thanks to marvin.k.breuer) #
+class VIEW3D_MT_Animation_Player(Menu):
+ bl_label = "Animation"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("screen.animation_play", text="PLAY", icon='PLAY')
+ layout.operator("screen.animation_play", text="Stop", icon='PAUSE')
+ layout.operator("screen.animation_play", text="Reverse", icon='PLAY_REVERSE').reverse = True
+ layout.separator()
+
+
+ layout.operator("screen.keyframe_jump", text="Next FR", icon='NEXT_KEYFRAME').next = True
+ layout.operator("screen.keyframe_jump", text="Previous FR", icon='PREV_KEYFRAME').next = False
+ layout.separator()
+
+ layout.operator("screen.frame_jump", text="Jump FF", icon='FF').end = True
+ layout.operator("screen.frame_jump", text="Jump REW", icon='REW').end = False
+ layout.separator()
+
+ layout.menu("VIEW3D_MT_KeyframeMenu", text="Keyframes", icon='DECORATE_ANIMATE')
+
+
+
+# List The Classes #
+
+classes = (
+ VIEW3D_MT_KeyframeMenu,
+ VIEW3D_MT_Animation_Player,
+)
+
+
+# Register Classes & Hotkeys #
+def register():
+ for cls in classes:
+ bpy.utils.register_class(cls)
+
+
+# Unregister Classes & Hotkeys #
+def unregister():
+
+ for cls in reversed(classes):
+ bpy.utils.unregister_class(cls)
+
+
+if __name__ == "__main__":
+ register()
diff --git a/space_view3d_spacebar_menu/object_menus.py b/space_view3d_spacebar_menu/object_menus.py
index 86d44b50..5c3ef0ac 100644
--- a/space_view3d_spacebar_menu/object_menus.py
+++ b/space_view3d_spacebar_menu/object_menus.py
@@ -335,19 +335,6 @@ class VIEW3D_MT_Duplicate(Menu):
layout.operator("object.duplicate_move_linked")
-class VIEW3D_MT_KeyframeMenu(Menu):
- bl_label = "Keyframe"
-
- def draw(self, context):
- layout = self.layout
- layout.operator("anim.keyframe_insert_menu",
- text="Insert Keyframe...")
- layout.operator("anim.keyframe_delete_v3d",
- text="Delete Keyframe...")
- layout.operator("anim.keying_set_active_set",
- text="Change Keying Set...")
-
-
class VIEW3D_MT_UndoS(Menu):
bl_label = "Undo/Redo"
@@ -360,91 +347,6 @@ class VIEW3D_MT_UndoS(Menu):
layout.operator("ed.undo_history")
-# Display Wire (Thanks to marvin.k.breuer) #
-class VIEW3D_OT_Display_Wire_All(Operator):
- bl_label = "Wire on All Objects"
- bl_idname = "view3d.display_wire_all"
- bl_description = "Enable/Disable Display Wire on All Objects"
-
- @classmethod
- def poll(cls, context):
- return context.active_object is not None
-
- def execute(self, context):
- is_error = False
- for obj in bpy.data.objects:
- try:
- if obj.show_wire:
- obj.show_all_edges = False
- obj.show_wire = False
- else:
- obj.show_all_edges = True
- obj.show_wire = True
- except:
- is_error = True
- pass
-
- if is_error:
- self.report({'WARNING'},
- "Wire on All Objects could not be completed for some objects")
-
- return {'FINISHED'}
-
-
-# Matcap and AO, Wire all and X-Ray entries thanks to marvin.k.breuer
-class VIEW3D_MT_Shade(Menu):
- bl_label = "Shade"
-
- def draw(self, context):
- layout = self.layout
-
-# layout.prop(context.space_data, "viewport_shade", expand=True)
-
- if context.active_object:
- if(context.mode == 'EDIT_MESH'):
- layout.operator("MESH_OT_faces_shade_smooth", icon='SHADING_RENDERED')
- layout.operator("MESH_OT_faces_shade_flat", icon='SHADING_SOLID')
- else:
- layout.operator("OBJECT_OT_shade_smooth", icon='SHADING_RENDERED')
- layout.operator("OBJECT_OT_shade_flat", icon='SHADING_SOLID')
-
- layout.separator()
- layout.operator("view3d.display_wire_all", text="Wire all", icon='SHADING_WIRE')
- layout.prop(context.object, "show_in_front", text="X-Ray", icon="META_CUBE")
-
- layout.separator()
- layout.prop(context.space_data.fx_settings, "use_ssao",
- text="Ambient Occlusion", icon="GROUP")
-# layout.prop(context.space_data, "use_matcap", icon="MATCAP_01")
-
-# if context.space_data.use_matcap:
-# row = layout.column(1)
-# row.scale_y = 0.3
-# row.scale_x = 0.5
-# row.template_icon_view(context.space_data, "matcap_icon")
-
-
-# Animation Player (Thanks to marvin.k.breuer) #
-class VIEW3D_MT_Animation_Player(Menu):
- bl_label = "Animation"
-
- def draw(self, context):
- layout = self.layout
-
- layout.operator("screen.frame_jump", text="Jump REW", icon='REW').end = False
- layout.operator("screen.keyframe_jump", text="Previous FR", icon='PREV_KEYFRAME').next = False
-
- layout.separator()
- layout.operator("screen.animation_play", text="Reverse", icon='PLAY_REVERSE').reverse = True
- layout.operator("screen.animation_play", text="PLAY", icon='PLAY')
- layout.operator("screen.animation_play", text="Stop", icon='PAUSE')
- layout.separator()
-
- layout.operator("screen.keyframe_jump", text="Next FR", icon='NEXT_KEYFRAME').next = True
- layout.operator("screen.frame_jump", text="Jump FF", icon='FF').end = True
- layout.menu("VIEW3D_MT_KeyframeMenu", text="Keyframes", icon='DECORATE_ANIMATE')
-
-
# Set Mode Operator #
class VIEW3D_OT_SetObjectMode(Operator):
bl_idname = "object.set_object_mode"
@@ -478,18 +380,14 @@ classes = (
VIEW3D_MT_MirrorMenu,
VIEW3D_MT_ParentMenu,
VIEW3D_MT_GroupMenu,
- VIEW3D_MT_KeyframeMenu,
VIEW3D_MT_UndoS,
VIEW3D_MT_Camera_Options,
VIEW3D_MT_InteractiveMode,
VIEW3D_MT_InteractiveModeOther,
VIEW3D_OT_SetObjectMode,
- VIEW3D_MT_Shade,
VIEW3D_MT_Object_Data_Link,
VIEW3D_MT_Duplicate,
- VIEW3D_MT_Animation_Player,
VIEW3D_OT_Interactive_Mode_Text,
- VIEW3D_OT_Display_Wire_All,
VIEW3D_OT_Interactive_Mode_Grease_Pencil,
VIEW3D_MT_Interactive_Mode_GPencil,
VIEW3D_MT_Edit_Gpencil,
diff --git a/space_view3d_spacebar_menu/view_menus.py b/space_view3d_spacebar_menu/view_menus.py
index 6f105ed2..107d6da3 100644
--- a/space_view3d_spacebar_menu/view_menus.py
+++ b/space_view3d_spacebar_menu/view_menus.py
@@ -28,176 +28,78 @@ from bpy.props import (
StringProperty,
)
-from .object_menus import *
-
# View Menu's #
-
-class VIEW3D_MT_View_Directions(Menu):
- bl_label = "Viewpoint"
+# Display Wire (Thanks to marvin.k.breuer) #
+class VIEW3D_OT_Display_Wire_All(Operator):
+ bl_label = "Wire on All Objects"
+ bl_idname = "view3d.display_wire_all"
+ bl_description = "Enable/Disable Display Wire on All Objects"
+
+ @classmethod
+ def poll(cls, context):
+ return context.active_object is not None
+
+ def execute(self, context):
+ is_error = False
+ for obj in bpy.data.objects:
+ try:
+ if obj.show_wire:
+ obj.show_all_edges = False
+ obj.show_wire = False
+ else:
+ obj.show_all_edges = True
+ obj.show_wire = True
+ except:
+ is_error = True
+ pass
+
+ if is_error:
+ self.report({'WARNING'},
+ "Wire on All Objects could not be completed for some objects")
+
+ return {'FINISHED'}
+
+
+# Matcap and AO, Wire all and X-Ray entries thanks to marvin.k.breuer
+class VIEW3D_MT_Shade(Menu):
+ bl_label = "Shade"
def draw(self, context):
layout = self.layout
- layout.operator("view3d.view_camera", text="Camera")
-
- layout.separator()
-
- layout.operator("view3d.view_axis", text="Top").type = 'TOP'
- layout.operator("view3d.view_axis", text="Bottom").type = 'BOTTOM'
-
- layout.separator()
-
- layout.operator("view3d.view_axis", text="Front").type = 'FRONT'
- layout.operator("view3d.view_axis", text="Back").type = 'BACK'
-
- layout.separator()
-
- layout.operator("view3d.view_axis", text="Right").type = 'RIGHT'
- layout.operator("view3d.view_axis", text="Left").type = 'LEFT'
-
-
-class VIEW3D_MT_View_Border(Menu):
- bl_label = "View Border"
-
- def draw(self, context):
- layout = self.layout
- layout.operator_context = 'INVOKE_REGION_WIN'
-# layout.operator("view3d.clip_border", text="Clipping Border...")
- layout.operator("view3d.zoom_border", text="Zoom Border...")
- layout.operator("view3d.render_border", text="Render Border...")
- layout.operator("view3d.clear_render_border")
-
-
-class VIEW3D_MT_View_Menu(Menu):
- bl_label = "View"
-
- def draw(self, context):
- layout = self.layout
- view = context.space_data
-
- layout.menu("INFO_MT_area")
- layout.separator()
- layout.operator("view3d.view_selected", text="Frame Selected").use_all_regions = False
- if view.region_quadviews:
- layout.operator("view3d.view_selected", text="Frame Selected (Quad View)").use_all_regions = True
- layout.operator("view3d.view_all", text="Frame All").center = False
- layout.operator("view3d.view_persportho", text="Perspective/Orthographic")
- layout.menu("VIEW3D_MT_View_Local")
- layout.separator()
- layout.menu("VIEW3D_MT_view_cameras", text="Cameras")
- layout.separator()
- layout.menu("VIEW3D_MT_View_Directions")
- layout.menu("VIEW3D_MT_View_Navigation")
- layout.separator()
- layout.menu("VIEW3D_MT_View_Align")
- layout.menu("VIEW3D_MT_view_align_selected")
- layout.separator()
- layout.operator_context = 'INVOKE_REGION_WIN'
- layout.menu("VIEW3D_MT_view_regions", text="View Regions")
- layout.menu("VIEW3D_MT_Shade")
- layout.separator()
- layout.operator("render.opengl", icon='RENDER_STILL')
- layout.operator("render.opengl", text="Viewport Render Animation", icon='RENDER_ANIMATION').animation = True
-
+# layout.prop(context.space_data, "viewport_shade", expand=True)
-class VIEW3D_MT_View_Navigation(Menu):
- bl_label = "Navigation"
+ if context.active_object:
+ if(context.mode == 'EDIT_MESH'):
+ layout.operator("MESH_OT_faces_shade_smooth", icon='SHADING_RENDERED')
+ layout.operator("MESH_OT_faces_shade_flat", icon='SHADING_SOLID')
+ else:
+ layout.operator("OBJECT_OT_shade_smooth", icon='SHADING_RENDERED')
+ layout.operator("OBJECT_OT_shade_flat", icon='SHADING_SOLID')
- def draw(self, context):
- from math import pi
- layout = self.layout
- layout.operator_enum("view3d.view_orbit", "type")
- props = layout.operator("view3d.view_orbit", text ="Orbit Opposite")
- props.type = 'ORBITRIGHT'
- props.angle = pi
-
- layout.separator()
- layout.operator("view3d.view_roll", text="Roll Left").type = 'LEFT'
- layout.operator("view3d.view_roll", text="Roll Right").type = 'RIGHT'
- layout.separator()
- layout.operator_enum("view3d.view_pan", "type")
layout.separator()
- layout.operator("view3d.zoom", text="Zoom In").delta = 1
- layout.operator("view3d.zoom", text="Zoom Out").delta = -1
- layout.separator()
- layout.operator("view3d.zoom_camera_1_to_1", text="Zoom Camera 1:1")
- layout.separator()
- layout.operator("view3d.fly")
- layout.operator("view3d.walk")
-
-
-class VIEW3D_MT_View_Align(Menu):
- bl_label = "Align View"
+ layout.operator("view3d.display_wire_all", text="Wire all", icon='SHADING_WIRE')
- def draw(self, context):
- layout = self.layout
- layout.operator("view3d.camera_to_view", text="Align Active Camera to View")
- layout.operator("view3d.camera_to_view_selected", text="Align Active Camera to Selected")
- layout.separator()
- layout.operator("view3d.view_all", text="Center Cursor and View All").center = True
- layout.operator("view3d.view_center_cursor")
layout.separator()
- layout.operator("view3d.view_lock_to_active")
- layout.operator("view3d.view_lock_clear")
+ layout.prop(context.space_data.fx_settings, "use_ssao",
+ text="Ambient Occlusion", icon="GROUP")
+# layout.prop(context.space_data, "use_matcap", icon="MATCAP_01")
+# if context.space_data.use_matcap:
+# row = layout.column(1)
+# row.scale_y = 0.3
+# row.scale_x = 0.5
+# row.template_icon_view(context.space_data, "matcap_icon")
-class VIEW3D_MT_View_Align_Selected(Menu):
- bl_label = "Align View to Active"
-
- def draw(self, context):
- layout = self.layout
- props = layout.operator("view3d.viewnumpad", text="Top")
- props.align_active = True
- props.type = 'TOP'
- props = layout.operator("view3d.viewnumpad", text="Bottom")
- props.align_active = True
- props.type = 'BOTTOM'
- props = layout.operator("view3d.viewnumpad", text="Front")
- props.align_active = True
- props.type = 'FRONT'
- props = layout.operator("view3d.viewnumpad", text="Back")
- props.align_active = True
- props.type = 'BACK'
- props = layout.operator("view3d.viewnumpad", text="Right")
- props.align_active = True
- props.type = 'RIGHT'
- props = layout.operator("view3d.viewnumpad", text="Left")
- props.align_active = True
- props.type = 'LEFT'
-
-
-class VIEW3D_MT_View_Cameras(Menu):
- bl_label = "Cameras"
-
- def draw(self, context):
- layout = self.layout
- layout.operator("view3d.object_as_camera")
- layout.operator("view3d.viewnumpad", text="Active Camera").type = 'CAMERA'
-
-class VIEW3D_MT_View_Local(Menu):
- bl_label = "Local View"
-
- def draw(self, context):
- layout = self.layout
- view = context.space_data
-
- layout.operator("view3d.localview", text="Toggle Local View")
- layout.operator("view3d.localview_remove_from")
- layout.operator("view3d.view_persportho")
-
+def menu_func(self, context):
+ self.layout.menu("VIEW3D_MT_Shade")
# List The Classes #
classes = (
- VIEW3D_MT_View_Directions,
- VIEW3D_MT_View_Border,
- VIEW3D_MT_View_Menu,
- VIEW3D_MT_View_Navigation,
- VIEW3D_MT_View_Align,
- VIEW3D_MT_View_Align_Selected,
- VIEW3D_MT_View_Cameras,
- VIEW3D_MT_View_Local,
+ VIEW3D_MT_Shade,
+ VIEW3D_OT_Display_Wire_All,
)
@@ -206,13 +108,14 @@ def register():
for cls in classes:
bpy.utils.register_class(cls)
+ bpy.types.VIEW3D_MT_view.append(menu_func)
# Unregister Classes & Hotkeys #
def unregister():
for cls in reversed(classes):
bpy.utils.unregister_class(cls)
-
+ bpy.types.VIEW3D_MT_view.remove(menu_func)
if __name__ == "__main__":
register()