I am working on a remote camera display for crane simulation. It will display 4 perspective cameras in one monitor. I believe that I can`t switch the cameras once it was saved in .vxc file. So my option is to create a script in Editor to allow an active camera to switch its views.
I am new on this programming. Do someone know how to complete this script for changing cameras? Kindly guide me on this.
The basic logic of the script looks like it should work fine. When I try running your attached file, there is a syntax error:
File "<string>", line 11
def pre_step(self):
^
IndentationError: expected an indented block
You have all the code in the on_remove_from _universe function commented, so the function is empty and expects some code. If you just add a "pass" statement at the end of the function, it should work.
The basic logic of the script looks like it should work fine. When I try running your attached file, there is a syntax error:
File "<string>", line 11
def pre_step(self):
^
IndentationError: expected an indented block
You have all the code in the on_remove_from _universe function commented, so the function is empty and expects some code. If you just add a "pass" statement at the end of the function, it should work.
Martin
M
Mark Jayvhie Belbar
said
over 1 year ago
Hi Martin,
I don`t notice this one . Thank you for the help!
After adding pass statement, another syntax error displays - it talks about the getValue().
I replace it with "value" and it works.
Thank you for the guidance. I appreciate it.
Regards,
Mark
b
berk ninan
said
2 months ago
Python language is a very sensitive language for indentation, it has caused confusion for many beginners. Putting in an extra space or leaving one out where it is needed will surely generate an error message . Some common causes of this error include:
Forgetting to indent the statements within a compound statement
Forgetting to indent the statements of a user-defined function.
The error message IndentationError: expected an indented block would seem to indicate that you have an indentation error. It is probably caused by a mix of tabs and spaces. The indentation can be any consistent white space . It is recommended to use 4 spaces for indentation in Python, tabulation or a different number of spaces may work, but it is also known to cause trouble at times. Tabs are a bad idea because they may create different amount if spacing in different editors .
Mark Jayvhie Belbar
Greetings everyone!
I am working on a remote camera display for crane simulation. It will display 4 perspective cameras in one monitor. I believe that I can`t switch the cameras once it was saved in .vxc file. So my option is to create a script in Editor to allow an active camera to switch its views.
I am new on this programming. Do someone know how to complete this script for changing cameras? Kindly guide me on this.
Regards,
Mark
The basic logic of the script looks like it should work fine. When I try running your attached file, there is a syntax error:
File "<string>", line 11
def pre_step(self):
^
IndentationError: expected an indented block
You have all the code in the on_remove_from _universe function commented, so the function is empty and expects some code. If you just add a "pass" statement at the end of the function, it should work.
Martin
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstMartin Hirschkorn
The basic logic of the script looks like it should work fine. When I try running your attached file, there is a syntax error:
File "<string>", line 11
def pre_step(self):
^
IndentationError: expected an indented block
You have all the code in the on_remove_from _universe function commented, so the function is empty and expects some code. If you just add a "pass" statement at the end of the function, it should work.
Martin
Mark Jayvhie Belbar
Hi Martin,
I don`t notice this one . Thank you for the help!
After adding pass statement, another syntax error displays - it talks about the getValue().
I replace it with "value" and it works.
Thank you for the guidance. I appreciate it.
Regards,
Mark
berk ninan
Python language is a very sensitive language for indentation, it has caused confusion for many beginners. Putting in an extra space or leaving one out where it is needed will surely generate an error message . Some common causes of this error include:
The error message IndentationError: expected an indented block would seem to indicate that you have an indentation error. It is probably caused by a mix of tabs and spaces. The indentation can be any consistent white space . It is recommended to use 4 spaces for indentation in Python, tabulation or a different number of spaces may work, but it is also known to cause trouble at times. Tabs are a bad idea because they may create different amount if spacing in different editors .
1 person likes this
Daniel Holz
Absolutely. Very valuable input. Thank you.
-
Licence Keys not working ??
-
Activating license in Linux (Ubuntu)
-
Can not install Vortex Studio on win10
-
Zeroes in VHL interface
-
Vortex Sim reinstall
-
Steering and Pivot Tables
-
A question about transferring to C++ code
-
I don't know how I can active vortex license on Mac OS
-
Office closed during Holidays
-
VR supported build?
See all 51 topics