diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-15 18:55:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-15 19:05:28 +0300 |
commit | 8c37a7fe4a81e89c2400d4264b7fea8e89b56638 (patch) | |
tree | 6a21e76f5821b1f1f734f294c6a875211c48a159 | |
parent | 467303ba70d6f406a1942321f1962d2ce2491928 (diff) |
Update for object add align property changes
24 files changed, 67 insertions, 102 deletions
diff --git a/add_curve_extra_objects/add_curve_curly.py b/add_curve_extra_objects/add_curve_curly.py index 3a8153b5..813509c1 100644 --- a/add_curve_extra_objects/add_curve_curly.py +++ b/add_curve_extra_objects/add_curve_curly.py @@ -456,7 +456,7 @@ class add_curlycurve(Operator, AddObjectHelper): col = layout.column(align=True) # AddObjectHelper props - col.prop(self, "view_align") + col.prop(self, "align") col.prop(self, "location") col.prop(self, "rotation") diff --git a/add_curve_extra_objects/beveltaper_curve.py b/add_curve_extra_objects/beveltaper_curve.py index d85b985c..608b5bf5 100644 --- a/add_curve_extra_objects/beveltaper_curve.py +++ b/add_curve_extra_objects/beveltaper_curve.py @@ -195,7 +195,7 @@ def add_type1(self, context): def make_path(self, context, verts): target = bpy.context.view_layer.objects.active bpy.ops.curve.primitive_nurbs_path_add( - view_align=False, enter_editmode=False, location=(0, 0, 0) + align='WORLD', enter_editmode=False, location=(0, 0, 0) ) target.data.taper_object = bpy.context.view_layer.objects.active taper = bpy.context.view_layer.objects.active @@ -359,7 +359,7 @@ class add_bevelcurve(Operator, AddObjectHelper): col = layout.column(align=True) # AddObjectHelper props - col.prop(self, "view_align") + col.prop(self, "align") col.prop(self, "location") col.prop(self, "rotation") diff --git a/add_mesh_BoltFactory/Boltfactory.py b/add_mesh_BoltFactory/Boltfactory.py index c021f111..2f1f6bfc 100644 --- a/add_mesh_BoltFactory/Boltfactory.py +++ b/add_mesh_BoltFactory/Boltfactory.py @@ -237,23 +237,6 @@ class add_mesh_bolt(Operator, AddObjectHelper): description='Flat distance of the Hex Nut' ) - # generic transform props - view_align: BoolProperty( - name="Align to View", - default=False, - update=AddObjectHelper.view_align_update_callback, - ) - - location: FloatVectorProperty( - name="Location", - subtype='TRANSLATION', - ) - - rotation: FloatVectorProperty( - name="Rotation", - subtype='EULER', - ) - def draw(self, context): layout = self.layout col = layout.column() @@ -314,7 +297,7 @@ class add_mesh_bolt(Operator, AddObjectHelper): # generic transform props col.separator() - col.prop(self, 'view_align') + col.prop(self, 'align') col.prop(self, 'location') col.prop(self, 'rotation') @@ -355,4 +338,4 @@ def unregister(): from bpy.utils import unregister_class for cls in reversed(classes): unregister_class(cls) - bpy.types.VIEW3D_MT_mesh_add.remove(menu_func_bolt)
\ No newline at end of file + bpy.types.VIEW3D_MT_mesh_add.remove(menu_func_bolt) diff --git a/add_mesh_extra_objects/add_mesh_honeycomb.py b/add_mesh_extra_objects/add_mesh_honeycomb.py index 94c6f63f..d382b587 100644 --- a/add_mesh_extra_objects/add_mesh_honeycomb.py +++ b/add_mesh_extra_objects/add_mesh_honeycomb.py @@ -1,7 +1,10 @@ # GPL # "author": "Kayo Phoenix" import bpy -from bpy_extras import object_utils +from bpy_extras.object_utils import ( + AddObjectHelper, + object_data_add, + ) from math import ( pi, sin, cos, @@ -207,7 +210,7 @@ def edge_max(diam): return diam * sin(pi / 3) -class add_mesh_honeycomb(bpy.types.Operator): +class add_mesh_honeycomb(bpy.types.Operator, AddObjectHelper): bl_idname = "mesh.honeycomb_add" bl_label = "Add HoneyComb" bl_description = "Simple honeycomb mesh generator" @@ -248,19 +251,6 @@ class add_mesh_honeycomb(bpy.types.Operator): min=0.0, update=fix_edge, description='Width of the edge' ) - # generic transform props - view_align: BoolProperty( - name="Align to View", - default=False - ) - location: FloatVectorProperty( - name="Location", - subtype='TRANSLATION' - ) - rotation: FloatVectorProperty( - name="Rotation", - subtype='EULER' - ) @classmethod def poll(cls, context): @@ -275,6 +265,6 @@ class add_mesh_honeycomb(bpy.types.Operator): mesh.from_pydata(vertices=verts, edges=[], faces=faces) mesh.update() - object_utils.object_data_add(context, mesh, operator=self) + object_data_add(context, mesh, operator=self) return {'FINISHED'} diff --git a/add_mesh_extra_objects/add_mesh_menger_sponge.py b/add_mesh_extra_objects/add_mesh_menger_sponge.py index 20b0d102..1e932e20 100644 --- a/add_mesh_extra_objects/add_mesh_menger_sponge.py +++ b/add_mesh_extra_objects/add_mesh_menger_sponge.py @@ -3,6 +3,12 @@ # This file is distributed under the MIT License. See the LICENSE.md for more details. import bpy + +from bpy_extras.object_utils import ( + AddObjectHelper, + object_data_add, + ) + from bpy.props import ( IntProperty, BoolProperty, @@ -138,7 +144,7 @@ class MengerSponge(object): depth - 1) -class AddMengerSponge(bpy.types.Operator): +class AddMengerSponge(bpy.types.Operator, AddObjectHelper): bl_idname = "mesh.menger_sponge_add" bl_label = "Menger Sponge" bl_description = "Construct a menger sponge mesh" @@ -156,19 +162,6 @@ class AddMengerSponge(bpy.types.Operator): min=0.01, max=100.0, default=1.0, ) - # generic transform props - view_align: BoolProperty( - name="Align to View", - default=False, - ) - location: FloatVectorProperty( - name="Location", - subtype='TRANSLATION', - ) - rotation: FloatVectorProperty( - name="Rotation", - subtype='EULER', - ) layers: BoolVectorProperty( name="Layers", size=20, @@ -188,7 +181,6 @@ class AddMengerSponge(bpy.types.Operator): for i, uvloop in enumerate(mesh.uv_layers.active.data): uvloop.uv = uvs[i % 4] - from bpy_extras import object_utils - object_utils.object_data_add(context, mesh, operator=self) + object_data_add(context, mesh, operator=self) return {'FINISHED'} diff --git a/archipack/archipack_thumbs.py b/archipack/archipack_thumbs.py index 46d01543..3cdbee64 100644 --- a/archipack/archipack_thumbs.py +++ b/archipack/archipack_thumbs.py @@ -37,7 +37,7 @@ def create_lamp(context, loc): bpy.ops.object.light_add( type='POINT', radius=1, - view_align=False, + align='WORLD', location=loc) lamp = context.active_object lamp.data.use_nodes = True @@ -47,7 +47,7 @@ def create_lamp(context, loc): def create_camera(context, loc, rot): bpy.ops.object.camera_add( - view_align=True, + align='VIEW', enter_editmode=False, location=loc, rotation=rot) @@ -159,7 +159,7 @@ def generateThumb(context, cls, preset, engine): # add plane bpy.ops.mesh.primitive_plane_add( size=1000, - view_align=False, + align='WORLD', enter_editmode=False, location=(0, 0, 0) ) diff --git a/camera_dolly_crane_rigs.py b/camera_dolly_crane_rigs.py index 13025675..4a430813 100644 --- a/camera_dolly_crane_rigs.py +++ b/camera_dolly_crane_rigs.py @@ -525,7 +525,7 @@ def build_dolly_rig(context): bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.camera_add( - view_align=False, enter_editmode=False, location=(0, 0, 0), rotation=(0, 0, 0)) + align='WORLD', enter_editmode=False, location=(0, 0, 0), rotation=(0, 0, 0)) cam = bpy.context.active_object # this will name the Camera Object @@ -711,7 +711,7 @@ def build_crane_rig(context): bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.camera_add( - view_align=False, enter_editmode=False, location=(0, 0, 0), rotation=(0, 0, 0)) + align='WORLD', enter_editmode=False, location=(0, 0, 0), rotation=(0, 0, 0)) cam = bpy.context.active_object # this will name the Camera Object diff --git a/io_import_gimp_image_to_scene.py b/io_import_gimp_image_to_scene.py index f7b8233c..d4ed8f3b 100644 --- a/io_import_gimp_image_to_scene.py +++ b/io_import_gimp_image_to_scene.py @@ -292,7 +292,7 @@ def main(report, File, Path, LayerViewers, MixerViewers, LayerOffset, LayerNum += 1 # Object - bpy.ops.mesh.primitive_plane_add(view_align=False, + bpy.ops.mesh.primitive_plane_add(align='WORLD', enter_editmode=False, rotation=(0, 0, 0)) diff --git a/io_mesh_atomic/pdb_import.py b/io_mesh_atomic/pdb_import.py index 7d719cd8..815c9bc2 100644 --- a/io_mesh_atomic/pdb_import.py +++ b/io_mesh_atomic/pdb_import.py @@ -694,24 +694,24 @@ def draw_atoms_one_type(draw_all_atoms_type, # Now, build a representative sphere (atom). if atom[0] == "Vacancy": bpy.ops.mesh.primitive_cube_add( - view_align=False, enter_editmode=False, + align='WORLD', enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0)) else: # NURBS balls if Ball_type == "0": bpy.ops.surface.primitive_nurbs_surface_sphere_add( - view_align=False, enter_editmode=False, + align='WORLD', enter_editmode=False, location=(0,0,0), rotation=(0.0, 0.0, 0.0)) # UV balls elif Ball_type == "1": bpy.ops.mesh.primitive_uv_sphere_add( segments=Ball_azimuth, ring_count=Ball_zenith, - view_align=False, enter_editmode=False, + align='WORLD', enter_editmode=False, location=(0,0,0), rotation=(0, 0, 0)) # Meta balls elif Ball_type == "2": - bpy.ops.object.metaball_add(type='BALL', view_align=False, + bpy.ops.object.metaball_add(type='BALL', align='WORLD', enter_editmode=False, location=(0, 0, 0), rotation=(0, 0, 0)) @@ -1141,7 +1141,7 @@ def draw_sticks_normal(all_atoms, radius=Stick_diameter, depth=v.length, end_fill_type='NGON', - view_align=False, + align='WORLD', enter_editmode=False, location=location, rotation=(0, 0, 0)) @@ -1211,7 +1211,7 @@ def draw_sticks_normal(all_atoms, else: # Here we use an empty ... bpy.ops.object.empty_add(type='ARROWS', - view_align=False, + align='WORLD', location=(0, 0, 0), rotation=(0, 0, 0)) sticks_empty = bpy.context.view_layer.objects.active diff --git a/io_mesh_atomic/utility_panel.py b/io_mesh_atomic/utility_panel.py index 98dbdba5..776786c8 100644 --- a/io_mesh_atomic/utility_panel.py +++ b/io_mesh_atomic/utility_panel.py @@ -534,25 +534,25 @@ def draw_obj(atom_shape, atom, new_material): segments=32, ring_count=32, radius=1, - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0, 0, 0)) if atom_shape == '1b': #Sphere NURBS bpy.ops.surface.primitive_nurbs_surface_sphere_add( - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0.0, 0.0, 0.0)) if atom_shape == '2': #Cube bpy.ops.mesh.primitive_cube_add( - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0.0, 0.0, 0.0)) if atom_shape == '3': #Plane bpy.ops.mesh.primitive_plane_add( - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0.0, 0.0, 0.0)) @@ -561,13 +561,13 @@ def draw_obj(atom_shape, atom, new_material): vertices=32, radius=1, fill_type='NOTHING', - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0, 0, 0)) if atom_shape == '4b': #Circle NURBS bpy.ops.surface.primitive_nurbs_surface_circle_add( - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0, 0, 0)) @@ -576,7 +576,7 @@ def draw_obj(atom_shape, atom, new_material): bpy.ops.mesh.primitive_ico_sphere_add( subdivisions=int(index[atom_shape]), radius=1, - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0, 0, 0)) @@ -586,13 +586,13 @@ def draw_obj(atom_shape, atom, new_material): radius=1, depth=2, end_fill_type='NGON', - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0, 0, 0)) if atom_shape == '6b': #Cylinder NURBS bpy.ops.surface.primitive_nurbs_surface_cylinder_add( - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0, 0, 0)) @@ -603,7 +603,7 @@ def draw_obj(atom_shape, atom, new_material): radius2=0, depth=2, end_fill_type='NGON', - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0, 0, 0)) @@ -611,7 +611,7 @@ def draw_obj(atom_shape, atom, new_material): bpy.ops.mesh.primitive_torus_add( rotation=(0, 0, 0), location=atom.location, - view_align=False, + align='WORLD', major_radius=1, minor_radius=0.25, major_segments=48, @@ -620,7 +620,7 @@ def draw_obj(atom_shape, atom, new_material): abso_minor_rad=0.5) if atom_shape == '8b': #Torus NURBS bpy.ops.surface.primitive_nurbs_surface_torus_add( - view_align=False, + align='WORLD', enter_editmode=False, location=atom.location, rotation=(0, 0, 0)) @@ -699,7 +699,7 @@ def draw_obj_special(atom_shape, atom): # F2+ center if atom_shape == '1': # Create first a cube - bpy.ops.mesh.primitive_cube_add(view_align=False, + bpy.ops.mesh.primitive_cube_add(align='WORLD', enter_editmode=False, location=atom.location, rotation=(0.0, 0.0, 0.0)) @@ -763,7 +763,7 @@ def draw_obj_special(atom_shape, atom): # F+ center if atom_shape == '2': # Create first a cube - bpy.ops.mesh.primitive_cube_add(view_align=False, + bpy.ops.mesh.primitive_cube_add(align='WORLD', enter_editmode=False, location=atom.location, rotation=(0.0, 0.0, 0.0)) @@ -790,7 +790,7 @@ def draw_obj_special(atom_shape, atom): # Create now an electron scale = atom.scale / 10.0 bpy.ops.surface.primitive_nurbs_surface_sphere_add( - view_align=False, + align='WORLD', enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0)) @@ -850,7 +850,7 @@ def draw_obj_special(atom_shape, atom): # F0 center if atom_shape == '3': # Create first a cube - bpy.ops.mesh.primitive_cube_add(view_align=False, + bpy.ops.mesh.primitive_cube_add(align='WORLD', enter_editmode=False, location=atom.location, rotation=(0.0, 0.0, 0.0)) @@ -877,7 +877,7 @@ def draw_obj_special(atom_shape, atom): # Create now two electrons scale = atom.scale / 10.0 bpy.ops.surface.primitive_nurbs_surface_sphere_add( - view_align=False, + align='WORLD', enter_editmode=False, location=(scale[0]*1.5,0.0,0.0), rotation=(0.0, 0.0, 0.0)) @@ -886,7 +886,7 @@ def draw_obj_special(atom_shape, atom): electron1.name = atom.name + "_F0_electron1" electron1.parent = cube bpy.ops.surface.primitive_nurbs_surface_sphere_add( - view_align=False, + align='WORLD', enter_editmode=False, location=(-scale[0]*1.5,0.0,0.0), rotation=(0.0, 0.0, 0.0)) diff --git a/io_mesh_atomic/xyz_import.py b/io_mesh_atomic/xyz_import.py index 8f6b4c5b..0daa07e7 100644 --- a/io_mesh_atomic/xyz_import.py +++ b/io_mesh_atomic/xyz_import.py @@ -666,24 +666,24 @@ def import_xyz(Ball_type, # Now, build a representative sphere (atom) if atom.name == "Vacancy": bpy.ops.mesh.primitive_cube_add( - view_align=False, enter_editmode=False, + align='WORLD', enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0)) else: # NURBS balls if Ball_type == "0": bpy.ops.surface.primitive_nurbs_surface_sphere_add( - view_align=False, enter_editmode=False, + align='WORLD', enter_editmode=False, location=(0,0,0), rotation=(0.0, 0.0, 0.0)) # UV balls elif Ball_type == "1": bpy.ops.mesh.primitive_uv_sphere_add( segments=Ball_azimuth, ring_count=Ball_zenith, - view_align=False, enter_editmode=False, + align='WORLD', enter_editmode=False, location=(0,0,0), rotation=(0, 0, 0)) # Meta balls elif Ball_type == "2": - bpy.ops.object.metaball_add(type='BALL', view_align=False, + bpy.ops.object.metaball_add(type='BALL', align='WORLD', enter_editmode=False, location=(0, 0, 0), rotation=(0, 0, 0)) diff --git a/light_field_tools/light_field_tools.py b/light_field_tools/light_field_tools.py index 585e3a9a..981905d5 100644 --- a/light_field_tools/light_field_tools.py +++ b/light_field_tools/light_field_tools.py @@ -137,7 +137,7 @@ class OBJECT_OT_create_lightfield_rig(Operator): def createCameraAnimated(self): scene = bpy.context.scene - bpy.ops.object.camera_add(view_align=False) + bpy.ops.object.camera_add(align='WORLD') cam = bpy.context.active_object cam.name = "light_field_camera" @@ -176,7 +176,7 @@ class OBJECT_OT_create_lightfield_rig(Operator): for cam_idx, vert in enumerate(self.verts): # add and name camera - bpy.ops.object.camera_add(view_align=False) + bpy.ops.object.camera_add(align='WORLD') cam = bpy.context.active_object cam.name = "light_field_cam_" + str(cam_idx) diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py index b126371a..78ccfe4d 100644 --- a/mesh_bsurfaces.py +++ b/mesh_bsurfaces.py @@ -3507,7 +3507,7 @@ class GPENCIL_OT_SURFSK_init(Operator): if not context.scene.bsurfaces.SURFSK_use_annotation 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, view_align=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), type='EMPTY') + 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' gpencil_object = bpy.context.scene.objects[bpy.context.scene.objects[-1].name] gpencil_object.select_set(True) diff --git a/mesh_tissue/lattice.py b/mesh_tissue/lattice.py index 782576cd..4b53afe7 100644 --- a/mesh_tissue/lattice.py +++ b/mesh_tissue/lattice.py @@ -365,7 +365,7 @@ class lattice_along_surface(Operator): bb = max - min lattice_loc = (max + min) / 2 - bpy.ops.object.add(type='LATTICE', view_align=False, + bpy.ops.object.add(type='LATTICE', align='WORLD', enter_editmode=False) lattice = bpy.context.active_object lattice.location = lattice_loc diff --git a/presets/operator/curve.torus_knot_plus/13x8_wicker_globe.py b/presets/operator/curve.torus_knot_plus/13x8_wicker_globe.py index 853a7144..d010a089 100644 --- a/presets/operator/curve.torus_knot_plus/13x8_wicker_globe.py +++ b/presets/operator/curve.torus_knot_plus/13x8_wicker_globe.py @@ -2,7 +2,7 @@ import bpy op = bpy.context.active_operator op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.rotation = (0.0, 0.0, 0.0) op.options_plus = False op.absolute_location = False diff --git a/presets/operator/curve.torus_knot_plus/7x6.py b/presets/operator/curve.torus_knot_plus/7x6.py index 3398214c..03388799 100644 --- a/presets/operator/curve.torus_knot_plus/7x6.py +++ b/presets/operator/curve.torus_knot_plus/7x6.py @@ -2,7 +2,7 @@ import bpy op = bpy.context.active_operator op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.rotation = (0.0, 0.0, 0.0) op.options_plus = False op.absolute_location = False diff --git a/presets/operator/curve.torus_knot_plus/9x9_color.py b/presets/operator/curve.torus_knot_plus/9x9_color.py index a0622a92..5eadb405 100644 --- a/presets/operator/curve.torus_knot_plus/9x9_color.py +++ b/presets/operator/curve.torus_knot_plus/9x9_color.py @@ -2,7 +2,7 @@ import bpy op = bpy.context.active_operator op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.rotation = (0.0, 0.0, 0.0) op.options_plus = False op.absolute_location = False diff --git a/presets/operator/curve.torus_knot_plus/braided_coil.py b/presets/operator/curve.torus_knot_plus/braided_coil.py index b881f394..13ca7851 100644 --- a/presets/operator/curve.torus_knot_plus/braided_coil.py +++ b/presets/operator/curve.torus_knot_plus/braided_coil.py @@ -2,7 +2,7 @@ import bpy op = bpy.context.active_operator op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.rotation = (0.0, 0.0, 0.0) op.options_plus = True op.absolute_location = False diff --git a/presets/operator/curve.torus_knot_plus/flower_mesh_(2d).py b/presets/operator/curve.torus_knot_plus/flower_mesh_(2d).py index 863be9e9..24acd03f 100644 --- a/presets/operator/curve.torus_knot_plus/flower_mesh_(2d).py +++ b/presets/operator/curve.torus_knot_plus/flower_mesh_(2d).py @@ -2,7 +2,7 @@ import bpy op = bpy.context.active_operator op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.rotation = (0.0, 0.0, 0.0) op.options_plus = True op.absolute_location = False diff --git a/presets/operator/curve.torus_knot_plus/slinky_knot.py b/presets/operator/curve.torus_knot_plus/slinky_knot.py index c1e32914..45bd935e 100644 --- a/presets/operator/curve.torus_knot_plus/slinky_knot.py +++ b/presets/operator/curve.torus_knot_plus/slinky_knot.py @@ -3,7 +3,7 @@ op = bpy.context.active_operator op.rotation = (0.0, 0.0, 0.0) op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.options_plus = True op.absolute_location = False op.use_colors = True diff --git a/presets/operator/curve.torus_knot_plus/snowflake_(2d).py b/presets/operator/curve.torus_knot_plus/snowflake_(2d).py index ad0c0a93..429cd38f 100644 --- a/presets/operator/curve.torus_knot_plus/snowflake_(2d).py +++ b/presets/operator/curve.torus_knot_plus/snowflake_(2d).py @@ -2,7 +2,7 @@ import bpy op = bpy.context.active_operator op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.rotation = (0.0, 0.0, 0.0) op.options_plus = True op.absolute_location = False diff --git a/presets/operator/curve.torus_knot_plus/sun_cross_(2d).py b/presets/operator/curve.torus_knot_plus/sun_cross_(2d).py index f3a49b0d..1151ef4d 100644 --- a/presets/operator/curve.torus_knot_plus/sun_cross_(2d).py +++ b/presets/operator/curve.torus_knot_plus/sun_cross_(2d).py @@ -2,7 +2,7 @@ import bpy op = bpy.context.active_operator op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.rotation = (0.0, 0.0, 0.0) op.options_plus = True op.absolute_location = False diff --git a/presets/operator/curve.torus_knot_plus/tripple_dna.py b/presets/operator/curve.torus_knot_plus/tripple_dna.py index ec3ce35b..4ad6df87 100644 --- a/presets/operator/curve.torus_knot_plus/tripple_dna.py +++ b/presets/operator/curve.torus_knot_plus/tripple_dna.py @@ -3,7 +3,7 @@ op = bpy.context.active_operator op.rotation = (0.0, 0.0, 0.0) op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.options_plus = True op.absolute_location = False op.use_colors = True diff --git a/presets/operator/curve.torus_knot_plus/wicker_basket.py b/presets/operator/curve.torus_knot_plus/wicker_basket.py index b4367956..fb5e206d 100644 --- a/presets/operator/curve.torus_knot_plus/wicker_basket.py +++ b/presets/operator/curve.torus_knot_plus/wicker_basket.py @@ -2,7 +2,7 @@ import bpy op = bpy.context.active_operator op.location = (0.0, 0.0, 0.0) -op.view_align = False +op.align = 'WORLD' op.rotation = (0.0, 0.0, 0.0) op.options_plus = True op.absolute_location = False |