RF Python Basic_01

Vertion RealFlow10 If you can do the basics of Python, RF_Python will also be crisp.

This time we will use Batch Script. It can be displayed with `: F10key. ``

: I have a layout like this. Script view Script_Setup..PNG

Introduction


#Create Helloworld

word = "HelloWorld";
scene.message(word);

Script is executed by pressing Ctrl + Enter. Japanese input is Error

If Hello World appears in Messages ... Congratulations! Execution is successful.


Now....

If you want to output the value or some operation result to message .message

scene Is a module. scene can be mapped to a variable.

#into variable
moj = scene;
moj.message("helloWorld");

The string concatenation is ...

scene.message("hello"+"World");
word = "hello";

scene.message(word+"World");

It has been confirmed.


vector module

vector ..PNG

# Create a new vector a compute its module.

vector = Vector.new( 1.0, 2.0, 3.0 );
scene.message( str( vector ) );

Three-dimensional components familiar with CG : Arg (argument) When outputting with: message, it is necessary to enclose it with str (). To get the value of: float ...

#get float component
vector = Vector.new( 1.0, 2.0, 3.0 );
vecX = vector.getX();
scene.message( str( vecX) );

Vector_operater.PNG


Edit_vectorfunction set_function.PNG


The above two parts were difficult for me to learn. If you keep these two in check, you can write a script in a crisp manner.

Recommended Posts

RF Python Basic_01
RF Python Basic_02
Basic Python writing
Python3 basic grammar
Python basic course (12 functions)
Python I'm also basic
Python basic grammar / algorithm
Python Basic Course (7 Dictionary)
Python basic course (2 Python installation)
Basic sorting in Python
Python basic course (9 iterations)
[python] class basic methods
Python Basic Course (11 exceptions)
Python basic course (6 sets)
Python3 cheat sheet (basic)
Python basic grammar (miscellaneous)
Python Basic Course (Introduction)
Python basic memorandum part 2
python basic on windows ②
Python basic memo --Part 2
Python basic course (13 classes)
Basic Python command memo
Python basic grammar note (4)
Python basic grammar note (3)
Basic knowledge of Python
Python basic grammar memo
OpenCV basic code (python)
Python basic memo --Part 1
python memorandum super basic
Python basic course (8 branches)
Python basic if statement
Python Basic Course (3 Python Execution)
Python Basic --Pandas, Numpy-
Basic Python 3 grammar (some Python iterations)
Python application: Pandas Part 1: Basic
Refactoring Learned in Python (Basic)
Python
BASIC authentication with Python bottle
Python basic dict sort order
[Python] Using OpenCV with Python (Basic)
Python basic course (10 inclusion notation)
Python installation and basic grammar
Python Basic Grammar Memo (Part 1)
Python Basic Course (5 List Tuples)
Python basic grammar (miscellaneous) Memo (3)
Python basic grammar (miscellaneous) Memo (2)
Basic Python grammar for beginners
[Python] [SQLite3] Operate SQLite with Python (Basic)
Basic usage of Python f-string
I learned Python basic grammar
Python basic grammar (miscellaneous) Memo (4)
Python (Python 3.7.7) installation and basic grammar
Python Basic Course (1 What is Python)
Java and Python basic grammar comparison
Scraping with Selenium in Python (Basic)
[Python] Basic knowledge used in AtCoder
Python Basic Course (14 Modules and Packages)
1. Statistics learned with Python 1-1. Basic statistics (Pandas)
Basic grammar of Python3 system (dictionary)
Basic Python operation 2nd: Function (argument)
Python application: data visualization part 1: basic