This is by far the BEST explanation video on this subject that I've ever seen. BTW, why there was an error at 10:58? Last one was indeed the number 4 in array. Hi(0), 3(1), 3(2), 45(3) , bob(4) What's the deal?
@Adrian-bz2lp3 жыл бұрын
This foo really said, "If I do a variable called, uh, foo" he knew what he was doing lmao
@letri48663 жыл бұрын
Some segments in the video are stamped not adjacent to each other
@marshallalexander52143 жыл бұрын
really nice job on explaining the basic this was the first video that I watched on programing and i'm glad that it was one that was super easy to understand and pick up.
@forrmol3 жыл бұрын
Finally some how takes it from 0. THK
@aero18503 жыл бұрын
got sent here from school as a reference video for my intro to prog class - got a kick out of the "FOO- BAR" anyone with me ? =) Thanks for the Video!
@DjaabirR3 жыл бұрын
This is by far the most useful video on programming on youtube. Big thank you. Please do continue the series.
@wiseman89583 жыл бұрын
Great Video!! Very helpful .. !! Thank You Sir. For that great work... 💐💐💐💐💐💐💐💐💐🥇🏅👍
edit system variables, i get a window which gives only two options, variable and variable path..i want all options plz help
@RKMalo134 жыл бұрын
Great video!
@tymothylim65504 жыл бұрын
Wow! That was a great video. I enjoyed learning about common environment variables like USER.
@ralphlouis27054 жыл бұрын
Things become fun having a good teacher
@uncleboby59524 жыл бұрын
I want more. Thank you
@frankie_goestohollywood4 жыл бұрын
Thank you!! Great video and great explanation :-)
@abdullahjamali15634 жыл бұрын
Hi everyone 👋 Please subscribe my KZbin channel thankskzbin.info/door/JX34qoTCr0uHyIHdM2M2Nw
@ohbalbobia52894 жыл бұрын
thanks!!!
@gokugohan71094 жыл бұрын
is he eating something "_"
@rootytuners4 жыл бұрын
These tutorials have been phenomenal, and I've learned so much from them! Thanks! With the age of the tutorial, I did have an issue with current versions of the software. I'm finding that the matrix order is different between Maya (2018) and Blender (2.83). The transforms are the lower row in Maya, and the end column in Blender. This is probably due to Maya using (row)(column) for the matrix representation, and Blender using (column)(row). Therefore, for an exported translation position of (3.3, 1.9, 2.1) in (x, y, z): Maya worldMatrix is producing: 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 3.3, 1.9, 2.1, 1.0 Blender matrix_world is expecting: 1.0, 0.0, 0.0, 3.3, 0.0, 1.0, 0.0, 1.9, 0.0, 0.0, 1.0, 2.1, 0.0, 0.0, 0.0, 1.0 A solution is to transpose the matrix using "mathutils.Matrix.transposed()" in the import script - once the Maya matrix is read into Blender. My attempt at transcribing most of the original script (from the tutorial) and adjusting for Blender 2.8 follows in the reply to this comment:
@rootytuners4 жыл бұрын
import os import json import math import bpy import mathutils def importCamera(fileName): # Make sure the file exists if not os.path.exists(fileName): print("The provided file does not exist") return fin = open(fileName, 'r') cameraData = json.load(fin) fin.close() # Create a new camera bpy.ops.object.camera_add() # Give it an unique name newCamera = bpy.context.selected_objects[0] newCamera.name = cameraData['cameraName'] newCamera.data.angle = math.radians(cameraData['hfov']) start = cameraData['frameStart'] end = cameraData['frameEnd'] # Set the current frame (in case we are on a different frame) scene = bpy.context.scene scene.frame_start = start scene.frame_end = end scene.frame_set(start) xrot = mathutils.Matrix.Rotation(math.radians(90), 4, "X") for i in range(int(start), int(end) + 1): matrixIn = cameraData['frames']['matrix_world'][str(i)] frameMatrix = mathutils.Matrix([matrixIn[0:4], matrixIn[4:8], matrixIn[8:12], matrixIn[12:16], ]) # Apply transpose (matrix layout from row, column to column, row) frameMatrixTransposed = mathutils.Matrix.transposed(frameMatrix) # Apply matrix mult with the xrot for the Maya/Blender coord conversion frameMatrixBlender = xrot @ frameMatrixTransposed # Set camera to frame's position newCamera.matrix_world = frameMatrixBlender # Set keyframes newCamera.keyframe_insert("rotation_euler", frame=i) newCamera.keyframe_insert("location", frame=i) if __name__ == '__main__': importCamera("<path to json exported file>")
@scottspa744 жыл бұрын
Great video! I know it's labeled for envvar, bit the path part was the most important to me right now. I just started a class about command line (in windows), and my only previous experience with this was toying with Android ADB, and fastboot years ago, bit never really had an idea what I was doing, just got lucky with a few things. This is total instructor level quality. Great job .
@rootytuners4 жыл бұрын
import os, json import maya.cmds as cmds ''' In Maya's script editor: import maya.cmds as cmds import tdcjson.mayaCamera as mc reload(mc) mc.exportCamera() # or if you want to explicitly name an existing camera: #mc.exportCamera(camera="mycamera') ''' def exportCamera(camera=None, fileName=None): '''Export Maya camera to JSON''' # First let's make sure a camera is provided if not camera: # Get the current selection selection = cmds.ls(selection=True) # If nothing selected, stop if len(selection) == 0: print "You must select a camera to export" return -1 # If more than one item is selected, stop if len(selection) > 1: print "You must select a single camera" return -1 # If there is only one thing selected, let's store it camera = selection[0] # Make sure the selected object is indeed a camera if cmds.nodeType(camera) == "transform": cameraShape = cmds.listRelatives(camera, children=True)[0] # If children is a camera then we continue if cmds.nodeType(cameraShape) != "camera": print "The selected object is not a camera" return -1 # Check if name provided if not fileName: # Then bring up a file dialog basicFilter = ".json" retval = cmds.fileDialog2(dialogStyle=2, fm=0) # If a file was selected if retval: file, ext = os.path.splitext(retval[0]) # If the extension is not *.json, let's add it if ext != ".json": fileName = file + ".json" else: fileName = retval[0] #print fileName # Gather information about the camera frameStart = int(cmds.playbackOptions(query=True, min=True)) frameEnd = int(cmds.playbackOptions(query=True, max=True)) # Set the format for the JSON export: outData = { "cameraName": camera, "frameStart": frameStart, "frameEnd": frameEnd, "vfov": cmds.camera(camera, query=True, verticalFieldOfView=True), "hfov": cmds.camera(camera, query=True, horizontalFieldOfView=True), "frames": {"matrix_world":{}} } # Loop over all the frames in the animation for i in range(frameStart, frameEnd + 1): # Set the current frame cmds.currentTime(i) # Get the camera matrix in world space outData["frames"]["matrix_world"][str(i)] = cmds.xform(camera, query=True, matrix=True, worldSpace=True) cmds.currentTime(frameStart) # Save data to json fout = open(fileName, 'w') json.dump(outData, fout, indent=2) fout.close() print "Exported successfully to %s" % fileName if __name__ == "__main__": exportCamera()
@samikshamaurya70514 жыл бұрын
For beginners.... kzbin.info/www/bejne/n4ampKF3rrKMqpY
@arteconicgi4 жыл бұрын
Thanks!
@MrDmadness4 жыл бұрын
Learning programming right ow, thank you for an understandable explanation. :)
@davidfmorris5074 жыл бұрын
After days of searching and finding hundreds of videos that say "programming for beginners" without explaining the fundamentals .....this is truly a breath of fresh air. well done ..... signed absolute beginner.
@TDChannel114 жыл бұрын
You are most welcome. I'm glad you found this video valuable. Cheers!
@samikshamaurya70514 жыл бұрын
Hey watch this surely for beginners...easiest explanation kzbin.info/www/bejne/n4ampKF3rrKMqpY
@siddharthnagani4 жыл бұрын
Bro, I really appreciate your explanation style. Only this video covers important foundations of EV, which isn't there in other hundreds of videos. After 1 hr search I found your video with perfect understandability factor! Keep up
@SiraGem4 жыл бұрын
I loved this video, it really covers the most basics. I know absolutely nothing about programming apart from having written some dumb HTML in 7th grade, lol. Even though all these concepts were new to me, I could understand everything without much problem.
@samikshamaurya70514 жыл бұрын
Try watching this...it is for beginners kzbin.info/www/bejne/n4ampKF3rrKMqpY
@realbodies14 жыл бұрын
I don't understand any of this shit. :(
@heatherpeterson45465 жыл бұрын
Thank you for such a clear explanation. My eleven year old said: "Finally! Someone I can understand! He says he learned a lot from you and is looking forward to learning more.
@samikshamaurya70514 жыл бұрын
Hey try watching this it would surely help u
@orvilleraposo77605 жыл бұрын
Nice clarity. Thank you. Keep it up.
@Joseph-cn3vr5 жыл бұрын
Thanks a lot for your effort and time. The video was short and clear.
@SniKenna5 жыл бұрын
thank you!
@Angry_Outlaw5 жыл бұрын
2019 and your video is still helping people like me. Thanks
@TDChannel115 жыл бұрын
Thats great to hear JP. Im glad you found it useful.
@furko11035 жыл бұрын
*It is already 2020 :P
@Me_ThatsWho5 жыл бұрын
among the top 2 vids i've seen on this subject
@TDChannel115 жыл бұрын
Thanks so much.
@Me_ThatsWho5 жыл бұрын
not the accent i was expecting...so happy
@RomboutVersluijs5 жыл бұрын
Super nice man! Ive been looking into this for m addon. I already something to work but i also wanted to be able to save settings. Im trying to add the ability that the viewport will have the same viewport settings when you switch workspaces. Now each workspace has its own viewport settings. But sometimes you dont want that when you go from modeling to shading. I want it to have the same viewport location, rotation, matrix etc etc
@TDChannel115 жыл бұрын
Thats awesome. Its been a while since i've coded for blender. I miss it :(
@berniv73755 жыл бұрын
Thank you for explaining the basics of computer programming in a very clear way.
@TDChannel115 жыл бұрын
You are most welcome Bernard
@Zavantica5 жыл бұрын
Latinooo!
@TDChannel115 жыл бұрын
In Da HAUS!!!!
@sitenpatel6075 жыл бұрын
What is name of python compiler you are using? Can you demonstrate same examples with c or c++? Thanks
@TDChannel115 жыл бұрын
Hello Siten. Python does not require a compilation step. The runtime executor compiles the code you as needed. Cheers!
@sexyflanders1235 жыл бұрын
This was exactly what I'm looking for thank you so much excited to watch the rest of the series!!
@TDChannel115 жыл бұрын
Im glad you liked it. I hope you found the series useful