Giter Club home page Giter Club logo

importsubtitles's People

Contributors

okuma10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

importsubtitles's Issues

A few notes and ideas

Nice to see you working on this.

A few notes:
If you want to add an open-filebrowser button next to the path, there is a template for this in the Template menu: operator_file_import.py

After the import I get this error:
AttributeError: 'Context' object has no attribute 'active_sequence_strip' - I'm running the add-on in 2.93. But it works in 3.0: https://developer.blender.org/rBSc84d1ad3dbf4551b55f7b2630ef4ba7f6512b775https://developer.blender.org/rBSc84d1ad3dbf4551b55f7b2630ef4ba7f6512b775

For some odd reason can't the font type be batch changed with Copy to Selected, so maybe you can find a way to work around that?

The text strips can actually insert text with forced text breaks, but you just can't insert them manually in the string widget. Adding a string like this "line 1"+chr(13)+"line 2" to the text strip will draw the text in two lines.

Using pip to install modules

If you want to add pip installing of external modules, it can be done like this:

import bpy, sys, subprocess, site

app_path = site.USER_SITE
if app_path not in sys.path:
    sys.path.append(app_path)

pybin = sys.executable  # bpy.app.binary_path_python # Use for 2.83

try:
    subprocess.call([pybin, "-m", "ensurepip"])
except ImportError:
    pass

try:
    import pysubs2
except ImportError:
    subprocess.check_call([pybin, "-m", "pip", "install", "pysubs2"])
    import pysubs2```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.