def start_armory(sdk_path: str): global is_running global last_scripts_path global last_sdk_path if sdk_path == "": return armory_path = os.path.join(sdk_path, "armory") if not os.path.exists(armory_path): print("Armory load error: 'armory' folder not found in SDK path." " Please make sure the SDK path is correct or that the SDK" " was downloaded correctly.") return scripts_path = os.path.join(armory_path, "blender") sys.path.append(scripts_path) last_scripts_path = scripts_path update_armory_py(sdk_path, force_relink=True) import start if last_sdk_path != "": import importlib start = importlib.reload(start) use_local_sdk = (sdk_source == SDKSource.LOCAL) start.register(local_sdk=use_local_sdk) last_sdk_path = sdk_path is_running = True print(f'Running Armory SDK from {sdk_path}')
def start_plugin(): haxelib_path = "haxelib" if platform.system() == 'Darwin': haxelib_path = "/usr/local/bin/haxelib" output = subprocess.check_output([haxelib_path + " path cyclesgame"], shell=True) output = str(output).split("\\n")[0].split("'")[1] scripts_path = output[:-8] + "blender/" # Remove 'Sources/' from haxelib path sys.path.append(scripts_path) import start start.register()
def execute(self, context): sdk_path = get_sdk_path(context) if sdk_path == "": print("Configure Armory SDK path first") return {"CANCELLED"} scripts_path = sdk_path + "/armory/blender/" sys.path.append(scripts_path) local_sdk = os.path.exists(get_fp() + '/armsdk') import start start.register(local_sdk=local_sdk) ArmAddonStartButton.running = True return {"FINISHED"}
def execute(self, context): sdk_path = get_sdk_path(context) if sdk_path == "": self.report({"ERROR"}, "Configure SDK path first") return {"CANCELLED"} scripts_path = sdk_path + "/armory/blender/" sys.path.append(scripts_path) import start start.register() ArmAddonStartButton.running = True if not hasattr(bpy.app.handlers, 'scene_update_post'): # 2.8 bpy.types.VIEW3D_HT_header.remove(draw_view3d_header) return {"FINISHED"}
def execute(self, context): sdk_path = get_sdk_path(context) if sdk_path == "": print("Configure Armory SDK path first") return {"CANCELLED"} armory_path = sdk_path + "/armory/" if not os.path.exists(armory_path): print("Armory load error: 'armory' folder not found in SDK path. Please make sure the SDK path is correct or that the SDK was downloaded correctly.") return {"CANCELLED"} scripts_path = armory_path + "blender/" sys.path.append(scripts_path) local_sdk = os.path.exists(get_fp() + '/armsdk') import start start.register(local_sdk=local_sdk) ArmAddonStartButton.running = True return {"FINISHED"}
def execute(self, context): if bpy.app.version >= (2, 80, 1): from bl_ui import properties_render # properties_render.RENDER_PT_render.COMPAT_ENGINES.add('ARMORY') # properties_render.RENDER_PT_output.COMPAT_ENGINES.add('ARMORY') properties_render.RENDER_PT_dimensions.COMPAT_ENGINES.add('ARMORY') from bl_ui import properties_world properties_world.WORLD_PT_context_world.COMPAT_ENGINES.add( 'ARMORY') properties_world.WORLD_PT_custom_props.COMPAT_ENGINES.add('ARMORY') properties_world.EEVEE_WORLD_PT_surface.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_material properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add( 'ARMORY') properties_material.MATERIAL_PT_custom_props.COMPAT_ENGINES.add( 'ARMORY') properties_material.EEVEE_MATERIAL_PT_context_material.COMPAT_ENGINES.add( 'ARMORY') properties_material.EEVEE_MATERIAL_PT_surface.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_object properties_object.OBJECT_PT_custom_props.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_particle properties_particle.PARTICLE_MT_specials.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_MT_hair_dynamics_presets.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_context_particles.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_emission.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_hair_dynamics.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_cache.COMPAT_ENGINES.add('ARMORY') properties_particle.PARTICLE_PT_velocity.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_rotation.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_physics.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_boidbrain.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_render.COMPAT_ENGINES.add('ARMORY') properties_particle.PARTICLE_PT_draw.COMPAT_ENGINES.add('ARMORY') properties_particle.PARTICLE_PT_children.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_field_weights.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_force_fields.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_vertexgroups.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_textures.COMPAT_ENGINES.add( 'ARMORY') properties_particle.PARTICLE_PT_custom_props.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_scene properties_scene.SCENE_PT_scene.COMPAT_ENGINES.add('ARMORY') properties_scene.SCENE_PT_unit.COMPAT_ENGINES.add('ARMORY') properties_scene.SCENE_PT_color_management.COMPAT_ENGINES.add( 'ARMORY') properties_scene.SCENE_PT_audio.COMPAT_ENGINES.add('ARMORY') properties_scene.SCENE_PT_physics.COMPAT_ENGINES.add('ARMORY') properties_scene.SCENE_PT_rigid_body_world.COMPAT_ENGINES.add( 'ARMORY') properties_scene.SCENE_PT_rigid_body_cache.COMPAT_ENGINES.add( 'ARMORY') properties_scene.SCENE_PT_rigid_body_field_weights.COMPAT_ENGINES.add( 'ARMORY') properties_scene.SCENE_PT_custom_props.COMPAT_ENGINES.add('ARMORY') from bl_ui import properties_texture properties_texture.TEXTURE_MT_specials.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_preview.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_context.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_node.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_node_mapping.COMPAT_ENGINES.add( 'ARMORY') properties_texture.TEXTURE_PT_colors.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_clouds.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_wood.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_marble.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_magic.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_blend.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_stucci.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_image.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_image_sampling.COMPAT_ENGINES.add( 'ARMORY') properties_texture.TEXTURE_PT_image_mapping.COMPAT_ENGINES.add( 'ARMORY') properties_texture.TEXTURE_PT_musgrave.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_voronoi.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_distortednoise.COMPAT_ENGINES.add( 'ARMORY') properties_texture.TextureSlotPanel.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_mapping.COMPAT_ENGINES.add('ARMORY') properties_texture.TEXTURE_PT_influence.COMPAT_ENGINES.add( 'ARMORY') properties_texture.TEXTURE_PT_custom_props.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_armature properties_data_armature.DATA_PT_custom_props_arm.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_bone properties_data_bone.BONE_PT_custom_props.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_camera properties_data_camera.CAMERA_MT_presets.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.SAFE_AREAS_MT_presets.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.DATA_PT_context_camera.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.DATA_PT_lens.COMPAT_ENGINES.add('ARMORY') properties_data_camera.DATA_PT_camera_stereoscopy.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.DATA_PT_camera_dof.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.DATA_PT_camera_background_image.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.DATA_PT_camera_display.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.DATA_PT_camera_safe_areas.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.DATA_PT_custom_props_camera.COMPAT_ENGINES.add( 'ARMORY') properties_data_camera.DATA_PT_custom_props_camera.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_curve properties_data_curve.DATA_PT_curve_texture_space.COMPAT_ENGINES.add( 'ARMORY') properties_data_curve.DATA_PT_custom_props_curve.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_lamp properties_data_lamp.LAMP_MT_sunsky_presets.COMPAT_ENGINES.add( 'ARMORY') properties_data_lamp.DATA_PT_context_lamp.COMPAT_ENGINES.add( 'ARMORY') properties_data_lamp.DATA_PT_preview.COMPAT_ENGINES.add('ARMORY') # properties_data_lamp.DATA_PT_lamp.COMPAT_ENGINES.add('ARMORY') properties_data_lamp.DATA_PT_EEVEE_lamp.COMPAT_ENGINES.add( 'ARMORY') properties_data_lamp.DATA_PT_EEVEE_shadow.COMPAT_ENGINES.add( 'ARMORY') properties_data_lamp.DATA_PT_area.COMPAT_ENGINES.add('ARMORY') properties_data_lamp.DATA_PT_spot.COMPAT_ENGINES.add('ARMORY') properties_data_lamp.DATA_PT_falloff_curve.COMPAT_ENGINES.add( 'ARMORY') properties_data_lamp.DATA_PT_custom_props_lamp.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_lattice properties_data_lattice.DATA_PT_custom_props_lattice.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_lightprobe properties_data_lightprobe.DATA_PT_context_lightprobe.COMPAT_ENGINES.add( 'ARMORY') properties_data_lightprobe.DATA_PT_lightprobe.COMPAT_ENGINES.add( 'ARMORY') properties_data_lightprobe.DATA_PT_lightprobe_parallax.COMPAT_ENGINES.add( 'ARMORY') properties_data_lightprobe.DATA_PT_lightprobe_display.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_mesh properties_data_mesh.MESH_MT_vertex_group_specials.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.MESH_MT_shape_key_specials.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.DATA_PT_context_mesh.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.DATA_PT_normals.COMPAT_ENGINES.add('ARMORY') properties_data_mesh.DATA_PT_texture_space.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.DATA_PT_vertex_groups.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.DATA_PT_face_maps.COMPAT_ENGINES.add('ARMORY') properties_data_mesh.DATA_PT_shape_keys.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.DATA_PT_uv_texture.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.DATA_PT_vertex_colors.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.DATA_PT_customdata.COMPAT_ENGINES.add( 'ARMORY') properties_data_mesh.DATA_PT_custom_props_mesh.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_metaball properties_data_metaball.DATA_PT_mball_texture_space.COMPAT_ENGINES.add( 'ARMORY') properties_data_metaball.DATA_PT_custom_props_metaball.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_data_speaker properties_data_speaker.DATA_PT_context_speaker.COMPAT_ENGINES.add( 'ARMORY') properties_data_speaker.DATA_PT_speaker.COMPAT_ENGINES.add( 'ARMORY') properties_data_speaker.DATA_PT_distance.COMPAT_ENGINES.add( 'ARMORY') properties_data_speaker.DATA_PT_cone.COMPAT_ENGINES.add('ARMORY') properties_data_speaker.DATA_PT_custom_props_speaker.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_physics_cloth properties_physics_cloth.PHYSICS_PT_cloth.COMPAT_ENGINES.add( 'ARMORY') properties_physics_cloth.PHYSICS_PT_cloth_cache.COMPAT_ENGINES.add( 'ARMORY') properties_physics_cloth.PHYSICS_PT_cloth_collision.COMPAT_ENGINES.add( 'ARMORY') properties_physics_cloth.PHYSICS_PT_cloth_stiffness.COMPAT_ENGINES.add( 'ARMORY') properties_physics_cloth.PHYSICS_PT_cloth_sewing.COMPAT_ENGINES.add( 'ARMORY') properties_physics_cloth.PHYSICS_PT_cloth_field_weights.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_physics_common properties_physics_common.PHYSICS_PT_add.COMPAT_ENGINES.add( 'ARMORY') properties_physics_common.PHYSICS_PT_add.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_physics_softbody properties_physics_softbody.PHYSICS_PT_softbody.COMPAT_ENGINES.add( 'ARMORY') properties_physics_softbody.PHYSICS_PT_softbody_cache.COMPAT_ENGINES.add( 'ARMORY') properties_physics_softbody.PHYSICS_PT_softbody_goal.COMPAT_ENGINES.add( 'ARMORY') properties_physics_softbody.PHYSICS_PT_softbody_edge.COMPAT_ENGINES.add( 'ARMORY') properties_physics_softbody.PHYSICS_PT_softbody_collision.COMPAT_ENGINES.add( 'ARMORY') properties_physics_softbody.PHYSICS_PT_softbody_solver.COMPAT_ENGINES.add( 'ARMORY') properties_physics_softbody.PHYSICS_PT_softbody_field_weights.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_physics_rigidbody properties_physics_rigidbody.PHYSICS_PT_rigid_body.COMPAT_ENGINES.add( 'ARMORY') properties_physics_rigidbody.PHYSICS_PT_rigid_body_collisions.COMPAT_ENGINES.add( 'ARMORY') properties_physics_rigidbody.PHYSICS_PT_rigid_body_dynamics.COMPAT_ENGINES.add( 'ARMORY') properties_physics_rigidbody.PHYSICS_PT_rigid_body_dynamics.COMPAT_ENGINES.add( 'ARMORY') from bl_ui import properties_physics_rigidbody_constraint properties_physics_rigidbody_constraint.PHYSICS_PT_rigid_body_constraint.COMPAT_ENGINES.add( 'ARMORY') sdk_path = get_sdk_path(context) if sdk_path == "": self.report({"ERROR"}, "Configure SDK path first") return {"CANCELLED"} scripts_path = sdk_path + "/armory/blender/" sys.path.append(scripts_path) import start start.register() ArmAddonStartButton.running = True if not hasattr(bpy.app.handlers, 'scene_update_post'): bpy.types.VIEW3D_HT_header.remove(draw_view3d_header) return {"FINISHED"}
def Register(): start.register()